English conversion type teaching method and system

By introducing nonlinear position coding technology, directional selection mechanism, cone index optimization mechanism and Levy flight strategy optimization algorithm, the BERT model is optimized, and the traditional English conversion teaching method is solved in terms of translation accuracy and fluency, and more efficient and accurate translation training is achieved.

CN120106092APending Publication Date: 2025-06-06上海贵之恒教育科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510231102.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

Traditional English conversion teaching methods have shortcomings in translation accuracy, fluency and context adaptability, especially in applications in complex cases and professional fields, and it is difficult to ensure the quality and efficiency of translation.

Method used

Nonlinear position coding technology, directional selection mechanism and cone index optimization mechanism are adopted, combined with Levy flight strategy optimization algorithm, the BERT model is optimized to improve translation accuracy and fluency.

Benefits of technology

It significantly improves learners' translation ability and language comprehension, improves the accuracy and fluency of translation, and provides more efficient translation training and feedback, especially when dealing with complex grammars and professional terms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120106092A_ABST
    Figure CN120106092A_ABST
Patent Text Reader

Abstract

The invention provides an English conversion type teaching method and system, and aims to improve the translation ability of a learner. According to the system, a traditional translation training process is optimized by introducing a nonlinear position coding technology, a directional selection mechanism, a cone index optimization mechanism and a Levy flight strategy optimization algorithm; the understanding of the system on a word order and a syntactic structure is enhanced by a non-linear position coding technology, and the translation precision is improved; a directional selection mechanism helps a learner to accurately identify key parts of a text, and translation accuracy is ensured; a cone index optimization mechanism improves the ability of the system to process long sentences and complex structures, and helps learners to master translation skills; according to the Levy flight strategy optimization algorithm, hyper-parameters are optimized, a local optimal solution is avoided, and accurate feedback is provided; through the combination of the technologies, efficient translation training can be provided, and learners are helped to continuously improve the translation ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to an English conversion teaching method and system. Background Art

[0002] With the development of science and technology, although the application of traditional English transformational teaching methods in language learning has made certain progress, there are still many shortcomings; first, for learners, the limitation of traditional methods lies in their low sensitivity to context, language context and professional terms, which easily leads to insufficient translation accuracy, especially in the application of complex cases, which often lacks sufficient accuracy and fluency; secondly, the disadvantage of traditional methods is that they ignore the adaptability of language models to specific fields, especially the lack of flexibility in handling professional fields and specific expressions; finally, traditional methods have poor processing capabilities for context-sensitive issues such as synonym replacement and polysemous word recognition, which makes it difficult to ensure the quality of translation, and the translation accuracy and efficiency are low, which affects the learning effect; therefore, there is an urgent need for a new English transformational teaching method and system to improve learners' translation ability and language comprehension level. Summary of the invention

[0003] The present invention provides an English transformation teaching method, which solves the great limitations of the accuracy, fluency and context adaptability of translation in traditional methods. In order to solve these problems, the present invention proposes a new English transformation teaching method, which introduces nonlinear position coding technology in the teaching process, improves the system's understanding of the word order and syntactic structure of the text, thereby improving the translation accuracy and enhancing the learner's grammatical sensitivity; at the same time, the directional selection mechanism helps learners to accurately identify the key parts in the text to ensure the accuracy of the translation; the cone index optimization mechanism enhances the system's ability to process long sentences and complex grammatical structures, can effectively capture long-distance dependencies, and help learners better master the translation skills of complex sentences; in addition, the Levy flight strategy optimization algorithm optimizes hyperparameters, avoids local optimal solutions, and enables the system to adjust more efficiently and provide accurate feedback; the combination of these technologies enables the teaching method of the present invention to provide learners with more accurate and efficient translation training, especially when dealing with complex grammar and professional terms, significantly improves the translation ability, and helps learners continuously improve their translation skills in practical applications.

