AI personalized virtual companion dialogue system based on language learning level

Through an AI-powered personalized virtual companion dialogue system, user ability profiles are updated in real time. This system allows for partial reshaping and joint questioning based on emotions and persona, progressive error correction, and automatic adjustment of difficulty range. It solves the compatibility problem between immersive experiences and efficient grammar training in foreign language learning games, thereby enhancing the user learning experience.

CN121606894BActive Publication Date: 2026-07-07SHENZHEN ZHANGYOU WORLD TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN ZHANGYOU WORLD TECHNOLOGY CO LTD
Filing Date
2025-11-04
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In foreign language learning games, existing dialogue generation technologies often require rewriting entire sentences and adding pop-up prompts, making it difficult to achieve both an immersive experience and efficient grammar training. This can easily lead to user resistance and reduced willingness to explore.

Method used

This paper presents an AI-based personalized virtual companion dialogue system based on language learning level. Through the file acquisition module, plot setting module, frequency collection module, and virtual companion module, it updates the user's ability profile in real time, performs partial reconstruction and joint questioning of emotion and persona, gradually corrects errors, and automatically lowers the CEFR difficulty range of the plot structure pool when a threshold is reached.

Benefits of technology

It achieves a balance between maintaining an immersive experience and efficient grammar training in the game, reducing the cognitive load of skill leaps, maintaining player identity and immersive experience, reducing resistance to the same grammar point, and realizing personalized and seamless difficulty adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121606894B_ABST
    Figure CN121606894B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence and gamification education, and discloses an AI personalized virtual accompanying dialogue system based on language learning level, which comprises the following modules: an archive acquisition module, which is used for acquiring the historical dialogue archive of a user before the user starts a dialogue; a plot setting module, which is used for performing five-dimensional quantitative processing on the current dialogue sentence of the user according to a historical five-dimensional vector, setting the dialogue plot key of the user based on the current CEFR interval, the historical key structure and the historical hit result in the current five-dimensional vector; a frequency collection module, which is used for outputting a demonstration bounce text to the user and collecting the current bounce frequency of the demonstration bounce text on the basis of the historical bounce frequency; a task completion module, which is used for completing the dialogue completion task of the user; and a virtual accompanying module, which is used for realizing the AI personalized virtual accompanying dialogue processing of the user. The application can make immersive experience and efficient grammar training compatible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and gamified education technology, and in particular to an AI-based personalized virtual companion dialogue system based on language learning level. Background Technology

[0002] In the current context of deep integration between the gaming industry and artificial intelligence, role-playing games have become an important vehicle for foreign language learning. After entering the game, the system usually first assesses the user's foreign language level through beginner village tasks or a short assessment, and then recommends story branches and monster challenges of corresponding difficulty. In the process of completing tasks and defeating monsters, users need to read, listen and output the target language, thereby unconsciously improving their vocabulary and grammar skills. This story-driven practice mode makes full use of the high level of investment that teenagers aged ten to twenty have in role-playing and collecting achievements, and is regarded as a typical path of gamified learning.

[0003] However, existing dialogue generation technologies still rely on rewriting entire sentences and adding pop-up prompts. When users don't use the key grammar required by the task, NPCs often directly provide a correct example or pop up grammar explanations in the center of the screen. While this provides examples, it forces users to instantly revert from an adventurer to a student, disrupting the immersion in the story. Repeated interruptions can lead to user resistance to the same grammar point, reducing their willingness to continue exploring. In short, the "example-as-pop-up" interaction logic makes it difficult to achieve both an immersive experience and efficient grammar training. Summary of the Invention

[0004] This invention provides an AI-based personalized virtual companion dialogue system based on language learning level, the main purpose of which is to achieve both immersive experience and efficient grammar training.

[0005] To achieve the above objectives, the present invention provides an AI-based personalized virtual companion dialogue system based on language learning level, comprising: a file acquisition module, a plot setting module, a frequency collection module, a task completion module, and a virtual companion module;

[0006] The file acquisition module is used to acquire the user's historical dialogue file before the user's dialogue begins. The historical dialogue file includes a historical five-dimensional vector, a historical key structure, historical hit results, and historical bounce counts.

[0007] The plot setting module is used to perform five-dimensional quantization processing on the user's current dialogue statement according to the historical five-dimensional vector when the user's dialogue begins, to obtain the current five-dimensional vector, and set the user's dialogue plot key based on the current CEFR interval in the current five-dimensional vector, the historical key structure and the historical hit result;

[0008] The count collection module is used to output a sample bounce text to the user when it is detected that the user has not learned the dialogue plot key, and to collect the current bounce count of the sample bounce text based on the historical bounce count.

[0009] The task completion module is used to complete the user's dialogue completion task when the current bounce count is greater than the preset bounce count, wherein the content of the dialogue completion task and the dialogue plot key belong to the same language structure;

[0010] The virtual companion module is used to enable AI-personalized virtual companion dialogue processing for the user after the user completes the dialogue completion task.

[0011] Optionally, outputting sample bounce text to the user includes:

[0012] Extract the semantic intent of the user's current dialogue statement;

[0013] The erroneous parts of the semantic intent that do not conform to the dialogue plot key are recast to obtain the recast fragment;

[0014] The recast fragment is embedded into a continuation statement that conforms to the NPC character setting to obtain the sample statement;

[0015] Based on the emotion category of the current dialogue statement and the tag information of the NPC character setting, select a question invitation expression from the question invitation pool;

[0016] By appending the question invitation expression to the end of the example statement, the example bounce text is obtained;

[0017] The number of question invitations in the question invitation pool decreases as the cumulative number of failures increases.

[0018] Optionally, the step of recasting the erroneous parts of the semantic intent that do not conform to the dialogue plot key to obtain a recast fragment includes:

[0019] Locate the language slot in the current dialogue statement that corresponds to the dialogue plot key, wherein the language slot is determined by the target grammatical structure bound to the dialogue plot key, and the range of the language slot is the range between the start position and the end position of the dialogue plot key in the current dialogue statement;

