Educational AI content generation method, system and device based on knowledge base

By establishing a knowledge base that matches the learning stage and using the generative artificial intelligence model, the problem of generative artificial intelligence being unable to adapt to the user's learning stage is solved, ensuring the accuracy and adaptability of the content, and achieving content that matches the learning stage. output.

CN118643115BActive Publication Date: 2024-10-22CHENGDU STANDING EDUCATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411118250.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-10-22
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

Existing generative artificial intelligence cannot adapt the content of the corresponding stage to the user according to the user's learning stage, causing the content obtained to be deviated from the content that needs to be mastered.

Method used

By establishing a knowledge base that matches different learning stages, obtain user information and match it with the corresponding knowledge base, use the generative artificial intelligence model to generate reply information, retrieve the content of the knowledge base based on keyword data, determine the similarity and make modifications to ensure the accuracy of the output The content matches the user’s learning stage.

Benefits of technology

It solves the problem that generative artificial intelligence cannot adapt to the user's learning stage, ensures that the information received by users meets the needs of their learning stage, and avoids content deviation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643115B_ABST
    Figure CN118643115B_ABST
Patent Text Reader

Abstract

The present application discloses a method, system and device for generating educational AI content based on a knowledge base, including: establishing at least one knowledge base according to at least one learning stage; matching a first knowledge base for a first user according to first user information of a first user; generating a first reply message in response to receiving a first text sent by a first user; obtaining keyword data of the first reply message; retrieving a first content matching the keyword data in the first knowledge base; judging a first similarity between the first content and the first reply message according to the first content; outputting the first reply message when the first similarity is not lower than a preset similarity threshold; outputting a second reply message according to the content of the first knowledge base when the first similarity is lower than a preset similarity threshold. The problem that the content obtained through the existing generative artificial intelligence may deviate from the content that needs to be mastered in the corresponding learning stage is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a method, system and device for generating educational AI content based on a knowledge base. Background Art

[0002] Generative Artificial Intelligence (GAI) is an AI technology that uses complex algorithms, models, and rules to learn from large-scale data sets to create new original content. Its core goal is to use computer algorithms and data to generate new and practically valuable content, such as text, images, audio, video, and code. This technology can simulate human creativity and imagination, thus showing broad application prospects in various fields.

[0003] Although the application of generative AI in the field of education has brought many innovations and conveniences, it also faces a series of problems and challenges. For example, the existing generative AI system relies on training data. If the data is biased or wrong, the generated content may also be biased or wrong. This may cause students to receive inaccurate information, which in turn affects their knowledge system and learning effects.

[0004] Furthermore, since the knowledge mastered at different learning stages is different, the existing generative artificial intelligence is unable to adapt the content of the corresponding stage to the user according to the user's learning stage, resulting in the problem that the content obtained by the user through generative artificial intelligence may deviate from the content that needs to be mastered in the corresponding learning stage. Summary of the invention

[0005] The present invention provides a method, system and device for generating educational AI content based on a knowledge base, which at least solves the problem that the existing generative artificial intelligence cannot adapt the content of the corresponding stage to the user according to the user's learning stage, resulting in the content obtained by the user through generative artificial intelligence may deviate from the content that needs to be mastered in the corresponding learning stage.

[0006] A method for generating educational AI content based on a knowledge base, comprising:

[0007] According to at least one learning stage, at least one knowledge base matching the learning stage is established, wherein the knowledge base at least stores differentiated teaching data of the corresponding learning stage relative to a later learning stage;

[0008] Acquire first user information of a first user, and match a first knowledge base for the first user according to the first user information, wherein the first knowledge base matches a learning stage of the first user;

[0009] In response to receiving a first text sent by a first user, generating a first reply message according to a generative artificial intelligence model;

[0010] According to the first reply information, obtaining keyword data of the first reply information;

[0011] According to the keyword data, searching the first knowledge base to obtain first content matching the keyword data in the first knowledge base;

[0012] Determining, according to the first content, a first similarity between the first content and the first reply information;

[0013] When the first similarity is not lower than a preset similarity threshold, outputting the first reply information;

[0014] When the first similarity is lower than a preset similarity threshold, the first reply information is modified according to the content of the first knowledge base, and then the second reply information is output.

[0015] Optionally, the establishing, according to at least one learning stage, at least one knowledge base matching the learning stage includes:

[0016] Acquire teaching data of each learning stage, and perform differentiated comparison based on the teaching data of each learning stage to acquire differentiated teaching data, wherein the differentiated teaching data is used to characterize teaching data with differences in different learning stages;

[0017] According to the differentiated teaching data and the learning stages corresponding to the differentiated teaching data, a knowledge base corresponding to different learning stages is established.

[0018] Optionally, the acquiring first user information of the first user, and matching the first knowledge base for the first user according to the first user information, includes:

[0019] Acquire first user information of a first user, and determine a learning stage of the first user according to the first user information;

[0020] According to the learning stage of the first user, a first knowledge base corresponding to the learning stage of the first user is matched for the first user.

[0021] Optionally, obtaining keyword data of the first reply information according to the first reply information includes:

[0022] According to the first reply information, obtaining grammatical analysis data through dependency syntax analysis and / or phrase structure analysis;

[0023] According to the grammatical analysis data, semantic role labeling is performed on the first reply information to obtain semantic role labeling data;

[0024] According to the grammatical analysis data and the semantic role labeling data, and according to the first text sent by the first user, keyword data of the first reply information is obtained, and the keyword data includes at least one keyword and the grammatical analysis data and semantic role labeling data corresponding to the keyword.

