Semantic tendency analysis system based on dynamic word segmentation and multi-round inquiry

The semantic tendency analysis system based on dynamic word segmentation and multi-turn queries solves the boundary identification and feedback correction problems in existing semantic tendency analysis technologies, achieving high-precision and highly interpretable semantic tendency analysis, and is suitable for complex semantic structures and open user input scenarios.

CN122154703APending Publication Date: 2026-06-05SHANDONG DONGHANG INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG DONGHANG INTELLIGENT TECH CO LTD
Filing Date
2026-03-16
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing semantic sentiment analysis techniques have significant shortcomings in dynamic word segmentation boundary recognition, granular collaborative modeling, feedback correction mechanisms, and context-aware classification. They are unable to handle complex semantic structures and open-ended user input, resulting in insufficient accuracy and interpretability of sentiment analysis.

Method used

A semantic tendency analysis system based on dynamic word segmentation and multi-turn query is adopted, which integrates multi-granularity context encoding mechanism and user feedback-driven semantic correction logic. It performs collaborative modeling through three layers of semantic granularity channels: character level, phrase level and sentence level. It introduces a multi-channel boundary feature encoding network and dynamic threshold determination mechanism to support multi-turn query mechanism and user feedback correction.

Benefits of technology

It significantly improves the accuracy of word segmentation boundary recognition and the precision of sentiment discrimination, enhances the interpretability and robustness of the system, and is applicable to various natural language processing tasks such as public opinion analysis, human-computer dialogue, and text review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122154703A_ABST
    Figure CN122154703A_ABST
Patent Text Reader

Abstract

The application discloses a semantic tendency analysis system based on dynamic word segmentation and multi-round inquiry, comprising the following modules: a character-level embedding construction module, which is used for performing embedding coding and generating a word embedding sequence; a multi-granularity context coding module, which is based on a multi-granularity context coding algorithm and outputs a multi-granularity context feature set; a semantic fusion module, which is used for calculating the difference degree of the multi-granularity context feature set and learning the fusion weight, and generating a fused semantic vector sequence; a neighboring word boundary perception module, which is used for constructing a boundary judgment node, generating a boundary judgment feature vector, and mapping the boundary judgment feature vector into a boundary confidence sequence; a dynamic word segmentation module, which is used for constructing a dynamic threshold function, calling a multi-round inquiry mechanism, and outputting a structured word sequence; and a semantic tendency discrimination module, which is used for performing word vector mapping and context modeling, and outputting a sentiment label result and a corresponding confidence score. The application constructs a high-precision semantic tendency analysis system suitable for a complex context.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of natural language processing and artificial intelligence, and in particular to a semantic tendency analysis system based on dynamic word segmentation and multi-turn queries. Background Technology

[0002] In the field of natural language processing, achieving high-precision and highly interpretable semantic sentiment analysis, especially in scenarios with complex semantic structures and open-ended user input, has always been a core issue in artificial intelligence research and engineering applications. With the increasing demand for semantic tasks such as public opinion analysis, dialogue systems, and content moderation, traditional sentiment analysis methods relying on static dictionaries, rule templates, or simple word segmenters are gradually revealing limitations such as weak generalization ability, poor response flexibility, and difficulty in handling semantic ambiguity. Particularly when dealing with colloquial expressions, long texts with contextual dependencies, and highly subjective opinion texts, existing methods often struggle to accurately identify semantic boundaries, leading to distorted downstream sentiment judgments and impacting the overall system's application performance.

[0003] Most current mainstream sentiment analysis systems rely on fixed-granularity lexical units (such as dictionary words and pre-trained segmentation results) as the basis for analysis, lacking flexible and context-adaptive dynamic segmentation mechanisms. This makes them ill-suited for natural language inputs with semantic leaps, nested phrases, or cross-phrase sentiment transfer characteristics. Furthermore, due to the multi-layered and ambiguous nature of contextual semantics, systems based on single-granularity modeling often struggle to simultaneously capture local structural details and global semantic trends. Some studies have attempted to introduce multi-granularity models to enhance the semantic representation of text, such as joint character-level and word-level modeling or word-sentence-level feature fusion methods. However, these approaches still suffer from problems such as a lack of interactive feedback between granularities, fixed feature fusion methods, and imperfect attention control strategies, failing to fully leverage the advantages of multi-granularity modeling.

[0004] In terms of boundary recognition, traditional word segmentation techniques often employ static threshold judgment strategies based on statistical models or neural network scoring. These strategies struggle to flexibly adjust segmentation boundaries to accommodate varying text complexity and expression styles, leading to boundary drift or missegmentation. Especially when boundary confidence is insufficient or ambiguous regions exist, existing systems lack the ability to collaboratively optimize with user interaction, failing to clarify ambiguous text and correct boundaries. Furthermore, while some models have introduced attention mechanisms to enhance feature perception in recent years, most are limited to unidirectional feature selection, failing to combine boundary information with feedback mechanisms to achieve closed-loop optimization.

[0005] Regarding user feedback mechanisms, existing systems often treat semantic understanding as a one-time static processing step, lacking the ability to dynamically query and correct user input. Once the model deviates in boundary judgment or sentiment classification, it cannot proactively generate clarifying questions, collect feedback, and optimize its judgment accordingly, limiting the system's ability to handle complex inputs such as semantic ambiguity, stylistic variations, and cold-start scenarios. Furthermore, existing multi-turn interactive query mechanisms are mostly limited to dialogue generation or recommendation, lacking systematic design in semantic tendency recognition and a tight coupling mechanism with dynamic word segmentation and semantic modeling processes.

[0006] Therefore, existing semantic sentiment analysis technologies still have significant shortcomings in dynamic word segmentation boundary recognition, granular collaborative modeling, feedback correction mechanisms, and context-aware classification. There is an urgent need for a semantic sentiment analysis system that supports multi-granular semantic encoding, integrates multiple rounds of user feedback, has dynamic threshold adjustment capabilities, and an interactive semantic clarification mechanism, in order to achieve higher accuracy, stronger robustness, and higher interpretability in text sentiment discrimination. Summary of the Invention

[0007] One objective of this invention is to propose a semantic tendency analysis system based on dynamic word segmentation and multi-turn querying. This invention integrates a multi-granularity context encoding mechanism with user feedback-driven semantic correction logic to construct a structured word segmentation and semantic tendency recognition system for natural language text. By introducing three layers of semantic granularity channels—character-level, phrase-level, and sentence-level—it achieves collaborative modeling and semantic fusion of contextual features, improving the accuracy of word segmentation boundary recognition. Through the design of a multi-channel boundary feature encoding network and a dynamic threshold determination mechanism, it enhances the system's ability to perceive complex semantic boundaries. Simultaneously, by introducing a multi-turn querying mechanism and a user feedback correction strategy, it supports interactive clarification and dynamic updating of low-confidence boundaries, significantly improving the accuracy and interpretability of word segmentation and sentiment judgment. This system possesses advantages such as strong semantic modeling capabilities, good feedback adaptability, high word segmentation flexibility, and excellent sentiment classification accuracy, making it suitable for intelligent semantic tendency judgment scenarios in various natural language processing tasks, including public opinion analysis, human-computer dialogue, and text review.

