Grammar explanation method and related device

By acquiring the target object and learning stage information input by the user, and using a large language model to generate personalized grammar explanation content, the problem of not considering the differences in users' grammar learning needs in existing technologies is solved, thus improving the quality of grammar learning.

CN121809466APending Publication Date: 2026-04-07HEFEI IFLYTEK TOYCLOUD TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

The existing grammar explanation function fails to take into account the differences in grammar learning needs among different users, making it difficult to guarantee the quality of users' grammar learning.

Method used

By acquiring the target object and learning stage information input by the user, a large language model is used to generate grammar explanation content that matches the user's learning stage information, including grammar explanation prompts and grammar knowledge content. Combined with a preset grammar knowledge base and grammar parsing model, personalized grammar explanations are provided.

Benefits of technology

It enables personalized grammar explanations based on different user needs, thus improving the quality of grammar learning for different users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809466A_ABST
    Figure CN121809466A_ABST
Patent Text Reader

Abstract

The invention discloses a grammar explanation method and a related device, and relates to the technical field of language learning.The grammar explanation method comprises the steps that after a target object which is input by a user and is about to be subjected to grammar explanation is obtained, grammar knowledge content related to the target object and learning segment information of the user are determined firstly; the grammar knowledge content related to the target object and the learning segment information of the user are provided for the large language model, so that the generation result of the large language model can be obtained to serve as the grammar explanation content matched with the learning segment information of the user. By adopting the scheme, the difference of grammar learning requirements of different users can be met, so that the aim of ensuring the grammar learning quality of different users can be fulfilled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of language learning technology, and in particular to a grammar explanation method and related apparatus. Background Technology

[0002] In today's increasingly globalized world, language learning (Chinese, French, Russian, Spanish, Arabic, English, etc.) is of paramount importance for personal development, international exchange, and cultural dissemination. With advancements in science and technology, electronic products (such as learning machines and dictionary pens) have emerged, incorporating language learning systems. These devices allow users to learn languages ​​more conveniently. For instance, with a dictionary pen, a simple scan of the desired object (character, word, sentence, etc.) produces the search results. Compared to traditional paper dictionaries and manually input electronic dictionaries, this method is far more convenient, significantly enhancing the ease of language learning for users.

[0003] Grammar is the set of rules governing the formation and use of words, phrases, and sentences in a language, primarily encompassing morphology and syntax. In language learning, grammar determines the accuracy of expression, helps users quickly grasp language rules, and enhances the systematic nature of comprehension and output. Users have a significant need to learn grammar during the language learning process. Therefore, providing grammatical explanations for user-input queries to facilitate grammar learning is particularly essential.

[0004] Because different users have different levels of knowledge, their needs for grammar learning also vary. However, the existing grammar explanation function does not take into account the differences in grammar learning needs among different users, and provides the same grammar explanation content to all users, thus causing confusion for users' grammar learning.

[0005] Therefore, how to provide a grammar explanation method that meets the different grammar learning needs of different users and thus ensures the quality of grammar learning for different users has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] In view of the above problems, this application provides a grammar explanation method and related apparatus to meet the diverse grammar learning needs of different users, thereby ensuring the quality of grammar learning for different users. The specific solution is as follows:

[0007] The first aspect of this application provides a method for explaining grammar, including:

[0008] Obtain the target object for the syntax explanation input by the user;

[0009] determine the target object related grammar knowledge content and the user's learning stage information;

[0010] provide the target object related grammar knowledge content and the user's learning stage information to a large language model, and obtain a generation result of the large language model as grammar explanation content matched with the user's learning stage information.

[0011] In a possible implementation, the providing the target object related grammar knowledge content and the user's learning stage information to a large language model comprises:

[0012] generating grammar explanation prompt words matched with the user's learning stage information, wherein the grammar explanation prompt words include grammar explanation task description information matched with the user's learning stage information, the target object related grammar knowledge content, and the target object to be explained.

[0013] inputting the grammar explanation prompt words into a large language model.

[0014] In a possible implementation, the grammar explanation task description information matched with the user's learning stage information comprises:

[0015] explanation language style description information, explanation content information, and explanation examples matched with the user's learning stage information, wherein the explanation content information includes grammar knowledge points to be explained and corresponding explanation depth.

[0016] In a possible implementation, after the obtaining the generation result of the large language model as the grammar explanation content matched with the user's learning stage information, the method further comprises:

[0017] displaying the grammar explanation content matched with the user's learning stage information to the user.

[0018] In a possible implementation, the determining the target object related grammar knowledge content comprises:

[0019] querying the target object from a preset grammar knowledge base to obtain a query result, wherein the preset grammar knowledge base at least includes a textbook grammar knowledge base, the textbook grammar knowledge base contains a first pre-stored object and grammar knowledge thereof, and the first pre-stored object is a high-frequency object in a fixed textbook range.

[0020] when the query result indicates that the target object is not queried from the preset grammar knowledge base, performing grammar analysis on the target object by using a grammar analysis model to obtain a generation result of the grammar analysis model as the target object related grammar knowledge content, wherein the grammar analysis model is a large language model with grammar knowledge generation function.

[0021] In a possible implementation, after the target object is queried from the preset grammar knowledge base to obtain a query result, the method further includes:

[0022] When the query result indicates that the target object is queried from the preset grammar knowledge base, grammar knowledge of a pre-stored object matching the target object stored in the preset grammar knowledge base is determined as the grammar knowledge content related to the target object.

[0023] In a possible implementation, the preset grammar knowledge base further includes an artificial expert grammar knowledge base, the artificial expert grammar knowledge base includes a second pre-stored object and grammar knowledge of the second pre-stored object; the second pre-stored object is an object other than a high-frequency object in the fixed teaching material range; and the grammar knowledge of each second pre-stored object is an artificial expert grammar analysis result.

[0024] In a possible implementation, after the target object is analyzed by using the grammar analysis model to obtain a generation result of the grammar analysis model as the grammar knowledge content related to the target object, the method further includes:

[0025] artificially correcting the generation result of the grammar analysis model to generate an artificial expert grammar analysis result;

[0026] obtaining the artificial expert grammar analysis result, and storing the target object and the artificial expert grammar analysis result in the artificial expert grammar knowledge base.

[0027] In a possible implementation, the target object is analyzed by using the grammar analysis model to obtain a generation result of the grammar analysis model as the grammar knowledge content related to the target object, including:

[0028] generating a grammar analysis prompt word; the grammar analysis prompt word includes grammar analysis task description information and the target object to be analyzed by using grammar; and the grammar analysis task description information includes dimensions of grammar knowledge points included in grammar knowledge content;

[0029] inputting the grammar analysis prompt word into the grammar analysis model to obtain the generation result of the grammar analysis model as the grammar knowledge content related to the target object.

[0030] The second aspect of the present application provides a grammar explanation device, including:

[0031] an obtaining unit configured to obtain a target object to be analyzed by using grammar input by a user;

[0032] a determining unit configured to determine grammar knowledge content related to the target object and learning stage information of the user;

[0033] The grammar explanation content generation unit is used to provide the grammar knowledge content related to the target object and the user's learning stage information to the large language model, and obtain the generation result of the large language model as the grammar explanation content matched with the user's learning stage information.

[0034] In one possible implementation, the syntax explanation content generation unit includes:

[0035] The grammar explanation prompt word generation unit is used to generate grammar explanation prompt words that match the user's learning stage information. The grammar explanation prompt words include grammar explanation task description information that matches the user's learning stage information, grammar knowledge content related to the target object, and the target object to be explained in the grammar explanation.

[0036] The input unit is used to input the grammar explanation prompts into the large language model.

[0037] In one possible implementation, the grammar explanation task description information matched with the user's learning stage information includes:

[0038] The explanation language style description information, explanation content information, and explanation examples are matched with the user's academic level information. The explanation content information includes the grammar knowledge points to be explained and the corresponding explanation depth.

[0039] In one possible implementation, the device further includes:

[0040] The display unit is used to display the grammar explanation content that matches the user's learning stage information to the user after the generation result of the large language model is obtained as the grammar explanation content that matches the user's learning stage information.

[0041] In one possible implementation, the determining unit includes:

[0042] The query unit is used to query the target object from a preset grammar knowledge base and obtain query results; the preset grammar knowledge base includes at least a textbook grammar knowledge base, which contains a first pre-stored object and its grammar knowledge; the first pre-stored object is a high-frequency object within a fixed textbook range;

[0043] The syntax parsing unit is used to perform syntax parsing on the target object using a syntax parsing model when the query result indicates that the target object is not found from a preset syntax knowledge base. The generated result of the syntax parsing model is used as the syntax knowledge content related to the target object. The syntax parsing model is a large language model with syntax knowledge generation function.

[0044] In one possible implementation, the determining unit is further configured to:

[0045] When the query result indicates that the target object is found from the preset grammar knowledge base, the grammar knowledge of the pre-stored object that matches the target object stored in the preset grammar knowledge base is determined as the grammar knowledge content related to the target object.