[0025] Optionally, judging, according to the first content, a first similarity between the first content and the first reply information includes:

[0026] Preprocessing the first content and the first reply information according to the first content and the first reply information;

[0027] According to the preprocessed first content and the first reply information, a first content word vector and a first reply information word vector are obtained through a word embedding model;

[0028] Based on the first content word vector and the first reply information word vector, the similarity between the first content word vector and the first reply information word vector is calculated as the first similarity.

[0029] Optionally, the step of modifying the first reply information according to the content of the first knowledge base and then outputting the second reply information includes:

[0030] Obtaining a similarity sequence of keywords in the keyword data according to the first content and the first reply information;

[0031] According to the similarity sequence, the keywords in the first reply information are replaced with corresponding words in the first content in order of similarity from low to high, until the similarity between the replaced first reply information and the first content is not less than a preset similarity threshold, and the replaced first reply information is output as the second reply information.

[0032] Optionally, obtaining a similarity sequence of keywords in the keyword data according to the first content and the first reply information includes:

[0033] According to the first reply information, obtaining at least one keyword included in the keyword data and grammatical analysis data and semantic role labeling data corresponding to the keyword;

[0034] Determining, in the first content, an alternative word for the keyword according to the grammatical analysis data and the semantic role labeling data corresponding to the keyword;

[0035] According to the keyword and the substitute word, obtaining the similarity between the keyword and the substitute word;

[0036] According to the similarity, at least one keyword included in the keyword data is sorted to obtain the similarity sequence.

[0037] Optionally, when the first similarity is lower than a preset similarity threshold, after modifying the first reply information according to the content of the first knowledge base and outputting the second reply information, the method further includes:

[0038] Based on the first reply information and according to a preset template, a third reply information is obtained and output; the third reply information at least includes the content of the first reply information, the difference between the first reply information and the second reply information, and the reason for the difference.

[0039] On the other hand, a knowledge base-based educational AI content generation system includes a generative artificial intelligence platform and a content management platform;

[0040] The content management platform is configured to:

[0041] According to at least one learning stage, at least one knowledge base matching the learning stage is established, wherein the knowledge base at least stores differentiated teaching data of the corresponding learning stage relative to a later learning stage;

[0042] Acquire first user information of a first user, and match a first knowledge base for the first user according to the first user information, wherein the first knowledge base matches a learning stage of the first user;

[0043] In response to receiving a first text sent by a first user, sending the first text to the generative artificial intelligence platform;

[0044] Obtaining keyword data of the first reply information according to the first reply information sent by the generative artificial intelligence platform in response to the first text;

[0045] According to the keyword data, searching the first knowledge base to obtain first content matching the keyword data in the first knowledge base;

[0046] Determining, according to the first content, a first similarity between the first content and the first reply information;

[0047] When the first similarity is not lower than a preset similarity threshold, outputting the first reply information;

[0048] When the first similarity is lower than a preset similarity threshold, the first reply information is modified according to the content of the first knowledge base, and second reply information is output;

[0049] The generative artificial intelligence platform is configured to:

[0050] The first text sent by the content management platform is received, and the first reply information is generated according to the first text and sent to the content management platform.

[0051] On the other hand, a computer device is provided. The computer device includes a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the above method.

[0052] On the other hand, a computer storage medium stores a computer program, and a processor executes the computer program to implement the above method.

[0053] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0054] The present invention discloses a method, system and device for generating educational AI content based on a knowledge base, comprising: establishing at least one knowledge base matching the learning stage according to at least one learning stage, wherein the knowledge base at least stores differentiated teaching data of the corresponding learning stage relative to the later learning stage; obtaining first user information of a first user, matching a first knowledge base for the first user according to the first user information, wherein the first knowledge base matches the learning stage of the first user; generating first reply information according to a generative artificial intelligence model in response to receiving a first text sent by the first user; obtaining keyword data of the first reply information according to the first reply information; searching the first knowledge base according to the keyword data to obtain first content matching the keyword data in the first knowledge base; judging the first similarity between the first content and the first reply information according to the first content; outputting the first reply information when the first similarity is not lower than a preset similarity threshold; and outputting the second reply information after modifying the first reply information according to the content of the first knowledge base when the first similarity is lower than a preset similarity threshold. At least the problem that the existing generative artificial intelligence cannot adapt the content of the corresponding stage to the user according to the user's learning stage is solved, resulting in the content obtained by the user through generative artificial intelligence being likely to deviate from the content that needs to be mastered in the corresponding learning stage. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the specific implementation of the present application or the technical solution in the prior art, the following is a brief introduction to the drawings required for the specific implementation or the prior art description. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, each element or part is not necessarily drawn according to the actual scale.

[0056] Figure 1 A flowchart of a method for generating educational AI content based on a knowledge base in this application;

[0057] Figure 2 This is a schematic diagram of the structure of a computer device in this application.

[0058] Markings in the figure: 101 - processor, 102 - communication bus, 103 - network interface, 104 - user interface, 105 - memory.

[0059] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0060] In order to enable those skilled in the art to better understand the disclosed solution, the technical solution in the disclosed embodiment will be clearly and completely described below in conjunction with the drawings in the disclosed embodiment. Obviously, the described embodiment is only a part of the disclosed embodiment, not all of the embodiments. According to the embodiments in the disclosed embodiment, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the disclosed embodiment.

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

[0062] Example 1

[0063] like Figure 1 As shown, a method for generating educational AI content based on a knowledge base includes:

[0064] S1. According to at least one learning stage, establish at least one knowledge base matching the learning stage.