[0008] The semantic tendency analysis system based on dynamic word segmentation and multi-turn query according to an embodiment of the present invention includes the following modules: The character-level embedding building block is used to acquire raw natural language text and convert it into a character sequence, perform embedding encoding on each character, and generate a character embedding sequence; The multi-granularity context coding module receives word embedding sequences and outputs a multi-granularity context feature set based on the multi-granularity context coding algorithm. The semantic fusion module is used to calculate the difference and learn the fusion weights of multi-granularity context feature sets to generate a fused semantic vector sequence. The adjacent word boundary awareness module is used to construct boundary determination nodes between each pair of adjacent characters in the fused semantic vector sequence, extract the boundary input vector to generate boundary determination feature vectors, and map them into a boundary confidence sequence; The dynamic word segmentation module is used to construct a dynamic threshold function based on the boundary confidence sequence, perform boundary judgment and index extraction operations, call a multi-round query mechanism to generate semantically clarifying questions and correct the boundary confidence based on user feedback results, and output a structured word sequence. The semantic sentiment discrimination module receives structured word sequence, performs word vector mapping and context modeling, generates a global semantic vector based on the attention mechanism, inputs it into a multi-class sentiment classifier, outputs sentiment label results and corresponding confidence scores, and feeds them back to the system response interface.

[0009] The semantic tendency analysis method based on dynamic word segmentation and multi-turn query according to embodiments of the present invention includes the following steps: S1. Obtain the raw natural language text, perform character-level embedding encoding, and generate a word embedding sequence; S2. Input the word embedding sequence into the multi-granularity context encoding algorithm to extract context features based on character granularity, phrase granularity and sentence granularity respectively, and construct a multi-granularity context feature set; S3. Perform a weighted fusion operation on the multi-granularity context feature set to generate a fused semantic vector sequence, wherein each fused semantic vector in the fused semantic vector sequence is consistent with the word embedding sequence in terms of order and index. S4. Input the fused semantic vector sequence into the adjacent word boundary perception network, construct a boundary determination node between each pair of adjacent characters, input the fused semantic vector of the adjacent characters into the boundary determination node, calculate the boundary confidence value, and output the boundary confidence sequence. S5. Based on the dynamic threshold function, perform threshold comparison on the boundary confidence value, generate a word boundary index sequence, call the multi-round query mechanism, generate targeted semantic clarification questions and collect user feedback information, correct the corresponding boundary position based on the user feedback information, and generate a structured word sequence. S6. Perform word-level context modeling and semantic classification operations on the structured word sequence to generate sentiment label results and corresponding confidence scores, and output them to the system response interface.

[0010] Optionally, S1 specifically includes: S11. Obtain the original natural language text and convert it into an original character sequence, wherein the original character sequence is arranged in character order; S12. For each character in the character sequence, perform character-level embedding encoding to construct a character embedding vector. The character embedding vector is composed of a character position encoding vector, a character part-of-speech encoding vector, and a character context prior vector. The total dimension of the character embedding vector is the sum of the dimensions of the three sub-vectors. The character position encoding vector is used to represent the absolute position of the character in the original character sequence, the character part-of-speech encoding vector is used to represent the part-of-speech category to which the character belongs, and the character context prior vector is used to represent the predefined contextual semantic information associated with the character. S13. Arrange all character embedding vectors in the order of the original character sequence and concatenate them to generate a character embedding sequence.

[0011] Optionally, the multi-granularity context coding algorithm specifically includes a context granularity initialization module, a multi-granularity context feature extraction module, a cross-granularity collaborative modeling module, a granularity weight adjustment module, and a context alignment module: The context granularity initialization module receives the word embedding sequence, copies it, and maps it to character granularity input channels, phrase granularity input channels, and sentence granularity input channels; The multi-granularity context feature extraction module is used to extract character context features, phrase context features, and sentence context features from the character-granularity input channel, phrase-granularity input channel, and sentence-granularity input channel, respectively, and align them according to the character index positions in the character embedding sequence to construct a multi-granularity context feature set. The character-granularity input channel calls a one-way gated recurrent unit network to extract character context features. The phrase-granularity input channel divides variable-length phrase segments based on part-of-speech transfer points and semantic gradient boundary detection, and extracts phrase context features through a multi-layer convolutional neural network. The sentence-granularity input channel uses a bidirectional long short-term memory network for context modeling and outputs sentence context features. The cross-granularity collaborative modeling module is used to establish a horizontal information interaction path between the character-level, phrase-level, and sentence-level feature extraction stages. Through a downlink guidance and uplink feedback mechanism, it guides collaborative modeling between different granularities during the feature extraction process. The downlink guidance and uplink feedback mechanism involves generating a semantic guidance vector from the encoding results of phrase-level and sentence-level granularities and mapping it to the character-level granularity channel to participate in state updates. The uplink feedback extracts boundary change and sentiment mutation features from the character-level and phrase-level granularities, constructs a feedback signal, and injects it into the sentence-level granularity channel to adjust the attention weight vector of the sentence-level granularity channel. The granularity weight control module calculates the attention weight vectors of the character granularity channel, phrase granularity channel and sentence granularity channel based on the saliency scoring function, and performs a weighted fusion operation on the multi-granularity context feature set to generate a fused semantic vector sequence. The context alignment module aligns the fused semantic vector sequence with the word embedding sequence index position and outputs it to the boundary awareness network module.

[0012] Optionally, S2 specifically includes: S21. Input the character embedding sequence into the multi-granularity context coding algorithm, wherein the context granularity initialization module receives the character embedding sequence, copies and maps it to the character granularity input channel, the phrase granularity input channel and the sentence granularity input channel; S22. In the character-level input channel, a one-way gated recurrent unit network is invoked to perform recursive encoding on each character embedding vector in the character embedding sequence, generating a character context feature sequence. ,in, For the length of the word embedding sequence, For the first The context representation of each character position in the character granularity channel; during the state encoding process, the character granularity input channel receives the semantic guidance vector generated by the phrase granularity channel and the sentence granularity channel as modulation input, and adjusts its own state update strategy; S23. In the phrase-level input channel, dynamic segmentation is performed on the word embedding sequence based on part-of-speech transition points and semantic gradient boundary functions to obtain a set of phrase segments. The semantic gradient boundary function is: ; in, , , These correspond to the weighting coefficients of embedding difference, attention gradient, and context discontinuity, respectively. For the first The word embedding vector at each character position. For the first The and the first The Euclidean distance between word embedding vectors at each character position. For the first The word embedding vector at each character position corresponds to the attention-weighted context vector. For the first The gradient response of the word embedding vector at each character position to the local context state. For the first The word embedding vector at the i-th character position in the local context Attention score of word embedding vector at each character position. For the size of the attention window, For the first The phrase segment representation vector centered on the word embedding vector at each character position is generated by a local convolutional network acting on the sequence of neighboring word embeddings. for and Cosine similarity between two local context vectors To measure the first The and the first A function exists that determines whether there are semantic boundaries between word embedding vectors at n character positions, satisfying the condition that... When it is determined to be a phrase boundary, where, The set boundary judgment threshold; while extracting the boundary response, the phrase granular input channel records the jump point location information and context features as semantic feedback signals to adjust the modeling behavior in the sentence granular input channel; S24. For each phrase segment, input it into a multi-layer convolutional neural network to extract phrase context features. ,in, For the length of the word embedding sequence, For the first The context representation of each character position in the phrase-granular channel, each Corresponding to the character index position Alignment is achieved through interpolation within the fragment; S25. In the sentence-level input channel, the word embedding sequence is input into the bidirectional long short-term memory network to obtain the sentence context feature sequence. ,in, For the length of the word embedding sequence, For the first The context representation of each character position in the sentence-level channel; during the modeling process, the sentence-level input channel dynamically adjusts the attention distribution weights based on the boundary abrupt change points detected in the character-level input channel and the jump signals fed back from the phrase-level channel; S26, will , , Construct a multi-granularity context feature set by aligning according to character position index.