[0020] The correct segment of the erroneous part is generated based on the target voice identifier of the dialogue plot key, wherein the word form change rule is applied to the language slot;

[0021] Insert the correct fragment into the language slot to obtain the recast fragment;

[0022] The word form change rules refer to a set of conventions for formal substitution of the same word root under different grammatical functions.

[0023] Optionally, generating the correct segment of the erroneous part based on the target voice identifier of the dialogue plot key includes:

[0024] Read the context timestamp bound to the dialogue plot key, wherein the context timestamp is generated by the preceding event chain of the current plot node;

[0025] Query the voice-time mapping table for verb form tags that match both the target voice identifier and the context timestamp;

[0026] By concatenating the verb root in the erroneous part with the verb form marker, the correct segment is obtained.

[0027] Optionally, the step of performing five-dimensional quantization processing on the user's current dialogue statement based on the historical five-dimensional vector to obtain the current five-dimensional vector includes:

[0028] The current dialogue statement is segmented and tagged to obtain a word sequence;

[0029] The vocabulary breadth is obtained by counting the number of different lexical units in the vocabulary sequence.

[0030] Perform grammatical dependency analysis on the lexical sequence to obtain grammatical accuracy;

[0031] The error density is obtained by calculating the number of errors per 100 words in the vocabulary sequence.

[0032] The emotions in the vocabulary sequence are classified to obtain emotion categories;

[0033] The current five-dimensional vector is determined by the vocabulary breadth, the grammatical precision, the error density, the emotion category, and the historical CEFR interval in the historical five-dimensional vector.

[0034] Optionally, before setting the user's dialogue story key based on the current CEFR interval in the current five-dimensional vector, the historical key structure, and the historical hit results, the method further includes:

[0035] Query the cumulative number of failures for each historical key structure in the historical dialogue archive;

[0036] When the cumulative number of failures is not less than the preset number of failures, the first target entry corresponding to the historical key structure in the story structure pool is obtained;

[0037] The upper limit of the difficulty of the first target item is adjusted down within the CEFR range to obtain the item that is corrected immediately.

[0038] The currently available pool is determined by the aforementioned immediate correction entries;

[0039] When the cumulative number of failures is less than the preset number of failures, the historical CEFR interval of the historical key structure is obtained;

[0040] The currently available pool is determined by the second target entry in the story structure pool that conforms to the historical CEFR range and whose difficulty cap has not been lowered.

[0041] Optionally, setting the user's dialogue story key based on the current CEFR interval in the current five-dimensional vector, the historical key structure, and the historical hit results includes:

[0042] Filter the available entries from the current available pool and the story structure pool. The lower limit of CEFR is not greater than the current CEFR range, the upper limit of CEFR is not less than the current CEFR range, and the historical hit result is a no hit.

[0043] When the set of available entries is not empty, a dialogue plot key is randomly selected from the set of available entries according to the uniform distribution method;

[0044] When the set of available entries is empty, the entry with the highest correlation between the current available pool and the current dialogue statement in the plot structure pool is used as the dialogue plot key, wherein the correlation is calculated by the tag co-occurrence matrix.

[0045] Optionally, completing the user's dialogue completion task includes:

[0046] Read the word form change rules corresponding to the dialogue plot key;

[0047] Randomly select a diary entry with five empty spaces from the diary template library;

[0048] The word form change rules are used to determine the content to be replaced in the five empty spaces in the diary containing five empty spaces.

[0049] Replace the five empty spaces in the diary with the content to be replaced to obtain the updated diary;

[0050] Receive five input formats from the user regarding the updated diary;

[0051] Determine whether the five input formats conform to the word form change rules;

[0052] When all five input formats conform to the word form change rules, it is determined that the user has completed the dialogue completion task;

[0053] When the five input forms do not conform to the word form change rules, the non-conforming target input forms are immediately masked to determine the remaining input forms after masking.

[0054] The remaining input form after masking is used to return to the steps described above for determining whether the five input forms conform to the word form change rules.

[0055] Optionally, the AI-powered personalized virtual companion dialogue processing for the user includes:

[0056] The current five-dimensional vector, dialogue plot key, current hit result and current number of bounces of the example bounce text are stored in the historical conversation file to update the historical conversation file and obtain the updated conversation file.

[0057] The cumulative number of failures for the same key structure is summed with the current number of failures to obtain the cumulative failure value.

[0058] When the accumulated failure value is not less than the preset number of failures, the upper limit of the difficulty of the dialogue plot key in the plot structure pool is adjusted down within the CEFR range to obtain the corrected upper limit of difficulty.

[0059] The updated story structure pool is determined by adjusting the upper limit of difficulty.

[0060] The updated session file and the updated story structure pool are used to conclude the current round of AI personalized virtual companion dialogue processing for the user and to enable the next round of AI personalized virtual companion dialogue processing for the user.

[0061] A personalized virtual companion dialogue method based on language learning level using AI, characterized in that the method includes:

[0062] Before a user conversation begins, the user's historical conversation archive is obtained, wherein the historical conversation archive includes a historical five-dimensional vector, a historical key structure, historical hit results, and historical bounce counts.

[0063] At the start of the user dialogue, the user's current dialogue statement is quantized in five dimensions according to the historical five-dimensional vector to obtain the current five-dimensional vector. Based on the current CEFR interval in the current five-dimensional vector, the historical key structure and the historical hit results, the user's dialogue plot key is set.

[0064] When it is detected that the user has not learned the dialogue plot key, a sample bounce text is output to the user, and the current bounce count of the sample bounce text is collected based on the historical bounce count;

[0065] When the current bounce count is greater than the preset bounce count, the user's dialogue completion task is completed, wherein the content of the dialogue completion task and the dialogue plot key belong to the same language structure;

[0066] After the user completes the dialogue completion task, the user's AI-personalized virtual companion dialogue processing is implemented.