[0004] The present invention also provides an English conversion teaching system, which includes an input module, a preprocessing module, a language model module, a translation module and a teaching module; the system collects and preprocesses a data set through the input module and the preprocessing module; then, in the language model module, an enhanced version of the BERT model is used to construct and train the data set, thereby generating a high-quality English translation text; then, error feedback, interactive learning and adaptive teaching are implemented through the teaching module to help learners correct errors in a timely manner and improve their translation ability.

[0005] The present invention provides an English transformation teaching method, which specifically comprises the following steps:

[0006] Step S1: Data collection: Combine the Chinese-English parallel corpus, the Chinese-English translation data of news websites, the legal document translation data and the medical literature translation data to form a Chinese-English conversion corpus;

[0007] Step S2: Data preprocessing: Perform data cleaning, quality control, data segmentation, sentence alignment and data enhancement on the Chinese-English conversion corpus to generate a preprocessed Chinese-English conversion corpus, save the Chinese-English conversion corpus as TFRecord format data, and obtain a TFRecord dataset; data cleaning includes removing redundant and erroneous data, sentence alignment and duplicate data deletion; data segmentation includes English tokenization and subword decomposition through byte pair encoding; sentence alignment includes length-based alignment and syntax-based alignment; data enhancement includes synonym replacement and back translation;

[0008] Step S3: Generate initial model: Establish BERT model, optimize BERT model through nonlinear positional encoding enhancement technology and enhanced multi-head self-attention mechanism, build enhanced BERT model, initialize hyperparameters of enhanced BERT model, input TFRecord data set into enhanced BERT model for training, and obtain initial enhanced BERT model;

[0009] Step S4: Optimize hyperparameters: Introduce the Levy flight strategy to optimize the local search capability of the Shabao optimization algorithm, construct the Levy-Shabao optimization algorithm, optimize the hyperparameters of the enhanced BERT model through the Levy-Shabao optimization algorithm, obtain the optimal hyperparameter combination, apply the optimal hyperparameter combination to the enhanced BERT model, retrain the initial enhanced BERT model, and obtain the complete enhanced BERT model;

[0010] Step S5: Generate translation: Use the complete enhanced BERT model to convert Chinese input into high-quality English translation text to achieve the transformation and improvement of language comprehension capabilities.

[0011] Furthermore, the TFRecord dataset is input into the enhanced BERT model for training to obtain the initial enhanced BERT model, which specifically includes the following:

[0012] Step S31: Calculate the positional encoding of the TFRecord dataset, add the positional encoding of each word in the TFRecord dataset to the embedding vector, and convert the text in the TFRecord dataset into a high-dimensional vector representation;

[0013] Step S32: Introduce directional selection and cone index optimization multi-head self-attention mechanism to construct an enhanced multi-head self-attention mechanism; input the high-dimensional vector representation into the enhanced multi-head self-attention mechanism to generate multi-head attention mapping data. The formula used is as follows:

[0014] Directionality selection formula:

[0015] ;

[0016] in, represents the query matrix after selection, represents the query matrix, represents the directional weight matrix of the query matrix;

[0017] ;

[0018] in, represents the key matrix after selection, represents the key matrix, represents the directional weight matrix of the bond matrix;

[0019] Cone index weight generation formula:

[0020] ;

[0021] in, represents the cone index weight, represents the activation function, express and The similarity measure of represents the dimension of the key vector, represents the scaling factor, represents an adjustable hyperparameter that controls the effect of the level adjustment factor on the cone index. Indicates the current level;

[0022] Enhanced multi-head self-attention mechanism formula:

[0023] ;

[0024] in, express The transpose of represents the value matrix, represents element-wise multiplication, represents the normalization function;

[0025] Step S33: performing layer normalization processing on the multi-head attention mapping data to generate layer normalized feature data;

[0026] Step S34: normalizing the feature data through the output layer processing layer to generate the target language text;

[0027] Step S35: Iterate step S32-step S33 to obtain the initial enhanced BERT model.

