Text intention classification method and device, equipment and medium

By processing multiple evaluation texts of the target text, key information vectors are generated and clustered and screened, the intention classification model is optimized, and the problem of low recognition accuracy caused by excessive dependence on fixed training samples in the prior art is solved, and the accuracy and adaptability of intention classification are achieved.

CN120492624APending Publication Date: 2025-08-15UNICOM WOYUEDU TECH CULTURE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510367322.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

Existing intention recognition schemes rely too much on fixed training samples, resulting in low recognition accuracy, lack of flexibility and adaptability, especially when faced with new or different types of text expressions, the recognition accuracy is low.

Method used

By obtaining multiple evaluation texts of the target text, a key information vector is generated, and based on these vectors, a key evaluation text vector is selected, the intention classification model is optimized, and the evaluation experience and reading characteristics of different periods is used to select the key evaluation text vector with the most categories for training, and a multi-level intention classification model is constructed.

Benefits of technology

It improves the accuracy and robustness of intention classification, reduces dependence on fixed training samples, can better adapt to the intention recognition needs in different application scenarios, and improves the flexibility and recognition accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492624A_ABST
    Figure CN120492624A_ABST
Patent Text Reader

Abstract

The invention relates to a text intention classification method and device, equipment and a medium, and the method introduces evaluation texts of a target text, selects m key evaluation text vectors by utilizing different evaluation feelings of different evaluation texts on the target text and utilizing the characteristic that different periods have different reading feelings on the target text, and classifies the text intention according to m key evaluation text vectors. A group of key evaluation text vectors with the most categories are selected from the multiple key evaluation text vectors, and the trained intention classification model is optimized through the samples, so that the optimized intention classification model can learn feature information contained in different evaluation texts; and intention classification can be performed on the target text by using the features, so that the text intention classification accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of intent recognition, and in particular to a method, apparatus, device, and medium for text intent classification. Background Art

[0002] Intent Recognition is an important task in natural language processing (NLP), which aims to determine the intent or purpose expressed in a sentence.

[0003] However, existing intent recognition solutions have several limitations. Recognition accuracy is highly dependent on the quality of the training samples. This means that model performance depends heavily on the representativeness and diversity of the initial training data. Furthermore, over-reliance on fixed training samples can lead to a lack of flexibility and adaptability in the model. When faced with new, unseen expressions, the model may be unable to accurately recognize intent.

[0004] In view of the above problems, the existing technology is in urgent need of improvement. Summary of the Invention

[0005] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0006] The main purpose of the embodiments of the present invention is to provide a text intent classification method, device, equipment and medium.

[0007] To achieve the above objectives, a first aspect of an embodiment of the present invention provides a text intent classification method, the method comprising:

[0008] Acquire multiple evaluation texts of a target text, and determine a key information vector generated by key information of the target text;

[0009] Based on the M evaluation texts, obtaining M evaluation text vectors corresponding to the M evaluation texts;

[0010] Selecting m key evaluation text vectors from the M evaluation text vectors according to the key information vector; M and m are both positive integers greater than 1, and m is less than M;

[0011] Clustering is performed based on the m key evaluation text vectors to obtain n clusters, where n is a positive integer greater than 1 and less than m;

[0012] From the n clusters, select all key evaluation text vectors corresponding to the cluster with the most cluster points as training samples;

[0013] Tuning the intent classification model to be tuned based on the training samples to obtain the optimized intent classification model; the intent classification model to be tuned is an intent classification model trained based on the training samples; wherein the training samples include text samples and their labels;

[0014] The intent of the target text is determined based on the optimized intent classification model.

[0015] The text intent classification method provided in this application has at least the following beneficial effects:

[0016] The method includes obtaining M evaluation texts of a target text and determining a key information vector generated by key information of the target text; obtaining M evaluation text vectors corresponding to the M evaluation texts based on the M evaluation texts; selecting m key evaluation text vectors from the M evaluation text vectors according to the key information vectors; clustering based on the m key evaluation text vectors to obtain n clusters; n is a positive integer greater than 1, and n is less than m; from the n clusters, selecting all key evaluation text vectors corresponding to a cluster with the most clustering points as samples to be trained; tuning an intent classification model to be tuned based on the samples to be trained to obtain an optimized intent classification model; and determining the intent of the target text based on the optimized intent classification model.

[0017] This method introduces the evaluation text of the target text, utilizes the different evaluation feelings of different evaluation texts on the target text, and utilizes the characteristics of different reading feelings of the target text in different periods to select m key evaluation text vectors, and then selects a group of key evaluation text vectors with the most categories from multiple key evaluation text vectors. These samples are used to tune the trained intent classification model, so that the tuned intent classification model can learn the feature information contained in different evaluation texts, and then use these features to classify the target text intent, thereby improving the accuracy of intent classification.

[0018] In some embodiments, the step of selecting m key evaluation text vectors related to the key information vector from the M evaluation text vectors includes the following steps:

[0019] Calculating the cosine similarity between the evaluation text vector and the key information vector;

[0020] According to the order of the cosine similarity from large to small, m evaluation text vectors are selected as key evaluation text vectors.

[0021] In some embodiments, clustering the M evaluation text vectors to obtain m clusters includes:

[0022] Perform K-Means clustering on the M evaluation text vectors to obtain m clusters.

[0023] In some embodiments, the intent classification model includes: a convolutional layer, an activation function, a semantic feature extraction layer, and a multi-layer perceptron;

[0024] The training process of the intent classification model includes:

[0025] Inputting the training sample into the convolution layer to obtain the output sample features of the convolution layer;

[0026] Inputting the sample features into the semantic feature extraction layer to obtain the semantic features extracted as output;

[0027] Inputting the semantic features into the multi-layer perceptron to obtain the intention output by the multi-layer perceptron;

[0028] The intent and the label are back-propagated until the intent classification model training is completed.

[0029] In some embodiments, the target text is a content segment in an e-book article.

[0030] In some embodiments, obtaining M evaluation text vectors corresponding to the M evaluation texts includes:

[0031] The M evaluation texts are converted into M evaluation text vectors according to word2vec.

[0032] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present invention provides a text intent classification device, the device comprising:

[0033] a text extraction module, configured to obtain a plurality of evaluation texts of a target text and determine a key information vector generated from key information of the target text;

[0034] A vector switching module, configured to obtain M evaluation text vectors corresponding to the M evaluation texts based on the M evaluation texts;

[0035] A key vector extraction module, configured to select m key evaluation text vectors from the M evaluation text vectors according to the key information vector; M and m are both positive integers greater than 1, and m is less than M;

[0036] A clustering vector module, configured to perform clustering based on the m key evaluation text vectors to obtain n clusters; n is a positive integer greater than 1 and less than m;

[0037] The sample acquisition module is used to select all key evaluation text vectors corresponding to the cluster with the most cluster points from n clusters as training samples;

[0038] A model tuning module, configured to tune the intent classification model to be tuned based on the training samples to obtain the optimized intent classification model; the intent classification model to be tuned is an intent classification model trained based on the training samples; wherein the training samples include text samples and their labels;

[0039] An intent recognition module is used to determine the intent of the target text based on the optimized intent classification model.

[0040] In some embodiments, the key vector extraction module includes a similarity calculation module and a screening module, wherein:

[0041] The similarity calculation module is used to calculate the cosine similarity between the evaluation text vector and the key information vector;

[0042] The screening module is used to select m evaluation text vectors as key evaluation text vectors in descending order of the cosine similarity.

[0043] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present invention provides an electronic device, comprising: at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the above-mentioned text intent classification method.

[0044] To achieve the above-mentioned purpose, a fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned text intent classification method.

