Short message content AI iteration method and system based on user feedback

By dynamically adjusting the theme boundaries and information attenuation weights and optimizing the historical citation sequence, the context coherence problem of AI SMS system after multiple rounds of dialogue is solved, achieving higher dialogue coherence and user experience, and improving the system's adaptability in complex scenarios.

CN120509418AActive Publication Date: 2025-08-19GUANGDONG BOJIN INFORMATION TECHNOLOGY GROUP CO LTD

Patent Information

Application Number
CN202511007885.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-08-19
Estimated Expiration
2045-07-22

AI Technical Summary

Technical Problem

The existing AI-driven SMS dialogue system is difficult to maintain context coherence after multiple rounds of conversations, resulting in topic deviations and user experience declines. It lacks an adaptive memory module management strategy and it is difficult to dynamically adjust information retention and attenuation weights in complex scenarios.

Method used

By analyzing the keyword distribution and timestamps of the user's current input SMS and history, dynamically adjusting the subject boundaries and information attenuation weights, using a weighted sorting algorithm to optimize the historical reference sequence, calculating semantic similarity and generating enhanced context coherence representations, analyzing the user's intention to reaffirm the content and update the conversation status vector, calculating the subject drift risk value, and generating context-related output that adapts to the interrupt scenario.

Benefits of technology

It improves dialogue coherence and user experience in interrupt restart scenarios, reduces the risk of topic drift, ensures semantic consistency of reply content, and improves the adaptability and user satisfaction of the dialogue system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509418A_ABST
    Figure CN120509418A_ABST
Patent Text Reader

Abstract

The invention relates to a short message content AI iteration method and system based on user feedback, and the method comprises the steps: analyzing the keyword dispersion degree and reference content offset of a short message currently input by a user and a historical record, judging the dialogue interruption condition in combination with a timestamp, and dynamically adjusting a theme boundary and an information attenuation weight; a weighted sorting algorithm is adopted to optimize a historical reference sequence, semantic similarity is calculated, information retention weight is dynamically adjusted, and context coherence representation is enhanced; analyzing user intention rework content in AI feedback, adjusting an information attenuation weight, updating a dialogue state vector, calculating a theme drift risk value, and determining context association output adaptive to an interrupt scene; processing the optimized historical reference sequence according to a context association result and coherence representation, judging semantic consistency of reply contents, and outputting a target dialogue reply text; by analyzing the currently input short message of the user and various historically recorded indexes, the dialogue continuity and the user experience in the interruption restart scene are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to, specifically, a method and system for AI iteration of SMS content based on user feedback. Background Art

[0002] Numerous AI-driven SMS applications exist, such as intelligent customer service SMS systems that can send personalized promotional messages based on a user's purchase history, AI-powered SMS alert systems for banks that automatically send security alerts after detecting unusual transactions, and AI-powered SMS tracking systems for e-commerce platforms that proactively notify users of changes in logistics status. However, maintaining contextual coherence in AI-driven SMS conversational systems is crucial for ensuring a positive user experience. When a user engages in multiple rounds of conversation with an AI system, the system must accurately understand and remember previous conversations and maintain topic coherence as the conversation continues. However, in real-world applications, conversations are often interrupted for various reasons (such as user absence, network outages, and time delays). When a conversation resumes, the system often faces challenges maintaining contextual coherence. Current user feedback-based conversational systems often rely on static memory mechanisms or simple context splicing methods for multi-round interactions. These methods are effective for short-term conversations, but their shortcomings become increasingly apparent as the number of rounds increases or when the conversation is restarted after an interruption. The topic can easily deviate from the initial intent, historical information citations often become misleading, and even a lack of clear demarcations can lead to topic blurring. These limitations make it difficult for the system to adapt to the dynamic demands of complex scenarios, thus impairing the user experience. Research challenges focus on effectively managing contextual coherence in multi-turn conversations. This technical challenge is particularly acute in scenarios where conversations are resumed after interruptions. Broken contextual links make it difficult for the system to accurately connect to previous conversations. This disconnect reduces the accuracy of historical information citations and causes system responses to deviate from user expectations. This citation bias further blurs topic boundaries and increases the risk of topic drift, creating a unique dynamic adjustment challenge: a difficult balance between coherence and flexibility. These core technical factors have not been fully addressed, making it difficult for conversational systems to maintain coherence and flexibility, leading to unique dynamic adjustment challenges. Therefore, designing an adaptive memory module management strategy that dynamically adjusts information retention and decay weights to reconstruct contextual connections, improve the accuracy of historical information citations, and clearly define topic boundaries when a conversation is resumed after an interruption becomes a key issue for improving overall conversational continuity and reducing user cognitive load. Addressing this issue will directly determine the practical value and user acceptance of AI systems in complex interaction scenarios. Summary of the Invention

[0003] In order to solve the problems existing in the above-mentioned prior art, the purpose of this application is to provide an AI iteration method and system for SMS content based on user feedback.

[0004] The present application describes an AI-based SMS content iteration method and system based on user feedback, comprising the following steps: S1. Extract keyword distribution features and reference content offsets based on the user's current text message content and historical text message records to generate an initial context coherence representation; determine whether there is a conversation interruption scenario based on the timestamp sequence; S2. If a conversation interruption and restart scenario is detected, the semantic drift degree between the current input text message and the historical reference content is calculated. If it exceeds the preset semantic drift rate threshold, a dynamic adjustment strategy is triggered to determine the optimized topic boundary range; S3. Based on the optimized topic boundary range, combined with the conversation interruption duration and information decay weight, a weighted sorting algorithm is used to prioritize historical SMS records to generate an optimized reference content sequence; S4. Based on the optimized historical reference sequence, the semantic similarity between the current input SMS and the historical content is analyzed, the information retention weight is dynamically adjusted, and an enhanced contextual coherence representation is generated; S5. Analyze the user's intent reaffirmation in the real-time input SMS and AI feedback SMS, dynamically adjust the information decay weight and re-divide the topic boundaries to generate an updated conversation state vector. S6. Extract topic switching frequency and context recovery difficulty from multi-round dialogue management logs, combine them with the updated dialogue state vector, calculate the topic drift risk value, and generate a context-related output result adapted to the interruption scenario; S7. Based on the context-related output results and enhanced coherence representation, the optimized historical reference sequence is processed to ensure the semantic consistency of the reply content and generate the target dialogue reply text.

[0005] Preferably, the step S1 includes: Based on the content of the current SMS input by the user and the historical SMS records, word segmentation technology is used to extract the word sequence, and the word distribution position is counted through a sliding window to obtain the word interval point position data; Constructing a keyword distribution density matrix and calculating a semantic dispersion index; comparing the semantic dispersion index with a preset semantic dispersion threshold to obtain a semantic weight value; For text messages whose semantic dispersion index is lower than the preset threshold of semantic dispersion, the subject word sequence is extracted, and the semantic similarity is calculated to generate a context association vector; Extract the timestamp sequence from historical SMS records and calculate the time difference between adjacent SMS messages. If the difference exceeds the preset time threshold, it is determined to be a conversation interruption scenario. For the text messages before and after the interruption point, the conversation coherence scoring matrix is constructed by combining the context relevance vector and semantic weight, and the context coherence index value is calculated.

[0006] Preferably, the step S2 includes: Extract the current input SMS and historical records from the SMS database and generate a conversation interruption status mark; For the interruption status mark, the topic feature vector of the current input SMS is extracted, a semantic similarity matrix is constructed, and the semantic drift rate is calculated to determine whether dynamic adjustment should be triggered; Based on the semantic drift rate, the topic boundary range is optimized and the adjusted topic boundary threshold interval is generated; According to the adjusted topic boundary threshold interval, an optimized semantic association sequence is generated.

[0007] Preferably, the step S3 includes: Extract the interruption timestamp sequence from the historical SMS records, calculate the information decay weight, and generate the initial weight mark sequence; Extract text feature vectors of historical SMS messages, construct a semantic similarity matrix, and calculate the comprehensive priority score; Generate a descending sequence of historical records, removing low-relevance records.

