Text information classification method, mobile terminal and computer-readable storage medium

By determining the vertical intent of text information, using simple regular expressions and deep neural network combination classification methods, the problem of slow classification of complex text information is solved, and fast and efficient text information recognition is achieved.

CN115605861BActive Publication Date: 2025-09-05SHENZHEN HEYTAP TECHNOLOGY CO LTD +1

Patent Information

Application Number
CN202080098028.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-02
Publication Date
2025-09-05
Estimated Expiration
2040-06-02

AI Technical Summary

Technical Problem

When the prior art processes complex text information, resources are wasted and calculation time is extended, resulting in slow classification recognition speed and affecting the output experience.

Method used

By determining the vertical intent of text information, using simple regular expressions for rough screening and recall, combining regular recall models and deep neural networks for detailed classification, avoiding resource waste and speeding up the classification process.

Benefits of technology

It realizes rapid classification of complex text information, reduces computing resource usage, and improves recognition speed and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115605861B_ABST
    Figure CN115605861B_ABST
Patent Text Reader

Abstract

A text information classification method, mobile terminal, and computer-readable storage medium. The classification method includes: obtaining text information (S11); determining the vertical domain intent of the text information (S12); when the vertical domain intent of the text information meets the set vertical domain intent, recalling the text information and then classifying the text information by intent (S13); when the vertical domain intent of the text information does not meet the set vertical domain intent, rejecting the text information (S14). Through the above method, the classification of text information can be effectively accelerated and computer resources can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of text classification, and in particular to a text information classification method, a mobile terminal, and a computer-readable storage medium. Background Art

[0002] With the development of text classification technology, text classification has been applied in online and offline industrial scenarios, such as: product review polarity analysis in the e-commerce field, automatic archiving and classification of data texts, sensitive topic detection in forums, and online user intent recognition in voice assistants.

[0003] When the text information is more complex, the timeliness requirement is higher, and it is often necessary to return reliable results in a shorter time using fewer resources. For such applications, since there are many task categories and the intentions involved are more complex and have greater differences, complex text classification models are often used to uniformly process complex text information.

[0004] At present, because complex text classification models are used for complex text information, when the complexity of the input text information is uncertain, it often leads to waste of resources of the complex classification model and extended calculation time, thereby slowing down the classification and recognition speed of text information, and further affecting the text classification output experience. Summary of the Invention

[0005] The present application provides a text information classification method, a mobile terminal, and a computer-readable storage medium to solve the current problem of relatively slow text information classification speed.

[0006] A first aspect of an embodiment of the present application provides a method for classifying text information, including: acquiring text information; determining the vertical intent of the text information; when the vertical intent of the text information meets the set vertical intent, recalling the text information and then classifying the text information by intent; and rejecting the text information when the vertical intent of the text information does not meet the set vertical intent.

[0007] The second aspect of an embodiment of the present application provides a mobile terminal, including: an acquisition module for acquiring text information; a determination module for determining the vertical domain intent of the text information; a recall module for recalling the text information when the vertical domain intent of the text information meets the set vertical domain intent; an intent classification module for classifying the text information after the recall module recalls the text information; and a rejection module for rejecting the text information when the vertical domain intent of the text information does not meet the set vertical domain intent.

[0008] A third aspect of an embodiment of the present application provides a mobile terminal, comprising: a processor, a memory, and a computer program stored in the memory and running on the processor, wherein the processor is configured to execute the computer program to implement the method provided in the first aspect of the embodiment of the present application.

[0009] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by a processor to implement the method provided in the first aspect of the embodiment of the present application.

[0010] The beneficial effects of the present application are as follows: Different from the prior art, the present application first determines the vertical domain intent of text information with uncertain complexity; when the vertical domain intent of the text information meets the set vertical domain intent, the text information is recalled and the text information is classified by intent, and different classification methods are used for text information with uncertain complexity. Different classification methods are simpler and faster than complex models, so text information with different recognition difficulties can be quickly given judgment results in different levels of classification, thereby accelerating intent classification. Therefore, through the above method, it is possible to effectively avoid the waste of resources of complex classification models and accelerate the classification of text information, thereby improving the classification and recognition speed of text information, and thus reducing computer resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] 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 description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0012] Figure 1 This is a flowchart of the first embodiment of the text information classification method of the present application;