[0065] Specifically, the knowledge base at least stores differentiated teaching data of the corresponding learning stage relative to the later learning stage.

[0066] Optionally, in order to reduce the amount of data in the knowledge base, the above method can be used to store only differentiated teaching data for each learning stage in the knowledge base. For example, in high school, the strongest acid represents perchloric acid, and after college, the strongest acid represents fluoroantimonic acid. In this case, "the strongest acid represents perchloric acid" needs to be stored in the knowledge base of the high school stage, and "the strongest acid represents fluoroantimonic acid" can be optionally stored in the knowledge base of the college stage. The differentiated teaching data for the later learning stages may not be stored in the database of the later learning stages. For example, after the college stage, "the strongest acid represents fluoroantimonic acid" is true, and "the strongest acid represents fluoroantimonic acid" is also the answer closest to the facts at this stage, and is generally the answer output by the large language model, so it may not be stored in the knowledge base of the college stage.

[0067] Optionally, the differentiated teaching data for each learning stage also includes: in the junior high school stage, there is no answer to the square root of -1, while after the high school stage, the square root of -1 is i , then you need to store "there is no answer to the square root of -1" in the knowledge base of the junior high school stage, and you can choose to store "the square root of -1 is i ” is stored in the knowledge base at the high school level.

[0068] Specifically, differentiated teaching data is used to represent teaching data for the same problem that has different answers at different learning stages due to differences in the teaching objectives of the learning stages.

[0069] Optionally, according to at least one learning stage, at least one knowledge base matching the learning stage is established, including:

[0070] According to the target learning stage, target learning content of the target learning stage is obtained, and the target learning stage belongs to at least one learning stage;

[0071] According to the target learning content, the target learning content is input into the generative artificial intelligence model for judgment, so as to obtain the content that the generative artificial intelligence model judges to be incorrect, incompletely correct or questionable;

[0072] Based on the content that the generative artificial intelligence model determines to be incorrect, incompletely correct or questionable, a target knowledge base matching the target learning stage is established, and the target knowledge base belongs to at least one knowledge base.

[0073] Specifically, according to at least one learning stage, at least one knowledge base matching the learning stage is established, including:

[0074] Define learning stages and learning content: It is necessary to identify different learning stages, such as primary school, junior high school, and senior high school, and define specific learning content for each learning stage. These contents can be in the syllabus, textbooks, supplementary teaching materials, test questions, or other teaching resources;

[0075] Input the target learning content into the generative model: Input the target learning content into the generative AI model. This model can be based on a pre-trained language model, such as the GPT series model, and adapt to the analysis of learning content by adjusting and training data in a specific field;

[0076] Model evaluation and content determination:

[0077] The generative model will analyze the input learning content and output the understanding and interpretation of this content. The model needs to be trained to identify incorrect information, incomplete explanations, and knowledge points that may be questionable.

[0078] Build the target knowledge base:

[0079] Based on the output of the model, a knowledge base is constructed, which is specifically used to store and correct those learning contents that are judged to be incorrect or not completely correct.

[0080] Optionally, before inputting the target learning content into the generative model, the target learning content is preprocessed. The preprocessing method includes:

[0081] Text cleaning: removing irrelevant symbols and punctuation, deleting or replacing errors and typos in the text, and standardizing wording, for example, unifying the use of synonyms or professional terms;

[0082] Structural processing: breaking down text content into logical units, such as chapters, paragraphs, and sentences; labeling different types of information, such as definitions, examples, formulas, etc. with appropriate tags;

[0083] Semantic enhancement: Use natural language processing tools to identify and annotate keywords and phrases; parse and annotate entities and concepts in text, such as dates, names, places, etc.

[0084] Data standardization: Ensure that all text data follows the same format and encoding standards and standardize numbers and measurement units.

[0085] Optionally, the target knowledge base is a structured database dedicated to storing and managing verified and revised learning content, with the following specific styles:

[0086] Knowledge unit organization: The knowledge base should be organized according to learning stages and disciplines; each knowledge point should be classified according to themes or chapters;

[0087] Content format: including revised knowledge points and detailed explanations of the knowledge points;

[0088] Access and retrieval functions: Provide an efficient search engine that supports keyword search and advanced query functions.

[0089] The purpose of adopting the above method is that since the data volume of all learning contents in any learning stage is large, if the above method is not adopted, all learning contents need to be stored in the knowledge base of the corresponding learning stage, which has high requirements on hardware. At the same time, it takes a long time to search in massive data, which is not conducive to the realization of subsequent functions.

[0090] S2. Obtain first user information of a first user, and match a first knowledge base for the first user according to the first user information.

[0091] Specifically, the first knowledge base matches the learning stage of the first user.

[0092] Optionally, the method for obtaining the first user information of the first user is to obtain the first user information according to the UID or other unique code or login information of the first user.

[0093] Optionally, the first user may be a single user or a user group, and the first user information includes at least a learning stage of the user or a member associated with the user. The learning stage may be a self-defined learning stage or a learning stage synchronized from other devices, systems, or databases.

[0094] Optionally, the first knowledge base may be a knowledge base stored locally on the user, a database with a knowledge base, or a knowledge base stored on a server or cloud, or a database with a knowledge base, and the user may selectively download the knowledge base he or she needs.

[0095] Optionally, the method of obtaining first user information of a first user and matching a first knowledge base for the first user according to the first user information includes:

[0096] Acquire first user information of a first user, and obtain a first user group to which the first user belongs according to the first user information;