[0013] Optionally, S3 specifically includes: S31. The granularity weight adjustment module receives a multi-granularity context feature set. For each character position, it calculates the semantic difference value between granularity context features to obtain the semantic difference between character granularity and phrase granularity, and the semantic difference between phrase granularity and sentence granularity. ; ; in, This is a measure of the semantic difference between character-level and phrase-level granularity. This is a measure of the semantic difference between phrase-level and sentence-level granularity. For the first The context representation of each character position in the character granularity channel. For the first The context representation of each character position in the phrase-level channel. For the first The context representation of each character position in the sentence-level channel. This is the squared form of the Euclidean distance; S32. Concatenate character context features, phrase context features, sentence context features, and semantic difference values ​​into a joint representation vector, input it into the fusion weight calculation network, and generate the first... The fusion weight vector corresponding to each character position: ; in, For the first The fusion weight vector corresponding to each character position For weighted fusion function, These are the output layer weight parameters. For activation function, These are the hidden layer weight parameters. This is a vector concatenation operation. A learnable parameter vector; S33. Based on the fusion weight vector, linear weights are applied to the context features of each granularity to generate a fusion semantic vector; S34. Combine the fused semantic vectors of all character positions in character order to generate a fused semantic vector sequence.

[0014] Optionally, the adjacent word boundary awareness network specifically includes a boundary node construction module, a boundary feature encoding module, a boundary confidence calculation module, and a boundary sequence output module: The boundary node construction module constructs boundary determination nodes between each pair of adjacent characters in the fused semantic vector sequence; The boundary feature encoding module extracts the fused semantic vectors of adjacent characters on both sides of the current boundary and concatenates them to form a boundary input vector, which is then sequentially input into a multi-channel boundary feature encoding structure. The multi-channel boundary feature encoding structure includes a main channel and an attention channel. The main channel performs an affine transformation on the boundary input vector and uses the GELU activation function to generate main channel features. The attention channel performs a gating transformation on the boundary input vector and uses the sigmoid function to generate attention channel features. The main channel features and the attention channel features are fused by element-wise multiplication to generate a boundary determination feature vector. The boundary confidence calculation module receives the boundary determination feature vector, inputs it into a one-dimensional neural mapping network, and maps it to a boundary confidence value between 0 and 1 through an activation function, which is used to characterize the confidence level that the current character boundary is a word segmentation point. The boundary sequence output module arranges the boundary confidence values ​​in the original character order to form a boundary confidence sequence.

[0015] Optionally, S4 specifically includes: S41. In the fused semantic vector sequence, a boundary determination node is constructed between each pair of adjacent characters corresponding to the fused semantic vector; S42. Extract the fused semantic vector corresponding to the characters on both sides of the current boundary node and input it into the boundary determination node, and perform concatenation and residual operations to generate the boundary input vector; S43. Input the boundary input vector into the multi-channel boundary feature encoding structure, and perform semantic enhancement and gating modeling through the main channel and attention channel respectively to generate the boundary determination feature vector: ; in, For the first The boundary input vector at each boundary determination node. The weight matrix for the main channel. The bias vector of the main channel. The main channel activation function, To pay attention to the channel weight matrix, To be aware of the channel bias vector, To note the channel activation function, For the first Boundary determination feature vectors at each boundary determination node; S44. Perform a confidence mapping operation on all boundary determination feature vectors to generate a boundary confidence sequence, wherein the boundary confidence sequence corresponds to the length of the input character sequence.

[0016] Optionally, S5 specifically includes: S51. Construct a dynamic threshold function to perform point-by-point judgment on each boundary confidence value in the boundary confidence sequence: ; in, For the first The dynamic boundary determination threshold corresponding to each character position. This is the mean adjustment coefficient. The mean of the boundary confidence sequence. This is the contrast adjustment coefficient. The standard deviation of the boundary confidence sequence. For context-aware adjustment coefficients, It is a non-linear activation function. The radius of the local context window. For the first Boundary confidence values ​​at each boundary location. For the first Attention weights at each boundary position; S52. For each boundary location, compare the boundary confidence value with the corresponding dynamic boundary judgment threshold. If the conditions are met... Then the index Mark as valid word boundaries; for boundary positions where the boundary confidence value is lower than the set threshold tolerance, invoke a multi-round query mechanism to generate targeted semantic clarification questions and collect user feedback information, correct the valid word boundaries based on the feedback information, and construct a word boundary index set; S53. Based on the word boundary index set, and using adjacent index pairs as the segmentation basis, extract continuous character intervals from the original natural language text to form a structured word sequence, while maintaining consistency with the original character index.

[0017] Optionally, S6 specifically includes: S61. Receive the structured word sequence and map each structured word into a structured word vector through the word embedding mapping function to form a word vector sequence; S62. Input the word vector sequence into a bidirectional gated recurrent unit network, model the context information in the forward and backward channels respectively, and generate the hidden state sequence. ; S63. Based on the hidden state sequence, introduce a context-aware attention mechanism to calculate the global semantic vector: ; in, For global semantic vectors, The length of the structured word sequence. For attention scoring vectors, It is a non-linear activation function. The linear projection weight matrix is For the first A context representation vector for each structured word. This is the affine transformation bias term; S64. Input the global semantic vector into the semantic sentiment classifier, perform Softmax multi-class sentiment classification, and output the sentiment label results and corresponding confidence scores: ; ; in, For sentiment labeling results, For sentiment classification weight matrix, To classify the affine transformation bias term, For normalization function, To generate a confidence score, the sentiment label results and their corresponding confidence scores are output to the system response interface.

[0018] The beneficial effects of this invention are: This invention overcomes the limitations of fixed-granularity modeling in traditional sentiment analysis methods by constructing a multi-granularity contextual modeling mechanism that integrates character-level, phrase-level, and sentence-level input channels. It can extract rich contextual features from different language levels, enhancing the system's ability to perceive semantic shifts, sentiment transfer, and complex contexts. By introducing contextual granularity initialization, cross-granularity collaborative modeling, and granularity weight adjustment mechanisms, each semantic channel achieves state decoupling during the encoding stage and weighted aggregation guided by semantic differences during the fusion stage. This effectively improves the model's stability in expressing fuzzy boundaries and cross-sentence structures, ensuring the contextual consistency and sentiment recognition sensitivity of the fused semantic vectors.

[0019] This invention designs a multi-channel boundary-aware network, utilizing a complementary encoding mechanism between the main channel and the attention channel to construct boundary judgment feature representations, significantly improving the ability to discriminate potential word boundaries. Simultaneously, the system introduces a dynamic boundary confidence function, constructing an adaptive judgment threshold by combining global statistics and local attention information. This supports flexible adjustment of boundary confidence under different contextual complexities, overcoming the shortcomings of traditional fixed-threshold strategies in boundary semantic perception, and ensuring the adaptability and robustness of word segmentation in diverse semantic expression scenarios.

[0020] Furthermore, this invention introduces a multi-round query mechanism into the dynamic word segmentation module, using low-confidence boundaries as trigger conditions. By generating targeted semantic clarification questions and collecting user feedback, it achieves a semantic correction process based on human-computer interaction. The feedback signal is not only used for the dynamic updating of local boundary positions but also serves as an auxiliary signal in the semantic modeling process, transmitting it to the high-level classification module. This constructs a feedback closed-loop structure from word boundary determination to sentiment classification, significantly improving the model's accuracy and interpretability in discriminating ambiguous expressions, cold-start samples, and semantically ambiguous regions. It also compensates for the shortcomings of existing systems in terms of user controllability and semantic error correction capabilities.

[0021] Furthermore, this invention integrates a contextual attention mechanism and a multi-class Softmax sentiment classifier in the semantic tendency discrimination stage, enabling the generation of global semantic vectors for complex text and the joint output of sentiment labels and confidence scores. Through continuous optimization of the structured lexical sequence based on multi-round query results, the system not only improves the accuracy of sentiment classification but also provides stable and reliable intermediate semantic representations for subsequent modules such as sentiment generation and semantic summarization. This invention possesses advantages such as accurate boundary determination, flexible semantic modeling, strong interactive feedback capabilities, and high sentiment recognition accuracy, making it suitable for various natural language processing applications such as public opinion monitoring, user intent recognition, and intelligent customer service. Attached Figure Description