[0046] In one possible implementation, the preset grammar knowledge base also includes a human expert grammar knowledge base, which includes a second pre-stored object and its grammar knowledge; the second pre-stored object is an object other than the high-frequency objects within the scope of the fixed textbook; the grammar knowledge of each second pre-stored object is the result of human expert grammar parsing.

[0047] In one possible implementation, the device further includes:

[0048] The artificial expert grammar knowledge base update unit is used to manually correct the generated result of the grammar parsing model after the target object is parsed using the grammar parsing model and the generated result of the grammar parsing model is obtained as the grammar knowledge content related to the target object, generate artificial expert grammar parsing result; obtain the artificial expert grammar parsing result, and store the target object and the artificial expert grammar parsing result in the artificial expert grammar knowledge base.

[0049] In one possible implementation, the syntax parsing unit is specifically used for:

[0050] Generate syntax parsing prompts; the syntax parsing prompts include syntax parsing task description information and the target object of the syntax to be explained; the syntax parsing task description information includes the dimensions of the syntax knowledge points included in the syntax knowledge content;

[0051] The syntax parsing prompts are input into the syntax parsing model, and the generated results of the syntax parsing model are used as the syntax knowledge content related to the target object.

[0052] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the syntax explanation method of the first aspect or any implementation thereof.

[0053] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0054] The memory is used to store computer programs;

[0055] The processor is used to execute the computer program so that the electronic device can implement the syntax explanation method of the first aspect or any implementation of the first aspect.

[0056] The fifth aspect of this application provides a computer-readable storage medium carrying one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the syntax explanation method of the first aspect or any implementation thereof.

[0057] By employing the above technical solution, this application provides a grammar explanation method and related apparatus. After obtaining the target object for grammar explanation input by the user, it first determines the relevant grammar knowledge content of the target object and the user's learning level information. By providing the relevant grammar knowledge content of the target object and the user's learning level information to a large language model, the generated result of the large language model can be obtained as grammar explanation content matched with the user's learning level information. This solution can meet the diverse grammar learning needs of different users, thereby ensuring the quality of grammar learning for different users. Attached Figure Description

[0058] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0059] Figure 1 A flowchart illustrating a grammar explanation method provided in an embodiment of this application;

[0060] Figure 2 This application provides an embodiment of a diagram illustrating grammar instruction content for elementary school students.

[0061] Figure 3 This application provides an embodiment of a diagram illustrating grammar instruction content for middle school students.

[0062] Figure 4 This is a schematic diagram of the structure of a grammar explanation device provided in an embodiment of this application;

[0063] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0064] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0065] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0066] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0067] In today's increasingly globalized world, language learning (Chinese, French, Russian, Spanish, Arabic, English, etc.) is of paramount importance for personal development, international exchange, and cultural dissemination. With advancements in science and technology, electronic products (such as learning machines and dictionary pens) have emerged, incorporating language learning systems. These devices allow users to learn languages ​​more conveniently. For instance, with a dictionary pen, a simple scan of the desired object (character, word, sentence, etc.) produces the search results. Compared to traditional paper dictionaries and manually input electronic dictionaries, this method is far more convenient, significantly enhancing the ease of language learning for users.

[0068] Grammar is the set of rules governing the formation and use of words, phrases, and sentences in a language, primarily encompassing morphology and syntax. In language learning, grammar determines the accuracy of expression, helps users quickly grasp language rules, and enhances the systematic nature of comprehension and output. Users have a significant need to learn grammar during the language learning process. Therefore, providing grammatical explanations for user-input queries to facilitate grammar learning is particularly essential.

[0069] Because different users have different levels of knowledge, their needs for grammar learning also vary. However, the existing grammar explanation function does not take into account the differences in grammar learning needs among different users, and provides the same grammar explanation content to all users, thus causing confusion for users' grammar learning.

[0070] To address the aforementioned issues, this application provides a grammar explanation method that can meet the diverse grammar learning needs of different users, thereby ensuring the quality of grammar learning for different users.

[0071] It should be noted that in this application, the grammar explanation can be in any language, including but not limited to Chinese, French, Russian, Spanish, Arabic, English, etc. There are no strict limitations in this application, and the specific details can be set according to the needs of the scenario.

[0072] To facilitate understanding, this application uses English as an example to explain the grammar explanation scheme in detail.

[0073] It should also be noted that the grammar explanation method of this application can be applied to electronic devices or servers with grammar explanation functions, such as mobile phones, tablets (e.g., learning machines), and scanning and recognition devices (e.g., dictionary pens). This application does not impose any restrictions on the specific type of electronic device.