[0013] Figure 2 yes Figure 1 FIG. 1 is a flow chart of a specific embodiment of step S12 shown in FIG.

[0014] Figure 3 yes Figure 1 FIG. 1 is a flow chart of a specific embodiment of step S13 shown in FIG.

[0015] Figure 4 yes Figure 3 FIG. 1 is a flow chart of a specific embodiment of step S33 shown in FIG.

[0016] Figure 5 yes Figure 3 A schematic flow chart of another specific embodiment shown;

[0017] Figure 6 This is a flowchart of the second embodiment of the text information classification method of the present application;

[0018] Figure 7 is a schematic block diagram of an embodiment of a mobile terminal of the present application;

[0019] Figure 8 is a schematic block diagram of another embodiment of a mobile terminal of the present application;

[0020] Figure 9 This is a schematic block diagram of a circuit of an embodiment of a computer-readable storage medium of the present application.

[0021] Figure 10 It is a schematic diagram of the structural composition of an embodiment of a mobile terminal device of the present application. DETAILED DESCRIPTION

[0022] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0023] It will be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0024] It should also be understood that the terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0025] It should be further understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0026] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0027] In order to illustrate the technical solution described in this application, specific embodiments are provided below.

[0028] See also Figure 1 , Figure 1 1 is a flow chart of the first embodiment of the text information classification method of the present application. The method provided in this embodiment specifically includes the following steps:

[0029] S11: Obtain text information;

[0030] Generally speaking, many smart devices are equipped with voice recognition functions, and voice assistants have become a common application in people's daily lives. Voice assistant applications not only involve complex text classification operations but also require real-time interaction with users. Taking mobile terminals as an example, when a voice assistant application is activated on a mobile terminal, it can obtain the user's voice input in real time. The mobile terminal converts the voice input into text information corresponding to the voice, thus enabling the mobile terminal to obtain text information in real time.

[0031] In addition, if the mobile terminal is provided with a voice jack, the voice jack can be connected to an earphone, and text information can be obtained by collecting sound from the earphone. If voice input is performed through a wireless earphone, text information can also be obtained by collecting sound from the wireless earphone. Of course, those skilled in the art can obtain text information through other methods known in the art.

[0032] S12: Determine the vertical domain intent of the text information;

[0033] Typically, voice input is a single text message input, which means that the text information obtained is also generally a single text message input. However, due to the wide range of functions supported by voice assistants, in actual implementation, multiple models from different vertical domains process this text message input in parallel. For example, one model specializes in processing emotional questions and answers, and another model specializes in processing system operations. Both models need to respond to the same text message input. The above examples use these two models. In reality, there may be dozens or even hundreds of models processing a single text message input simultaneously, which consumes a lot of computing resources. Therefore, it is particularly important to be able to quickly and promptly determine the specific vertical domain intent of the obtained text message, that is, to determine the vertical domain intent of the text message.

[0034] Therefore, the vertical intent of the acquired text information can be roughly selected. If it is determined that the vertical intent of the text information belongs to a certain approximate vertical intent, step S13 is entered to quickly return the classification result, thereby greatly saving subsequent computing resources.

[0035] S13: When the vertical domain intent of the text information meets the set vertical domain intent, the text information is recalled and the intent of the text information is classified;

[0036] Mobile terminals are pre-configured with a vertical intent to determine whether the vertical intent of a text message satisfies the specified vertical intent. Because the vertical intent module is more refined, it can directly classify the vertical intent of an input text message into a specific intent within the vertical domain. Because determining whether the vertical intent of a text message satisfies the specified vertical intent is a more detailed task, this module is more complex than determining the vertical intent of a text message. This module also has a rejection capability, returning a rejection intent to text messages that fall into the rejection category.

[0037] For vertical domain classification tasks, only a portion of the text will pass through the vertical intent determination module to quickly determine whether the text meets the set vertical intent. This is because through the screening of multiple models, there is a high probability that the input text meets the set vertical intent.

[0038] When the vertical domain intent of the text information meets the set vertical domain intent, the text information is recalled and the text information is classified. Further, after the set vertical domain intent is met, a corresponding interrupt signal can be generated to notify the mobile terminal to perform the corresponding operation.

[0039] S14: When the vertical domain intent of the text information does not meet the set vertical domain intent, reject the text information.