[0028] Furthermore, the step S31 specifically includes the following contents:

[0029] Step S311: Combine the sine function and the tanh activation function to calculate the position encoding even dimensions in the TFRecord data set. The formula used is as follows:

[0030] ;

[0031] in, represents the positional encoding index, Represents the position index of the word in the TFRecord dataset, Indicates location Previous The coded value of the dimension; represents the embedding dimension of the enhanced BERT model, which is set to 768; Indicates the calculation of position encoding even dimensions The frequency control factor is Indicates the calculation of position encoding odd dimensions Frequency control factor of represents the sine function, represents the hyperbolic tangent function;

[0032] Step S312: Combine the cosine function and the sigmoid activation function to calculate the position encoding odd dimensions in the TFRecord data set. The formula used is as follows:

[0033] ;

[0034] in, Indicates location Previous The coded value of the dimension, represents the cosine function, Represents the sigmoid activation function;

[0035] Step S313: combining the position code even dimension and the position code odd dimension to obtain a complete position code;

[0036] Step S314: Add the full position encoding to the embedding vector to convert the text in the TFRecord dataset into a 768-dimensional high-dimensional vector representation.

[0037] Furthermore, step S4 specifically includes the following contents:

[0038] Step S41: define a search space, randomly initialize a population of sand abalones in the search space, and the position of the sand abalone population in the sand abalone population represents a set of hyperparameter combinations of an enhanced version of the BERT model;

[0039] Step S42: Calculate the fitness value of each individual of the sand abalone population, sort the fitness values, and generate the current leading sand abalone position and the current optimal sand abalone position;

[0040] Step S43: Update the current leading sand abalone position according to the current optimal sand abalone position combined with the leading sand abalone position update formula to generate an updated leading sand abalone position. The following sand abalone position is updated based on the change of the updated leading sand abalone position. The formula used is as follows:

[0041] ;

[0042] in, represents the location index of the sand abalone population, represents the iteration index, Indicates Abalone The position of the round iteration, Indicates Abalone The position of the round iteration, represents the current optimal sand abalone position, represents the exploration factor, represents the development factor;

[0043] Step S44: Introduce the Levy flight strategy, update according to the distance between the updated leading sand abalone position and the current optimal sand abalone position, enhance the local search capability, avoid falling into the local optimal solution, and generate the Levy flight sand abalone position. The formula used is as follows:

[0044] Levy flight calculation formula:

[0045] ;

[0046] in, represents the enhancement factor in the Levy flight strategy, Represents the parameters that control Levy's flight behavior and affect the randomness of flight; It represents the constant that adjusts the Levy flight step size. represents the Gamma function, which is used to calculate the amplitude of Levy flight; represents the scale factor that controls the random amplitude of Levy flight; and Represents a random number in the interval [0, 1]; represents the standard deviation of Levy flight;

[0047] , ;

[0048] in, represents the position dimension index of the sand abalone, Indicates In the round iteration Abalone The updated position in the dimension, Indicates In the round iteration Abalone Current position in dimensions; The coefficient that controls the influence of the current position on the updated position; Indicates The current optimal sand abalone position during round iteration; Indicates The fitness value of a sand abalone is Represents the global optimal fitness value;

[0049] Step S45: performing a boundary check on the Levy flying sand abalone position to ensure that it is within the search space and generating a sand abalone position after the boundary check;

[0050] Step S46: Set the maximum number of iterations, iterate steps S42 to S45 until the maximum number of iterations is reached, and generate the optimal sand abalone position, that is, the optimal hyperparameter combination.

[0051] The present invention also provides an English conversion teaching system for implementing the above method, characterized in that: the system includes an input module, a preprocessing module, a language model module, a translation module and a teaching module; the input module collects a Chinese-English conversion corpus and transmits it to the preprocessing module, the preprocessing module preprocesses the Chinese-English conversion corpus, generates a TFRecord data set and transmits it to the language model module, the language model module trains an enhanced BERT model according to the TFRecord data set to obtain a complete enhanced BERT model, the teaching module is connected to the language model module, and provides error feedback, interactive learning and adaptive teaching through the complete enhanced BERT model, so as to help students correct errors in time during the learning process and gradually improve their translation ability.