[0074] The syntax explanation method of the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0075] Reference Figure 1 , Figure 1 This is a flowchart illustrating a syntax explanation method provided in an embodiment of this application, such as... Figure 1 As shown in the embodiments of this application, a grammar explanation method may include the following steps, which are described in detail below.

[0076] S101: Obtain the target object for the syntax explanation to be input by the user;

[0077] In this application, the target object for grammar explanation refers to the content of grammar knowledge that needs to be explained, input by the user. The target object can be obtained by scanning, taking a picture, or typing, etc. The specific input method is not strictly limited in this application and can be set according to the needs of the scenario.

[0078] In this application, the target object for grammar explanation can be a phrase, word, sentence, etc., and this application does not impose any limitations on it. Preferably, the target object for grammar explanation can be a sentence, such as the English sentence "Tomwalks to school every morning."

[0079] S102: Determine the grammatical knowledge content related to the target object and the user's academic level information;

[0080] In this application, the grammatical knowledge related to the target object is obtained by parsing the target object.

[0081] In this application, the user's educational stage information is used to determine the user's current educational stage, such as high school, junior high school, or primary school. Alternatively, the user's educational stage information can be used to determine which grade in junior high school (e.g., first year, second year, or third year) or which grade in high school. This application does not strictly limit this, and it can be set according to the specific needs of the scenario.

[0082] In this application, the user's educational stage information can be the user's age or educational level. This information can be entered by the user into an electronic device. This is not strictly limited in this embodiment and can be set according to the specific needs of the scenario. For example, if the electronic device is a dictionary pen, the pen can prompt the user to input or verify the accuracy of their educational stage information upon first use or each time the user uses it. Alternatively, the dictionary pen can prompt the user to verify the accuracy of their educational stage information at preset intervals. This is also not strictly limited in this embodiment and can be set according to the specific needs of the scenario.

[0083] S103: Provide the grammatical knowledge content related to the target object and the user's learning stage information to the large language model, and obtain the generation result of the large language model as the grammatical explanation content matched with the user's learning stage information.

[0084] In this application, the large language model has the ability to generate grammar explanation content that matches the user's learning stage information based on grammar knowledge related to the target object. In this application, the large language model can be any general-purpose large language model, or it can be a large language model that has been fine-tuned to acquire the ability to generate grammar explanation content that matches the user's learning stage information based on grammar knowledge related to the target object. This application does not impose any limitations on this aspect.

[0085] The grammar explanation method provided in this embodiment, after obtaining the target object of the grammar explanation input by the user, first determines the relevant grammar knowledge content of the target object and the user's learning level information. By providing the relevant grammar knowledge content of the target object and the user's learning level information to a large language model, the generated result of the large language model can be obtained as the grammar explanation content matched with the user's learning level information. This approach can meet the diverse grammar learning needs of different users, thereby ensuring the quality of grammar learning for different users.

[0086] In one possible implementation, providing the target object's related grammatical knowledge and the user's educational level information to the large language model includes:

[0087] S201: Generate grammar explanation prompts that match the user's learning stage information. The grammar explanation prompts include grammar explanation task description information that matches the user's learning stage information, grammar knowledge content related to the target object, and the target object to be explained in the grammar explanation.

[0088] In one possible implementation of this application, generating grammar explanation prompts that match the user's learning stage information includes:

[0089] Obtain a grammar explanation prompt word template that matches the user's learning stage information. The grammar explanation prompt word template that matches the user's learning stage information includes grammar explanation task description information that matches the user's learning stage information, grammar knowledge content filling slots, and grammar explanation object filling slots.

[0090] The target object to be explained is filled into the grammar explanation object filling slot, and the grammar knowledge content related to the target object is filled into the grammar knowledge content filling slot, generating grammar explanation prompt words corresponding to the user's learning stage information.

[0091] In one possible implementation, the grammar explanation task description information matched with the user's learning stage information includes:

[0092] The explanation language style description information, explanation content information, and explanation examples are matched with the user's academic level information. The explanation content information includes the grammar knowledge points to be explained and the corresponding explanation depth.

[0093] In this application, the grammatical knowledge content related to the target object includes grammatical knowledge points in multiple dimensions.

[0094] Taking English sentences as the target object as an example, the related grammatical knowledge includes, but is not limited to, nine dimensions: core sentence patterns, sentence tenses, common expressions, real-life examples, sentence types, sentence structure, sentence components, key points and difficulties, and contextual usage. Among these:

[0095] The core sentence structure dimension refers to the basic framework of English, which includes five types: subject-verb, subject-verb-object, subject-linking verb-complement, subject-verb-double object, and subject-verb-object-complement. These are the basic templates for constructing all sentences.

[0096] The tense dimension of a sentence refers to the time and state in which an action occurs. It has four main categories: general, progressive, perfect, and perfect progressive, which, combined with past, present, and future, form 16 commonly used tenses.

[0097] The commonly used expression dimensions refer to frequently used fixed collocations or sentence patterns in daily life, such as greetings, requests, and suggestions (e.g., "Could you...?" "It's important to..."), which are directly adapted to daily communication scenarios.

[0098] The "real-life examples" dimension refers to specific scenario sentences that put grammatical knowledge points into practice. For example, using "I'm cooking dinner" (present continuous tense) to demonstrate tense usage makes the grammar easier to understand.

[0099] The sentence type dimension refers to the division by function, including four categories: declarative sentences (expressing facts), interrogative sentences (expressing questions), imperative sentences (expressing commands), and exclamatory sentences (expressing emotions), to adapt to different communication needs.

[0100] The sentence structure dimension is divided according to the way the components are combined, into three categories: simple sentences (single subject and predicate), coordinate sentences (multiple simple sentences connected by conjunctions), and complex sentences (including main clause + subordinate clause).

[0101] The sentence component dimension refers to the basic elements that constitute a sentence, including subject, predicate, object, complement, attributive, adverbial, complement, and appositive, clarifying the role of each part in the sentence.

[0102] The key and difficult points mentioned refer to the core difficulties in grammar learning, such as tense distinction (present perfect tense vs. simple past tense), the usage of non-finite verbs, and the selection of relative pronouns in relative clauses.

[0103] The contextual usage dimension refers to adjusting grammatical usage according to the scenario (formal / informal, spoken / written), such as using "Therefore" in written language and "So" in spoken language, to make the expression more appropriate to the context.

[0104] In this application, the description information for the grammar explanation task differs depending on the learning stage.

[0105] For ease of understanding, assuming the target object is an English sentence and the user's educational level is primary school, the following is an example of the grammar explanation task description information matching the user's educational level:

[0106] You are currently a gentle, patient, and engaging elementary school English teacher, teaching English grammar to students in grades 3-6. You must fully meet the following requirements:

[0107] 1. Language style: Conversational and easy to understand, using short sentences and vocabulary familiar to children, avoiding technical terms; the tone should be friendly and enthusiastic, with a slight sense of encouragement (such as "Kids, remember this~" "Let's give it a try!").

[0108] 2. Content to be explained:

[0109] Core sentence structure: Use the simple logic of "who + what + where / when" to break down sentences and annotate the Chinese meaning of the core words (e.g., "walks means 'walking'").

[0110] Sentence tense: Use everyday metaphors to explain tense (e.g., the simple present tense "describes things we do every day or often, like eating and going to school every day");

[0111] Common expressions: Extract replaceable core phrases from sentences (such as "walks to + place", for example "walks to the park" or "walks to grandma's home").

[0112] Real-life examples: Create 2-3 simple replacement sentences based on elementary school students' daily lives (going to school, playing, family life) (e.g., "Lily walks to the zoo every weekend.").

[0113] 3. Example of explanation: ×××.

[0114] For ease of understanding, assuming the target object is an English sentence and the user's educational level is middle school, the following is an example of the grammar explanation task description information matching the user's educational level:

[0115] You are currently a professional, rigorous, and logically sound middle school English teacher, responsible for explaining English grammar to junior high / high school students. You must fully meet the following requirements:

[0116] 1. Language style: concise and standard, using accurate grammatical terminology, with a calm and professional tone, emphasizing the systematization of knowledge and practicality for exams (such as "high-frequency test points in the high school entrance examination" and "common writing structures").

[0117] 2. Content to be explained:

[0118] Sentence type: Specify the sentence type (e.g., "Subject-Verb-Adverbial Sentence Structure (SVO + Adverbial)").

[0119] Sentence type: Identify the sentence type (e.g., declarative sentence);

[0120] Sentence structure: Break down the main clause (subject Tom + verb walks) and the modifying elements (adverbial phrase to school / every morning);

[0121] Sentence tense: Explain the tense name (simple present tense), core definition (indicating habitual or recurring actions or objective facts), and structural rules (when the subject is third-person singular, the verb adds s / es);

[0122] Sentence components: Mark the grammatical components of each part (subject, predicate, adverbial of place, adverbial of time), and explain the function of each component;