[0097] According to the first user group, a first knowledge base corresponding to the first user group is obtained.

[0098] The first user group also includes an administrator user, and the administrator user can configure a knowledge base for the first user group.

[0099] By adopting the above method, the user's teacher can match the corresponding knowledge base for the user according to the user's learning progress.

[0100] S3. In response to receiving a first text sent by a first user, generate a first reply message according to a generative artificial intelligence model.

[0101] Optionally, the generative AI model can be a BERT model, a GPT model or other models based on the Transformer architecture, or a generative adversarial network model or a sequence-to-sequence model.

[0102] S4. Obtain keyword data of the first reply information according to the first reply information.

[0103] Optionally, based on the first reply information, a method for obtaining keyword data of the first reply information may be word frequency statistics, named entity recognition, topic modeling, keyword extraction algorithm or other methods based on NLP technology.

[0104] Optionally, the keyword data includes keywords and keyword attributes.

[0105] S5. According to the keyword data, search in the first knowledge base to obtain first content in the first knowledge base that matches the keyword data.

[0106] Optionally, a knowledge base refers to a system or resource used to store and organize information. It usually contains structured information about a specific topic, field, or organization that can be retrieved by searching or browsing. The main purpose of a knowledge base is to provide users with easily accessible and understandable information in order to solve problems, get guidance, or support decision-making.

[0107] S6. Determine, based on the first content, a first similarity between the first content and the first reply information.

[0108] When the first similarity is not lower than a preset similarity threshold;

[0109] S7. Output the first reply information.

[0110] When the first similarity is lower than a preset similarity threshold;

[0111] S8. After modifying the first reply information according to the content of the first knowledge base, output the second reply information.

[0112] Through the above method, the knowledge of the user's corresponding learning stage is stored in the first knowledge base. When the user asks a question to the generative artificial intelligence model, the result output by the generative artificial intelligence model is corrected through the content in the first knowledge base, so that the information received by the user conforms to the corresponding learning stage. At least the problem that the existing generative artificial intelligence cannot adapt the content of the corresponding stage to the user according to the user's learning stage is solved, resulting in the content obtained by the user through the generative artificial intelligence may be different from the content learned in school. In the prior art, although there are schemes for using knowledge bases to assist in question and answer, the schemes in the prior art are generally to improve the accuracy of the answers of the question and answer system. This accuracy is generally absolute, objective, and close to the facts. However, in the education system, sometimes we do not need a very accurate answer close to the facts, but an answer close to the knowledge that the user should master in the corresponding learning stage. There may be some problems in mastering knowledge that does not belong to this learning stage too early. Therefore, we set up knowledge bases for different learning stages so that the same question can only obtain the answer of the corresponding learning stage according to the knowledge bases of different stages, thereby avoiding the occurrence of the above problems. That is, the knowledge base of the existing technology is objective and close to the facts. In order to ensure the accuracy of the output, each question corresponds to only one answer. However, this solution can output different answers to the same question at different stages based on the databases at different stages.

[0113] Example 2

[0114] This embodiment is based on the first embodiment, and is a method for generating educational AI content based on a knowledge base, including:

[0115] S1. According to at least one learning stage, establish at least one knowledge base matching the learning stage.

[0116] Specifically, the knowledge base at least stores differentiated teaching data of the corresponding learning stage relative to the later learning stage;

[0117] Optionally, in order to reduce the amount of data in the knowledge base, the above method can be used to store only differentiated teaching data for each learning stage in the knowledge base. For example, in high school, the strongest acid represents perchloric acid, and in college, the strongest acid represents fluoroantimonic acid. In this case, "the strongest acid represents perchloric acid" needs to be stored in the knowledge base of the high school stage, and "the strongest acid represents fluoroantimonic acid" can be optionally stored in the knowledge base of the college stage. The differentiated teaching data for the later learning stages may not be stored in the database of the later learning stages. For example, after the college stage, "the strongest acid represents fluoroantimonic acid" is true, and "the strongest acid represents fluoroantimonic acid" is also the answer closest to the fact at this stage, and is generally the answer output by the large language model. Therefore, it may not be stored in the knowledge base of the college stage.

[0118] Optionally, differentiated teaching data for each learning stage also includes: in junior high school, there is no answer to the square root of -1, while in high school, the square root of -1 is i , then you need to store "there is no answer to the square root of -1" in the knowledge base of the junior high school stage, and you can choose to store "the square root of -1 is i ” is stored in the knowledge base at the high school level.

[0119] Specifically, differentiated teaching data is used to represent teaching data for the same problem that has different answers at different learning stages due to differences in the teaching objectives of the learning stages.

[0120] Optionally, according to at least one learning stage, at least one knowledge base matching the learning stage is established, including:

[0121] Obtaining teaching data at each learning stage, and performing differentiated comparison based on the teaching data at each learning stage to obtain differentiated teaching data, where the differentiated teaching data is used to characterize teaching data with differences at different learning stages;

[0122] According to the differentiated teaching data and the learning stages corresponding to the differentiated teaching data, a knowledge base corresponding to different learning stages is established.

[0123] S2. Obtain first user information of a first user, and match a first knowledge base for the first user according to the first user information.

[0124] Specifically, the first knowledge base matches the learning stage of the first user.

[0125] Optionally, the method for obtaining the first user information of the first user is to obtain the first user information according to the UID or other unique code or login information of the first user.

[0126] Optionally, the first user may be a single user or a user group, and the first user information includes at least a learning stage of the user or a member associated with the user. The learning stage may be a self-defined learning stage or a learning stage synchronized from other devices, systems, or databases.

