Intelligent teaching dialogue method and device based on large model, storage medium and computer equipment
By constructing a large model of corpus sample training for children's user groups, teaching dialogue information that conforms to children's cognitive characteristics is generated, the problem of excessive professional language expression in the existing educational dialogue system is solved, and personalized teaching is achieved and learning effect is improved.
Patent Information
- Application Number
- CN202411854021.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-05-13
AI Technical Summary
The existing educational dialogue system is applied based on a general large language model. The output language expression is too professional or abstract, difficult to conform to the characteristics of children's cognitive development, and lacks understanding and targeted solutions to common cognitive impairments in children's learning process.
Through the corpus sample training model built for the target user group, teaching dialogue information that conforms to students' cognitive characteristics is generated. The specific methods include receiving input information from the learning user, performing knowledge feature extraction and knowledge recall, constructing dialogue prompt words, and calling a big model to generate teaching dialogue information.
It realizes personalized teaching for the target user group, stimulates students' interest and enthusiasm in learning, improves learning effect, and has strong adaptability. It can quickly and accurately find knowledge related to input information, and improves teaching efficiency.
Smart Images

Figure CN119988538A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence education technology, and in particular to a large model-based intelligent teaching dialogue method, device, storage medium and computer equipment. Background Art
[0002] With the rapid development of artificial intelligence technology, the application of AI in the field of education has become an important development trend. It has become possible to use AI technology to teach various types of knowledge to students and the elderly. Taking children's education as an example, the intelligent dialogue system can provide children with personalized learning guidance and companionship. However, most of the existing educational dialogue systems are directly applied on the basis of general large language models. The output language expression is often too professional or abstract, which does not conform to the cognitive development characteristics of children. There is a lack of understanding of common cognitive disorders in children's learning process and targeted solutions.
[0003] How to provide personalized AI teaching for specific user groups is currently a hot topic in AI education. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a large-model-based intelligent teaching dialogue method, device, storage medium and computer equipment. By training the large model with corpus samples constructed for the target user group, teaching dialogue information that conforms to the students' cognitive characteristics is generated, which helps to stimulate students' interest and enthusiasm in learning, improve learning effects, and achieve adaptive teaching for the target user group.
[0005] According to one aspect of the present application, a large model-based intelligent teaching dialogue method is provided, the method comprising:
[0006] Receive the current round of input information from the learning user;
[0007] Extracting knowledge features from the input information of this round, recalling knowledge from a preset knowledge base according to the extracted knowledge feature information, and constructing prompt words for this round of dialogue based on the knowledge recall result and the input information of this round;
[0008] Calling the big model to generate teaching dialogue information that meets the cognition of the target user group based on the prompt words of the current round of dialogue, wherein the big model is pre-trained with corpus samples constructed for the target user group;
[0009] Output the teaching dialogue information.
[0010] In an optional implementation, after receiving the current round of input information from the learning user, the method further includes:
[0011] Based on the current round of input information, determining the current round of intelligent dialogue state for the learning user, wherein the current round of intelligent dialogue state is one of a plurality of preset intelligent dialogue states, and the preset intelligent dialogue states include a teaching state, a knowledge supplement state, and an emotional companionship state;
[0012] The extracting of knowledge features from the input information of this round, recalling knowledge from a preset knowledge base according to the extracted knowledge feature information, and constructing prompt words for this round of dialogue based on the knowledge recall result and the input information of this round, includes:
[0013] When the current round of intelligent dialogue state is a teaching state, feature extraction and knowledge understanding depth analysis are performed on the current round of input information, knowledge is recalled from a preset knowledge base according to the extracted first knowledge feature information, and prompt words for the current round of dialogue are constructed based on the first knowledge recall result, the knowledge understanding depth, the current round of input information, and a teaching state prompt word template corresponding to the teaching state;
[0014] When the current round of intelligent dialogue state is a knowledge supplementation state, a missing knowledge analysis is performed based on the current round of input information, knowledge is recalled from a preset knowledge base according to the missing knowledge, and a prompt word for the current round of dialogue is constructed based on the missing knowledge, the second knowledge recall result, the current round of input information, and a knowledge explanation prompt word template corresponding to the knowledge supplementation state;
[0015] When the state of this round of intelligent dialogue is the emotional companionship state, knowledge features are extracted based on the input information of this round, knowledge is recalled from the preset knowledge base according to the extracted second knowledge feature information, and based on the third knowledge recall result, the input information of this round and the emotional resonance prompt word template corresponding to the emotional companionship state, the prompt words for this round of dialogue are constructed.
[0016] In an optional implementation, the teaching status prompt word template is used to guide the large model to determine the teaching dialogue knowledge depth based on the knowledge understanding depth, and generate the first teaching information that meets the teaching dialogue knowledge depth based on the first knowledge recall result and the current round input information;
[0017] The knowledge explanation prompt word template is used to guide the large model to generate knowledge explanation information about the missing knowledge based on the second knowledge recall result and the current round input information;
[0018] The emotional resonance prompt word template is used to guide the large model to generate emotional soothing information and second teaching information based on the current round of input information and the third knowledge recall result.
[0019] In an optional implementation, determining the current round intelligent dialogue state for the learning user based on the current round input information includes:
[0020] If the current intelligent dialogue state is the teaching state, knowledge deficiency analysis and sentiment analysis are performed on the input information of this round. If the sentiment analysis result is negative sentiment, the intelligent dialogue state of this round is determined to be changed to the sentiment companionship state. If the knowledge deficiency analysis result is knowledge deficiency, the intelligent dialogue state of this round is determined to be changed to the knowledge supplementation state. Otherwise, the intelligent dialogue state of this round is determined to remain in the teaching state.
[0021] If the current intelligent dialogue state is the emotional companionship state, then performing emotional analysis on the input information of this round, and determining that the intelligent dialogue state of this round is maintained as the emotional companionship state if the emotional analysis result is negative emotion, otherwise determining that the intelligent dialogue state of this round is changed to the teaching state;
[0022] If the current intelligent dialogue state is the knowledge supplement state, the missing knowledge understanding situation of the input information of this round is analyzed. If the result of the missing knowledge understanding situation analysis is that the understanding is not understood, it is determined that the state of the intelligent dialogue of this round remains in the knowledge supplement state; otherwise, it is determined that the state of the intelligent dialogue of this round is transferred to the teaching state.
[0023] In an optional implementation, the preset knowledge base includes multi-level knowledge point information and knowledge association network information;
[0024] Recall the preset knowledge base, including:
[0025] According to the superior knowledge point corresponding to the knowledge point to be recalled, the knowledge point to be recalled is located, and the knowledge point information corresponding to the knowledge point to be recalled is obtained; and according to the knowledge association network information, the associated knowledge point corresponding to the knowledge point to be recalled is determined, and the associated knowledge point information corresponding to the associated knowledge point is obtained, wherein the associated knowledge point includes at least one of the preceding knowledge point, subsequent knowledge point, similar knowledge point, knowledge point with progressive difficulty, and knowledge point with common application scenario corresponding to the knowledge point to be recalled.
[0026] In an optional implementation, before receiving the current round of input information from the learning user, the method further includes:
[0027] Acquire a corpus sample constructed for the target user group, and use the corpus sample to pre-train the general large model to obtain an initial large model, wherein the corpus sample includes at least one of the following: dialogue corpus of the target user group, reading materials of the target user group, and interactive corpus between the target user group and a teacher group corresponding to the target user group;
[0028] Acquire conversation samples constructed for the target user group, and use the conversation samples to fine-tune the initial large model to obtain the large model, wherein the conversation samples include scenario conversation samples corresponding to at least one teaching scenario, and the scenario conversation samples include conversations of the target user group and reply conversations constructed for conversations of the target user group.
[0029] In an optional implementation, after fine-tuning the initial large model using the conversation sample to obtain the large model, the method further includes:
[0030] Acquire multiple teaching dialogue information examples generated by the large model for the first dialogue example of the target user group, perform multi-dimensional scoring on each teaching dialogue information example, and construct a dialogue scoring sample based on the first dialogue example of the target user group, each teaching dialogue information example, and the multi-dimensional scoring corresponding to each teaching dialogue information example;
[0031] A conversation scoring model is trained based on the conversation scoring samples, and preference alignment training is performed on the large model based on the trained conversation scoring model and a second conversation example of a target user group.
[0032] According to another aspect of the present application, there is provided an intelligent teaching dialogue device based on a large model, the device comprising:
[0033] An information receiving module is used to receive the current round of input information from the learning user;
[0034] A prompt word construction module is used to extract knowledge features from the input information of this round, recall knowledge from a preset knowledge base according to the extracted knowledge feature information, and construct prompt words for this round of dialogue based on the knowledge recall result and the input information of this round;
[0035] A dialogue generation module, used to call the big model to generate teaching dialogue information that meets the cognition of the target user group based on the prompt words of the current dialogue, wherein the big model is pre-trained with corpus samples constructed for the target user group;
[0036] The dialogue output module is used to output the teaching dialogue information.
[0037] In an optional embodiment, the device further comprises:
[0038] A state recognition module, used to determine the current round of intelligent dialogue state for the learning user based on the current round of input information, wherein the current round of intelligent dialogue state is one of a plurality of preset intelligent dialogue states, and the preset intelligent dialogue states include a teaching state, a knowledge supplement state, and an emotional companionship state;
[0039] The prompt word building module is also used for:
[0040] When the current round of intelligent dialogue state is a teaching state, feature extraction and knowledge understanding depth analysis are performed on the current round of input information, knowledge is recalled from a preset knowledge base according to the extracted first knowledge feature information, and prompt words for the current round of dialogue are constructed based on the first knowledge recall result, the knowledge understanding depth, the current round of input information, and a teaching state prompt word template corresponding to the teaching state;
[0041] When the current round of intelligent dialogue state is a knowledge supplementation state, a missing knowledge analysis is performed based on the current round of input information, knowledge is recalled from a preset knowledge base according to the missing knowledge, and a prompt word for the current round of dialogue is constructed based on the missing knowledge, the second knowledge recall result, the current round of input information, and a knowledge explanation prompt word template corresponding to the knowledge supplementation state;
[0042] When the state of this round of intelligent dialogue is the emotional companionship state, knowledge features are extracted based on the input information of this round, knowledge is recalled from the preset knowledge base according to the extracted second knowledge feature information, and based on the third knowledge recall result, the input information of this round and the emotional resonance prompt word template corresponding to the emotional companionship state, the prompt words for this round of dialogue are constructed.
[0043] In an optional implementation, the teaching status prompt word template is used to guide the large model to determine the teaching dialogue knowledge depth based on the knowledge understanding depth, and generate the first teaching information that meets the teaching dialogue knowledge depth based on the first knowledge recall result and the current round input information;
[0044] The knowledge explanation prompt word template is used to guide the large model to generate knowledge explanation information about the missing knowledge based on the second knowledge recall result and the current round input information;
[0045] The emotional resonance prompt word template is used to guide the large model to generate emotional soothing information and second teaching information based on the current round of input information and the third knowledge recall result.
[0046] In an optional implementation manner, the state identification module is further used to:
[0047] If the current intelligent dialogue state is the teaching state, knowledge deficiency analysis and sentiment analysis are performed on the input information of this round. If the sentiment analysis result is negative sentiment, the intelligent dialogue state of this round is determined to be changed to the sentiment companionship state. If the knowledge deficiency analysis result is knowledge deficiency, the intelligent dialogue state of this round is determined to be changed to the knowledge supplementation state. Otherwise, the intelligent dialogue state of this round is determined to remain in the teaching state.
[0048] If the current intelligent dialogue state is the emotional companionship state, then performing emotional analysis on the input information of this round, and determining that the intelligent dialogue state of this round is maintained as the emotional companionship state if the emotional analysis result is negative emotion, otherwise determining that the intelligent dialogue state of this round is changed to the teaching state;
[0049] If the current intelligent dialogue state is the knowledge supplement state, the missing knowledge understanding situation of the input information of this round is analyzed. If the result of the missing knowledge understanding situation analysis is that the understanding is not understood, it is determined that the state of the intelligent dialogue of this round remains in the knowledge supplement state; otherwise, it is determined that the state of the intelligent dialogue of this round is transferred to the teaching state.
[0050] In an optional implementation, the preset knowledge base includes multi-level knowledge point information and knowledge association network information; the prompt word construction module is further used to:
[0051] According to the superior knowledge point corresponding to the knowledge point to be recalled, the knowledge point to be recalled is located, and the knowledge point information corresponding to the knowledge point to be recalled is obtained; and according to the knowledge association network information, the associated knowledge point corresponding to the knowledge point to be recalled is determined, and the associated knowledge point information corresponding to the associated knowledge point is obtained, wherein the associated knowledge point includes at least one of the preceding knowledge point, subsequent knowledge point, similar knowledge point, knowledge point with progressive difficulty, and knowledge point with common application scenario corresponding to the knowledge point to be recalled.
[0052] In an optional embodiment, the device further comprises: a large model training module, which is used to:
[0053] Acquire a corpus sample constructed for the target user group, and use the corpus sample to pre-train the general large model to obtain an initial large model, wherein the corpus sample includes at least one of the following: dialogue corpus of the target user group, reading materials of the target user group, and interactive corpus between the target user group and a teacher group corresponding to the target user group;
[0054] Acquire conversation samples constructed for the target user group, and use the conversation samples to fine-tune the initial large model to obtain the large model, wherein the conversation samples include scenario conversation samples corresponding to at least one teaching scenario, and the scenario conversation samples include conversations of the target user group and reply conversations constructed for conversations of the target user group.
[0055] In an optional implementation, the large model training module is further used to:
[0056] Acquire multiple teaching dialogue information examples generated by the large model for the first dialogue example of the target user group, perform multi-dimensional scoring on each teaching dialogue information example, and construct a dialogue scoring sample based on the first dialogue example of the target user group, each teaching dialogue information example, and the multi-dimensional scoring corresponding to each teaching dialogue information example;
[0057] A conversation scoring model is trained based on the conversation scoring samples, and preference alignment training is performed on the large model based on the trained conversation scoring model and a second conversation example of a target user group.
[0058] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned intelligent teaching dialogue method based on a large model is implemented.
[0059] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned large model-based intelligent teaching dialogue method when executing the program.
[0060] By means of the above technical scheme, the embodiment of the present application provides a method, device, storage medium and computer equipment for intelligent teaching dialogue based on a large model, which extracts knowledge features from the input information of the student user, and recalls knowledge from the preset knowledge base according to the extracted knowledge feature information, thereby constructing prompt words based on the knowledge recall result and the user's input information, and inputting the prompt words into the large model obtained by training the corpus samples constructed for the target user group in advance, and generating and outputting teaching dialogue information that conforms to the cognition of the target user group through the large model. The embodiment of the present application generates teaching dialogue information that conforms to the cognitive characteristics of students by training the large model with the corpus samples constructed for the target user group, which helps to stimulate students' interest and enthusiasm in learning, improve learning effects, and realize adaptive teaching for the target user group, and uses knowledge feature extraction and the preset knowledge base for knowledge recall, which can quickly and accurately find knowledge related to the input information and improve teaching efficiency.
[0061] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0063] Figure 1 A schematic diagram of a flow chart of an intelligent teaching dialogue method based on a large model provided in an embodiment of the present application is shown;
[0064] Figure 2 A schematic diagram of a process of another intelligent teaching dialogue method based on a large model provided in an embodiment of the present application is shown;
[0065] Figure 3 A schematic diagram of a process of another intelligent teaching dialogue method based on a large model provided in an embodiment of the present application is shown;
[0066] Figure 4 A schematic diagram of a process flow of a large model training method provided in an embodiment of the present application is shown;
[0067] Figure 5 A schematic diagram of the structure of an intelligent teaching dialogue device based on a large model provided in an embodiment of the present application is shown;
[0068] Figure 6 A structural schematic diagram of another large-model-based intelligent teaching dialogue device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0069] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0070] In this embodiment, a large model-based intelligent teaching dialogue method is provided. Figure 1 As shown, the method includes:
[0071] Step 101: Receive the current round input information of the learning user.
[0072] The intelligent teaching dialogue method based on a large model proposed in the embodiment of the present application is intended to provide students with personalized teaching services that match their cognition through an intelligent dialogue system. First, input information from learning users (such as students of different school ages, the elderly, etc.) is received. This information can be in text, voice or other forms, reflecting the learning needs, questions or feedback of the learning users. Specifically, the embodiment of the present application teaches in the form of multiple rounds of dialogue. Each time the learning user inputs a round of information, the system gives the teaching dialogue information of this round based on the input information of this round (it can also be combined with contextual information, that is, all previous rounds of dialogue or a specific number of previous rounds of dialogue of this intelligent teaching). The learning user inputs information again, and the system outputs the teaching dialogue information again, and so on until the completion of an intelligent teaching. The completion of an intelligent teaching can be signaled by the learning user exiting the intelligent teaching scene.
[0073] Step 102: extract knowledge features from the input information of this round, recall knowledge from a preset knowledge base according to the extracted knowledge feature information, and construct prompt words for this round of dialogue based on the knowledge recall result and the input information of this round.
[0074] In the embodiment of the present application, after obtaining the input information of this round, knowledge features are extracted from the input information of this round, for example, natural language processing technology (such as word embedding, named entity recognition, etc.) is used to identify key information in the input. Then, knowledge retrieval and recall are performed in the preset knowledge base based on the extracted feature information to obtain knowledge related to the input information. Thus, the prompt words of this round of dialogue are constructed by combining the knowledge recall results and the input information, and these prompt words will be used to guide the large model to generate subsequent dialogues.
[0075] Step 103: Calling a large model to generate teaching dialogue information that meets the cognition of the target user group based on the prompt words of this round of dialogue, wherein the large model is pre-trained with corpus samples constructed for the target user group.
[0076] In the embodiment of the present application, a pre-trained large model is called to generate teaching dialogue information. This large model is built for a target user group (such as students of a specific age group) and is trained using a corpus sample built for the group. Therefore, it can generate teaching dialogue information that meets the cognitive characteristics and teaching needs of the target user group, so as to improve the adaptability between the intelligent teaching dialogue and the user group, and meet the cognitive characteristics of the user group.
[0077] Step 104: output the teaching dialogue information.
[0078] In the embodiment of the present application, the generated teaching dialogue information is output to the user. This can be in the form of text, voice or other forms. The output information may include responses to questions or needs of student users, relevant teaching content or suggestions, teaching guidance for student users, etc.
[0079] By applying the technical solution of this embodiment, knowledge features are extracted from the input information of student users, and knowledge is recalled from the preset knowledge base based on the extracted knowledge feature information, so as to construct prompt words based on the knowledge recall results and the user's input information, and the prompt words are input into a large model obtained by training with corpus samples constructed in advance for the target user group, and the teaching dialogue information that conforms to the cognition of the target user group is generated and output through the large model. The embodiment of the present application generates teaching dialogue information that conforms to the cognitive characteristics of students by training a large model with corpus samples constructed for the target user group, which helps to stimulate students' interest and enthusiasm in learning, improve learning effects, and achieve adaptive teaching for the target user group. In addition, knowledge feature extraction and knowledge recall with the preset knowledge base can quickly and accurately find knowledge related to the input information, thereby improving teaching efficiency.
[0080] Furthermore, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another intelligent teaching dialogue method based on a large model is provided, such as Figure 2 As shown, the method includes:
[0081] Step 201, receiving the current round input information of the learning user; based on the current round input information, determining the current round intelligent dialogue state for the learning user, wherein the current round intelligent dialogue state is one of a plurality of preset intelligent dialogue states, and the preset intelligent dialogue state includes a teaching state, a knowledge supplement state, and an emotional companionship state.
[0082] In this embodiment, after receiving the input information of the learning user in this round, it is necessary to analyze this information to determine the current needs or expectations of the user, so as to determine the state of the intelligent dialogue of the intelligent teaching dialogue system for the learning user in this round, for example, by semantic analysis, emotion recognition, etc. To determine the state of the intelligent dialogue in this round. Specifically, when the information input by the user indicates that they are seeking knowledge, answering questions, or want to provide some teaching guidance, the teaching state is entered. If the information input by the user indicates that they want to learn more background knowledge, expand information, deepen their understanding of a topic, or show insufficient understanding of a certain knowledge point, the knowledge supplement state is entered. When the information input by the user expresses more emotions, seeks comfort or companionship, the emotional companionship state is entered.
[0083] In the embodiment of the present application, in order to flexibly adjust the state of the intelligent dialogue according to the current needs and state of the learning user, thereby providing a more personalized teaching service that meets the user's expectations. Optionally, the step 201 of determining the state of the current round of intelligent dialogue for the learning user based on the current round of input information includes:
[0084] Step 201-1: If the current intelligent dialogue state is the teaching state, perform knowledge gap analysis and sentiment analysis on the input information of this round. If the sentiment analysis result is a negative sentiment, determine that the state of this round of intelligent dialogue is changed to the sentiment companionship state. If the knowledge gap analysis result shows that there is knowledge gap, determine that the state of this round of intelligent dialogue is changed to the knowledge supplement state. Otherwise, determine that the state of this round of intelligent dialogue remains in the teaching state.
[0085] In the above embodiment, if Figure 3 As shown, when the current intelligent dialogue state is the teaching state, the input information of the learning user is analyzed to see whether there are deficiencies or omissions in knowledge. Specifically, this can be achieved by comparing the user input with the preset teaching objectives, knowledge points, etc., or by analyzing whether the semantics of the user input expresses insufficient understanding of a certain knowledge point. It is also possible to analyze whether the user's answer to a question shows insufficient understanding of the knowledge points covered by the question through the user input information. At the same time, the input information of the learning user is subjected to sentiment analysis to determine whether the user's current emotional state is positive or negative. If the sentiment analysis result shows that the user's current emotional state is negative, it is believed that the user needs emotional support and companionship, so the intelligent dialogue state is changed from the teaching state to the emotional companionship state. If the knowledge deficiency analysis result shows that the user has knowledge deficiencies, it is believed that relevant knowledge needs to be supplemented, so the intelligent dialogue state is changed from the teaching state to the knowledge supplementation state. If neither the knowledge deficiency analysis nor the sentiment analysis shows an obvious need for change, the current teaching state is maintained. In addition, if there is both knowledge deficiency and negative emotion, the emotional companionship state can be preferentially transferred to the emotional companionship state in order to appease the negative emotions of the learning user first.
[0086] Step 201-2: If the current intelligent dialogue state is the emotional companionship state, perform emotional analysis on the input information of this round. If the emotional analysis result is a negative emotion, determine that the state of this round of intelligent dialogue remains in the emotional companionship state; otherwise, determine that the state of this round of intelligent dialogue is changed to the teaching state.
[0087] In the above embodiment, when the current intelligent dialogue state is the emotional companionship state, the input information of the learning user is subjected to emotional analysis to determine whether the user's current emotional state is still negative. If the emotional analysis result shows that the user's current emotional state is still negative, the emotional companionship state is maintained, and emotional support and companionship are continued. If the emotional analysis result shows that the user's current emotional state has turned positive or neutral, it is considered that the user has received sufficient emotional support, and the intelligent dialogue state is changed from the emotional companionship state to the teaching state, and teaching services are continued.
[0088] Step 201-3: If the current intelligent dialogue state is the knowledge supplement state, the missing knowledge understanding situation of the input information of this round is analyzed. If the result of the missing knowledge understanding situation analysis is that the information is not understood, the state of the intelligent dialogue of this round is determined to remain in the knowledge supplement state; otherwise, the state of the intelligent dialogue of this round is determined to be changed to the teaching state.
[0089] In the above embodiment, when the current intelligent dialogue state is the knowledge supplementation state, the understanding of the missing knowledge is analyzed for the input information of the learning user to determine whether the user has understood the previously supplemented knowledge. If the analysis result of the missing knowledge understanding shows that the user still does not understand the relevant knowledge, the knowledge supplementation state is maintained, and the supplementation and explanation of the relevant knowledge are continued. If the analysis result of the missing knowledge understanding shows that the user has understood the relevant knowledge, it is believed that the user has the foundation for further learning, and the intelligent dialogue state is changed from the knowledge supplementation state to the teaching state, and the teaching service is continued.
[0090] Step 202: When the state of this round of intelligent dialogue is the teaching state, feature extraction and knowledge understanding depth analysis are performed on the input information of this round, knowledge is recalled from the preset knowledge base according to the extracted first knowledge feature information, and based on the first knowledge recall result, the knowledge understanding depth, the input information of this round and the teaching state prompt word template corresponding to the teaching state, the prompt words of this round of dialogue are constructed.
[0091] In this embodiment, after confirming that the current intelligent dialogue state is the teaching state, the input information of the current round of the learning user is firstly subjected to feature extraction, such as lexical analysis, syntactic analysis, semantic role labeling, etc., to identify key information in the input, such as question type, key concepts, contextual relationships, etc. In addition, the degree of understanding of the current knowledge point by the learning user is analyzed, which can be specifically inferred by analyzing the expressions, questions or errors in the user input. According to the first knowledge feature information obtained by feature extraction, knowledge recall is performed in the preset knowledge base. The preset knowledge base contains knowledge points, concept explanations, examples, etc. in multiple fields, and the result of the recall is the knowledge entry related to the user input. Further, based on the first knowledge recall result, the depth of knowledge understanding, and the input information of this round, these information are integrated as the basis for constructing the dialogue prompt words, and the teaching state prompt word template corresponding to the teaching state is combined, and the placeholders and variables in the template are filled, reorganized or adjusted to generate dialogue prompt words that meet the current teaching state and user needs. The embodiment of the present application can generate dialogue prompt words that meet both the user input requirements and the teaching scene requirements through feature extraction, knowledge recall, depth analysis and template application, which helps to understand user needs more accurately and provide more effective teaching support.
[0092] Among them, the teaching state prompt word template is used to guide the big model to determine the teaching dialogue knowledge depth based on the knowledge understanding depth, and generate the first teaching information that meets the teaching dialogue knowledge depth based on the first knowledge recall result and the current round input information. In the teaching state of the intelligent dialogue system, the teaching state prompt word template can guide the big model to dynamically adjust the knowledge depth of the teaching dialogue based on the user's knowledge understanding depth, and generate accurate teaching dialogue information accordingly. Specifically, the teaching state prompt word template contains vocabulary, sentence patterns or structures related to knowledge depth, and these elements can guide the big model to select appropriate teaching content and expression methods according to the user's knowledge understanding depth. For example, if the user's understanding depth is shallow, the big model will output more basic explanations and examples; if the user already has a certain knowledge foundation, the big model may be more inclined to provide advanced content or in-depth discussion. After determining the knowledge depth of the teaching dialogue, by combining the first knowledge recall result and the current round input information with the teaching state prompt word template to construct a dialogue prompt word, the big model can generate the first teaching information that not only meets the user's knowledge understanding depth, but also can accurately answer the user's questions or meet the user's needs as the teaching dialogue information, ensuring that the generated teaching information can accurately meet the user's needs.
[0093] Step 203: When the state of this round of intelligent dialogue is a knowledge supplementation state, a missing knowledge analysis is performed based on the input information of this round, knowledge is recalled from a preset knowledge base according to the missing knowledge, and based on the missing knowledge, the second knowledge recall result, the input information of this round and the knowledge explanation prompt word template corresponding to the knowledge supplementation state, the prompt words of this round of dialogue are constructed.
[0094] In this embodiment, when it is confirmed that the current intelligent dialogue state is a knowledge supplementation state, based on the user's current round of input information, an analysis of missing knowledge is performed to determine the knowledge points or concepts that the user wants or should understand but has not yet mastered. According to the analysis results of the missing knowledge, knowledge recall is performed in the preset knowledge base to find knowledge points or explanations related to the user's missing knowledge so that supplementary information can be provided later. Further, the missing knowledge, the second knowledge recall results (i.e., the knowledge points related to the user's missing knowledge retrieved from the knowledge base) and the current round of input information are integrated as the basis for constructing dialogue prompts. The basic information is combined with the knowledge explanation prompt template, and dialogue prompts that meet the current knowledge supplementation state and user needs are generated by filling, reorganizing or adjusting the placeholders and variables in the template, ensuring that the generated dialogue prompts can clearly convey the intention and content of the supplementary knowledge.
[0095] Among them, the knowledge explanation prompt word template is used to guide the large model to generate knowledge explanation information about the missing knowledge based on the second knowledge recall result and the current round of input information. The knowledge explanation prompt word template contains vocabulary, sentence patterns or structures related to knowledge explanation. These elements can guide the large model (i.e., the core processing unit of the intelligent dialogue system) to generate a detailed explanation of the missing knowledge based on the second knowledge recall result (i.e., the knowledge points related to the user's missing knowledge retrieved from the preset knowledge base) and the current round of input information. By using the knowledge explanation prompt word template, the large model can more accurately grasp the key points and difficulties of the explanation, ensure that the generated explanation information can directly respond to the user's questions and needs, and avoid generating redundant or irrelevant information, thereby improving the efficiency and effectiveness of the explanation.
[0096] Step 204, when the state of the current round of intelligent dialogue is the emotional companionship state, knowledge features are extracted based on the current round of input information, knowledge is recalled from the preset knowledge base according to the extracted second knowledge feature information, and based on the third knowledge recall result, the current round of input information and the emotional resonance prompt word template corresponding to the emotional companionship state, the current round of dialogue prompt words are constructed.
[0097] In this embodiment, when it is confirmed that the current intelligent dialogue state is an emotional companionship state, knowledge features are extracted based on the user's input information in this round. Based on the extracted second knowledge feature information, knowledge recall is performed in the preset knowledge base. The third knowledge recall result (i.e., the knowledge points or stories related to the user's emotional needs retrieved from the knowledge base), the input information of this round, and the emotional resonance prompt word template corresponding to the emotional companionship state are integrated as the basis for constructing dialogue prompt words. The basic information is combined with the emotional resonance prompt word template, and dialogue prompt words that meet the current emotional companionship state and user needs are generated by filling, reorganizing or adjusting the placeholders and variables in the template.
[0098] Among them, the emotional resonance prompt word template is used to guide the large model to generate emotional soothing information and second teaching information based on the current round of input information and the third knowledge recall result. The emotional resonance prompt word template not only helps the large model understand and respond to the user's emotional needs, but also ensures that the generated dialogue content has both emotional soothing effects and valuable teaching information. Specifically, the emotional resonance prompt word template contains information related to emotional soothing, which can guide the large model (i.e., the core processing unit of the intelligent dialogue system) to generate information with emotional soothing effects based on the current round of input information, which can specifically include empathetic expressions, encouraging words, positive suggestions or related stories, aiming to help users alleviate negative emotions and improve their emotional state. In addition to emotional soothing, the emotional resonance prompt word template also contains elements related to teaching, so that the large model combines the user input information and the recalled knowledge points (i.e., the third knowledge recall results) to generate relevant teaching information to ensure that while providing emotional support, valuable knowledge or skills can also be provided to users. This dual function enables users to be provided with more comprehensive and effective support and services in an emotional companionship state.
[0099] In an embodiment of the present application, optionally, the preset knowledge base includes multi-level knowledge point information and knowledge association network information; performing knowledge recall on the preset knowledge base includes: locating the knowledge point to be recalled according to the superior knowledge point corresponding to the knowledge point to be recalled, obtaining the knowledge point information corresponding to the knowledge point to be recalled, and determining the associated knowledge point corresponding to the knowledge point to be recalled according to the knowledge association network information, and obtaining the associated knowledge point information corresponding to the associated knowledge point, wherein the associated knowledge point includes at least one of the preceding knowledge point, subsequent knowledge point, similar knowledge point, knowledge point with progressive difficulty, and common application scenario knowledge point corresponding to the knowledge point to be recalled.
[0100] In the above embodiment, knowledge recall is achieved through a pre-built preset knowledge base containing multi-level knowledge point information and knowledge association network information. Among them, the preset knowledge base is organized into a hierarchical structure. Taking Chinese teaching as an example, it can be divided into a first-level knowledge category (such as: literary common sense, writing skills, grammar knowledge), a second-level knowledge module (such as: ancient poetry, modern prose, writing techniques) and a third-level specific knowledge point (such as: specific verses, rhetorical techniques, sentence types). This hierarchical structure helps to understand and locate the position of knowledge points in the knowledge system. In addition to the hierarchical relationship, the preset knowledge base also contains various association information between knowledge points, such as pre-knowledge points (knowledge points that must be mastered before learning the current knowledge point), subsequent knowledge points (extension or advancement of the current knowledge point), similar knowledge points (knowledge points similar in content or nature), progressive difficulty knowledge points (related knowledge points whose difficulty gradually increases or decreases), and common application scenario knowledge points (knowledge points that are often used together in practical applications). When performing knowledge recall, the knowledge point can be quickly found in the hierarchical structure of the preset knowledge base according to the superior knowledge point corresponding to the knowledge point to be recalled, and the hierarchical relationship of the knowledge point can be used to improve the retrieval efficiency. After locating the knowledge point to be recalled, its detailed knowledge point information, such as definition, properties, examples, etc., can be obtained. Further, using the knowledge association network information, other knowledge points related to the knowledge point to be recalled can be identified. These associated knowledge points may include pre-positioned knowledge points, subsequent knowledge points, similar knowledge points, knowledge points with progressive difficulty, and knowledge points of common application scenarios. For each determined associated knowledge point, its detailed knowledge point information can also be obtained. The embodiment of the present application can comprehensively recall the knowledge information related to the knowledge point to be recalled by considering the hierarchical relationship and multiple associated information of the knowledge point, and use the hierarchical structure for positioning, as well as the pre-constructed knowledge association network information, to improve the speed and accuracy of knowledge retrieval, so that the subsequent large model can better conduct dialogue teaching with the user based on these recalled knowledge. In addition, multi-granularity knowledge recall can be performed according to the knowledge point to be recalled to obtain more comprehensive knowledge information. In a specific application scenario, taking the "personification technique" as an example of the knowledge point to be recalled, you can directly locate the "rhetorical technique" secondary module, quickly retrieve the specific knowledge point of "personification", obtain complete knowledge attributes (definition, examples, etc.), and further perform multi-granular knowledge retrieval, which can include literal indexing (matching "personification" related terms), concept indexing (associating "metaphor, imagination" and other concepts), scene indexing (matching "writing, appreciation" scenes), age group indexing (screening age-appropriate content), and conducting knowledge association network searches, including associating other rhetorical techniques (simile, metaphor, etc.), linking related writing skills, and recommending exercises of appropriate difficulty.
[0101] Step 205: Calling the big model to generate teaching dialogue information that meets the cognition of the target user group based on the prompt words of this round of dialogue, wherein the big model is pre-trained with corpus samples constructed for the target user group.
[0102] Step 206: output the teaching dialogue information.
[0103] In this embodiment, a large model specially constructed for the target user group and trained based on a corpus sample matching the target user group's cognition is called. The above-constructed prompt words for this round of dialogue are used as the input of the large model. The large model uses its own learning ability and understanding of the target user group's cognition to generate teaching dialogue information that conforms to the target user group's cognition. After generating the teaching dialogue information, the information is presented to the user through screen display, voice broadcast, etc. Further, after outputting the teaching dialogue information, further input from the user can also be waited for. This interactive process helps the system understand the user's learning progress, mastery, and possible problems, so as to adjust subsequent teaching strategies and content, and bring users a highly adaptable, efficient and pleasant learning experience. In an example of a dialogue switching from a teaching state to a knowledge supplement state: User: I don't quite understand what anthropomorphism is. System: (Switch to knowledge supplement state) Anthropomorphism is to write about objects as people. For example, "the little flower smiles towards the sun", the flower will not smile, but the poet writes the flower like a person who can smile. In an example of switching from a teaching state to an emotional companionship state: User: This question is so difficult, I can't do it. System: (Switch to emotional companionship state) It's okay, learning new knowledge always takes some time. I believe you can learn it! Let's look at this question in a simpler way...
[0104] In an alternative embodiment, if Figure 4 As shown in the figure, the training process of the large model includes:
[0105] Step 401: obtain a corpus sample constructed for the target user group, and use the corpus sample to pre-train a general large model to obtain an initial large model, wherein the corpus sample includes at least one of the following: dialogue corpus of the target user group, reading materials of the target user group, and interactive corpus between the target user group and a teacher group corresponding to the target user group.
[0106] In this embodiment, first, corpus samples constructed for the target user group are collected. These corpus samples include daily conversation corpus of the target user group, their reading materials (such as books, articles, web pages, etc.), and interactive corpus between the target user group and their corresponding teacher group. Taking the target user group as children as an example, the corpus samples can specifically include real children's conversation records, children's reading content, and teacher-student interaction records. In addition, after collecting the corpus samples, in order to further improve the quality of the corpus samples, the corpus samples can also be enhanced, which can specifically include using back translation technology to expand the corpus (translating the original corpus samples into multiple languages and then transferring them to the required target language), generating dialogue data based on templates (splitting the corpus samples into dialogues and filling them in the dialogue templates to form a standardized dialogue form), constructing adversarial samples to improve robustness, etc. After collecting the corpus samples (or after performing corpus sample enhancement processing), the obtained corpus samples are used to pre-train the general large model, so that the large model has a preliminary understanding of the language characteristics, knowledge background, expression methods, etc. of the target user group, thereby forming an initial large model that is more matched with the target user group. After pre-training, an initial large model is obtained. This model already has a certain language understanding and generation ability. At this time, the initial large model can be directly used for intelligent teaching dialogue, or further fine-tuned so that the large model can more accurately meet the needs of teaching dialogue.
[0107] Step 402: Obtain conversation samples constructed for the target user group, and use the conversation samples to fine-tune the initial large model to obtain the large model, wherein the conversation samples include scene conversation samples corresponding to at least one teaching scene, and the scene conversation samples include conversations of the target user group and reply conversations constructed for conversations of the target user group.
[0108] In the above embodiment, in the fine-tuning stage of the large model, dialogue samples constructed for the target user group are collected, and these dialogue samples include scene dialogue samples corresponding to at least one teaching scenario, and each scene dialogue sample includes dialogues of the target user group and reply dialogues constructed for these dialogues. The teaching scenario may specifically include basic knowledge explanation, thinking guidance, error correction, emotional support, and extension and expansion. After collecting the dialogue samples, these samples are used to fine-tune the initial large model, so that the large model is more familiar with the dialogue mode in the teaching scenario, and learns how to generate reply dialogues that meet their cognition based on the dialogues of the target user group. The large model obtained after fine-tuning can accurately understand and generate teaching dialogue information that meets the cognition of the target user group, and can be applied to the actual teaching dialogue system. Through pre-training, the large model can initially understand the language characteristics and knowledge background of the target user group, and through fine-tuning, the large model can further adapt to the dialogue needs in the teaching scenario, generate more personalized, accurate and useful reply dialogues, and meet the needs in different teaching scenarios. In addition, when the language characteristics or teaching needs of the target user group change, the large model can be retrained by updating the corpus samples and dialogue samples to adapt to the new changes.
[0109] Step 403: obtain multiple teaching dialogue information examples generated by the large model for the first dialogue example of the target user group, perform multi-dimensional scoring on each teaching dialogue information example, and construct a dialogue scoring sample based on the first dialogue example of the target user group, each teaching dialogue information example, and the multi-dimensional scoring corresponding to each teaching dialogue information example.
[0110] In this embodiment, the large model can be further optimized and personalized to align the generated content of the large model with human preferences. First, the trained large model is used to generate multiple teaching dialogue information examples for the first dialogue example of the target user group. In actual application scenarios, these examples should cover different teaching scenarios and dialogue modes as much as possible. Next, each generated teaching dialogue information example is scored in multiple dimensions. The scoring can be based on multiple criteria, such as teaching professionalism (25 points), teaching interactivity (25 points), language expression (25 points), and teaching strategy (25 points). Specifically, these scores can be given by evaluators with professional knowledge and experience (such as teachers, education experts, etc.). Finally, based on the first dialogue example of the target user group, each teaching dialogue information example, and the multi-dimensional scores corresponding to each teaching dialogue information example, a dialogue scoring sample is constructed for subsequent training of the dialogue scoring model.
[0111] Step 404: Train a conversation scoring model based on the conversation scoring samples, and perform preference alignment training on the large model based on the trained conversation scoring model and a second conversation example of the target user group.
[0112] In this embodiment, the dialogue scoring model is trained using the constructed dialogue scoring samples, and specifically a reward model can be selected so that the trained reward model can give multi-dimensional scores according to the dialogue content, thereby evaluating the quality of the teaching dialogue information. Further, based on the trained dialogue scoring model and the second dialogue example of the target user group, the large model is trained for preference alignment. During the training process, the dialogue information generated by the large model can be scored using the dialogue scoring model first, and then the parameters of the large model can be adjusted according to the scoring results, so that the dialogue information generated by the large model is optimized in multiple dimensions, so that the dialogue information generated by the large model is more in line with the preferences and needs of the target user group. Preference alignment training is an iterative process, and adjustments and optimizations can be made in each iteration based on the latest dialogue scoring model and the dialogue information generated by the large model, so that the quality and conformity of the dialogue information generated by the large model can be gradually improved through multiple iterations.
[0113] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides an intelligent teaching dialogue device based on a large model, such as Figure 5 As shown, the device comprises:
[0114] Information receiving module 501, used to receive the current round input information of the learning user;
[0115] The prompt word construction module 502 is used to extract knowledge features from the input information of this round, recall knowledge from a preset knowledge base according to the extracted knowledge feature information, and construct prompt words for this round of dialogue based on the knowledge recall result and the input information of this round;
[0116] The dialogue generation module 503 is used to call the big model to generate teaching dialogue information that meets the cognition of the target user group based on the prompt words of the current dialogue, wherein the big model is pre-trained with corpus samples constructed for the target user group;
[0117] The dialogue output module 504 is used to output the teaching dialogue information.
[0118] In an alternative embodiment, if Figure 6 As shown, the device also includes:
[0119] A state identification module 505 is used to determine the current round of intelligent dialogue state for the learning user based on the current round of input information, wherein the current round of intelligent dialogue state is one of a plurality of preset intelligent dialogue states, and the preset intelligent dialogue states include a teaching state, a knowledge supplement state, and an emotional companionship state;
[0120] The prompt word construction module 502 is also used for:
[0121] When the current round of intelligent dialogue state is a teaching state, feature extraction and knowledge understanding depth analysis are performed on the current round of input information, knowledge is recalled from a preset knowledge base according to the extracted first knowledge feature information, and prompt words for the current round of dialogue are constructed based on the first knowledge recall result, the knowledge understanding depth, the current round of input information, and a teaching state prompt word template corresponding to the teaching state;
[0122] When the current round of intelligent dialogue state is a knowledge supplementation state, a missing knowledge analysis is performed based on the current round of input information, knowledge is recalled from a preset knowledge base according to the missing knowledge, and a prompt word for the current round of dialogue is constructed based on the missing knowledge, the second knowledge recall result, the current round of input information, and a knowledge explanation prompt word template corresponding to the knowledge supplementation state;
[0123] When the state of this round of intelligent dialogue is the emotional companionship state, knowledge features are extracted based on the input information of this round, knowledge is recalled from the preset knowledge base according to the extracted second knowledge feature information, and based on the third knowledge recall result, the input information of this round and the emotional resonance prompt word template corresponding to the emotional companionship state, the prompt words for this round of dialogue are constructed.
[0124] In an optional implementation, the teaching status prompt word template is used to guide the large model to determine the teaching dialogue knowledge depth based on the knowledge understanding depth, and generate the first teaching information that meets the teaching dialogue knowledge depth based on the first knowledge recall result and the current round input information;
[0125] The knowledge explanation prompt word template is used to guide the large model to generate knowledge explanation information about the missing knowledge based on the second knowledge recall result and the current round input information;
[0126] The emotional resonance prompt word template is used to guide the large model to generate emotional soothing information and second teaching information based on the current round of input information and the third knowledge recall result.
[0127] In an optional implementation manner, the state identification module 505 is further configured to:
[0128] If the current intelligent dialogue state is the teaching state, knowledge deficiency analysis and sentiment analysis are performed on the input information of this round. If the sentiment analysis result is negative sentiment, the intelligent dialogue state of this round is determined to be changed to the sentiment companionship state. If the knowledge deficiency analysis result is knowledge deficiency, the intelligent dialogue state of this round is determined to be changed to the knowledge supplementation state. Otherwise, the intelligent dialogue state of this round is determined to remain in the teaching state.
[0129] If the current intelligent dialogue state is the emotional companionship state, then performing emotional analysis on the input information of this round, and determining that the intelligent dialogue state of this round is maintained as the emotional companionship state if the emotional analysis result is negative emotion, otherwise determining that the intelligent dialogue state of this round is changed to the teaching state;
[0130] If the current intelligent dialogue state is the knowledge supplement state, the missing knowledge understanding situation of the input information of this round is analyzed. If the result of the missing knowledge understanding situation analysis is that the understanding is not understood, it is determined that the state of the intelligent dialogue of this round remains in the knowledge supplement state; otherwise, it is determined that the state of the intelligent dialogue of this round is transferred to the teaching state.
[0131] In an optional implementation, the preset knowledge base includes multi-level knowledge point information and knowledge association network information; the prompt word construction module 502 is further used to:
[0132] According to the superior knowledge point corresponding to the knowledge point to be recalled, the knowledge point to be recalled is located, and the knowledge point information corresponding to the knowledge point to be recalled is obtained; and according to the knowledge association network information, the associated knowledge point corresponding to the knowledge point to be recalled is determined, and the associated knowledge point information corresponding to the associated knowledge point is obtained, wherein the associated knowledge point includes at least one of the preceding knowledge point, subsequent knowledge point, similar knowledge point, knowledge point with progressive difficulty, and knowledge point with common application scenario corresponding to the knowledge point to be recalled.
[0133] In an optional embodiment, the device further includes: a large model training module 506, which is used to:
[0134] Acquire a corpus sample constructed for the target user group, and use the corpus sample to pre-train the general large model to obtain an initial large model, wherein the corpus sample includes at least one of the following: dialogue corpus of the target user group, reading materials of the target user group, and interactive corpus between the target user group and a teacher group corresponding to the target user group;
[0135] Acquire conversation samples constructed for the target user group, and use the conversation samples to fine-tune the initial large model to obtain the large model, wherein the conversation samples include scenario conversation samples corresponding to at least one teaching scenario, and the scenario conversation samples include conversations of the target user group and reply conversations constructed for conversations of the target user group.
[0136] In an optional implementation, the large model training module 506 is further used to:
[0137] Acquire multiple teaching dialogue information examples generated by the large model for the first dialogue example of the target user group, perform multi-dimensional scoring on each teaching dialogue information example, and construct a dialogue scoring sample based on the first dialogue example of the target user group, each teaching dialogue information example, and the multi-dimensional scoring corresponding to each teaching dialogue information example;
[0138] A conversation scoring model is trained based on the conversation scoring samples, and preference alignment training is performed on the large model based on the trained conversation scoring model and a second conversation example of a target user group.
[0139] It should be noted that for other corresponding descriptions of the functional units involved in the large model-based intelligent teaching dialogue device provided in the embodiment of the present application, please refer to Figures 1 to 4 The corresponding description in the method will not be repeated here.
[0140] The embodiment of the present application also provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a bus, a processor, a memory and a communication interface, and can also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.
[0141] Those skilled in the art will appreciate that the structure of the above-mentioned computer device is only a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components, or combine certain components, or have a different arrangement of components.
[0142] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0143] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0144] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0145] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0146] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0147] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An intelligent teaching dialogue method based on a large model, characterized in that: The method comprises: Receive the current round of input information from the learning user; Extracting knowledge features from the input information of this round, recalling knowledge from a preset knowledge base according to the extracted knowledge feature information, and constructing prompt words for this round of dialogue based on the knowledge recall result and the input information of this round; Calling the big model to generate teaching dialogue information that meets the cognition of the target user group based on the prompt words of the current round of dialogue, wherein the big model is pre-trained with corpus samples constructed for the target user group; Output the teaching dialogue information.
2. The method according to claim 1, characterized in that After receiving the current round of input information from the learning user, the method further includes: Based on the current round of input information, determining the current round of intelligent dialogue state for the learning user, wherein the current round of intelligent dialogue state is one of a plurality of preset intelligent dialogue states, and the preset intelligent dialogue states include a teaching state, a knowledge supplement state, and an emotional companionship state; The extracting of knowledge features from the input information of this round, recalling knowledge from a preset knowledge base according to the extracted knowledge feature information, and constructing prompt words for this round of dialogue based on the knowledge recall result and the input information of this round, includes: When the current round of intelligent dialogue state is a teaching state, feature extraction and knowledge understanding depth analysis are performed on the current round of input information, knowledge is recalled from a preset knowledge base according to the extracted first knowledge feature information, and prompt words for the current round of dialogue are constructed based on the first knowledge recall result, the knowledge understanding depth, the current round of input information, and a teaching state prompt word template corresponding to the teaching state; When the current round of intelligent dialogue state is a knowledge supplementation state, a missing knowledge analysis is performed based on the current round of input information, knowledge is recalled from a preset knowledge base according to the missing knowledge, and a prompt word for the current round of dialogue is constructed based on the missing knowledge, the second knowledge recall result, the current round of input information, and a knowledge explanation prompt word template corresponding to the knowledge supplementation state; When the state of this round of intelligent dialogue is the emotional companionship state, knowledge features are extracted based on the input information of this round, knowledge is recalled from the preset knowledge base according to the extracted second knowledge feature information, and based on the third knowledge recall result, the input information of this round and the emotional resonance prompt word template corresponding to the emotional companionship state, the prompt words for this round of dialogue are constructed.
3. The method according to claim 2, characterized in that The teaching status prompt word template is used to guide the large model to determine the teaching dialogue knowledge depth based on the knowledge understanding depth, and generate the first teaching information that meets the teaching dialogue knowledge depth based on the first knowledge recall result and the current round input information; The knowledge explanation prompt word template is used to guide the large model to generate knowledge explanation information about the missing knowledge based on the second knowledge recall result and the current round input information; The emotional resonance prompt word template is used to guide the large model to generate emotional soothing information and second teaching information based on the current round of input information and the third knowledge recall result.
4. The method according to claim 2, characterized in that: The determining, based on the current round of input information, a current round of intelligent dialogue state for the learning user includes: If the current intelligent dialogue state is the teaching state, knowledge deficiency analysis and sentiment analysis are performed on the input information of this round. If the sentiment analysis result is negative sentiment, the intelligent dialogue state of this round is determined to be changed to the sentiment companionship state. If the knowledge deficiency analysis result is knowledge deficiency, the intelligent dialogue state of this round is determined to be changed to the knowledge supplementation state. Otherwise, the intelligent dialogue state of this round is determined to remain in the teaching state. If the current intelligent dialogue state is the emotional companionship state, then performing emotional analysis on the input information of this round, and determining that the intelligent dialogue state of this round is maintained as the emotional companionship state if the emotional analysis result is negative emotion, otherwise determining that the intelligent dialogue state of this round is changed to the teaching state; If the current intelligent dialogue state is the knowledge supplement state, the missing knowledge understanding situation of the input information of this round is analyzed. If the result of the missing knowledge understanding situation analysis is that the understanding is not understood, it is determined that the state of the intelligent dialogue of this round remains in the knowledge supplement state; otherwise, it is determined that the state of the intelligent dialogue of this round is transferred to the teaching state.
5. The method according to claim 1, characterized in that The preset knowledge base includes multi-level knowledge point information and knowledge association network information; Recall the preset knowledge base, including: According to the superior knowledge point corresponding to the knowledge point to be recalled, the knowledge point to be recalled is located, and the knowledge point information corresponding to the knowledge point to be recalled is obtained; and according to the knowledge association network information, the associated knowledge point corresponding to the knowledge point to be recalled is determined, and the associated knowledge point information corresponding to the associated knowledge point is obtained, wherein the associated knowledge point includes at least one of the preceding knowledge point, subsequent knowledge point, similar knowledge point, knowledge point with progressive difficulty, and knowledge point with common application scenario corresponding to the knowledge point to be recalled.
6. The method according to any one of claims 1 to 5, characterized in that Before receiving the current round of input information from the learning user, the method further includes: Acquire a corpus sample constructed for the target user group, and use the corpus sample to pre-train the general large model to obtain an initial large model, wherein the corpus sample includes at least one of the following: dialogue corpus of the target user group, reading materials of the target user group, and interactive corpus between the target user group and a teacher group corresponding to the target user group; Acquire conversation samples constructed for the target user group, and use the conversation samples to fine-tune the initial large model to obtain the large model, wherein the conversation samples include scenario conversation samples corresponding to at least one teaching scenario, and the scenario conversation samples include conversations of the target user group and reply conversations constructed for conversations of the target user group.
7. The method according to claim 6, characterized in that After fine-tuning the initial large model using the conversation sample to obtain the large model, the method further includes: Acquire multiple teaching dialogue information examples generated by the large model for the first dialogue example of the target user group, perform multi-dimensional scoring on each teaching dialogue information example, and construct a dialogue scoring sample based on the first dialogue example of the target user group, each teaching dialogue information example, and the multi-dimensional scoring corresponding to each teaching dialogue information example; A conversation scoring model is trained based on the conversation scoring samples, and preference alignment training is performed on the large model based on the trained conversation scoring model and a second conversation example of a target user group.
8. An intelligent teaching dialogue device based on a large model, characterized in that: The device comprises: An information receiving module is used to receive the current round of input information from the learning user; A prompt word construction module is used to extract knowledge features from the input information of this round, recall knowledge from a preset knowledge base according to the extracted knowledge feature information, and construct prompt words for this round of dialogue based on the knowledge recall result and the input information of this round; A dialogue generation module, used to call the big model to generate teaching dialogue information that meets the cognition of the target user group based on the prompt words of the current dialogue, wherein the big model is pre-trained with corpus samples constructed for the target user group; The dialogue output module is used to output the teaching dialogue information.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Model training method, dialogue processing method and dialogue system
CN121960792A