A Method for Online User Needs Analysis and Classification Based on Intent Recognition

By extracting the semantic vector of user input and combining it with out-of-distribution detection and cluster analysis, the problem of insufficient novel intent recognition in existing technologies is solved, realizing dynamic expansion and high-precision recognition of intent classification models, thereby improving user experience and business adaptability.

CN123115418APending Publication Date: 2026-11-17CHENGDU INK BOX TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611301172.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies cannot accurately identify and misclassify new intents, and cannot dynamically discover and learn new intent categories, resulting in a decline in user experience and business losses.

Method used

By acquiring text data input by users, semantic vectors are extracted using a pre-trained language model. Preliminary classification is then performed using an intent classification model based on the closed set hypothesis. Match scores are recorded, and an out-of-distribution detection process is executed to label unknown intent samples. Cluster analysis and spatiotemporal consistency verification are performed periodically to screen candidate new intent clusters. The intent classification model is updated through few-shot learning or incremental learning.

Benefits of technology

It achieves accurate perception and automatic discovery of unknown intents, dynamically expands the intent category system, reduces the misclassification rate of cold start intents, ensures that the system adapts to changes in user needs, and improves business service quality and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115418A_ABST
    Figure CN123115418A_ABST
Patent Text Reader

Abstract

This invention relates to the field of intelligent dialogue technology, specifically disclosing a method for online user demand analysis and classification based on intent recognition. The method includes: acquiring user input and extracting semantic vectors; inputting the semantic vectors into a closed-set intent classification model, outputting preliminary classification results and matching scores; executing an out-of-distribution detection process, which includes detection based on multi-granularity decision boundaries of subclass centers, detection based on category prototype vector distance, and auxiliary judgment based on a large language model, comprehensively determining whether the user input is an unknown intent; recording samples marked as unknown intents in a log database, periodically performing cluster analysis, and filtering candidate new intent clusters based on dual verification of spatial and temporal consistency; after review and confirmation, updating the new intent category to the intent classification model through few-shot learning or incremental learning; overcoming the inherent limitations of the closed-set training paradigm and significantly reducing the misclassification rate of cold-start intents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent dialogue technology, and in particular to a method for analyzing and classifying online user needs based on intent recognition. Background Technology

[0002] With the rapid development of internet technology and the increasing richness of online interaction scenarios, the communication methods between users and systems are becoming more diversified and complex. Against this backdrop, intent recognition, as one of the key technologies in natural language processing, undertakes the core task of parsing users' true needs and mapping them to corresponding service categories. In essence, intent recognition technology is the process of semantically understanding the text, voice, or other forms of information input by users, and then determining the category of the user's potential intent. This technology has been widely applied in intelligent customer service, recommendation systems, voice assistants, and the search and navigation functions of various online platforms, becoming a fundamental capability supporting intelligent service experiences.

[0003] Currently, machine learning-based online user demand analysis and classification is a key research area in both industry and academia. This method typically employs deep learning models, such as Recurrent Neural Networks (RNNs), Long Short-Term Memory Networks (LSTMs), Transformer architectures, and their variants, to extract features and learn representations from user input, and then combines this with a classifier to determine the intent category. Specifically, engineers predefine a set of intent categories covering common business scenarios, and use labeled data to conduct supervised training on the model, enabling it to learn the distribution characteristics and decision boundaries of different intent categories in the semantic space. After training, the model is deployed to an online environment to classify and predict real-time user input.

[0004] Specifically, when a user's request belongs to a completely new category—a so-called cold start intent—the model cannot identify it as an unknown category because it lacks a corresponding category prototype and decision region in the feature space. In this case, the model, based on its closed-set classification logic, forcibly maps the input to the nearest known category in the feature space, thus producing an incorrect classification result. This forced classification mechanism is not an accidental individual error of the model, but rather an inherent structural flaw in the closed-set training paradigm itself.

[0005] Incorrect intent classification directly leads to mismatches in downstream service responses. For example, misclassifying a user's complaint intent as a regular inquiry might fail to trigger emergency procedures, or misclassifying a user's inquiry about a new product's features might result in an incorrect message being pushed to them, severely deviating from the user's actual needs and causing a significant decline in user experience. Furthermore, in commercial applications, misclassification can lead to inappropriate service responses, causing user churn and business losses. More critically, existing models lack the ability to perceive and adapt to unknown intents, failing to dynamically discover, record, and learn new intent categories at runtime. This makes it difficult for the system to adapt to the objective reality of continuously growing user needs over time.

[0006] To address the aforementioned issues, some improvements exist in existing technologies, such as setting classification confidence thresholds to reject low-confidence samples or employing active learning strategies to filter samples with high uncertainty for manual annotation. However, these solutions still have significant shortcomings: confidence threshold-based methods can only identify samples where the model is uncertain, but cannot distinguish whether the uncertainty stems from sample noise or a genuine new intent category, and the threshold setting lacks theoretical basis, easily leading to a large number of false positives or false negatives; while active learning methods can reduce annotation costs, they still rely on manual intervention and cannot achieve automatic discovery of new intents or autonomous model evolution. Summary of the Invention

[0007] In view of this, embodiments of the present invention provide an online user demand analysis and classification method based on intent recognition, in order to solve the problem that existing technologies are all based on closed, predefined intent categories for training; when a user exhibits a completely new intent that has never appeared in the training set, the model will forcibly classify it into an existing incorrect category, resulting in a significant drop in accuracy.

[0008] This invention provides a method for analyzing and classifying online user needs based on intent recognition, including: S1: Obtain text data input by online users, preprocess the text data, and then use a pre-trained language model to extract the semantic vector representation of the text data;

[0009] S2: Input the semantic vector into the intent classification model pre-trained based on the closed set hypothesis, calculate the matching score of the user input to each known intent category, select the intent category with the highest matching score as the preliminary classification result, and record the matching score;

[0010] S3: Based on the matching score and the semantic vector, perform an out-of-distribution detection process to determine whether the user input belongs to a known intent category; when it is determined that it does not belong to any known intent category, mark the user input as an unknown intent sample;

[0011] S4: Record samples marked as unknown intents to the log database, periodically perform cluster analysis on the accumulated unknown intent samples, and select candidate new intent clusters from the clustering results based on spatiotemporal consistency verification.

[0012] S5: Review and confirm the candidate new intent cluster, and update the confirmed new intent category to the intent classification model through few-shot learning or incremental learning, so that the intent classification model can recognize the new intent category.

[0013] The online user demand analysis and classification method based on intent recognition provided by this invention has the following beneficial effects: In this invention, after acquiring user input and extracting semantic vectors, a closed-set classification model outputs preliminary classification results and confidence levels. Then, a three-level out-of-distribution detection process is executed, including multi-granularity decision boundary detection based on subclass centers, category prototype vector distance detection, and large language model-assisted judgment. Inputs determined not to belong to known categories are marked as unknown intent samples and recorded in a log database. The accumulated unknown intent samples are then periodically clustered, and candidate new intent clusters are screened based on dual checks of spatial and temporal consistency. After review and confirmation, new intents are processed through few-shot learning or incremental learning. The category is updated to a classification model, thus realizing a closed-loop process from accurate perception and automatic discovery of new intents to dynamic model evolution. This fundamentally breaks through the inherent limitations of the closed set assumption on intent recognition capabilities, enabling the model to maintain high-precision classification of known intents while possessing the ability to proactively discover and continuously learn unknown intents. This significantly reduces the misclassification rate of cold-start intents and ensures that the system can adaptively expand the intent category system as user needs dynamically evolve. As a result, it provides more accurate and comprehensive intent tag support for downstream tasks such as intelligent question answering and precise recommendation, effectively guaranteeing the service quality and user experience of online businesses. Attached Figure Description