[0008] Preferably, the step S4 includes: Extract the keyword feature matrix of the current input text message, calculate the semantic similarity with the historical reference sequence, and generate a semantic matching vector; For records whose semantic matching degree is lower than the preset semantic matching degree threshold, the retention probability is evaluated, the information importance is calculated based on the word frequency characteristics, and the citation content weight matrix is generated; A sliding window is used to calculate the text correlation between historical records, dynamically adjust the retention weight, and generate a dynamic weight adjustment vector.

[0009] Preferably, the step S5 includes: Extract real-time input SMS and feedback records from the SMS database, extract user intent features, and construct a user intent matrix; Calculate the difference between the eigenvalue of each dimension in the intent matrix and the baseline intent threshold to generate an intent deviation vector. Combined with the timestamp sequence, identify the conversation interruption marker. For the interruption mark sequence, adjust the information decay weight, calculate the text feature distance, build the topic relevance matrix and update the topic boundary; The conversation state vector is updated based on the topic relevance matrix, incorporating user emotions and interruption risk information.

[0010] Preferably, the step S6 includes: Identify topic switch markers from conversation logs, calculate the switching frequency within the time window, and construct a high-frequency switching identification matrix; Combine user behavior data to calculate the difficulty of conversation connection and generate an interruption recovery feature matrix; Extract the semantic features of the conversation fragment, calculate the degree of topic deviation, and generate the context-related weight vector; Construct a semantic tree structure to generate a semantic drift risk assessment matrix and a dialogue association sequence that adapts to the interruption scenario.

[0011] Preferably, the step S6 further includes: The frequency of topic switching is extracted from the conversation log, and the correlation between historical information and the current text message is calculated. The weighted sum is used to obtain the drift risk value. The length of the historical information sequence is selected based on the drift risk value. The intent of the input text message is extracted, and the historical information is matched to generate an association matrix. The association matrix is used to parse the text message to construct a semantic tree, and the context-related output result adapted to the interruption scenario is obtained.

[0012] Preferably, the step S7 includes: Extract key semantic tags from conversation fragments, construct conversation topic chains, and calculate text coherence values; Extract the semantic features of historical citation records, generate a multi-round dialogue semantic feature matrix, and analyze dialogue continuity; Set up a sliding window to calculate the semantic relevance of conversation records, generate a relevance sequence, and filter out highly relevant records; Retrieve matching reply texts from the alternative reply template library, optimize the sorting, and generate the target conversation reply text.

[0013] This application also provides an AI-based SMS content iteration system based on user feedback, including: The SMS data extraction module is used to extract the content of the user's current SMS and historical SMS records, extract keyword distribution characteristics and reference content offsets, and generate an initial context coherence representation; it also determines whether there is a conversation interruption scenario based on the timestamp sequence; The interruption scenario judgment module is used to detect the conversation interruption and restart scenario, calculate the semantic drift degree between the current input text message and the historical reference content, and trigger a dynamic adjustment strategy if it exceeds the preset semantic drift rate threshold to determine the optimized topic boundary range; The semantic drift processing module is used to prioritize historical SMS records based on the optimized topic boundary range, combined with the duration of conversation interruptions and information decay weights, using a weighted sorting algorithm to generate an optimized reference content sequence. The citation sequence optimization module is used to analyze the semantic similarity between the current input text message and historical 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 analyzes the user's intent reiteration in real-time input text messages and AI feedback text messages, dynamically adjusts information decay weights, re-divides topic boundaries, and generates an updated conversation state vector. The dialogue state update module extracts topic switching frequency and context recovery difficulty from multi-round dialogue management logs, combines them with the updated dialogue state vector, calculates the topic drift risk value, and generates context-related output results adapted to the interruption scenario; The reply generation module is used to generate the target dialogue reply text based on the context-related output results and enhanced coherence representation, process the optimized historical reference sequence to ensure the semantic consistency of the reply content.

[0014] The advantages of the SMS content AI iteration method and system based on user feedback described in this application are: This application analyzes the keyword dispersion and reference content offset of the user's current input text message and historical records, combines the timestamp to determine the conversation interruption situation, and dynamically adjusts the topic boundary and information decay weight. The present invention uses a weighted sorting algorithm to optimize the historical reference sequence, calculates the semantic similarity and dynamically adjusts the information retention weight to enhance the context coherence representation. At the same time, the present invention analyzes the user's intention to reiterate the content in the AI feedback, adjusts the information decay weight and updates the conversation state vector, calculates the topic drift risk value, and determines the context association output that adapts to the interruption scenario. Finally, the present invention processes the optimized historical reference sequence based on the context association results and coherence representation, determines the semantic consistency of the reply content, and outputs the target conversation reply text, effectively improving the conversation coherence and user experience in the interruption restart scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is a flowchart of an AI iteration method and system for SMS content based on user feedback described in this application. DETAILED DESCRIPTION

[0016] like Figure 1 As shown, the AI iteration method for SMS content based on user feedback described in this application includes the following steps: S1. Extract keyword distribution features and reference content offsets based on the user's current text message content and historical text message records to generate an initial context coherence representation; determine whether there is a conversation interruption scenario based on the timestamp sequence; S2. If a conversation interruption and restart scenario is detected, the semantic drift degree between the current input text message and the historical reference content is calculated. If it exceeds the preset semantic drift rate threshold, a dynamic adjustment strategy is triggered to determine the optimized topic boundary range; S3. Based on the optimized topic boundary range, combined with the conversation interruption duration and information decay weight, a weighted sorting algorithm is used to prioritize historical SMS records to generate an optimized reference content sequence; S4. Based on the optimized historical reference sequence, the semantic similarity between the current input SMS and the historical content is analyzed, the information retention weight is dynamically adjusted, and an enhanced contextual coherence representation is generated; S5. Analyze the user's intent reaffirmation in the real-time input SMS and AI feedback SMS, dynamically adjust the information decay weight and re-divide the topic boundaries to generate an updated conversation state vector. S6. Extract topic switching frequency and context recovery difficulty from multi-round dialogue management logs, combine them with the updated dialogue state vector, calculate the topic drift risk value, and generate a context-related output result adapted to the interruption scenario; S7. Based on the context-related output results and enhanced coherence representation, the optimized historical reference sequence is processed to ensure the semantic consistency of the reply content and generate the target dialogue reply text.

[0017] Furthermore, step S1 includes: According to the content of the current SMS input by the user and the historical SMS records, the word sequence is extracted, the word distribution position is counted, and the word interval point position data is obtained; Specifically, the user's current text message content and historical text message records are taken, and word segmentation technology is used to extract word sequences. The word distribution positions are calculated using a sliding window to obtain word interval position data. More specifically, a text message record set is extracted from the text message database for analysis. For each text message in the text message record set, a word segmentation tool is used to extract the word sequence within the individual text message. The word distribution positions within the text are calculated using a sliding window to obtain word interval position data.

[0018] Construct a keyword distribution density matrix and calculate the semantic dispersion index; compare the semantic dispersion index with the preset semantic dispersion threshold to obtain the semantic weight value; Specifically, based on the word interval point position data, a keyword distribution density matrix is constructed, and the semantic dispersion index is obtained by calculating the distance values between adjacent words in the matrix. The semantic weight value is obtained by comparing the semantic dispersion index with the preset semantic dispersion threshold.

[0019] For example, in an embodiment of the present application, the content of the currently input SMS, including text SMS and MMS, and a collection of historical SMS records, is extracted from the SMS database. For each SMS, a word segmentation tool is used to generate a word sequence, and the distribution position of the words in the text is counted through a sliding window to obtain word interval point data. Based on these data, a keyword distribution density matrix is constructed, the distance values between adjacent words are calculated, and a semantic dispersion index is generated. This index reflects the degree of concentration of word distribution, and the lower the value, the more compact the semantics. For example, for the SMS "Please confirm the delivery address, the order will be shipped in the afternoon", the sequence after word segmentation is "Please / Confirm / Delivery Address / Order / Afternoon / Shipping", the sliding window size is set to 5 words, 3 words are slid each time, and the interval point positions are calculated to be 3 and 6, thereby generating a distribution density matrix.