[0123] Key points and difficulties: Point out common mistakes (such as the rules for changing third-person singular verbs and the collocation of time adverbs), and supplement exceptions (such as "have" becoming "has" and "do" becoming "does").

[0124] Contextual Application: Create three extended sentences in different contexts related to middle school students (campus, social, and learning) (e.g., "Our teacher explains grammar carefully every class." "They walk to the library after school.").

[0125] 3. Example of explanation: ×××.

[0126] S202: Input the grammar explanation prompts into the large language model.

[0127] In this application, inputting the grammar explanation prompts into the large language model will provide the target object's grammar knowledge and the user's learning stage information to the large language model.

[0128] In one possible implementation, after obtaining the generated result of the large language model as grammar explanation content matched with the user's learning stage information, the method further includes:

[0129] The grammar explanation content that matches the user's academic level information is displayed to the user.

[0130] In this application, there are no strict limitations on the display method; it can be displayed in plain text, plain voice, text + voice, text + audio + video, etc.

[0131] For ease of understanding, let's assume the target audience is the English sentence "Tom walks to school every morning." If the user is a primary school student, the grammar explanation would be displayed as follows: Figure 2 As shown, if the user is a middle school student, the grammar explanation content will be displayed as follows: Figure 3 As shown.

[0132] In one possible implementation, determining the syntactic knowledge content related to the target object includes:

[0133] S301: Query the target object from the preset grammar knowledge base to obtain the query result; the preset grammar knowledge base includes at least the textbook grammar knowledge base, which contains a first pre-stored object and its grammar knowledge; the first pre-stored object is a high-frequency object within a fixed textbook range;

[0134] In this application, the scope of fixed teaching materials can be the scope of teaching materials corresponding to instruction or the scope of teaching materials corresponding to language examinations, such as primary and secondary school English textbooks or the scope of teaching materials corresponding to English major examinations.

[0135] In this application, the first pre-stored object is a high-frequency object within a fixed textbook range, such as high-frequency sentences in primary school English textbooks. The grammatical knowledge of the first pre-stored object is obtained by human experts parsing the first pre-stored object, and therefore has high reliability.

[0136] In this application, querying the target object from a preset grammar knowledge base can be a query to determine whether there is a pre-stored object in the preset grammar knowledge base that matches the target object. Specifically, the matching similarity between the target object and each pre-stored object in the preset grammar knowledge base can be calculated. If the matching similarity between a pre-stored object in the grammar knowledge base and the target object meets a threshold, it is determined that there is a pre-stored object in the preset grammar knowledge base that matches the target object, that is, it is determined that the target object has been found from the preset grammar knowledge base. If the matching similarity between each pre-stored object in the grammar knowledge base and the target object does not meet the threshold, it is determined that there is no pre-stored object in the preset grammar knowledge base that matches the target object, that is, it is determined that the target object has not been found from the preset grammar knowledge base.

[0137] S302: When the query result indicates that the target object is not found from the preset grammar knowledge base, the target object is parsed using a grammar parsing model to obtain the generated result of the grammar parsing model as the grammar knowledge content related to the target object. The grammar parsing model is a large language model with grammar knowledge generation function.

[0138] In this application, the syntax parsing model can be any general-purpose large language model, or it can be a large language model that has been fine-tuned to acquire the function of generating grammatical knowledge. In this application, no limitation is made.

[0139] In one possible implementation, after querying the target object from a preset grammar knowledge base and obtaining the query result, the method further includes:

[0140] When the query result indicates that the target object is found from the preset grammar knowledge base, the grammar knowledge of the pre-stored object that matches the target object stored in the preset grammar knowledge base is determined as the grammar knowledge content related to the target object.

[0141] In one possible implementation, the preset grammar knowledge base also includes a human expert grammar knowledge base, which includes a second pre-stored object and its grammar knowledge; the second pre-stored object is an object other than the high-frequency objects within the scope of the fixed textbook; the grammar knowledge of each second pre-stored object is the result of human expert grammar parsing.

[0142] After performing syntactic parsing on the target object using the syntactic parsing model to obtain the generated result of the syntactic parsing model as the syntactic knowledge content related to the target object, the method further includes:

[0143] The generated results of the syntax parsing model are manually corrected to generate human expert syntax parsing results; the human expert syntax parsing results are obtained, and the target object and the human expert syntax parsing results are stored in the human expert syntax knowledge base.