[0040] Through the above method, this application first determines the vertical domain intent of the text information for text information with uncertain complexity; when the vertical domain intent of the text information meets the set vertical domain intent, the text information is recalled and the text information is classified by intent, and different classification methods are used for text information with uncertain complexity. Different classification methods are simpler and faster than complex models, so text information with different recognition difficulties can be quickly given judgment results in different levels of classification, thereby accelerating intent classification. Therefore, through the above method, it is possible to effectively avoid the waste of resources of complex classification models and accelerate the classification of text information, thereby improving the classification and recognition speed of text information, and then reducing computer resources.

[0041] See also Figure 2 , Figure 2 yes Figure 1The flowchart of a specific implementation of step S12 shown in FIG. 1 specifically includes the following steps:

[0042] S21: Perform keyword matching on the text information and multiple keyword groups to obtain multiple matching degrees; wherein each keyword group corresponds to a vertical domain intent;

[0043] This step is mainly used to roughly select the acquired text information, so the rough recall module can be used to process the acquired text information. Since the mobile terminal is preset with a model formed by multiple skill groups, such as multiple keyword groups, where each keyword group corresponds to a vertical domain intent, and each keyword group is a regular expression formed by multiple keywords, then the regular expression can be used to roughly select the vertical domain intent of the acquired text information, such as using a simpler regular expression. For the use scenario of simple regular expressions, such as a certain skill group is specifically used to process tasks such as alarm clocks, countdowns, and schedules, for this type of task, the input text of "time" is an important element, so a simple regular expression can be used. For example, "{2,4}year{1,2}month{1,2}day" is used to check whether the input contains a time element. If the input text contains a time element and also contains task keywords such as "alarm clock" and "timing", it can be recalled by the rough recall module and enter the subsequent process.

[0044] Because this module processes all text input, it requires high speed and computational complexity. Therefore, simple regular expressions are used to recall text messages within this module. By using simple regular expressions to process text messages, the mobile terminal can quickly filter out text messages that fall within this vertical domain intent. Text messages that do not fall within this vertical domain intent are directly rejected, significantly saving subsequent computing resources.

[0045] S22: sorting the multiple matching degrees corresponding to the multiple keyword groups by relevance;

[0046] The various skill groups pre-set by the mobile terminal simultaneously process the acquired text information to obtain multiple matching degrees, and sort the multiple matching degrees corresponding to the multiple keyword groups by relevance, so as to obtain different rough screening results.

[0047] Furthermore, a vertical skill group has a coarse recall module. Matching only keywords or using simple regular expressions significantly reduces computational overhead compared to statistical or deep learning models. Testing using data from real-world environments has shown that both average and peak performance are orders of magnitude lower than with a single model.

[0048] S23: The vertical intent corresponding to the keyword group with the highest matching degree is used as the vertical intent of the text information.

[0049] The rough screening results obtained through relevance sorting can obtain the vertical domain intent corresponding to the keyword group with the highest matching degree, thereby determining the vertical domain intent of the text information.

[0050] Of course, based on the technical inspiration of this application, those skilled in the art can fully conceive of setting other ways of determining the vertical domain of text information according to actual needs.

[0051] See also Figure 3 , Figure 3 yes Figure 1 The flowchart of a specific implementation of step S13 shown in FIG. 1 specifically includes the following steps:

[0052] S31: When the vertical domain intent of the text information satisfies the set vertical domain intent, recall the text information and perform a first intent classification on the text information; wherein the first intent classification includes at least one intent class and one rejection class;

[0053] For the classification of vertical domain tasks, only part of the text information will pass through the fast coarse recall module and reach step S31. Step S31 can use a regular expression recall module, that is, a regular recall model. This module and the coarse recall module also use regular expressions with fast calculation speed. The difference is that the coarse recall module only distinguishes whether the task belongs to this vertical domain task, while the regular recall model is more detailed and can directly classify the input text information into the specific intention within the vertical domain, that is, set the vertical domain intention. Because the tasks are more detailed, the regular expressions used in this module are more complex than those in the coarse recall module. However, this module also has the ability to reject, that is, to return the rejection intention for text information that hits the rejection category.

[0054] When the vertical domain intent of the text information meets the set vertical domain intent, it means that the text information belongs to the set vertical domain intent, then the text information is recalled and the text information is subjected to a first intent classification; wherein, the first intent classification includes at least one intent class and one rejection class, to indicate that the first intent classification has the ability to reject.