[0020] For text messages whose semantic dispersion index is lower than the preset threshold of semantic dispersion, the subject word sequence is extracted, and the semantic similarity is calculated to generate a context association vector; Specifically, for SMS texts whose semantic weight values are less than the preset semantic weight threshold, the conditional random field algorithm is used to segment the text, extract the theme word sequence in each segment of text, and calculate the semantic similarity between the theme word sequences to obtain the context association vector.

[0021] For example, if the semantic dispersion index falls below a preset threshold, it indicates weak semantic association within the text message, necessitating further extraction of topic word sequences. A conditional random field algorithm is used to segment the text message and extract topic words from each segment. For example, from the sentence "The goods have been received, and the quality is excellent," the sequence "received-quality" is extracted. Semantic similarity between topic words is calculated to generate a contextual association vector.

[0022] Extract the timestamp sequence and calculate the time difference between adjacent SMS messages; if the difference exceeds the preset time threshold, it is determined to be a conversation interruption scenario; 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, a conversation interruption scenario is determined. More specifically, a timestamp sequence is extracted from a collection of SMS records, and the time difference between two adjacent SMS messages is calculated to obtain a time interval sequence. If any value in the time interval sequence exceeds the preset time threshold, a conversation interruption point is determined at that location.

[0023] For the text messages before and after the interruption point, the contextual coherence index value is calculated by combining the contextual relevance vector and semantic weight; Specifically, for the text messages before and after the interruption point, the contextual relevance vector and semantic weight are combined to construct a conversation coherence scoring matrix, and the contextual coherence index value is calculated. The closer the value is to 1, the stronger the coherence. More specifically, for the text messages before and after the conversation interruption point, the contextual relevance value and semantic weight value are combined to construct a text message conversation coherence scoring matrix. This matrix calculation determines the contextual coherence index value between the current input text message and the historical records.

[0024] Step S1 extracts text from the SMS database for analysis of a set of SMS records. For each SMS message in the SMS record set, a word segmentation tool is used to extract the word sequence within the individual message. A sliding window is used to calculate the word distribution within the text to obtain word interval position data. Based on the word interval position data, a keyword distribution density matrix is constructed. The semantic dispersion index is calculated by calculating the distance between adjacent words in the matrix. The semantic weight value is then compared with a preset semantic dispersion threshold. For SMS messages with a semantic weight value less than a preset semantic weight threshold, a conditional random field algorithm is used to segment the text. The subject word sequence within each segment is extracted, and the semantic similarity between the subject word sequences is calculated to obtain a contextual relevance vector. Based on the contextual relevance vector, a convolutional neural network is used to extract a feature vector for the SMS message. The contextual relevance value is obtained by calculating the cosine similarity between the feature vector and each vector in the set of historical SMS record feature vectors. A timestamp sequence is extracted from the SMS record set, and a time interval sequence is obtained by calculating the time difference between two adjacent SMS messages. If a value in the time interval sequence exceeds a preset time threshold, a conversation interruption point is determined at that location. For the text messages before and after the conversation interruption point, the context relevance value and the semantic weight value are combined to construct a text message conversation coherence scoring matrix, and the context coherence index value between the current input text message and the historical record is obtained through matrix calculation. The text message interaction function can be integrated into the operating system of the terminal device or a third-party application. The specific implementation method is determined by technical personnel based on the actual scenario. The user can activate the function through interface operation or remote command. For example, the function entry can be set in the settings menu of the text message application, or one-click activation can be achieved through a shortcut icon. By dynamically analyzing the keyword distribution and timestamp sequence, the conversation interruption scenario can be accurately identified and the initial context coherence representation can be generated. This method effectively captures the semantic characteristics of the text message content and provides a reliable basis for dynamic adjustment. Compared with the traditional static memory mechanism, this application significantly improves the flexibility of context management, reduces the risk of topic drift caused by interruption, and provides users with a more coherent conversation experience.

[0025] By dynamically analyzing keyword distribution and timestamp sequences, we can accurately identify conversation interruptions and generate an initial contextual coherence representation. This approach effectively captures the semantic characteristics of SMS content and provides 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 caused by interruptions, and provides users with a more coherent conversation experience.

[0026] Furthermore, step S2 includes: Extract the current input SMS and historical records from the SMS database and generate a conversation interruption status mark; Specifically, the system extracts the current incoming message and historical records from the SMS database, analyzes the user interaction identifier and timestamp sequence, and generates a conversation interruption status flag. More specifically, the system extracts the current incoming message content and the corresponding historical SMS records from the SMS database, extracts the user unsubscribe identifier, interception status identifier, and last interaction timestamp from the SMS records, and calculates the time difference between two adjacent SMS records and compares it with a preset time threshold to obtain the conversation interruption status flag.

[0027] Exemplarily, in an embodiment of the present application, the content of the text message currently input by the user and the related historical records are extracted from the text message database, and the user unsubscribe mark, interception status mark and interaction timestamp in the record are extracted. The system calculates the time interval between two adjacent text messages and compares it with the preset time threshold, for example, the threshold is set to 720 minutes. If the interval exceeds the threshold, or an unsubscribe or interception mark is detected, a conversation interruption status mark is generated. For example, in an e-commerce consultation scenario, if the user does not reply for more than 12 hours after sending "not buying yet", the system marks the location as an interruption point. This process ensures accurate identification of interruption scenarios through timestamp analysis and behavior mark detection.

[0028] For the interruption status mark, the topic feature vector of the current input SMS is extracted, a semantic similarity matrix is constructed, and the semantic drift rate is calculated to determine whether dynamic adjustment should be triggered; Specifically, to identify the interruption location of a conversation interruption status mark, a conditional random field is used to extract the topic feature vector from the current input text message. Matching values are then retrieved from historical text message records based on the topic feature vector to obtain a set of topic feature vectors in the current context. Based on this set of topic feature vectors, a feature similarity matrix is constructed, and the Euclidean distance between the current input text message and the historical referenced content is calculated. A semantic change trend curve is then extracted from the feature similarity matrix. The slope of the semantic change trend curve is calculated to determine the semantic drift rate, which is then compared with a preset drift threshold to determine whether an adjustment flag should be triggered.

[0029] Exemplarily, for text messages with interruption status marks, the conditional random field algorithm is used to extract the topic feature vector from the current input text message. For example, after the interruption, the user sends a message asking "Is the product I inquired about before still available?" The system extracts "product-inventory" as the topic feature vector. The system retrieves relevant topics in the historical records, calculates the matching degree of the feature vectors, and generates a set of topic feature vectors. Based on this set, a semantic similarity matrix is constructed, and the matrix elements represent the semantic relevance between the current text message and the historical content. By calculating the Euclidean distance between the current input and the historical referenced content in the matrix, a semantic change trend curve is generated. The slope of the curve is further analyzed to obtain the semantic drift rate. If the rate exceeds a preset threshold, such as 0.6, a dynamic adjustment mark is triggered. For example, in a customer service scenario, the user switches from "product quality issues" to "return process consultation", and the drift rate reaches 0.75, indicating that the topic has shifted significantly and the topic boundary needs to be adjusted.

[0030] Based on the semantic drift rate, the topic boundary range is optimized and the adjusted topic boundary threshold interval is generated; Specifically, for trigger adjustment marks, a semantic evolution model was constructed based on a recursive neural network. Evolution parameters were extracted from the semantic change trend curve to obtain the numerical values of the topic boundary interval. Based on the numerical values of the topic boundary interval, a dynamic programming algorithm was used to calculate the optimal boundary adjustment range. The topic boundary was calibrated in combination with the semantic drift rate to obtain the adjusted boundary threshold interval.