[0045] It can be understood that the beneficial effects of the second to fourth aspects compared with the relevant technologies are the same as the beneficial effects of the first aspect compared with the relevant technologies. Please refer to the relevant description in the first aspect and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0047] Figure 1 is a schematic diagram of a text intent classification method provided by an embodiment of the present application;

[0048] Figure 2 is a schematic diagram of a text intent classification device provided by an embodiment of the present application;

[0049] Figure 3 This is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0051] Intent recognition is a key task in natural language processing, aiming to determine the intent or purpose expressed in a sentence. Current intent recognition solutions rely heavily on the quality of training samples, and over-reliance on fixed training samples results in low intent recognition accuracy.

[0052] Existing technologies have limitations, primarily due to their strong reliance on training samples. This results in lower recognition accuracy when encountering new or different types of text. To overcome these limitations, this paper proposes a new method for text intent classification. This method processes multiple evaluation texts of the target text to generate key information vectors, which are then clustered and filtered based on these vectors. This method ultimately optimizes the intent classification model and improves recognition accuracy.

[0053] like Figure 1 , the specific implementation steps of the present invention are as follows:

[0054] Step S110, obtaining M evaluation texts of the target text, and determining a key information vector generated by key information of the target text;

[0055] Step S120, based on the M evaluation texts, obtaining M evaluation text vectors corresponding to the M evaluation texts;

[0056] Step S130, selecting m key evaluation text vectors from the M evaluation text vectors according to the key information vector;

[0057] Step S140: clustering is performed based on the m key evaluation text vectors to obtain n clusters; n is a positive integer greater than 1 and less than m;

[0058] Step S150: Select all key evaluation text vectors corresponding to the cluster with the most cluster points from the n clusters as training samples;

[0059] Step S160, optimizing the intent classification model to be optimized based on the training sample to obtain an optimized intent classification model;

[0060] Step S170: Determine the intent of the target text based on the optimized intent classification model.

[0061] In step S110, the target text can be various articles, and the key information of the target text can be keywords such as the title, subtitle, abstract characters in the article that can represent the main content of the article. The evaluation text of the target text can be published on various forums (such as Baidu Tieba) and various platforms (such as QQ Reading). This evaluation text can be issued by the author (such as publishing the feeling when writing the target text) or by the reader (such as the reading feeling after the reader reads the text). Because the evaluation text at different times is affected by various factors (such as social environment, personal mentality, etc.), the same person has different reading feelings about the target text at different times. Therefore, these evaluation texts can be used as training samples to tune the model so that the model can learn feature information that changes over time, thereby improving the classification accuracy of the target text.

[0062] In some embodiments, the text may be converted into a vector via word2vec.

[0063] In step S120 , it is converted into a vector for subsequent vector calculation.

[0064] In step S130 , the purpose of this step is to select evaluation texts with a relatively large number of key words and filter out inappropriate evaluation text vectors to improve the quality of substitute training texts.

[0065] In step S140 , clustering is performed based on the m key evaluation text vectors to obtain n clusters. Then there are n categories, and each cluster is the key evaluation text vector of a category.

[0066] In step S150, all key evaluation texts corresponding to the cluster with the largest vector quantity are selected from the multiple clusters as training samples. Since the cluster has the largest number of key evaluation texts, it represents the most frequent and representative evaluation texts among the multiple evaluation texts. It should also be noted that the composition of the training samples also includes the labels corresponding to the key evaluation text vectors.

[0067] In step S160, the intent classification model to be tuned is tuned based on the training sample to obtain an optimized intent classification model, wherein the intent classification model to be tuned is an intent classification model trained based on the training sample; wherein the training sample includes a text sample and its label.

[0068] In step S170 , the intent of the target text may be determined based on the tuned intent classification model.

[0069] This method has at least the following beneficial effects:

[0070] The method includes obtaining M evaluation texts of a target text and determining a key information vector generated by key information of the target text; obtaining M evaluation text vectors corresponding to the M evaluation texts based on the M evaluation texts; selecting m key evaluation text vectors from the M evaluation text vectors according to the key information vectors; clustering based on the m key evaluation text vectors to obtain n clusters; n is a positive integer greater than 1, and n is less than m; from the n clusters, selecting all key evaluation text vectors corresponding to a cluster with the most clustering points as samples to be trained; tuning an intent classification model to be tuned based on the samples to be trained to obtain an optimized intent classification model; and determining the intent of the target text based on the optimized intent classification model.

[0071] This method introduces the evaluation text of the target text, utilizes the different evaluation feelings of different evaluation texts on the target text, and utilizes the characteristics of different reading feelings of the target text in different periods to select m key evaluation text vectors, and then selects a group of key evaluation text vectors with the most categories from multiple key evaluation text vectors. These samples are used to tune the trained intent classification model, so that the tuned intent classification model can learn the feature information contained in different evaluation texts, and then use these features to classify the target text intent, thereby improving the accuracy of intent classification.

[0072] Furthermore, the present application also proposes selecting m key evaluation text vectors related to the key information vector from the M evaluation text vectors, including the following steps:

[0073] Step S210, calculating the cosine similarity between the evaluation text vector and the key information vector;

[0074] Step S220 : selecting m evaluation text vectors as key evaluation text vectors in descending order of cosine similarity.

[0075] To implement this solution, we first need to calculate the cosine similarity between each review text vector and the key information vector. Cosine similarity is a commonly used metric to measure the similarity between two vectors. It is calculated by dividing the dot product of the two vectors by the product of their moduli. Specifically, assuming that the review text vector is A and the key information vector is B, the cosine similarity between them is calculated as follows:

[0076] sim(A,B)=(A·B) / (||A||*||B||)

[0077] After calculating the cosine similarities between all evaluation text vectors and key information vectors, these similarity values are sorted in descending order, and then the first m evaluation text vectors are selected as key evaluation text vectors.

[0078] This demonstrates that by calculating the cosine similarity between the review text vector and the key information vector, and selecting m review text vectors in descending order of similarity, this application effectively selects the key review text vectors associated with the key information. This technical solution improves the training sample quality of the intent classification model to a certain extent, thereby enhancing the model's intent recognition accuracy.

[0079] Furthermore, the present application also proposes to perform K-Means clustering on the M evaluation text vectors to obtain m clusters.

[0080] The K-Means clustering method can make the clustering results more stable and reliable, thereby improving the tuning effect of the intent classification model.

[0081] K-Means clustering is a commonly used unsupervised learning algorithm, which is mainly used to divide a data set into k clusters. Specifically, k initial cluster centers are first randomly selected, and then the positions of the cluster centers are continuously adjusted through iterative optimization until the clustering results converge. In this application, by selecting m key evaluation text vectors as the initial cluster center points, the clustering process can be made more efficient and accurate. Furthermore, different distance measurement methods, such as Euclidean distance, Manhattan distance, etc., can also be used to adapt to different application scenarios and data characteristics.

[0082] By performing K-Means clustering on the evaluation text vectors, we can better capture the characteristics of different intents, thereby improving the tuning effect of the intent classification model. Compared with existing technologies, the method of this application not only improves the accuracy of intent recognition, but also reduces the reliance on fixed training samples. This can better adapt to the intent recognition needs of different application scenarios and improve the robustness and flexibility of the system.

[0083] Furthermore, this application also proposes that the intent classification model includes:

[0084] Convolutional layers;

[0085] Activation function;

[0086] Semantic feature extraction layer;

[0087] as well as,

[0088] Multilayer Perceptron.

[0089] The training process of the intent classification model includes: inputting the training samples into the convolutional layer to obtain the sample features output by the convolutional layer; inputting the sample features into the semantic feature extraction layer to obtain the semantic features output by the semantic feature extraction layer; inputting the semantic features into the multi-layer perceptron to obtain the intent output by the multi-layer perceptron; and backpropagating the intent and label until the intent classification model training is completed.