[0055] Furthermore, for the recalled text information, the text information can be input into a regular recall model so that the regular recall model performs a first intent classification on the text information, wherein the first intent classification includes at least one intent class and one rejection class.

[0056] Specifically, the text information is serially matched with the regular database of the regular recall model so that the regular recall model performs a first intent classification on the text information and outputs a first intent classification result; wherein the first intent classification result includes at least one intent class result and one rejection class result.

[0057] For example, if the coarse recall module matches the keyword "alarm clock" and the key text "tomorrow," the input text will be assigned to the regular expressions related to alarm clocks for serial matching. Since the regular recall model primarily processes high-frequency, simple text information and more complex text information that is difficult to classify using the model, the number of serial regular expressions is relatively small. Furthermore, using regular expression matching to classify high-frequency text information saves computing time and resources. Of course, the regular recall model also processes general text information.

[0058] When the text information meets at least one intent class of the first intent classification result, step S32 is entered; when the text information does not meet at least one intent class and the rejection class of the first intent classification result, step S33 is entered; when the text information meets the rejection class of the first intent classification, the text information is rejected.

[0059] S32: When the text information satisfies at least one of the intent classes of the first intent classification, performing slot extraction on the text information;

[0060] Typically, users can add, delete, or modify regular expressions in a regular recall model based on business needs. This makes regular expressions in regular recall models convenient and controllable, allowing for quick repair and modification of small amounts of specific text information and rapid control of output results.

[0061] For the processing of high-frequency text information, let's take an example to illustrate. In the alarm clock scenario, "Set an alarm for 8 o'clock tomorrow morning" is a relatively high-frequency statement. For example, in 10 million input text messages, this statement appears 100,000 times. Then, by setting a regular expression, these 100,000 text messages can be recalled in advance, so that the text information meets at least one intent class of the first intent classification, thereby saving the computing resource consumption of 100,000 deep models; at the same time, it also improves the processing efficiency of more text information, resulting in higher returns.

[0062] When the text information satisfies at least one of the intent classes of the first intent classification, slot extraction is performed on the text information.

[0063] Specifically, when the text information meets one of the following conditions: high-frequency simple text information, or more complex text information that is difficult to classify using a model, slot extraction is performed on the text information. The specific slot extraction can be determined based on business needs, such as the content of the text information, name, amount, etc.

[0064] S33: When the text information does not satisfy at least one intent class and a rejection class of the first intent classification, a second intent classification is performed on the text information.

[0065] If the text information obtained through the previous model screening does not meet at least one intent class and rejection class of the first intent classification, then the mobile terminal will consider that the text information belongs to the second intent classification, that is, confirming that the input text information belongs to the input of this vertical domain intent. This part accounts for a small proportion of all inputs, so a deep neural network with greater complexity and better effect can be used for the second intent classification.

[0066] See also Figure 4 , Figure 4 yes Figure 3 The flowchart of a specific implementation of step S33 shown in FIG. 3 specifically includes the following steps:

[0067] S41: Determine whether the second intent classification of the text information satisfies at least one intent class of the second intent classification;

[0068] The second intent classification includes at least one intent class and a rejection class. Setting at least one intent class can be used to determine whether the second intent classification of the text information meets one of the at least one intent class of the second intent classification. The second intent classification of the text information specifically includes:

[0069] The text information is input into the intent classification model so that the intent classification model performs a second intent classification on the text information and outputs a second intent classification result; wherein the second intent classification result includes at least one intent class and one rejection class.

[0070] Among them, the second intent classification module can use the Text Convolutional Neural Network (Text CNN) model, that is, a method of classifying text through a convolutional neural network, to perform N+1 classifications on the text information entering this module, that is, N categories belonging to the task intent of this vertical domain, and one category that does not belong to this vertical domain, that is, rejection capability, where N represents a positive integer greater than or equal to 1.

[0071] The Text CNN model performs better than rule matching. Based on business needs, in addition to the Text CNN model, you can also choose more complex models such as the Long Short-Term Memory (LSTM) model, the Gate Recurrent Unit (GRU) model, the Transformer model, the Bidirectional Encoder Represenations from Transformers (BERT) model, and the Text-to-Text Transfer Transformer (T5) model. The Text CNN model is not a required option and is only used as an actual usage example. If the business situation can tolerate longer response times, you can choose a more complex model.