[0067] This invention, through five-dimensional quantification of current dialogue statements based on historical five-dimensional vectors, can update the user's ability profile in real time, thereby helping to reduce the cognitive load caused by ability jumps. Furthermore, by setting the required structures as the sole condition for continuing the story, this invention allows users to naturally practice target grammar as the story progresses, thus helping to maintain the player's identity and immersive experience. Moreover, through partial rewriting and joint questioning of emotion and character, this invention allows players to see only the NPC's natural responses, thus helping to avoid identity shifts caused by complete sentence rewriting or pop-ups. Through the correlation between increasing failure rate and decreasing questioning pool, this invention allows players to gradually... Grammar mastery is achieved through progressive error correction, which helps reduce resistance to the same grammar points. Furthermore, this invention, through diary-based completion, allows players to master grammar through gradual error correction, further reducing resistance to the same grammar points. Moreover, by implicitly accumulating failure counts in the background and automatically lowering the CEFR difficulty range of the story structure pool when a threshold is reached, personalized and seamless difficulty adjustment can be achieved while maintaining the user's adventurer identity and immersion in the story. This solves the problems of immersion disruption, resistance, and decreased exploration motivation caused by traditional demonstrations and pop-ups, achieving both efficient foreign language training and deep role-playing for the first time. Therefore, this invention allows for both immersive experience and efficient grammar training. Attached Figure Description

[0068] Figure 1 A functional block diagram of an AI-based personalized virtual companion dialogue system based on language learning level is provided in an embodiment of the present invention.

[0069] Figure 2 A system architecture diagram of an AI-based personalized virtual companion dialogue system based on language learning level is provided in one embodiment of the present invention;

[0070] Figure 3 A flowchart illustrating an AI-based personalized virtual companion dialogue method based on language learning level, provided as an embodiment of the present invention;

[0071] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0072] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0073] Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.

[0074] In practice, the server-side equipment deployed in an AI-powered personalized virtual companion dialogue system based on language learning proficiency may consist of one or more devices. This system can be implemented as a business instance, a virtual machine, or hardware devices. For example, it can be implemented as a business instance deployed on one or more devices in a cloud node. Simply put, this system can be understood as software deployed on a cloud node, providing AI-powered personalized virtual companion dialogue services to various users. Alternatively, it can be implemented as a virtual machine deployed on one or more devices in a cloud node, with application software installed to manage various users. Or, it can also be implemented as a server composed of numerous identical or different types of hardware devices, with one or more devices configured to provide AI-powered personalized virtual companion dialogue services to various users.

[0075] In terms of implementation, the AI-powered personalized virtual companion dialogue system based on language learning level and the user client are mutually adaptable. That is, if the AI-powered personalized virtual companion dialogue system based on language learning level is implemented as an application installed on a cloud service platform, then the user client is the client that establishes a communication connection with the application; or if the AI-powered personalized virtual companion dialogue system based on language learning level is implemented as a website, then the user client is the webpage; or if the AI-powered personalized virtual companion dialogue system based on language learning level is implemented as a cloud service platform, then the user client is the mini-program in an instant messaging application.

[0076] Reference Figure 1 The diagram shown is a functional block diagram of an AI-based personalized virtual companion dialogue system based on language learning level, provided in an embodiment of the present invention.

[0077] The AI-based personalized virtual companion dialogue system 100 based on language learning level described in this invention can be set up in a cloud server. In terms of implementation, it can be used as one or more service devices, or as an application installed in the cloud (e.g., a server, server cluster, etc., for AI-based personalized virtual companion dialogue based on language learning level), or it can be developed as a website. Depending on the functions implemented, the AI-based personalized virtual companion dialogue system 100 includes a file acquisition module 101, a plot setting module 102, a frequency collection module 103, a task completion module 104, and a virtual companion module 105.

[0078] In this embodiment of the invention, in the tracking of AI-based personalized virtual companion dialogue based on language learning level, each of the above modules can be implemented independently and called upon other modules. This calling can be understood as one module connecting to multiple modules of another type and providing corresponding services to those connected modules. In the AI-based personalized virtual companion dialogue system based on language learning level provided in this embodiment of the invention, the applicability of the language learning level-based AI-based personalized virtual companion dialogue architecture can be adjusted by adding modules and directly calling them without modifying the program code, achieving cluster-based horizontal expansion to quickly and flexibly expand the language learning level-based AI-based personalized virtual companion dialogue system. In practical applications, the above modules can be set in the same device or different devices, or they can be set in virtual devices, such as service instances in a cloud server.

[0079] The following describes, with reference to specific embodiments, each component and specific workflow of an AI-based personalized virtual companion dialogue system based on language learning level.

[0080] The file acquisition module 101 is used to acquire the user's historical dialogue file before the user's dialogue begins. The historical dialogue file includes a historical five-dimensional vector, a historical key structure, historical hit results, and historical bounce counts.

[0081] In this embodiment of the invention, the historical dialogue archive refers to the user's exclusive learning record that is persistently stored across sessions, such as historical five-dimensional vectors, historical key structures, historical hit results, historical bounce counts, etc. The historical five-dimensional vector refers to the five-dimensional quantitative result saved at the end of the user's last dialogue, such as vocabulary breadth, grammatical precision, error density, emotion category, historical CEFR interval, etc. The historical key structure refers to the list of all grammatical structures that the user has been set as a plot key by the system. Each list record includes the target tense identifier, context timestamp, word form change rule, structure ID, etc. The historical hit result refers to the Boolean flag for each historical key structure, such as hit, miss, etc. The historical bounce count refers to the cumulative count of failed bounces for each historical key structure, such as one bounce, two bounces, zero bounces, etc.

