A method and system for AI-based iterative analysis of SMS content based on user feedback
By analyzing the keyword distribution and timestamps of user-input SMS messages, dynamically adjusting topic boundaries and information decay weights, and optimizing historical citation sequences, the problem of contextual coherence after multiple rounds of dialogue are interrupted is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202511007885.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-07-22
AI Technical Summary
Existing technologies struggle to maintain contextual coherence during multi-turn conversations due to interruptions, leading to topic deviations and inaccurate citations of historical information, thus impacting user experience.
By analyzing the keyword distribution and timestamps of user-input SMS messages, the topic boundaries and information decay weights are dynamically adjusted, and a weighted sorting algorithm is used to optimize the historical citation sequence, generating an enhanced contextual coherence representation.
It improves the continuity of conversations and user experience in scenarios where the conversation is interrupted and restarted, reduces the risk of topic drift, and ensures the semantic consistency of the response content.
Smart Images

Figure CN120509418B_ABST
Abstract
Description
Technical Field
[0001] This application relates specifically to an AI-based iterative method and system for SMS content based on user feedback. Background Technology
[0002] In existing technologies, various AI-driven SMS applications exist, such as intelligent customer service SMS systems that send personalized promotional information based on users' historical purchase records, bank AI SMS alert systems that automatically send security reminders after detecting abnormal transactions, and e-commerce platform AI SMS tracking systems that proactively notify users when logistics status changes. However, in AI-driven SMS dialogue systems, maintaining the contextual coherence of the conversation is a key factor in ensuring a good user experience. When users engage in multi-turn conversations with an AI system, the system needs to accurately understand and remember previous exchanges and maintain topic coherence as the conversation continues. However, in practical applications, conversations are often interrupted for various reasons (such as users temporarily leaving, network interruptions, time delays, etc.), and when the conversation resumes, the system often faces the challenge of maintaining contextual coherence. Current user feedback-based dialogue systems often rely on static memory mechanisms or simple context splicing methods in multi-turn interactions. These methods can handle short conversations, but their shortcomings gradually become apparent as the number of conversation rounds increases or as the conversation restarts after an interruption: the topic easily deviates from the initial intent, the citation of historical information often becomes inaccurate, and even the lack of clear boundary demarcation leads to topic ambiguity. These limitations make the system ill-suited to adapt to dynamic needs in complex scenarios, thus impairing the user experience. The research challenge focuses on effectively managing contextual coherence in multi-turn dialogues, especially when restarting after a conversation has been interrupted. The technical difficulties become even more pronounced when contextual links break, making it difficult for the system to accurately connect previous dialogue threads. This break leads to decreased accuracy in referencing historical information, causing the system's responses to deviate from user expectations. This referencing deviation further blurs topic boundaries, increasing the risk of topic drift and creating a unique dynamic adjustment challenge that struggles to balance coherence and flexibility. These core technical factors remain unresolved, making it difficult for dialogue systems to maintain a balance between coherence and flexibility, thus giving rise to unique dynamic adjustment challenges. Therefore, designing an adaptive memory module management strategy that dynamically adjusts information retention and decay weights to rebuild contextual links, improve the accuracy of historical information referencing, and clearly define topic boundaries when restarting a conversation after an interruption becomes crucial for improving overall dialogue continuity and reducing user cognitive load. Solving this problem will directly determine the practical value and user acceptance of AI systems in complex interaction scenarios. Summary of the Invention
[0003] To address the problems existing in the prior art, this application aims to provide an AI-based iterative method and system for SMS content based on user feedback.
[0004] The AI iteration method and system for SMS content based on user feedback described in this application includes the following steps:
[0005] S1. Based on the user's current input SMS content and historical SMS records, extract keyword distribution features and reference content offsets to generate an initial contextual coherence representation; determine whether there is a conversation interruption scenario based on the timestamp sequence;
[0006] S2. If a dialogue interruption and restart scenario is detected, calculate the semantic drift between the current input text message and the historical referenced content. If it exceeds the preset semantic drift rate threshold, trigger a dynamic adjustment strategy to determine the optimized topic boundary range.
[0007] S3. Based on the optimized topic boundary range, and combining the dialogue interruption duration and information decay weight, a weighted sorting algorithm is used to prioritize historical SMS records and generate an optimized sequence of referenced content.
[0008] S4. Based on the optimized historical citation sequence, analyze the semantic similarity between the current input SMS and historical content, dynamically adjust the information retention weight, and generate an enhanced contextual coherence representation.
[0009] S5. Analyze the user intent reiteration content in real-time input SMS and AI feedback SMS, dynamically adjust the information decay weight and redefine the topic boundary to generate an updated dialogue state vector.
[0010] S6. Extract topic switching frequency and context recovery difficulty from multi-turn dialogue management logs, combine with the updated dialogue state vector, calculate topic drift risk value, and generate context association output results adapted to interruption scenarios;
[0011] S7. Based on contextual association and enhanced coherence representation, process optimized historical citation sequences to ensure semantic consistency of response content and generate target dialogue response text.
[0012] Preferably, step S1 includes:
[0013] Based on the user's current input SMS content and historical SMS records, word segmentation technology is used to extract word sequences, and the distribution position of words is statistically analyzed through a sliding window to obtain word interval point position data;
[0014] Construct a keyword distribution density matrix and calculate a semantic dispersion index; compare the semantic dispersion index with a preset semantic dispersion threshold to obtain semantic weight values;
[0015] For SMS messages with semantic dispersion indices below a preset threshold, extract topic word sequences and calculate semantic similarity to generate contextual association vectors.
[0016] Extract timestamp sequences from historical SMS records and calculate the time difference between adjacent SMS messages; if the difference exceeds a preset time threshold, it is determined to be a conversation interruption scenario.
[0017] For text messages before and after the interruption point, a conversation coherence scoring matrix is constructed by combining contextual association vectors and semantic weights, and the contextual coherence index value is calculated.
[0018] Preferably, step S2 includes:
[0019] Extract currently entered SMS messages and historical records from the SMS database to generate a conversation interruption status marker;
[0020] For interruption status markers, extract the topic feature vector of the current input SMS, construct a semantic similarity matrix, and calculate the semantic drift rate to determine whether dynamic adjustment is triggered;
[0021] Based on semantic drift rate, optimize topic boundary range and generate adjusted topic boundary threshold interval;
[0022] Based on the adjusted topic boundary threshold range, an optimized semantic association sequence is generated.
[0023] Preferably, step S3 includes:
[0024] Extract the interruption timestamp sequence from historical SMS records, calculate the information decay weight, and generate an initial weight label sequence;
[0025] Extract text feature vectors from historical SMS messages, construct a semantic similarity matrix, and calculate the comprehensive priority score;
[0026] Generate a historical record sequence in descending order and remove low-relevance records.
[0027] Preferably, step S4 includes:
[0028] Extract the keyword feature matrix of the currently input SMS, calculate the semantic similarity with the historical citation sequence, and generate a semantic matching vector;
[0029] For records with a semantic matching degree lower than a preset semantic matching degree threshold, the retention probability is evaluated, and the importance of information is calculated by combining word frequency features to generate a weight matrix of cited content.
[0030] The sliding window is used to calculate the textual correlation between historical records, dynamically adjust the retention weights, and generate a dynamic weight adjustment vector.
[0031] Preferably, step S5 includes:
[0032] Extract real-time input SMS messages and feedback records from the SMS database, extract user intent features, and construct a user intent matrix;
[0033] The differences between the feature values of each dimension in the intent matrix and the baseline intent threshold are calculated to generate an intent deviation vector, and the dialog interruption marker is identified by combining the timestamp sequence.
[0034] For the interrupted marker sequence, adjust the information decay weight, calculate the text feature distance, construct the topic relevance matrix, and update the topic boundaries;
[0035] The dialogue state vector is updated based on the topic relevance matrix, incorporating user emotions and interruption risk information.
[0036] Preferably, step S6 includes:
[0037] Identify topic switching markers from the dialogue logs, calculate the switching frequency within a time window, and construct a high-frequency switching identification matrix;
[0038] By combining user behavior data, the difficulty of dialogue transition is calculated, and an interruption recovery feature matrix is generated.
[0039] Extract semantic features from dialogue fragments, calculate topic offset, and generate context association weight vectors;
[0040] Construct a semantic tree structure to generate a semantic drift risk assessment matrix and a dialogue association sequence adapted to interruption scenarios.
[0041] Preferably, step S6 further includes:
[0042] The topic switching frequency is extracted from the dialogue log, the relevance value between historical information and the current SMS is calculated, and the drift risk value is obtained by weighted summation. The length of the historical information sequence is selected according to the drift risk value, the intent of the input SMS is extracted, the historical information is matched to generate an association matrix, and the SMS is parsed using the association matrix to construct a semantic tree, so as to obtain the context association output result adapted to the interruption scenario.
[0043] Preferably, step S7 includes:
[0044] Extract key semantic markers from dialogue fragments, construct dialogue topic chains, and calculate text coherence scores;
[0045] Extract semantic features from historical citation records, generate a multi-turn dialogue semantic feature matrix, and analyze dialogue continuity;
[0046] Set up a sliding window to calculate the semantic relevance of dialogue records, generate a relevance sequence, and filter highly relevant records;
[0047] The system retrieves matching response text from the alternative response template library, optimizes the sorting, and generates the target dialogue response text.
[0048] This application also provides an AI-based iterative system for SMS content based on user feedback, including:
[0049] The SMS data extraction module is used to extract the SMS content currently entered by the user and historical SMS records, extract keyword distribution features and reference content offsets, generate an initial contextual coherence representation, and determine whether there is a conversation interruption scenario based on the timestamp sequence.
[0050] The interruption scenario judgment module is used to calculate the semantic drift between the current input SMS and the historical referenced content if a dialogue interruption and restart scenario is detected. If it exceeds the preset semantic drift rate threshold, a dynamic adjustment strategy is triggered to determine the optimized topic boundary range.
[0051] The semantic drift processing module is used to prioritize historical SMS records by combining the dialogue interruption duration and information decay weight with a weighted sorting algorithm for the optimized topic boundary range, and generate an optimized sequence of referenced content.
[0052] The citation sequence optimization module is used to analyze the semantic similarity between the current input SMS and historical content based on the optimized historical citation sequence, dynamically adjust the information retention weight, and generate an enhanced contextual coherence representation.
[0053] The coherence enhancement module is used to analyze the user intent reiteration content in real-time input SMS and AI feedback SMS, dynamically adjust the information decay weight and re-divide topic boundaries, and generate an updated dialogue state vector.
[0054] The dialogue state update module is used to extract the topic switching frequency and context recovery difficulty from the multi-turn dialogue management logs, combine them with the updated dialogue state vector, calculate the topic drift risk value, and generate context association output results adapted to the interruption scenario.
[0055] The response generation module is used to output results based on contextual association and enhanced coherence representation, process optimized historical citation sequences to ensure semantic consistency of response content, and generate target dialogue response text.
[0056] The advantages of the AI-based iterative method and system for SMS content based on user feedback described in this application are as follows:
[0057] This application analyzes the keyword dispersion and reference content offset between the user's current input SMS and historical records, combines timestamps to determine conversation interruption, and dynamically adjusts topic boundaries and information decay weights. The invention employs a weighted sorting algorithm to optimize the historical reference sequence, calculates semantic similarity, and dynamically adjusts information retention weights to enhance contextual coherence. Simultaneously, the invention analyzes user intent reiterations in AI feedback, adjusts information decay weights, updates the conversation state vector, calculates topic drift risk values, and determines contextually relevant outputs suitable for interruption scenarios. Finally, based on the contextually relevant results and coherence representation, the invention processes the optimized historical reference sequence, determines the semantic consistency of the response content, and outputs the target conversation response text, effectively improving conversation coherence and user experience in interruption-restart scenarios. Attached Figure Description
[0058] Figure 1 This is a flowchart of an AI-based iterative method and system for SMS content based on user feedback, as described in this application. Detailed Implementation
[0059] like Figure 1 As shown, the AI-based iterative method for SMS content based on user feedback described in this application includes the following steps:
[0060] S1. Based on the user's current input SMS content and historical SMS records, extract keyword distribution features and reference content offsets to generate an initial contextual coherence representation; determine whether there is a conversation interruption scenario based on the timestamp sequence;
[0061] S2. If a dialogue interruption and restart scenario is detected, calculate the semantic drift between the current input text message and the historical referenced content. If it exceeds the preset semantic drift rate threshold, trigger a dynamic adjustment strategy to determine the optimized topic boundary range.
[0062] S3. Based on the optimized topic boundary range, and combining the dialogue interruption duration and information decay weight, a weighted sorting algorithm is used to prioritize historical SMS records and generate an optimized sequence of referenced content.
[0063] S4. Based on the optimized historical citation sequence, analyze the semantic similarity between the current input SMS and historical content, dynamically adjust the information retention weight, and generate an enhanced contextual coherence representation.
[0064] S5. Analyze the user intent reiteration content in real-time input SMS and AI feedback SMS, dynamically adjust the information decay weight and redefine the topic boundary to generate an updated dialogue state vector.
[0065] S6. Extract topic switching frequency and context recovery difficulty from multi-turn dialogue management logs, combine with the updated dialogue state vector, calculate topic drift risk value, and generate context association output results adapted to interruption scenarios;
[0066] S7. Based on contextualized output results and enhanced coherence representation, process optimized historical citation sequences to ensure semantic consistency of response content and generate target dialogue response text.
[0067] Furthermore, step S1 includes:
[0068] Based on the user's current input SMS content and historical SMS records, extract word sequences, count the distribution of words, and obtain word interval point position data;
[0069] Specifically, the system retrieves the currently input SMS message and historical SMS records, extracts word sequences using word segmentation technology, and statistically analyzes the distribution of words using a sliding window to obtain word interval position data. More specifically, it extracts a set of SMS records from an SMS database for analysis. For each SMS message in the set, word sequences are extracted using word segmentation tools, and the distribution of words within the text is statistically analyzed using a sliding window to obtain word interval position data.
[0070] Construct a keyword distribution density matrix and calculate the semantic dispersion index; obtain semantic weight values by comparing the semantic dispersion index with a preset semantic dispersion threshold;
[0071] Specifically, a keyword distribution density matrix is constructed based on the word spacing point location data. The semantic dispersion index is obtained by calculating the distance between adjacent words in the matrix. The semantic weight value is obtained by comparing the semantic dispersion index with the preset semantic dispersion threshold.
[0072] For example, in this embodiment, the currently input SMS content, including text messages and MMS messages, and a collection of historical SMS records, is extracted from an SMS database. For each SMS message, a word segmentation tool is used to generate a word sequence. The distribution positions of words in the text are statistically analyzed using a sliding window to obtain word interval data. Based on this data, a keyword distribution density matrix is constructed, and the distance values between adjacent words are calculated to generate a semantic dispersion index. This index reflects the concentration of word distribution; the lower the value, the more compact the semantics. For example, for the SMS message "Please confirm the delivery address, the order will be shipped this afternoon," the segmented sequence is "Please / Confirm / Delivery Address / Order / Afternoon / Shipping." The sliding window size is set to 5 words, and 3 words are slid at a time. The interval positions are calculated as 3 and 6, thus generating the distribution density matrix.
[0073] For SMS messages with semantic dispersion indices below a preset threshold, extract topic word sequences and calculate semantic similarity to generate contextual association vectors.
[0074] Specifically, for SMS texts with semantic weight values less than a preset semantic weight threshold, a conditional random field algorithm is used to segment the text, extract the topic word sequence in each segment, and calculate the semantic similarity between the topic word sequences to obtain a contextual association vector.
[0075] For example, if the semantic dispersion index is below a preset threshold, it indicates that the semantic association of the SMS message is weak, and further extraction of the topic word sequence is required. A conditional random field algorithm is used to segment the SMS message and extract the topic words for each segment. For example, from "goods received, quality is very good," the sequence "received-quality" is extracted. The semantic similarity between topic words is calculated to generate a contextual association vector.
[0076] Extract the timestamp sequence and calculate the time difference between adjacent text messages; if the difference exceeds a preset time threshold, it is determined to be a conversation interruption scenario.
[0077] Specifically, a timestamp sequence is extracted from historical SMS records, and the time difference between adjacent SMS messages is calculated. If the difference exceeds a preset time threshold, such as 24 hours, it is determined to be a conversation interruption scenario. More specifically, a timestamp sequence is extracted from the SMS record set, and the time difference between two adjacent SMS records is calculated to obtain a time interval sequence. If there is a value in the time interval sequence that exceeds a preset time threshold, it is determined that there is a conversation interruption point at that location.
[0078] For text messages before and after the interruption point, the contextual coherence index value is calculated by combining contextual association vectors and semantic weights.
[0079] Specifically, for text messages before and after the interruption point, a conversation coherence scoring matrix is constructed by combining contextual relevance vectors and semantic weights. A contextual coherence index value is calculated, with values closer to 1 indicating stronger coherence. More specifically, for text message texts before and after the conversation interruption point, a text message conversation coherence scoring matrix is constructed by combining contextual relevance values and semantic weight values. The contextual coherence index value between the currently input text message and the historical records is calculated using this matrix.
[0080] Step S1 extracts a set of SMS records from the SMS database for analysis. For each SMS text in the set, a word segmentation tool is used to extract the word sequence. A sliding window is used to statistically analyze the distribution of words in the text, obtaining word interval position data. Based on the word interval position data, a keyword distribution density matrix is constructed. A semantic dispersion index is obtained by calculating the distance between adjacent words in the matrix. The semantic weight value is obtained by comparing the semantic dispersion index with a preset semantic dispersion threshold. For SMS texts with semantic weight values less than the preset threshold, a conditional random field algorithm is used to segment the text, extracting the topic word sequence in each segment. The semantic similarity between topic word sequences is calculated to obtain a contextual association vector. Based on the contextual association vector, a convolutional neural network is used to extract the SMS text feature vector. The contextual association value is obtained by calculating the cosine similarity between the feature vector and each vector in the historical SMS record feature vector set. A timestamp sequence is extracted from the SMS record set. The time difference between two adjacent SMS records is calculated to obtain a time interval sequence. If a value in the time interval sequence exceeds a preset time threshold, it is determined that there is a dialogue interruption point at that location. This paper constructs a text message conversation coherence scoring matrix by combining contextual relevance and semantic weight values for the text messages before and after a conversation interruption. The matrix is used to calculate the contextual coherence index between the current input message and the historical data. The text message interaction function can be integrated into the terminal device's operating system or a third-party application; the specific implementation method is determined by technical personnel based on the actual scenario. Users can activate this function through interface operation or remote commands. For example, the function entry can be located in the settings menu of the text message application, or it can be activated with a shortcut icon. By dynamically analyzing keyword distribution and timestamp sequences, conversation interruption scenarios can be accurately identified and an initial contextual coherence representation can be generated. This method effectively captures the semantic features of text message content, providing a reliable basis for dynamic adjustments. Compared with traditional static memory mechanisms, this application significantly improves the flexibility of context management, reduces the risk of topic drift caused by interruptions, and provides users with a more coherent conversation experience.
[0081] By dynamically analyzing keyword distribution and timestamp sequences, this method can accurately identify conversation interruption scenarios and generate an initial representation of contextual coherence. This approach effectively captures the semantic features of SMS content, providing a reliable foundation for dynamic adjustments. Compared to traditional static memory mechanisms, this application significantly improves the flexibility of context management, reduces the risk of topic drift due to interruptions, and provides users with a more coherent conversational experience.
[0082] Furthermore, step S2 includes:
[0083] Extract currently entered SMS messages and historical records from the SMS database to generate a conversation interruption status marker;
[0084] Specifically, the system extracts the currently input SMS message and its historical records from the SMS database, analyzes user interaction identifiers and timestamp sequences, and generates a conversation interruption status marker. More specifically, it extracts the content of the currently input SMS message and its corresponding historical SMS records from the SMS database, extracts the user's unsubscribe identifier, interception status identifier, and last interaction timestamp from the SMS records, and obtains the conversation interruption status marker by calculating the time difference between two adjacent SMS records and comparing it with a preset time threshold.
[0085] For example, in this embodiment, the system extracts the currently input SMS content and related historical records from the SMS database, and extracts the user's unsubscribe flag, interception status flag, and interaction timestamp from the records. The system calculates the time interval between two adjacent SMS messages and compares it with a preset time threshold, for example, a threshold of 720 minutes. If the interval exceeds this threshold, or if an unsubscribe or interception flag is detected, a conversation interruption status marker is generated. For example, in an e-commerce consultation scenario, if a user sends "Do not buy for now" and does not reply for more than 12 hours, the system marks this point as an interruption point. This process ensures accurate identification of interruption scenarios through timestamp analysis and behavior flag detection.
[0086] For interruption status markers, extract the topic feature vector of the current input SMS, construct a semantic similarity matrix, and calculate the semantic drift rate to determine whether dynamic adjustment is triggered;
[0087] Specifically, for dialogue interruption status markers indicating interruption locations, a conditional random field (CRF) is used to extract topic feature vectors from the current input SMS. Based on these topic feature vectors, matching scores are retrieved from historical SMS records to obtain a set of topic feature vectors for the current context. A feature similarity matrix is constructed based on this set, and the Euclidean distance between the current input SMS and historical references is calculated. A semantic change trend curve is extracted from the feature similarity matrix. The semantic drift rate is obtained by calculating the slope of the semantic change trend curve, and a comparison between the semantic drift rate and a preset drift threshold determines whether an adjustment marker should be triggered.
[0088] For example, for SMS messages with interruption status markers, a Conditional Random Field (CRF) algorithm is used to extract topic feature vectors from the current input SMS. For instance, if a user sends "Is the product I previously inquired about still in stock?" after an interruption, the system extracts "product-inventory" as the topic feature vector. The system retrieves relevant topics from historical records, calculates the matching degree of feature vectors, and generates a set of topic feature vectors. Based on this set, a semantic similarity matrix is constructed, where matrix elements represent the semantic relevance between the current SMS and historical content. By calculating the Euclidean distance between the current input and historical referenced content in the matrix, a semantic change trend curve is generated. Further analysis of the curve's slope yields the semantic drift rate. If the rate exceeds a preset threshold, such as 0.6, a dynamic adjustment marker is triggered. For example, in a customer service scenario, if a user switches from "product quality issues" to "return process consultation," the drift rate reaches 0.75, indicating a significant topic shift, requiring adjustment of the topic boundary.
[0089] Based on semantic drift rate, optimize topic boundary range and generate adjusted topic boundary threshold interval;
[0090] Specifically, for the trigger adjustment marker, a semantic evolution model is constructed based on a recurrent neural network. Evolutionary parameters are extracted from the semantic change trend curve to obtain the topic boundary interval values. Based on the topic boundary interval values, a dynamic programming algorithm is used to calculate the optimal boundary adjustment range. Combined with the semantic drift rate, the topic boundary is calibrated to obtain the adjusted boundary threshold interval.
[0091] For example, in scenarios triggering adjustment markers, a semantic evolution model is constructed using a Long Short-Term Memory (LSTM) network. Evolutionary parameters, such as topic shift frequency and semantic association strength, are extracted from the semantic change trend curve. The model determines the topic boundary range by analyzing the semantic evolution patterns of historical dialogues, for example, an initial range of 0.4 to 0.8. The system further combines semantic drift rate and uses a dynamic programming algorithm to calculate the optimal boundary adjustment range, ensuring a balance between topic coherence and flexibility. For instance, in an after-sales service scenario, the topic boundary is adjusted from "product quality - return process" to "product quality - return process - after-sales service," with the boundary threshold range optimized to 0.35 to 0.85. This process, through dynamic modeling of semantic evolution, significantly improves the accuracy of topic recovery after interruption.
[0092] Based on the adjusted topic boundary threshold range, an optimized semantic association sequence is generated;
[0093] Specifically, based on the adjusted topic boundary threshold range, historical reference content is calibrated to generate an optimized semantic association sequence.
[0094] For example, based on the optimized topic boundary threshold range, historical reference content is reordered to generate a semantically related sequence. Historical records highly relevant to the current topic are prioritized; for instance, when a user inquires about "product inventory," relevant dialogue fragments from the past are cited first. The calibration process is implemented using a weighted sorting algorithm, with weights based on semantic similarity and timestamp proximity. This sequence provides high-precision reference data for context reconstruction, reducing response bias caused by topic drift.
[0095] Step S2 extracts the current input SMS content and corresponding historical SMS records from the SMS database. It extracts the user's unsubscribe flag, interception status flag, and last interaction timestamp from the SMS records. By calculating the time difference between two adjacent SMS records and comparing it with a preset time threshold, a dialogue interruption status marker is obtained. Since the dialogue interruption status marker has an interruption location, a conditional random field is used to extract the topic feature vector from the current input SMS. Based on the topic feature vector, a matching degree value is retrieved from the historical SMS records to obtain a set of topic feature vectors in the current context. Based on the topic feature vector set, a feature similarity matrix is constructed, and the Euclidean distance between the current input SMS and the historical referenced content is calculated. A semantic change trend curve is extracted from the feature similarity matrix. The semantic drift rate is obtained by calculating the slope of the semantic change trend curve. A comparison of the semantic drift rate with a preset drift threshold determines whether an adjustment marker is triggered. If an adjustment marker is triggered, a semantic evolution model is constructed based on a recurrent neural network. Evolution parameters are extracted from the semantic change trend curve to obtain the topic boundary interval values. Based on the topic boundary interval values, a dynamic programming algorithm is used to calculate the optimal boundary adjustment range. Combined with the semantic drift rate, the topic boundary is calibrated to obtain the adjusted boundary threshold interval. Interrupted conversation restart scenarios include interactions broken due to user unsubscription, blocking, or prolonged inactivity. By analyzing the degree of semantic drift, topic boundaries are dynamically adjusted to ensure the continuity of the conversation. This step provides an adaptive context optimization mechanism for semantic management in interrupted scenarios, with the specific implementation method flexibly set according to the actual scenario.
[0096] By dynamically detecting semantic drift and adaptively adjusting topic boundaries, this method can quickly reconstruct contextual relationships after a conversation is interrupted. Compared to traditional static concatenation methods, this method significantly improves the accuracy of historical information citations and reduces the possibility of topic ambiguity through long short-term memory networks and dynamic programming algorithms. When users resume the conversation after an interruption, they receive more expected responses, thereby improving the smoothness and satisfaction of the interactive experience.
[0097] Furthermore, step S3 includes:
[0098] Extract the interruption timestamp sequence from historical SMS records, calculate the information decay weight, and generate an initial weight label sequence;
[0099] Specifically, boundary values are read from the fuzzy interval of the topic boundary, the interruption timestamp sequence of SMS records is extracted, the decay coefficient is set according to the time interval, the weight value of each historical SMS record is calculated by the exponential decay formula, and an initial weight label sequence is constructed.
[0100] For example, in this embodiment of the application, the system extracts the interrupt timestamp sequence of historical SMS records from the SMS database and calculates the time interval between adjacent records. Based on the time interval, the system calculates the weight value of each record using an exponential decay formula, the formula being: Where t is the time interval and λ is the decay coefficient, typically set to 0.01. The weight value reflects the timeliness of the information; for example, the weight of a record interrupted for 24 hours decreases from 1.0 to 0.79, and after 96 hours it decreases to 0.37. An initial weight label sequence is generated based on the weight values, providing a basis for subsequent priority ranking. For example, in a logistics consultation scenario, if a user sends a new text message after a 48-hour interruption, the system labels the relevant historical records with weights, prioritizing the retention of more recent records.
[0101] Extract text feature vectors from historical SMS messages, construct a semantic similarity matrix, and calculate the comprehensive priority score;
[0102] Specifically, a gated recurrent unit network is used to extract text feature vectors from historical SMS messages, construct a semantic similarity matrix, and calculate a comprehensive priority score.
[0103] For example, a gated recurrent unit network (GNU) is used to extract text feature vectors from historical SMS records. This network captures long-term dependencies in SMS content through update and reset gate mechanisms, generating high-dimensional feature vectors. For instance, in an after-sales scenario, for historical SMS messages about "product quality issues," the extracted feature vectors contain themes such as "quality-complaint." The system calculates the cosine similarity between these vectors and the current SMS theme vector, generating a semantic similarity matrix where matrix elements represent the strength of semantic association. Combining the initial weighted label sequence, the system uses a weighted average method to calculate the comprehensive priority score, as shown in the formula: The typical value of α is 0.6. If a user sends "Is the return policy valid?", a search of historical records reveals that the policy description from 24 hours ago has a score of 0.82, which is higher than the 0.65 from 48 hours ago, indicating a higher priority.
[0104] Generate a historical record sequence in descending order and remove low-relevance records;
[0105] Specifically, a heap sort algorithm is applied to the priority scores to generate a descending sequence of historical records, and low-relevance records are removed.
[0106] For example, based on the comprehensive priority score, the system uses a heap sort algorithm to sort the historical records, generating a sequence from high to low priority. Heap sort ensures computational efficiency by constructing a max-heap and successively extracting the highest priority records. For instance, in a product consultation scenario, the system sorts 10 historical records with priority scores ranging from 0.89 to 0.41. The system sets a sliding window with a size of 3 records and calculates the Euclidean distance between the text feature vectors of adjacent records within the window. If the distance exceeds a preset threshold of 0.4, for example, the distance from "price consultation" to "delivery time" reaches 0.53, the next record is removed. This process ensures that only highly relevant content is retained in the reference sequence, such as retaining the 5 records directly related to "return policy".
[0107] Step S3 reads boundary values from the ambiguous interval of the topic boundary, extracts the SMS record interruption timestamp sequence, sets a decay coefficient according to the time interval, calculates the weight value of each historical SMS record using the exponential decay formula, and constructs an initial weight label sequence. Based on the initial weight label sequence, a Long Short-Term Memory (LSTM) network is used to extract text feature vectors from each historical SMS, calculates the cosine similarity between the text feature vector and the current SMS topic vector, and generates a feature similarity matrix. Based on the feature similarity matrix and combined with the historical record weight values, a weighted average method is used to calculate the comprehensive priority score of each SMS record, and constructs a priority ranking vector. Using the priority ranking vector, a quick sort operation is performed on the historical SMS records to generate a historical record sequence arranged in descending priority order. For the descending priority sequence, a fixed-size sliding window is set, and the Euclidean distance value of the text feature vectors between adjacent SMS records within the window is calculated. Based on the comparison of the Euclidean distance value with a preset distance threshold, record nodes whose distance values exceed the threshold range are removed to obtain an optimized reference content sequence. In this step, based on the adjusted topic boundary range, the selection of historical reference content is dynamically optimized by analyzing the interruption duration and information timeliness. The weighted ranking algorithm comprehensively considers semantic relevance and time decay factors to ensure that the citation sequence is highly relevant to the current conversation topic, thereby improving contextual coherence. The specific implementation method is determined by technical personnel based on the actual scenario.
[0108] Step S3 effectively balances the timeliness and topic relevance of historical information by combining exponential decay and semantic similarity. Feature extraction using gated recurrent unit networks enhances the accuracy of semantic analysis, while heap sort and sliding window mechanisms further optimize the compactness of the citation sequence. Compared to traditional fixed-citation methods, this method significantly reduces interference from irrelevant information. For example, in a customer service scenario, a conversation originally containing 12 historical records is filtered to retain 4 records highly relevant to "after-sales service," significantly improving the coherence of the citation sequence and enabling users to receive more accurate dialogue responses.
[0109] Furthermore, step S4 includes:
[0110] Extract the keyword feature matrix of the currently input SMS, calculate the semantic similarity with the historical citation sequence, and generate a semantic matching vector;
[0111] Specifically, the maximum entropy model is used to extract the keyword feature matrix of the current input SMS, calculate the semantic similarity with the historical citation sequence, and generate a semantic matching vector.
[0112] For example, text features are extracted from the currently input SMS message, and a maximum entropy model is used for multi-layer feature analysis to generate a keyword feature matrix. This model captures key semantic units in the text through the principle of maximizing entropy. For instance, in a customer complaint scenario, if a user sends "My phone is still overheating," the system extracts "overheating-problem-solution" as keywords to construct a feature matrix. The system calculates the cosine similarity between this matrix and each record in the historical reference sequence, generating a semantic matching vector. The vector dimension corresponds to the number of historical records, and each element represents the semantic association strength. For example, records with a matching score higher than 0.85 are considered highly relevant, while records with a score lower than 0.6 trigger further evaluation. This process ensures the targeted nature of subsequent weight adjustments through precise semantic extraction.
[0113] For records with a semantic matching degree lower than a preset semantic matching degree threshold, the retention probability is evaluated, and the importance of information is calculated by combining word frequency features to generate a weight matrix of cited content.
[0114] Specifically, for records with a semantic matching degree lower than a preset semantic matching degree threshold, a support vector machine is used to evaluate the retention probability, and the importance of information is calculated by combining word frequency features to generate a weight matrix of cited content.
[0115] For example, for dimensions in the semantic matching degree vector below the 0.6 threshold, the system uses a support vector machine (SVM) to reassess the retention probability of historical records. The SVM constructs a classification hyperplane and calculates the retention probability value for each record based on semantic features and contextual relevance. For instance, in a product consultation scenario, if a user shifts from "price consultation" to "after-sales service," the retention probability of price-related historical records drops to 0.35, while after-sales-related records rise to 0.87. Simultaneously, the system analyzes the word frequency characteristics of historical records, assigning higher importance to records containing high-frequency keywords such as "return." Combining the retention probability and word frequency characteristics, the information importance I is calculated using the formula: Where P is the retention probability, F is the word frequency score, and β is typically 0.7. A citation weight matrix is generated, with matrix elements reflecting the overall value of each record.
[0116] Calculate the textual correlation between historical records, dynamically adjust the retention weights, and generate a dynamic weight adjustment vector;
[0117] Specifically, a sliding window is used to calculate the textual correlation between historical records, and an exponential weighting method is used to dynamically adjust the retention weights to generate a dynamic weight adjustment vector.
[0118] For example, based on the reference content weight matrix, a fixed-size sliding window is set, for example, containing 3 records, and the textual relevance of adjacent records within the window is calculated. The relevance is calculated using the cosine similarity of the feature vectors; a value higher than 0.7 indicates strong semantic continuity between records. An exponential weighting method is used to adjust the retained weights, with the weights decaying exponentially over time, as shown in the formula: Where t is the time interval, γ is the decay rate set to 0.015, S is the correlation score, and α is set to 0.4. For example, the weight of records within 12 hours remains at 0.92, and drops to 0.65 after 48 hours. The system generates a dynamic weight adjustment vector based on the correlation and weight values to optimize the sorting of historical records.
[0119] Step S4 uses a maximum entropy network to extract a text keyword matrix from the current input SMS message, calculates the cosine similarity between the current keyword matrix and each record in the historical citation sequence, and constructs a semantic matching vector. For the semantic matching vector, the values of each dimension are extracted. When the matching value is lower than a preset threshold, a support vector machine is used to recalculate the retention probability value of the historical citation record. Word frequency features are statistically analyzed from the historical citation records, and the information importance index is calculated based on the retention probability value to generate a citation content weight matrix. Based on the citation content weight matrix, a fixed-size window is set, and the text correlation values between records within the window are calculated to obtain a text correlation sequence. According to the text correlation sequence, an exponential weighting method is used to calculate the retention weight of each historical citation record, constructing a dynamic weight adjustment vector. Based on the dynamic weight adjustment vector, the historical citation records are reordered, and a contextual coherence value is generated through normalization calculation. Text feature extraction uses a maximum entropy network to process the current SMS message content. This network performs multi-layer feature analysis on the text and extracts keywords to form a feature matrix. In this embodiment, an optimized historical citation sequence is utilized to enhance contextual coherence through semantic similarity analysis and dynamic weight adjustment, ensuring that the response content closely matches the user's current needs. This step addresses the issue of broken dialogue flow caused by topic shifts or interruptions through multi-dimensional semantic evaluation and weight optimization. The specific implementation method can be flexibly configured according to the actual scenario.
[0120] In this step, the semantic value of historical records is accurately evaluated by combining the maximum entropy model and support vector machine. Sliding window and exponential weighting methods further enhance the coherence of the citation sequence. For example, in an order processing scenario, when a user asks "Can the shipping address be changed?", 7 records highly relevant to "address-logistics" are selected from 15 historical records, achieving a contextual coherence score of 0.88. Compared to traditional fixed-weight methods, this method significantly reduces interference from irrelevant information through dynamic adjustment, ensuring users receive an accurate and continuous conversational experience.
[0121] Furthermore, step S5 includes:
[0122] Extract real-time input SMS messages and feedback records from the SMS database, extract user intent features, and construct a user intent matrix;
[0123] Specifically, a set of real-time input SMS messages and feedback records is extracted from the SMS database, and a conditional random field is used to extract user intent features to construct a user intent matrix.
[0124] For example, the system extracts currently input SMS messages and AI feedback records from the SMS database, and uses a Conditional Random Field (CRF) algorithm to analyze the semantic features of the feedback SMS messages, identifying keywords containing intents such as complaints, unsubscribing, blocking, or response timeouts. For instance, in a customer service scenario, if a user sends "multiple reports of unresolved quality issues" followed by "request to unsubscribe," the system extracts "quality issue - complaint - unsubscribe" as key features to generate a user intent matrix. This matrix contains multiple dimensions, such as complaint intent, unsubscribe tendency, and emotional intensity, with typical feature values ranging from 0 to 1. For example, a complaint intent feature value of 0.87 and an unsubscribe tendency of 0.76 reflect strong negative emotions from the user. This process, through precise semantic segmentation, lays the foundation for subsequent intent deviation analysis.
[0125] The differences between the feature values of each dimension in the intent matrix and the baseline intent threshold are calculated to generate an intent deviation vector, and the dialog interruption marker is identified by combining the timestamp sequence.
[0126] Specifically, based on the user intent matrix, three dimensions of feature values are extracted: user unsubscription, blocking, and timeout response. The difference between each dimension's feature value and a preset baseline threshold is calculated to generate an intent deviation vector. Based on the intent deviation vector and the feedback SMS timestamp sequence, the time interval between adjacent feedback records is calculated through dynamic programming to obtain a conversation interruption marker sequence.
[0127] For example, feature values for dimensions such as unsubscribe, blocking, and timeout response are extracted from the user intent matrix and compared with a preset baseline threshold, typically set to 0.55. The difference between each feature value and the threshold is calculated to generate an intent deviation vector. For instance, if the complaint intent feature value is 0.87, exceeding the threshold of 0.32, it indicates that the user's attitude has significantly deviated from neutrality. Combining the timestamp sequence of feedback records, a dynamic programming algorithm is used to calculate the time interval between adjacent records. If the interval exceeds 24 hours, for example, if no response is received after a user's complaint, the system marks it as a response timeout interruption. Dynamic programming generates a dialogue interruption marker sequence by minimizing the cumulative deviation of the time interval, ensuring accurate identification of the interruption point. This process effectively quantifies the dynamic changes in user intent.
[0128] For the interrupted marker sequence, adjust the information decay weight, calculate the text feature distance, construct the topic relevance matrix, and update the topic boundaries;
[0129] Specifically, for the interrupted marker sequence, the information decay weight is adjusted, a convolutional neural network is used to calculate the text feature distance, a topic relevance matrix is constructed, and the topic boundary is updated.
[0130] For example, for a dialogue interruption marker sequence, the information weights are adjusted according to the exponential decay rule, as shown in the formula: Where t is the interruption duration and δ is the attenuation coefficient set to 0.02. For example, the weight of a record without a response for 6 hours drops to 0.82, and for 24 hours it drops to 0.45. If unsubscribe or blocking behavior is detected, the weight drops directly to 0.25. Text content is extracted from the interruption location, and convolutional neural networks are used to analyze text features. High-order semantic features are extracted through convolutional and pooling layers, and the Euclidean distance between features is calculated. For example, in an after-sales scenario, the feature distance from "product quality" to "unsubscribe request" increases to 0.75, indicating a topic shift. A topic relevance matrix is constructed based on the distance values, and the matrix elements reflect the semantic continuity between topics. A sliding window method is used, with a window size of 3 records, and the mean relevance within the window is calculated. If the mean is below 0.5, for example, from "service complaint" to "unsubscribe" it drops to 0.38, the system re-divides the topic boundaries into three intervals: "quality feedback - complaint - unsubscribe".
[0131] Update the dialogue state vector based on the topic relevance matrix, incorporating user emotions and interruption risk information;
[0132] Specifically, for the dialogue interruption marker sequence, information decay weight correction values are calculated according to the exponential decay rule to generate a weight adjustment vector. Based on the weight adjustment vector, the text content at the corresponding position is extracted from the feedback SMS records, and a convolutional neural network is used to calculate the distance values between text features to construct a topic relevance matrix. Through the topic relevance matrix, the sliding window method is used to re-divide the topic boundary intervals, and the dialogue state vector is updated according to the text relevance values.
[0133] For example, based on the topic relevance matrix, an updated dialogue state vector is generated through normalization. This vector includes dimensions such as the current topic type, user sentiment, and risk of interruption. For instance, when a user switches from "product inquiry" to "complaint," the state vector records a negative sentiment and an interruption risk of 0.65. The update process integrates relevance data using a weighted average method, with weights based on time intervals and intent strength. This vector provides a precise reference for subsequent response generation, ensuring that the response content highly matches the user's current state.
[0134] Step S5 reads the current input SMS and feedback SMS record set from the SMS database, and uses a conditional random field to extract semantic features from the feedback SMS containing complaint / unsubscribe, interception, and response timeout markers to construct a user intent matrix. Based on the user intent matrix, feature values for three dimensions—unsubscribe, interception, and timeout response—are extracted, and the difference between each feature value and a preset baseline threshold is calculated to generate an intent deviation vector. Based on the intent deviation vector and the feedback SMS timestamp sequence, the time interval between adjacent feedback records is calculated using dynamic programming to obtain a dialogue interruption marker sequence. For the dialogue interruption marker sequence, information decay weight correction values are calculated according to the exponential decay rule to generate a weight adjustment vector. Based on the weight adjustment vector, the corresponding text content is extracted from the feedback SMS records, and a convolutional neural network is used to calculate the distance between text features to construct a topic relevance matrix. Using the topic relevance matrix, a sliding window method is used to re-divide the topic boundary intervals, and the dialogue state vector is updated according to the text relevance values. In this embodiment, by parsing the user intent reiteration content, such as complaints, unsubscribe, interception, or response timeout, the information weights are dynamically optimized and the topic boundaries are adjusted to ensure that the dialogue state remains consistent with the user's current needs. This step enhances context management capabilities in complex interaction scenarios through multi-dimensional intent analysis and weight adjustment. The specific implementation method is set by technical personnel according to the needs of the scenario.
[0135] In this step, by combining conditional random fields and convolutional neural networks, the system accurately captures changes in user intent. Dynamic weight adjustment and topic boundary segmentation significantly improve dialogue coherence in interrupted scenarios. For example, in a logistics scenario, when a user shifts from "delivery inquiry" to "complaint about delay," the system selects six highly relevant records, achieving a state vector coherence of 0.85. Compared to traditional static analysis methods, this method reduces response bias caused by intent shifts through multi-dimensional state updates, resulting in a smoother user experience.
[0136] Furthermore, step S6 includes:
[0137] Identify topic switching markers from the dialogue logs, calculate the switching frequency within a time window, and construct a high-frequency switching identification matrix;
[0138] Specifically, a conditional random field is used to identify topic switching markers from the dialogue log, the switching frequency within the time window is calculated, and a high-frequency switching identification matrix is constructed.
[0139] For example, continuous dialogue text sequences are extracted from dialogue management logs, and topic transition nodes are labeled using a conditional random field algorithm to identify topic switching markers. For instance, in a product consultation scenario, if a user switches from "price consultation" to "configuration parameters" and then to "after-sales service," the system detects two topic switches within a 45-minute time window, calculating a switching frequency of 2.67 times / hour. Based on the difference between this switching frequency and the baseline value of 2 times / hour, the system labels the magnitude of topic changes; if the frequency exceeds 4 times / hour, it is considered a high-frequency switch. A high-frequency switch identification matrix is constructed based on temporal characteristics, with matrix elements reflecting the switching intensity in each time period. This process, through accurate topic labeling and frequency analysis, provides data support for drift risk assessment.
[0140] By combining user behavior data, the difficulty of dialogue transition is calculated, and an interruption recovery feature matrix is generated.
[0141] Specifically, the difficulty of dialogue connection is calculated by combining user behavior data, and an interruption recovery feature matrix is generated by using a gated cyclic unit network.
[0142] For example, user unsubscription, blocking, and timeout response data are extracted from historical dialogue records to calculate the dialogue reconnection difficulty. For instance, in an after-sales scenario, if a user reports a "product quality issue" and receives no response within 48 hours, and submits two complaints, the system calculates a reconnection difficulty value of 0.82, indicating a high recovery barrier. A gated recurrent unit network is used to process the difficulty value. The network analyzes the text association probability within the interruption interval through update and reset gate mechanisms. For example, if a user mentions "a previously reported problem," the network identifies it as pointing to a "signal anomaly" complaint from 72 hours prior, with an association probability of 0.78. An interruption recovery feature matrix is constructed based on the probability values, capturing the semantic continuity of the dialogue before and after the interruption. This process enhances the accuracy of context recovery in interruption scenarios.
[0143] Extract semantic features from dialogue fragments, calculate topic offset, and generate context association weight vectors;
[0144] Specifically, a sliding window is used to extract semantic features of dialogue fragments, calculate the degree of topic offset, and generate a context-related weight vector.
[0145] For example, for the interruption recovery feature matrix, a fixed-length sliding window is set, containing, for instance, 5 records, to extract semantic features of dialogue fragments within the window. The system uses a cosine similarity algorithm to calculate the topic offset between adjacent fragments. For example, the offset from "online complaint" to "unsubscribe request" increases from 0.25 to 0.75, indicating a topic break. Fragments with an offset below 0.3 are considered highly related and given high weight values. A contextual weight vector is generated based on the offset, with vector elements reflecting the semantic continuity of dialogue fragments. For example, in a complaint scenario, the weight vector prioritizes records related to "quality issues," with a weight value of 0.85. This process optimizes contextual references through dynamic weight allocation.
[0146] Construct a semantic tree structure to generate a semantic drift risk assessment matrix and a dialogue association sequence adapted to interruption scenarios;
[0147] For example, a deep neural network is used to extract intent features from the currently input text message. For instance, if a user sends "poor quality, request a refund," the system identifies the intents of "complaint" and "refund" and generates a feature vector. The system constructs an intent matching matrix, calculating the association strength with historical records. The strongest intent, "complaint," is used as the root node of the semantic tree, and child nodes are sorted in descending order of strength, including "refund request" and "after-sales service." The semantic tree clearly displays the evolution of intent, such as the path from "quality complaint" to "refund request." Based on the tree structure and context weight vector, a semantic drift risk assessment matrix is constructed, comprehensively considering switching frequency, interruption duration, and recovery difficulty. For example, if the drift risk value for a complaint scenario is 0.89, exceeding the threshold of 0.7, the system retains the most recent 5 highly associated records, generating a dialogue association sequence to ensure that the response content is consistent with the user's request.
[0148] By analyzing the topic switching and interruption recovery difficulty in the dialogue logs, and combining this with the current dialogue state, the risk of topic drift is dynamically assessed, generating highly coherent contextual output. This step addresses the dialogue breakage problem caused by user unsubscription, blocking, or prolonged inactivity through multi-dimensional feature extraction and semantic modeling. The specific implementation method can be flexibly configured according to the actual scenario.
[0149] Furthermore, step S6 also includes:
[0150] The topic switching frequency is extracted from the dialogue log, the relevance value between historical information and the current SMS is calculated, and the drift risk value is obtained by weighted summation. The length of the historical information sequence is selected according to the drift risk value, the intent of the input SMS is extracted, the historical information is matched to generate an association matrix, and the SMS is parsed using the association matrix to construct a semantic tree, so as to obtain the context association output result adapted to the interruption scenario.
[0151] By employing gated recurrent unit networks and semantic tree modeling, the system accurately captures the dynamic features of topic switching and interruption recovery. For example, in a logistics scenario, when a user switches from "delivery inquiry" to "complaint about delay," filtering through four key records, the drift risk is reduced to 0.62, and the contextual coherence reaches 0.87. Compared to traditional fixed-window methods, this approach significantly improves the dialogue experience in interrupted scenarios through multi-layer semantic analysis and dynamic weight adjustment, providing users with more accurate responses.
[0152] Specifically, the above steps include:
[0153] Extract continuous dialogue text from the dialogue log, use conditional random fields to label topic switching nodes, set a fixed-length time window to calculate the number of switching times per unit time, and obtain the dialogue topic switching frequency value.
[0154] Based on the frequency of conversation topic switching, a sliding window is set to extract historical SMS records within the corresponding time period, and the text similarity between the current SMS and the historical records is calculated.
[0155] Based on text similarity and topic switching frequency, a topic drift risk value is calculated using a linear weighting method. The retention length of historical records is selected according to the magnitude of the risk value. For historical records, a deep neural network is used to identify user intent from the currently input SMS message, extract intent feature vectors, and construct an intent matching matrix.
[0156] Based on the intent matching matrix, the association strength of each item in the matrix is calculated, and the item with the highest association strength is selected as the root node of the semantic tree.
[0157] Based on the root node of the semantic tree, child nodes are constructed in descending order of association strength to generate a multi-level semantic tree structure. Complete paths are extracted from the semantic tree structure, and context association sequences are generated according to the node hierarchy.
[0158] Furthermore, step S7 includes:
[0159] Extract key semantic markers from dialogue fragments, construct dialogue topic chains, and calculate text coherence scores;
[0160] Specifically, Conditional Random Fields (CRF) are used to extract key semantic markers from dialogue fragments, construct dialogue topic chains, and calculate text coherence scores. More specifically, dialogue fragments are extracted from the context-related output sequence, CRF is used to identify key semantic markers, construct dialogue topic chains, and calculate text coherence scores between adjacent dialogue fragments.
[0161] For example, dialogue fragments are extracted from the context-associative output sequence, and a conditional random field algorithm is used to identify key semantic markers, such as keywords related to "price-configuration-after-sales service." In a product consultation scenario, as a user switches from "phone performance" to "price consultation" and then to "after-sales policy," the system constructs a dialogue topic chain containing these markers and calculates the coherence of adjacent fragments. Coherence is evaluated using cosine similarity; a coherence score higher than 0.78 indicates a smooth topic transition. This process, through precise semantic annotation, ensures the accuracy of subsequent feature extraction.
[0162] Extract semantic features from historical citation records, generate a multi-turn dialogue semantic feature matrix, and analyze dialogue continuity;
[0163] Specifically, a Long Short-Term Memory (LSTM) network is used to extract semantic features of historical citation records, generate a multi-turn dialogue semantic feature matrix, and analyze the continuity of the dialogue.
[0164] For example, a Long Short-Term Memory (LSTM) network is used to process historical reference records based on text coherence numerical values and coherence representation vectors. This network captures long-term dependencies in the dialogue through forgetting gates, input gates, and output gates. For instance, in an after-sales scenario, when a user mentions "unresolved quality issues," the network extracts historical records related to "quality-complaint" to generate a semantic feature matrix. Each row of the matrix corresponds to a feature vector of a record, containing topic, sentiment, and intent information. The distribution of feature vectors in the matrix is analyzed to assess dialogue continuity; if the average similarity between feature vectors is higher than 0.75, the continuity is considered strong. This process enhances the accuracy of historical information citation through deep semantic modeling.
[0165] Calculate the semantic relevance of dialogue records, generate a relevance sequence, and filter highly relevant records;
[0166] Specifically, by setting a sliding window to calculate the semantic relevance of dialogue records, a relevance sequence is generated, and highly relevant records are filtered out.
[0167] For example, for the semantic feature matrix, a fixed-size sliding window is set, containing, for instance, three records. The cosine similarity of adjacent records within the window is calculated to generate a text relevance sequence. If the similarity drops from 0.85 to 0.42, for example, from "complaint" to "refund application," a topic shift is identified. A threshold of 0.65 is set to filter records with relevance below the threshold, retaining highly relevant content. For example, in a complaint scenario, records directly related to the "refund process" are retained, while earlier irrelevant "product consultation" content is removed. This process optimizes the compactness of the citation sequence through dynamic filtering.
[0168] Retrieve matching response text and generate target dialogue response text;
[0169] Specifically, matching response texts are retrieved from the alternative response template library, and the target dialogue response text is generated after optimization and sorting.
[0170] For example, a semantic consistency vector is constructed based on the relevance sequence to reflect the semantic weight of retained records. The system retrieves matching text from a library of alternative response templates, which contains predefined responses for various scenarios, such as "refund process instructions" or "solution suggestions." In a complaint scenario, where a user expresses a "refund not processed" request, the system retrieves refund process text with a match score of 0.89 and timeliness commitment text with a match score of 0.77. The match score S is calculated using a weighted ranking algorithm, as shown in the formula: Where M is the matching degree, C is the coherence degree, and α is set to 0.6, an initial response sequence is generated. The text with the highest matching degree is selected, and historical semantic features are incorporated, such as supplementing specific question descriptions, to form the target response text, ensuring that the response is direct and coherent.
[0171] Step S7 extracts dialogue fragments from the context-related output sequence, uses conditional random fields to identify key semantic markers, constructs dialogue topic chains, and calculates the text coherence value between adjacent dialogue fragments. Based on the text coherence value and combined with the coherence representation vector, a recurrent neural network is used to extract semantic features of historical reference records, generating a multi-turn dialogue semantic feature matrix. For the semantic feature matrix, a fixed-size sliding window is set, and the cosine similarity of adjacent dialogue records within the window is calculated to obtain a text relevance sequence. Based on the text relevance sequence, historical reference records are filtered and selected, retaining dialogue records with relevance values higher than a preset threshold, and a semantic consistency vector is constructed. Using the semantic consistency vector, the reply text with the highest matching degree is retrieved from the candidate reply template library to generate an initial reply text sequence. The semantic relevance of the initial reply text sequence is calculated, and the text is sorted according to the relevance value to obtain a sorted reply text sequence. Based on the sorted reply text sequence, the text content with the highest sorting value is extracted to generate the target dialogue reply text.
[0172] By combining contextualized output and coherence representation, the semantic features of historical citation sequences are analyzed. Through multi-layered semantic processing and template matching, response text highly consistent with user intent is generated. This step addresses the topic deviation problem in interrupted scenarios through dynamic semantic analysis and response optimization. The specific implementation is configured by technical personnel according to the actual scenario. By combining Long Short-Term Memory (LSTM) networks and sliding windows, the semantic dynamics of the dialogue are accurately captured, and template matching and weighted sorting further optimize response quality. For example, in a logistics scenario, when a user inquires about "delivery delay compensation," four highly relevant records are selected from 12 historical records, generating a response with a coherence of 0.86. Compared to traditional static response methods, this method improves the relevance of responses and user experience through multi-layered semantic analysis and dynamic optimization.
[0173] Furthermore, this application also provides an AI-based iterative system for SMS content based on user feedback, including:
[0174] The SMS data extraction module is used to extract the SMS content currently entered by the user and historical SMS records, extract keyword distribution features and reference content offsets, generate an initial contextual coherence representation, and determine whether there is a conversation interruption scenario based on the timestamp sequence.
[0175] The interruption scenario judgment module is used to calculate the semantic drift between the current input SMS and the historical referenced content if a dialogue interruption and restart scenario is detected. If it exceeds the preset semantic drift rate threshold, a dynamic adjustment strategy is triggered to determine the optimized topic boundary range.
[0176] The semantic drift processing module is used to prioritize historical SMS records by combining the dialogue interruption duration and information decay weight with a weighted sorting algorithm for the optimized topic boundary range, and generate an optimized sequence of referenced content.
[0177] The citation sequence optimization module is used to analyze the semantic similarity between the current input SMS and historical content based on the optimized historical citation sequence, dynamically adjust the information retention weight, and generate an enhanced contextual coherence representation.
[0178] The coherence enhancement module is used to analyze the user intent reiteration content in real-time input SMS and AI feedback SMS, dynamically adjust the information decay weight and re-divide topic boundaries, and generate an updated dialogue state vector.
[0179] The dialogue state update module is used to extract the topic switching frequency and context recovery difficulty from the multi-turn dialogue management logs, combine them with the updated dialogue state vector, calculate the topic drift risk value, and generate context association output results adapted to the interruption scenario.
[0180] The response generation module is used to output results based on contextual association and enhanced coherence representation, process optimized historical citation sequences to ensure semantic consistency of response content, and generate target dialogue response text.
[0181] In the description of this application, it should be understood that the orientation or positional relationship indicated by directional terms such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" is usually based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing this application and simplifying the description. Unless otherwise stated, these directional terms do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the scope of protection of this application.
[0182] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this application.
Claims
1. A method for AI-based iterative analysis of SMS content based on user feedback, characterized in that, Includes the following steps: S1. Based on the text message content currently entered by the user and the historical quoted content, extract the keyword distribution features and the offset of the quoted content to generate an initial contextual coherence representation; Determine whether a dialogue interruption scenario exists based on the timestamp sequence; S2. If a conversation interruption and restart scenario is detected, calculate the semantic drift rate between the currently input SMS and historical referenced content. If it exceeds a preset semantic drift rate threshold, trigger a dynamic adjustment strategy to determine the optimized topic boundary range, including: Extract the currently entered SMS message and historical quoted content from the SMS database to generate a conversation interruption status marker; For interruption status markers, extract the topic feature vector of the current input SMS, construct a feature similarity matrix, calculate the Euclidean distance between the current input SMS and historical referenced content, and extract the semantic change trend curve from the feature similarity matrix; obtain the semantic drift rate by calculating the slope of the semantic change trend curve; optimize the topic boundary range based on the semantic drift rate, and generate an adjusted topic boundary threshold range; Based on the adjusted topic boundary threshold range, historical reference content that is highly relevant to the topic of the current input SMS is retained first, and an optimized semantic association sequence is generated. S3. For the optimized topic boundary range, combining the dialogue interruption duration and information decay weight, a weighted sorting algorithm is used to prioritize the historical reference content, generating an optimized historical reference sequence, including: Extract the interrupt timestamp sequence from the historical referenced content, extract the interrupt timestamp sequence from the SMS database, calculate the time interval between adjacent records, calculate the information decay weight of each record based on the time interval, and generate an initial weight label sequence. Extract the text feature vectors of historical SMS messages, calculate the cosine similarity between the text feature vectors of historical SMS messages and the topic vector of the current SMS message, generate a semantic similarity matrix, and calculate the comprehensive priority score by combining the semantic similarity matrix with the initial weight label sequence and using a weighted average method. Generate a historical record sequence in descending order and remove low-relevance records; S4. Based on the optimized historical citation sequence, analyze the semantic similarity between the current input SMS and the historical citation content, dynamically adjust the information retention weight, and generate an enhanced contextual coherence representation. S5. Analyze the user intent reiteration content in real-time input SMS and AI feedback SMS, dynamically adjust the information decay weight and redefine the topic boundary to generate an updated dialogue state vector. S6. Extract topic switching frequency and context recovery difficulty from multi-turn dialogue management logs, combine with the updated dialogue state vector, calculate topic drift risk value, and generate context association output results adapted to interruption scenarios; S7. Based on the context-related output results and enhanced contextual coherence representation, process the optimized historical citation sequence to ensure the semantic consistency of the response content and generate the target dialogue response text.
2. The AI-based iterative method for SMS content based on user feedback as described in claim 1, characterized in that, Step S1 includes: Based on the text message content currently entered by the user and historical quoted content, word segmentation technology is used to extract word sequences, and the distribution position of words is statistically analyzed through a sliding window to obtain word interval point position data; Construct a keyword distribution density matrix and calculate a semantic dispersion index; compare the semantic dispersion index with a preset semantic dispersion threshold to obtain semantic weight values; For SMS messages with semantic dispersion indices below a preset threshold, extract topic word sequences and calculate semantic similarity to generate contextual association vectors. Extract timestamp sequences from historical references and calculate the time difference between adjacent text messages; if the difference exceeds a preset time threshold, it is determined to be a conversation interruption scenario. For text messages before and after the interruption point, a conversation coherence scoring matrix is constructed by combining contextual association vectors and semantic weights, and the contextual coherence index value is calculated.
3. The AI-based iterative method for SMS content based on user feedback as described in claim 1, characterized in that, Step S4 includes: Extract the keyword feature matrix of the currently input SMS, calculate the semantic similarity with the historical citation sequence, and generate a semantic matching vector; For records with a semantic matching degree lower than a preset semantic matching degree threshold, the retention probability is evaluated, and the importance of information is calculated by combining word frequency features to generate a weight matrix of cited content. A sliding window is used to calculate the textual relevance between historical references, dynamically adjust the retention weights, and generate a dynamic weight adjustment vector.
4. The AI-based iterative method for SMS content based on user feedback as described in claim 1, characterized in that, Step S5 includes: Extract real-time input SMS messages and feedback records from the SMS database, extract user intent features, and construct a user intent matrix; The differences between the feature values of each dimension in the intent matrix and the baseline intent threshold are calculated to generate an intent deviation vector, and the dialog interruption marker is identified by combining the timestamp sequence. For the interrupted marker sequence, adjust the information decay weight, calculate the text feature distance, construct the topic relevance matrix, and update the topic boundaries; The dialogue state vector is updated based on the topic relevance matrix, incorporating user emotions and interruption risk information.
5. The AI-based iterative method for SMS content based on user feedback according to claim 1, characterized in that, Step S6 includes: Identify topic switching markers from the dialogue logs, calculate the switching frequency within a time window, and construct a high-frequency switching identification matrix; By combining user behavior data, the difficulty of dialogue transition is calculated, and an interruption recovery feature matrix is generated. Extract semantic features from dialogue fragments, calculate topic offset, and generate context association weight vectors; Construct a semantic tree structure to generate a semantic drift risk assessment matrix and a dialogue association sequence adapted to interruption scenarios.
6. The AI-based iterative method for SMS content based on user feedback as described in claim 5, characterized in that, Step S6 further includes: The topic switching frequency is extracted from the dialogue log, the relevance value between historical information and the current SMS is calculated, and the drift risk value is obtained by weighted summation. The length of the historical information sequence is selected according to the drift risk value, the intent of the input SMS is extracted, the historical information is matched to generate an association matrix, and the SMS is parsed using the association matrix to construct a semantic tree, so as to obtain the context association output result adapted to the interruption scenario.
7. The AI-based iterative method for SMS content based on user feedback according to claim 1, characterized in that, Step S7 includes: Extract key semantic markers from dialogue fragments, construct dialogue topic chains, and calculate text coherence scores; Extract semantic features from historical citation records, generate a multi-turn dialogue semantic feature matrix, and analyze dialogue continuity; Set up a sliding window to calculate the semantic relevance of dialogue records, generate a relevance sequence, and filter highly relevant records; The system retrieves matching response text from the alternative response template library, optimizes the sorting, and generates the target dialogue response text.
8. An AI-based iterative system for SMS content based on user feedback, characterized in that, include: The SMS data extraction module is used to extract the SMS content currently entered by the user and historical quoted content, extract keyword distribution features and quoted content offsets, and generate an initial contextual coherence representation. Determine whether a dialogue interruption scenario exists based on the timestamp sequence; The interruption scenario judgment module is used to calculate the semantic drift rate between the currently input SMS and historical referenced content if a conversation interruption and restart scenario is detected. If it exceeds a preset semantic drift rate threshold, a dynamic adjustment strategy is triggered to determine the optimized topic boundary range, including: Extract the currently entered SMS message and historical quoted content from the SMS database to generate a conversation interruption status marker; For interruption status markers, extract the topic feature vector of the current input SMS, construct a feature similarity matrix, calculate the Euclidean distance between the current input SMS and historical referenced content, and extract the semantic change trend curve from the feature similarity matrix; obtain the semantic drift rate by calculating the slope of the semantic change trend curve; optimize the topic boundary range based on the semantic drift rate, and generate an adjusted topic boundary threshold range; Based on the adjusted topic boundary threshold range, historical reference content that is highly relevant to the topic of the current input SMS is retained first, and an optimized semantic association sequence is generated. The semantic drift processing module, based on the optimized topic boundary range, combines dialogue interruption duration and information decay weights to employ a weighted sorting algorithm to prioritize historical references, generating an optimized historical reference sequence, including: Extract the interrupt timestamp sequence from the historical referenced content, extract the interrupt timestamp sequence from the SMS database, calculate the time interval between adjacent records, calculate the information decay weight of each record based on the time interval, and generate an initial weight label sequence. Extract the text feature vectors of historical SMS messages, calculate the cosine similarity between the text feature vectors of historical SMS messages and the topic vector of the current SMS message, generate a semantic similarity matrix, and calculate the comprehensive priority score by combining the semantic similarity matrix with the initial weight label sequence and using a weighted average method. Generate a historical record sequence in descending order and remove low-relevance records; The citation sequence optimization module is used to analyze the semantic similarity between the current input SMS and the historical citation content based on the optimized historical citation sequence, dynamically adjust the information retention weight, and generate an enhanced contextual coherence representation. The coherence enhancement module is used to analyze the user intent reiteration content in real-time input SMS and AI feedback SMS, dynamically adjust the information decay weight and re-divide topic boundaries, and generate an updated dialogue state vector. The dialogue state update module is used to extract the topic switching frequency and context recovery difficulty from the multi-turn dialogue management logs, combine them with the updated dialogue state vector, calculate the topic drift risk value, and generate context association output results adapted to the interruption scenario. The response generation module is used to output results based on contextual association and enhanced contextual coherence representation, process optimized historical citation sequences to ensure semantic consistency of response content, and generate target dialogue response text.
Citation Information
Patent Citations
Automatic prompt construction method based on man-machine conversation history and semantic retrieval
CN119441443A
Historical dialogue screening method and device for dialogue system
CN120104735A