[0031] Exemplarily, for scenarios that trigger adjustment marks, a long short-term memory network is used to construct a semantic evolution model, and evolution parameters such as topic transfer frequency and semantic association strength are extracted from the semantic change trend curve. The model determines the numerical value of the topic boundary interval by analyzing the semantic evolution rules of historical conversations, for example, the initial range is 0.4 to 0.8. The system further combines the semantic drift rate and uses a dynamic programming algorithm to calculate the optimal boundary adjustment range to ensure a balance between topic coherence and flexibility. For example, in the after-sales service scenario, the topic boundary is adjusted from "product quality-return process" to "product quality-return process-after-sales service", and the boundary threshold interval is optimized to 0.35 to 0.85. This process significantly improves the accuracy of topic recovery after interruption through dynamic modeling of semantic evolution.

[0032] Generate an optimized semantic association sequence based on the adjusted topic boundary threshold interval; Specifically, according to the adjusted topic boundary threshold interval, the historical citation content is calibrated to generate an optimized semantic association sequence.

[0033] For example, historical references are reordered based on the optimized topic boundary threshold intervals to generate a semantically related sequence. Prioritize historical records that are highly relevant to the current topic. For example, when a user inquires about "product inventory," historical conversation segments related to "inventory" are prioritized. This alignment process is achieved 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.

[0034] Step S2 extracts the current incoming message content and the corresponding historical message records from the message database. The user unsubscribe flag, interception status flag, and last interaction timestamp are extracted from the message records. The time difference between two adjacent message records is calculated and compared with a preset time threshold to obtain a conversation interruption status flag. For interruption locations within the conversation interruption status flag, a conditional random field is used to extract topic feature vectors from the current incoming message. Matching values are retrieved from historical message records based on the topic feature vectors to obtain a set of topic feature vectors for the current context. Based on the set of topic feature vectors, a feature similarity matrix is constructed. The Euclidean distance between the current incoming message and the historically cited content is calculated, and a semantic change trend curve is extracted from the feature similarity matrix. The semantic drift rate is calculated by calculating the slope of the semantic change trend curve. The semantic drift rate is then compared with a preset drift threshold to determine whether an adjustment flag has been triggered. For triggering adjustment flags, a semantic evolution model is constructed based on a recursive neural network. Evolution parameters are extracted from the semantic change trend curve to obtain topic boundary interval values. Based on the topic boundary interval values, a dynamic programming algorithm is used to calculate the optimal boundary adjustment range. The topic boundary is then calibrated using the semantic drift rate to obtain the adjusted boundary threshold interval. Conversation interruptions and restarts can occur due to user unsubscription, blocking, or extended periods of inactivity. By analyzing the degree of semantic drift, we dynamically adjust topic boundaries to ensure conversation continuity. This step provides an adaptive context optimization mechanism for semantic management in interrupted scenarios. The specific implementation method can be flexibly configured based on the actual scenario.

[0035] By dynamically detecting semantic drift and adaptively adjusting topic boundaries, context can be quickly reestablished after a conversation is interrupted. Compared to traditional static splicing methods, this method, leveraging long-short-term memory networks and dynamic programming algorithms, significantly improves the accuracy of historical information citations and reduces the likelihood of topic ambiguity. When users re-initiate a conversation after an interruption, they receive responses that are more consistent with their expectations, improving the fluidity and satisfaction of the interactive experience.

[0036] Furthermore, step S3 includes: Extract the interruption timestamp sequence from the historical SMS records, calculate the information decay weight, and generate the initial weight mark sequence; Specifically, the boundary value is read from the fuzzy interval of the topic boundary, the interruption timestamp sequence of the SMS record is extracted, the attenuation coefficient is set according to the time interval, the weight value of each historical SMS record is calculated using the exponential decay formula, and the initial weight mark sequence is constructed.

[0037] For example, in the embodiment of the present application, the system extracts the interruption 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 uses an exponential decay formula to calculate the weight value of each record, which is: , 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 after a 24-hour outage decreases from 1.0 to 0.79, and after 96 hours to 0.37. An initial weight tag sequence is generated based on the weight values, providing the basis for subsequent priority sorting. For example, in a logistics consulting scenario, if a user sends a new text message after a 48-hour outage, the system will weight the relevant historical records, prioritizing the retention of more recent records.

[0038] Extract text feature vectors of historical SMS messages, construct a semantic similarity matrix, and calculate the comprehensive priority score; Specifically, a gated recurrent unit network is used to extract the text feature vectors of historical text messages, construct a semantic similarity matrix, and calculate the comprehensive priority score.

[0039] For example, for historical SMS records, a gated recurrent unit network is used to extract text feature vectors. The network captures the long-term dependencies of SMS content by updating gates and resetting gates to generate high-dimensional feature vectors. For example, in the after-sales scenario, for historical SMS messages on "product quality issues", the extracted feature vectors contain topic information such as "quality-complaints". The system calculates the cosine similarity between these vectors and the current SMS topic vector to generate a semantic similarity matrix, where the matrix elements represent the strength of semantic association. Combined with the initial weight tag sequence, the system uses a weighted average method to calculate the comprehensive priority score, and the formula is , where the typical value of α is 0.6. If the user sends a question about whether the return policy is valid, searching the historical records reveals that the policy description score 24 hours ago was 0.82, which is higher than the 0.65 score 48 hours ago, indicating a higher priority.

[0040] Generate a historical record sequence in descending order and remove low-relevance records; Specifically, a heap sort algorithm is performed on the priority scores to generate a descending sequence of historical records, eliminating low-relevance records.

[0041] Exemplarily, based on the comprehensive priority score, the system uses a heap sort algorithm to sort the historical records and generate a sequence with high to low priority. Heap sort ensures computational efficiency by constructing a maximum heap and extracting the highest priority records one by one. For example, in the product consultation scenario, the system sorts 10 historical records, and the priority scores are arranged in sequence from 0.89 to 0.41. The system sets a sliding window with a size of 3 records and calculates the Euclidean distance of the text feature vectors of adjacent records in the window. If the distance exceeds the preset threshold of 0.4, for example, the distance from "price consultation" to "delivery time" reaches 0.53, the latter record is eliminated. This process ensures that only highly relevant content is retained in the reference sequence, such as retaining 5 records directly related to "return policy".

[0042] Step S3 reads boundary values from the topic boundary fuzzy interval, extracts a sequence of SMS interruption timestamps, sets a decay coefficient based on the time interval, and calculates a weight for each historical SMS record using an exponential decay formula to construct an initial weighted tag sequence. Based on this initial weighted tag sequence, a long short-term memory network is used to extract text feature vectors from each historical SMS. The cosine similarity between the text feature vectors and the current SMS topic vector is calculated to generate a feature similarity matrix. Based on this feature similarity matrix and the historical record weights, a weighted average method is used to calculate a comprehensive priority score for each SMS record, and a priority ranking vector is constructed. 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 this descending priority sequence, a fixed-size sliding window is set, and the Euclidean distance between the text feature vectors of adjacent SMS records within the window is calculated. The Euclidean distance is compared with a preset distance threshold, and record nodes with distance values exceeding the threshold are removed to obtain an optimized citation content sequence. In this step, based on the adjusted topic boundary range, the selection of historical citation content is dynamically optimized by analyzing the interruption duration and information timeliness. The weighted sorting algorithm takes into account semantic relevance and time decay to ensure that the sequence of citations is highly relevant to the current conversation topic, thereby improving contextual coherence. The specific implementation method will be determined by technical personnel based on actual scenarios.