[0082] For example, the process of obtaining the user's historical dialogue archive before the user's dialogue begins is as follows: During a historical period, the user inputs their nickname and age into the language learning software. Then, an NPC appears on the screen and asks the user to "describe last night's experience in English using the simple past tense." The user inputs the corresponding answer, "I walked in the park and saw a panda." The language learning software then performs sentence segmentation, dependency analysis, and sentiment classification on the user's input answer to obtain lexical breadth, grammatical precision, error density, and sentiment category. Based on lexical breadth, grammatical precision, error density, and sentiment category, the historical CEFR interval is calculated. "Walk" and "see" are marked as missing in the simple past tense, thereby generating a plot key. This plot key includes: Structure ID = 10001, Target Tense Identifier = Simple Past Tense, Context Timestamp = the time corresponding to last night, Word Formation Rule = "walk" becomes "walked" / "see" becomes "saw." Since the user did not use the past tense, the hit result = "missed," and the number of misses is the user's number of failures. The bounce count = 1. =1 indicates that the system needs to initiate the first inquiry invitation to the user. The context timestamp = "last night" is generated by the prequel event chain of the plot. For example, each time the system advances the plot, it writes the node ID, event description, and system clock into the event chain. That is, node 1: 18:00, the user enters the language learning software to start learning the language; node 2: 19:30, the user has dinner with the NPC; node 3: 20:00, the user is invited to describe last night's experience. The algorithm scans backward from node 3, finds the first event containing the keyword "last night", which is node 2, reads its system clock as 19:30, and uses 19:30 as the context timestamp. Then the system gives the user a sample text about "describing last night's experience in English simple past tense", such as "You walked in the park and saw a panda? That sounds amazing! What did you do next?". The "What did you do next?" in this sample text is the system's first inquiry invitation to the user.

[0083] The plot setting module 102 is used to perform five-dimensional quantization processing on the user's current dialogue statement according to the historical five-dimensional vector when the user's dialogue begins, to obtain the current five-dimensional vector, and set the user's dialogue plot key based on the current CEFR interval in the current five-dimensional vector, the historical key structure and the historical hit result.

[0084] This invention, through five-dimensional quantization of the current dialogue statement based on historical five-dimensional vectors, can update the user's ability profile in real time, thereby helping to reduce the cognitive load caused by ability jumps.

[0085] In one embodiment of the present invention, the step of performing five-dimensional quantization processing on the user's current dialogue statement based on the historical five-dimensional vector to obtain the current five-dimensional vector includes: performing word segmentation and annotation on the current dialogue statement to obtain a vocabulary sequence; counting the number of different lexical units in the vocabulary sequence to obtain a vocabulary breadth; performing grammatical dependency analysis on the vocabulary sequence to obtain grammatical precision; calculating the number of errors per 100 words in the vocabulary sequence to obtain an error density; classifying the emotions in the vocabulary sequence to obtain an emotion category; and determining the current five-dimensional vector through the vocabulary breadth, the grammatical precision, the error density, the emotion category, and the historical CEFR interval in the historical five-dimensional vector.