[0022] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of the semantic tendency analysis system based on dynamic word segmentation and multi-turn query proposed in this invention; Figure 2 This is an overall flowchart of the semantic tendency analysis method based on dynamic word segmentation and multi-turn query proposed in this invention; Figure 3 This is a schematic diagram of the multi-granularity context encoding algorithm of the semantic tendency analysis method based on dynamic word segmentation and multi-turn query proposed in this invention. Detailed Implementation

[0023] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0024] refer to Figure 1 A semantic tendency analysis system based on dynamic word segmentation and multi-turn queries includes the following modules: The character-level embedding building block is used to acquire raw natural language text and convert it into a character sequence, perform embedding encoding on each character, and generate a character embedding sequence; The multi-granularity context coding module receives word embedding sequences and outputs a multi-granularity context feature set based on the multi-granularity context coding algorithm. The semantic fusion module is used to calculate the difference and learn the fusion weights of multi-granularity context feature sets to generate a fused semantic vector sequence. The adjacent word boundary awareness module is used to construct boundary determination nodes between each pair of adjacent characters in the fused semantic vector sequence, extract the boundary input vector to generate boundary determination feature vectors, and map them into a boundary confidence sequence; The dynamic word segmentation module is used to construct a dynamic threshold function based on the boundary confidence sequence, perform boundary judgment and index extraction operations, call a multi-round query mechanism to generate semantically clarifying questions and correct the boundary confidence based on user feedback results, and output a structured word sequence. The semantic sentiment discrimination module receives structured word sequence, performs word vector mapping and context modeling, generates a global semantic vector based on the attention mechanism, inputs it into a multi-class sentiment classifier, outputs sentiment label results and corresponding confidence scores, and feeds them back to the system response interface.

[0025] This paper proposes a semantic sentiment analysis system for natural language text through a modular architecture design. Each module has a clearly defined function, covering the entire process from character-level input, semantic modeling, dynamic word segmentation to sentiment output. The system introduces a fusion of semantic representation and boundary awareness mechanisms to provide more structured and context-consistent input for subsequent sentiment analysis, effectively addressing the shortcomings of traditional static word segmentation models in addressing boundary ambiguity, contextual fragmentation, and sentiment drift. The overall architecture supports human-computer interaction and feedback loops, improving the system's accuracy in representing complex text semantics and its robustness in analysis.

[0026] refer to Figure 2-3 The semantic tendency analysis method based on dynamic word segmentation and multi-turn queries includes the following steps: S1. Obtain the raw natural language text, perform character-level embedding encoding, and generate a word embedding sequence; S2. Input the word embedding sequence into the multi-granularity context encoding algorithm to extract context features based on character granularity, phrase granularity and sentence granularity respectively, and construct a multi-granularity context feature set; S3. Perform a weighted fusion operation on the multi-granularity context feature set to generate a fused semantic vector sequence, wherein each fused semantic vector in the fused semantic vector sequence is consistent with the word embedding sequence in terms of order and index. S4. Input the fused semantic vector sequence into the adjacent word boundary perception network, construct a boundary determination node between each pair of adjacent characters, input the fused semantic vector of the adjacent characters into the boundary determination node, calculate the boundary confidence value, and output the boundary confidence sequence. S5. Based on the dynamic threshold function, perform threshold comparison on the boundary confidence value, generate a word boundary index sequence, call the multi-round query mechanism, generate targeted semantic clarification questions and collect user feedback information, correct the corresponding boundary position based on the user feedback information, and generate a structured word sequence. S6. Perform word-level context modeling and semantic classification operations on the structured word sequence to generate sentiment label results and corresponding confidence scores, and output them to the system response interface.

[0027] This methodology has a clear flow, encompassing steps such as embedding encoding, multi-granularity modeling, dynamic word segmentation, boundary correction, and sentiment classification, constructing a modularly deployable semantic sentiment analysis path. By combining dynamic thresholds with multi-turn queries, the system's adaptability to fuzzy boundaries and semantic error correction capabilities are effectively improved. This process not only enhances the accuracy of sentiment judgment but also strengthens the system's generalization ability when handling unknown expression styles, syntactic variations, and cold-start inputs, demonstrating good portability and interactive upgrade potential.

[0028] In this embodiment, S1 specifically includes: S11. Obtain the original natural language text and convert it into an original character sequence, wherein the original character sequence is arranged in character order; S12. For each character in the character sequence, perform character-level embedding encoding to construct a character embedding vector. The character embedding vector is composed of a character position encoding vector, a character part-of-speech encoding vector, and a character context prior vector. The total dimension of the character embedding vector is the sum of the dimensions of the three sub-vectors. The character position encoding vector is used to represent the absolute position of the character in the original character sequence, the character part-of-speech encoding vector is used to represent the part-of-speech category to which the character belongs, and the character context prior vector is used to represent the predefined contextual semantic information associated with the character. S13. Arrange all character embedding vectors in the order of the original character sequence and concatenate them to generate a character embedding sequence.

[0029] By introducing three types of information—position, part-of-speech tagging, and contextual prior vectors—in the character-level embedding construction process, each character representation possesses word order characteristics, syntactic information, and semantic guidance capabilities, effectively enhancing the discriminativeness and context sensitivity of the embedded representation. This approach overcomes the shortcomings of traditional static word embeddings in adapting to low-frequency and novel words, improving the foundation for global semantic construction while maintaining the flexibility of character-level granular modeling, and laying a more solid feature foundation for multi-granularity encoding and subsequent boundary judgment.

[0030] In this embodiment, the multi-granularity context coding algorithm specifically includes a context granularity initialization module, a multi-granularity context feature extraction module, a cross-granularity collaborative modeling module, a granularity weight adjustment module, and a context alignment module: The context granularity initialization module receives the word embedding sequence, copies it, and maps it to character granularity input channels, phrase granularity input channels, and sentence granularity input channels; The multi-granularity context feature extraction module is used to extract character context features, phrase context features, and sentence context features from the character-granularity input channel, phrase-granularity input channel, and sentence-granularity input channel, respectively, and align them according to the character index positions in the character embedding sequence to construct a multi-granularity context feature set. The character-granularity input channel calls a one-way gated recurrent unit network to extract character context features. The phrase-granularity input channel divides variable-length phrase segments based on part-of-speech transfer points and semantic gradient boundary detection, and extracts phrase context features through a multi-layer convolutional neural network. The sentence-granularity input channel uses a bidirectional long short-term memory network for context modeling and outputs sentence context features. The cross-granularity collaborative modeling module is used to establish a horizontal information interaction path between the character-level, phrase-level, and sentence-level feature extraction stages. Through a downlink guidance and uplink feedback mechanism, it guides collaborative modeling between different granularities during the feature extraction process. The downlink guidance and uplink feedback mechanism involves generating a semantic guidance vector from the encoding results of phrase-level and sentence-level granularities and mapping it to the character-level granularity channel to participate in state updates. The uplink feedback extracts boundary change and sentiment mutation features from the character-level and phrase-level granularities, constructs a feedback signal, and injects it into the sentence-level granularity channel to adjust the attention weight vector of the sentence-level granularity channel. The granularity weight control module calculates the attention weight vectors of the character granularity channel, phrase granularity channel and sentence granularity channel based on the saliency scoring function, and performs a weighted fusion operation on the multi-granularity context feature set to generate a fused semantic vector sequence. The context alignment module aligns the fused semantic vector sequence with the word embedding sequence index position and outputs it to the boundary awareness network module.

