To achieve automated English teaching and optimize the allocation of English resources,
based on the DTW algorithm, clustering algorithm is introduced to optimize DTW. An
English automatic teaching intelligent platform based on K-means PDTW algorithm is
constructed.
3.1 Optimization strategy of DTW algorithm for automatic English teaching
The traditional English teaching method has many problems, such as large number of
students, too much content and limited class time, which limits the quality and efficiency
of English teaching [16]. DTW algorithm is a common technique in time series pattern matching, especially
in speech recognition, which can compare the similarity between two time series [17]. Therefore, the study attempts to construct an English intelligent teaching platform
based on the DTW algorithm, dynamically adjusting teaching strategies to meet the
personalized needs of students. The DTW algorithm first defines two time series. The
definition method is shown in Eq. (1).
In Eq. (1), $A$ and $B$ are two different time series. $i$ and $j$ are the lengths of $A$ and
$B$, respectively. $a$ and $b$ represent the time points in $A$ and $B$, respectively.
The distance between the two sequences $A$ and $B$ is displayed in Eq. (2).
In Eq. (2), $D$ is the Euclidean distance calculation Eq.. Compared to Euclidean distance, DTW
distance can more accurately measure the similarity between time series. The superiority
of DTW is shown in Fig. 1.
Fig. 1. Euclidean distance and DTW distance.
In Fig. 1, compared to Euclidean distance, DTW distance has compression and stretching effects
on time. It can dynamically plan and find the optimal path [18]. The DTW distance calculation is as follows. Firstly, the distance matrix between
each point in the sequence is calculated. Next, the path of a matrix from the bottom
left corner to the top right corner is determined to minimize the sum of elements
along the path. The next grid point is shown in Eq. (3).
In Eq. (3), $D(n,m)$ is the distance between $a_{n} $ and $b_{m} $ for the $(n,m)$-th element.
The operational principle of the DTW algorithm is to extend and shorten two time series
to calculate their similarity. It decomposes the problem into several sub problems
through dynamic programming. The optimal solution of the sub-problem is solved to
obtain the optimal solution of the original problem. Next, the cumulative distance
operation of DTW is performed, as displayed in Eq. (4).
In Eq. (4), $G$ is the cumulative distance. Fig. 2 is a schematic diagram of the cumulative distance calculation process for DTW.
Fig. 2. Schematic representation of the calculation steps of the DTW algorithm.
Fig. 2 shows the cumulative distance calculation matrix for DTW. The first column of the
grid starts from bottom to top. In addition to calculating the distance between the
corresponding points, the distance between adjacent grids below should also be added
to achieve distance accumulation. The conventional DTW algorithm has high computational
complexity, long computation time, sensitivity to noise and outliers. It is also prone
to mismatches. To this end, improvements are made on the basis of the DTW algorithm.
K-means clustering algorithm is introduced to impose distance and conditional constraints
on DTW, aiming to improve the performance and the DTW. The improved DTW search path
is dynamically bent and split. The expression is shown in Eq. (5).
In Eq. (5), $X_{a} $ and $X_{b} $ are the inflection points after path optimization. Next, the
lengths of $i$ and $j$ are re-restricted. The limiting condition is shown in Eq. (6).
In Eq. (6), the length constraint specifies that when calculating the cumulative distance between
two sequences, the lengths of the two sequences must be equal. If the lengths of two
sequences are not equal, then in the process of calculating the cumulative distance,
there will be a mismatch of points at the corresponding positions. This makes the
calculated cumulative distance inaccurate. At this point, multi-scale DTW is introduced,
which calculates the DTW distance at different scales and then integrates the results
of each scale to obtain the final similarity. This method enables the DTW algorithm
to perform well at different scales. It can handle sequences with unequal length.
The optimized DTW is shown in Fig. 3.
Fig. 3. Pathway changes before and after the global constraint improvement.
Fig. 3 shows the path changes of the optimized DTW algorithm. Specifically, the multi-scale
DTW algorithm divides the time series into multiple subsequences and calculates the
DTW distance for each subsequence. These subsequences can be of fixed length or dynamically
adjusted based on the length of the time series. According to this approach, the multi-scale
DTW algorithm can better handle length mismatch problems. The dynamic programming
can be applied to find the optimal path. In each calculation step, the similarity
of the entire time series is considered and the optimal matching point pair is selected.
In summary, the study introduces clustering algorithms and optimizes DTW with multi-scale
and global constraints, ultimately forming the K-means-PDTW algorithm. It provides
the main technology for the intelligent platform design of English automatic teaching.
3.2 Design of an English automatic teaching intelligent platform based on K-means-PDTW
algorithm
At present, there are some problems in English teaching, such as asymmetrical teaching
test and untimely feedback, which makes it difficult for students to improve their
English level due to the lack of sufficient support and guidance in the process of
English learning [19,20]. Therefore, based on the K-means-PDTW algorithm, an intelligent platform for English
automatic teaching is designed. Firstly, the weight of the learning path is calculated.
The matrix calculation is shown in Eq. (7).
In Eq. (7), $\alpha $ and $\beta $ are the sets of knowledge points and edges in English teaching
videos, respectively. $\chi $ and $\lambda $ are different sets of knowledge points.
Next, the initial pheromones of the learning path are recorded, as shown in Eq. (8).
In Eq. (8), $\tau $ is the initial pheromone for learning, reflecting the frequency and familiarity
of students learning knowledge points. Simultaneously, learning pheromones is related
to the learner's path length, time required to complete learning tasks, and learning
outcomes. In teaching, due to the correlation between knowledge points, the initial
pheromone of learning can be updated. The expression is shown in Eq. (9).
In Eq. (9), $\rho $ is the volatilization factor for learning initial pheromones. Then, to calculate
the learning effectiveness of the knowledge points, heuristic information is used
for representation, as shown in Eq. (10).
In Eq. (10), $c$, $k$, and $p$ represent block processing, known decision, and exploratory decision,
respectively. They are used to understand the learning situation of learners. Finally,
the learning path for English teaching is planned based on the initial pheromone and
heuristic information of students. The learning path planning framework based on the
K-means-PDTW is displayed in Fig. 4.
Fig. 4. Learning pathway planning framework for the K-means-PDTW.
In the learning path framework, the differences in the learning path are analyzed
after inputting temporal data, exercise test data, and learning interaction behavior
data. The expression is shown in Eq. (11).
In Eq. (11), $\varphi $ is the attenuation coefficient. Then, clustering algorithms are used
to classify the learning abilities and knowledge reserves of different students. Their
initial pheromone and initial pheromone update data are collected. At the same time,
through automatic English teaching, the knowledge point mastery and the interaction
between knowledge points are integrated to form heuristic information data. The calculation
method for the knowledge point mastery is shown in Eq. (12).
In Eq. (12), $x$ denotes the student quantity. $y$ is the number of exercises. The corresponding
knowledge matrix of the test question can be obtained, as shown in Eq. (13)
In Eq. (13), $l$ denotes the knowledge points in the exercise. Then, the heuristic information
data and initial pheromone update data are simultaneously input into the transfer
matrix to form the final learning path planning. The transition matrix is shown in
Eq. (14).
In Eq. (14), $\sigma $ and $k$ are the influence coefficients of $\tau $ and $\eta _{\chi \lambda
} $ on transfer, respectively. The learning effect of students is shown in Eq. (15).
In Eq. (15), $u$ and $T$ represent student identity and course duration, respectively. The classification
of learning methods for the English automatic teaching intelligent platform based
on the K-means-PDTW is displayed in Fig. 5.
Fig. 5. Classification of learning methods of English automatic teaching intelligent
platform.
Fig. 5 shows the classification of learning methods for the designed English automatic teaching
intelligent platform. The designed platform can automatically process, analyze, and
judge input English language data, which enables the platform to quickly and accurately
process a large amount of English language data. To meet the different learning needs
and preferences of users, in the design of an English automatic teaching intelligent
platform based on K-means-PDTW algorithm, English automatic teaching is divided into
different learning methods such as graphic and text learning, audio learning, video
learning, etc. Displaying English language knowledge and skills such as vocabulary,
grammar, and reading comprehension through graphic and textual means can provide more
intuitive and easily understandable learning content. This is suitable for users who
need to master basic language knowledge and skills. The audio learning method allows
users to engage in listening and speaking exercises anytime and anywhere, making it
convenient for users to learn English anytime, anywhere. The provided English listening
and speaking exercises help users improve their English listening and speaking abilities.
The video format provides comprehensive learning content such as English speaking,
writing, and speeches, presenting more realistic and vivid language scenes and learning
experiences. This is suitable for users who need to improve their practical English
application skills.