[0086] Optionally, the process of segmenting and tagging the current dialogue statement to obtain a vocabulary sequence is as follows: The entire string input by the user is fed into an internal word segmenter, which outputs a vocabulary sequence with part-of-speech tags. Further, the process of counting the number of different lexical units in the vocabulary sequence to obtain the vocabulary breadth is as follows: Unique lexical units are counted in the vocabulary sequence to obtain the number of different lexical units; the number corresponding to each lexical unit is taken as the vocabulary breadth of that lexical unit. Further, the process of performing syntactic dependency analysis on the vocabulary sequence to obtain syntactic precision is as follows: A dependency parser is run on the vocabulary sequence to calculate the dependency arc accuracy; this dependency arc accuracy is the syntactic precision. Further, the process of calculating the number of errors per 100 words in the vocabulary sequence to obtain the error density is as follows: The total number of parsed vocabulary errors is divided by the total number of words and then multiplied by 100% to obtain the number of errors per 100 words. Further, the process of classifying the emotions in the vocabulary sequence to obtain the emotion categories is as follows: Existing encoding techniques are used to classify the emotions... Each word in the vocabulary sequence is encoded to obtain an encoded vector. For example, one-hot encoding can be used to encode each word in the vocabulary sequence. After receiving this encoded vector, the emotion classification model outputs the probability of the corresponding emotion category, mainly including the probability of negative emotion category and the probability of positive emotion category. The category corresponding to the highest probability value is taken as the emotion category. The emotion classification model is, for example, a neural network based on the attention mechanism. Further, the process of determining the current five-dimensional vector through the vocabulary breadth, the grammatical precision, the error density, the emotion category, and the historical CEFR interval in the historical five-dimensional vector is as follows: the historical CEFR interval is obtained by normalizing the vocabulary breadth, grammatical precision, error density, and emotion category of the historical period, and then weighting and summing them to obtain a graded interval. For example, if the weighted sum of the vocabulary breadth, grammatical precision, error density, and emotion category of the historical period is in the range of 0 to 1000, then the range of 0 to 1000 can be divided into [0, Historical CEFR intervals such as

[200] , [201, 400], [401, 600], [601, 800], and [801, 1000] are used to normalize the vocabulary breadth, grammatical precision, error density, and sentiment category of the current time period to the 0~1 interval. The vocabulary breadth, grammatical precision, error density, sentiment category mapped to the 0~1 interval, and the historical CEFR interval mapped to the 0~1000 interval are used as the current five-dimensional vector.

[0087] In one embodiment of the present invention, before setting the user's dialogue story key based on the current CEFR interval in the current five-dimensional vector, the historical key structure, and the historical hit results, the method further includes: querying the cumulative failure count of each historical key structure in the historical dialogue archive; when the cumulative failure count is not less than a preset failure count, obtaining the first target entry corresponding to the historical key structure in the story structure pool; adjusting the upper limit of the difficulty of the first target entry by the CEFR interval to obtain an immediate correction entry; determining the current available pool based on the immediate correction entry; when the cumulative failure count is less than the preset failure count, obtaining the historical CEFR interval of the historical key structure; and determining the current available pool based on the second target entry in the story structure pool that conforms to the historical CEFR interval and whose upper limit of difficulty has not been lowered.

[0088] The cumulative number of failures refers to the number of misses corresponding to each historical key structure. The preset number of failures refers to the upper limit of consecutive misses that can be allowed. When the cumulative number of failures is not less than the preset number of failures, it means that the language learning task initiated by the current NPC is too difficult and the difficulty needs to be reduced and the task switched to another completion task to prevent users from getting stuck on the same grammar point indefinitely. The first target entry refers to the unique entry record that completely matches the ID of the current historical key structure, such as the simple past tense entry with ID=10001. The immediate correction entry refers to the first target entry whose difficulty limit has been reduced. The current available pool refers to the set of entries that can be selected during this round of question drawing, such as a single entry pool containing only immediate correction entries, or a current available pool containing multiple second target entries. The second target entry refers to all entries that meet the historical CEFR range and whose difficulty limit has not been reduced.

[0089] Optionally, the process of adjusting the upper limit of the difficulty of the first target item by the CEFR interval to obtain the immediate correction item is as follows: Each first target item corresponds to a sample text. Each word in this sample text is a correct word. According to the word form change rule, each correct word is treated as an incorrect word. The vocabulary breadth, grammatical precision, error density, and sentiment category of this sample text containing incorrect words are statistically analyzed. The vocabulary breadth, grammatical precision, error density, and sentiment category of this sample text containing incorrect words are first normalized, then weighted and summed and mapped to the intervals [0, 200], [201, 400], [401, 600], [601, 800], and [801, 1000] corresponding to the interval from 0 to 1000. If this sample text is mapped to the interval [201, 400], then adjusting the upper limit of the difficulty of the first target item by the CEFR interval means adjusting the interval [201, 400] to the interval [0, 200].

[0090] Furthermore, by making the structure that must be learned the sole condition for the continuation of the storyline, this embodiment of the invention allows users to naturally practice the target grammar as the story progresses, thereby helping to maintain the player's identity and immersive experience.

[0091] In one embodiment of the present invention, setting the user's dialogue plot key based on the current CEFR interval in the current five-dimensional vector, the historical key structure, and the historical hit results includes: filtering a set of available entries from the current available pool and the plot structure pool whose lower CEFR limit is not greater than the current CEFR interval, whose upper CEFR limit is not less than the current CEFR interval, and whose historical hit results are not hits; when the set of available entries is not empty, randomly selecting a dialogue plot key from the set of available entries according to a uniform distribution method; when the set of available entries is empty, using the entry with the highest correlation between the current available pool and the plot structure pool and the current dialogue statement as the dialogue plot key, wherein the correlation is calculated using a tag co-occurrence matrix.

[0092] The uniform distribution method refers to a method that sets the probability of each item in the set of available items being selected to be equal.

[0093] Optionally, the process of selecting a set of available entries from the current available pool and the story structure pool whose lower limit of CEFR is not greater than the current CEFR range, whose upper limit of CEFR is not less than the current CEFR range, and whose historical hit results are not hits refers to: if the current available pool is empty, then select from the story structure pool; otherwise, select from the current available pool. Further, the process of using the entry with the highest relevance to the current dialogue statement in the current available pool and the story structure pool as the dialogue story key is: if the current available pool is empty, then select the entry with the highest relevance from the story structure pool; otherwise, select the entry with the highest relevance from the current available pool. Further, the process of calculating the relevance through the tag co-occurrence matrix is: performing a dot product operation between the tag vector of the current dialogue statement and the tag vector of each entry in the pool, obtaining the dot product result, and dividing the dot product result by the total number of tags in the current dialogue statement to obtain the relevance. Here, the tag vector refers to the vector corresponding to each word in the current dialogue statement, and the total number of tags refers to the total number of vectors corresponding to each word in the current dialogue statement.

[0094] The count collection module 103 is used to output a sample bounce text to the user when it is detected that the user has not learned the dialogue plot key, and to collect the current bounce count of the sample bounce text based on the historical bounce count.

[0095] This invention, through partial rewriting and joint questioning of emotions and character settings, allows players to see only the NPC's natural responses, thus helping to avoid identity jumps caused by rewriting entire sentences or pop-ups. Through the correlation between increasing failures and decreasing question pool, players can gradually master grammar through error correction, thereby helping to reduce resistance to the same grammar point.

[0096] In one embodiment of the present invention, outputting sample bounce text to the user includes: extracting the semantic intent of the user's current dialogue statement; recasting erroneous parts of the semantic intent that do not conform to the dialogue plot key to obtain a recast fragment; embedding the recast fragment into a continuation statement that conforms to the NPC's character setting to obtain a sample statement; selecting a question invitation expression from a question invitation pool based on the emotion category of the current dialogue statement and the tag information of the NPC's character setting; and concatenating the question invitation expression at the end of the sample statement to obtain sample bounce text; wherein, the number of question invitations in the question invitation pool decreases as the cumulative number of failures increases.

[0097] The semantic intent refers to the semantic content parsing result of the user's current sentence, such as describing last night's experience or asking about prices. The erroneous part refers to content in the semantic intent that does not conform to the grammatical structure required by the dialogue's plot key, such as not using the past tense verb form. The recast fragment refers to the correct grammatical fragment obtained after recasting, such as "walked". The continuation statement refers to the complete sentence framework used by the NPC to connect with the user's original sentence and maintain dialogue coherence, such as "You ( ) in the park and ( ) a panda? That sounds amazing!". The example statement refers to the complete NPC response formed by embedding the recast fragment into the continuation statement, such as "You walked in the park and saw a panda? That sounds amazing!". The NPC character tag information refers to the tag information representing the NPC's emotions, such as positive and negative. The question invitation pool refers to a candidate set storing various follow-up questions, such as "What did you do?". The number of follow-up questions in the question invitation pool, such as "next?", refers to the number of available follow-up questions in the pool, such as 10 or 8.

[0098] The NPC character designation refers to the character designation pre-set for each entry in the plot structure pool. For example, if the developers initially set the plot structure to progress from plot A to plot B, then the character designation corresponding to the plot structure entry belonging to plot A would be set as character designation A, and the character designation corresponding to the plot structure entry belonging to plot B would be set as character designation B.

[0099] Optionally, the process of selecting a question invitation expression from the question invitation pool based on the emotion category of the current dialogue statement and the tag information of the NPC character setting is as follows: filter candidate question invitation expressions from the question invitation pool that simultaneously meet the criteria of emotion category tag = emotion category of the current dialogue statement and NPC character setting tag = the tag information of the NPC character setting, and randomly select one from the candidate question invitation expressions as the final question invitation expression.

[0100] Furthermore, exemplarily, the process by which the number of question invitations in the question invitation pool decreases as the cumulative number of failures increases is as follows: for each additional cumulative failure, the number of question invitations decreases by one.

[0101] In another embodiment of the present invention, the step of recasting the erroneous part of the semantic intent that does not conform to the dialogue plot key to obtain a recast fragment includes: locating the language slot in the current dialogue statement corresponding to the dialogue plot key, wherein the language slot is determined by the target grammatical structure bound to the dialogue plot key, and the range of the language slot is the range between the start position and the end position of the dialogue plot key in the current dialogue statement; generating the correct fragment of the erroneous part according to the target grammatical identifier of the dialogue plot key, wherein the lexical change rule is applied to the language slot; and inserting the correct fragment into the language slot to obtain the recast fragment; wherein the lexical change rule refers to a set of conventions for formal substitution of the same word root under different grammatical functions.

[0102] The language slots refer to the text range between the start and end positions of the target grammatical structure bound by the dialogue key in the current dialogue statement, such as verb positions, tense positions, etc. The target grammatical structure refers to the specific grammatical form that the dialogue key requires the user to use, such as the simple past tense, passive voice, etc. The lexical inflection rules refer to the set of conventions for changing the form of the same word root under different grammatical functions, such as walk becoming walkeded, see becoming saw, etc. The correct fragments refer to the correct words or phrases that conform to the target grammatical structure generated according to the lexical inflection rules, such as the correct fragments of walked.

[0103] In another embodiment of the present invention, generating the correct segment of the erroneous part based on the target voice identifier of the dialogue plot key includes: reading the context timestamp bound to the dialogue plot key, wherein the context timestamp is generated by the preceding event chain of the current plot node; querying the voice-time mapping table for verb form markers that match both the target voice identifier and the context timestamp; and concatenating the verb root in the erroneous part with the verb form marker to obtain the correct segment.

[0104] The voice-time mapping table refers to a static lookup table that returns a unique verb form marker by using the target voice identifier and the context timestamp as a joint key. For example, the simple past tense corresponds to the ed voice for last night. The verb form marker refers to a specific word form suffix or complete form marker that matches both the target voice identifier and the context timestamp, such as verb form markers like ed and saw.

[0105] Optionally, the process of collecting the current bounce count of the demonstration bounce text based on the historical bounce count is as follows: after each round of demonstration output, the cumulative bounce count field of the corresponding historical key structure is incremented by 1, and the updated value is used as the current bounce count.

[0106] The task completion module 104 is used to complete the user's dialogue completion task when the current bounce count is greater than the preset bounce count, wherein the content of the dialogue completion task and the dialogue plot key belong to the same language structure.

[0107] In this embodiment of the invention, the preset bounce count refers to the upper limit value for consecutive demonstration questions that are preset for the grammar key, such as 3 times.

[0108] Furthermore, the embodiments of the present invention, through the completion of diary entries, allow players to gradually master grammar through error correction, thereby helping to reduce resistance to the same grammar point.

[0109] In one embodiment of the present invention, completing the user's dialogue completion task includes: reading the morphological change rules corresponding to the dialogue plot key; randomly selecting a diary entry containing five blank spaces from the diary template library; determining the content to be replaced for the five blank spaces in the diary entry containing five blank spaces using the morphological change rules; replacing the five blank spaces in the diary entry containing five blank spaces with the content to be replaced to obtain an updated diary entry; receiving five input forms from the user regarding the updated diary entry; determining whether the five input forms conform to the morphological change rules; determining that the user has completed the dialogue completion task when all five input forms conform to the morphological change rules; performing immediate masking processing on the non-conforming target input forms when the five input forms do not conform to the morphological change rules to determine the remaining input forms after masking; and returning to the step of determining whether the five input forms conform to the morphological change rules using the remaining input forms after masking.

[0110] The diary template library refers to a database that stores multiple diary texts containing blank spaces, such as "Last night I ( ) in the park and ( ) a panda," etc. The five blank spaces refer to the five positions left unfilled in the diary template, such as five parentheses ( ). The content to be replaced refers to the correct words or phrases generated by word form rules that need to be filled into the five blank spaces, such as "walked" and "saw." The updated diary refers to the complete diary text formed after replacing the five blank spaces with the content to be replaced, for example, "Last night I walked in the park and saw a panda." In the updated diaries of panda and other apps, the five input forms refer to the five words or phrases that the user enters for each of the five blanks, such as "walked," "saw," etc. The dialogue completion task refers to the task that the user must fill in all five blanks with the correct form that conforms to the word form change rules to complete the grammar exercise, such as completing the dialogue completion task of filling in the simple past tense. The remaining input forms after masking refer to the visible input forms left after the input forms that do not conform to the word form change rules are masked in real time, such as only keeping "walked" while masking "see," etc.

[0111] Optionally, the process of returning the above judgment on whether the five input forms conform to the word form change rules through the remaining input forms after masking means: only the remaining visible input forms after masking are re-compared with the rules until all conform or the maximum number of retries is reached, thereby avoiding the user seeing all errors at once, which helps to reduce resistance.

[0112] The virtual companion module 105 is used to realize the user's AI personalized virtual companion dialogue processing after the user completes the dialogue completion task.

[0113] This invention implicitly accumulates the number of failures in the background and automatically lowers the CEFR difficulty range of the story structure pool when a threshold is reached. This allows for personalized and seamless difficulty adjustment while maintaining the user's adventurer identity and immersion in the story. This solves the problems of immersion breakage, resistance, and decreased willingness to explore caused by traditional demonstrations or pop-ups, and achieves both efficient foreign language training and in-depth role-playing for the first time.

[0114] In one embodiment of the present invention, the AI ​​personalized virtual companion dialogue processing for the user includes: storing the current five-dimensional vector, dialogue plot key, current hit result of the example bounce text, and current bounce count in the historical conversation archive to update the historical conversation archive and obtain an updated conversation archive; accumulating the cumulative failure count and the current failure count for the same key structure to obtain an accumulated failure value; when the accumulated failure value is not less than a preset failure count, adjusting the upper limit of the difficulty of the dialogue plot key in the plot structure pool within the CEFR range to obtain a corrected difficulty upper limit; determining the updated plot structure pool through the corrected difficulty upper limit; and ending the current round of AI personalized virtual companion dialogue processing for the user and realizing the next round of AI personalized virtual companion dialogue processing for the user through the updated conversation archive and the updated plot structure pool.

[0115] See Figure 2 The diagram shown is a system architecture diagram of an AI-based personalized virtual companion dialogue system based on language learning level, provided in an embodiment of the present invention. Figure 2 In the process, the first column, "Archive Acquisition," reads the user's historical five-dimensional vector, key structure, hit results, and bounce count. The second column, "Story Setting," sets the story key for this round of dialogue based on the current five-dimensional vector and the CEFR range. The third column, through two branches—failure less than the preset and failure not less than the preset—determines whether to maintain the original difficulty selection or lower the CEFR to generate corrected selections and update the available pool. The fourth column, "Count Collection," outputs embedded sample bounce text and accumulates bounce counts when errors are detected. The fifth column, "Task Completion," initiates a diary template filling task after the bounce count reaches the limit, using real-time occlusion to complete grammatical completion. The sixth column, "Virtual Companion," writes all data from this round back to the conversation archive, accumulates the failure value, corrects the difficulty limit, and refreshes the story structure pool before proceeding to the next round of dialogue.

[0116] This invention, through five-dimensional quantification of current dialogue statements based on historical five-dimensional vectors, can update the user's ability profile in real time, thereby helping to reduce the cognitive load caused by ability jumps. Furthermore, by setting the required structures as the sole condition for continuing the story, this invention allows users to naturally practice target grammar as the story progresses, thus helping to maintain the player's identity and immersive experience. Moreover, through partial rewriting and joint questioning of emotion and character, this invention allows players to see only the NPC's natural responses, thus helping to avoid identity shifts caused by complete sentence rewriting or pop-ups. Through the correlation between increasing failure rate and decreasing questioning pool, this invention allows players to gradually... Grammar mastery is achieved through progressive error correction, which helps reduce resistance to the same grammar points. Furthermore, this invention, through diary-based completion, allows players to master grammar through gradual error correction, further reducing resistance to the same grammar points. Moreover, by implicitly accumulating failure counts in the background and automatically lowering the CEFR difficulty range of the story structure pool when a threshold is reached, personalized and seamless difficulty adjustment can be achieved while maintaining the user's adventurer identity and immersion in the story. This solves the problems of immersion disruption, resistance, and decreased exploration motivation caused by traditional demonstrations and pop-ups, achieving both efficient foreign language training and deep role-playing for the first time. Therefore, this invention allows for both immersive experience and efficient grammar training.

[0117] like Figure 3 The diagram shown is a flowchart illustrating an AI-based personalized virtual companion dialogue method based on language learning level, according to an embodiment of the present invention. In this embodiment, the AI-based personalized virtual companion dialogue method based on language learning level includes:

[0118] Before a user conversation begins, the user's historical conversation archive is obtained, wherein the historical conversation archive includes a historical five-dimensional vector, a historical key structure, historical hit results, and historical bounce counts.

[0119] At the start of the user dialogue, the user's current dialogue statement is quantized in five dimensions according to the historical five-dimensional vector to obtain the current five-dimensional vector. Based on the current CEFR interval in the current five-dimensional vector, the historical key structure and the historical hit results, the user's dialogue plot key is set.

[0120] When it is detected that the user has not learned the dialogue plot key, a sample bounce text is output to the user, and the current bounce count of the sample bounce text is collected based on the historical bounce count;

[0121] When the current bounce count is greater than the preset bounce count, the user's dialogue completion task is completed, wherein the content of the dialogue completion task and the dialogue plot key belong to the same language structure;

[0122] After the user completes the dialogue completion task, the user's AI-personalized virtual companion dialogue processing is implemented.

[0123] In the several embodiments provided by this invention, it should be understood that the provided systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0124] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. An AI-based personalized virtual companion dialogue system based on language learning level, characterized in that, The AI-based personalized virtual companion dialogue system based on language learning level includes: a file acquisition module, a plot setting module, a frequency collection module, a task completion module, and a virtual companion module; The file acquisition module is used to acquire the user's historical dialogue file before the user's dialogue begins. The historical dialogue file includes a historical five-dimensional vector, a historical key structure, historical hit results, and historical bounce counts. The plot setting module is used to perform five-dimensional quantization processing on the user's current dialogue statement according to the historical five-dimensional vector when the user's dialogue begins, to obtain the current five-dimensional vector, and set the user's dialogue plot key based on the current CEFR interval in the current five-dimensional vector, the historical key structure and the historical hit result; The frequency collection module is used to output sample bounce text to the user when it detects that the user has not learned the dialogue plot key, including: Extract the semantic intent of the user's current dialogue statement; The erroneous parts of the semantic intent that do not conform to the dialogue plot key are recast to obtain the recast fragment, including: Locate the language slot in the current dialogue statement that corresponds to the dialogue plot key, wherein the language slot is determined by the target grammatical structure bound to the dialogue plot key, and the range of the language slot is the range between the start position and the end position of the dialogue plot key in the current dialogue statement; The correct segment of the erroneous part is generated based on the target voice identifier of the dialogue plot key, wherein word form change rules are applied to the language slot; Insert the correct fragment into the language slot to obtain the recast fragment; The recast fragment is embedded into a continuation statement that conforms to the NPC character setting to obtain the sample statement; Based on the emotion category of the current dialogue statement and the tag information of the NPC character setting, select a question invitation expression from the question invitation pool; By appending the question invitation expression to the end of the example statement, the example bounce text is obtained; The number of question invitations in the question invitation pool decreases as the cumulative number of failures increases. And collect the current bounce count of the example bounce text based on the historical bounce count; The task completion module is used to complete the user's dialogue completion task when the current bounce count is greater than the preset bounce count, wherein the content of the dialogue completion task and the dialogue plot key belong to the same language structure; The virtual companion module is used to enable AI-personalized virtual companion dialogue processing for the user after the user completes the dialogue completion task.