[0031] By introducing three types of input channels—character-level, phrase-level, and sentence-level—and combining granularity initialization, independent encoding, and collaborative feedback mechanisms, this invention achieves multi-level semantic feature decomposition modeling and information interaction. Semantic perspectives at different granularities can achieve complementary expression at key locations such as blurred boundaries and abrupt emotional shifts, significantly improving the system's ability to resolve semantic jumps, emotional transitions, and ambiguous intervals. The collaborative mechanism, through the flow of uplink and downlink signals, strengthens the adaptability and information coupling between granularities, effectively avoiding the problem of granularity imbalance during independent modeling.

[0032] In this embodiment, S2 specifically includes: S21. Input the character embedding sequence into the multi-granularity context coding algorithm, wherein the context granularity initialization module receives the character embedding sequence, copies and maps it to the character granularity input channel, the phrase granularity input channel and the sentence granularity input channel; S22. In the character-level input channel, a one-way gated recurrent unit network is invoked to perform recursive encoding on each character embedding vector in the character embedding sequence, generating a character context feature sequence. ,in, For the length of the word embedding sequence, For the first The context representation of each character position in the character granularity channel; during the state encoding process, the character granularity input channel receives the semantic guidance vector generated by the phrase granularity channel and the sentence granularity channel as modulation input, and adjusts its own state update strategy; S23. In the phrase-level input channel, dynamic segmentation is performed on the word embedding sequence based on part-of-speech transition points and semantic gradient boundary functions to obtain a set of phrase segments. The semantic gradient boundary function is: ; in, , , These correspond to the weighting coefficients of embedding difference, attention gradient, and context discontinuity, respectively. For the first The word embedding vector at each character position. For the first The and the first The Euclidean distance between word embedding vectors at each character position. For the first The word embedding vector at each character position corresponds to the attention-weighted context vector. For the first The gradient response of the word embedding vector at each character position to the local context state. For the first The word embedding vector at the i-th character position in the local context Attention score of word embedding vector at each character position. For the size of the attention window, For the first The phrase segment representation vector centered on the word embedding vector at each character position is generated by a local convolutional network acting on the sequence of neighboring word embeddings. for and Cosine similarity between two local context vectors To measure the first The and the first A function exists that determines whether there are semantic boundaries between word embedding vectors at n character positions, satisfying the condition that... When it is determined to be a phrase boundary, where, The set boundary judgment threshold; while extracting the boundary response, the phrase granular input channel records the jump point location information and context features as semantic feedback signals to adjust the modeling behavior in the sentence granular input channel; S24. For each phrase segment, input it into a multi-layer convolutional neural network to extract phrase context features. ,in, For the length of the word embedding sequence, For the first The context representation of each character position in the phrase-granular channel, each Corresponding to the character index position Alignment is achieved through interpolation within the fragment; S25. In the sentence-level input channel, the word embedding sequence is input into the bidirectional long short-term memory network to obtain the sentence context feature sequence. ,in, For the length of the word embedding sequence, For the first The context representation of each character position in the sentence-level channel; during the modeling process, the sentence-level input channel dynamically adjusts the attention distribution weights based on the boundary abrupt change points detected in the character-level input channel and the jump signals fed back from the phrase-level channel; S26, will , , Construct a multi-granularity context feature set by aligning according to character position index.

[0033] Introducing a semantic gradient boundary function into the phrase-level channel, and combining embedding variation, attention gradient, and contextual similarity to determine the boundary, enables accurate identification of semantic transition points and potential phrase segmentation points. This mechanism allows the system to automatically identify natural breaks in semantic structure, improving the semantic rationality of word segmentation and its adaptability to downstream tasks. Phrase transition signals can also be used to adjust the attention distribution in the sentence-level channel, enhancing the overall multi-granularity coding structure's response accuracy in sentiment recognition and its ability to perceive sudden semantic information.

[0034] In this embodiment, S3 specifically includes: S31. The granularity weight adjustment module receives a multi-granularity context feature set. For each character position, it calculates the semantic difference value between granularity context features to obtain the semantic difference between character granularity and phrase granularity, and the semantic difference between phrase granularity and sentence granularity. ; ; in, This is a measure of the semantic difference between character-level and phrase-level granularity. This is a measure of the semantic difference between phrase-level and sentence-level granularity. For the first The context representation of each character position in the character granularity channel. For the first The context representation of each character position in the phrase-level channel. For the first The context representation of each character position in the sentence-level channel. This is the squared form of the Euclidean distance; S32. Concatenate character context features, phrase context features, sentence context features, and semantic difference values ​​into a joint representation vector, input it into the fusion weight calculation network, and generate the first... The fusion weight vector corresponding to each character position: ; in, For the first The fusion weight vector corresponding to each character position For weighted fusion function, These are the output layer weight parameters. For activation function, These are the hidden layer weight parameters. This is a vector concatenation operation. A learnable parameter vector; S33. Based on the fusion weight vector, linear weights are applied to the context features of each granularity to generate a fusion semantic vector; S34. Combine the fused semantic vectors of all character positions in character order to generate a fused semantic vector sequence.

[0035] This invention introduces a semantic difference measurement mechanism between granularities and a fusion weight learning network in the multi-granularity feature fusion stage, which can dynamically adjust the participation intensity of each channel according to the expression deviation between granularities. By modeling the semantic differences of character, phrase, and sentence context features, the system can implement a personalized fusion strategy for each character position, avoiding overall shifts caused by anomalies in specific granularity features. In addition, the introduction of Softmax normalization and learnable adjustment factors makes the fusion result both semantically consistent and context-sensitive, improving the system's adaptability and discriminative power to heterogeneous semantic structures.

[0036] In this embodiment, the adjacent word boundary sensing network specifically includes a boundary node construction module, a boundary feature encoding module, a boundary confidence calculation module, and a boundary sequence output module: The boundary node construction module constructs boundary determination nodes between each pair of adjacent characters in the fused semantic vector sequence; The boundary feature encoding module extracts the fused semantic vectors of adjacent characters on both sides of the current boundary and concatenates them to form a boundary input vector, which is then sequentially input into a multi-channel boundary feature encoding structure. The multi-channel boundary feature encoding structure includes a main channel and an attention channel. The main channel performs an affine transformation on the boundary input vector and uses the GELU activation function to generate main channel features. The attention channel performs a gating transformation on the boundary input vector and uses the sigmoid function to generate attention channel features. The main channel features and the attention channel features are fused by element-wise multiplication to generate a boundary determination feature vector. The boundary confidence calculation module receives the boundary determination feature vector, inputs it into a one-dimensional neural mapping network, and maps it to a boundary confidence value between 0 and 1 through an activation function, which is used to characterize the confidence level that the current character boundary is a word segmentation point. The boundary sequence output module arranges the boundary confidence values ​​in the original character order to form a boundary confidence sequence.

[0037] By constructing boundary nodes and using a multi-channel boundary feature encoding mechanism, this invention achieves deep discriminative modeling of potential word boundaries between each pair of adjacent characters. The main channel extracts semantic backbone information, while attention channels identify boundary sensitivity and adjust fusion strength through gating, thereby accurately perceiving word segmentation switching positions in texts with uneven semantic distribution or mixed styles. The neural mapping method for boundary confidence makes the output continuous and differentiable, possessing stronger learning ability and boundary sensitivity, providing accurate basis for subsequent dynamic word segmentation and query feedback.