[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, and these are all within the protection scope of the present invention.

[0015] Figure 1 This is a flowchart of an online user needs analysis and classification method based on intent recognition. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, in this document, relational terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. In the description of the present invention, it should be understood that the orientation or positional relationships indicated by terms such as center, up, down, front, back, left, right, vertical, horizontal, top, bottom, inside, and outside are based on the orientation or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, the term "includes" or any other variation thereof is intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, the inclusion of a defined element by a statement does not preclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Where there is no conflict, embodiments of the present invention and the various features thereof can be combined with each other, all of which are within the scope of protection of the present invention.

[0017] Example 1 Please see Figure 1 This invention provides a method for analyzing and classifying online user needs based on intent recognition, comprising the following steps: S1: Obtain text data input by online users, preprocess the text data, and then use a pre-trained language model to extract the semantic vector representation of the text data; Specifically, in educational application scenarios, the online users include, but are not limited to, students, parents, teachers, and education administrators; the text data originates from various channels such as student questions on online learning platforms, user inquiries through intelligent Q&A systems, discussion posts in course forums, user feedback on education service platforms, and student questions in enrollment consultation scenarios. Taking an online learning platform as an example, when students encounter difficulties during their studies, they can input their questions through the platform's built-in Q&A portal, and the system will acquire this text data in real time as user input to be processed.

[0018] The preprocessing includes operations such as text cleaning, word segmentation, and stop word removal. Text cleaning is used to remove noise information such as special characters, emojis, redundant spaces and irrelevant punctuation in the text; for the characteristics of Chinese text, the word segmentation process uses a dictionary-based or statistical model-based word segmentation tool to split the continuous Chinese character sequence into a meaningful word sequence; stop word removal filters out high-frequency function words with low semantic contribution such as "de", "le", "ma", etc., so as to reduce the dimension of the feature space. Taking the student input "Teacher, how do I solve this math problem?" as an example, a word sequence of "Teacher / Excuse me / this / math problem / how / solve" is obtained after preprocessing.

[0019] The pre-trained language model may adopt deep pre-trained models based on the Transformer architecture such as BERT, RoBERTa, and ERNIE. Specifically, the preprocessed text data is input into the pre-trained language model, after multi-layer self-attention encoding by the model, the output vector of the <[BOS_never_used_51bce0c785ca2f68081bfa7d91973934]> token in the last hidden layer is taken as the semantic vector representation of the entire input text, or a fixed-dimensional sentence-level semantic vector is obtained by performing a pooling operation on the output vectors of each token. The semantic vector represents the deep semantic information of the user input text in the form of a high-dimensional floating-point vector, and provides a numerical input for subsequent intent classification. In one embodiment, a Chinese BERT pre-trained model is adopted, which has an output dimension of 768 dimensions, that is, each user input is converted into a 768-dimensional semantic vector.

[0020] S2: Input the semantic vector into the intent classification model pre-trained based on the closed-set assumption, calculate the matching score of the user input belonging to each known intent category, select the intent category with the highest matching score as the preliminary classification result, and record the matching score; Specifically, the closed-set assumption refers to that: in the model training stage, a limited number of known intent category sets are predefined, and the model performs classification prediction only within the range of these limited categories. In the educational application scenario, the known intent categories can be designed according to actual business requirements. Taking the intelligent question-answering system of an online education platform as an example, the known intent categories may include: knowledge point query type (such as "What formula is used for this problem"), homework help type (such as "How do I do this homework problem"), course consultation type (such as "What content does this course cover"), platform operation type (such as "How to submit homework"), learning suggestion type (such as "How to improve learning efficiency"), etc.

[0021] The intent classification model can employ a classifier based on a deep neural network. Its input layer receives the semantic vector, which is then transformed through a fully connected layer and a non-linear activation function. Finally, the model outputs a probability distribution of the user input belonging to each known intent category via a Softmax function; this probability value is the matching score. For example, if a student inputs "how to solve this math problem," the model's matching score might be: 0.85 for knowledge point questions, 0.10 for homework help, 0.03 for course inquiries, and 0.02 for other categories.

[0022] Then, the intent category with the highest matching score is selected as the preliminary classification result, and this matching score is recorded. For example, in the example above, the category with the highest matching score is the knowledge point question category, with a matching score of 0.85. The system uses this category as the preliminary classification result and records the matching score of 0.85 along with the semantic vector for use in subsequent out-of-distribution detection processes. The matching score reflects the model's confidence in the current classification result; a higher score indicates that the model is more certain that the user input belongs to the corresponding intent category.

[0023] S3: Based on the matching score and the semantic vector, perform an out-of-distribution detection process to determine whether the user input belongs to a known intent category; when it is determined that it does not belong to any known intent category, mark the user input as an unknown intent sample; Based on the matching score and semantic vector recorded in step S2, an out-of-distribution (OOD) detection process is performed to determine whether the user input belongs to a known intent category. The purpose of out-of-distribution detection is to identify user inputs that do not belong to any predefined known intent category; these inputs may express new needs, new question types, or user intents in new scenarios that were not anticipated during system design. In educational scenarios, with updates to course content, changes in teaching methods, or changes in student needs, new intent types that were not covered in the initial system design often emerge. For example, when a platform launches a new AI-assisted programming teaching function, students may ask new questions such as how to use AI to help them debug code; this intent may not exist in the original classification system.

[0024] Specifically, the out-of-distribution detection process can integrate multiple detection strategies: threshold judgment based on matching score (when the highest matching score is lower than a preset low confidence threshold, it is initially suspected to be an unknown intent); calculating the distance between the semantic vector and the distribution center of each known category sample in the feature space based on the distance metric of the semantic vector in the feature space, if the distance exceeds the corresponding threshold, it is determined to be unknown; and multi-granularity decision boundary detection based on subclass centers and auxiliary judgment based on large language models, etc. When the above detection process determines that the user input does not belong to any known intent category, the user input is marked as an unknown intent sample, and data is accumulated for the subsequent new intent discovery process. For example, when a student inputs which programming languages ​​this AI programming assistant can recognize, if the question does not belong to any known intent category and the out-of-distribution detection process determines it to be unknown, it is marked as an unknown intent sample for subsequent processing.

[0025] S4: Record samples marked as unknown intents to the log database, periodically perform cluster analysis on the accumulated unknown intent samples, and select candidate new intent clusters from the clustering results based on spatiotemporal consistency verification. The samples marked as having unknown intent in step S3 are recorded in the log database. Each log record contains at least the original text input by the user, the corresponding semantic vector, a timestamp, and user source information (such as user identification, access channel, etc.). These log data are accumulated and stored in chronological order to form the original dataset of unknown intent samples.

[0026] The system periodically performs cluster analysis on accumulated unknown intent samples. Specifically, the system triggers a clustering task according to a preset time period (e.g., daily at midnight or at a fixed time each week): it extracts the semantic vectors of all unknown intent samples accumulated within the current period from the log database, and uses density-based clustering algorithms (such as DBSCAN) or partition-based clustering algorithms (such as K-means) to group semantically similar samples into the same candidate cluster. The purpose of cluster analysis is to automatically aggregate unknown samples that express similar semantics and reflect the same potential new intents, so as to extract valuable new intent candidates from a large number of scattered unknown samples. In educational scenarios, for example, if a large number of students inquire about how to prevent cheating in an online examination system at a certain time, these semantically similar unknown samples will be clustered into the same candidate cluster, indicating the possible existence of a new intent category: exam anti-cheating consultation.

[0027] This application employs a spatiotemporal consistency verification mechanism to screen candidate new intent clusters from clustering results. In the clustering analysis of unknown intent samples, a single clustering result is often affected by various factors such as algorithm initialization randomness, clustering parameter selection, data noise, and imbalanced sample distribution. Relying solely on a single clustering to form candidate new intent clusters can easily misclassify noisy samples or occasional anomalous expressions as valid new intent categories, and may also miss some valid samples that are at the cluster boundaries. Therefore, this application introduces a spatiotemporal consistency verification mechanism, performing dual verification of the clustering results from two orthogonal perspectives: spatial and temporal dimensions. This ensures that the selected candidate new intent clusters have clear semantic boundaries in the feature space and stable persistence over time, thereby significantly improving the quality and reliability of new intent discovery.

[0028] Spatial consistency verification is used to evaluate the clustering quality and boundary clarity of samples within the same candidate cluster in the feature space. After clustering, for each sample in each candidate cluster, the system calculates the relative positional relationship between the sample and its cluster center. Specifically, suppose there are m samples in candidate cluster C, and its cluster center vector is . For each sample in cluster C, calculate its distance to the cluster center, and the proportion of its K nearest neighbors belonging to the same cluster C. The spatial consistency score is calculated using a multi-factor weighted method: , where represents the proportion of the K nearest neighbors belonging to the same cluster (K ​​can be selected between 5 and 15, preferably K=10), represents the distribution of the distance to the cluster center relative to the distances of all samples in the cluster to the center (i.e., the complement of the standardized distance; the closer the distance, the higher the score), and is the weighting coefficient (values ​​from 0.5 to 0.7). When the value is lower than a preset threshold (e.g., 0.6), the sample is determined to be a cluster edge sample or an outlier. Taking the education scenario as an example, among 120 samples of AI grading function consultation in a candidate cluster, the spatial consistency scores of 95 samples in the core area were all higher than 0.85, while the scores of 15 samples at the boundary (involving complaints such as slow grading speed, which are semantically closer to the platform feedback category) were lower than 0.5. Based on this, the system marked these boundary samples as low-quality samples.

[0029] Secondly, the system also calculates the overall spatial density index for each candidate cluster to measure the semantic consistency of the entire cluster. The overall spatial density is the average distance from all samples within the cluster to the cluster center. For all candidate clusters in the original clustering results, their values ​​are calculated and normalized. Clusters with values ​​exceeding a preset threshold (e.g., 1.5 times the upper quartile of the D-value distribution of all clusters) are judged as too loose and lacking sufficient semantic consistency, and are directly eliminated from subsequent screening processes. For example, if the average intra-cluster distance of a candidate cluster is significantly greater than that of other clusters, it indicates that the semantic differences among samples within that cluster are large, potentially mixing multiple latent intents or containing too much noise, making it unsuitable as a candidate for an independent new intent category.

[0030] Furthermore, temporal consistency checks are used to assess the degree to which unknown samples are stably clustered into the same group over time, in order to distinguish between genuine emerging new intentions and sporadic, one-off noise samples.

[0031] Specifically, the system performs cluster analysis within multiple time windows. Assuming the clustering tasks are executed periodically at a time period T (e.g., daily or weekly), in the t-th clustering task, the unknown samples accumulated within the current time window are divided into several candidate clusters, and each sample is assigned a cluster number. For a specific sample, the system records the sequence of cluster numbers assigned to it in multiple consecutive clustering tasks (e.g., the most recent 7), where T is the number of clustering tasks participating in the consistency test. The sample's numbers in each clustering may be the same or different. Based on this, the temporal consistency score of the sample is calculated. In one preferred approach, the maximum co-occurrence ratio method is used: the cluster number with the highest frequency and its occurrence count are statistically analyzed, and the proportion in which the sample is most frequently assigned to a cluster in multiple clusterings is calculated. In another preferred approach, Normalized Mutual Information (NMI) or the RAND index is used to measure the degree of consistency between multiple clustering assignments, to more comprehensively distinguish between different situations such as always being in the same cluster, stable switching between different clusters, and random assignment.

[0032] Furthermore, the temporal consistency check extends to the cluster level to assess the continuous evolution trend of candidate clusters over time. The system tracks the sample size change trajectory of each candidate cluster within consecutive time periods and calculates the cluster's persistence and growth indicators: the persistence indicator is the percentage of times the cluster appears continuously in the most recent N time periods. If a cluster appears only in one period and then disappears, its persistence is extremely low, possibly corresponding to sporadic topic discussions rather than stable new intentions; the growth indicator is the growth rate of the cluster's sample size within a recent time window. If a cluster's sample size continues to grow in the most recent 3 periods and the cumulative sample size exceeds a threshold (e.g., 50), it is determined to have a significant growth trend. Taking the education scenario as an example, when an online learning platform launched its course selection system at the beginning of the semester, a large number of students inquired about course selection-related issues. In cluster analysis over several consecutive days, the system identified a cluster with consistent core semantics (mainly including keywords such as course selection time, course selection process, and course capacity). The temporal consistency score of this cluster was as high as 0.92, and the sample size increased day by day, indicating that this was a new intention demand that was emerging in a real and continuously growing manner, rather than an occasional isolated question.

[0033] After calculating the evaluation indicators for both spatial and temporal dimensions, the system performs a comprehensive evaluation of each sample and each cluster.

[0034] For each sample, a comprehensive consistency score is calculated, where represents the spatial dimension weight (ranging from 0.4 to 0.6, preferably 0.5). The system performs initial screening based on the sample-level comprehensive score: samples with scores between 0.65 and 0.75 are retained, while low-quality and noisy samples with scores below the threshold are removed. Based on this, each candidate cluster undergoes a secondary evaluation, resulting in a cluster-level comprehensive score, where is the mean of the comprehensive scores of all samples within the cluster, is the cluster growth trend score (normalized to the 0-1 range based on the sample size growth rate), is the cluster persistence score (based on the frequency of occurrence over a continuous time period), and is the weighting coefficient (ranging from 0.5 to 0.7, preferably 0.6). The system removes candidate clusters with scores below a preset threshold (e.g., 0.7), retaining those with comprehensive scores above the threshold as high-quality candidate new intent clusters. Samples from these high-quality clusters constitute a high-quality pseudo-label sample set for candidate new intent clusters, used for subsequent manual review and confirmation.

[0035] Taking an online education platform as an example, the system accumulated approximately 2000 unknown samples over 7 consecutive days. These were initially clustered into 12 candidate clusters. Candidate cluster C3 contained approximately 180 samples, with semantics revolving around AI essay correction-related inquiries (e.g., how AI correction works, how accurate it is, and whether it supports IELTS essay correction). Spatial consistency verification revealed that approximately 160 samples in C3 had spatial consistency scores higher than 0.8, and the overall cluster density D(C3) = 0.28, significantly better than the average density of 0.42 for all candidate clusters, indicating that this cluster is tightly clustered in the feature space and has high semantic consistency. Temporal consistency verification showed that cluster C3 consistently appeared in the last 7 daily clustering tasks, with an average temporal consistency score of 0.89 for samples within the cluster, and the sample size increased significantly from 12 on day 1 to 56 on day 7. After considering both spatiotemporal consistency scores, the cluster-level comprehensive score of C3 far exceeded the threshold, and the system automatically selected it as a priority candidate cluster for new intents. Meanwhile, another candidate cluster, C7, although containing 96 samples, had a spatial consistency score of only 0.45, indicating poor cluster density, and a temporal consistency score of only 0.32, appearing only twice in the last 7 clusterings. Its overall score of 0.41 led the system to classify it as an occasional noise cluster and remove it. Through dual verification of spatiotemporal consistency, three high-quality candidate new intent clusters were ultimately selected from the 12 initial candidate clusters, corresponding to three real emerging new intent needs: AI essay correction consultation, online course selection guide, and certificate authentication query. These clusters contained a total of 410 samples, of which 382 were correctly labeled after manual review, achieving an accuracy rate of 93.2%. This is a significant improvement over the direct review method based solely on a single clustering (historically, the accuracy rate was approximately 78%), greatly reducing the cost of manual review and avoiding misclassification of noise or occasional topics as new intent categories. This provides a high-quality training data foundation for small-sample or incremental learning of new intent categories.

[0036] S5: Review and confirm the candidate new intent cluster, and update the confirmed new intent category to the intent classification model through few-shot learning or incremental learning, so that the intent classification model can recognize the new intent category.

[0037] Specifically, the review and confirmation can be conducted manually or semi-automatically: business experts or operations personnel label and categorize representative samples in each candidate new intent cluster to determine whether the cluster truly represents a meaningful and independent new intent category. In an educational scenario, education experts or product operations personnel can review student question samples within the cluster to confirm whether these questions reflect a new user need not yet covered by the system. For example, if samples in a candidate cluster all revolve around how to apply for an online learning certificate, after review and confirmation, it can be defined as a new intent category: certificate application consultation. The review and confirmation also includes assigning standardized category names and semantic descriptions to the new intent category, and collecting a small number of representative labeled samples for subsequent model updates.

[0038] The few-shot learning approach utilizes a small number of labeled samples collected during the review and confirmation phase (typically only 5 to 20 samples per new category). Through methods such as prototype networks based on metric learning, it calculates the prototype vector of the new category in the feature space, enabling the model to quickly master the recognition ability of new categories with minimal labeled data. The incremental learning approach mixes labeled samples of new intent categories with existing known intent category samples for incremental model training. Simultaneously, a regularization strategy is introduced during training to suppress catastrophic forgetting, ensuring that the recognition ability of old categories is not compromised while learning new knowledge. Through these methods, the system achieves dynamic discovery and continuous learning of new intent categories, allowing the intent classification model to continuously expand its recognition capability boundaries as business evolves, without needing to retrain the entire model every time a new requirement arises.

[0039] Furthermore, the out-of-distribution detection process in S3 includes the following steps: S31: Multi-granularity decision boundary detection based on subclass center; Specifically, for each known intent category, its training samples are fine-grainedly clustered in the feature space, dividing them into several subclasses, and a subclass center vector is calculated for each subclass. For intent classification models in the education domain, user input within the same intent category often exhibits semantic diversity. Taking the knowledge point question category as an example, it can be further divided into multiple subclasses such as mathematical formula questions, concept definition questions, and problem-solving step questions. Through fine-grained clustering, each known intent category is divided into K subclasses according to the distribution of its training samples in the semantic feature space (the value of K can be adaptively determined based on the number of samples and distribution density of the category), and the mean of the semantic vectors of all samples in each subclass is calculated as the center vector of that subclass. Specifically, for a given known intent category, its training sample set in the feature space is , which is divided into K subclasses using a clustering algorithm, and the center vector of each subclass is .

[0040] Secondly, based on the distribution characteristics of the training samples in each subclass, the decision boundary threshold for each subclass is determined. Specifically, for each subclass, the distance from the semantic vector of each training sample within that subclass to the subclass center vector is calculated, and the statistical distribution of the distance values ​​(including the mean and standard deviation) is obtained. The decision boundary threshold for that subclass is then set accordingly. In a preferred embodiment, the threshold is the mean plus n times the standard deviation (n can be 2 or 3) to ensure that most normal samples are included within the decision boundary.

[0041] Next, the distance between the semantic vector of the user input and the center vectors of each subclass in each known intent category is calculated, and the minimum distance value is selected. If the minimum distance value exceeds the decision boundary threshold corresponding to the subclass center, the user input is determined to fall outside the decision boundary of that intent category. Finally, if the distance between the user input and the centers of all subclasses of all known intent categories exceeds the corresponding threshold, an unknown intent determination is output. This multi-granularity detection method, which combines subclass center distance and threshold judgment, is more accurate than traditional detection based on category-level centers (i.e., a category is represented by only one prototype vector). Even if a user input deviates from the mainstream semantic region of an intent category, it may still fall within the coverage of a subclass under that category, avoiding misjudgments caused by semantic diversity within categories.

[0042] S32: Distance detection based on category prototype vectors; Specifically, a category prototype vector is maintained for each known intent category. This category prototype vector represents the center point of the semantic vectors of all training samples for that category. Unlike the multiple sub-class centers in S31, in this step, each known intent category corresponds to only one global prototype vector, representing the overall semantic center of that category. Specifically, for a known intent category, its category prototype vector...

[0043] Next, the distance between the semantic vector of the user input and the prototype vectors of each known intent category is calculated, and the minimum distance value is selected. This distance can be Euclidean distance or cosine distance. This minimum distance value is usually larger when the user input is located in the fuzzy zone between the centers of each known category or is completely far from all category centers.

[0044] Then, an adaptive threshold is set. This adaptive threshold is determined based on the statistical distribution of distances between all known category training samples and their respective category prototype vectors, rather than using a fixed empirical value. Specifically, the distance from each known category training sample to its corresponding category prototype vector is calculated, resulting in a set of distance values ​​for all training samples. The mean and standard deviation of this set are then calculated, and the adaptive threshold is set to the mean plus a factor of the standard deviation (which can be between 2 and 4 depending on business needs). The advantage of using an adaptive threshold is that the distribution of distances from samples to prototype vectors varies across different application scenarios and models. The adaptive threshold can be dynamically adjusted based on the current data distribution, eliminating the need for repeated manual parameter tuning. In educational scenarios, if the minimum distance from a user's input (e.g., "Can this AI teacher recognize handwriting?") to all known category prototype vectors exceeds this adaptive threshold, it indicates that the input is semantically too far removed from all known categories, and is highly likely to represent an unknown intent. In this case, an "unknown intent judgment" is output.

[0045] S33: Auxiliary judgment based on large language model; Specifically, when the highest matching score output in step S2 is lower than the high confidence threshold but higher than the low confidence threshold, the user input is determined as a low confidence sample. In educational scenarios, the high confidence threshold can be set to 0.8, and the low confidence threshold can be set to 0.3. When the matching score is higher than 0.8, the model is highly confident in the classification result and usually does not require auxiliary judgment; when the matching score is lower than 0.3, the model obviously cannot recognize the input and can be directly judged as an unknown intent; when the matching score is between 0.3 and 0.8, the model is in an uncertain state. At this time, introducing a large language model for auxiliary judgment is the most effective way to avoid the high cost of calling the large language model for all samples and to introduce stronger semantic understanding capabilities as a fallback in key areas where the model's confidence is insufficient.

[0046] The low-confidence samples are input into a large language model (such as GPT-4, Wenxin Yiyan, or ChatGLM). The large language model performs semantic understanding and intent judgment on the user input based on preset prompts, outputting a judgment result indicating whether the user input belongs to a known intent category and its confidence score. The prompts contain a complete list and description of known intent categories, guiding the large language model to determine the category of the user input from a semantic understanding perspective. For example, for a low-confidence student inputting "What is the use of this knowledge point in real life?", the system encapsulates this into a prompt template with the large language model: "You are an intent recognition assistant. Known intent categories include: knowledge point questions, course consultations, learning suggestions, operation assistance, etc. Please determine which category the following user input belongs to: The user input is 'What is the use of this knowledge point in real life?'" Based on its powerful semantic understanding capabilities, the large language model outputs a judgment result of "learning suggestions" and provides a confidence score (e.g., 0.72).

[0047] The judgment result of the large language model is fused with the output result of the intent classification model. The fusion method can employ weighted voting or logical rules: when the judgments of the two models are consistent, the judgment is adopted; when they are inconsistent, the decision is made by comparing their confidence scores. When the fused judgment result is an unknown intent and the confidence score exceeds a preset value, an unknown intent judgment is output. For example, if the large language model judges it as a non-known intent (confidence 0.75), and the highest matching degree of the intent classification model is only 0.45, and the combined confidence score after fusion exceeds the threshold, then it is judged as an unknown intent. By introducing the semantic understanding capability of the large language model, the system can handle user inputs that are novel in expression but semantically do not belong to known categories, effectively compensating for the lack of semantic understanding depth in intent classification models trained on closed sets, especially in educational scenarios where students ask questions in flexible and diverse ways.

[0048] The detection results of S31, S32, and S33 are comprehensively judged. If any detection step outputs an unknown intent determination and the confidence level meets the preset conditions, or if the comprehensive determination result meets the unknown intent determination conditions, then the user input is marked as an unknown intent.

[0049] Specifically, the comprehensive judgment adopts a strategy of parallel or series weighted average: if any detection stage outputs an unknown intent judgment and the confidence level of that stage meets the preset conditions (e.g., the confidence score is higher than 0.85), then the user input is directly marked as an unknown intent; this rapid rejection mechanism ensures the timely capture of high-confidence unknown samples and avoids diluting strong signals due to the averaging effect of multi-level judgments; if the confidence levels of each stage do not reach the high standard of independent judgment, but the comprehensive judgment result meets the conditions for unknown intent judgment (e.g., at least two of the three detection stages output unknown intent, or the weighted comprehensive score exceeds the preset threshold), then the user input is also marked as an unknown intent. Taking a specific educational scenario as an example: A student inputs, "Can this AI learning assistant remember the questions I asked before?" The input slightly exceeds the threshold of some categories in the S31 subclass center distance detection, and does not significantly exceed the adaptive threshold in the S32 prototype vector distance detection. However, the S33 large language model-assisted judgment, based on its semantic understanding ability, believes that the input does not belong to any of the existing intent categories (confidence level 0.82). Since the S33 confidence level exceeds the preset condition of 0.85, it is comprehensively judged to be marked as an unknown intent and included in subsequent processing as a potential candidate for new intent for memory function consultation.

[0050] Further, S31 includes the following steps: For each known intent category, its training samples are clustered in the feature space in a fine-grained manner to divide them into several subclasses, and a subclass center vector is calculated for each subclass. Specifically, the semantic vector representation of all training samples for each known intent category in the feature space is obtained. For intent classification models in the education field, user inputs within the same intent category often exhibit significant semantic diversity. Taking the knowledge point question category, commonly found in online education platforms, as an example, the training samples for this category can include various types of questions, such as "How to solve this math problem?", "What is the trigonometric function formula?", and "How to understand this physical phenomenon?". Although they all belong to the broad category of knowledge point questions, their internal semantic differences are significant. If only a single category prototype vector is used to represent the entire category, the category boundary will be too coarse-grained, failing to accurately cover the diverse distribution within the category. Therefore, for each known intent category, the feature vector set of all its training samples is extracted, where each feature vector is a high-dimensional semantic vector output by the pre-trained language model in step S1, with dimensions of 768 or 1024. Based on this, the density-based clustering algorithm DBSCAN or the partition-based K-means++ clustering algorithm is used to perform fine-grained clustering of the training samples within this category. Taking K-means++ as an example, the elbow rule or silhouette coefficient method is first used to determine the number of subclasses for a category: For a category, different values ​​of K are tried (e.g., K ranges from 2 to 10), and the cluster silhouette coefficients are calculated for different K values. The K value with the highest silhouette coefficient or the K value corresponding to the elbow inflection point is selected as the optimal number of subclasses for that category. For example, knowledge point questions can be clustered into three subclasses: mathematical formula questions, problem-solving process questions, and concept definition questions. Course consultations can be clustered into subclasses such as course content consultation, course progress consultation, and exam arrangement consultation. Samples in each subclass are close to each other in the semantic feature space and have similar semantic features. After clustering, for each subclass (representing the k-th subclass under the category), the mean of the semantic vectors of all training samples in that subclass is calculated as its subclass center vector, i.e., where is the number of training samples contained in that subclass.

[0051] Based on the distribution characteristics of the training samples of each subclass, the decision boundary threshold corresponding to each subclass is determined. After completing the subclassing and calculating the center vector of each subclass, it is necessary to determine the decision boundary threshold for each subclass to determine whether a new user input falls within the coverage of that subclass. Specifically, for each subclass, the distance from each training sample x within that subclass to the center vector of that subclass is calculated, resulting in a set of distance values ​​for all training samples within that subclass, where m is the number of training samples contained in that subclass. The distance can be Euclidean distance or Mahalanobis distance; in a preferred approach, Euclidean distance is used to reduce computational complexity. Based on the statistical distribution of this set of distance values, the mean and standard deviation of the distances are calculated, and the decision boundary threshold for that subclass is set according to the combination of the mean and standard deviation, where is a configurable scale parameter. The value of directly affects the sensitivity of detection: when the value is small (e.g., 2), the decision boundary is tighter, making it more sensitive to the detection of unknown samples, but the risk of false detection increases accordingly; when the value is large (e.g., 3 or 4), the decision boundary is looser, the false detection rate decreases, but some unknown samples may be missed. In educational scenarios, the tolerance for false positives and false negatives can be configured based on the business requirements. For example, in a student question classification system, if false negatives result in a large number of student requests remaining unrecognized for an extended period, a smaller value can be used to improve recall. If the system has a low tolerance for false positives, a larger value can be used to ensure accuracy. In a preferred approach, a value of 3 is chosen to ensure that approximately 99.7% of the training samples fall within the decision boundary.

[0052] Calculate the distance between the semantic vector of the user input and the center vector of each subclass in each known intent category, and select the minimum distance value; if the minimum distance value exceeds the decision boundary threshold corresponding to the subclass center, then determine that the user input falls outside the decision boundary of the intent category; Specifically, after the system receives new user input and extracts its semantic vector, it calculates the distance between this semantic vector and the center vectors of all subclasses under all known intent categories. Specifically, for each subclass center, the distance is calculated by iterating through all known intent categories (total number of categories denoted as ) and all their subclasses (total number of subclasses in each category denoted as ), resulting in a set of distance values. The minimum distance value is selected from this set, where is the subclass center closest to the user input in the feature space. If , it indicates that the user input falls within the decision boundary of the p-th category and the q-th subclass, meaning that the input is semantically close enough to at least one subclass in that category, and it can be preliminarily determined that it may belong to that known intent category. If , it indicates that even if the user input is close to its nearest subclass center, The distance also exceeds the range allowed by the normal sample distribution of this subclass, meaning that the user input falls outside the decision boundary of the intent category corresponding to this subclass. Taking the education scenario as an example, after calculating the semantic vector of a student inputting how to apply for a make-up exam, it was found that the distance to the center of the exam arrangement consultation subclass under the course consultation category was 0.52, while the decision boundary threshold of this subclass was 0.45. Since 0.52 > 0.45, the system determined that the input fell outside the decision boundary of the course consultation category, indicating that the input deviated significantly from the known exam arrangement consultation subclass semantically and could not be simply classified into this category.

[0053] If the distance between the user input and the center of all subclasses of all known intent categories exceeds the corresponding threshold, then an unknown intent determination is output.

[0054] After determining the distances to all subclasses of all known intent categories, if it is found that the distance between the current user input and the center of each subclass of every known intent category exceeds the corresponding decision boundary threshold, meaning that no subclass can include it within the coverage, then it indicates that the semantic vector of the user input is outside the semantic region covered by all known categories in the feature space, belonging to a typical out-of-distribution sample. At this time, step S31 outputs the unknown intent determination. Continuing with the above example of a student input on how to apply for a make-up exam, this input not only exceeds the threshold in the exam arrangement consultation subclass of course consultation, but also exceeds the corresponding threshold after comparing the distances to the centers of each subclass of all other categories such as knowledge point questions, platform operation, and learning suggestions. This indicates that the make-up exam application intent expressed by the input is completely not covered in the existing intent classification system. At this time, step S31 determines that the input is an unknown intent, marks and outputs the determination result, and sends it along with the corresponding confidence information (the confidence can be calculated from the relative magnitude of exceeding the threshold; the larger the magnitude of exceeding, the further the input is from the known category distribution, and the higher the confidence) to the comprehensive determination step.

[0055] Further, S32 includes the following steps: For each known intent category, maintain a category prototype vector, where the category prototype vector is the center point of the semantic vectors of all training samples of that category; For each known intent category, its category prototype vector is calculated and maintained during the model training or model update phase. Unlike S31, which maintains multiple sub-class centers for each category, this step assigns only one category prototype vector to each known intent category. This prototype vector represents the overall semantic center of the category, serving as a category-level global semantic representation. Specifically, for a known intent category, its training sample set is defined as follows: where each sample is a semantic vector (768-dimensional or 1024-dimensional) extracted in step S1. The category prototype vector is obtained by averaging the semantic vectors of all training samples for that category across all dimensions, thus revealing the center point of the category in the feature space. In an educational scenario, taking course consultation as an example, the training samples for this category contain numerous user questions about course content, schedules, and teaching methods. The semantic vectors of these questions cluster around a central point in the feature space, which is the prototype vector for the course consultation category. The system stores the prototype vectors of all known intent categories in the model parameters as vector matrices and maintains them dynamically as the model is incrementally updated. When a new intent category is added to the model, the prototype vector of the new category is calculated and stored synchronously. When a new training sample is added to a category, the prototype vector of that category is updated incrementally.

[0056] Calculate the distance between the semantic vector of the user input and the prototype vector of each known intent category, and select the minimum distance value; set an adaptive threshold, which is determined based on the statistical distribution of the distances between all known category training samples and their respective category prototype vectors; When the system receives new user input and extracts its semantic vector, it calculates the distance between this semantic vector and the prototype vector of each known intent category. This distance can be Euclidean distance or cosine distance. In a preferred approach, Euclidean distance is used, calculated as the Euclidean norm between the two vectors. The system iterates through all known intent categories to obtain a set of distance values, and selects the minimum distance value. The intent category corresponding to this minimum distance value is the known category closest to the current user input at the prototype vector level.

[0057] On the other hand, an adaptive threshold is set to determine whether the value is large enough to classify the input as an unknown intent. This adaptive threshold is not a fixed empirical value set manually, but is automatically determined based on the statistical distribution of the distances between all known class training samples and their respective class prototype vectors. Specifically, after model training is complete or after each model update, all training samples are traversed, and the distance from each training sample x to its class C_i's prototype vector p_i is calculated, resulting in a set of distance values ​​for all training samples, where M is the total number of all known class training samples. The mean and standard deviation are calculated, and the adaptive threshold is set to , where is a configurable hyperparameter. The value of determines the leniency of the adaptive threshold: in educational scenarios, if the system needs high sensitivity to new intents, it can be set to 2.5; if more emphasis is placed on reducing false detections, it can be set to 3.5. In a preferred approach, a value of 3 is used. According to the principle of normal distribution, approximately 99.7% of normal training samples will have a distance to their class prototype vector that is less than this adaptive threshold, with only a very small number of extreme samples excluded, thus ensuring the rationality and robustness of the threshold setting.

[0058] If the minimum distance value exceeds the adaptive threshold, an unknown intent determination is output.

[0059] The minimum distance between the user input and the nearest class prototype vector is compared with the aforementioned adaptive threshold. If the distance is less than 0.58, it indicates that even if the user input is far from the prototype vector of its closest known class, it exceeds the distance range covered by normal training samples. This means the user input is outside the coverage area of ​​all known class prototype vectors in the feature space and significantly deviates from the overall semantic center of any known class, making it a typical out-of-distribution sample. In this case, step S32 outputs an unknown intent determination. Conversely, if the distance is less than 0.58, it indicates that the user input is sufficiently close to at least one known class prototype vector and can be determined as falling within the coverage of known classes at the global class level. For example, in an educational scenario, in a school's online learning platform, a student inputs how to connect the virtual device of this online experimental platform. After calculating the distance from the semantic vector of this input to each known class prototype vector, the system finds that the minimum distance is 0.58 (corresponding to the platform operation class prototype vector), while the current adaptive threshold is 0.42. Since 0.58 > 0.42, step S32 determines that the input is an unknown intent. This judgment is reasonable. Although the input partially involves platform operations, its core is aimed at the novel need of connecting online experimental equipment. The existing intent classification system mainly covers routine operations such as homework submission and course playback, and does not cover the novel scenario of connecting virtual experimental equipment. At this time, S32 outputs the unknown intent judgment result along with the confidence information (confidence is positively correlated with the relative magnitude exceeding the adaptive threshold) for reference in the comprehensive judgment process. In the subsequent new intent discovery process, such samples will be clustered into the candidate new intent category of virtual experimental equipment consultation.

[0060] Furthermore, S33 includes the following steps: When the highest matching score output by S2 is lower than the high confidence threshold but higher than the low confidence threshold, the user input is determined as a low confidence sample. Specifically, the highest matching score output by the intent classification model in step S2 is obtained. This score reflects the model's confidence in the current classification result. Based on this, two decision boundaries are set: a high-confidence threshold and a low-confidence threshold. In educational scenarios, the high-confidence threshold can be set to 0.8 or 0.85, and the low-confidence threshold can be set to 0.3 or 0.4. The specific values ​​can be configured according to the different requirements of accuracy and recall in actual business. When the highest matching score is greater than or equal to the high-confidence threshold (e.g., 0.88), it indicates that the intent classification model is highly confident in the classification result. This sample does not need to be supplemented by a large language model for auxiliary judgment, and the classification result can be directly adopted to save computing resources and response time. When the highest matching score is less than or equal to the low-confidence threshold (e.g., 0.25), it indicates that the intent classification model can hardly make an effective judgment on the current input. This input has a very high probability of belonging to an unknown intent, and can be directly guided to other stages of out-of-distribution detection for judgment. When the highest matching score falls between the high-confidence threshold and the low-confidence threshold; for example, a highest matching score of 0.55, which is higher than 0.3 but lower than 0.8, indicates that the model has a certain tendency to classify the input into a known category, but the confidence is insufficient, placing it in an uncertain and ambiguous region. In this case, the user input is identified as a low-confidence sample, triggering the large language model's auxiliary judgment process. Taking an educational scenario as an example, if a student on an online education platform inputs "Can the AI ​​grading function recognize handwritten English?", the highest matching score output by the intent classification model is 0.62 (corresponding to the platform operation category), which neither reaches the high-confidence threshold of 0.8 nor falls below the low-confidence threshold of 0.3, making it a typical low-confidence sample. The reason for setting this trigger interval instead of calling the large language model for all samples is that the large language model has high inference costs and long response times. Calling the large language model for all user inputs would lead to a sharp increase in system costs and a decline in user experience. By introducing the large language model for auxiliary judgment only in ambiguous areas where the model confidence is insufficient, it can effectively identify samples with novel expressions but may still belong to known categories in semantics, while keeping the number of calls to the large language model within a reasonable range, thus achieving a balance between recognition accuracy and operating costs.

[0061] The low-confidence samples are input into a large language model, which performs semantic understanding and intent judgment on the user input based on the prompt words, and outputs the judgment result of whether the user input belongs to a known intent category and its confidence score; Specifically, the user input identified as a low-confidence sample in step S33 is submitted to a large language model (such as GPT-4, Wenxin Yiyan, Tongyi Qianwen, or ChatGLM) to leverage the powerful semantic understanding capabilities and rich world knowledge of the large language model for in-depth intent analysis. Unlike intent classification models trained on closed sets, large language models are not limited to matching within a pre-defined set of known categories. Instead, they can comprehensively interpret user input from a semantic understanding perspective, including identifying implicit intents in the input, recognizing the user's true needs, and determining whether those needs can be covered by existing intent categories. In actual processing, the system constructs a dedicated prompt word as input to the large language model. This prompt word contains a complete list of known intent categories and their corresponding semantic descriptions to guide the large language model in intent judgment based on the business context. Taking an education scenario as an example, the prompt word could be constructed as: "You are an intent recognition assistant in the education field." The known intent categories and their descriptions are as follows: (1) Knowledge point questions: Users do not understand a certain knowledge point or concept and seek explanation and clarification; (2) Homework help: Users ask how to answer homework questions; (3) Course consultation: Users consult about course content, progress, arrangements, etc.; (4) Platform operation: Users ask how to use the functions of the learning platform; (5) Learning suggestions: Users seek learning methods, plans, or resource recommendations. Please analyze which of the above categories the following user input belongs to. If it does not belong to any known category, answer "unknown intent" and give your confidence score (a value between 0 and 1). After receiving the prompt word and user input, the large language model performs semantic parsing and intent inference on the user input based on its deep understanding of natural language, and finally outputs the judgment result and its confidence score. For example, given the low-confidence input of the aforementioned AI grading function's inability to recognize handwritten English, the large language model, after semantic understanding, might output: "Unknown intent," with a confidence score of 0.78. The reasoning is that while the input partially involves platform function operations, its core is a query about the specific technical capability of the AI ​​grading function—handwritten English recognition—which lacks precise category coverage within existing intent categories. Similarly, for another low-confidence input—"Does this knowledge point have a significant weight in the postgraduate entrance examination?"—the large language model might output: "Course consultation," with a confidence score of 0.85. The reasoning is that although the expression is novel, its core semantics are a consultation about the importance and exam weight of course knowledge points, thus classifying it as a course consultation.

[0062] The judgment result of the large language model is fused with the output result of the intent classification model. When the fused judgment result is unknown intent and the confidence score exceeds the preset value, the unknown intent judgment is output.

[0063] Specifically, after obtaining the judgment result and its confidence score of the large language model, the result is fused with the output result of the intent classification model in step S2. The fusion judgment can employ various fusion strategies: in a preferred approach, a weighted voting fusion strategy is used, assigning different weight coefficients to the judgment result of the large language model and the output result of the intent classification model for comprehensive calculation. Since the large language model usually has a more accurate and in-depth semantic understanding of low-confidence samples, it can be given a higher weight (e.g., 0.7), while the intent classification model has a lower confidence level on such samples and can be given a lower weight (e.g., 0.3). Specifically, let the score of the large language model's judgment result for unknown intent be (takes a value of 0 or 1, where 1 indicates an unknown intent and 0 indicates a known category), and its confidence level be ; let the highest matching score of the intent classification model be , and whether its corresponding category is a known category is determined by S2. When the large language model outputs unknown intent () and its confidence level exceeds a preset value (e.g., 0.7), the comprehensive judgment result is unknown intent, and the unknown intent judgment is output. Another fusion strategy is rule-based fusion: when the judgments of the large language model and the intent classification model are inconsistent, the judgment of the large language model prevails because it has stronger semantic understanding and generalization capabilities when processing low-confidence samples; when the two judgments are consistent, the consistent result is directly adopted. Continuing with the example of whether the AI ​​correction function can recognize handwritten English, the large language model judges it as an unknown intent (confidence 0.78), while the intent classification model's highest matching degree is 0.62 (corresponding to the platform operation category). Since the two judgments are inconsistent, and the large language model's confidence of 0.78 exceeds the preset value of 0.7, the fusion judgment result is "unknown intent," and S33 outputs the "unknown intent judgment." This sample is subsequently recorded as an "unknown intent sample," and after subsequent cluster analysis, it can be identified as a new intent category: AI correction function consultation.

[0064] Furthermore, the step of selecting candidate new intent clusters from the clustering results based on spatiotemporal consistency verification includes the following steps: Semantic vectors are extracted from the sample set labeled with unknown intent. A clustering algorithm is used to divide the semantically similar samples into several candidate clusters, and pseudo-labels are generated for each candidate cluster. Specifically, all samples marked as unknown intent accumulated within a certain time window (e.g., the past 30 days) are extracted from the log database. For each sample, its semantic vector is extracted (the semantic vector can be extracted and stored when the sample is marked as unknown to avoid redundant calculations). This yields a set of semantic vectors for the unknown intent samples, where N is the total number of unknown samples accumulated within the time window. Based on this, a clustering algorithm is used to divide semantically similar samples into several candidate clusters. Considering that unknown intent samples may contain noise and outliers, a preferred approach is to use the density-based clustering algorithm DBSCAN (Density-Based Spatial Clustering of Applications with Noise). This algorithm does not require pre-specifying the number of clusters, can automatically identify clusters of arbitrary shapes, and effectively distinguish noisy samples. The core parameters of DBSCAN include the neighborhood radius and the minimum number of samples, MinPts. MinPts determines the distance threshold at which samples are considered neighbors, while MinPts determines the minimum number of samples required to form a cluster. In educational scenarios, the values ​​of MinPts can be adjusted according to the actual data distribution. For example, a value of 0.3 (based on the Euclidean distance of normalized semantic vectors) and a MinPts value of 5 ensure that each candidate cluster contains at least 5 semantically similar unknown samples, avoiding misclassification of occasional isolated noise as valid clusters. After clustering, each sample is assigned a cluster number (noise samples are not assigned numbers), and each cluster represents a group of semantically similar unknown samples. For each candidate cluster, the system automatically generates a temporary pseudo-label based on the semantic features of the samples within that cluster, facilitating subsequent review and citation. The pseudo-label can be generated by extracting the combination of keywords with the highest word frequency from the samples within the cluster. For example, if the samples in a candidate cluster contain high-frequency words such as "make-up exam application process online," the system automatically generates the pseudo-label "make-up exam application consultation."

[0065] For each sample in each candidate cluster, calculate the spatial consistency score of the sample in the feature space, which is determined based on the proportion of the sample and its K nearest neighbor samples that belong to the same cluster. After completing the clustering, it is necessary to evaluate the quality and reliability of each sample in each candidate cluster. This is because clustering algorithms may incorrectly classify some boundary samples or outliers into a cluster, and these low-quality samples will reduce the accuracy of subsequent analysis and model updates. Therefore, for each sample in each candidate cluster, its spatial consistency score in the feature space is calculated. Specifically, for a given sample, its K nearest neighbors are found in the feature space of all unknown samples (based on the Euclidean or cosine distance between semantic vectors; K can be set to an integer between 5 and 15, with a preferred value of 10). Then, the number of samples belonging to the same candidate cluster among these K nearest neighbors is counted, and the ratio of this number to K is used as the spatial consistency score of that sample. Taking an educational scenario as an example, a candidate cluster contains a large number of unknown samples related to online make-up exam applications. Samples in the central region of the cluster may have 9 of their 10 nearest neighbors belonging to the same cluster, resulting in a spatial consistency score of 0.9, indicating that the sample is located in the core region of the cluster and is of high quality. Conversely, a sample on the cluster edge may only have 3 of its 10 nearest neighbors belonging to the same cluster, resulting in a spatial consistency score of 0.3, indicating that the sample is located at the cluster boundary or may even be a misclassified noise point. By introducing spatial consistency scores, the system can effectively quantify the degree of belonging of each sample to its cluster in the local feature space, providing a reliable quality metric for subsequent sample selection. Samples with higher spatial consistency scores are usually located in the core, dense region of the cluster, exhibiting stronger semantic representativeness and being more suitable as training samples for new intent categories.

[0066] During multiple clustering iterations, the cluster number assigned to each sample in each iteration is recorded, and the temporal consistency score of the sample is calculated based on the consistency of the multiple assignment results. Specifically, considering the instability of single clustering results due to the influence of algorithm initial state, parameter selection, or data noise, this application further introduces a time consistency verification dimension. This involves multiple clustering iterations to evaluate the degree to which each sample is stably assigned to the same cluster. Specifically, the system performs multiple independent clustering processes over time: for example, within several consecutive time periods (e.g., 5 consecutive days), clustering is re-executed daily on the currently accumulated set of unknown samples, and the cluster number assigned to each sample in each cluster is recorded. Alternatively, on the sample set at the same point in time, multiple clustering operations are performed using different initialization parameters or different clustering algorithms (e.g., alternating between K-means and DBSCAN), and the cluster affiliation of each sample in each cluster is recorded. For each sample, the consistency of its cluster assignment across all T clustering iterations is calculated, and the time consistency score for that sample is determined. In a preferred embodiment, the time consistency score is calculated by treating the cluster number assigned to the sample in each cluster as a category label and calculating the consistency of these labels across T clustering iterations. Normalized mutual information or the RAND index can be used to measure the consistency of label assignment, or a simpler method can be used: the proportion of the most frequently occurring cluster number appearing in all T clusters can be used as the temporal consistency score. For example, if a sample is assigned to the same cluster number in 5 clusters over 5 consecutive days, its temporal consistency score is 5 / 5 = 1.0, indicating that the sample has extremely high stability in its assignment over time. If a sample is assigned to 5 different cluster numbers in 5 clusters, its temporal consistency score is 0.2, indicating that the sample's assignment is extremely unstable and may have ambiguous relationships with the semantic boundaries of multiple clusters. Through temporal consistency verification, the system can effectively identify and remove samples that are temporarily assigned to a cluster due to data fluctuations or algorithmic randomness but do not actually belong to that cluster, ensuring that the selected samples have stable semantic assignment over time, thereby improving the reliability and robustness of candidate new intent clusters.

[0067] The spatial consistency score and the temporal consistency score are combined to calculate the comprehensive score of each sample. Samples with comprehensive scores higher than a preset threshold are retained to form a high-quality pseudo-label sample set for the candidate new intent cluster.

[0068] After calculating the spatial consistency score and temporal consistency score for each sample separately, the two scores are combined to obtain the final quality score for each sample. The combination method can be a weighted sum: where is the weight coefficient, used to adjust the relative importance of spatial consistency and temporal consistency in the overall score. In one preferred method, this value is 0.5, meaning both are equally weighted. In another preferred method, the weights can be adjusted according to actual business needs; if the system focuses more on the local clustering quality of samples in the feature space, a higher value (e.g., 0.6) can be set; if more attention is paid to the stability of sample affiliation in multiple clusterings, a lower value (e.g., 0.4) can be set. After calculating the overall score for each sample, it is compared with a preset threshold (e.g., 0.7): samples with higher overall scores are retained, as these samples are located in the core area of ​​the cluster in the spatial dimension and have stable cluster affiliation in the temporal dimension, belonging to high-quality samples; samples with lower overall scores are removed, as these samples may be cluster edge samples, noisy samples, or unstable samples with inconsistent affiliation in multiple clusterings.

[0069] Specifically, through the above screening process, the high-quality samples retained in each candidate cluster constitute a high-quality pseudo-label sample set for that candidate new intent cluster. These high-quality samples will be presented to reviewers for verification. Since the screening process has eliminated a large number of low-quality and marginal samples, the sample set faced by reviewers has higher semantic consistency and representativeness, significantly reducing the burden of manual review and improving the efficiency and accuracy of new intent discovery. For example, in an education scenario, a candidate cluster originally contained 158 samples labeled as unknown (related questions about online make-up exam applications). After dual screening for spatial and temporal consistency, 112 high-quality samples with a comprehensive score higher than 0.7 were retained. These samples have high semantic consistency and stable affiliation. After verification by reviewers, they can be used as training samples for the new intent category of make-up exam application consultation, updating the intent classification model through small-sample learning. The 46 marginal or noisy samples that were removed will not interfere with the model's learning process, effectively ensuring the quality of the training data.

[0070] Furthermore, updating the intent classification model with the confirmed new intent category through few-shot learning includes the following steps: A prototype network is constructed using a few-shot learning method based on metric learning. Once the reviewers confirm the new intent category, it needs to be integrated into the existing intent classification model. With only a small number of labeled samples (typically only 5 to 20 labeled samples per new category), this application preferably employs a few-shot learning method based on metric learning to construct a Prototypical Network to achieve rapid learning of the new category. The Prototypical Network is a simple and efficient few-shot classification method. Its core idea is to compute a prototype vector (i.e., the center of the category) for each category in the embedding feature space, and then classify by measuring the distance from the query sample to the prototype vectors of each category. In educational scenarios, when an online learning platform launches a new feature (such as an AI teaching assistant or virtual experiments), students may generate a large number of new questions about this feature. However, since the new feature has just been launched, the system cannot collect a large amount of labeled data in advance for sufficient model training. In this case, using a few-shot learning method based on metric learning can achieve a rapid cold start for the new intent category. Specifically, the constructed prototype network consists of an embedding encoder and a distance metric module: the embedding encoder can use a pre-trained language model (such as BERT) trained in step S1 to map the input text into semantic vectors of fixed dimensions; the distance metric module is used to calculate the Euclidean or cosine distance between semantic vectors. The prototype network is trained using a meta-learning paradigm, constructing a large number of pseudo-small sample tasks on training data with known intent categories, enabling the model to learn the ability to quickly identify new categories with only a small number of supporting samples.

[0071] Based on a small number of labeled samples of the new intent category that has been reviewed and confirmed, calculate the prototype vector of the new intent category; Within the prototype network framework, once a new intent category is approved, the system acquires a small number of labeled samples for that new category (i.e., representative samples verified and confirmed by the reviewers from a high-quality pseudo-label sample set). Let the set of labeled samples for the new intent category be denoted as , where m is the number of labeled samples (e.g., m is 10), and each sample is confirmed by the reviewers to belong to the new category. Then, each sample in is input into the embedding encoder of the prototype network to extract the corresponding semantic vector, where is the encoding function of the embedding encoder, and is its network parameters. Based on this, the prototype vector of the new intent category is calculated, which involves averaging the semantic vectors of all labeled samples across all dimensions to obtain the center point of the new category in the embedding feature space. Taking an educational scenario as an example, suppose the reviewers confirm a new intent category, "AI teaching assistant function consultation," and provide 10 labeled samples, including questions such as "Can the AI ​​teaching assistant help me plan my studies?", "Can the AI ​​teacher answer professional questions?", and "Does the AI ​​teaching assistant support voice input?". The system calculates the average of the semantic vectors of these 10 samples to obtain the prototype vector of the new category. This prototype vector represents the overall semantic center of the new intent category of AI teaching assistant function consultation in the feature space. All subsequent classification decisions are calculated based on the distance between the query sample and the prototype vectors of each category, including this new prototype vector. This eliminates the need for full retraining of the model or complex parameter updates, making the addition of new categories lightweight and instantaneous.

[0072] During classification, the distance between the sample to be classified and the prototype vectors of each category, including the newly added category, is calculated, and the category with the closest distance is used as the classification result.

[0073] After calculating the prototype vector of the new intent category, the classification decision in the prototype network is performed as follows: When the system receives a new user input to be classified, it first extracts its semantic vector through the embedding encoder, and then calculates the distance between this semantic vector and the prototype vectors of all known intent categories. The all known intent categories include the original known intent categories and the newly added intent category, i.e., the prototype vector set is , where N is the number of original known categories, and is the prototype vector of the new category. The distance metric can be Euclidean distance: . After calculating all distances from the sample to be classified to the prototype vectors of each category, the intent category corresponding to the smallest distance value is selected as the classification result: , that is, the category with the closest distance is taken as the intent classification result for the user input. Taking an educational scenario as an example, when a student inputs "Can the AI ​​teaching assistant recommend suitable learning materials?", the system extracts the semantic vector and calculates the distances to the prototype vectors of each known category and the prototype vector of the AI ​​teaching assistant's functional consultation. The distance to the prototype vector of the AI ​​teaching assistant's functional consultation is 0.25, the distance to the prototype vector of the learning suggestion category is 0.45, and the distance to the prototype vector of the platform operation category is 0.52. Since the closest distance is to the AI ​​teaching assistant's functional consultation category, the system classifies the input as this new intent category.

[0074] Furthermore, updating the intent classification model with the confirmed new intent category through incremental learning includes the following steps: Freeze the underlying parameters of the pre-trained language model and perform incremental training only on the classification layer; Unlike the aforementioned few-shot learning approach, when the number of labeled samples for a new intent category reaches a certain scale (e.g., more than 50 labeled samples per category), this application preferably adopts an incremental learning approach to integrate the new intent category into the intent classification model to obtain a more refined category decision boundary. In the incremental learning process, the underlying parameters of the pre-trained language model are first frozen. The pre-trained language model typically contains multiple layers of Transformer encoders, whose underlying parameters (several layers near the input) have been sufficiently pre-trained on a large-scale general corpus, learning rich general language representation capabilities. In educational scenarios, the general semantic knowledge captured by these underlying parameters, such as lexical meaning, syntactic structure, and basic semantic relationships, is universally applicable to various intent recognition tasks and does not require readjustment with each new category. Specifically, the system sets the network parameters of the bottom N layers of the pre-trained language model (e.g., the first 10 layers of the BERT model) to a frozen state, meaning that their gradients are not calculated or parameters are not updated during subsequent training. Only the top classification layer (typically including a fully connected layer and a softmax output layer) is unfrozen and incrementally trained. The parameter size of this classification layer is much smaller than that of the underlying encoder, significantly reducing the computational resources and time costs required for training. Taking the education scenario as an example, when an online learning platform adds the intent category of online experiment operation consultation, the system only needs to update the weight vector of the corresponding new category in the classification layer, without retraining the entire BERT model. The training time for a single incremental update can be reduced from several hours to several minutes, greatly improving the efficiency of model updates and enabling the system to quickly respond to changes in business needs with lower computational costs.

[0075] The labeled samples of the new intent category are mixed with the samples of the original known intent categories and input into the model, and the cross-entropy loss function is used for optimization. After freezing the underlying parameters, the labeled samples of the new intent categories need to be mixed with representative samples of the existing known intent categories and then input into the model for training. This mixed training is necessary because if only labeled samples of the new categories are used for training, the model will gradually deviate from the original parameter space while learning the new categories, leading to a decrease in its ability to recognize older categories. Specifically, the system samples a certain number of representative samples (e.g., 100 to 200 samples per category, covering the typical semantic distribution of that category) from the historical training data for each existing known intent category, and merges them with the labeled samples of all new intent categories to form an incremental training set. This mixed training set is then input into the intent classification model, and the cross-entropy loss between the model's predicted probability distribution and the true label is calculated: where M is the total number of samples in the mixed training set, is the total number of categories in the model after incremental training (i.e., the original number of categories plus the number of new categories), is the true label (one-hot encoded) of the i-th sample in the j-th category, and is the probability predicted by the model that the i-th sample belongs to the j-th category. The optimization objective is to minimize this cross-entropy loss. During training, because the parameters of the underlying encoder are frozen, only the parameters of the classification layer participate in gradient updates. The model adjusts the weights of the classification layer through the backpropagation algorithm, enabling it to accurately distinguish between the new and existing categories in the feature space. Taking an educational scenario as an example, when the system adds an online experimental operation consultation category, it mixes 80 newly labeled samples of the new category with 100 samples from each of the original 7 known categories (a total of 700 samples) to form a training set of 780 samples. This allows the model to learn to establish the correct decision boundary between the new and old categories, ensuring that the model maintains a high classification accuracy across all 8 categories after the addition of the new category.

[0076] A regularization strategy is introduced to constrain the magnitude of changes in model parameters relative to their previous values ​​during training, in order to suppress catastrophic forgetting.

[0077] In incremental learning, simply mixing old and new samples for training still carries the risk of catastrophic forgetting. When learning the decision boundary of a new category, the model may unintentionally change parameters crucial for classifying the old category, leading to a decrease in the accuracy of old category recognition. To address this, this application further introduces a regularization strategy to constrain the magnitude of changes in model parameters relative to their pre-update state during training. In a preferred approach, Elastic Weight Consolidation (EWC) regularization is employed. The core idea of ​​EWC is to impose strong constraints on important parameters that contribute significantly to the classification of the old category during incremental learning, limiting their magnitude of change; while allowing larger changes for less important parameters that contribute less, to adapt to the new category. Specifically, EWC adds a regularization term to the loss function: where is the original cross-entropy loss, is the i-th parameter of the model, is the value of this parameter before the incremental update, are the diagonal elements of the Fisher information matrix, used to measure the importance of the i-th parameter to the classification of the old category (the larger the value, the more important the parameter), and is the regularization strength coefficient. During training, the system updates model parameters by minimizing the overall loss function that includes the EWC regularization term. When the model attempts to change parameters important to old categories, the regularization term imposes a significant penalty, forcing these parameters to remain near their original values; while parameters unimportant to old categories can be freely adjusted to learn features of new categories. Taking an educational scenario as an example, suppose a certain parameter plays a crucial role (high value) in distinguishing between two semantically similar categories: knowledge point questions and homework assistance. When the model learns the newly added category of online experimental operation consultation, the EWC regularization will constrain the magnitude of this parameter's change, thus ensuring that while acquiring the ability to recognize new categories, the model does not forget how to accurately distinguish between the two original categories.

[0078] Furthermore, S5 also includes an intent category version management step: Maintain an intent category version library, recording the intent category set, model parameter configuration, and update timestamp of each version; In the continuous evolution of the intent classification model, each new intent category changes the model's output space and parameter state. To ensure the system's traceability and fault tolerance, this application further introduces an intent category version management mechanism. Specifically, the system maintains an intent category version repository, which can be implemented using a relational database or a dedicated version management storage system to record complete information for each model version. For each version, at least the following three types of core information are recorded: First, the set of intent categories included in this version includes the names, category IDs, category descriptions, and addition times of all known intent categories, to clarify the output space range of this version of the model; Second, the model parameter configuration includes snapshots or update records of the underlying parameters of the pre-trained language model, weight parameters of the classification layer, configuration information of the model structure (such as the number of layers, hidden layer dimensions, output dimensions, etc.), and the corresponding optimizer status and training hyperparameters, ensuring that the model parameters of this version can be completely restored; Third, the update timestamp records the creation time, effective time, and corresponding triggering events of this version of the model (such as adding an AI teaching assistant function consultation category or adding an online experiment operation consultation category, etc.). In an educational context, taking an online learning platform as an example, its intent category version library might record the following version information: Version V1.0 (January 15, 2024) includes 5 intent categories (knowledge point questions, homework assistance, course inquiries, platform operation, and learning suggestions); Version V1.1 (March 20, 2024) adds an exam registration inquiry category, for a total of 6 categories; Version V2.0 (June 10, 2024) adds two new categories: AI teaching assistant function inquiry and online experiment operation inquiry, for a total of 8 categories. Each version update synchronously records the storage path and hash checksum of the corresponding model parameter file, ensuring data integrity and traceability, laying the foundation for subsequent version backtracking and comparative analysis.

[0079] Each time the model is updated, a new version record is automatically generated, and all historical version data is retained. When the system completes an incremental update of an intent category (whether through few-shot learning or incremental learning), the version record generation process is automatically triggered. Specifically, based on the current version, the system summarizes all changes from this update, including the new intent category name and description, the prototype vector or classification layer weight parameters of the new category, the updated complete model parameter file, the number and source of labeled samples used in this update, the update timestamp, and a description of the business event that triggered the update. This information is then integrated to generate a new version record, which is written to the version repository. More importantly, the system retains all historical version data when generating a new version record; that is, it does not overwrite or delete any previous version records and their corresponding model parameter files. This full retention strategy ensures that the system can revert to any historical version at any point in time. Taking the education scenario as an example, when an online learning platform added an academic integrity consultation category in September 2024, the system automatically generated a complete record of version V2.1 in the version repository, while records and model parameter files of all historical versions such as V1.0, V1.1, and V2.0 remained intact in the storage system. This design means that even if unexpected problems occur during an update, such as poor quality of labeled samples for the new category causing abnormal model performance on the new category, or unexpected performance interference to the old category during incremental learning, the system still retains the ability to revert to the state before the update at any time, avoiding the risk of the entire online service becoming unavailable due to a single update error.

[0080] In response to a rollback command, the current model is restored to a specified historical version.

[0081] When system maintenance personnel or business management personnel discover anomalies in the current version of the intent classification model—for example, a significantly lower-than-expected accuracy rate for new categories, an unexpected decrease in the accuracy rate of old categories, or a large number of misclassifications in the online environment—management personnel can issue a version rollback command through the system's management interface or API. This rollback command includes the version number or timestamp of the target historical version. Upon receiving the rollback command, the system first verifies the command's permissions to confirm that the initiator has the necessary authorization for version rollback, preventing unauthorized version changes. After successful permission verification, the system retrieves the corresponding historical version record from the version repository based on the version identifier in the command, extracts the path to the model parameter file stored in that version, completely replaces the model parameters of the current online service with those of the historical version, and simultaneously restores the intent category set to the category list corresponding to that historical version, completing a full version rollback operation. Throughout the rollback process, the system records detailed logs of the rollback operation, including the rollback initiator, rollback time, version number before rollback, version number after rollback, and reason for rollback, for subsequent auditing and analysis. Taking an educational scenario as an example, on September 15, 2024, an online learning platform updated its model from version V2.0 to V2.1 (adding an academic integrity consultation category). It was discovered that the accuracy rate for handling existing knowledge point questions dropped from 94.2% to 87.6%. Investigation confirmed that some mislabeled samples in the newly added category had unclear boundaries with the knowledge point question category, causing an undesirable shift in the decision boundary between the two categories during incremental learning. Administrators immediately selected to roll back to version V2.0 through the management interface. Upon receiving the rollback command, the system automatically restored all parameters and intent category configurations of the online model to version V2.0. After the rollback, the system's classification performance was restored to that of version V2.0, and the accuracy of the original categories returned to normal. Online business was not continuously affected, and the complete data from version V2.1 was retained in the version repository for subsequent problem analysis. Through the aforementioned version management mechanism, the system possesses sufficient fault tolerance and reversibility during continuous evolution, effectively reducing the operational risks brought about by continuous model updates, and providing a solid guarantee for the long-term stable operation of the intent classification system in the education field.

[0082] Furthermore, S4 also includes an online monitoring step: Real-time statistics on the number of unknown intents identified, the distribution of candidate new intent clusters, and review progress indicators; To ensure the observability and controllability of the intent classification system during continuous operation, this application further introduces an online monitoring mechanism. Specifically, the system statistically analyzes and updates several key indicator data in real time during operation. These include: the number of unknown intents identified, the total number of newly labeled unknown intents per unit time (e.g., hourly, daily), the cumulative total number of unknown intent samples, and the proportion of unknown intents to all user inputs. A sudden increase in this proportion often indicates a new gap between the system's intent coverage and actual user needs, potentially corresponding to business events such as new feature launches, new course introductions, or changes in user behavior patterns. The distribution of candidate new intent clusters includes: the number of samples in each candidate new intent cluster, the semantic feature distribution of the clusters, the density of each cluster in the feature space (i.e., the average distance between samples within the cluster), and the growth trend of each cluster over time. For example, a rapid increase in the number of samples in a candidate cluster within the past week indicates that the potential new intents corresponding to that cluster are becoming a concentrated user demand. Review progress indicators include: the number of reviewed samples, the number of samples awaiting review, the number of new intent categories confirmed in each candidate new intent cluster, and the average time from the discovery of an unknown intent to the completion of review confirmation. In the education context, taking an online learning platform as an example, the system's real-time monitoring revealed that the number of unknown intents identified increased from an average of 50 per day to an average of 180 per day in the past three days. Cluster distribution analysis showed that 62% of these were concentrated in a semantic cluster. The samples in this cluster mostly contained keywords such as AI essay correction, scoring, and grammar correction, indicating that a large number of users were inquiring about the newly launched AI essay correction function. This data signal provided the operations team with a clear direction, requiring them to quickly build new intent categories for this function.

[0083] The aforementioned indicator data is displayed through a visualization interface. The system intuitively displays the various indicator data collected in real time through a visualization interface. This visualization interface can be implemented as a web-based dashboard, allowing administrators to log in and view it at any time via a browser. The visualization interface design includes multiple functional areas: the trend chart area uses a line graph to show the trend of the number of unknown intents identified over time, helping administrators quickly identify abnormal fluctuations; the distribution chart area uses a pie chart or bar chart to show the sample proportion of each candidate new intent cluster, intuitively reflecting the semantic distribution structure of the current unknown samples; the progress bar area displays the review progress of each candidate cluster, including the number of reviewed samples and the number of samples awaiting review; the details list area lists detailed information and sample previews for each candidate cluster, facilitating administrators to gain a deeper understanding of the specific content. Taking the education scenario as an example, the unknown intent trend chart displayed in the system's visualization interface shows that after an online learning platform launched its AI essay correction function, the number of unknown intents surged. The cluster distribution chart shows that the proportion of clusters consulting about the AI ​​correction function reached as high as 58%, and the review progress bar shows that the review progress of this cluster is 35%, reminding operations personnel to prioritize the review and confirmation work of this cluster. With a centralized display through a visual interface, administrators can grasp the full picture of the system's intent discovery status in real time without having to consult complex log data or write query statements.

[0084] When the temporal change in the number of unknown intents identified or the distribution of clustering results meets the preset alarm conditions, an alarm notification is automatically triggered.

[0085] Based on visual monitoring, the system further configures an automatic alarm mechanism. The preset alarm conditions include several types: First, alarm conditions based on time-series changes, such as when the number of unknown intents identified within a unit of time increases by more than a set percentage threshold (e.g., 100%) compared to the previous period (e.g., the same time period the previous day), it indicates a sudden and concentrated change in user demand, potentially indicating the emergence of new intents, thus triggering an alarm. Second, alarm conditions based on the distribution of clustering results, such as when the number of samples in a candidate new intent cluster accumulates to a set threshold (e.g., exceeding 100 samples) within a preset time window, or when the growth rate continuously exceeds a set rate threshold, it indicates that a new intent type has reached a certain scale and requires timely review and confirmation. Third, alarm conditions based on business risks, such as when the proportion of unknown intents continuously exceeds a preset proportion threshold (e.g., the proportion of unknown intents exceeds 30% for three consecutive days), it indicates a significant deficiency in the system's intent coverage capability, requiring urgent investigation and response. When the above alarm conditions are triggered, the system automatically sends alarm notifications through multiple channels, including but not limited to: sending email notifications to administrators, pushing alarm messages through instant messaging tools (such as WeChat Work, DingTalk, or Lark), and highlighting alarm markers (such as flashing icons or red highlights) in the visual interface. Taking the education scenario as an example, during the period leading up to the end of the semester and before exams, an online learning platform's system monitored a sudden increase in the daily number of unknown intents related to exam arrangement inquiries, from less than 10 to more than 200, triggering a time-series change alarm (daily increase exceeding 100%). After receiving the WeChat Work alarm notification, the operations staff immediately reviewed and confirmed the candidate cluster and added the exam arrangement inquiry intent category, promptly covering this surge in user demand.

[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for online user demand analysis and classification based on intent recognition, characterized in that, Includes the following steps: S1: Obtain text data input by online users, preprocess the text data, and then use a pre-trained language model to extract the semantic vector representation of the text data; S2: Input the semantic vector into the intent classification model pre-trained based on the closed set hypothesis, calculate the matching score of the user input to each known intent category, select the intent category with the highest matching score as the preliminary classification result, and record the matching score; S3: Based on the matching score and the semantic vector, perform an out-of-distribution detection process to determine whether the user input belongs to a known intent category; When the user input is determined not to belong to any known intent category, it is marked as an unknown intent sample; S4: Record samples marked as unknown intents to the log database, periodically perform cluster analysis on the accumulated unknown intent samples, and select candidate new intent clusters from the clustering results based on spatiotemporal consistency verification. S5: Review and confirm the candidate new intent cluster, and update the confirmed new intent category to the intent classification model through few-shot learning or incremental learning, so that the intent classification model can recognize the new intent category.

2. The method for online user demand analysis and classification based on intent recognition according to claim 1, characterized in that, The off-distribution detection process in S3 includes the following steps: S31: Multi-granularity decision boundary detection based on subclass center; S32: Distance detection based on category prototype vector; and S33: Auxiliary judgment based on large language model. The detection results of S31, S32, and S33 are comprehensively judged. If any detection step outputs an unknown intent determination and the confidence level meets the preset conditions, or if the comprehensive determination result meets the unknown intent determination conditions, then the user input is marked as an unknown intent.

3. The method for online user demand analysis and classification based on intent recognition according to claim 2, characterized in that, S31 includes the following steps: For each known intent category, its training samples are clustered in the feature space in a fine-grained manner to divide them into several subclasses, and a subclass center vector is calculated for each subclass. Based on the distribution characteristics of the training samples of each subclass, the decision boundary threshold corresponding to each subclass is determined. Calculate the distance between the semantic vector of the user input and the center vector of each subclass in each known intent category, and select the minimum distance value; If the minimum distance value exceeds the decision boundary threshold corresponding to the center of the subclass, then the user input is determined to fall outside the decision boundary of the intent category; If the distance between the user input and the center of all subclasses of all known intent categories exceeds the corresponding threshold, then an unknown intent determination is output.

4. The method for online user demand analysis and classification based on intent recognition according to claim 2, characterized in that, S32 includes the following steps: For each known intent category, maintain a category prototype vector, where the category prototype vector is the center point of the semantic vectors of all training samples of that category; Calculate the distance between the semantic vector of the user input and the prototype vector of each known intent category, and select the minimum distance value; An adaptive threshold is set, which is determined based on the statistical distribution of the distances between all known class training samples and their respective class prototype vectors; If the minimum distance value exceeds the adaptive threshold, an unknown intent determination is output.

5. The method for online user demand analysis and classification based on intent recognition according to claim 2, characterized in that, S33 includes the following steps: When the highest matching score output by S2 is lower than the high confidence threshold but higher than the low confidence threshold, the user input is determined as a low confidence sample. The low-confidence samples are input into a large language model, which performs semantic understanding and intent judgment on the user input based on the prompt words, and outputs the judgment result of whether the user input belongs to a known intent category and its confidence score; The judgment result of the large language model is fused with the output result of the intent classification model. When the fused judgment result is unknown intent and the confidence score exceeds the preset value, the unknown intent judgment is output.

6. The method for online user demand analysis and classification based on intent recognition according to claim 1, characterized in that, The process of selecting candidate new intent clusters from clustering results based on spatiotemporal consistency verification includes the following steps: Semantic vectors are extracted from the sample set labeled with unknown intent. A clustering algorithm is used to divide the semantically similar samples into several candidate clusters, and pseudo-labels are generated for each candidate cluster. For each sample in each candidate cluster, calculate the spatial consistency score of the sample in the feature space, which is determined based on the proportion of the sample and its K nearest neighbor samples that belong to the same cluster. During multiple clustering iterations, the cluster number assigned to each sample in each iteration is recorded, and the temporal consistency score of the sample is calculated based on the consistency of the multiple assignment results. The spatial consistency score and the temporal consistency score are combined to calculate the comprehensive score of each sample. Samples with comprehensive scores higher than a preset threshold are retained to form a high-quality pseudo-label sample set for the candidate new intent cluster.

7. The method for online user demand analysis and classification based on intent recognition according to claim 1, characterized in that, The step of updating the intent classification model with the confirmed new intent category through few-shot learning includes the following steps: A prototype network is constructed using a few-shot learning method based on metric learning. Based on a small number of labeled samples of the new intent category that has been reviewed and confirmed, calculate the prototype vector of the new intent category; During classification, the distance between the sample to be classified and the prototype vectors of each category, including the newly added category, is calculated, and the category with the closest distance is used as the classification result.

8. The method for online user demand analysis and classification based on intent recognition according to claim 1, characterized in that, The step of updating the intent classification model with the confirmed new intent category through incremental learning includes the following steps: Freeze the underlying parameters of the pre-trained language model and perform incremental training only on the classification layer; The labeled samples of the new intent category are mixed with the samples of the original known intent categories and input into the model, and the cross-entropy loss function is used for optimization. A regularization strategy is introduced to constrain the magnitude of changes in model parameters relative to their previous values ​​during training, in order to suppress catastrophic forgetting.

9. The method for online user demand analysis and classification based on intent recognition according to claim 1, characterized in that, The S5 also includes an intent category version management step: Maintain an intent category version library, recording the intent category set, model parameter configuration, and update timestamp of each version; Each time the model is updated, a new version record is automatically generated, and all historical version data is retained; In response to a rollback command, the current model is restored to a specified historical version.

10. The method for online user demand analysis and classification based on intent recognition according to claim 1, characterized in that, The S4 also includes an online monitoring step: Real-time statistics on the number of unknown intents identified, the distribution of candidate new intent clusters, and review progress indicators; The aforementioned indicator data is displayed through a visual interface; When the temporal change in the number of unknown intents identified or the distribution of clustering results meets the preset alarm conditions, an alarm notification is automatically triggered.