[0043] In step S3, the system effectively balances the timeliness and topic relevance of historical information through a combination of exponential decay and semantic similarity. Feature extraction using the gated recurrent unit network enhances the accuracy of semantic analysis, while the heap sort and sliding window mechanisms further optimize the compactness of the reference sequence. Compared to traditional fixed reference methods, this method significantly reduces the interference of irrelevant information. For example, in a customer service scenario, a conversation originally containing 12 historical records was filtered to retain four records highly relevant to "after-sales service." This significantly improved the coherence of the reference sequence, enabling users to receive more accurate conversation responses.

[0044] Furthermore, step S4 includes: Extract the keyword feature matrix of the current input text message, calculate the semantic similarity with the historical reference sequence, and generate a semantic matching vector; Specifically, the maximum entropy model is used to extract the keyword feature matrix of the current input text message, calculate the semantic similarity with the historical reference sequence, and generate a semantic matching vector.

[0045] Exemplarily, text features are extracted from the current input text 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 entropy maximization. For example, in a customer complaint scenario, the user sends "the problem of mobile phone heating is still not solved", and the system extracts "heating-problem-solution" as keywords to construct a feature matrix. The system calculates the cosine similarity between the matrix and each record in the historical reference sequence to generate a semantic matching vector. The vector dimension corresponds to the number of historical records, and each element represents the strength of semantic association. For example, records with a matching value higher than 0.85 are considered highly relevant, and records below 0.6 trigger further evaluation. This process ensures the targetedness of subsequent weight adjustments through precise semantic extraction.

[0046] For records whose semantic matching degree is lower than the preset semantic matching degree threshold, the retention probability is evaluated, the information importance is calculated based on the word frequency characteristics, and the citation content weight matrix is generated; Specifically, for records whose semantic matching degree is lower than the preset semantic matching degree threshold, the support vector machine is used to evaluate the retention probability, and the information importance is calculated in combination with the word frequency characteristics to generate the reference content weight matrix.

[0047] For example, for dimensions in the semantic matching vector that are below the 0.6 threshold, the system uses a support vector machine to re-evaluate the retention probability of historical records. The support vector machine calculates the retention probability value of each record based on semantic features and context relevance by constructing a classification hyperplane. For example, in a product consultation scenario, the user switches from "price consultation" to "after-sales service", and the retention probability of price-related historical records drops to 0.35, while the after-sales-related records rise to 0.87. At the same time, the word frequency features of the historical records are counted, and records with high-frequency keywords such as "return" are given higher importance. Combining the retention probability and word frequency features, the information importance I is calculated, and the formula is: , where P is the retention probability, F is the word frequency score, and β is typically 0.7. Generate a citation content weight matrix, where the matrix elements reflect the comprehensive value of each record.

[0048] Calculate the text relevance between historical records, dynamically adjust the retention weight, and generate a dynamic weight adjustment vector; Specifically, a sliding window is used to calculate the text correlation between historical records, and an exponential weighting method is used to dynamically adjust the retention weight to generate a dynamic weight adjustment vector.

[0049] For example, based on the reference content weight matrix, a fixed-size sliding window is set, for example, containing 3 records, and the text relevance of adjacent records in the window is calculated. The relevance is calculated by the cosine similarity of the feature vectors. A value higher than 0.7 indicates strong semantic continuity between records. The retention weight is adjusted using an exponential weighting method, and the weight decays exponentially with the time interval. The formula is: , where t is the time interval, γ is the decay rate set to 0.015, S is the relevance score, and α is set to 0.4. For example, the weight of a record within 12 hours remains at 0.92, but drops to 0.65 after 48 hours. The system generates a dynamic weight adjustment vector based on the relevance and weight values to optimize the sorting of historical records.

[0050] Step S4 uses a maximum entropy network to extract a text keyword matrix from the current input text message, calculates the cosine similarity between the current keyword matrix and each record in the historical reference sequence, and constructs a semantic matching vector. For the semantic matching vector, extract the values of each dimension in the vector. When the matching value is lower than the preset threshold, use a support vector machine to recalculate the retention probability value of the historical reference record. Count the word frequency features from the historical reference records, combine the retention probability value to calculate the information importance index, and generate a reference content weight matrix. Based on the reference content weight matrix, set a fixed size window, calculate the text association value between the records in the window, and obtain a text association sequence. According to the text association sequence, use an exponential weighting method to calculate the retention weight of each historical reference record and construct a dynamic weight adjustment vector. Based on the dynamic weight adjustment vector, reorder the historical reference records, and generate a context coherence value through normalization calculation. Text feature extraction uses a maximum entropy network to process the current text message content. The network performs multi-layer feature analysis on the text and extracts keywords to form a feature matrix. In this embodiment, we leverage an optimized historical citation sequence through semantic similarity analysis and dynamic weight adjustment to enhance contextual coherence and ensure that responses are highly aligned with the user's current needs. This step addresses the issue of disconnected conversations caused by topic drift or interruptions through multi-dimensional semantic evaluation and weight optimization. The specific implementation method is flexibly configured based on the actual scenario.

[0051] In this step, a maximum entropy model and support vector machine are combined to accurately assess the semantic value of historical records. A sliding window and exponential weighting method further enhances the coherence of the reference sequence. For example, in an order processing scenario, when a user asks "Can the shipping address be changed?", 7 records highly related to "address-logistics" were selected from 15 historical records, achieving a contextual coherence value of 0.88. Compared to traditional fixed-weight methods, this method significantly reduces the interference of irrelevant information through dynamic adjustment, ensuring a precise and continuous user experience.

[0052] Furthermore, step S5 includes: Extract real-time input SMS and feedback records from the SMS database, extract user intent features, and construct a user intent matrix; Specifically, a set of real-time input SMS and feedback records is extracted from the SMS database, and conditional random fields are used to extract user intention features to construct a user intention matrix.

[0053] Exemplarily, the current input SMS and AI feedback record set are extracted from the SMS database, and the conditional random field algorithm is used to analyze the semantic features in the feedback SMS to identify keywords containing intentions such as complaints, cancellations, interceptions, or response timeouts. For example, in a customer service scenario, a user sends "multiple feedback that quality issues are not resolved" and then sends "request to cancel". "Quality issues-complaints-cancellation" are extracted as key features to generate a user intention matrix. The matrix contains multiple dimensions, such as complaint intention, cancellation tendency, and emotion intensity, with typical eigenvalues ranging from 0 to 1. For example, the complaint intention eigenvalue is 0.87, and the cancellation tendency is 0.76, reflecting the user's strong negative emotions. This process lays the foundation for subsequent intention deviation analysis through precise semantic segmentation.

[0054] Calculate the difference between the eigenvalue of each dimension in the intent matrix and the baseline intent threshold to generate an intent deviation vector. Combined with the timestamp sequence, identify the conversation interruption marker. Specifically, based on the user intent matrix, we extract the eigenvalues of three dimensions: user unsubscribe, interception, and timeout response. We calculate the difference between each eigenvalue and a preset baseline threshold to generate an intent deviation vector. Based on this intent deviation vector and the feedback SMS timestamp sequence, we use dynamic programming to calculate the time interval between adjacent feedback records to obtain a conversation interruption marker sequence.

[0055] For example, the eigenvalues of dimensions such as unsubscribe, interception, and timeout response are extracted from the user intention matrix and compared with the preset benchmark threshold, which is usually set to 0.55. The difference between the eigenvalue of each dimension and the threshold is calculated to generate an intention deviation vector. For example, if the characteristic value of complaint intention is 0.87, which exceeds the threshold of 0.32, it indicates that the user attitude deviates significantly from the neutral state. Combined with 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 reply is received after the user complains, the system marks it as a response timeout interruption. Dynamic programming generates a conversation interruption marker sequence by minimizing the cumulative deviation of the time interval to ensure accurate identification of the interruption point. This process effectively quantifies the dynamic changes of user intentions.

[0056] For the interruption mark sequence, adjust the information decay weight, calculate the text feature distance, build the topic relevance matrix and update the topic boundary; Specifically, for the interruption mark 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.