[0038] In this embodiment, S4 specifically includes: S41. In the fused semantic vector sequence, a boundary determination node is constructed between each pair of adjacent characters corresponding to the fused semantic vector; S42. Extract the fused semantic vector corresponding to the characters on both sides of the current boundary node and input it into the boundary determination node, and perform concatenation and residual operations to generate the boundary input vector; S43. Input the boundary input vector into the multi-channel boundary feature encoding structure, and perform semantic enhancement and gating modeling through the main channel and attention channel respectively to generate the boundary determination feature vector: ; in, For the first The boundary input vector at each boundary determination node. The weight matrix for the main channel. The bias vector of the main channel. The main channel activation function, To pay attention to the channel weight matrix, To be aware of the channel bias vector, To note the channel activation function, For the first Boundary determination feature vectors at each boundary determination node; S44. Perform a confidence mapping operation on all boundary determination feature vectors to generate a boundary confidence sequence, wherein the boundary confidence sequence corresponds to the length of the input character sequence.

[0039] This invention refines the formulas and optimizes the path of the boundary awareness module. A dual-channel feature enhancement structure is constructed using GELU and sigmoid activation functions, enhancing the nonlinear expressive power and fine-grained discrimination performance of the boundary judgment node. Residual concatenation and fusion design improves information flow efficiency and alleviates the problem of deep feature decay, enabling the system to maintain boundary judgment stability in texts with complex semantic distributions or frequent context jumps. Furthermore, mapping the boundary judgment vector to continuous confidence values ​​provides high-quality input for dynamic threshold comparison and multi-round query mechanisms, building a crucial bridge between word segmentation and feedback loops.

[0040] In this embodiment, S5 specifically includes: S51. Construct a dynamic threshold function to perform point-by-point judgment on each boundary confidence value in the boundary confidence sequence: ; in, For the first The dynamic boundary determination threshold corresponding to each character position. This is the mean adjustment coefficient. The mean of the boundary confidence sequence. This is the contrast adjustment coefficient. The standard deviation of the boundary confidence sequence. For context-aware adjustment coefficients, It is a non-linear activation function. The radius of the local context window. For the first Boundary confidence values ​​at each boundary location. For the first Attention weights at each boundary position; S52. For each boundary location, compare the boundary confidence value with the corresponding dynamic boundary judgment threshold. If the conditions are met... Then the index Mark as valid word boundaries; for boundary positions where the boundary confidence value is lower than the set threshold tolerance, invoke a multi-round query mechanism to generate targeted semantic clarification questions and collect user feedback information, correct the valid word boundaries based on the feedback information, and construct a word boundary index set; S53. Based on the word boundary index set, and using adjacent index pairs as the segmentation basis, extract continuous character intervals from the original natural language text to form a structured word sequence, while maintaining consistency with the original character index.

[0041] By introducing a dynamic boundary threshold function construction mechanism, this invention achieves adaptive boundary judgment logic based on global statistics and local attention perception. This method combines the mean, standard deviation, and local attention context to achieve flexible boundary judgment, effectively avoiding overfitting or undersegmentation problems that occur with fixed threshold settings. For low-confidence regions, by invoking a multi-turn query mechanism and semantically clarifying questions to actively collect feedback information, interactive correction of ambiguous text is achieved, thereby enhancing the model's accuracy in judging uncertain boundaries and its adaptability to user input variability.

[0042] In this embodiment, S6 specifically includes: S61. Receive the structured word sequence and map each structured word into a structured word vector through the word embedding mapping function to form a word vector sequence; S62. Input the word vector sequence into a bidirectional gated recurrent unit network, model the context information in the forward and backward channels respectively, and generate the hidden state sequence. ; S63. Based on the hidden state sequence, introduce a context-aware attention mechanism to calculate the global semantic vector: ; in, For global semantic vectors, The length of the structured word sequence. For attention scoring vectors, It is a non-linear activation function. The linear projection weight matrix is For the first A context representation vector for each structured word. This is the affine transformation bias term; S64. Input the global semantic vector into the semantic sentiment classifier, perform Softmax multi-class sentiment classification, and output the sentiment label results and corresponding confidence scores: ; ; in, For sentiment labeling results, For sentiment classification weight matrix, To classify the affine transformation bias term, For normalization function, To generate a confidence score, the sentiment label results and their corresponding confidence scores are output to the system response interface.

[0043] This invention integrates a context-aware attention mechanism with a multi-class sentiment discrimination network in the semantic sentiment classification stage, enabling the extraction of semantic core information from structured lexical units and accurate mapping to a global semantic vector. By introducing a Softmax classifier and confidence output, it not only provides sentiment labels but also outputs the model's judgment confidence level, improving the interpretability of the results and the user-friendliness of the human-computer interface. Simultaneously, this module supports an iterative update mechanism based on feedback results, automatically reconstructing the contextual semantic sequence after adjusting the lexical structure, achieving coordinated updates of structure optimization and sentiment classification.

[0044] Example 1: To verify the application effect of this invention in a real-world user sentiment monitoring system, it was deployed in the sentiment risk identification module of a large e-commerce platform. This module processes text data from user complaints, product reviews, and customer service conversations, aiming to accurately and promptly determine user sentiment trends and assist in automatically issuing early warnings of potential negative sentiment. In this scenario, existing models based on static word segmentation and traditional sentiment dictionaries suffer from problems such as response lag, contextual fragmentation, and sentiment misjudgment. Especially when faced with exclamations, rhetorical questions, sarcasm, or transitional structures in user expressions, their sentiment recognition capabilities are severely insufficient, easily leading to misjudgments or missed judgments.

[0045] Traditional methods such as TextBlob and SentiStrength primarily rely on rule-based dictionaries and shallow syntactic features to determine sentiment polarity. Their accuracy in recognizing non-standard sentence structures or irregular expressions generally falls below 78%, and their processing speed and feedback mechanisms are severely limited in large-scale streaming data. Furthermore, when faced with ambiguous user expressions or the use of internet slang and semantic puns, traditional models often fail to identify the core sentiment, leading to systematically misleading judgments. More importantly, existing methods lack interactive mechanisms for handling confidence boundary samples; once the model is uncertain, it defaults to neutrality, failing to achieve further semantic clarification with the user.

[0046] In the implementation of this invention, the research team randomly extracted 2,000 historical texts with potential emotional biases from the platform database. These samples were all natural language expressions from real users during order anomalies, negative product reviews, and appeals. First, character-level embedding representation was performed on each text, constructing a character embedding sequence using a 384-dimensional embedding vector, which included positional encoding (64 dimensions), part-of-speech encoding (128 dimensions), and contextual priors (192 dimensions). Subsequently, the system initiated multi-granularity context modeling: the character-granularity channel used a unidirectional GRU to extract local context; the phrase-granularity channel divided phrase segments based on part-of-speech transition points and extracted variable-length phrase representations through a two-layer convolutional network; and the sentence-granularity channel used a bidirectional LSTM to encode the global semantics of complete sentences.

[0047] In the fusion phase, the system introduces a semantic difference calculation module to calculate the Euclidean distance between the representation differences between characters and phrases and between phrases and sentences. This Euclidean distance is then concatenated with the original features and input into the fusion weight network. A weight vector for each character position is generated through a saliency scoring mechanism, ultimately outputting a unified fused semantic vector sequence. The boundary recognition module constructs a boundary determination node for each pair of adjacent characters in the fused semantic vector sequence, performs residual concatenation and multi-channel encoding (GELU + sigmoid gating), and outputs the boundary confidence score. The system sets the dynamic threshold function parameters for the confidence score to γ=0.7, δ=1.0, λ=0.85, and the window radius K=4.

[0048] When the boundary confidence value is between [0.48, 0.55], the system triggers a multi-round query mechanism, automatically generating semantically clarifying questions based on the current context (e.g., "Does 'something' mean good or bad?"), and collects user feedback to correct the boundary position. A total of 289 queries were triggered across 2000 texts, with 262 successful feedback collections, effectively correcting 127 boundaries, and improving the overall word segmentation accuracy from 89.4% to 94.8%. The corrected structured word sequence is input into a bidirectional GRU+attention mechanism module to generate a 128-dimensional global semantic representation and perform Softmax three-class sentiment classification.