[0072] You can also select model parameters for optimization based on actual business needs, and compare resource consumption and performance benefits under different parameters to select a model. The specific parameters are not limited here.

[0073] If the text information satisfies at least one intent class in the second intent classification result, the process proceeds to step S42 ; if the text information satisfies a rejection class in the second intent classification result, the process proceeds to step S43 .

[0074] S42: extracting slots from text information;

[0075] After processing the input text information through the above modules, it has a high classification accuracy and the required slot results. If the text information meets at least one intent class in the second intent classification result, the text information is slot extracted. The slot extraction of text information is explained in detail below.

[0076] S43: Reject text message.

[0077] If the text information meets the rejection class in the second intent classification result, it means that the text information belongs to the rejection class, and the rejection intent is returned. That is, if the text information is determined not to belong to the intent of this vertical domain, the rejection classification result is returned, thereby saving subsequent computing resources.

[0078] See also Figure 5 , Figure 5 yes Figure 3 The flowchart of another specific embodiment shown in FIG. 1 specifically includes the following steps:

[0079] S51: When the vertical domain intent of the text information meets the set vertical domain intent, recall the text information and perform a first intent classification on the text information;

[0080] This step S51 is Figure 3 The steps S31 are similar and will not be described in detail here.

[0081] S52: Determine whether the first intent classification of the text information satisfies at least one intent class and one rejection class of the preset first intent classification;

[0082] Specifically, a mobile terminal can typically set a preset first intent classification, which is used to determine whether the first intent classification of the text message satisfies the preset first intent classification. In this embodiment, the preset first intent classification includes at least one intent class and one rejection class. If it is determined whether the first intent classification of the text message satisfies at least one intent class and one rejection class of the preset first intent classification, the process proceeds to step S55. If it is determined that it does not satisfy the first intent classification, the process proceeds to step S53.

[0083] Steps S52 and S55 are Figure 3 The steps S32 are similar and will not be described in detail here.

[0084] In this embodiment, if the text information meets at least one intent class of the first intent classification, step S55 is entered, and if the text information meets the rejection class of the first intent classification, the rejection classification intent can be directly returned.

[0085] Of course, those skilled in the art can fully conceive of setting other methods according to actual needs based on the technical inspiration of this application to make the first intent classification of text information meet the preset first intent classification conditions.

[0086] S53: re-determine the vertical domain intent of the text information;

[0087] After filtering by the two modules of the coarse recall model and the regular recall model, only part of the text information will re-determine the vertical domain intention of the text information.

[0088] Before performing a second intent classification on the text, the vertical intent of the text is re-determined. This can be accomplished using an intent recall model. This model performs the same task as the coarse recall module: reclassify the input text to determine whether it falls within the vertical intent of the task or not. Due to the limited complexity that regular expressions can handle, some text cannot be classified in the first two modules. Therefore, the intent recall model, which has the generalization capabilities of neural networks, is required to process the text again.

[0089] Specifically, the text information is input into the intent recall model so that the intent recall model determines the vertical intent of the text information; wherein, a confidence threshold can be set in the intent recall model, and the set confidence threshold can be used to determine the vertical intent of the text information. The set confidence threshold is adjustable. By adjusting the set confidence threshold, the recall rate of the text information can be increased, that is, the proportion of samples that are truly marked as positive samples and classified as positive samples.

[0090] Among them, the intent recall model can determine the vertical intent of text information based on the set confidence threshold, including:

[0091] Determine whether the vertical domain intent of the text information meets the set confidence threshold;

[0092] If the set confidence threshold is met, the vertical domain intent of the text information is determined;

[0093] If the set confidence threshold is not met, the text information is rejected.

[0094] Depending on business needs, the intent recall model can be a Fast Text neural network model, a method for learning word embeddings and text classification. This model leverages the generalization capabilities of the Fast Text neural network model, enabling it to process text input it has never received before. The intent recall model has greater computational complexity than regular expressions, but offers higher accuracy.