[0127] Optionally, the first knowledge base may be a knowledge base stored locally on the user, a database with a knowledge base, or a knowledge base stored on a server or cloud, or a database with a knowledge base, and the user may selectively download the knowledge base he or she needs.

[0128] Optionally, obtaining first user information of a first user, and matching a first knowledge base for the first user according to the first user information includes:

[0129] Acquire first user information of a first user, and determine a learning stage of the first user according to the first user information;

[0130] According to the learning stage of the first user, a first knowledge base corresponding to the learning stage of the first user is matched for the first user.

[0131] S3. In response to receiving a first text sent by a first user, generate a first reply message according to a generative artificial intelligence model.

[0132] Optionally, the generative AI model can be a BERT model, a GPT model or other models based on the Transformer architecture, or a generative adversarial network model or a sequence-to-sequence model.

[0133] S4. Obtain keyword data of the first reply information according to the first reply information.

[0134] Optionally, based on the first reply information, a method for obtaining keyword data of the first reply information may be word frequency statistics, named entity recognition, topic modeling, keyword extraction algorithm or other methods based on NLP technology.

[0135] Optionally, the keyword data includes keywords and attributes of keywords.

[0136] Optionally, obtaining keyword data of the first reply information according to the first reply information includes:

[0137] According to the first reply information, grammatical analysis data is obtained through dependency syntax analysis and / or phrase structure analysis;

[0138] Performing semantic role labeling on the first reply information according to the grammatical analysis data to obtain semantic role labeling data;

[0139] According to the grammatical analysis data and the semantic role labeling data, keyword data of the first reply information is obtained according to the first text sent by the first user, and the keyword data includes at least one keyword and the grammatical analysis data and the semantic role labeling data corresponding to the keyword.

[0140] Specifically, dependency syntactic analysis is based on the dependency relationship between words. By analyzing the dependency relationship between each word and other words (such as subject-predicate relationship, modification relationship, etc.), the role of each word in the sentence can be identified.

[0141] For example, for the sentence "John bought a new car.", dependency parsing can produce the following structure:

[0142] "John" is the subject of "bought"; "bought" is the core verb of the sentence; "car" is the object of "bought";

[0143] Phrase structure analysis focuses more on identifying the hierarchical structure between words, such as noun phrases, verb phrases, etc. By analyzing the composition of phrases, the grammatical structure of the sentence can be understood more clearly.

[0144] Specifically, semantic role labeling further labels the semantic roles played by various components in a sentence based on grammatical analysis.

[0145] For the sentence "John bought a new car.", semantic role labeling can be annotated as follows:

[0146] “John” plays the role of the buyer (Agent); “bought” is the action (Predicate); “car” is the item being bought;

[0147] The results of semantic role labeling help to understand the semantics of a sentence more accurately, rather than just its grammatical structure.

[0148] Combining the results of grammatical analysis and semantic role labeling, the following steps of keyword extraction can be performed:

[0149] Extract core verbs and noun phrases:

[0150] Extract the core verbs and noun phrases in the sentence from the grammatical analysis. These words usually reflect the main action and theme of the sentence.

[0151] Extract the predicate verb and its modifications:

[0152] Identify the most important action verb in the sentence, taking into account its modifiers, such as adjectives and adverbs.

[0153] Semantic role keywords:

[0154] According to the results of semantic role labeling, the components that play important semantic roles in the sentence are identified, such as agent, patient, etc. These components are usually very important in understanding the theme and core intention of the sentence.

[0155] Contextual keywords:

[0156] Consider the modifiers and the subject of the modifier in the sentence, and combine the contextual information of the entire text. For example, for "John decided to buy a new car from the dealership nearby.", the keywords may include "John", "decided", "buy", "car", "dealership", because they directly involve important information such as decision, action, object and place.

[0157] A specific example is the sentence "After a long day at work, John decided to buy a new car from the dealership nearby.".

[0158] Perform syntax analysis:

[0159] It can be identified that "John" is the subject, "decided" is the core verb, "buy" is the predicate verb, "car" is the object, and "dealership nearby" is the location modifier.

[0160] Perform semantic role labeling:

[0161] Label "John" as the decision maker, "buy" as the action, "car" as the item being bought, and "dealershipnearby" as the place of purchase.

[0162] To extract keywords:

[0163] Possible keywords include “John”, “decided”, “buy”, “car”, “dealership” because they reflect the core action, subject, target and place in the sentence.

[0164] This method combines grammatical structure and deep semantic analysis to more accurately capture the key information and important intentions in the text. This has important application significance for information extraction, information retrieval and text understanding in natural language processing tasks.

[0165] S5. Searching the first knowledge base according to the keyword data to obtain first content in the first knowledge base that matches the keyword data;

[0166] Optionally, a knowledge base refers to a system or resource used to store and organize information. It usually contains structured information about a specific topic, field, or organization that can be retrieved by searching or browsing. The main purpose of a knowledge base is to provide users with easily accessible and understandable information in order to solve problems, get guidance, or support decision-making.

[0167] Optionally, based on the keyword data, there may be multiple pieces of content that are searched in the first knowledge base to obtain data matching the keyword data in the first knowledge base, among which the content with the highest similarity to the first reply information or involving the most keyword data is the first content.

[0168] S6. Determine, based on the first content, a first similarity between the first content and the first reply information;

[0169] Optionally, judging, according to the first content, a first similarity between the first content and the first reply information includes:

[0170] Preprocessing the first content and the first reply information according to the first content and the first reply information; the text preprocessing includes: word segmentation, stop word removal, case processing, etc.;