[0057] For example, for the conversation interruption mark sequence, the information weight is adjusted according to the exponential decay rule, and the formula is: , where t is the duration of the interruption and δ is the decay coefficient, set to 0.02. For example, the weight of a record left unanswered for 6 hours is reduced to 0.82, and for 24 hours to 0.45. If a cancellation or block is detected, the weight is directly reduced to 0.25. Text content is extracted from the interruption location, and a convolutional neural network is 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 "cancellation application" increases to 0.75, indicating a topic shift. A topic relevance matrix is constructed based on these distance values, with the matrix elements reflecting 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 falls below 0.5, for example, from "service complaint" to "cancellation" it drops to 0.38, the system re-divides the topic boundaries into three intervals: "quality feedback-complaint-cancellation."

[0058] Update the conversation state vector based on the topic relevance matrix, incorporating user sentiment and interruption risk information; Specifically, for the conversation interruption marker sequence, an information decay weight correction value is 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 log. A convolutional neural network is used to calculate the distance between text features and construct a topic relevance matrix. Using this topic relevance matrix, a sliding window method is used to re-divide the topic boundaries, and the conversation state vector is updated based on the text relevance values.

[0059] For example, based on the topic relevance matrix, a normalized process generates an updated conversation state vector. This vector incorporates dimensions such as the current topic type, user sentiment, and interruption risk. For example, 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 interval and intent strength. This vector provides a precise reference for subsequent response generation, ensuring that the response content closely matches the user's current state.

[0060] Step S5 reads the current input SMS and feedback SMS records from the SMS database. Conditional random fields are used to extract semantic features from the feedback SMS, including complaint unsubscription, interception flags, and response timeout flags, to construct a user intent matrix. Based on the user intent matrix, feature values for the three dimensions of user unsubscription, interception, and response timeout are extracted. The difference between the feature values for each dimension 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, dynamic programming is used to calculate the time interval between adjacent feedback records to obtain a conversation interruption marker sequence. For the conversation interruption marker sequence, information decay weight correction values are calculated using an exponential decay rule to generate a weight adjustment vector. Based on the weight adjustment vector, text content at corresponding locations is extracted from the feedback SMS records. 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 topic boundaries, and the conversation state vector is updated based on the text relevance values. In this embodiment of the present application, by analyzing the user's reiterated intent, such as complaint, unsubscription, interception, or response timeout, information weights are dynamically optimized and topic boundaries are adjusted to ensure that the conversation state is consistent with the user's current needs. This step improves context management capabilities in complex interaction scenarios through multi-dimensional intent analysis and weight adjustment. The specific implementation method is set by technical personnel based on scenario requirements.

[0061] 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 demarcation significantly improve conversation coherence in interrupted scenarios. For example, in a logistics scenario, when a user shifts from "delivery inquiry" to "complaint about delays," the system identifies six highly relevant records, with 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.

[0062] Furthermore, step S6 includes: Identify topic switch markers from conversation logs, calculate the switching frequency within the time window, and construct a high-frequency switching identification matrix; Specifically, conditional random fields are used to identify topic switch markers from conversation logs, the switching frequency within the time window is calculated, and a high-frequency switching identification matrix is constructed.

[0063] For example, continuous conversation text sequences are extracted from the dialogue management log, and the conditional random field algorithm is used to mark the topic transition nodes and identify topic switching markers. For example, in a product consultation scenario, the 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 and calculates the switching frequency to be 2.67 times / hour. Based on the difference between the switching frequency and the baseline value of 2 times / hour, the system marks the amplitude of the topic change. If the frequency exceeds 4 times / hour, it is considered a high-frequency switch. A high-frequency switch identification matrix is constructed based on the time series characteristics, and the matrix elements reflect the switching intensity in each time period. This process provides data support for drift risk assessment through precise topic labeling and frequency analysis.

[0064] Combine user behavior data to calculate the difficulty of conversation connection and generate an interruption recovery feature matrix; Specifically, the difficulty of dialogue connection is calculated by combining user behavior data, and a gated recurrent unit network is used to generate an interruption recovery feature matrix.

[0065] For example, user unsubscribe, interception, and timeout response data are extracted from historical conversation records to calculate the difficulty of conversation connection. For example, in an after-sales scenario, a user reported a "product quality problem" but received no response for 48 hours and submitted two complaints. The system calculated the connection difficulty value to be 0.82, reflecting 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 the update gate and reset gate mechanism. For example, when a user mentions "previously reported problems," the network identifies it as referring to a "signal abnormality" complaint 72 hours ago, with an association probability of 0.78. An interruption recovery feature matrix is constructed based on the probability value, which captures the semantic continuity of the conversation before and after the interruption. This process enhances the accuracy of context recovery in interruption scenarios.

[0066] Extract the semantic features of the conversation fragment, calculate the degree of topic deviation, and generate the context-related weight vector; Specifically, a sliding window is used to extract the semantic features of the conversation fragment, calculate the degree of topic deviation, and generate a context-related weight vector.

[0067] Exemplarily, for the interruption recovery feature matrix, a fixed-length sliding window is set, for example, containing 5 records, and the semantic features of the conversation segments within the window are extracted. The system uses the cosine similarity algorithm to calculate the degree of topic offset between adjacent segments. For example, the offset from "online complaints" to "cancellation applications" increases from 0.25 to 0.75, indicating a topic break. Segments with an offset lower than 0.3 are considered highly correlated and generate high weight values. A context-related weight vector is generated based on the offset degree, and the vector elements reflect the semantic continuity of the conversation segments. For example, in the complaint scenario, the weight vector prioritizes records related to "quality issues" with a weight value of 0.85. This process optimizes context references through dynamic weight allocation.

[0068] Construct a semantic tree structure to generate a semantic drift risk assessment matrix and a dialogue association sequence that adapts to the interruption scenario; For example, a deep neural network is used to extract intent features from the current input text message. For example, if a user sends "poor quality, request a refund", the "complaint" and "refund" intentions are identified and a feature vector is generated. The system constructs an intent matching matrix, calculates the strength of association with historical records, and uses the "complaint" intent with the highest strength as the root node of the semantic tree. The child nodes are sorted in descending order of strength, including "refund request" and "after-sales service". The semantic tree clearly shows 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, which comprehensively considers switching frequency, interruption duration, and recovery difficulty. For example, the drift risk value of the complaint scenario is 0.89, which exceeds the threshold of 0.7. The system retains the last five rounds of highly correlated records and generates a dialogue association sequence to ensure that the reply content is consistent with the user's request.

[0069] By analyzing topic switching and the difficulty of interruption recovery in conversation logs, combined with the current conversation state, we dynamically assess the risk of topic drift and generate highly coherent contextual output. This step uses multidimensional feature extraction and semantic modeling to address conversation interruptions caused by user unsubscriptions, blockages, or extended periods of inactivity. The specific implementation method is flexibly configured based on the actual scenario.

[0070] Furthermore, step S6 further includes: The frequency of topic switching is extracted from the conversation log, and the correlation between historical information and the current text message is calculated. The weighted sum is used to obtain the drift risk value. The length of the historical information sequence is selected based on the drift risk value. The intent of the input text message is extracted, and the historical information is matched to generate an association matrix. The association matrix is used to parse the text message to construct a semantic tree, and the context-related output result adapted to the interruption scenario is obtained.

[0071] Using a gated recurrent unit network and semantic tree modeling, the system accurately captures the dynamic characteristics of topic switching and interruption recovery. For example, in a logistics scenario, a user screened four key records from "delivery inquiry" to "complaint delay," reducing drift risk to 0.62 and achieving contextual coherence of 0.87. Compared to traditional fixed-window methods, this method significantly improves the conversational experience in interrupted scenarios through multi-layer semantic analysis and dynamic weight adjustment, providing users with more precise responses.

[0072] Specifically, the above steps include: Continuous conversation text is extracted from conversation log records, and the conditional random field is used to mark the topic transition nodes. A fixed-length time window is set to calculate the number of transitions per unit time to obtain the conversation topic switching frequency value.