[0052] By adopting the above scheme, the beneficial effects achieved by the present invention are as follows:

[0053] The present invention provides an English conversion teaching method and system, which optimizes the traditional teaching method and significantly improves the learner's translation ability by introducing nonlinear position coding technology, directional selection mechanism and cone index optimization mechanism; the nonlinear position coding technology helps the system to more accurately understand the word order and syntactic structure in the text, thereby improving the learner's understanding of complex sentence structure in teaching, enabling the learner to better grasp the long-distance dependency relationship in the language, and further improving the fluency and accuracy of translation; the directional selection mechanism guides the learner to accurately identify and translate the key parts of the text during the translation process, helping the learner to accurately translate professional terms and important information, and ensuring the high accuracy of the translation content; the cone index optimization mechanism further enhances the system's ability to process complex sentences and long sentences, helping the learner to better grasp the overall semantic relationship of the text during the translation process, and improving the naturalness and fluency of the translation; the combination of these technologies enables the teaching system to better adapt to translation tasks of different difficulty levels and provide efficient translation training;

[0054] The Levy flight strategy optimization algorithm provides key support for the English transformation teaching method in the present invention. Through the Levy flight strategy, the system can avoid falling into the local optimal solution and flexibly adjust the parameters of the model in different learning situations to ensure that the translation task can be completed efficiently and accurately. In the teaching process, the Levy flight strategy enables learners to obtain more accurate translation guidance through a continuously optimized feedback mechanism, avoid common translation errors, and thus continuously improve translation skills in practice. Through this strategy, the system can provide personalized learning paths and feedback to help learners gradually improve their translation level in the translation of complex cases.

[0055] Through the combination of the above technologies, the English transformation teaching method and system of the present invention not only improves the accuracy and fluency of translation, but also effectively promotes the improvement of learners' translation ability; nonlinear position coding technology, directional selection mechanism, cone index optimization mechanism and Levy flight strategy optimization algorithm complement each other, providing accurate translation results and efficient learning paths, thereby achieving a higher level of language learning and application. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 A schematic diagram of a flow chart of an English transformation teaching method proposed by the present invention;

[0057] Figure 2 This is a flow chart of the Levy-Shabao optimization algorithm proposed in Example 6. DETAILED DESCRIPTION

[0058] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0059] Embodiment 1, according to Figure 1 The present invention provides an English transformation teaching method, which specifically comprises the following steps:

[0060] Step S1: Data collection: Combine the Chinese-English parallel corpus, the Chinese-English translation data of news websites, the legal document translation data and the medical literature translation data to form a Chinese-English conversion corpus;

[0061] Step S2: Data preprocessing: Perform data cleaning, quality control, data segmentation, sentence alignment and data enhancement on the Chinese-English conversion corpus to generate a preprocessed Chinese-English conversion corpus, save the Chinese-English conversion corpus as TFRecord format data, and obtain a TFRecord dataset; data cleaning includes removing redundant and erroneous data, sentence alignment and duplicate data deletion; data segmentation includes English tokenization and subword decomposition through byte pair encoding; sentence alignment includes length-based alignment and syntax-based alignment; data enhancement includes synonym replacement and back translation;

[0062] Step S3: Generate initial model: Establish BERT model, optimize BERT model through nonlinear positional encoding enhancement technology and enhanced multi-head self-attention mechanism, build enhanced BERT model, initialize hyperparameters of enhanced BERT model, input TFRecord data set into enhanced BERT model for training, and obtain initial enhanced BERT model; enhanced multi-head self-attention mechanism is obtained by introducing directional selection and cone index to optimize multi-head self-attention mechanism;