[0049] Table 1 Comparison of Prediction Accuracy of Public Opinion Analysis Samples

[0050] As shown in Table 1, before the introduction of the query mechanism, the accuracy of the system of this invention was already about 8 percentage points higher than that of the traditional model, and after enabling the multi-round query mechanism, it further improved to 94.8%. In particular, the F1 score improved from 0.85 to 0.91, indicating that the system not only improved accuracy but also achieved a balance between recall and precision. In the specific test on texts containing rhetorical questions, puns, and transitional structures, the system achieved a recognition accuracy of 92.3%, which is significantly better than the traditional dictionary model (67.1%) and the static feature model (74.8%).

[0051] In summary, the deployment and application of this invention in the task of public opinion risk identification verifies its comprehensive capabilities in complex semantic structure identification, dynamic word segmentation control, and sentiment clarification. It not only improves the accuracy and adaptability of the model in streaming text analysis scenarios, but also provides a stable and scalable engineering paradigm for the construction of interactive semantic understanding models.

[0052] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A semantic tendency analysis system based on dynamic word segmentation and multi-turn querying, characterized in that, Includes the following modules: The character-level embedding building block is used to acquire raw natural language text and convert it into a character sequence, perform embedding encoding on each character, and generate a character embedding sequence; The multi-granularity context coding module receives word embedding sequences and outputs a multi-granularity context feature set based on the multi-granularity context coding algorithm. The semantic fusion module is used to calculate the difference and learn the fusion weights of multi-granularity context feature sets to generate a fused semantic vector sequence. The adjacent word boundary awareness module is used to construct boundary determination nodes between each pair of adjacent characters in the fused semantic vector sequence, extract the boundary input vector to generate boundary determination feature vectors, and map them into a boundary confidence sequence; The dynamic word segmentation module is used to construct a dynamic threshold function based on the boundary confidence sequence, perform boundary judgment and index extraction operations, call a multi-round query mechanism to generate semantically clarifying questions and correct the boundary confidence based on user feedback results, and output a structured word sequence. The semantic sentiment discrimination module receives structured word sequence, performs word vector mapping and context modeling, generates a global semantic vector based on the attention mechanism, inputs it into a multi-class sentiment classifier, outputs sentiment label results and corresponding confidence scores, and feeds them back to the system response interface.

2. The semantic tendency analysis system based on dynamic word segmentation and multi-turn query as described in claim 1, characterized in that, The modules are connected in the following way: S1. Obtain the raw natural language text, perform character-level embedding encoding, and generate a word embedding sequence; S2. Input the word embedding sequence into the multi-granularity context encoding algorithm to extract context features based on character granularity, phrase granularity and sentence granularity respectively, and construct a multi-granularity context feature set; S3. Perform a weighted fusion operation on the multi-granularity context feature set to generate a fused semantic vector sequence, wherein each fused semantic vector in the fused semantic vector sequence is consistent with the word embedding sequence in terms of order and index. S4. Input the fused semantic vector sequence into the adjacent word boundary perception network, construct a boundary determination node between each pair of adjacent characters, input the fused semantic vector of the adjacent characters into the boundary determination node, calculate the boundary confidence value, and output the boundary confidence sequence. S5. Based on the dynamic threshold function, perform threshold comparison on the boundary confidence value, generate a word boundary index sequence, call the multi-round query mechanism, generate targeted semantic clarification questions and collect user feedback information, correct the corresponding boundary position based on the user feedback information, and generate a structured word sequence. S6. Perform word-level context modeling and semantic classification operations on the structured word sequence to generate sentiment label results and corresponding confidence scores, and output them to the system response interface.

3. The semantic tendency analysis system based on dynamic word segmentation and multi-turn query as described in claim 2, characterized in that, S1 specifically includes: S11. Obtain the original natural language text and convert it into an original character sequence, wherein the original character sequence is arranged in character order; S12. For each character in the character sequence, perform character-level embedding encoding to construct a character embedding vector. The character embedding vector is composed of a character position encoding vector, a character part-of-speech encoding vector, and a character context prior vector. The total dimension of the character embedding vector is the sum of the dimensions of the three sub-vectors. The character position encoding vector is used to represent the absolute position of the character in the original character sequence, the character part-of-speech encoding vector is used to represent the part-of-speech category to which the character belongs, and the character context prior vector is used to represent the predefined contextual semantic information associated with the character. S13. Arrange all character embedding vectors in the order of the original character sequence and concatenate them to generate a character embedding sequence.

4. The semantic tendency analysis system based on dynamic word segmentation and multi-turn query as described in claim 2, characterized in that, The multi-granularity context coding algorithm specifically includes a context granularity initialization module, a multi-granularity context feature extraction module, a cross-granularity collaborative modeling module, a granularity weight adjustment module, and a context alignment module. The context granularity initialization module receives the word embedding sequence, copies it, and maps it to character granularity input channels, phrase granularity input channels, and sentence granularity input channels; The multi-granularity context feature extraction module is used to extract character context features, phrase context features, and sentence context features from the character-granularity input channel, phrase-granularity input channel, and sentence-granularity input channel, respectively, and align them according to the character index positions in the character embedding sequence to construct a multi-granularity context feature set; The character-level input channel uses a one-way gated recurrent unit network to extract character context features. The phrase-level input channel divides variable-length phrase segments based on part-of-speech transfer points and semantic gradient boundary detection, and extracts phrase context features through a multi-layer convolutional neural network. The sentence-level input channel uses a bidirectional long short-term memory network for context modeling and outputs sentence context features. The cross-granularity collaborative modeling module is used to establish a horizontal information interaction path between the character-level, phrase-level, and sentence-level feature extraction stages. Through a downlink guidance and uplink feedback mechanism, it guides collaborative modeling between different granularities during the feature extraction process. The downlink guidance and uplink feedback mechanism involves generating a semantic guidance vector from the encoding results of phrase-level and sentence-level granularities and mapping it to the character-level granularity channel to participate in state updates. The uplink feedback extracts boundary change and sentiment mutation features from the character-level and phrase-level granularities, constructs a feedback signal, and injects it into the sentence-level granularity channel to adjust the attention weight vector of the sentence-level granularity channel. The granularity weight control module calculates the attention weight vectors of the character granularity channel, phrase granularity channel and sentence granularity channel based on the saliency scoring function, and performs a weighted fusion operation on the multi-granularity context feature set to generate a fused semantic vector sequence. The context alignment module aligns the fused semantic vector sequence with the word embedding sequence index position and outputs it to the boundary awareness network module.