2. The AI-based personalized virtual companion dialogue system based on language learning level as described in claim 1, characterized in that, The word form change rules refer to a set of conventions for formally replacing the same word root under different grammatical functions.

3. The AI-based personalized virtual companion dialogue system based on language learning level as described in claim 1, characterized in that, The step of generating the correct segment of the erroneous part based on the target voice identifier of the dialogue plot key includes: Read the context timestamp bound to the dialogue plot key, wherein the context timestamp is generated by the preceding event chain of the current plot node; Query the voice-time mapping table for verb form tags that match both the target voice identifier and the context timestamp; By concatenating the verb root in the erroneous part with the verb form marker, the correct segment is obtained.

4. The AI-based personalized virtual companion dialogue system based on language learning level as described in claim 1, characterized in that, The step of performing five-dimensional quantization processing on the user's current dialogue statement based on the historical five-dimensional vector to obtain the current five-dimensional vector includes: The current dialogue statement is segmented and tagged to obtain a word sequence; The vocabulary breadth is obtained by counting the number of different lexical units in the vocabulary sequence. Perform grammatical dependency analysis on the lexical sequence to obtain grammatical accuracy; The error density is obtained by calculating the number of errors per 100 words in the vocabulary sequence. The emotions in the vocabulary sequence are classified to obtain emotion categories; The current five-dimensional vector is determined by the vocabulary breadth, the grammatical precision, the error density, the emotion category, and the historical CEFR interval in the historical five-dimensional vector.