[0063] Step S4: Optimize hyperparameters: Introduce the Levy flight strategy to optimize the local search capability of the Shabao optimization algorithm, construct the Levy-Shabao optimization algorithm, optimize the hyperparameters of the enhanced BERT model through the Levy-Shabao optimization algorithm, obtain the optimal hyperparameter combination, apply the optimal hyperparameter combination to the enhanced BERT model, retrain the initial enhanced BERT model, and obtain the complete enhanced BERT model;

[0064] The Sand Abalone Optimization Algorithm is a swarm intelligence optimization algorithm that simulates the foraging behavior of sand abalones; it is an emerging nature-inspired algorithm inspired by the foraging strategy of sand abalones, especially their flight behavior when searching for food;

[0065] Step S5: Generate translation: Use the complete enhanced BERT model to convert Chinese input into high-quality English translation text to achieve the transformation and improvement of language comprehension capabilities.

[0066] Embodiment 2: This embodiment is based on embodiment 1. In this embodiment, the TFRecord data set is input into the enhanced BERT model for training to obtain the initial enhanced BERT model, which specifically includes the following contents:

[0067] Step S31: Introduce a nonlinear activation function, and calculate the position encoding of the TFRecord data set in combination with the sine function and the cosine function, add the position encoding of each word in the TFRecord data set to the embedding vector, and convert the text in the TFRecord data set into a high-dimensional vector representation; the nonlinear activation function includes the tanh activation function and the sigmoid activation function;

[0068] Step S32: Introduce directional selection and cone index optimization multi-head self-attention mechanism to construct an enhanced multi-head self-attention mechanism; input the high-dimensional vector representation into the enhanced multi-head self-attention mechanism to generate multi-head attention mapping data. The formula used is as follows:

[0069] Directionality selection formula:

[0070] ;

[0071] in, represents the query matrix after selection, represents the query matrix, represents the directional weight matrix of the query matrix;

[0072] ;

[0073] in, represents the key matrix after selection, represents the key matrix, represents the directional weight matrix of the bond matrix;

[0074] Cone index weight generation formula:

[0075] ;

[0076] in, represents the cone index weight, represents the activation function, express and The similarity measure of represents the dimension of the key vector, represents the scaling factor, represents an adjustable hyperparameter that controls the effect of the level adjustment factor on the cone index. Indicates the current level;

[0077] Enhanced multi-head self-attention mechanism formula:

[0078] ;

[0079] in, express The transpose of represents the value matrix, represents element-wise multiplication, represents the normalization function;

[0080] Step S33: performing layer normalization processing on the multi-head attention mapping data to generate layer normalized feature data;

[0081] Step S34: normalizing the feature data through the output layer processing layer to generate the target language text;

[0082] Step S35: Iterate step S32-step S33 to obtain the initial enhanced BERT model.

[0083] Embodiment 3: This embodiment is based on Embodiment 1. The difference between this embodiment and Embodiment 2 is that the nonlinear activation function is removed in step Q1. The process of obtaining the initial enhanced BERT model in this embodiment specifically includes the following contents:

[0084] Step Q1: Calculate the position encoding of the TFRecord dataset by combining the sine function and the cosine function, add the position encoding of each word in the TFRecord dataset to the embedding vector, and convert the text in the TFRecord dataset into a high-dimensional vector representation;

[0085] Step Q2: Input the high-dimensional vector representation into the enhanced multi-head self-attention mechanism to generate multi-head attention mapping data. The formula used is as follows:

[0086] Directionality selection formula:

[0087] ;

[0088] in, represents the query matrix after selection, represents the query matrix, represents the directional weight matrix of the query matrix;

[0089] ;

[0090] in, represents the key matrix after selection, represents the key matrix, represents the directional weight matrix of the bond matrix;

[0091] Cone index weight generation formula:

[0092] ;