5. The semantic tendency analysis system based on dynamic word segmentation and multi-turn query as described in claim 2, characterized in that, S2 specifically includes: S21. Input the character embedding sequence into the multi-granularity context coding algorithm, wherein the context granularity initialization module receives the character embedding sequence, copies and maps it to the character granularity input channel, the phrase granularity input channel and the sentence granularity input channel; S22. In the character-level input channel, a one-way gated recurrent unit network is invoked to perform recursive encoding on each character embedding vector in the character embedding sequence, generating a character context feature sequence. ,in, For the length of the word embedding sequence, For the first The context representation of each character position in the character granularity channel; during the state encoding process, the character granularity input channel receives the semantic guidance vector generated by the phrase granularity channel and the sentence granularity channel as modulation input, and adjusts its own state update strategy; S23. In the phrase-level input channel, dynamic segmentation is performed on the word embedding sequence based on part-of-speech transition points and semantic gradient boundary functions to obtain a set of phrase segments. The semantic gradient boundary function is: ; in, , , These correspond to the weighting coefficients of embedding difference, attention gradient, and context discontinuity, respectively. For the first The word embedding vector at each character position. For the first The and the first The Euclidean distance between word embedding vectors at each character position. For the first The word embedding vector at each character position corresponds to the attention-weighted context vector. For the first The gradient response of the word embedding vector at each character position to the local context state. For the first The word embedding vector at the i-th character position in the local context Attention score of word embedding vector at each character position. For the size of the attention window, For the first The phrase segment representation vector centered on the word embedding vector at each character position is generated by a local convolutional network acting on the sequence of neighboring word embeddings. for and Cosine similarity between two local context vectors To measure the first The and the first A function exists that determines whether there are semantic boundaries between word embedding vectors at n character positions, satisfying the condition that... When it is determined to be a phrase boundary, where, The set boundary judgment threshold; while extracting the boundary response, the phrase granular input channel records the jump point location information and context features as semantic feedback signals to adjust the modeling behavior in the sentence granular input channel; S24. For each phrase segment, input it into a multi-layer convolutional neural network to extract phrase context features. ,in, For the length of the word embedding sequence, For the first The context representation of each character position in the phrase-granular channel, each Corresponding to the character index position Alignment is achieved through interpolation within the fragment; S25. In the sentence-level input channel, the word embedding sequence is input into the bidirectional long short-term memory network to obtain the sentence context feature sequence. ,in, For the length of the word embedding sequence, For the first The context representation of each character position in the sentence-level channel; during the modeling process, the sentence-level input channel dynamically adjusts the attention distribution weights based on the boundary abrupt change points detected in the character-level input channel and the jump signals fed back from the phrase-level channel; S26, will , , Construct a multi-granularity context feature set by aligning according to character position index.

6. The semantic tendency analysis system based on dynamic word segmentation and multi-turn query as described in claim 2, characterized in that, S3 specifically includes: S31. The granularity weight adjustment module receives a multi-granularity context feature set. For each character position, it calculates the semantic difference value between granularity context features to obtain the semantic difference between character granularity and phrase granularity, and the semantic difference between phrase granularity and sentence granularity. ; ; in, This is a measure of the semantic difference between character-level and phrase-level granularity. This is a measure of the semantic difference between phrase-level and sentence-level granularity. For the first The context representation of each character position in the character granularity channel. For the first The context representation of each character position in the phrase-level channel. For the first The context representation of each character position in the sentence-level channel. This is the squared form of the Euclidean distance; S32. Concatenate character context features, phrase context features, sentence context features, and semantic difference values ​​into a joint representation vector, input it into the fusion weight calculation network, and generate the first... The fusion weight vector corresponding to each character position: ; in, For the first The fusion weight vector corresponding to each character position For weighted fusion function, These are the output layer weight parameters. For activation function, These are the hidden layer weight parameters. This is a vector concatenation operation. A learnable parameter vector; S33. Based on the fusion weight vector, linear weights are applied to the context features of each granularity to generate a fusion semantic vector; S34. Combine the fused semantic vectors of all character positions in character order to generate a fused semantic vector sequence.

7. The semantic tendency analysis system based on dynamic word segmentation and multi-turn query as described in claim 2, characterized in that, The adjacent word boundary sensing network specifically includes a boundary node construction module, a boundary feature encoding module, a boundary confidence calculation module, and a boundary sequence output module: The boundary node construction module constructs boundary determination nodes between each pair of adjacent characters in the fused semantic vector sequence; The boundary feature encoding module extracts the fused semantic vectors of adjacent characters on both sides of the current boundary and concatenates them to form a boundary input vector, which is then sequentially input into a multi-channel boundary feature encoding structure. The multi-channel boundary feature encoding structure includes a main channel and an attention channel. The main channel performs an affine transformation on the boundary input vector and uses the GELU activation function to generate main channel features. The attention channel performs a gating transformation on the boundary input vector and uses the sigmoid function to generate attention channel features. The main channel features and the attention channel features are fused by element-wise multiplication to generate a boundary determination feature vector. The boundary confidence calculation module receives the boundary determination feature vector, inputs it into a one-dimensional neural mapping network, and maps it to a boundary confidence value between 0 and 1 through an activation function, which is used to characterize the confidence level that the current character boundary is a word segmentation point. The boundary sequence output module arranges the boundary confidence values ​​in the original character order to form a boundary confidence sequence.

8. The semantic tendency analysis system based on dynamic word segmentation and multi-turn query as described in claim 2, characterized in that, S4 specifically includes: S41. In the fused semantic vector sequence, a boundary determination node is constructed between each pair of adjacent characters corresponding to the fused semantic vector; S42. Extract the fused semantic vector corresponding to the characters on both sides of the current boundary node and input it into the boundary determination node, and perform concatenation and residual operations to generate the boundary input vector; S43. Input the boundary input vector into the multi-channel boundary feature encoding structure, and perform semantic enhancement and gating modeling through the main channel and attention channel respectively to generate the boundary determination feature vector: ; in, For the first The boundary input vector at each boundary determination node. The weight matrix for the main channel. The bias vector of the main channel. The main channel activation function, To pay attention to the channel weight matrix, To be aware of the channel bias vector, To note the channel activation function, For the first Boundary determination feature vectors at each boundary determination node; S44. Perform a confidence mapping operation on all boundary determination feature vectors to generate a boundary confidence sequence, wherein the boundary confidence sequence corresponds to the length of the input character sequence.

9. The semantic tendency analysis system based on dynamic word segmentation and multi-turn query as described in claim 2, characterized in that, S5 specifically includes: S51. Construct a dynamic threshold function to perform point-by-point judgment on each boundary confidence value in the boundary confidence sequence: ; in, For the first The dynamic boundary determination threshold corresponding to each character position. This is the mean adjustment coefficient. The mean of the boundary confidence sequence. This is the contrast adjustment coefficient. The standard deviation of the boundary confidence sequence. For context-aware adjustment coefficients, It is a non-linear activation function. The radius of the local context window. For the first Boundary confidence values ​​at each boundary location. For the first Attention weights at each boundary position; S52. For each boundary location, compare the boundary confidence value with the corresponding dynamic boundary judgment threshold. If the conditions are met... Then the index Mark as valid word boundaries; for boundary positions where the boundary confidence value is lower than the set threshold tolerance, invoke a multi-round query mechanism to generate targeted semantic clarification questions and collect user feedback information, correct the valid word boundaries based on the feedback information, and construct a word boundary index set; S53. Based on the word boundary index set, and using adjacent index pairs as the segmentation basis, extract continuous character intervals from the original natural language text to form a structured word sequence, while maintaining consistency with the original character index.

10. The semantic tendency analysis system based on dynamic word segmentation and multi-turn query as described in claim 2, characterized in that, S6 specifically includes: S61. Receive the structured word sequence and map each structured word into a structured word vector through the word embedding mapping function to form a word vector sequence; S62. Input the word vector sequence into a bidirectional gated recurrent unit network, model the context information in the forward and backward channels respectively, and generate the hidden state sequence. ; S63. Based on the hidden state sequence, introduce a context-aware attention mechanism to calculate the global semantic vector: ; in, For global semantic vectors, The length of the structured word sequence. For attention scoring vectors, It is a non-linear activation function. The linear projection weight matrix is For the first A context representation vector for each structured word. This is the affine transformation bias term; S64. Input the global semantic vector into the semantic sentiment classifier, perform Softmax multi-class sentiment classification, and output the sentiment label results and corresponding confidence scores: ; ; in, For sentiment labeling results, For sentiment classification weight matrix, To classify the affine transformation bias term, For normalization function, To generate a confidence score, the sentiment label results and their corresponding confidence scores are output to the system response interface.