5. The AI-based personalized virtual companion dialogue system based on language learning level as described in claim 1, characterized in that, Before setting the user's dialogue story key based on the current CEFR interval in the current five-dimensional vector, the historical key structure, and the historical hit results, the method further includes: Query the cumulative number of failures for each historical key structure in the historical dialogue archive; When the cumulative number of failures is not less than the preset number of failures, the first target entry corresponding to the historical key structure in the story structure pool is obtained; The upper limit of the difficulty of the first target item is adjusted down within the CEFR range to obtain the item that is corrected immediately. The currently available pool is determined by the aforementioned immediate correction entries; When the cumulative number of failures is less than the preset number of failures, the historical CEFR interval of the historical key structure is obtained; The currently available pool is determined by the second target entry in the story structure pool that conforms to the historical CEFR range and whose difficulty cap has not been lowered.

6. The AI-based personalized virtual companion dialogue system based on language learning level as described in claim 1, characterized in that, The step of setting the user's dialogue story key based on the current CEFR interval in the current five-dimensional vector, the historical key structure, and the historical hit results includes: Filter the available entries from the current available pool and the story structure pool. The lower limit of CEFR is not greater than the current CEFR range, the upper limit of CEFR is not less than the current CEFR range, and the historical hit result is a no hit. When the set of available entries is not empty, a dialogue plot key is randomly selected from the set of available entries according to the uniform distribution method; When the set of available entries is empty, the entry with the highest correlation between the current available pool and the current dialogue statement in the plot structure pool is used as the dialogue plot key, wherein the correlation is calculated by the tag co-occurrence matrix.