[0171] According to the preprocessed first content and the first reply information, a first content word vector and a first reply information word vector are obtained through a word embedding model; according to word vectorization, a pre-trained word embedding model such as Word2Vec, GloVe or FastText is used to map each word into a word vector;

[0172] Average or weighted average the word vectors of all words in the text to get the vector representation of the entire text;

[0173] Based on the first content word vector and the first reply information word vector, according to similarity calculation, such as using cosine similarity or other similarity measurement methods, the similarity between the first content word vector and the first reply information word vector is calculated as the first similarity.

[0174] When the first similarity is not lower than a preset similarity threshold;

[0175] S7, outputting the first reply information;

[0176] When the first similarity is lower than a preset similarity threshold;

[0177] S8. After modifying the first reply information according to the content of the first knowledge base, output the second reply information.

[0178] Optionally, when the first similarity is lower than a preset relevance threshold, the first reply information is output or the first content is re-determined; the relevance threshold is used to indicate that when the similarity threshold is lower than the threshold, the first content is completely unrelated to the first reply information.

[0179] Optionally, judging, according to the first content, a first similarity between the first content and the first reply information includes:

[0180] Preprocessing the first content and the first reply information according to the first content and the first reply information; text preprocessing: including operations such as word segmentation, removal of stop words, and case processing;

[0181] According to the preprocessed first content and first reply information, a first content word vector and a first reply information word vector are obtained through a word embedding model; according to word vectorization: a pre-trained word embedding model such as Word2Vec, GloVe or FastText is used to map each word into a word vector;

[0182] Text representation: average or weighted average the word vectors of all words in the text to obtain the vector representation of the entire text; optionally, when the vector representation of the entire text is obtained by weighted averaging, weights are assigned to the words or keywords according to whether they appear in the first text, and the weights of the words or keywords that appear in the first text are lower, and the weights of the words or keywords that do not appear in the first text are higher. This is because in the first reply information, the words or keywords that appear in the first text may be repeating the questions of the first text, while the words or keywords that do not appear in the first text are the answers;

[0183] According to the first content word vector and the first reply information word vector, according to similarity calculation: using cosine similarity or other similarity measurement methods, calculate the similarity between the first content word vector and the first reply information word vector as a first similarity;

[0184] Optionally, after modifying the first reply information according to the content of the first knowledge base, outputting the second reply information includes:

[0185] Obtaining a similarity sequence of keywords in the keyword data according to the first content and the first reply information;

[0186] According to the similarity sequence, the keywords in the first reply information are replaced with corresponding words in the first content in order of similarity from low to high, until the similarity between the replaced first reply information and the first content is not less than a preset similarity threshold, and the replaced first reply information is output as the second reply information.

[0187] Optionally, obtaining a similarity sequence of keywords in the keyword data according to the first content and the first reply information includes:

[0188] According to the first reply information, obtaining the keyword data including at least one keyword and grammatical analysis data and semantic role labeling data corresponding to the keyword;

[0189] Determining a substitute word for the keyword in the first content according to the grammatical analysis data and the semantic role labeling data corresponding to the keyword;

[0190] According to the keywords and the substitute words, the similarity between the keywords and the substitute words is obtained;

[0191] According to the similarity, at least one keyword included in the keyword data is sorted to obtain a similarity sequence. Through the above steps, the second reply information that meets the user's learning stage can be efficiently obtained.

[0192] Optionally, when the first similarity is lower than a preset similarity threshold, after modifying the first reply information according to the content of the first knowledge base and outputting the second reply information, the method further includes:

[0193] Based on the first reply information and according to a preset template, the third reply information is obtained and output; the third reply information at least includes the content of the first reply information, the difference between the first reply information and the second reply information, and the reason for the difference.

[0194] Through the third reply information, the content of the first reply information that does not match the user's learning stage is displayed to the user, which helps to expand the user's knowledge reserve. This function can be optionally enabled by the user or the user's associated users.

[0195] Optionally, whether to display the third reply information to the customer is determined based on the gap between the learning stage corresponding to the content of the first reply information and the learning stage corresponding to the second reply information. For example, when the learning stage corresponding to the content of the first reply information is the next learning stage of the learning stage corresponding to the second reply information, the third reply information is displayed to the customer.

[0196] Optionally, when the first similarity is lower than a preset similarity threshold, after modifying the first reply information according to the content of the first knowledge base and outputting the second reply information, the method further includes:

[0197] Determining whether the first reply information includes a first keyword that does not exist in the first knowledge base;

[0198] When the first reply information includes a keyword that does not exist in the first knowledge base, obtaining a first replacement word corresponding to the first keyword;

[0199] Establishing a replacement mapping between the first replacement word and the first keyword;

[0200] Step S3, after obtaining the keyword data of the first reply information according to the first reply information, it also includes, after replacing the keywords in the first reply information by replacement mapping, obtaining new first reply information, and executing subsequent steps according to the new first reply information.

[0201] Example 3

[0202] An educational AI content generation system based on a knowledge base, including a generative artificial intelligence platform and a content management platform;

[0203] The content management platform is configured to:

[0204] According to at least one learning stage, at least one knowledge base matching the learning stage is established, wherein the knowledge base at least stores differentiated teaching data of the corresponding learning stage relative to a later learning stage;

[0205] Acquire first user information of a first user, and match a first knowledge base for the first user according to the first user information, wherein the first knowledge base matches a learning stage of the first user;

[0206] In response to receiving a first text sent by a first user, sending the first text to a generative artificial intelligence platform;