[0090] This method constructs a multi-layered intent classification model by introducing convolutional layers, activation functions, semantic feature extraction layers, and multi-layer perceptrons. First, the convolutional layers extract low-level features from training samples, while activation functions introduce nonlinear factors to enhance the model's expressiveness. Next, the semantic feature extraction layer further abstracts and extracts semantic features from the samples. Finally, the multi-layer perceptron classifies and outputs intents. Throughout the training process, the model parameters are continuously optimized through a backpropagation mechanism to improve the accuracy of intent classification.

[0091] During implementation, the convolutional layer can employ multiple layers of convolution and pooling, and the activation function can be ReLU or other common activation functions. The semantic feature extraction layer can be fine-tuned based on a pre-trained language model such as BERT to achieve higher-quality semantic representation. The multi-layer perceptron, composed of several fully connected layers, achieves intent classification through layer-by-layer transfer and nonlinear transformations. The entire training process uses a backpropagation algorithm to adjust model parameters, ensuring that the model can effectively learn and recognize the intent of different texts.

[0092] Therefore, this application significantly improves the accuracy and robustness of intent classification by introducing a multi-level intent classification model and an optimized training process. Compared with existing technologies, this solution not only better extracts the semantic features of text, but also continuously optimizes the model through a backpropagation mechanism, thus solving the problem of low recognition accuracy caused by excessive reliance on fixed training samples in existing technologies.

[0093] Furthermore, the present application also proposes that the target text is a content fragment in an e-book article.

[0094] The technical solution of the present application aims to solve the problem that the existing intent recognition solutions are overly dependent on fixed training samples, resulting in low recognition accuracy. By taking the content fragments of the target text as part of the e-book article, the clustering technology of the key information vector and the evaluation text vector in the text intent classification method is used to optimize the intent classification model, thereby improving the recognition accuracy. Specifically, the present application first obtains multiple evaluation texts of the target text and determines the key information vector generated by the key information of the target text. Then, based on these evaluation texts, the corresponding evaluation text vectors are obtained, and the key evaluation text vectors related to the key information vector are selected. Based on these key evaluation text vectors as cluster center points, all evaluation text vectors are clustered to obtain several clusters. All the evaluation text vectors of the cluster with the most cluster points are selected as samples to be trained, and the intent classification model is tuned based on these samples to finally obtain the optimized intent classification model. Through the optimized model, the intent of the target text can be determined more accurately.

[0095] In this application, the target text is a content fragment from an e-book article. This feature makes this method highly applicable when processing long texts. Specifically, the content fragments in e-book articles can contain rich semantic information. Through the extraction and cluster analysis of key information vectors, the intent in the text can be better captured. Furthermore, this application uses word2vec technology to convert the evaluation text into a vector representation. This technical means is widely used in the field of natural language processing and can effectively capture the semantic features of the text, thereby improving the accuracy of intent classification.

[0096] In summary, the text intent classification method proposed in this application processes content fragments in e-book articles and utilizes clustering techniques based on key information vectors and evaluation text vectors to optimize the intent classification model. This solves the existing problem of low recognition accuracy caused by over-reliance on fixed training samples. Therefore, the technical solution proposed in this application has significant advantages in improving the accuracy of intent recognition.

[0097] Furthermore, the present application also proposes obtaining M evaluation text vectors corresponding to the M evaluation texts, including: converting the M evaluation texts into M evaluation text vectors according to word2vec.

[0098] The technical solution of this application uses word2vec technology to convert multiple evaluation texts into corresponding vector representations. Word2vec is a technology used to embed words into a low-dimensional vector space. By training a neural network model, it can map words into a continuous vector space, so that semantically similar words are closer in the vector space. In this way, the word information in the text can be converted into a vector representation, thus providing a basis for subsequent text processing and analysis.