[0093] in, represents the cone index weight, represents the activation function, express and The similarity measure of represents the dimension of the key vector, represents the scaling factor, represents an adjustable hyperparameter that controls the effect of the level adjustment factor on the cone index. Indicates the current level;

[0094] Enhanced multi-head self-attention mechanism formula:

[0095] ;

[0096] in, express The transpose of represents the value matrix, represents element-wise multiplication, represents the normalization function;

[0097] Step Q3: Perform layer normalization on the multi-head attention mapping data to generate layer normalized feature data;

[0098] Step Q4: normalizing the feature data through the output layer processing layer to generate the target language text;

[0099] Step Q5: Iterate step Q2-step Q3 to obtain the initial enhanced BERT model.

[0100] Embodiment 4: This embodiment is based on Embodiment 1. The difference between this embodiment and Embodiment 2 is that the introduction of directional selection and cone index optimization multi-head self-attention mechanism is removed on the basis of Embodiment 3. The process of obtaining the initial enhanced version of the BERT model in this embodiment specifically includes the following contents:

[0101] Step E1: Calculate the position encoding of the TFRecord dataset by combining the sine function and the cosine function, add the position encoding of each word in the TFRecord dataset to the embedding vector, and convert the text in the TFRecord dataset into a high-dimensional vector representation;

[0102] Step E2: Input the high-dimensional vector representation into the multi-head self-attention mechanism to generate multi-head attention mapping data;

[0103] Step E3: perform layer normalization on the multi-head attention mapping data to generate layer normalized feature data;

[0104] Step E4: normalizing the feature data through the output layer processing layer to generate the target language text;

[0105] Step E5: Iterate step E2-step E3 to obtain the initial enhanced BERT model.

[0106] Embodiment 5: This embodiment is based on embodiment 2. In this embodiment, step S31 specifically includes the following contents:

[0107] Step S311: Combine the sine function and the tanh activation function to calculate the position encoding even dimensions in the TFRecord data set. The formula used is as follows:

[0108] ;

[0109] in, represents the positional encoding index, Represents the position index of the word in the TFRecord dataset, Indicates location Previous The coded value of the dimension; represents the embedding dimension of the enhanced BERT model, which is set to 768; Indicates the calculation of position encoding even dimensions The frequency control factor is Indicates the calculation of position encoding odd dimensions Frequency control factor of represents the sine function, represents the hyperbolic tangent function;

[0110] Step S312: Combine the cosine function and the sigmoid activation function to calculate the position encoding odd dimensions in the TFRecord data set. The formula used is as follows:

[0111] ;

[0112] in, Indicates location Previous The coded value of the dimension, represents the cosine function, Represents the sigmoid activation function;

[0113] Step S313: combining the position code even dimension and the position code odd dimension to obtain a complete position code;

[0114] Step S314: Add the full position encoding to the embedding vector to convert the text in the TFRecord dataset into a 768-dimensional high-dimensional vector representation.

[0115] Embodiment 6, according to Figure 2 This embodiment is based on the fifth embodiment. In this embodiment, step S4 specifically includes the following contents:

[0116] Step S41: Initialize the population: define a search space, randomly initialize a population of gaboon in the search space, and the position of the gaboon population in the population of gaboon represents a set of hyperparameter combinations of the enhanced BERT model;

[0117] Step S42: Fitness calculation: Calculate the fitness value of each individual of the sand abalone population, sort the fitness values, and generate the current leading sand abalone position and the current optimal sand abalone position;

[0118] Step S43: Position update: Update the current leading sand abalone position according to the current optimal sand abalone position combined with the leading sand abalone position update formula to generate an updated leading sand abalone position. The following sand abalone position is updated based on the change of the updated leading sand abalone position. The formula used is as follows:

[0119] ;

[0120] in, represents the location index of the sand abalone population, represents the iteration index, Indicates Abalone The position of the round iteration, Indicates Abalone The position of the round iteration, represents the current optimal sand abalone position, represents the exploration factor, represents the development factor;