[0095] In addition, depending on business needs, the intent recall model can also be a convolutional neural network (CNN) model, which is a feedforward neural network model. It is worth noting that the CNN model here mainly refers to CNN models with fewer parameters and CNN models with an attention module. For example, a text CNN with a small number of feature maps, such as (2,256), (3,256), and (4,256), can be used. In simplified scenarios, (2,32), (3,32), and (4,32) can be used to reduce computational complexity. The attention module is similar. The QKV in the attention module can be linearly projected to a lower dimension, such as 32, before performing attention calculations. This can retain some attention capabilities while reducing computational complexity.

[0096] S55: When the vertical domain intent of the text information meets the set vertical domain intent, perform a step of performing a second intent classification on the text information.

[0097] This step S55 is Figure 3The steps S33 are similar and will not be described in detail here.

[0098] See also Figure 6 , Figure 6 1 is a flow chart of the second embodiment of the text information classification method of the present application. The method provided in this embodiment specifically includes the following steps:

[0099] S61: Obtain text information;

[0100] S62: Determine the vertical domain intent of the text information;

[0101] S63: Determine whether the vertical domain intent of the text information meets the set vertical domain intent;

[0102] S64: If the vertical domain intent of the text information meets the set vertical domain intent, recall the text information and then classify the intent of the text information;

[0103] Among them, steps S61, S62, S63, and S64 are respectively Figure 1 S11, S12, S13, and S14 are similar and will not be described in detail here.

[0104] Among them, step S63 can determine whether the vertical domain intent of the text information meets the set vertical domain intent by judgment, or other methods can be used, which are not specifically limited here.

[0105] In addition, the text information is subjected to slot extraction, and the text information is input into a slot extraction module, so that the slot extraction module performs slot extraction on the text information and outputs a slot extraction result.

[0106] Among them, the slot extraction module can adopt the bidirectional long-term memory (Bi-Long Short-Term Memory, Bi-LSTM) model and conditional random field (Conditional Random Fields, CRF) model method for extraction. Among them, the Bi-LSTM model is a time recursive neural network; the CRF model is a conditional probability distribution model.

[0107] In addition, a slot regular expression model can be used to extract the slots of text information.

[0108] S65: Utilize the verification rule library to verify the slot of the text information.

[0109] After the slots are extracted from the text information, the method further includes: verifying the text information using a verification rule library.

[0110] Specifically, the mobile terminal has a pre-set validation rule library, which can be used to verify the slots of text information. The validation module uses rules to check the keywords that must or cannot be included in each intent and the corresponding slot results. The very few text messages that pass the model but do not meet the definition or requirements are rejected. The validation module can quickly modify and implement validation rules for different intents.

[0111] For example, the verification rule library is manually set based on actual online problem cases, and the verification rules can be set with more detailed rules. For example, for alarm-related tasks, the input text information is "turn on the small alarm clock", which is classified as the "turn on the alarm clock" intention. In fact, the "small alarm clock" is a third-party app, then "small alarm clock" can be set as the rejection keyword for the "turn on the alarm clock" intention.

[0112] S66: Reject text message.

[0113] Step S67 and Figure 1 The S15 in FIG is similar and will not be described in detail here.

[0114] Therefore, in the actual use of Breeno Voice Assistant's common mobile phone functions, this solution can reject over 90% of input domains that do not belong to the vertical domain task intent in the coarse recall module, while ensuring a recall rate of over 99.9% by adding keywords. In the regular expression module, over 30% of high-frequency vertical domain intent text information can be quickly processed and directly fed into the slot extraction module. Overall, the hierarchical framework proposed in this solution is superior to single-layer or two-layer intent classification frameworks. Specifically, in actual online situations, it saves 0-50% of time, with average response times decreasing from >10ms to less than 10ms, thus saving over 50% of computing time and resources.

[0115] Furthermore, the use of regular expressions at different levels makes this solution more controllable and reduces the need for model retraining. The design of using multiple simple models minimizes changes to other intent recognition results when retraining a model for a specific category of input. This simplifies bug fixes and modifications to vertical domain intent classification definitions, avoiding frequent updates to complex models and saving significant manpower and computing resources.

[0116] Therefore, this solution breaks down complex models into multiple, relatively simpler ones and uses faster regular expressions at different levels. This allows for earlier identification of text messages with varying degrees of difficulty, accelerating intent classification. Furthermore, by using more levels and inserting regular expression modules at different levels, the final results are more controllable, allowing for quick changes to output results with minimal modifications to the configuration file.