[0144] In this application, the generated results of the syntax parsing model can be input into a human expert intervention interface, allowing human experts to manually correct the generated results and generate human expert syntax parsing results. After storing the target object and the human expert syntax parsing results in the human expert syntax knowledge base, the target object can be used as a second pre-stored object, and the human expert syntax knowledge base can store the target object and its syntax knowledge content. If other users also need syntax explanations for the target object, they can quickly obtain the relevant syntax knowledge content of the target object by querying the preset syntax knowledge base, further improving the acquisition efficiency while ensuring reliability.

[0145] In one possible implementation, the step of using a syntax parsing model to parse the target object and obtaining the generated result of the syntax parsing model as the syntax knowledge content related to the target object includes:

[0146] Generate syntax parsing prompts; the syntax parsing prompts include syntax parsing task description information and the target object to be explained; the syntax parsing task description information includes the dimensions of syntax knowledge points included in the syntax knowledge content; input the syntax parsing prompts into the syntax parsing model, and obtain the generation result of the syntax parsing model as the syntax knowledge content related to the target object.

[0147] In one possible implementation, generating syntax hints includes obtaining a syntax hint template, the syntax hint template including syntax parsing task description information and syntax parsing object filling slots, filling the target object to be explained into the syntax parsing object filling slots, and generating corresponding syntax hints.

[0148] The specific content of the syntax parsing task description information in this application can be set based on the scenario requirements, and no restrictions are imposed in this application.

[0149] The above describes a syntax explanation method provided by the embodiments of this application. The following will describe the apparatus for performing the above syntax explanation method.

[0150] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a grammar explanation device provided in an embodiment of this application. Figure 4 As shown, the grammar explanation device includes:

[0151] Acquisition unit 11 is used to acquire the target object of the syntax explanation to be input by the user;

[0152] Determining unit 12 is used to determine the grammatical knowledge content related to the target object and the user's academic level information;

[0153] The grammar explanation content generation unit 13 is used to provide the grammar knowledge content related to the target object and the user's learning stage information to the big language model, and obtain the generation result of the big language model as the grammar explanation content matched with the user's learning stage information.

[0154] In one possible implementation, the syntax explanation content generation unit includes:

[0155] The grammar explanation prompt word generation unit is used to generate grammar explanation prompt words that match the user's learning stage information. The grammar explanation prompt words include grammar explanation task description information that matches the user's learning stage information, grammar knowledge content related to the target object, and the target object to be explained in the grammar explanation.

[0156] The input unit is used to input the grammar explanation prompts into the large language model.

[0157] In one possible implementation, the grammar explanation task description information matched with the user's learning stage information includes:

[0158] The explanation language style description information, explanation content information, and explanation examples are matched with the user's academic level information. The explanation content information includes the grammar knowledge points to be explained and the corresponding explanation depth.

[0159] In one possible implementation, the device further includes:

[0160] The display unit is used to display the grammar explanation content that matches the user's learning stage information to the user after the generation result of the large language model is obtained as the grammar explanation content that matches the user's learning stage information.

[0161] In one possible implementation, the determining unit includes:

[0162] The query unit is used to query the target object from a preset grammar knowledge base and obtain query results; the preset grammar knowledge base includes at least a textbook grammar knowledge base, which contains a first pre-stored object and its grammar knowledge; the first pre-stored object is a high-frequency object within a fixed textbook range;

[0163] The syntax parsing unit is used to perform syntax parsing on the target object using a syntax parsing model when the query result indicates that the target object is not found from a preset syntax knowledge base. The generated result of the syntax parsing model is used as the syntax knowledge content related to the target object. The syntax parsing model is a large language model with syntax knowledge generation function.

[0164] In one possible implementation, the determining unit is further configured to:

[0165] When the query result indicates that the target object is found from the preset grammar knowledge base, the grammar knowledge of the pre-stored object that matches the target object stored in the preset grammar knowledge base is determined as the grammar knowledge content related to the target object.

[0166] In one possible implementation, the preset grammar knowledge base also includes a human expert grammar knowledge base, which includes a second pre-stored object and its grammar knowledge; the second pre-stored object is an object other than the high-frequency objects within the scope of the fixed textbook; the grammar knowledge of each second pre-stored object is the result of human expert grammar parsing.

[0167] In one possible implementation, the device further includes:

[0168] The artificial expert grammar knowledge base update unit is used to manually correct the generated result of the grammar parsing model after the target object is parsed using the grammar parsing model and the generated result of the grammar parsing model is obtained as the grammar knowledge content related to the target object, generate artificial expert grammar parsing result; obtain the artificial expert grammar parsing result, and store the target object and the artificial expert grammar parsing result in the artificial expert grammar knowledge base.