[0073] According to 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.

[0074] Based on text similarity and topic switching frequency, a linear weighted approach is used to calculate the topic drift risk value. The retention length of historical records is then selected based on the risk value. Based on the historical records, a deep neural network is used to identify user intent from the current incoming text message, extract the intent feature vector, and construct an intent matching matrix.

[0075] According to the intention 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.

[0076] Based on the root node of the semantic tree, subnodes are constructed in descending order of association strength to generate a multi-level semantic tree structure. The complete path is extracted from the semantic tree structure, and a context association sequence is generated according to the node hierarchical relationship.

[0077] Furthermore, step S7 includes: Extract key semantic tags from conversation fragments, construct conversation topic chains, and calculate text coherence values; Specifically, a conditional random field is used to extract key semantic tags from conversation segments, construct conversation topic chains, and calculate text coherence values. More specifically, conversation segments are extracted from the context-related output sequence, and a conditional random field is used to identify key semantic tags, construct conversation topic chains, and calculate text coherence values between adjacent conversation segments.

[0078] For example, conversation segments are extracted from the context-related output sequence, and a conditional random field algorithm is used to identify key semantic tags, such as topic keywords such as "price-configuration-after-sales service." In a product consultation scenario, the user switches from "phone performance" to "price consultation" and then to "after-sales service policy." The system constructs a conversation topic chain containing these tags and calculates the coherence of adjacent segments. Coherence is assessed using cosine similarity; a coherence above 0.78 indicates a smooth topic transition. This process ensures the accuracy of subsequent feature extraction through precise semantic annotation.

[0079] Extract the semantic features of historical citation records, generate a multi-round dialogue semantic feature matrix, and analyze dialogue continuity; Specifically, a long short-term memory network is used to extract the semantic features of historical citation records, generate a multi-round dialogue semantic feature matrix, and analyze dialogue continuity.

[0080] For example, based on the text coherence value and coherence representation vector, a long short-term memory network is used to process historical reference records. The network captures long-term dependencies in the conversation through the forget gate, input gate, and output gate mechanism. For example, in the after-sales scenario, the user mentions "previously unresolved quality issues." The network extracts historical records related to "quality-complaints" and generates a semantic feature matrix. Each row of the matrix corresponds to the feature vector of a record, which contains topic, sentiment, and intent information. The distribution of feature vectors in the matrix is analyzed to evaluate the continuity of the conversation. If the average similarity between feature vectors is higher than 0.75, the continuity is strong. This process enhances the accuracy of historical information citation through deep semantic modeling.

[0081] Calculate the semantic relevance of conversation records, generate relevance sequences, and filter out highly relevant records; Specifically, the semantic relevance of conversation records is calculated by setting a sliding window, a relevance sequence is generated, and high-relevance records are screened.

[0082] Exemplarily, for the semantic feature matrix, a sliding window of fixed size is set, for example, containing 3 records, and the cosine similarity of adjacent records in 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", the topic shift is identified. Set a threshold of 0.65 to filter out records with relevance below the threshold and retain highly relevant content. For example, in a complaint scenario, records directly related to the "refund process" are retained, and early irrelevant "product consultation" content is eliminated. This process optimizes the compactness of the reference sequence through dynamic screening.

[0083] Retrieve matching reply text and generate target conversation reply text; Specifically, matching reply texts are retrieved from the library of alternative reply templates, and the target dialogue reply text is generated after optimizing the sorting.

[0084] For example, based on the relevance sequence, a semantic consistency vector is constructed to reflect the semantic weight of the retained record. The system retrieves matching text from the alternative response template library, which contains predefined responses for various scenarios, such as "refund process description" or "solution suggestion". In the complaint scenario, the user expresses the demand of "refund not processed", and the refund process text with a matching degree of 0.89 and the time commitment text with a matching degree of 0.77 are retrieved. The matching score S is calculated by the weighted sorting algorithm, and the formula is: , where M is the matching degree, C is the coherence, and α is set to 0.6 to generate the initial response sequence. The text with the highest matching degree is selected and historical semantic features are incorporated, such as supplementing the specific question description, to form the target response text to ensure that the response is direct and coherent.

[0085] Step S7 extracts conversation segments from the context-related output sequence, uses conditional random fields to identify key semantic tags, constructs conversation topic chains, and calculates text coherence values between adjacent conversation segments. Based on the text coherence values and the coherence representation vector, a recursive neural network extracts semantic features from historical reference records to generate a multi-turn conversation semantic feature matrix. A fixed-size sliding window is set for the semantic feature matrix, and the cosine similarity of adjacent conversation records within the window is calculated to obtain a text relevance sequence. Based on the text relevance sequence, the historical reference records are filtered and selected, retaining conversation records with relevance values above a preset threshold to construct a semantic consistency vector. Using the semantic consistency vector, the highest-matching reply text is retrieved from a library of candidate reply templates to generate an initial reply text sequence. Semantic relevance is calculated for the initial reply text sequence, and the text is sorted by relevance value to obtain a sorted reply text sequence. Based on the sorted reply text sequence, the text with the highest ranking value is extracted to generate the target conversation reply text.

[0086] By combining context-related output and coherence representation, the semantic features of historical reference sequences are analyzed, and through multi-layer semantic processing and template matching, a reply text that is highly consistent with the user's intent is generated. This step solves the problem of topic deviation in interruption scenarios through dynamic semantic analysis and reply optimization. The specific implementation method is configured by technical personnel based on the actual scenario. Through the combination of long-short-term memory networks and sliding windows, the semantic dynamics of the conversation are accurately captured. Template matching and weighted sorting further optimize the quality of replies. For example, in a logistics scenario, a user inquires about "delivery delay compensation." Four highly relevant records are selected from 12 historical records to generate a reply with a coherence of 0.86. Compared with traditional static reply methods, this method improves the targeted nature of replies and user experience through multi-layer semantic analysis and dynamic optimization.

[0087] Furthermore, this application also provides an AI iteration system for SMS content based on user feedback, including: The SMS data extraction module is used to extract the content of the user's current SMS and historical SMS records, extract keyword distribution characteristics and reference content offsets, and generate an initial context coherence representation; it also determines whether there is a conversation interruption scenario based on the timestamp sequence; The interruption scenario judgment module is used to detect the conversation interruption and restart scenario, calculate the semantic drift degree between the current input text message and the historical reference content, and trigger a dynamic adjustment strategy if it exceeds the preset semantic drift rate threshold to determine the optimized topic boundary range; The semantic drift processing module is used to prioritize historical SMS records based on the optimized topic boundary range, combined with the duration of conversation interruptions and information decay weights, using a weighted sorting algorithm to generate an optimized reference content sequence. The citation sequence optimization module is used to analyze the semantic similarity between the current input text message and historical 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 analyzes the user's intent reiteration in real-time input text messages and AI feedback text messages, dynamically adjusts information decay weights, re-divides topic boundaries, and generates an updated conversation state vector. The dialogue state update module extracts topic switching frequency and context recovery difficulty from multi-round dialogue management logs, combines them with the updated dialogue state vector, calculates the topic drift risk value, and generates context-related output results adapted to the interruption scenario; The reply generation module is used to generate the target dialogue reply text based on the context-related output results and enhanced coherence representation, process the optimized historical reference sequence to ensure the semantic consistency of the reply content.

[0088] In the description of this application, it should be understood that the directions or positional relationships indicated by directional words such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" are usually based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description. Unless otherwise specified, these directional words do not indicate or imply that the device or element referred to must have a specific direction or be constructed and operated in a specific direction. Therefore, they cannot be understood as limiting the scope of protection of this application.

[0089] Those skilled in the art can make various other corresponding changes and deformations based on the technical solutions and concepts described above, and all of these changes and deformations should fall within the scope of protection of the claims of this application.

Claims