7. The AI-based personalized virtual companion dialogue system based on language learning level as described in claim 1, characterized in that, The process of completing the user's dialogue completion task includes: Read the word form change rules corresponding to the dialogue plot key; Randomly select a diary entry with five empty spaces from the diary template library; The word form change rules are used to determine the content to be replaced in the five empty spaces in the diary containing five empty spaces. Replace the five empty spaces in the diary with the content to be replaced to obtain the updated diary; Receive five input formats from the user regarding the updated diary; Determine whether the five input formats conform to the word form change rules; When all five input formats conform to the word form change rules, it is determined that the user has completed the dialogue completion task; When the five input forms do not conform to the word form change rules, the non-conforming target input forms are immediately masked to determine the remaining input forms after masking. The remaining input form after masking is used to return to the steps described above for determining whether the five input forms conform to the word form change rules.

8. The AI-based personalized virtual companion dialogue system based on language learning level as described in claim 1, characterized in that, The AI-powered personalized virtual companion dialogue processing for the user includes: The current five-dimensional vector, dialogue plot key, current hit result and current number of bounces of the example bounce text are stored in the historical dialogue file to update the historical dialogue file and obtain the updated conversation file. The cumulative number of failures for the same key structure is summed with the current number of failures to obtain the cumulative failure value. When the accumulated failure value is not less than the preset number of failures, the upper limit of the difficulty of the dialogue plot key in the plot structure pool is adjusted down within the CEFR range to obtain the corrected upper limit of difficulty. The updated story structure pool is determined by adjusting the upper limit of difficulty. The updated session file and the updated story structure pool are used to conclude the current round of AI personalized virtual companion dialogue processing for the user and to enable the next round of AI personalized virtual companion dialogue processing for the user.

9. A method for AI-based personalized virtual companion dialogue based on language learning level, characterized in that, The AI-based personalized virtual companion dialogue method based on language learning level is applied to the AI-based personalized virtual companion dialogue system based on language learning level as described in any one of claims 1-8, and the method includes: Before a user conversation begins, the user's historical conversation archive is obtained, wherein the historical conversation archive includes a historical five-dimensional vector, a historical key structure, historical hit results, and historical bounce counts. At the start of the user dialogue, the user's current dialogue statement is quantized in five dimensions according to the historical five-dimensional vector to obtain the current five-dimensional vector. Based on the current CEFR interval in the current five-dimensional vector, the historical key structure and the historical hit results, the user's dialogue plot key is set. When it is detected that the user has not learned the dialogue plot key, a sample bounce text is output to the user, and the current bounce count of the sample bounce text is collected based on the historical bounce count; When the current bounce count is greater than the preset bounce count, the user's dialogue completion task is completed, wherein the content of the dialogue completion task and the dialogue plot key belong to the same language structure; After the user completes the dialogue completion task, the user's AI-personalized virtual companion dialogue processing is implemented.