[0207] Obtain keyword data of the first reply information according to the first reply information sent by the generative artificial intelligence platform in response to the first text;

[0208] According to the keyword data, searching in the first knowledge base to obtain first content in the first knowledge base that matches the keyword data;

[0209] Determining, according to the first content, a first similarity between the first content and the first reply information;

[0210] When the first similarity is not lower than a preset similarity threshold, outputting first reply information;

[0211] When the first similarity is lower than a preset similarity threshold, the first reply information is modified according to the content of the first knowledge base, and then the second reply information is output;

[0212] The Generative AI Platform is configured to:

[0213] A first text sent by a content management platform is received, and a first reply message is generated according to the first text and sent to the content management platform.

[0214] Optionally, before obtaining first user information of the first user and matching the first knowledge base for the first user according to the first user information, the method further includes:

[0215] Obtaining teaching data at each learning stage, and performing differentiated comparison based on the teaching data at each learning stage to obtain differentiated teaching data, where the differentiated teaching data is used to characterize teaching data with differences at different learning stages;

[0216] According to the differentiated teaching data and the learning stages corresponding to the differentiated teaching data, a knowledge base corresponding to different learning stages is established.

[0217] Optionally, obtaining first user information of a first user, and matching a first knowledge base for the first user according to the first user information includes:

[0218] Acquire first user information of a first user, and determine a learning stage of the first user according to the first user information;

[0219] According to the learning stage of the first user, a first knowledge base corresponding to the learning stage of the first user is matched for the first user.

[0220] Optionally, obtaining keyword data of the first reply information according to the first reply information includes:

[0221] According to the first reply information, grammatical analysis data is obtained through dependency syntax analysis and / or phrase structure analysis;

[0222] Performing semantic role labeling on the first reply information according to the grammatical analysis data to obtain semantic role labeling data;

[0223] According to the grammatical analysis data and the semantic role labeling data, keyword data of the first reply information is obtained according to the first text sent by the first user, and the keyword data includes at least one keyword and the grammatical analysis data and the semantic role labeling data corresponding to the keyword.

[0224] Optionally, judging, according to the first content, a first similarity between the first content and the first reply information includes:

[0225] Preprocessing the first content and the first reply information according to the first content and the first reply information;

[0226] According to the preprocessed first content and first reply information, a first content word vector and a first reply information word vector are obtained through a word embedding model;

[0227] Based on the first content word vector and the first reply information word vector, the similarity between the first content word vector and the first reply information word vector is calculated as the first similarity.

[0228] Optionally, after modifying the first reply information according to the content of the first knowledge base, outputting the second reply information includes:

[0229] Obtaining a similarity sequence of keywords in the keyword data according to the first content and the first reply information;

[0230] According to the similarity sequence, the keywords in the first reply information are replaced with corresponding words in the first content in order of similarity from low to high, until the similarity between the replaced first reply information and the first content is not less than a preset similarity threshold, and the replaced first reply information is output as the second reply information.

[0231] Optionally, obtaining a similarity sequence of keywords in the keyword data according to the first content and the first reply information includes:

[0232] According to the first reply information, obtaining the keyword data including at least one keyword and grammatical analysis data and semantic role labeling data corresponding to the keyword;

[0233] Determining a substitute word for the keyword in the first content according to the grammatical analysis data and the semantic role labeling data corresponding to the keyword;

[0234] According to the keywords and the substitute words, the similarity between the keywords and the substitute words is obtained;

[0235] At least one keyword included in the keyword data is sorted according to the similarity to obtain a similarity sequence.

[0236] Optionally, when the first similarity is lower than a preset similarity threshold, after modifying the first reply information according to the content of the first knowledge base and outputting the second reply information, the method further includes:

[0237] Based on the first reply information and according to a preset template, the third reply information is obtained and output; the third reply information at least includes the content of the first reply information, the difference between the first reply information and the second reply information, and the reason for the difference.

[0238] Example 4

[0239] This embodiment provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement any of the above methods.

[0240] Specifically, Figure 2 As shown, Figure 2This is a structural diagram of a computer device in the present application, and the computer device may include: a processor 101, such as a central processing unit (CPU), a communication bus 102, a user interface 104, a network interface 103, and a memory 105. Among them, the communication bus 102 is used to realize the connection and communication between these components. The user interface 104 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 104 may also include a standard wired interface and a wireless interface. The network interface 103 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 105 may optionally be a storage device independent of the aforementioned processor 101. The memory 105 may be a high-speed random access memory (RAM) memory, or a stable non-volatile memory (NVM), such as at least one disk storage. The processor 101 may be a general-purpose processor, including a central processing unit, a network processor, etc., or may be a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.

[0241] Those skilled in the art will appreciate that Figure 2 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0242] like Figure 2 As shown, the memory 105 as a storage medium may include an operating system, a network communication module, a user interface module, and an application for implementing a knowledge base-based educational AI content generation method.

[0243] exist Figure 2 In the electronic device shown, the network interface 103 is mainly used for data communication with the network server; the user interface 104 is mainly used for data interaction with the user; the processor 101 and the memory 105 in the present application can be set in the electronic device, and the electronic device calls the application stored in the memory 105 for implementing a knowledge base-based educational AI content generation method through the processor 101 to implement the above method.

[0244] Example 5

[0245] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and a processor executes the computer program to implement any of the above methods.

[0246] In some embodiments, the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.

[0247] In the above embodiments of the present disclosure, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

[0249] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0250] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0251] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. According to this understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a non-volatile storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0252] The above are only preferred embodiments of the present disclosure. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as the protection scope of the present disclosure.