[0121] Step S44: Local search: Introduce the Levy flight strategy, update according to the distance between the updated leading sand abalone position and the current optimal sand abalone position, enhance the local search capability, avoid falling into the local optimal solution, and generate the Levy flight sand abalone position. The formula used is as follows:

[0122] Levy flight calculation formula:

[0123] ;

[0124] in, represents the enhancement factor in the Levy flight strategy, Represents the parameters that control Levy's flight behavior and affect the randomness of flight; It represents the constant that adjusts the Levy flight step size. represents the Gamma function, which is used to calculate the amplitude of Levy flight; represents the scale factor that controls the random amplitude of Levy flight; and Represents a random number in the interval [0, 1]; represents the standard deviation of Levy flight;

[0125] , ;

[0126] in, represents the position dimension index of the sand abalone, Indicates In the round iteration Abalone The updated position in the dimension, Indicates In the round iteration Abalone Current position in dimensions; The coefficient that controls the influence of the current position on the updated position; Indicates The current optimal sand abalone position during round iteration; Indicates The fitness value of a sand abalone is Represents the global optimal fitness value;

[0127] Step S45: Boundary check: perform boundary check on the Levy flying sand abalone position to ensure that it is within the search space and generate the sand abalone position after boundary check;

[0128] Step S46: Iterative update: set the maximum number of iterations, iterate steps S42-S45 until the maximum number of iterations is reached, and generate the optimal sand abalone position, that is, the optimal hyperparameter combination.

[0129] Embodiment 7: This embodiment is based on embodiment 5. The difference between this embodiment and embodiment 6 is that the Levy flight strategy is removed. Step S4 specifically includes the following contents:

[0130] Step C1: define the search space, randomly initialize the population of sand abalones in the search space, and the positions of the sand abalone population in the sand abalone population represent a set of hyperparameter combinations of the enhanced BERT model;

[0131] Step C2: Calculate the fitness value of each individual of the sand abalone population, sort the fitness values, and generate the current leading sand abalone position and the current optimal sand abalone position;

[0132] Step C3: Update the current leading sand abalone position according to the current optimal sand abalone position combined with the leading sand abalone position update formula to generate an updated leading sand abalone position. The following sand abalone position is updated based on the change of the updated leading sand abalone position. The formula used is as follows:

[0133] ;

[0134] in, represents the location index of the sand abalone population, represents the iteration index, Indicates Abalone The position of the round iteration, Indicates Abalone The position of the round iteration, represents the current optimal sand abalone position, represents the exploration factor, represents the development factor;

[0135] Step C4: performing a boundary check on the updated leading sand abalone position to ensure that the sand abalone position after the boundary check is generated within the search space;

[0136] Step C5: Set the maximum number of iterations, iterate steps C2-C4 until the maximum number of iterations is reached, and generate the optimal sand abalone position, that is, the optimal hyperparameter combination.

[0137] Embodiment 8. The present invention also provides an English conversion teaching system for implementing the above method, characterized in that: the system includes an input module, a preprocessing module, a language model module, a translation module and a teaching module; the input module collects the Chinese-English conversion corpus and transmits it to the preprocessing module, the preprocessing module preprocesses the Chinese-English conversion corpus, generates a TFRecord data set and transmits it to the language model module, the language model module trains an enhanced version of the BERT model according to the TFRecord data set to obtain a complete enhanced version of the BERT model, the teaching module is connected to the language model module, and provides error feedback, interactive learning and adaptive teaching through the complete enhanced version of the BERT model, so as to help students correct errors in time during the learning process and gradually improve their translation ability.

[0138] The present invention and its embodiments are described above, which is not restrictive. What is shown in the accompanying drawings is only one of the embodiments of the present invention, and the actual structure is not limited to this. In short, if ordinary technicians in this field are inspired by it and do not deviate from the purpose of the invention, they can creatively design structural methods and embodiments similar to the technical solution, which should all fall within the scope of protection of the present invention.

Claims