[0117] See Figure 7 , Figure 7 Schematic diagram of the structure of a mobile terminal according to an embodiment of the present application. The present application provides a mobile terminal 7, including:

[0118] An acquisition module 71 is used to acquire text information;

[0119] A determination module 72, configured to determine the vertical domain intent of the text information;

[0120] The recall module 73 is used to recall the text information when the vertical domain intent of the text information meets the set vertical domain intent;

[0121] The intent classification module 74 is used to classify the intent of the text information after the recall module recalls the text information;

[0122] The rejection module 75 is used to reject the text message when the vertical domain intent of the text message does not meet the set vertical domain intent.

[0123] Through the above method, the present application aims at text information with uncertain complexity, and the determination module 72 first determines the vertical domain intention of the text information; when the vertical domain intention of the text information meets the set vertical domain intention, the recall module 73 recalls the text information, and the intention classification module 74 classifies the text information by intention, and adopts different classification methods for text information with uncertain complexity. Different classification methods are faster, so text information with different recognition difficulties can be quickly given a judgment result in different levels of classification, thereby accelerating the intention classification. Therefore, through the above method, it is possible to effectively avoid the waste of resources of complex classification models and accelerate the classification of text information, thereby improving the classification and recognition speed of text information, and then reducing the computer resources occupied.

[0124] Further, see Figure 8 , Figure 8 Schematic diagram of another mobile terminal according to an embodiment of the present application. This embodiment of the present application provides a mobile terminal 8, comprising: a processor 81, a memory 82, and a computer program 821 stored in the memory and running on the processor. The processor 81 is configured to execute the computer program 821 to implement the steps of the method provided in the first aspect of the embodiment of the present application, which will not be further described herein.

[0125] See Figure 9 , Figure 9 It is a circuit schematic block diagram of an embodiment of a computer-readable storage medium of the present application. If it 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 100. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a readable storage medium, including a number of instructions (program data 101) to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to execute all or part of the steps of each embodiment method of the present application. The aforementioned readable storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and electronic devices such as computers, mobile phones, laptops, tablet computers, cameras, etc. having the above-mentioned readable storage medium.

[0126] Furthermore, the present invention also provides a mobile terminal device. Figure 10 , Figure 10 This is a schematic diagram of the structure of an embodiment of a mobile terminal device of the present invention. The mobile terminal device can be a mobile phone, a tablet computer, a laptop computer, a wearable device, etc. This embodiment is illustrated using a mobile phone as an example. The structure of the terminal device 900 may include a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940 (i.e., the display assembly 600 in the above embodiment), a sensor 950, an audio circuit 960, a WiFi (wireless fidelity) module 970, a processor 980, and a power supply 990. Among them, the RF circuit 910, the memory 920, the input unit 930, the display unit 940, the sensor 950, the audio circuit 960, and the WiFi module 970 are respectively connected to the processor 980; the power supply 990 is used to provide power to the entire terminal device 900.

[0127] Specifically, the RF circuit 910 is used to receive and send signals; the memory 920 is used to store data instruction information; the input unit 930 is used to input information, which may specifically include a touch panel 931 and other input devices 932 such as operation buttons; the display unit 940 may include a display panel 941, etc.; the sensor 950 includes an infrared sensor, a laser sensor, etc., for detecting user proximity signals, distance signals, etc.; the speaker 961 and the microphone (or microphone) 962 are connected to the processor 980 through the audio circuit 960 for receiving and sending sound signals; the WiFi module 970 is used to receive and transmit WiFi signals, and the processor 980 is used to process data information of the mobile terminal device.

[0128] The description of the execution process of the program data in the device with storage function can refer to the description in the embodiment of the text information classification method for the mobile terminal of the present application, which will not be repeated here.

[0129] The above descriptions are only some embodiments of the present application and do not limit the scope of protection of the present application. Any equivalent device or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the scope of patent protection of this application.

Claims

1. A text information classification method, characterized in that: The method comprises: Get text information; Determining the vertical domain intent of the text information; When the vertical domain intent of the text information meets the set vertical domain intent, recall the text information and then classify the text information by intent; When the vertical domain intent of the text message does not satisfy the set vertical domain intent, reject the text message; Wherein, when the vertical domain intent of the text information satisfies the set vertical domain intent, recalling the text information and classifying the text information by intent includes: When the vertical domain intent of the text information satisfies the set vertical domain intent, recalling the text information and performing a first intent classification on the text information; wherein the first intent classification includes at least one intent class and one rejection class; When the text information satisfies one of the at least one intent class of the first intent classification, performing slot extraction on the text information; or When the text information meets the rejection category of the first intention classification, reject the text information; or When the text information does not satisfy at least one intent class and the rejection class of the first intent classification, a second intent classification is performed on the text information.