1. An AI iterative method for SMS content based on user feedback, characterized in that: The following steps are involved: S1. Extract keyword distribution features and reference content offsets based on the user's current SMS content and historical SMS records to generate an initial contextual coherence representation. Determine whether there is a dialogue interruption scenario based on the timestamp sequence; S2. If a conversation interruption and restart scenario is detected, the semantic drift degree between the current input text message and the historical reference content is calculated. If it exceeds the preset semantic drift rate threshold, a dynamic adjustment strategy is triggered to determine the optimized topic boundary range; S3. Based on the optimized topic boundary range, combined with the conversation interruption duration and information decay weight, a weighted sorting algorithm is used to prioritize historical SMS records to generate an optimized reference content sequence; S4. Based on the optimized historical reference sequence, the semantic similarity between the current input SMS and the historical content is analyzed, the information retention weight is dynamically adjusted, and an enhanced contextual coherence representation is generated; S5. Analyze the user's intent reaffirmation in the real-time input SMS and AI feedback SMS, dynamically adjust the information decay weight and re-divide the topic boundaries to generate an updated conversation state vector. S6. Extract topic switching frequency and context recovery difficulty from multi-round dialogue management logs, combine them with the updated dialogue state vector, calculate the topic drift risk value, and generate a context association output result adapted to the interruption scenario; S7. Based on the context-related output results and enhanced coherence representation, the optimized historical reference sequence is processed to ensure the semantic consistency of the reply content and generate the target dialogue reply text.

2. The SMS content AI iteration method based on user feedback according to claim 1 is characterized in that: The step S1 comprises: Based on the content of the current SMS input by the user and the historical SMS records, word segmentation technology is used to extract the word sequence, and the word distribution position is counted through a sliding window to obtain the word interval point position data; Constructing a keyword distribution density matrix and calculating a semantic dispersion index; comparing the semantic dispersion index with a preset semantic dispersion threshold to obtain a semantic weight value; For text messages whose semantic dispersion index is lower than the preset threshold of semantic dispersion, the subject word sequence is extracted, and the semantic similarity is calculated to generate a context association vector; Extract the timestamp sequence from historical SMS records and calculate the time difference between adjacent SMS messages. If the difference exceeds the preset time threshold, it is determined to be a conversation interruption scenario. For the text messages before and after the interruption point, the conversation coherence scoring matrix is constructed by combining the context relevance vector and semantic weight, and the context coherence index value is calculated.

3. The SMS content AI iteration method based on user feedback according to claim 1 is characterized in that: The step S2 comprises: Extract the current input SMS and historical records from the SMS database and generate a conversation interruption status mark; For the interruption status mark, the topic feature vector of the current input SMS is extracted, a semantic similarity matrix is constructed, and the semantic drift rate is calculated to determine whether dynamic adjustment should be triggered; Based on the semantic drift rate, the topic boundary range is optimized and the adjusted topic boundary threshold interval is generated; According to the adjusted topic boundary threshold interval, an optimized semantic association sequence is generated.

4. The SMS content AI iteration method based on user feedback according to claim 1 is characterized in that: The step S3 comprises: Extract the interruption timestamp sequence from the historical SMS records, calculate the information decay weight, and generate the initial weight mark sequence; Extract text feature vectors of historical SMS messages, construct a semantic similarity matrix, and calculate the comprehensive priority score; Generate a descending sequence of historical records, removing low-relevance records.

5. The SMS content AI iteration method based on user feedback according to claim 1 is characterized in that: The step S4 comprises: Extract the keyword feature matrix of the current input text message, calculate the semantic similarity with the historical reference sequence, and generate a semantic matching vector; For records whose semantic matching degree is lower than the preset semantic matching degree threshold, the retention probability is evaluated, the information importance is calculated based on the word frequency characteristics, and the citation content weight matrix is generated; A sliding window is used to calculate the text correlation between historical records, dynamically adjust the retention weight, and generate a dynamic weight adjustment vector.

6. The SMS content AI iteration method based on user feedback according to claim 1 is characterized in that: The step S5 comprises: Extract real-time input SMS and feedback records from the SMS database, extract user intent features, and construct a user intent matrix; Calculate the difference between the eigenvalue of each dimension in the intent matrix and the baseline intent threshold to generate an intent deviation vector. Combined with the timestamp sequence, identify the conversation interruption marker. For the interruption mark sequence, adjust the information decay weight, calculate the text feature distance, build the topic relevance matrix and update the topic boundary; The conversation state vector is updated based on the topic relevance matrix, incorporating user emotions and interruption risk information.

7. The SMS content AI iteration method based on user feedback according to claim 1, characterized in that: The step S6 comprises: Identify topic switch markers from conversation logs, calculate the switching frequency within the time window, and construct a high-frequency switching identification matrix; Combine user behavior data to calculate the difficulty of conversation connection and generate an interruption recovery feature matrix; Extract the semantic features of the conversation fragment, calculate the degree of topic deviation, and generate the context-related weight vector; Construct a semantic tree structure to generate a semantic drift risk assessment matrix and a dialogue association sequence that adapts to the interruption scenario.

8. The SMS content AI iteration method based on user feedback according to claim 7, characterized in that: The step S6 further includes: The frequency of topic switching is extracted from the conversation log, and the correlation between historical information and the current text message is calculated. The weighted sum is used to obtain the drift risk value. The length of the historical information sequence is selected based on the drift risk value. The intent of the input text message is extracted, and the historical information is matched to generate an association matrix. The association matrix is used to parse the text message to construct a semantic tree, and the context-related output result adapted to the interruption scenario is obtained.

9. The SMS content AI iteration method based on user feedback according to claim 1, characterized in that: The step S7 comprises: Extract key semantic tags from conversation fragments, construct conversation topic chains, and calculate text coherence values; Extract the semantic features of historical citation records, generate a multi-round dialogue semantic feature matrix, and analyze dialogue continuity; Set up a sliding window to calculate the semantic relevance of conversation records, generate a relevance sequence, and filter out highly relevant records; Retrieve matching reply texts from the alternative reply template library, optimize the sorting, and generate the target conversation reply text.

10. An AI iteration system for SMS content based on user feedback, characterized in that: include: The SMS data extraction module is used to extract the content of the user's current SMS and historical SMS records, extract keyword distribution characteristics and reference content offsets, and generate an initial contextual coherence representation; Determine whether there is a dialogue interruption scenario based on the timestamp sequence; The interruption scenario judgment module is used to detect the conversation interruption and restart scenario, calculate the semantic drift degree between the current input text message and the historical reference content, and trigger a dynamic adjustment strategy if it exceeds the preset semantic drift rate threshold to determine the optimized topic boundary range; The semantic drift processing module is used to prioritize historical SMS records based on the optimized topic boundary range, combined with the duration of conversation interruptions and information decay weights, using a weighted sorting algorithm to generate an optimized reference content sequence. The citation sequence optimization module is used to analyze the semantic similarity between the current input text message and historical 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 analyzes the user's intent reiteration in real-time input text messages and AI feedback text messages, dynamically adjusts information decay weights, re-divides topic boundaries, and generates an updated conversation state vector. The dialogue state update module extracts topic switching frequency and context recovery difficulty from multi-round dialogue management logs, combines the updated dialogue state vector, calculates the topic drift risk value, and generates context-related output results adapted to the interruption scenario; The reply generation module is used to generate the target dialogue reply text based on the context-related output results and enhanced coherence representation, process the optimized historical reference sequence to ensure the semantic consistency of the reply content.

Citation Information

Patent Citations

  • Disambiguous solution using dialog search history

    CN114127710A

  • Semantic drift detection method and device, electronic equipment and storage medium

    CN116502646A

  • Automatic prompt construction method based on man-machine conversation history and semantic retrieval

    CN119441443A

  • Question and answer pair generation method and system based on large language model and data enhancement

    CN120067274A

  • Historical dialogue screening method and device for dialogue system

    CN120104735A

Cited By

  • Conference schedule-based information interaction method and device, medium and electronic equipment

    CN121210646A