Claims

1. A method for generating educational AI content based on a knowledge base, characterized in that: include: According to at least one learning stage, at least one knowledge base matching the learning stage is established, wherein the knowledge base at least stores differentiated teaching data of the corresponding learning stage relative to a later learning stage; Acquire first user information of a first user, and match a first knowledge base for the first user according to the first user information, wherein the first knowledge base matches a learning stage of the first user; In response to receiving a first text sent by a first user, generating a first reply message according to a generative artificial intelligence model; According to the first reply information, obtaining keyword data of the first reply information; According to the keyword data, searching the first knowledge base to obtain first content matching the keyword data in the first knowledge base; Determining, according to the first content, a first similarity between the first content and the first reply information; When the first similarity is not lower than a preset similarity threshold, outputting the first reply information; When the first similarity is lower than a preset similarity threshold, the first reply information is modified according to the content of the first knowledge base, and then the second reply information is output.

2. According to the method for generating educational AI content based on a knowledge base in claim 1, it is characterized in that: The step of establishing at least one knowledge base matching the at least one learning stage comprises: Acquire teaching data of each learning stage, and perform differentiated comparison based on the teaching data of each learning stage to acquire differentiated teaching data, wherein the differentiated teaching data is used to characterize teaching data with differences in different learning stages; According to the differentiated teaching data and the learning stages corresponding to the differentiated teaching data, a knowledge base corresponding to different learning stages is established.

3. The method for generating educational AI content based on a knowledge base according to claim 2, characterized in that: The acquiring first user information of the first user and matching the first user with a first knowledge base according to the first user information includes: Acquire first user information of a first user, and determine a learning stage of the first user according to the first user information; According to the learning stage of the first user, a first knowledge base corresponding to the learning stage of the first user is matched for the first user.

4. The method for generating educational AI content based on a knowledge base according to claim 1, characterized in that: Obtaining keyword data of the first reply information according to the first reply information includes: According to the first reply information, obtaining grammatical analysis data through dependency syntax analysis and / or phrase structure analysis; According to the grammatical analysis data, semantic role labeling is performed on the first reply information to obtain semantic role labeling data; According to the grammatical analysis data and the semantic role labeling data, and according to the first text sent by the first user, keyword data of the first reply information is obtained, and the keyword data includes at least one keyword and the grammatical analysis data and semantic role labeling data corresponding to the keyword.

5. The method for generating educational AI content based on a knowledge base according to claim 1, characterized in that: The determining, according to the first content, a first similarity between the first content and the first reply information includes: Preprocessing the first content and the first reply information according to the first content and the first reply information; According to the preprocessed first content and the first reply information, a first content word vector and a first reply information word vector are obtained through a word embedding model; Based on the first content word vector and the first reply information word vector, the similarity between the first content word vector and the first reply information word vector is calculated as the first similarity.

6. The method for generating educational AI content based on a knowledge base according to claim 5, characterized in that: The step of modifying the first reply information according to the content of the first knowledge base and outputting the second reply information comprises: Obtaining a similarity sequence of keywords in the keyword data according to the first content and the first reply information; According to the similarity sequence, the keywords in the first reply information are replaced with corresponding words in the first content in order of similarity from low to high, until the similarity between the replaced first reply information and the first content is not less than a preset similarity threshold, and the replaced first reply information is output as the second reply information.

7. The method for generating educational AI content based on a knowledge base according to claim 6, characterized in that: The step of obtaining a similarity sequence of keywords in the keyword data according to the first content and the first reply information includes: According to the first reply information, obtaining at least one keyword included in the keyword data and grammatical analysis data and semantic role labeling data corresponding to the keyword; Determining, in the first content, an alternative word for the keyword according to the grammatical analysis data and the semantic role labeling data corresponding to the keyword; According to the keyword and the substitute word, obtaining the similarity between the keyword and the substitute word; According to the similarity, at least one keyword included in the keyword data is sorted to obtain the similarity sequence.

8. The method for generating educational AI content based on a knowledge base according to claim 7, characterized in that: When the first similarity is lower than a preset similarity threshold, after modifying the first reply information according to the content of the first knowledge base and outputting the second reply information, the method further includes: Based on the first reply information and according to a preset template, a third reply information is obtained and output; the third reply information at least includes the content of the first reply information, the difference between the first reply information and the second reply information, and the reason for the difference.

9. An educational AI content generation system based on a knowledge base, characterized in that: Includes a generative AI platform and a content management platform; The content management platform is configured to: According to at least one learning stage, at least one knowledge base matching the learning stage is established, wherein the knowledge base at least stores differentiated teaching data of the corresponding learning stage relative to a later learning stage; Acquire first user information of a first user, and match a first knowledge base for the first user according to the first user information, wherein the first knowledge base matches a learning stage of the first user; In response to receiving a first text sent by a first user, sending the first text to the generative artificial intelligence platform; Obtaining keyword data of the first reply information according to the first reply information sent by the generative artificial intelligence platform in response to the first text; According to the keyword data, searching the first knowledge base to obtain first content matching the keyword data in the first knowledge base; Determining, according to the first content, a first similarity between the first content and the first reply information; When the first similarity is not lower than a preset similarity threshold, outputting the first reply information; When the first similarity is lower than a preset similarity threshold, the first reply information is modified according to the content of the first knowledge base, and second reply information is output; The generative artificial intelligence platform is configured to: The first text sent by the content management platform is received, and the first reply information is generated according to the first text and sent to the content management platform.

10. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 8.