[0099] Specifically, word2vec technology can be implemented in two ways: CBOW (Continuous Bag of Words) and Skip-gram. The CBOW model predicts target words based on context words, while the Skip-gram model predicts context words based on target words. Both models can effectively capture the semantic relationships between words. In this embodiment, the appropriate model can be selected for training and application based on specific needs.

[0100] For example, consider a collection of review texts. Using word2vec, each review text can be converted into a multidimensional vector. These vectors will serve as the basis for subsequent clustering and analysis. Furthermore, these vectors can be normalized to ensure more accurate distance calculations between different vectors.

[0101] This application introduces word2vec technology to convert multiple evaluation texts into corresponding vector representations, thereby providing basic data support for subsequent text clustering and intent classification. Compared with traditional text representation methods, word2vec can better capture the semantic relationship between words, improving the accuracy and effectiveness of text vector representation. Therefore, the technical solution of this application can improve the accuracy of the intent classification model while reducing the dependence on fixed training samples, thereby improving the accuracy and robustness of intent recognition.

[0102] Reference Figure 2 In one embodiment, a text intent classification device is provided, the device comprising:

[0103] The text extraction module 1100 is used to obtain M evaluation texts of the target text and determine the key information vector generated by the key information of the target text;

[0104] The vector switching module 1200 is used to obtain M evaluation text vectors corresponding to the M evaluation texts based on the M evaluation texts;

[0105] The key vector extraction module 1300 is used to select m key evaluation text vectors from M evaluation text vectors according to the key information vector; M and m are both positive integers greater than 1, and m is less than M;

[0106] The clustering vector module 1400 is used to perform clustering based on m key evaluation text vectors to obtain n clusters; n is a positive integer greater than 1 and n is less than m;

[0107] The sample acquisition module 1500 is used to select all key evaluation text vectors corresponding to a cluster with the most cluster points from the n clusters as training samples;

[0108] The model tuning module 1600 is used to tune the intent classification model to be tuned based on the training samples to obtain an optimized intent classification model; the intent classification model to be tuned is an intent classification model trained based on the training samples; wherein the training samples include text samples and their labels;

[0109] The intent recognition module 1700 is used to determine the intent of the target text based on the optimized intent classification model.

[0110] It should be noted that the text intent classification device provided in this embodiment is based on the same inventive concept as the above-mentioned text intent classification method. Therefore, the relevant content of the above-mentioned text intent classification method is also applicable to the content of the text intent classification device. Therefore, it will not be repeated here.

[0111] Furthermore, the key vector extraction module 1300 includes a similarity calculation module and a screening module, wherein:

[0112] Similarity calculation module, used to calculate the cosine similarity between the evaluation text vector and the key information vector;

[0113] The screening module is used to select m evaluation text vectors as key evaluation text vectors in descending order of cosine similarity.

[0114] like Figure 3 , an embodiment of the present application further provides an electronic device, the electronic device comprising:

[0115] at least one memory;

[0116] at least one processor;

[0117] at least one program;

[0118] The programs are stored in the memory, and the processor executes at least one program to implement the above-mentioned text intent classification method implemented in the present disclosure.

[0119] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.

[0120] The electronic device according to the embodiment of the present application is described in detail below.

[0121] The processor 1600 may be implemented as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present invention.

[0122] Memory 1700 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). Memory 1700 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in memory 1700 and is called by processor 1600 to execute a text intent classification method according to an embodiment of the present invention.

[0123] Input / output interface 1800, used for information input and output;

[0124] Communication interface 1900, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0125] bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 );

[0126] The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .

[0127] An embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned text intent classification method.

[0128] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0129] The embodiments described in the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.

[0130] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present invention, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0131] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0132] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0133] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0134] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0135] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0136] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0137] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0138] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling an electronic device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0139] The above is a specific description of the preferred implementation of the embodiments of the present application, but the embodiments of the present application are not limited to the above-mentioned implementation methods. Technical personnel familiar with the art can also make various equivalent modifications or substitutions without violating the spirit of the embodiments of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the embodiments of the present application.