1. An English transformation teaching method, characterized by: The method specifically comprises the following steps: Step S1: Data collection: collect Chinese-English conversion corpus; Step S2: Data preprocessing: preprocess the Chinese-English conversion corpus to obtain a TFRecord dataset; Step S3: Generate initial model: Establish BERT model, optimize BERT model through nonlinear positional encoding enhancement technology and enhanced multi-head self-attention mechanism, build enhanced BERT model, initialize hyperparameters of enhanced BERT model, input TFRecord data set into enhanced BERT model for training, and obtain initial enhanced BERT model; Step S4: Optimize hyperparameters: Introduce the Levy flight strategy to optimize the local search capability of the Shabao optimization algorithm, construct the Levy-Shabao optimization algorithm, optimize the hyperparameters of the enhanced BERT model through the Levy-Shabao optimization algorithm, obtain the optimal hyperparameter combination, apply the optimal hyperparameter combination to the enhanced BERT model, retrain the initial enhanced BERT model, and obtain the complete enhanced BERT model; Step S5: Generate translation.

2. The English transformation teaching method according to claim 1, characterized in that: The process of inputting the TFRecord dataset into the enhanced BERT model for training to obtain the initial enhanced BERT model includes the following: Step S31: Calculate the position encoding of the TFRecord data set to obtain a high-dimensional vector representation; Step S32: Introduce directional selection and cone index optimization multi-head self-attention mechanism to construct an enhanced multi-head self-attention mechanism; input the high-dimensional vector representation into the enhanced multi-head self-attention mechanism to generate multi-head attention mapping data; Step S33: performing layer normalization processing on the multi-head attention mapping data to generate layer normalized feature data; Step S34: processing layer normalized feature data to generate target language text; Step S35: Iterate step S32-step S33 to obtain the initial enhanced BERT model.

3. The English transformation teaching method according to claim 2, characterized in that: The step S31 specifically includes the following contents: Step S311: Calculate the even dimensions of the positional encoding in the TFRecord data set by combining the sine function and the tanh activation function; Step S312: combining the cosine function and the sigmoid activation function to calculate the positional encoding odd dimensions in the TFRecord data set; Step S313: combining the position code even dimension and the position code odd dimension to obtain a complete position code; Step S314: Convert the complete position encoding into a high-dimensional vector representation.

4. The English transformation teaching method according to claim 1, characterized in that: The step S4 specifically includes the following contents: Step S41: define a search space, randomly initialize a population of sand abalones in the search space, and the position of the sand abalone population in the sand abalone population represents a set of hyperparameter combinations of an enhanced version of the BERT model; Step S42: Calculate the fitness value of each individual of the sand abalone population, sort the fitness values, and generate the current leading sand abalone position and the current optimal sand abalone position; Step S43: updating the current leading sand abalone position according to the current optimal sand abalone position to generate an updated leading sand abalone position; Step S44: introducing the Levy flight strategy, updating the distance between the updated leading sand abalone position and the current optimal sand abalone position, and generating the Levy flight sand abalone position; Step S45: performing boundary check on the Levy flying sand abalone position, and generating the sand abalone position after boundary check; Step S46: Set the maximum number of iterations, iterate steps S42 to S45 until the maximum number of iterations is reached, and generate the optimal sand abalone position, that is, the optimal hyperparameter combination.

5. An English transformational teaching system, used to implement the English transformational teaching method according to any one of claims 1 to 4, characterized in that: The system includes an input module, a preprocessing module, a language model module, a translation module and a teaching module; The input module collects the Chinese-English conversion corpus and passes it to the preprocessing module. The preprocessing module preprocesses the Chinese-English conversion corpus, generates a TFRecord data set and passes it to the language model module. The language model module trains the enhanced BERT model according to the TFRecord data set to obtain a complete enhanced BERT model. The teaching module is connected to the language model module and performs error feedback, interactive learning and adaptive teaching through the complete enhanced BERT model.