[0169] In one possible implementation, the syntax parsing unit is specifically used for:

[0170] Generate syntax parsing prompts; the syntax parsing prompts include syntax parsing task description information and the target object of the syntax to be explained; the syntax parsing task description information includes the dimensions of the syntax knowledge points included in the syntax knowledge content;

[0171] The syntax parsing prompts are input into the syntax parsing model, and the generated results of the syntax parsing model are used as the syntax knowledge content related to the target object.

[0172] Each unit in the aforementioned grammar explanation device can be implemented entirely or partially through software, hardware, or a combination thereof. These units can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the operations corresponding to each unit.

[0173] This application also provides an electronic device in its embodiments. (See reference...) Figure 5 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0174] like Figure 5 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0175] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0176] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the syntax explanation methods provided in this application.

[0177] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the syntax explanation methods provided in this application.

[0178] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0179] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0180] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0181] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A method for explaining grammar, characterized in that, include: Obtain the target object for the syntax explanation input by the user; Determine the grammatical knowledge content related to the target object and the user's academic level information; The grammatical knowledge related to the target object and the user's learning stage information are provided to the large language model, and the generated result of the large language model is used as the grammatical explanation content matched with the user's learning stage information.

2. The method according to claim 1, characterized in that, The step of providing the target object's grammatical knowledge and the user's educational level information to the large language model includes: Generate grammar explanation prompts that match the user's learning stage information. The grammar explanation prompts include grammar explanation task description information that matches the user's learning stage information, grammar knowledge content related to the target object, and the target object to be explained in the grammar explanation. Input the grammar explanation prompts into the large language model.

3. The method according to claim 2, characterized in that, The grammar explanation task description information matched with the user's learning stage information includes: The explanation language style description information, explanation content information, and explanation examples are matched with the user's academic level information. The explanation content information includes the grammar knowledge points to be explained and the corresponding explanation depth.

4. The method according to claim 1, characterized in that, After obtaining the generated result of the large language model as grammar explanation content matched with the user's learning stage information, the method further includes: The grammar explanation content that matches the user's academic level information is displayed to the user.

5. The method according to any one of claims 1 to 4, characterized in that, The determination of the grammatical knowledge content related to the target object includes: The target object is queried from a preset grammar knowledge base to obtain query results; the preset grammar knowledge base includes at least a textbook grammar knowledge base, which contains a first pre-stored object and its grammar knowledge; the first pre-stored object is a high-frequency object within a fixed textbook range; When the query result indicates that the target object is not found from the preset grammar knowledge base, the grammar parsing model is used to parse the target object, and the generated result of the grammar parsing model is used as the grammar knowledge content related to the target object. The grammar parsing model is a large language model with grammar knowledge generation function.

6. The method according to claim 5, characterized in that, After querying the target object from the preset syntax knowledge base and obtaining the query results, the method further includes: When the query result indicates that the target object is found from the preset grammar knowledge base, the grammar knowledge of the pre-stored object that matches the target object stored in the preset grammar knowledge base is determined as the grammar knowledge content related to the target object.

7. The method according to claim 5, characterized in that, The preset grammar knowledge base also includes a human expert grammar knowledge base, which includes a second pre-stored object and its grammar knowledge; the second pre-stored object is an object other than the high-frequency objects within the scope of the fixed teaching materials; the grammar knowledge of each second pre-stored object is the result of human expert grammar parsing.

8. The method according to claim 5, characterized in that, After performing syntactic parsing on the target object using a syntactic parsing model to obtain the generated result of the syntactic parsing model as the syntactic knowledge content related to the target object, the method further includes: The generated results of the syntax parsing model are manually corrected to generate human expert syntax parsing results; Obtain the results of the human expert grammar analysis, and store the target object and the results of the human expert grammar analysis into the human expert grammar knowledge base.

9. The method according to claim 5, characterized in that, The step of using a syntax parsing model to parse the target object, and obtaining the generated result of the syntax parsing model as the syntax knowledge content related to the target object, includes: Generate syntax parsing prompts; the syntax parsing prompts include syntax parsing task description information and the target object of the syntax to be explained; the syntax parsing task description information includes the dimensions of the syntax knowledge points included in the syntax knowledge content; The syntax parsing prompts are input into the syntax parsing model, and the generated results of the syntax parsing model are used as the syntax knowledge content related to the target object.

10. A computer program product, characterized in that, Includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the syntax explanation method as described in any one of claims 1 to 9.

11. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the syntax explanation method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the syntax explanation method as described in any one of claims 1 to 9.