Claims

1. A text intent classification method, characterized in that: The method comprises: Obtaining M evaluation texts of a target text, and determining a key information vector generated by key information of the target text; Based on the M evaluation texts, obtaining M evaluation text vectors corresponding to the M evaluation texts; Selecting m key evaluation text vectors from the M evaluation text vectors according to the key information vector; M and m are both positive integers greater than 1, and m is less than M; Clustering is performed based on the m key evaluation text vectors to obtain n clusters, where n is a positive integer greater than 1 and less than m; From the n clusters, select all key evaluation text vectors corresponding to the cluster with the most cluster points as training samples; Tuning the intent classification model to be tuned based on the training samples to obtain the optimized intent classification model; the intent classification model to be tuned is an intent classification model trained based on the training samples; wherein the training samples include text samples and their labels; The intent of the target text is determined based on the optimized intent classification model.

2. The text intent classification method according to claim 1, characterized in that The step of selecting m key evaluation text vectors from the M evaluation text vectors according to the key information vector comprises the following steps: Calculating the cosine similarity between the evaluation text vector and the key information vector; According to the order of the cosine similarity from large to small, m evaluation text vectors are selected as key evaluation text vectors.

3. The text intent classification method according to claim 2, characterized in that Clustering is performed based on the M evaluation text vectors to obtain m clusters, including: Perform K-Means clustering on the M evaluation text vectors to obtain m clusters.

4. The text intent classification method according to claim 1, characterized in that The intent classification model includes: a convolutional layer, an activation function, a semantic feature extraction layer, and a multi-layer perceptron; The training process of the intent classification model includes: Inputting the training sample into the convolution layer to obtain the output sample features of the convolution layer; Inputting the sample features into the semantic feature extraction layer to obtain the semantic features extracted as output; Inputting the semantic features into the multi-layer perceptron to obtain the intention output by the multi-layer perceptron; The intent and the label are back-propagated until the intent classification model training is completed.

5. The text intent classification method according to claim 4, characterized in that: The target text is a content fragment of the article.

6. The text intent classification method according to claim 1, characterized in that The obtaining of M evaluation text vectors corresponding to the M evaluation texts includes: The M evaluation texts are converted into M evaluation text vectors according to word2vec.

7. A text intent classification device, characterized in that: The device comprises: A text extraction module, configured to obtain M evaluation texts of a target text and determine a key information vector generated from key information of the target text; A vector switching module, configured to obtain M evaluation text vectors corresponding to the M evaluation texts based on the M evaluation texts; A key vector extraction module, configured to select m key evaluation text vectors from the M evaluation text vectors according to the key information vector; M and m are both positive integers greater than 1, and m is less than M; A clustering vector module, configured to perform clustering based on the m key evaluation text vectors to obtain n clusters; n is a positive integer greater than 1 and less than m; The sample acquisition module is used to select all key evaluation text vectors corresponding to the cluster with the most cluster points from n clusters as training samples; A model tuning module, configured to tune the intent classification model to be tuned based on the training samples to obtain the optimized intent classification model; the intent classification model to be tuned is an intent classification model trained based on the training samples; wherein the training samples include text samples and their labels; An intent recognition module is used to determine the intent of the target text based on the optimized intent classification model.

8. The text intention classification device according to claim 7, characterized in that: The key vector extraction module includes a similarity calculation module and a screening module, wherein: The similarity calculation module is used to calculate the cosine similarity between the evaluation text vector and the key information vector; The screening module is used to select m evaluation text vectors as key evaluation text vectors in descending order of the cosine similarity.

9. An electronic device, characterized in that: include: at least one control processor and a memory for communicatively coupling with the at least one control processor; The memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the text intent classification method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the text intent classification method according to any one of claims 1 to 7.