2. The method according to claim 1, characterized in that Determining the vertical domain intent of the text information includes: Perform keyword matching on the text information with multiple keyword groups to obtain multiple matching degrees; wherein each keyword group corresponds to a vertical domain intent; The vertical intent corresponding to the keyword group with the highest matching degree is used as the vertical intent of the text information.

3. The method according to claim 2, characterized in that The keyword group is a regular expression formed by multiple keywords.

4. The method according to claim 1, wherein The first intent classification of the text information includes: The text information is input into a regular recall model so that the regular recall model performs a first intent classification on the text information and outputs a first intent classification result; wherein the first intent classification result includes at least one intent class result and one rejection class result.

5. The method according to claim 4, characterized in that The regular recall model performs a first intent classification on the text information, including: The text information is serially matched with the regular database of the regular recall model to perform a first intent classification on the text information.

6. The method according to claim 1, characterized in that The second intent classification of the text information includes: The text information is input into an intent classification model so that the intent classification model performs a second intent classification on the text information and outputs a second intent classification result; wherein the second intent classification result includes at least one intent class and one rejection class.

7. The method according to claim 6, characterized in that The intent classification model includes one of a Text CNN model, an LSTM model, a GRU model, a Transformer model, a Bert model, or a T5 model.

8. The method according to claim 6, characterized in that Inputting the text information into the intent classification model so that the intent classification model performs a second intent classification on the text information and outputs a second intent classification result includes: When the text information satisfies at least one intent class in the second intent classification result, performing slot extraction on the text information; or When the text information meets the rejection class in the second intent classification result, the text information is rejected.

9. The method according to claim 1, characterized in that Before performing the second intent classification on the text information, the method further includes: Re-determine the vertical domain intent of the text information; When the vertical domain intent of the text information meets the set vertical domain intent, the step of performing a second intent classification on the text information is performed.

10. The method according to claim 9, characterized in that The re-determining the vertical domain intent of the text information includes: The text information is input into an intent recall model so that the intent recall model determines the vertical intent of the text information; wherein, the intent recall model determines the vertical intent of the text information according to a set confidence threshold, and the set confidence threshold is adjustable.

11. The method according to claim 10, characterized in that The intent recall model determines the vertical domain intent of the text information according to a set confidence threshold, including: If the set confidence threshold is met, the vertical domain intent of the text information is determined; If the set confidence threshold is not met, the text information is determined to be rejected.

12. The method according to claim 10, characterized in that The intent recall model is a Fast Text neural network model or a CNN model.

13. The method according to claim 1, wherein After the text information is classified into intent categories, the method further includes: The slot of the text information is verified using a verification rule library.

14. The method according to claim 1 or 8, characterized in that The extracting slots from the text information includes: The text information is input into a slot extraction module, so that the slot extraction module performs slot extraction on the text information and outputs a slot extraction result.

15. The method according to claim 14, characterized in that The slot extraction module includes a Bi-LSTM model and a CRF model.

16. The method according to claim 14, characterized in that The slot extraction module is a slot regular expression model.

17. A mobile terminal, characterized in that: For executing the classification method according to any one of claims 1 to 16, the mobile terminal comprises: Acquisition module, used to obtain text information; A determination module, configured to determine the vertical domain intent of the text information; A recall module, configured to recall the text information when the vertical domain intent of the text information meets the set vertical domain intent; an intent classification module, configured to classify the intent of the text information after the recall module recalls the text information; A rejection module is used to reject the text information when the vertical domain intent of the text information does not meet the set vertical domain intent.

18. A mobile terminal, characterized in that: include: A processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to execute the computer program to implement the classification method according to any one of claims 1 to 16.

19. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program can be executed by a processor to implement the classification method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Intention obtaining method and system

    CN109871543A

  • An information processing method and device

    CN109948017A

Cited By

  • System and method of objective-driven intelligent navigation

    US12572374B1