Method, device, electronic device and medium for classifying intention of inquiry information
Through a pre-trained language model, the inquiry information in voice quality inspection is classified and recognized in a multi-level manner, which solves the problem of inaccurate classification of intention categories in the prior art, and improves the accuracy and efficiency of voice quality inspection results.
Patent Information
- Application Number
- CN202411705444.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, it is difficult to accurately classify the categories of customers' true intentions in voice quality inspection, especially the classification inaccuracy caused by category similarity, which affects the accuracy and credibility of voice quality inspection results.
A pre-trained language model is used to obtain product prompt information corresponding to the inquiry information, and perform multi-level classification and identification, including determination of product categories, association information and attribute categories, and finally display the intent classification results.
Through the multi-level classification and identification process, the accuracy of intention classification is enhanced, the accuracy and credibility of voice quality inspection results are improved, and the dependence on artificial quality inspection is reduced, and efficiency is improved.
Smart Images

Figure CN119760561A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing, and in particular to a method, device, electronic device and medium for classifying the intent of inquiry information. Background Art
[0002] For many services, a large number of voice calls are generated every day. The conversations between customers and service providers (such as customer service) can be recorded, and then the voice can be converted into text to judge the service quality of the service provider.
[0003] In the process of voice quality inspection, due to the large number of voice calls that need to be inspected, manual voice quality inspection alone can no longer meet the needs. In addition, judging the purpose of the customer's question, that is, obtaining the customer's true intention category, is a crucial process in voice quality inspection. In the existing intent classification tasks, there are many similar categories, such as "elastic cloud host functions" and "elastic cloud host applications". These similar intent categories will affect the accuracy of obtaining the customer's true intention category, and thus affect the accuracy and credibility of the voice quality inspection results. Summary of the invention
[0004] In view of the above problems, the embodiments of the present application propose a method, device, electronic device and medium for classifying the intent of inquiry information.
[0005] In a first aspect of the implementation of the present application, a method for classifying the intent of inquiry information is first provided, wherein the method comprises:
[0006] In response to an intention recognition instruction issued by a user for query information to be recognized, obtaining product prompt information corresponding to the query information;
[0007] Using a pre-trained language model to classify the inquiry information according to the product prompt information, to obtain a product category corresponding to the inquiry information;
[0008] Determine, according to the product category, related prompt information corresponding to the inquiry information;
[0009] Using the language model to identify the query information according to the associated prompt information, to obtain associated information corresponding to the query information;
[0010] Determine attribute prompt information corresponding to the query information according to the association information;
[0011] Using the language model to classify the query information according to the attribute prompt information, to obtain the attribute category corresponding to the query information;
[0012] The attribute category is used as the intention classification result of the query information and is displayed to the user.
[0013] Optionally, the language model is trained in the following manner:
[0014] Acquire training data and test data; the training data includes at least one of training query information, training prompt information, training category and training association information; the test data includes at least one of test query information, test prompt information, test category and test association information;
[0015] Using the training query information and the training prompt information as inputs of the language model, using the training category or the training association information as outputs of the language model, and using the training data to train the language model to obtain a language model to be verified;
[0016] Inputting the test query information and the test prompt information into the language model to be verified, and obtaining the category to be verified or the associated information to be verified output by the language model to be verified;
[0017] Determine the loss function corresponding to the language model and the accuracy rate corresponding to the language model according to the test category and the category to be verified, or according to the test association information and the association information to be verified;
[0018] The loss function corresponding to the language model is used to adjust the model parameters of the language model to be verified, and the steps of taking the training query information and the training prompt information as the input of the language model, taking the training category or the training association information as the output of the language model, and using the training data to train the language model are re-executed until the accuracy corresponding to the language model is greater than or equal to a preset threshold, thereby obtaining a trained language model.
[0019] Optionally, before acquiring the training data and the test data, the method further includes:
[0020] Get a voice sample;
[0021] Converting the speech sample into a text sample;
[0022] extracting at least one sample query information from the text sample;
[0023] The sample query information is labeled to obtain a sample attribute category corresponding to the sample query information.
[0024] Optionally, the acquiring of training data and test data includes:
[0025] Obtaining an initial product category corresponding to at least one of the sample attribute categories;
[0026] Taking at least one of the sample attribute categories that is the same as the initial product category as a sample attribute category set, and taking the initial product category corresponding to the sample attribute category set as a sample product category;
[0027] Using the prompt information corresponding to the sample product category as the sample product prompt information;
[0028] taking the information in the sample query information associated with the sample product category as sample associated information;
[0029] Using the prompt information corresponding to the sample-related information as the sample-related prompt information;
[0030] using prompt information corresponding to the sample association information and the sample attribute category as sample attribute prompt information;
[0031] The training data and the test data are determined according to at least one of the sample query information, the sample product prompt information, the sample association prompt information, the sample attribute prompt information, the sample association information, the sample product category, and the sample attribute category.
[0032] Optionally, the determining the training data and the test data according to at least one of the sample query information, the sample product prompt information, the sample association prompt information, the sample attribute prompt information, the sample association information, the sample product category, and the sample attribute category includes:
[0033] Among the sample query information, the sample product prompt information, the sample association prompt information, the sample attribute prompt information, the sample association information, the sample product category, and the sample attribute category, at least one of the training query information, the training product prompt information, the training association prompt information, the training attribute prompt information, the training association information, the training product category, and the training attribute category is selected according to a preset ratio;
[0034] using at least one of the training product prompt information, the training association prompt information, and the training attribute prompt information as the training prompt information;
[0035] Using at least one of the training product category and the training attribute category as the training category;
[0036] taking at least one of the training inquiry information, the training prompt information, the training category and the training related information as the training data;
[0037] At least one of the test query information, the test product prompt information, the test associated prompt information, the test attribute prompt information, the test associated information, the test product category, and the test attribute category that is different from the training data is selected from the sample query information, the sample product prompt information, the test associated prompt information, the sample attribute prompt information, the test associated information, the test product category, and the test attribute category;
[0038] using at least one of the test product prompt information, the test association prompt information, and the test attribute prompt information as the test prompt information;
[0039] Taking at least one of the test product category and the test attribute category as the test category;
[0040] At least one of the test inquiry information, the test prompt information, the test type, and the test related information is used as the test data.
[0041] Optionally, the training prompt information includes at least one of the training product prompt information, the training association prompt information and the training attribute prompt information, the training category includes the training product category and / or the training attribute category, and the training query information and the training prompt information are used as inputs of the language model, the training category or the training association information is used as output of the language model, and the language model is trained using the training data to obtain a language model to be verified, including:
[0042] If the training prompt information is the training product prompt information, then using the training query information and the training product prompt information as inputs of the language model, using the training product category as output of the language model, and using the training data to train the language model to obtain the language model to be verified;
[0043] If the training prompt information is the training-related prompt information, the training query information and the training-related prompt information are used as inputs of the language model, the training-related information is used as output of the language model, and the language model is trained using the training data to obtain the language model to be verified;
[0044] If the training prompt information is the training attribute prompt information, the training query information and the training attribute prompt information are used as inputs of the language model, the training attribute category is used as output of the language model, and the language model is trained using the training data to obtain the language model to be verified.
[0045] Optionally, the method further comprises:
[0046] If the accuracy rate corresponding to the language model is less than the preset threshold, obtaining the training prompt information corresponding to the language model;
[0047] Re-acquiring the training data and the test data;
[0048] If the training prompt information is the training product prompt information, re-execute the step of taking the training query information and the training product prompt information as inputs of the language model, taking the training product category as output of the language model, and using the training data to train the language model until the accuracy rate corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model;
[0049] If the training prompt information is the training-related prompt information, re-performing the step of using the training query information and the training-related prompt information as inputs of the language model, using the training-related information as outputs of the language model, and using the training data to train the language model until the accuracy rate corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model;
[0050] If the training prompt information is the training attribute prompt information, then re-execute the steps of taking the training query information and the training attribute prompt information as the input of the language model, taking the training attribute category as the output of the language model, and using the training data to train the language model until the accuracy rate corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model.
[0051] In a second aspect of the implementation of the present application, there is also provided a device for classifying the intent of inquiry information, characterized in that the device comprises:
[0052] A product prompt information acquisition module, configured to respond to an intention recognition instruction issued by a user for query information to be recognized, and acquire product prompt information corresponding to the query information;
[0053] A product category acquisition module, configured to classify the inquiry information according to the product prompt information using a pre-trained language model to obtain a product category corresponding to the inquiry information;
[0054] A related prompt information acquisition module, used to determine the related prompt information corresponding to the inquiry information according to the product category;
[0055] A related information acquisition module, used to use the language model to identify the query information according to the related prompt information, and obtain the related information corresponding to the query information;
[0056] An attribute prompt information acquisition module, used to determine the attribute prompt information corresponding to the query information according to the associated information;
[0057] An attribute category acquisition module, used to classify the inquiry information according to the attribute prompt information using the language model to obtain the attribute category corresponding to the inquiry information;
[0058] An intention classification result acquisition module is used to use the attribute category as the intention classification result of the query information and display it to the user.
[0059] In the third aspect of the implementation of the present application, there is also provided an electronic device, characterized in that it includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, it implements the intention classification method of inquiry information as described above.
[0060] In a fourth aspect of the implementation of the present application, a computer-readable storage medium is further provided, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the intention classification method of inquiry information as described above is implemented.
[0061] The embodiments of the present application have the following advantages:
[0062] In an embodiment of the present application, in response to an intent recognition instruction issued by a user for query information to be recognized, product prompt information corresponding to the query information is obtained, a pre-trained language model is used to classify the query information according to the product prompt information, and the product category corresponding to the query information is obtained, and the associated prompt information corresponding to the query information is determined according to the product category, and the query information is identified according to the associated prompt information by a language model, and the associated information corresponding to the query information is obtained, and the attribute prompt information corresponding to the query information is determined according to the associated information, and the query information is classified according to the attribute prompt information by a language model, and the attribute category corresponding to the query information is obtained, and the attribute category is used as the intent classification result of the query information and displayed to the user. The present application decomposes a single question into multiple steps in combination with the prompt information, and answers the question at multiple levels by means of a language model thinking chain, and has a reasoning process, thereby enhancing interpretability and improving the effect of the task. The present application can ensure the accuracy of the intent classification results, and thus ensure the accuracy and credibility of the voice quality inspection results, and the present application does not require manual voice quality inspection, which can improve the efficiency of intent classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.
[0064] Figure 1 This is a flowchart of a method for classifying the intent of inquiry information provided by an embodiment of the present application;
[0065] Figure 2 It is a flowchart of a method for obtaining sample data provided by an embodiment of the present application;
[0066] Figure 3 It is a flow chart of a language model training process provided by an embodiment of the present application;
[0067] Figure 4 It is a structural diagram of an intention classification device for query information provided by an embodiment of the present application. DETAILED DESCRIPTION
[0068] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in each embodiment of the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not constitute any limitation, and the various embodiments can be combined with each other and referenced to each other without contradiction.
[0069] It should be noted that the embodiments of the present application may involve the use of customer data. In actual applications, customer-specific personal data can be used in the solutions described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the application is located (for example, with the customer's explicit consent, effective notification to the customer, etc.).
[0070] The main purpose of voice quality inspection is to record the conversation between customers and service providers (such as customer service), then convert the voice into text, and then judge the service quality of the service provider. When testing the quality, judging the purpose of the user's question, that is, intent classification, is an important part. For many services, a large number of voice calls are generated every day. Therefore, it is very necessary to use AI to replace manual voice quality inspection. In addition, in actual intent classification tasks, there are often many similar categories, such as "elastic cloud host functions" and "elastic cloud host applications", etc. The existence of these similar categories often restricts the effectiveness of intent classification tasks.
[0071] Recently, large-scale pre-trained language models have developed rapidly. Such models can be pre-trained on a large amount of data, have rich knowledge and language capabilities, and have better processing capabilities for intent classification tasks than most small-scale models. At the same time, the introduction of the mind chain technology can further enhance the logical reasoning ability of the language model. It attempts to decompose a single question into multiple steps, so that the language model does not directly output the answer to the question, but answers the question step by step, with a reasoning process, thereby enhancing interpretability and improving the effect of the task.
[0072] Among them, large-scale pre-trained language models are an important technology in the field of natural language processing (NLP). They can be pre-trained on large-scale text data to learn rich language knowledge, and then fine-tuned on various downstream tasks to achieve high-performance text understanding and generation. In the embodiment of the present application, the user's query information can be classified or recognized by a large-scale pre-trained language model.
[0073] Intent classification is an important task in natural language processing (NLP), which aims to identify the intent or purpose of the user input text. Intent classification is very critical in various applications, such as smart assistants, chatbots, customer service systems, etc. In the embodiment of the present application, speech quality inspection can be achieved through intent classification.
[0074] Chain of Thought (CoT) is a technology used in the fields of natural language processing (NLP) and artificial intelligence (AI) to improve model reasoning capabilities and generate more coherent and logical text. The core idea of Chain of Thought is to decompose complex tasks into a series of logical steps by simulating the human thinking process, so as to gradually infer the final answer. In an embodiment of the present application, sample data can be obtained through Chain of Thought, and the intent classification results can be displayed in the form of Chain of Thought.
[0075] Reference Figure 1 , shows a flowchart of a method for classifying the intent of inquiry information provided by an embodiment of the present application, and the method may specifically include the following steps:
[0076] S101: In response to an intention recognition instruction issued by a user for query information to be recognized, obtaining product prompt information corresponding to the query information.
[0077] In the embodiment of the present application, product prompt information corresponding to the query information can be obtained in response to an intention recognition instruction issued by the user for the query information to be recognized.
[0078] The inquiry information may be obtained based on the call record between the customer and the service provider. The user may refer to the subject of language quality inspection such as voice quality inspection software or voice quality inspection personnel. The intention recognition instruction may indicate that the user needs to perform intention recognition on the inquiry information to be recognized. The product prompt information may include several product names that may be related to the inquiry information.
[0079] S102: using a pre-trained language model to classify the inquiry information according to the product prompt information, to obtain a product category corresponding to the inquiry information.
[0080] In an embodiment of the present application, a pre-trained language model may be used to classify the query information according to the product prompt information to obtain the product category corresponding to the query information, wherein the product category may include the product name related to the query information.
[0081] In a specific implementation, the product prompt information and the query information may be combined to obtain a product name query text, and the product name query text may be input into a language model to obtain a product name related to the query information.
[0082] S103: Determine the associated prompt information corresponding to the inquiry information according to the product category.
[0083] In the embodiment of the present application, the associated prompt information corresponding to the inquiry information can be determined according to the product category, wherein the associated prompt information may include an inquiry statement for information related to the product name.
[0084] S104: using the language model to identify the query information according to the associated prompt information, to obtain associated information corresponding to the query information.
[0085] In the embodiment of the present application, a language model may be used to identify the query information according to the associated prompt information to obtain the associated information corresponding to the query information, wherein the associated information may include information related to the product name in the query information.
[0086] In a specific implementation, the associated prompt information and the query information may be combined to obtain an associated information query text, and the associated information query text may be input into a language model to obtain associated information related to the query information.
[0087] S105: Determine attribute prompt information corresponding to the query information according to the associated information.
[0088] In the embodiment of the present application, the attribute prompt information corresponding to the query information can be determined according to the association information, wherein the attribute prompt information may include several attributes related to the product name.
[0089] S106: using the language model to classify the inquiry information according to the attribute prompt information to obtain an attribute category corresponding to the inquiry information.
[0090] In the embodiment of the present application, a language model may be used to classify the query information according to the attribute prompt information to obtain the attribute category corresponding to the query information, wherein the attribute category may include attributes related to the product name in the query information.
[0091] In a specific implementation, the attribute prompt information and the query information may be combined to obtain a product attribute query text, and the product attribute query text may be input into a language model to obtain product attributes related to the query information.
[0092] S107: Using the attribute category as the intention classification result of the inquiry information and presenting it to the user.
[0093] In the embodiment of the present application, the attribute category can be used as the intent classification result of the query information and displayed to the user. The intent classification result can represent the real intent corresponding to the query information.
[0094] In an embodiment of the present application, in response to an intent recognition instruction issued by a user for query information to be recognized, product prompt information corresponding to the query information is obtained, a pre-trained language model is used to classify the query information according to the product prompt information, and the product category corresponding to the query information is obtained, and the associated prompt information corresponding to the query information is determined according to the product category, and the query information is identified according to the associated prompt information by a language model, and the associated information corresponding to the query information is obtained, and the attribute prompt information corresponding to the query information is determined according to the associated information, and the query information is classified according to the attribute prompt information by a language model, and the attribute category corresponding to the query information is obtained, and the attribute category is used as the intent classification result of the query information and displayed to the user. The present application decomposes a single question into multiple steps in combination with the prompt information, and answers the question at multiple levels by means of a language model thinking chain, and has a reasoning process, thereby enhancing interpretability and improving the effect of the task. The present application can ensure the accuracy of the intent classification results, and thus ensure the accuracy and credibility of the voice quality inspection results, and the present application does not require manual voice quality inspection, which can improve the efficiency of intent classification.
[0095] In an optional embodiment of the present application, the language model is trained in the following manner:
[0096] S11: Acquire training data and test data; the training data includes at least one of training query information, training prompt information, training category, and training association information; the test data includes at least one of test query information, test prompt information, test category, and test association information;
[0097] S12: using the training query information and the training prompt information as inputs of the language model, using the training category or the training association information as outputs of the language model, and using the training data to train the language model to obtain a language model to be verified;
[0098] S13: inputting the test query information and the test prompt information into the language model to be verified, and obtaining the category to be verified or the associated information to be verified output by the language model to be verified;
[0099] S14: determining a loss function corresponding to the language model and an accuracy rate corresponding to the language model according to the test category and the category to be verified, or according to the test association information and the association information to be verified;
[0100] S15: Use the loss function corresponding to the language model to adjust the model parameters of the language model to be verified, and re-execute the step of taking the training query information and the training prompt information as the input of the language model, taking the training category or the training association information as the output of the language model, and using the training data to train the language model until the accuracy corresponding to the language model is greater than or equal to a preset threshold, thereby obtaining a trained language model.
[0101] In the embodiment of the present application, first, training data and test data can be obtained; the training data includes at least one of training query information, training prompt information, training category, and training association information; the test data includes at least one of test query information, test prompt information, test category, and test association information. Preferably, the training data can include training query information, training prompt information, and training category, or the training data can include training query information, training prompt information, and training association information.
[0102] It can be understood that the training query information and the test query information can be sample query information for training or testing, the training prompt information and the test prompt information can be sample prompt information for training or testing, the training category and the test category can be sample categories for training or testing, and the training association information and the test association information can be sample association information for training or testing.
[0103] Secondly, the training query information and the training prompt information can be used as the input of the language model, the training category or the training association information can be used as the output of the language model, and the language model can be trained using the training data to obtain the language model to be verified.
[0104] Thirdly, the test query information and the test prompt information may be input into the language model to be verified, and the category to be verified or the associated information to be verified output by the language model to be verified may be obtained;
[0105] Then, the loss function corresponding to the language model and the accuracy rate corresponding to the language model can be determined according to the test category and the category to be verified, or according to the test association information and the association information to be verified. The loss function can be a cross entropy loss function, or can be set according to actual conditions.
[0106] Finally, the loss function corresponding to the language model can be used to adjust the model parameters of the language model to be verified, and re-execute the steps of using the training query information and training prompt information as the input of the language model, using the training category or training association information as the output of the language model, and using the training data to train the language model until the accuracy corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model.
[0107] This application introduces a large-scale pre-trained language model, which has richer language knowledge and can perform classification more effectively than the classification model in the related technology. The large-scale pre-trained language model learns a lot of language knowledge through the pre-training stage, including grammar, semantics, contextual relationships, etc., which enables the model to better understand and process complex language structures; the model combines training query information and training prompt information during the training process, making the input information richer and more diverse, thereby improving the generalization ability and classification accuracy of the model; by using the cross entropy loss function or other custom loss functions, the model can more accurately measure the difference between the predicted results and the true labels, thereby optimizing the model parameters and improving the classification performance; finally, through the iterative training and verification process, the model can continuously adjust the parameters until the preset accuracy threshold is reached, ensuring the efficiency and reliability of the model in practical applications.
[0108] In an optional embodiment of the present application, before acquiring the training data and the test data, the method further includes the following steps:
[0109] S21: Obtaining a voice sample;
[0110] S22: Convert the voice sample into a text sample;
[0111] S23: extracting at least one sample query information from the text sample;
[0112] S24: Label the sample query information to obtain a sample attribute category corresponding to the sample query information.
[0113] In the embodiment of the present application, a voice sample may be obtained, the voice sample may be converted into a text sample, at least one sample query information may be extracted from the text sample, the sample query information may be annotated, and a sample attribute category corresponding to the sample query information may be obtained. Alternatively, a text sample may be directly obtained, and then the step of extracting at least one sample query information from the text sample may be performed.
[0114] In an embodiment of the present application, call records between users and service providers can be collected, and audio-to-text software can be used to convert the call records into text, and the user's inquiry information can be extracted and retained to produce training data and test data sets for the model, and each piece of user data can be labeled with the corresponding sample attribute category, that is, the intent classification result.
[0115] This application obtains voice samples and converts them into text samples, extracts sample inquiry information from the text samples, and annotates this information to obtain sample attribute categories, thereby constructing high-quality training and test data sets. This application converts call records into text through audio-to-text software, retains the user's inquiry information, and ensures the integrity and accuracy of the data; extracts and annotates sample inquiry information so that the model can learn the user's intention classification results, improving the model's training effect and classification accuracy; this method is not only applicable to call records, but can also be extended to other voice data, and has broad application prospects; by annotating sample attribute categories, the model can better understand and distinguish different user intentions, thereby providing more accurate services in practical applications.
[0116] In an optional embodiment of the present application, step S11 further includes the following sub-steps:
[0117] S31: Obtaining an initial product category corresponding to at least one of the sample attribute categories;
[0118] S32: taking at least one of the sample attribute categories that is the same as the initial product category as a sample attribute category set, and taking the initial product category corresponding to the sample attribute category set as a sample product category;
[0119] S33: using the prompt information corresponding to the sample product category as sample product prompt information;
[0120] S34: using the information in the sample query information associated with the sample product category as sample associated information;
[0121] S35: using the prompt information corresponding to the sample-related information as sample-related prompt information;
[0122] S36: using the prompt information corresponding to the sample association information and the sample attribute category as sample attribute prompt information;
[0123] S37: Determine the training data and the test data according to at least one of the sample query information, the sample product prompt information, the sample association prompt information, the sample attribute prompt information, the sample association information, the sample product category, and the sample attribute category.
[0124] In an embodiment of the present application, an initial product category corresponding to at least one sample attribute category can be obtained, and then at least one sample attribute category with the same initial product category can be taken as a sample attribute category set, and the initial product category corresponding to the sample attribute category set can be taken as a sample product category.
[0125] Then, the prompt information corresponding to the sample product category can be used as sample product prompt information, the information associated with the sample product category in the sample inquiry information can be used as sample associated information, the prompt information corresponding to the sample associated information can be used as sample associated prompt information, and the prompt information corresponding to the sample associated information and the sample attribute category can be used as sample attribute prompt information.
[0126] Finally, the training data and the test data may be determined according to at least one of the sample query information, the sample product prompt information, the sample association prompt information, the sample attribute prompt information, the sample association information, the sample product category, and the sample attribute category.
[0127] In the specific implementation, the training data can be obtained by referring to the following method:
[0128] When performing intent classification tasks, the classification model of related technologies inputs the user's questions into the model, and then trains the labels as the output of the model. The specific process is shown in Table 1.
[0129] Table 1 Classification model input and output
[0130]
[0131] After combining the intent classification task with the language model, the model input is a combination of the user’s questions and task prompts, and the label is still the output of the model. The specific process is shown in Table 2.
[0132] Table 2 Language model input and output
[0133]
[0134] In order to enhance the logical reasoning ability of the language model, the thinking chain technology can be introduced. Specifically, the sample query information can be labeled as above, and the sample attribute category corresponding to the sample query information can be obtained as the secondary label, that is, the final label. Cluster all possible secondary labels and extract a certain number of primary labels, that is, sample product categories. For example, "Application of elastic cloud host" and "Specification introduction of elastic cloud host" both belong to the first-level label of "elastic cloud host". Each first-level label corresponds to a second-level label pool, and a first-level label can correspond to one or more second-level labels, that is, a sample product category can correspond to one or more sample attribute categories.
[0135] Next, the entire intent classification task is decomposed into subtasks. During the reasoning process, the answer to the previous subtask is incorporated into the prompt of the next subquestion to assist the language model in gradually reasoning out the final category.
[0136] In the specific implementation, it can be based on Figure 2 Categorize each user's question, refer to Figure 2 , which shows a flow chart of a sample data acquisition method provided in an embodiment of the present application.
[0137] The classification of each user question consists of three steps. First, the first-level label classification is performed, requiring the language model to determine which first-level category the user's question belongs to. Next, relevant words, phrases and sentences are extracted, requiring the language model to extract the words, phrases and sentences most relevant to the first-level category. Finally, the second-level label classification is performed, and the final intent category is obtained from the corresponding second-level label pool in combination with relevant sentences. The specific process is shown in Table 3.
[0138] Table 3 Language model thinking chain input and output
[0139]
[0140] This application introduces the thinking chain technology to construct primary and secondary labels, which significantly reduces the difficulty of the model to classify at each step and improves the interpretability of the results. This application obtains the initial product category corresponding to the sample attribute category and uses the sample attribute category set of the same initial product category as the sample product category to ensure the accuracy and consistency of data classification; the sample product category, sample association information and the prompt information corresponding to the sample attribute category are used as sample product prompt information, sample association prompt information and sample attribute prompt information, which enriches the input information of the model and enhances the logical reasoning ability of the model; through the progressive decomposition of subtasks, the difficulty of each subtask is reduced, so that the model can understand and handle complex classification problems more carefully; finally, by extracting relevant words and sentences, the logical reasoning and interpretability of the model are enhanced, making the output results of the model more transparent and easy to understand, thereby providing more accurate and reliable services in practical applications.
[0141] In an optional embodiment of the present application, step S37 further includes the following sub-steps:
[0142] S41: Select at least one of the training query information, the training product prompt information, the training associated prompt information, the sample attribute prompt information, the sample associated information, the sample product category, and the sample attribute category according to a preset ratio from among the sample query information, the sample product prompt information, the training associated prompt information, the training attribute prompt information, the training associated information, the training product category, and the training attribute category;
[0143] S42: using at least one of the training product prompt information, the training association prompt information, and the training attribute prompt information as the training prompt information;
[0144] S43: using at least one of the training product category and the training attribute category as the training category;
[0145] S44: using at least one of the training inquiry information, the training prompt information, the training category and the training association information as the training data;
[0146] S45: selecting at least one of the test query information, the test product prompt information, the test associated prompt information, the sample attribute prompt information, the sample associated information, the sample product category, and the sample attribute category that is different from the training data;
[0147] S46: using at least one of the test product prompt information, the test association prompt information, and the test attribute prompt information as the test prompt information;
[0148] S47: Using at least one of the test product category and the test attribute category as the test category;
[0149] S48: Using at least one of the test inquiry information, the test prompt information, the test type, and the test related information as the test data.
[0150] In an embodiment of the present application, at least one of the training query information, training product prompt information, training association prompt information, training attribute prompt information, training association information, training product category, and training attribute category can be selected according to a preset ratio from the sample query information, sample product prompt information, sample association prompt information, sample attribute prompt information, sample association information, sample product category, and sample attribute category.
[0151] Then, at least one of the training product prompt information, training associated prompt information, and training attribute prompt information can be used as training prompt information, at least one of the training product category and training attribute category can be used as training category, and at least one of the training inquiry information, training prompt information, training category, and training associated information can be used as training data.
[0152] In addition, at least one of the test query information, test product prompt information, test association prompt information, test attribute prompt information, test association information, test product category, and test attribute category that is different from the training data can be selected from the sample query information, sample product prompt information, sample association prompt information, sample attribute prompt information, sample association information, sample product category, and sample attribute category.
[0153] Then, at least one of the test product prompt information, test association prompt information, and test attribute prompt information can be used as test prompt information, at least one of the test product category and the test attribute category can be used as a test category, and at least one of the test inquiry information, test prompt information, test category, and test association information can be used as test data.
[0154] The present application ensures the diversity and representativeness of the data set by selecting training and testing data according to preset proportions from sample query information, sample product prompt information, sample association prompt information, sample attribute prompt information, sample association information, sample product category, and sample attribute category.
[0155] In an optional embodiment of the present application, the training prompt information includes at least one of the training product prompt information, the training association prompt information and the training attribute prompt information, the training category includes the training product category and / or the training attribute category, and step S12 further includes the following sub-steps:
[0156] S51: If the training prompt information is the training product prompt information, then use the training query information and the training product prompt information as inputs of the language model, use the training product category as output of the language model, and use the training data to train the language model to obtain the language model to be verified;
[0157] S52: If the training prompt information is the training-related prompt information, use the training query information and the training-related prompt information as inputs of the language model, use the training-related information as output of the language model, and use the training data to train the language model to obtain the language model to be verified;
[0158] S53: If the training prompt information is the training attribute prompt information, then the training query information and the training attribute prompt information are used as inputs of the language model, the training attribute category is used as output of the language model, and the language model is trained using the training data to obtain the language model to be verified.
[0159] In an embodiment of the present application, if the training prompt information is training product prompt information, the training inquiry information and the training product prompt information can be used as the input of the language model, and the training product category can be used as the output of the language model. The language model is trained using the training data to obtain a language model to be verified.
[0160] Alternatively, if the training prompt information is training-related prompt information, the training query information and the training-related prompt information may be used as inputs of the language model, the training-related information may be used as outputs of the language model, and the language model may be trained using the training data to obtain a language model to be verified;
[0161] Alternatively, if the training prompt information is training attribute prompt information, the training query information and the training attribute prompt information can be used as inputs of the language model, the training attribute category can be used as output of the language model, and the language model can be trained using the training data to obtain a language model to be verified.
[0162] In the specific implementation, the training data and test data can be randomly divided into training sets and test sets, and then the language model is fine-tuned. Since the language model has strong language ability and knowledge capacity, when the task prompts of the subtasks are different, their corresponding output formats will not affect each other. Therefore, we shuffle the data of the three subtasks and fine-tune the same model to obtain the fine-tuned language model.
[0163] The present application improves the adaptability and training effect of the model by flexibly adjusting the input and output of the language model according to different types of training prompt information, such as training product prompt information, training association prompt information, and training attribute prompt information.
[0164] In an optional embodiment of the present application, the method further includes:
[0165] S61: If the accuracy rate corresponding to the language model is less than the preset threshold, obtaining the training prompt information corresponding to the language model;
[0166] S62: Reacquire the training data and the test data;
[0167] S63: if the training prompt information is the training product prompt information, re-execute the step of using the training query information and the training product prompt information as inputs of the language model, using the training product category as output of the language model, and using the training data to train the language model until the accuracy rate corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model;
[0168] S64: if the training prompt information is the training-related prompt information, re-execute the step of using the training query information and the training-related prompt information as inputs of the language model, using the training-related information as outputs of the language model, and using the training data to train the language model until the accuracy rate corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model;
[0169] S65: If the training prompt information is the training attribute prompt information, then re-execute the step of using the training query information and the training attribute prompt information as inputs of the language model, using the training attribute category as outputs of the language model, and using the training data to train the language model until the accuracy rate corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model.
[0170] In the embodiment of the present application, if the accuracy rate corresponding to the language model is less than the preset threshold, the training prompt information corresponding to the language model can be obtained. It can be understood that the training prompt information obtained at this time is the training prompt information corresponding to the training process in which the accuracy rate is less than the preset threshold during the language model training process.
[0171] Then, the training data and the test data can be re-acquired. Preferably, the training data corresponding to the training prompt information can be re-acquired according to the training prompt information corresponding to the training process with an accuracy rate less than a preset threshold.
[0172] If the training prompt information is training product prompt information, the step of using the training query information and the training product prompt information as inputs of the language model, using the training product category as outputs of the language model, and using the training data to train the language model may be re-executed until the accuracy rate corresponding to the language model is greater than or equal to a preset threshold, thereby obtaining a trained language model;
[0173] If the training prompt information is training-related prompt information, the steps of using the training query information and the training-related prompt information as inputs of the language model, using the training-related information as outputs of the language model, and using the training data to train the language model may be re-executed until the accuracy rate corresponding to the language model is greater than or equal to a preset threshold, thereby obtaining a trained language model;
[0174] If the training prompt information is training attribute prompt information, the steps of using the training query information and the training attribute prompt information as the input of the language model, using the training attribute category as the output of the language model, and using the training data to train the language model can be re-executed until the accuracy corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model.
[0175] In the specific implementation, the test data can be input into the fine-tuned large model for inference testing, and the accuracy of each subtask can be counted according to the subtask. If one round of fine-tuning cannot meet the needs, more training data can be constructed in a targeted manner based on the accuracy of different subtasks to improve the model's capabilities in the corresponding subtasks.
[0176] This application breaks down the intent classification task in the field of speech quality inspection into three steps, and supplements the training data in a targeted manner according to the accuracy of each step, so as to better fine-tune the model multiple times, significantly improving the performance and adaptability of the model.
[0177] Reference Figure 3 , shows a flow chart of a language model training process provided by an embodiment of the present application, which can be used for the intent classification task in the field of speech quality inspection. The specific implementation process is as follows:
[0178] Collect data. Record the voice calls when providing services to users, convert them into text, and extract and retain the user's speech as a set of training and test data.
[0179] Data splitting and reconstruction. The data introduces the technology of large model thinking chain and decomposes the task into three steps. Each user question is rewritten according to Table 3.
[0180] Fine-tune the language model. Rewrite the data collected in step 1 according to the split method in step 2, divide it into training set and test set, fine-tune the instructions on the pre-trained language model, and obtain the fine-tuned model.
[0181] Language model testing and sub-task improvement. Use test data to test the model and calculate its accuracy according to different sub-tasks. If the result of a single fine-tuning does not meet the requirements, you can select sub-tasks with lower accuracy to supplement the corresponding training data and train the model again to improve the task capability.
[0182] Reference Figure 4 , shows a schematic diagram of the structure of a device for classifying the intent of inquiry information provided by an embodiment of the present application, characterized in that the device includes:
[0183] The product prompt information acquisition module 401 is used to respond to the intention recognition instruction issued by the user for the query information to be recognized, and obtain the product prompt information corresponding to the query information;
[0184] A product category acquisition module 402, configured to classify the query information according to the product prompt information using a pre-trained language model to obtain a product category corresponding to the query information;
[0185] The associated prompt information acquisition module 403 is used to determine the associated prompt information corresponding to the query information according to the product category;
[0186] The associated information acquisition module 404 is used to use the language model to identify the query information according to the associated prompt information to obtain the associated information corresponding to the query information;
[0187] The attribute prompt information acquisition module 405 is used to determine the attribute prompt information corresponding to the query information according to the associated information;
[0188] The attribute category acquisition module 406 is used to classify the query information according to the attribute prompt information using the language model to obtain the attribute category corresponding to the query information;
[0189] The intention classification result acquisition module 407 is used to use the attribute category as the intention classification result of the query information and display it to the user.
[0190] Optionally, the language model is trained in the following manner:
[0191] A data acquisition module, used to acquire training data and test data; the training data includes at least one of training query information, training prompt information, training category and training association information; the test data includes at least one of test query information, test prompt information, test category and test association information;
[0192] A model training module, used to use the training query information and the training prompt information as inputs of the language model, use the training category or the training association information as outputs of the language model, and use the training data to train the language model to obtain a language model to be verified;
[0193] A model testing module, used for inputting the test query information and the test prompt information into the language model to be verified, and obtaining the category to be verified or the associated information to be verified output by the language model to be verified;
[0194] A test result acquisition module, used to determine the loss function corresponding to the language model and the accuracy rate corresponding to the language model according to the test category and the category to be verified, or according to the test association information and the association information to be verified;
[0195] A model iteration training module is used to adjust the model parameters of the language model to be verified by using the loss function corresponding to the language model, and re-execute the steps of taking the training query information and the training prompt information as the input of the language model, taking the training category or the training association information as the output of the language model, and using the training data to train the language model until the accuracy corresponding to the language model is greater than or equal to a preset threshold, thereby obtaining a trained language model.
[0196] Optionally, before acquiring the training data and the test data, the device further includes:
[0197] A voice sample acquisition module, used to acquire voice samples;
[0198] A voice sample conversion module, used for converting the voice sample into a text sample;
[0199] A sample query information acquisition module, used to extract at least one sample query information from the text sample;
[0200] The sample query information labeling module is used to label the sample query information to obtain the sample attribute category corresponding to the sample query information.
[0201] Optionally, the data acquisition module includes:
[0202] An initial product category acquisition module, used to acquire an initial product category corresponding to at least one of the sample attribute categories;
[0203] A sample product category acquisition module, used to take at least one of the sample attribute categories that is the same as the initial product category as a sample attribute category set, and take the initial product category corresponding to the sample attribute category set as a sample product category;
[0204] A sample product prompt information acquisition module, used to use the prompt information corresponding to the sample product category as the sample product prompt information;
[0205] A sample-related information acquisition module, used to use the information in the sample query information that is related to the sample product category as sample-related information;
[0206] A sample-associated prompt information acquisition module, used to use the prompt information corresponding to the sample-associated information as the sample-associated prompt information;
[0207] A sample attribute prompt information acquisition module, used to use the prompt information corresponding to the sample association information and the sample attribute category as the sample attribute prompt information;
[0208] A training and testing data acquisition module is used to determine the training data and the test data based on at least one of the sample query information, the sample product prompt information, the sample association prompt information, the sample attribute prompt information, the sample association information, the sample product category, and the sample attribute category.
[0209] Optionally, the training and testing data acquisition module includes:
[0210] a training data selection module, configured to select at least one of the training query information, the training product prompt information, the training associated prompt information, the sample attribute prompt information, the sample associated information, the sample product category, and the sample attribute category according to a preset ratio from among the sample query information, the sample product prompt information, the sample associated information, the sample attribute prompt information, the training associated information, the training product category, and the training attribute category;
[0211] A training prompt information acquisition module, used to use at least one of the training product prompt information, the training association prompt information, and the training attribute prompt information as the training prompt information;
[0212] A training category acquisition module, used to take at least one of the training product category and the training attribute category as the training category;
[0213] a training data acquisition submodule, configured to use at least one of the training query information, the training prompt information, the training category, and the training association information as the training data;
[0214] a test data selection module, configured to select at least one of the test query information, the test product prompt information, the test associated prompt information, the sample attribute prompt information, the sample associated information, the sample product category, and the sample attribute category that is different from the training data;
[0215] A test prompt information acquisition module, used to use at least one of the test product prompt information, the test association prompt information, and the test attribute prompt information as the test prompt information;
[0216] A test category acquisition module, used to take at least one of the test product category and the test attribute category as the test category;
[0217] The test data acquisition submodule is used to use at least one of the test query information, the test prompt information, the test category and the test association information as the test data.
[0218] Optionally, the training prompt information includes at least one of the training product prompt information, the training association prompt information and the training attribute prompt information, the training category includes the training product category and / or the training attribute category, and the model training module includes:
[0219] A first subtask training module is used for, if the training prompt information is the training product prompt information, taking the training query information and the training product prompt information as inputs of the language model, taking the training product category as output of the language model, and using the training data to train the language model to obtain the language model to be verified;
[0220] A second subtask training module is configured to, if the training prompt information is the training-related prompt information, use the training query information and the training-related prompt information as inputs of the language model, use the training-related information as outputs of the language model, and use the training data to train the language model to obtain the language model to be verified;
[0221] The third subtask training module is used to, if the training prompt information is the training attribute prompt information, use the training query information and the training attribute prompt information as the input of the language model, use the training attribute category as the output of the language model, use the training data to train the language model, and obtain the language model to be verified.
[0222] Optionally, the device further comprises:
[0223] A low-accuracy subtask acquisition module, configured to acquire the training prompt information corresponding to the language model if the accuracy corresponding to the language model is less than the preset threshold;
[0224] A data retrieval module, used to re-acquire the training data and the test data;
[0225] The first subtask retraining module is used for, if the training prompt information is the training product prompt information, re-executing the step of taking the training query information and the training product prompt information as inputs of the language model, taking the training product category as outputs of the language model, and using the training data to train the language model until the accuracy rate corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model;
[0226] The second subtask retraining module is used for, if the training prompt information is the training-related prompt information, re-executing the steps of taking the training query information and the training-related prompt information as inputs of the language model, taking the training-related information as outputs of the language model, and using the training data to train the language model, until the accuracy rate corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model;
[0227] The third subtask retraining module is used to, if the training prompt information is the training attribute prompt information, re-execute the steps of taking the training query information and the training attribute prompt information as the input of the language model, taking the training attribute category as the output of the language model, and using the training data to train the language model until the accuracy corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model.
[0228] An embodiment of the present application also provides an electronic device, characterized in that it includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, it implements the intention classification method for inquiry information as described above.
[0229] An embodiment of the present application further provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for classifying the intent of inquiry information as described above is implemented.
[0230] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0231] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0232] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0233] The above is a detailed introduction to the provided method, device, electronic device and medium for classifying the intent of inquiry information. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for classifying the intention of inquiry information, characterized in that: The method comprises: In response to an intention recognition instruction issued by a user for query information to be recognized, obtaining product prompt information corresponding to the query information; Using a pre-trained language model to classify the inquiry information according to the product prompt information, to obtain a product category corresponding to the inquiry information; Determine, according to the product category, related prompt information corresponding to the inquiry information; Using the language model to identify the query information according to the associated prompt information, to obtain associated information corresponding to the query information; Determine attribute prompt information corresponding to the query information according to the association information; Using the language model to classify the query information according to the attribute prompt information, to obtain the attribute category corresponding to the query information; The attribute category is used as the intention classification result of the query information and is displayed to the user.
2. The method according to claim 1, characterized in that The language model is trained in the following way: Acquire training data and test data; the training data includes at least one of training query information, training prompt information, training category and training association information; the test data includes at least one of test query information, test prompt information, test category and test association information; Using the training query information and the training prompt information as inputs of the language model, using the training category or the training association information as outputs of the language model, and using the training data to train the language model to obtain a language model to be verified; Inputting the test query information and the test prompt information into the language model to be verified, and obtaining the category to be verified or the associated information to be verified output by the language model to be verified; Determine the loss function corresponding to the language model and the accuracy rate corresponding to the language model according to the test category and the category to be verified, or according to the test association information and the association information to be verified; The loss function corresponding to the language model is used to adjust the model parameters of the language model to be verified, and the steps of taking the training query information and the training prompt information as the input of the language model, taking the training category or the training association information as the output of the language model, and using the training data to train the language model are re-executed until the accuracy corresponding to the language model is greater than or equal to a preset threshold, thereby obtaining a trained language model.
3. The method according to claim 2, characterized in that Before acquiring the training data and the test data, the method further includes: Get a voice sample; Converting the speech sample into a text sample; extracting at least one sample query information from the text sample; The sample query information is labeled to obtain a sample attribute category corresponding to the sample query information.
4. The method according to claim 3, characterized in that The obtaining of training data and test data includes: Obtaining an initial product category corresponding to at least one of the sample attribute categories; Taking at least one of the sample attribute categories that is the same as the initial product category as a sample attribute category set, and taking the initial product category corresponding to the sample attribute category set as a sample product category; Using the prompt information corresponding to the sample product category as the sample product prompt information; taking the information in the sample query information associated with the sample product category as sample associated information; Using the prompt information corresponding to the sample-related information as the sample-related prompt information; using prompt information corresponding to the sample association information and the sample attribute category as sample attribute prompt information; The training data and the test data are determined according to at least one of the sample query information, the sample product prompt information, the sample association prompt information, the sample attribute prompt information, the sample association information, the sample product category, and the sample attribute category.
5. The method according to claim 4, characterized in that The determining the training data and the test data according to at least one of the sample query information, the sample product prompt information, the sample association prompt information, the sample attribute prompt information, the sample association information, the sample product category, and the sample attribute category comprises: Among the sample query information, the sample product prompt information, the sample association prompt information, the sample attribute prompt information, the sample association information, the sample product category, and the sample attribute category, at least one of the training query information, the training product prompt information, the training association prompt information, the training attribute prompt information, the training association information, the training product category, and the training attribute category is selected according to a preset ratio; using at least one of the training product prompt information, the training association prompt information, and the training attribute prompt information as the training prompt information; Using at least one of the training product category and the training attribute category as the training category; taking at least one of the training inquiry information, the training prompt information, the training category and the training related information as the training data; At least one of the test query information, the test product prompt information, the test associated prompt information, the test attribute prompt information, the test associated information, the test product category, and the test attribute category that is different from the training data is selected from the sample query information, the sample product prompt information, the test associated prompt information, the sample attribute prompt information, the test associated information, the test product category, and the test attribute category; using at least one of the test product prompt information, the test association prompt information, and the test attribute prompt information as the test prompt information; Taking at least one of the test product category and the test attribute category as the test category; At least one of the test inquiry information, the test prompt information, the test type, and the test related information is used as the test data.
6. The method according to claim 5, characterized in that The training prompt information includes at least one of the training product prompt information, the training association prompt information and the training attribute prompt information, the training category includes the training product category and / or the training attribute category, the training query information and the training prompt information are used as inputs of the language model, the training category or the training association information is used as output of the language model, and the language model is trained using the training data to obtain a language model to be verified, including: If the training prompt information is the training product prompt information, then using the training query information and the training product prompt information as inputs of the language model, using the training product category as output of the language model, and using the training data to train the language model to obtain the language model to be verified; If the training prompt information is the training-related prompt information, the training query information and the training-related prompt information are used as inputs of the language model, the training-related information is used as output of the language model, and the language model is trained using the training data to obtain the language model to be verified; If the training prompt information is the training attribute prompt information, the training query information and the training attribute prompt information are used as inputs of the language model, the training attribute category is used as output of the language model, and the language model is trained using the training data to obtain the language model to be verified.
7. The method according to claim 6, further comprising: If the accuracy rate corresponding to the language model is less than the preset threshold, obtaining the training prompt information corresponding to the language model; Re-acquiring the training data and the test data; If the training prompt information is the training product prompt information, re-execute the step of taking the training query information and the training product prompt information as inputs of the language model, taking the training product category as output of the language model, and using the training data to train the language model until the accuracy rate corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model; If the training prompt information is the training-related prompt information, re-performing the step of using the training query information and the training-related prompt information as inputs of the language model, using the training-related information as outputs of the language model, and using the training data to train the language model until the accuracy rate corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model; If the training prompt information is the training attribute prompt information, then re-execute the steps of taking the training query information and the training attribute prompt information as the input of the language model, taking the training attribute category as the output of the language model, and using the training data to train the language model until the accuracy rate corresponding to the language model is greater than or equal to the preset threshold, thereby obtaining a trained language model.
8. A device for classifying the intention of inquiry information, characterized in that: The device comprises: A product prompt information acquisition module, configured to respond to an intention recognition instruction issued by a user for query information to be recognized, and acquire product prompt information corresponding to the query information; A product category acquisition module, used to classify the inquiry information according to the product prompt information using a pre-trained language model to obtain the product category corresponding to the inquiry information; A related prompt information acquisition module, used to determine the related prompt information corresponding to the inquiry information according to the product category; A related information acquisition module, used to use the language model to identify the query information according to the related prompt information, and obtain the related information corresponding to the query information; An attribute prompt information acquisition module, used to determine the attribute prompt information corresponding to the query information according to the associated information; An attribute category acquisition module, used to classify the inquiry information according to the attribute prompt information using the language model to obtain the attribute category corresponding to the inquiry information; An intention classification result acquisition module is used to use the attribute category as the intention classification result of the query information and display it to the user.
9. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for classifying the intent of the inquiry information according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for classifying the intent of the inquiry information according to any one of claims 1 to 7 is implemented.