A method and system for assessing brushing quality based on machine learning

By acquiring and preprocessing toothbrush motion data, extracting multi-dimensional features, and constructing an evaluation model using genetic algorithms and the Bass brushing technique standard, the problem of lack of quantitative feedback and single feature in brushing quality assessment is solved, achieving efficient and accurate brushing quality assessment.

CN122117439APending Publication Date: 2026-05-29FOSHAN ANGELS BIOTECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FOSHAN ANGELS BIOTECHNOLOGY CO LTD
Filing Date
2026-01-29
Publication Date
2026-05-29

Smart Images

  • Figure CN122117439A_ABST
    Figure CN122117439A_ABST
Patent Text Reader

Abstract

The application provides a tooth brushing quality evaluation method and system based on machine learning, the method comprising: acquiring a real-time toothbrush motion data set; extracting a feature data set from the real-time toothbrush motion data set based on a preset frequency domain transformation method; screening a plurality of first toothbrush motion features from the feature data set according to a preset first feature mapping table, wherein the first feature mapping table is constructed and obtained after feature selection is performed on a first training data set based on a genetic algorithm; inputting each of the first toothbrush motion features into a preset tooth brushing position recognition model, so that the tooth brushing position recognition model outputs a current tooth brushing position; screening a plurality of second toothbrush motion features from the plurality of first toothbrush motion features; and calculating a tooth brushing quality evaluation result of the current position according to the current tooth brushing position, the plurality of second toothbrush motion features and a preset scoring rule, thereby improving the accuracy and real-time performance of tooth brushing quality evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning technology, and in particular to a machine learning-based method and system for evaluating brushing quality. Background Technology

[0002] Oral health is an important component of overall health, and proper brushing technique is crucial for maintaining it. The Bass brushing technique, an internationally recognized standard, effectively removes plaque and prevents cavities and periodontal disease. However, traditional brushing instruction relies primarily on verbal instruction from dentists and self-practice by patients, lacking objective quantitative assessment and real-time feedback mechanisms. With the development of IoT and AI technologies, smart toothbrush systems have emerged, focusing on monitoring brushing behavior using various sensors. Currently, the mainstream technology focuses on using inertial measurement units (IMUs) for motion perception, with implementation schemes categorized into three levels: First, simple monitoring based on a single accelerometer, using thresholds to determine the start and end of the action, but unable to distinguish action type and region; second, systems based on multi-axis IMUs (such as triaxial accelerometers and gyroscopes), classifying actions by extracting simple statistical features such as mean and variance, but lacking sufficient feature representation capabilities to accurately analyze the complex motion elements of the Bass brushing technique; third, introducing machine learning algorithms (such as SVM or neural networks) to extract more features from the time and frequency domains for classification, improving recognition capabilities. Summary of the Invention

[0003] To address the aforementioned technical issues, this application provides a machine learning-based method and system for assessing brushing quality, thereby improving the accuracy and real-time performance of brushing quality assessment.

[0004] In a first aspect, embodiments of this application provide a machine learning-based method for evaluating brushing quality, including: Obtain the real-time toothbrush motion dataset within a preset time window; Based on a preset frequency domain transformation method, a feature dataset is extracted from the real-time toothbrush motion dataset; According to the preset first feature mapping table, several first toothbrush motion features are obtained by filtering from the feature dataset, wherein the first feature mapping table is constructed based on the genetic algorithm to select features from the first training dataset; Each of the first toothbrush motion features is input into a preset brushing position recognition model so that the brushing position recognition model outputs the current brushing position. The brushing position recognition model is constructed based on a machine learning model and a second training dataset. According to the preset second feature mapping table, several second toothbrush motion features are obtained by filtering from the several first toothbrush motion features, wherein the second feature mapping table is constructed based on the first feature mapping table and the Bass brushing method standard; Based on the current brushing position, the movement characteristics of the several second toothbrushes, and the preset scoring rules, the brushing quality assessment result for the current position is calculated.

[0005] This application provides a machine learning-based method for evaluating brushing quality. First, a real-time toothbrush motion dataset is acquired within a preset time window. Temporal and frequency domain features are extracted using a preset frequency domain transformation method to construct a feature dataset. These features describe the toothbrush's motion state from multiple dimensions, providing a sufficient information foundation for subsequent analysis. Specifically, this embodiment introduces a first feature mapping table constructed based on a genetic algorithm to select the most discriminative first toothbrush motion features from the feature dataset, effectively avoiding feature redundancy and noise interference, and significantly improving the model's computational efficiency and classification performance. Then, a brushing position recognition model accurately identifies the current brushing position, and combined with a second feature mapping table constructed based on the Bass brushing technique standard, further filters out second toothbrush motion features directly related to brushing quality evaluation, ensuring the professionalism and relevance of the evaluation process. Finally, the brushing quality evaluation result is calculated comprehensively using multi-dimensional evaluation indicators, providing comprehensive and detailed quantitative feedback. Overall, the embodiments of this application determine the current brushing position through feature extraction and primary feature filtering, and further evaluate the current brushing quality based on the current brushing position and secondary feature filtering, thereby improving the accuracy of brushing quality assessment. At the same time, the number of features is greatly reduced through two feature filtering processes, enabling efficient real-time analysis on resource-constrained embedded terminals and improving the real-time performance of brushing quality assessment.

[0006] Furthermore, obtaining the toothbrush motion dataset includes: Acquire the initial triaxial acceleration data sequence and the initial triaxial angular velocity data sequence; Gravity compensation processing is performed on the initial triaxial acceleration data sequence and the initial triaxial angular velocity data sequence to obtain a gravity-compensated acceleration data sequence and a gravity-compensated angular velocity data sequence; The gravity-compensated acceleration data sequence and the gravity-compensated angular velocity data sequence are subjected to noise filtering to obtain an acceleration-filtered data sequence and an angular velocity-filtered data sequence. The acceleration filtered data sequence and the angular velocity filtered data sequence are subjected to data standardization processing to obtain a triaxial acceleration data sequence and a triaxial angular velocity data sequence. The real-time toothbrush motion dataset is obtained by combining the triaxial acceleration data sequence and the triaxial angular velocity data sequence.

[0007] This application further refines the specific steps for acquiring the toothbrush motion dataset. By preprocessing the initial triaxial acceleration and angular velocity data, the quality and reliability of the data are significantly improved, laying a solid foundation for subsequent feature extraction and model analysis. Specifically, gravity compensation processing effectively eliminates the interference of gravity on acceleration data, making the data more reflective of the actual motion state of the toothbrush; noise filtering removes high-frequency noise and outliers that may be introduced during sensor acquisition, improving data stability and consistency; and data standardization unifies data of different dimensions to the same scale, avoiding the adverse effects of differences in the magnitude of features on model training. Furthermore, by combining triaxial acceleration and angular velocity data sequences to construct the toothbrush motion dataset, this method fully utilizes the multidimensional information of the inertial measurement unit (IMU), enabling comprehensive capture of the toothbrush's motion trajectory and attitude changes in space. This refined data processing flow allows subsequent feature extraction and model analysis to be based on high-quality data, thereby significantly improving the accuracy and reliability of brushing quality assessment.

[0008] Furthermore, the feature dataset extracted from the real-time toothbrush motion dataset based on the preset frequency domain transformation method includes: Extract axis-time domain feature datasets from the real-time toothbrush motion dataset, using axes as units; Using the frequency domain transformation method, axis frequency domain feature datasets are extracted from the real-time toothbrush motion dataset, with each axis as the unit. A three-axis composite acceleration amplitude sequence is calculated based on the three-axis acceleration data sequence in the real-time toothbrush motion dataset, and an acceleration composite time-domain feature dataset is extracted from the three-axis composite acceleration amplitude sequence. The three-axis angular velocity composite amplitude sequence is calculated based on the three-axis angular velocity data sequence in the real-time toothbrush motion dataset, and the angular velocity composite time domain feature dataset is extracted from the three-axis angular velocity composite amplitude sequence using the frequency domain transformation method. Based on the triaxial acceleration data sequence, the acceleration correlation coefficient between each acceleration axis and the angular velocity correlation coefficient between each angular velocity axis are calculated to obtain several acceleration correlation features and several angular velocity correlation features. The feature dataset is constructed by combining the time-domain feature datasets of each axis, the frequency-domain feature datasets of each axis, the time-domain feature dataset of acceleration, the time-domain feature dataset of angular velocity, the several acceleration-related features, and the several angular velocity-related features.

[0009] This application describes in detail the specific process of feature extraction. Through multi-dimensional feature construction, the representational ability of toothbrush motion data is significantly enhanced, providing comprehensive and in-depth information support for brushing quality assessment. This embodiment extracts time-domain and frequency-domain features on an axis-by-axis basis, which can characterize the dynamic characteristics of toothbrush motion from different perspectives. Furthermore, by calculating the synthetic amplitude sequence of triaxial acceleration and angular velocity and extracting the corresponding synthetic time-domain features, the expressive power of the features is further enhanced, enabling a more comprehensive description of the toothbrush's composite motion state. Simultaneously, the correlation coefficient between acceleration and angular velocity is introduced as a feature, effectively characterizing the coordination and correlation between different motion axes, which is of great significance for assessing the standardization and coordination of brushing actions. By combining these diverse features to construct a feature dataset, this embodiment not only solves the problems of single feature extraction and insufficient representational ability in existing technologies but also provides a rich information foundation for subsequent model training and evaluation, significantly improving the accuracy and comprehensiveness of brushing quality assessment.

[0010] In one possible implementation, the step of constructing the first feature mapping table after feature selection of the first training dataset based on a genetic algorithm includes: Several first toothbrush motion datasets are obtained, and each first toothbrush motion dataset is labeled to obtain a first training dataset; Based on each feature in the feature dataset, several feature selection schemes are randomly generated as several individuals, and the initial population in the genetic algorithm is constructed based on each individual. The initial population is iterated and evolved several times according to the genetic algorithm until the preset conditions are met, and the optimal feature selection scheme is obtained. The first feature mapping table is constructed based on the feature selection scheme. In each iteration, the fitness function value corresponding to each individual is calculated according to the feature selection scheme and the first training data. Based on the fitness function value, the current individuals are selected, crossovered, mutated and retained to obtain several individuals to enter the next iteration.

[0011] This application introduces a feature selection method based on genetic algorithms. By optimizing the construction process of the feature mapping table, the scientific nature and efficiency of feature selection are significantly improved. Genetic algorithms, as a highly efficient global optimization method, can automatically select the most discriminative and representative feature subset from a large number of features, avoiding the subjectivity and limitations of manual selection. Specifically, this embodiment constructs an initial population by randomly generating multiple feature selection schemes, and uses a fitness function to evaluate the quality of each individual. The feature selection scheme is gradually optimized through iterative evolution (selection, crossover, mutation, etc.). This process not only effectively removes redundant features and noise interference, but also reduces feature dimensionality and improves computational efficiency while maintaining model accuracy, thereby enhancing the performance of the brushing position recognition model and the real-time performance of subsequent brushing quality assessment.

[0012] Furthermore, the step of calculating the corresponding fitness function value based on the feature selection scheme corresponding to each individual and the first training data includes: Based on the feature selection scheme corresponding to each individual and the first training dataset, the preset initial SVM model is trained to obtain the corresponding training SVM model. The average accuracy of each trained SVM model is calculated based on cross-validation. Based on the proportion of the number of features in the current feature selection scheme for each individual to the total number of features, calculate the corresponding feature quantity penalty term; The fitness function value of each individual is calculated based on the average accuracy and the feature quantity penalty term.

[0013] This application further refines the calculation method of the fitness function in the feature selection process based on genetic algorithms. By combining model accuracy and feature quantity penalty terms, a balanced optimization of feature selection is achieved, significantly improving the accuracy and real-time performance of brushing quality assessment. Specifically, this embodiment uses a preset initial SVM model to train each feature selection scheme and calculates the average accuracy through cross-validation, ensuring the stability and reliability of the position recognition results. Cross-validation effectively avoids overfitting, enabling the model to exhibit good generalization ability on different data subsets. Simultaneously, by introducing a feature quantity penalty term, this method optimizes model accuracy while encouraging the selection of simpler feature subsets, thereby reducing subsequent computational complexity and storage overhead. This balanced optimization strategy not only avoids performance degradation caused by feature redundancy but also improves the model's operating efficiency in resource-constrained environments, ensuring that the final selected features have both high discriminative power and low dimensionality, providing an efficient and reliable feature foundation for subsequent brushing position recognition and quality assessment.

[0014] In one possible implementation, the step of constructing the brushing position recognition model based on a machine learning model and a second training dataset includes: An initial brushing position recognition model is obtained by constructing an initial SVM model based on a preset initial model; Several second toothbrush motion datasets are obtained, and each second toothbrush motion dataset is labeled to obtain a second training dataset; Several training data are extracted from the second training dataset according to the first feature mapping table; The initial brushing position recognition model is trained based on the aforementioned training data to obtain the brushing position recognition model.

[0015] This application provides a method for constructing a brushing position recognition model. By combining an optimized feature mapping table and a machine learning model, it achieves accurate recognition of brushing positions, significantly improving the accuracy and practicality of brushing quality assessment. This embodiment constructs an initial brushing position recognition model based on a preset initial SVM model, where the radial basis function serves as the kernel function, effectively handling nonlinear classification problems and adapting to the complex feature distribution of toothbrush motion data. A second training dataset is constructed by acquiring and manually labeling a second toothbrush motion dataset, ensuring the diversity and representativeness of the training data. Specifically, this embodiment utilizes a first feature mapping table to extract optimized training features from the second training dataset, avoiding feature redundancy and noise interference, enabling the model to focus on the most discriminative information for learning. Through training with the optimized feature data, the brushing position recognition model can accurately identify the current brushing position, providing crucial evidence for subsequent quality assessment and further improving the accuracy of brushing quality assessment.

[0016] In one possible implementation, the feature dataset includes several axis time-domain feature datasets, several axis frequency-domain feature datasets, acceleration synthesis time-domain feature datasets, angular velocity synthesis time-domain feature datasets, several acceleration-related features, and several angular velocity-related features. The axis time-domain feature dataset includes several statistical features, several peak features, and zero-crossing rate features. The axis frequency-domain feature dataset includes main frequency features, several spectral statistical features, and several frequency band energy features. The acceleration synthesis time-domain feature dataset includes several acceleration synthesis statistical features, several acceleration synthesis peak features, and acceleration synthesis zero-crossing rate features. The angular velocity synthesis time-domain feature dataset includes several angular velocity synthesis statistical features, several angular velocity synthesis peak features, and angular velocity synthesis zero-crossing rate features. The step of calculating the brushing quality assessment result at the current brushing position based on the current brushing position, the several second toothbrush motion features, and preset scoring rules includes: The vibration frequency of the target toothbrush is evaluated based on the aforementioned peak characteristics and the aforementioned composite peak characteristics of acceleration. The vibration intensity of the target toothbrush is evaluated based on the aforementioned frequency band energy characteristics. A vibration quality score is calculated based on the vibration frequency and the vibration intensity. The motion amplitude of the target toothbrush is evaluated based on the aforementioned statistical characteristics, the motion intensity and amplitude control stability of the target toothbrush are evaluated based on the aforementioned composite acceleration statistical characteristics, and an amplitude control score is calculated based on the motion amplitude, the motion intensity, and the amplitude control stability. The main frequency consistency of the target toothbrush is evaluated based on the aforementioned main frequency characteristics, the rationality of the spectrum distribution of the target toothbrush is evaluated based on the aforementioned spectral statistical characteristics, and a frequency consistency score is calculated based on the main frequency consistency and the rationality of the spectrum distribution. The rotation rationality of the target toothbrush is evaluated based on the current brushing position and the statistical features. The motion coordination of the target toothbrush is evaluated based on the acceleration-related features and the angular velocity-related features. A directional control score is calculated based on the rotation rationality and the motion coordination. A motion smoothness score is calculated based on the aforementioned statistical characteristics; The brushing quality assessment result is obtained by weighting and summing the vibration quality score, amplitude control score, frequency consistency score, direction control score, and motion smoothness score.

[0017] This application describes in detail the specific process of brushing quality assessment. Through multi-dimensional assessment indicators and comprehensive scoring rules, it achieves a comprehensive and quantitative evaluation of brushing quality, significantly improving the scientific rigor and practicality of brushing guidance. Based on the current brushing position and the characteristics of the second toothbrush movement, this embodiment assesses vibration quality, amplitude control, frequency consistency, directional control, and motion smoothness, covering the core elements of the Bass brushing technique. These assessment indicators complement each other, comprehensively reflecting the quality of brushing movements from different perspectives. By integrating the scores through a preset weight distribution, this embodiment generates an overall brushing quality assessment result, providing users with intuitive and quantitative feedback. This multi-dimensional assessment system not only solves the problems of single assessment dimensions and lack of comprehensiveness in existing technologies but also enhances the objectivity and operability of the assessment results through scientific scoring rules, improving the accuracy of brushing quality assessment.

[0018] Secondly, embodiments of this application provide a brushing quality assessment system based on machine learning, including an acquisition module, a feature extraction module, a first screening module, a position recognition module, a second screening module, and a quality assessment module; The acquisition module is used to acquire a real-time toothbrush motion dataset within a preset time window. The feature extraction module is used to extract feature datasets from the real-time toothbrush motion dataset based on a preset frequency domain transformation method. The first filtering module is used to filter and obtain several first toothbrush motion features from the feature dataset according to a preset first feature mapping table, wherein the first feature mapping table is constructed based on a genetic algorithm to select features from the first training dataset; The position recognition module is used to input each of the first toothbrush motion features into a preset brushing position recognition model, so that the brushing position recognition model outputs the current brushing position, wherein the brushing position recognition model is constructed based on a machine learning model and a second training dataset; The second filtering module is used to filter and obtain several second toothbrush motion features from the several first toothbrush motion features according to a preset second feature mapping table, wherein the second feature mapping table is constructed based on the first feature mapping table and the Bass brushing technique standard; The quality assessment module is used to calculate the brushing quality assessment result at the current brushing position based on the current brushing position, the movement characteristics of the several second toothbrushes, and the preset scoring rules.

[0019] In one possible implementation, the feature extraction module extracts a feature dataset from the real-time toothbrush motion dataset based on a preset frequency domain transformation method, including: Extract axis-time domain feature datasets from the real-time toothbrush motion dataset, using axes as units; Using the frequency domain transformation method, axis frequency domain feature datasets are extracted from the real-time toothbrush motion dataset, with each axis as the unit. A three-axis composite acceleration amplitude sequence is calculated based on the three-axis acceleration data sequence in the real-time toothbrush motion dataset, and an acceleration composite time-domain feature dataset is extracted from the three-axis composite acceleration amplitude sequence. The three-axis angular velocity composite amplitude sequence is calculated based on the three-axis angular velocity data sequence in the real-time toothbrush motion dataset, and the angular velocity composite time domain feature dataset is extracted from the three-axis angular velocity composite amplitude sequence using the frequency domain transformation method. Based on the triaxial acceleration data sequence, the acceleration correlation coefficient between each acceleration axis and the angular velocity correlation coefficient between each angular velocity axis are calculated to obtain several acceleration correlation features and several angular velocity correlation features. The feature dataset is constructed by combining the time-domain feature datasets of each axis, the frequency-domain feature datasets of each axis, the time-domain feature dataset of acceleration, the time-domain feature dataset of angular velocity, the several acceleration-related features, and the several angular velocity-related features.

[0020] In one possible implementation, the brushing quality assessment system further includes a mapping table construction module, which is used to construct the first feature mapping table after performing feature selection on the first training dataset based on a genetic algorithm, including: Several first toothbrush motion datasets are obtained, and each first toothbrush motion dataset is labeled to obtain a first training dataset; Based on each feature in the feature dataset, several feature selection schemes are randomly generated as several individuals, and the initial population in the genetic algorithm is constructed based on each individual. The initial population is iterated and evolved several times according to the genetic algorithm until the preset conditions are met, and the optimal feature selection scheme is obtained. The first feature mapping table is constructed based on the feature selection scheme. In each iteration, the fitness function value corresponding to each individual is calculated according to the feature selection scheme and the first training data. Based on the fitness function value, the current individuals are selected, crossovered, mutated and retained to obtain several individuals to enter the next iteration. Attached Figure Description

[0021] Figure 1 A flowchart illustrating a machine learning-based method for assessing brushing quality, provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a machine learning-based brushing quality assessment system provided in an embodiment of this application. Detailed Implementation

[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0023] It should be noted that the step numbers in this document are only for the convenience of explaining the specific embodiments and are not intended to limit the order in which the steps are performed. In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0024] Example 1: like Figure 1 As shown, Embodiment 1 provides a machine learning-based method for evaluating brushing quality, including steps S1-S6: Step S1: Obtain the real-time toothbrush motion dataset within the preset time window; Step S2: Extract feature datasets from the real-time toothbrush motion dataset based on a preset frequency domain transformation method; Step S3: According to the preset first feature mapping table, select several first toothbrush motion features from the feature dataset, wherein the first feature mapping table is constructed based on the genetic algorithm to select features from the first training dataset; Step S4: Input each of the first toothbrush motion features into a preset brushing position recognition model so that the brushing position recognition model outputs the current brushing position. The brushing position recognition model is constructed based on a machine learning model and a second training dataset. Step S5: According to the preset second feature mapping table, select a number of second toothbrush motion features from the number of first toothbrush motion features, wherein the second feature mapping table is constructed based on the first feature mapping table and the Bass brushing method standard. Step S6: Calculate the brushing quality assessment result for the current brushing position based on the current brushing position, the movement characteristics of the several second toothbrushes, and the preset scoring rules.

[0025] This application provides a machine learning-based method for evaluating brushing quality. First, a real-time toothbrush motion dataset is acquired within a preset time window. Temporal and frequency domain features are extracted using a preset frequency domain transformation method to construct a feature dataset. These features describe the toothbrush's motion state from multiple dimensions, providing a sufficient information foundation for subsequent analysis. Specifically, this embodiment introduces a first feature mapping table constructed based on a genetic algorithm to select the most discriminative first toothbrush motion features from the feature dataset, effectively avoiding feature redundancy and noise interference, and significantly improving the model's computational efficiency and classification performance. Then, a brushing position recognition model accurately identifies the current brushing position, and combined with a second feature mapping table constructed based on the Bass brushing technique standard, further filters out second toothbrush motion features directly related to brushing quality evaluation, ensuring the professionalism and relevance of the evaluation process. Finally, the brushing quality evaluation result is calculated comprehensively using multi-dimensional evaluation indicators, providing comprehensive and detailed quantitative feedback. Overall, the embodiments of this application determine the current brushing position through feature extraction and primary feature filtering, and further evaluate the current brushing quality based on the current brushing position and secondary feature filtering, thereby improving the accuracy of brushing quality assessment. At the same time, the number of features is greatly reduced through two feature filtering processes, enabling efficient real-time analysis on resource-constrained embedded terminals and improving the real-time performance of brushing quality assessment.

[0026] Furthermore, in step S1, obtaining the toothbrush motion dataset includes: Acquire the initial triaxial acceleration data sequence and the initial triaxial angular velocity data sequence; Gravity compensation processing is performed on the initial triaxial acceleration data sequence and the initial triaxial angular velocity data sequence to obtain a gravity-compensated acceleration data sequence and a gravity-compensated angular velocity data sequence; The gravity-compensated acceleration data sequence and the gravity-compensated angular velocity data sequence are subjected to noise filtering to obtain an acceleration-filtered data sequence and an angular velocity-filtered data sequence. The acceleration filtered data sequence and the angular velocity filtered data sequence are subjected to data standardization processing to obtain a triaxial acceleration data sequence and a triaxial angular velocity data sequence. The real-time toothbrush motion dataset is obtained by combining the triaxial acceleration data sequence and the triaxial angular velocity data sequence.

[0027] This application further refines the specific steps for acquiring the toothbrush motion dataset. By preprocessing the initial triaxial acceleration and angular velocity data, the quality and reliability of the data are significantly improved, laying a solid foundation for subsequent feature extraction and model analysis. Specifically, gravity compensation processing effectively eliminates the interference of gravity on acceleration data, making the data more reflective of the actual motion state of the toothbrush; noise filtering removes high-frequency noise and outliers that may be introduced during sensor acquisition, improving data stability and consistency; and data standardization unifies data of different dimensions to the same scale, avoiding the adverse effects of differences in the magnitude of features on model training. Furthermore, by combining triaxial acceleration and angular velocity data sequences to construct the toothbrush motion dataset, this method fully utilizes the multidimensional information of the inertial measurement unit (IMU), enabling comprehensive capture of the toothbrush's motion trajectory and attitude changes in space. This refined data processing flow allows subsequent feature extraction and model analysis to be based on high-quality data, thereby significantly improving the accuracy and reliability of brushing quality assessment.

[0028] In a preferred embodiment, a six-axis IMU sensor (three-axis accelerometer + three-axis gyroscope) is used to collect motion data during brushing – sampling frequency: 100Hz, data window: 2 seconds (200 data points) – data format: including timestamps, acceleration values ​​(ax, ay, az), and angular velocity values ​​(gx, gy, gz). The data is then preprocessed: gravity compensation removes the influence of gravitational acceleration on the measurement results; a low-pass filter removes high-frequency noise; and finally, data standardization ensures the comparability of data collected from different sensors and at different times.

[0029] Furthermore, in step S2, the feature dataset extracted from the real-time toothbrush motion dataset based on the preset frequency domain transformation method includes: Extract axis-time domain feature datasets from the real-time toothbrush motion dataset, using axes as units; Using the frequency domain transformation method, axis frequency domain feature datasets are extracted from the real-time toothbrush motion dataset, with each axis as the unit. A three-axis composite acceleration amplitude sequence is calculated based on the three-axis acceleration data sequence in the real-time toothbrush motion dataset, and an acceleration composite time-domain feature dataset is extracted from the three-axis composite acceleration amplitude sequence. The three-axis angular velocity composite amplitude sequence is calculated based on the three-axis angular velocity data sequence in the real-time toothbrush motion dataset, and the angular velocity composite time domain feature dataset is extracted from the three-axis angular velocity composite amplitude sequence using the frequency domain transformation method. Based on the triaxial acceleration data sequence, the acceleration correlation coefficient between each acceleration axis and the angular velocity correlation coefficient between each angular velocity axis are calculated to obtain several acceleration correlation features and several angular velocity correlation features. The feature dataset is constructed by combining the time-domain feature datasets of each axis, the frequency-domain feature datasets of each axis, the time-domain feature dataset of acceleration, the time-domain feature dataset of angular velocity, the several acceleration-related features, and the several angular velocity-related features.

[0030] This application describes in detail the specific process of feature extraction. Through multi-dimensional feature construction, the representational ability of toothbrush motion data is significantly enhanced, providing comprehensive and in-depth information support for brushing quality assessment. This embodiment extracts time-domain and frequency-domain features on an axis-by-axis basis, which can characterize the dynamic characteristics of toothbrush motion from different perspectives. Furthermore, by calculating the synthetic amplitude sequence of triaxial acceleration and angular velocity and extracting the corresponding synthetic time-domain features, the expressive power of the features is further enhanced, enabling a more comprehensive description of the toothbrush's composite motion state. Simultaneously, the correlation coefficient between acceleration and angular velocity is introduced as a feature, effectively characterizing the coordination and correlation between different motion axes, which is of great significance for assessing the standardization and coordination of brushing actions. By combining these diverse features to construct a feature dataset, this embodiment not only solves the problems of single feature extraction and insufficient representational ability in existing technologies but also provides a rich information foundation for subsequent model training and evaluation, significantly improving the accuracy and comprehensiveness of brushing quality assessment.

[0031] In a preferred embodiment, during the time-domain feature extraction process, 20 time-domain features are extracted from the signal of each axis, resulting in 120 features (6×20), which are then used to construct time-domain feature datasets for each axis. These datasets include basic statistical features, higher-order statistical features, percentile features, kurtosis features, and zero-crossing rate features. The basic statistical features include mean, standard deviation, variance, RMS, peak-to-peak value, minimum value, maximum value, median, and MAD. The higher-order statistical features include skewness and kurtosis. The percentile features include p10, p25, p50, p75, and p90. The kurtosis features include the number of peaks, the mean of peaks, and the standard deviation of peaks. The peak-to-peak value (Vpp) refers to the difference between the maximum and minimum values ​​of the signal within a complete cycle, reflecting the dynamic range of the signal amplitude. It is used in fields such as electronic measurement and signal analysis to evaluate the fluctuation characteristics of signals and system stability. The zero-crossing rate is an important time-domain feature in signal processing, representing the number of times a signal crosses a zero point (from a positive value to a negative value or from a negative value to a positive value) per unit time, and is used to reflect the frequency characteristics and rhythmicity of motion.

[0032] In the frequency domain feature extraction process, nine frequency domain features are extracted from the signal of each axis, resulting in 54 features (6×9), which are then used to construct frequency domain feature datasets for each axis. These datasets include dominant frequency features, spectral statistical features, and band energy features. The dominant frequency features are the main frequency components of the signal; the spectral statistical features include the spectral mean, standard deviation, energy, and entropy; and the band energy features are obtained by dividing the spectrum into four bands and calculating the energy distribution of each band.

[0033] The frequency domain transformation method can be either Fast Fourier Transform (FFT) or Discrete Cosine Transform (DCT). When the FFT method is selected, the extraction process of the dominant frequency feature is as follows: perform Fast Fourier Transform (FFT) on the time domain signal; calculate the amplitude of the spectrum; find the frequency point with the largest amplitude within the positive frequency range; the frequency value corresponding to this frequency point is the dominant frequency. When the DCT method is selected, the extraction process of the dominant frequency feature is as follows: perform Discrete Cosine Transform (DCT) on the time domain signal; calculate the absolute value of the DCT coefficients; find the index position of the largest DCT coefficient; calculate the corresponding dominant frequency according to the frequency resolution formula: Dominant frequency = Maximum coefficient index × (Sampling frequency / (2 × Signal length)).

[0034] The specific process of frequency band division and energy calculation is as follows: Step 1: Perform frequency domain transformation (FFT or DCT) on the signal.

[0035] Step 2: Obtain spectral amplitude data.

[0036] Step 3: Divide the spectrum into 4 frequency bands: Band 1: 0-25% frequency range; Band 2: 25%-50% frequency range; Band 3: 50%-75% frequency range; Band 4: 75%-100% frequency range.

[0037] Step 4: Calculate the sum of energy of all frequency components in each frequency band. The sum of energy = Σ (square of the amplitude of each frequency component in the frequency band).

[0038] Step 5: Obtain the energy distribution characteristics of the four frequency bands.

[0039] During the synthetic feature extraction process, the synthetic amplitudes of triaxial acceleration and triaxial angular velocity are calculated separately to obtain synthetic amplitude sequences of triaxial acceleration and triaxial angular velocity. Then, based on the same method described above, time-domain features are extracted from the synthetic amplitude sequences of triaxial acceleration and triaxial angular velocity, resulting in 40 features (2×20).

[0040] Finally, based on the Pearson correlation coefficient, the acceleration correlation coefficients (a_xy, a_xz, a_yz) between each axis in the triaxial acceleration data sequence and the angular velocity correlation coefficients (g_xy, g_xz, g_yz) between each axis in the triaxial angular velocity data sequence are calculated, and six features can be obtained.

[0041] Furthermore, when the frequency domain transformation method is DCT, the synthetic amplitude sequence of the three-axis angular velocity can also be transformed by DCT to further extract 9 frequency domain features. Therefore, when the frequency domain transformation method is DCT, 229 features can be extracted in the end, and when the frequency domain transformation method is FFT, 220 features can be extracted in the end, thus constructing the feature dataset.

[0042] Furthermore, the above feature extraction process can be optimized and implemented based on C++ and embedded in the smart toothbrush. The specific optimizations include: calculating the mean, variance, skewness, and kurtosis through a single traversal; implementing quantile calculation through a fast selection algorithm to avoid O(n log n) sorting; using static allocation and zero dynamic memory allocation for memory optimization; and using the ESP32's SIMD instruction set for vectorized calculation.

[0043] In one possible implementation, step S3, which involves constructing the first feature mapping table after feature selection on the first training dataset using a genetic algorithm, includes: Obtain several first toothbrush motion datasets and label each first toothbrush motion dataset to obtain a first training dataset; Based on each feature in the feature dataset, several feature selection schemes are randomly generated as several individuals, and the initial population in the genetic algorithm is constructed based on each individual. The initial population is iterated and evolved several times according to the genetic algorithm until the preset conditions are met, and the optimal feature selection scheme is obtained. The first feature mapping table is constructed based on the feature selection scheme. In each iteration, the fitness function value corresponding to each individual is calculated according to the feature selection scheme and the first training data. Based on the fitness function value, the current individuals are selected, crossovered, mutated and retained to obtain several individuals to enter the next iteration.

[0044] This application introduces a feature selection method based on genetic algorithms. By optimizing the construction process of the feature mapping table, the scientific nature and efficiency of feature selection are significantly improved. Genetic algorithms, as a highly efficient global optimization method, can automatically select the most discriminative and representative feature subset from a large number of features, avoiding the subjectivity and limitations of manual selection. Specifically, this embodiment constructs an initial population by randomly generating multiple feature selection schemes, and uses a fitness function to evaluate the quality of each individual. The feature selection scheme is gradually optimized through iterative evolution (selection, crossover, mutation, etc.). This process not only effectively removes redundant features and noise interference, but also reduces feature dimensionality and improves computational efficiency while maintaining model accuracy, thereby enhancing the performance of the brushing position recognition model and the real-time performance of subsequent brushing quality assessment.

[0045] Furthermore, the step of calculating the corresponding fitness function value based on the feature selection scheme corresponding to each individual and the first training data includes: Based on the feature selection scheme corresponding to each individual and the first training dataset, the preset initial SVM model is trained to obtain the corresponding training SVM model. The average accuracy of each trained SVM model is calculated based on cross-validation. Based on the proportion of the number of features in the current feature selection scheme for each individual to the total number of features, calculate the corresponding feature quantity penalty term; The fitness function value of each individual is calculated based on the average accuracy and the feature quantity penalty term.

[0046] This application further refines the calculation method of the fitness function in the feature selection process based on genetic algorithms. By combining model accuracy and feature quantity penalty terms, a balanced optimization of feature selection is achieved, significantly improving the accuracy and real-time performance of brushing quality assessment. Specifically, this embodiment uses a preset initial SVM model to train each feature selection scheme and calculates the average accuracy through cross-validation, ensuring the stability and reliability of the position recognition results. Cross-validation effectively avoids overfitting, enabling the model to exhibit good generalization ability on different data subsets. Simultaneously, by introducing a feature quantity penalty term, this method optimizes model accuracy while encouraging the selection of simpler feature subsets, thereby reducing subsequent computational complexity and storage overhead. This balanced optimization strategy not only avoids performance degradation caused by feature redundancy but also improves the model's operating efficiency in resource-constrained environments, ensuring that the final selected features have both high discriminative power and low dimensionality, providing an efficient and reliable feature foundation for subsequent brushing position recognition and quality assessment.

[0047] In a preferred embodiment, the complete process of genetic algorithm feature selection is as follows: Initialization phase: Step 1: Set the genetic algorithm parameters: Population size: 100 individuals; Number of generations: 100; Crossover probability: 0.8; Mutation probability: 0.1; Elite retention ratio: 0.15.

[0048] Step 2: Create the initial population: Each individual uses binary encoding to represent the feature selection scheme. The encoding length is equal to the total number of features (220 bits), where 1 indicates that the feature is selected and 0 indicates that it is not selected.

[0049] Evolutionary process: Step 3, Fitness Evaluation: Calculate the fitness function value for each individual and perform cross-validation based on SVM accuracy.

[0050] Step 4: Selection Operation: Use the tournament selection method to select parent individuals. Individuals with higher fitness have a greater probability of being selected.

[0051] Step 5, crossover operation: Randomly select two parent individuals and perform single-point or multi-point crossover to generate offspring. The crossover probability is used to control whether to perform crossover.

[0052] Step 6, Mutation Operation: Randomly flip the gene loci of the offspring individuals, and control the frequency of mutation by the mutation probability.

[0053] Step 7, Elite Retention Strategy: Retain the best 15% of individuals from the current generation to the next generation.

[0054] Step 8: Termination condition check: Stop if the maximum number of generations or fitness convergence is reached; otherwise, return to step 3 to continue evolution.

[0055] Output result: Step 9: Return the optimal feature combination: Select the individual with the highest fitness and decode the individual to obtain the optimal feature index set.

[0056] In this embodiment, a genetic algorithm is used to select 99 optimal features from 220 features, and a corresponding first feature mapping table is constructed based on the IDs of the 99 optimal features.

[0057] The specific steps for calculating the individual fitness value in the above feature selection process are as follows: (1) Select the corresponding feature subset based on the individual's gene encoding.

[0058] (2) Use the feature subset to extract features from the first training dataset, and use the extracted features to train an SVM classifier. The kernel function of the SVM classifier is the radial basis function (RBF), and the parameter settings are: C=0.5, gamma=0.005.

[0059] (3) Calculate the average accuracy of SVM by using 5-fold cross-validation.

[0060] (4) Calculate the feature quantity penalty term, penalty term = (number of selected features / total number of features) × 0.01.

[0061] (5) Final fitness = average accuracy - penalty.

[0062] In a preferred embodiment, in step S4, 99 optimal features after filtering are input into the brushing position recognition model, so that the brushing position recognition model outputs the current brushing position. In this embodiment, the brushing position recognition model is constructed based on the SVM model and configured as follows: RBF kernel, C=0.5, gamma=0.005. Sixteen brushing region categories are set in the model, including upper left lateral (luo), upper left medial (lui), upper left occlusal surface (luc), lower left lateral (ldo), lower left medial (ldi), lower left occlusal surface (ldc), upper right lateral (ruo), upper right medial (rui), upper right occlusal surface (ruc), lower right lateral (rdo), lower right medial (rdi), lower right occlusal surface (rdc), upper incisor lateral (ufo), upper incisor medial (ufi), lower incisor lateral (dfo), lower incisor medial (dfi), etc.

[0063] In one possible implementation, step S4, which involves constructing the brushing position recognition model based on a machine learning model and a second training dataset, includes: An initial brushing position recognition model is obtained by constructing an initial SVM model based on a preset initial model; Several second toothbrush motion datasets are obtained, and each second toothbrush motion dataset is labeled to obtain a second training dataset; Several training data are extracted from the second training dataset according to the first feature mapping table; The initial brushing position recognition model is trained based on the aforementioned training data to obtain the brushing position recognition model.

[0064] This application provides a method for constructing a brushing position recognition model. By combining an optimized feature mapping table and a machine learning model, it achieves accurate recognition of brushing positions, significantly improving the accuracy and practicality of brushing quality assessment. This embodiment constructs an initial brushing position recognition model based on a preset initial SVM model, where the radial basis function serves as the kernel function, effectively handling nonlinear classification problems and adapting to the complex feature distribution of toothbrush motion data. A second training dataset is constructed by acquiring and manually labeling a second toothbrush motion dataset, ensuring the diversity and representativeness of the training data. Specifically, this embodiment utilizes a first feature mapping table to extract optimized training features from the second training dataset, avoiding feature redundancy and noise interference, enabling the model to focus on the most discriminative information for learning. Through training with the optimized feature data, the brushing position recognition model can accurately identify the current brushing position, providing crucial evidence for subsequent quality assessment and further improving the accuracy of brushing quality assessment.

[0065] In a preferred embodiment, the complete process for constructing training data is as follows: (1) Data acquisition stage: Hardware configuration: Sensor: six-axis IMU (three-axis accelerometer + three-axis gyroscope); Sampling frequency: 100Hz; Data window: 2 seconds (200 data points); Sensor position: mounted on the toothbrush handle.

[0066] Data format: The raw data includes timestamps, acceleration values: ax, ay, az (unit: m / s²), and angular velocity values: gx, gy, gz (unit: rad / s).

[0067] (2) Data annotation stage: The experimenter brushed his teeth according to the standard brushing procedure, collected toothbrush motion data at the same time, recorded the brushing area corresponding to each time window, and manually annotated the toothbrush motion data.

[0068] (3) Data preprocessing and data augmentation, where data preprocessing includes gravity compensation processing, noise filtering processing and data standardization processing, and data augmentation includes gravity direction rotation enhancement, time window sliding enhancement and noise injection enhancement.

[0069] (4) Perform feature extraction and feature filtering according to the first feature mapping table to obtain training data. The dataset structure of the training data is: feature matrix (number of samples × 99 features) and region label (classification labels of 16 categories).

[0070] In a preferred embodiment, in step S5, based on expert experience, clinical guidelines for the Bass brushing technique, standard operating procedures for oral care, brushing quality assessment standards, and other medical references, a second feature mapping table is manually determined on the basis of the first feature mapping table. This second feature mapping table includes 35 Bass professional features, which are used for vibration quality assessment, amplitude control assessment, frequency consistency assessment, directional control assessment, and motion smoothness assessment, respectively. Specifically: 1. Vibration detection feature group (8 features): -ax_peak_count: Peak count of acceleration on the X-axis → reflects the frequency of jitter. -ay_peak_count: Counts the peak values ​​of acceleration along the Y-axis → reflects the frequency of jitter. -az_peak_count: Z-axis peak count of acceleration → reflects the frequency of jitter. -acc_mag_peak_count: Peak count of acceleration amplitude → reflects the overall jitter frequency -ax_spectral_energy: Acceleration X-axis spectral energy → reflects the intensity of flutter. -ay_spectral_energy: Acceleration Y-axis spectral energy → reflects the intensity of flutter. -az_spectral_energy: Acceleration Z-axis spectral energy → reflects the intensity of flutter. -acc_mag_spectral_energy: Acceleration amplitude spectrum energy → reflects overall flutter intensity 2. Amplitude control feature group (8 features): -ax_ptp,ay_ptp,az_ptp: Triaxial peak-to-peak value of acceleration → reflects the range of motion amplitude -ax_std,ay_std,az_std: Standard deviation of acceleration along three axes → reflects the degree of amplitude variation -acc_mag_rms: Acceleration amplitude RMS → reflects the overall motion intensity -acc_mag_std: Standard deviation of acceleration amplitude → reflects the stability of amplitude control 3. Frequency analysis feature group (6 features): -ax_dominant_freq, ay_dominant_freq, az_dominant_freq: Triaxial dominant acceleration frequencies → reflecting the frequency of vibration. -ax_spectral_mean,ay_spectral_mean,az_spectral_mean: Mean values ​​of the three-axis acceleration spectrum → reflecting the frequency distribution. 4. Direction control feature group (8 features): -gx_mean,gy_mean,gz_mean: Triaxial mean of angular velocity → reflects rotational trend -gyro_corr_xy,gyro_corr_xz,gyro_corr_yz: Gyroscope inter-axis correlation → reflects directional coordination -acc_corr_xy, acc_corr_yz: Acceleration inter-axis correlation → reflects the consistency of motion direction 5. Motion quality characteristic group (5 characteristics): -ax_kurtosis,ay_kurtosis,az_kurtosis: Triaxial kurtosis of acceleration → reflects the characteristics of motion distribution. -gyro_mag_rms: Gyroscope amplitude RMS → reflects the intensity of rotational motion. -acc_mag_kurtosis: Acceleration amplitude kurtosis → reflects motion smoothness In one possible implementation, the feature dataset includes several axis time-domain feature datasets, several axis frequency-domain feature datasets, acceleration synthesis time-domain feature datasets, angular velocity synthesis time-domain feature datasets, several acceleration-related features, and several angular velocity-related features. The axis time-domain feature dataset includes several statistical features, several peak features, and zero-crossing rate features. The axis frequency-domain feature dataset includes main frequency features, several spectral statistical features, and several frequency band energy features. The acceleration synthesis time-domain feature dataset includes several acceleration synthesis statistical features, several acceleration synthesis peak features, and acceleration synthesis zero-crossing rate features. The angular velocity synthesis time-domain feature dataset includes several angular velocity synthesis statistical features, several angular velocity synthesis peak features, and angular velocity synthesis zero-crossing rate features. The step of calculating the brushing quality assessment result at the current brushing position based on the current brushing position, the several second toothbrush motion features, and preset scoring rules includes: The vibration frequency of the target toothbrush is evaluated based on the aforementioned peak characteristics and the aforementioned composite peak characteristics of acceleration. The vibration intensity of the target toothbrush is evaluated based on the aforementioned frequency band energy characteristics. A vibration quality score is calculated based on the vibration frequency and the vibration intensity. The motion amplitude of the target toothbrush is evaluated based on the aforementioned statistical characteristics, the motion intensity and amplitude control stability of the target toothbrush are evaluated based on the aforementioned composite acceleration statistical characteristics, and an amplitude control score is calculated based on the motion amplitude, the motion intensity, and the amplitude control stability. The main frequency consistency of the target toothbrush is evaluated based on the aforementioned main frequency characteristics, the rationality of the spectrum distribution of the target toothbrush is evaluated based on the aforementioned spectral statistical characteristics, and a frequency consistency score is calculated based on the main frequency consistency and the rationality of the spectrum distribution. The rotation rationality of the target toothbrush is evaluated based on the current brushing position and the statistical features. The motion coordination of the target toothbrush is evaluated based on the acceleration-related features and the angular velocity-related features. A directional control score is calculated based on the rotation rationality and the motion coordination. A motion smoothness score is calculated based on the aforementioned statistical characteristics; The brushing quality assessment result is obtained by weighting and summing the vibration quality score, amplitude control score, frequency consistency score, direction control score, and motion smoothness score.

[0071] This application describes in detail the specific process of brushing quality assessment. Through multi-dimensional assessment indicators and comprehensive scoring rules, it achieves a comprehensive and quantitative evaluation of brushing quality, significantly improving the scientific rigor and practicality of brushing guidance. Based on the current brushing position and the characteristics of the second toothbrush movement, this embodiment assesses vibration quality, amplitude control, frequency consistency, directional control, and motion smoothness, covering the core elements of the Bass brushing technique. These assessment indicators complement each other, comprehensively reflecting the quality of brushing movements from different perspectives. By integrating the scores through a preset weight distribution, this embodiment generates an overall brushing quality assessment result, providing users with intuitive and quantitative feedback. This multi-dimensional assessment system not only solves the problems of single assessment dimensions and lack of comprehensiveness in existing technologies but also enhances the objectivity and operability of the assessment results through scientific scoring rules, improving the accuracy of brushing quality assessment.

[0072] In a preferred embodiment, the specific process for performing vibration quality assessment, amplitude control assessment, frequency consistency assessment, directional control assessment, and motion smoothness assessment is as follows: 1. Vibration quality assessment (weight 30%): Features used: Vibration detection feature group (8 features) Assessment criteria: Whether the fibrillation frequency is within the medically recommended range of 10-20Hz; whether the fibrillation intensity is appropriate; and whether the fibrillation on each axis is coordinated and consistent.

[0073] Scoring algorithm: (1) Estimating the jitter frequency from peak counts (2) Assessing flutter intensity from spectral energy (3) Calculate the medical compliance of frequency and intensity (4) Output vibration quality score (0-1) 2. Amplitude control assessment (weight 25%): Features used: Amplitude control feature group (8 features) Assessment criteria: Whether the range of motion is within the recommended range of 2-3mm; whether the range of motion control is stable; and whether the exercise intensity is appropriate.

[0074] Scoring algorithm: (1) Estimate the amplitude of motion from peak-to-peak value and standard deviation (2) Assessing exercise intensity from RMS values (3) Calculate the stability of amplitude control (4) Output amplitude control score (0-1) 3. Frequency Consistency Assessment (Weight 20%): Features used: Frequency analysis feature group (6 features) Evaluation criteria: whether the main frequency is stable; whether the frequencies of each axis are consistent; and whether the frequency distribution is reasonable.

[0075] Scoring algorithm: Step 1: Check the consistency of the three-axis main frequency Step 2: Evaluate the stability of the frequency Step 3: Calculate the rationality of the frequency distribution Step 4: Output frequency consistency score (0-1) 4. Directional control assessment (weight 15%): Features used: Current brushing position and direction control feature group (8 features) Assessment content: Whether the direction of movement conforms to the Bass method (gingiva → crown); whether the rotational movement is appropriate; whether the movements of each axis are coordinated.

[0076] Scoring algorithm: Step 1: Analyze the rotation trend based on the current brushing position and the average angular velocity. Step 2: Assess motor coordination based on correlation characteristics Step 3: Assess the standardization of steering control Step 4: Output direction control score (0-1) 5. Motion smoothness assessment (weight 10%): Features used: Motion quality feature group (5 features) Assessment content: Whether the movement is smooth and fluid; whether there are sudden accelerations or decelerations; overall quality of the movement. Scoring algorithm: Step 1: Analyze motion distribution from kurtosis characteristics Step 2: Assess the smoothness of the motion. Step 3: Calculate the quality of motion index Step 4: Output motion smoothness score (0-1) Overall score calculation: Total score = Vibration mass × 0.30 + Amplitude control × 0.25 + Frequency consistency × 0.20 + Directional control × 0.15 + Motion smoothness × 0.10 The scoring algorithms for the above five parts can all be implemented by setting multiple threshold ranges and combining them with piecewise functions. Furthermore, step S6 can be replaced by inputting the current brushing position and the aforementioned second toothbrush motion features into the brushing quality assessment model, so that the brushing quality assessment model outputs a quality assessment result. The brushing quality assessment model is constructed and trained using another SVM model. Specifically, features are extracted from the second training dataset according to the second feature mapping table, and the corresponding brushing quality scores are added to the training data to obtain the second training data. Finally, the second training data is used to train another initial SVM model to obtain the brushing quality assessment model. The brushing quality scores added to the training data can still be calculated using the five scoring algorithms mentioned above, or other scoring rules can be used.

[0077] In a preferred embodiment, the current brushing position and the brushing quality assessment result can also be output to a designated device, such as a user's mobile phone or a smart toothbrush, so that a designated interface on the device can display the current brushing area, brushing progress, coverage, technical score and level in real time, and provide real-time guidance and suggestions to improve the user experience.

[0078] In summary, the embodiments of this application have at least the following beneficial effects: 1. Comprehensive Feature Extraction: This invention combines 220 multi-dimensional features, which, compared with the simple statistical features of existing solutions, can more comprehensively capture the complexity and diversity of brushing actions, significantly improving the accuracy of action recognition.

[0079] 2. Intelligent Feature Optimization: Through intelligent optimization methods such as genetic algorithms, 99 optimal features are automatically selected from 220 features, which significantly reduces computational complexity while maintaining high accuracy. Compared with existing solutions that use all features, it has higher efficiency and better generalization ability.

[0080] 3. Professional Medical Assessment: This invention achieves a five-dimensional professional assessment of the Bass brushing technique based on medical standards. Compared with the simple action recognition of existing solutions, it can provide a more professional and accurate assessment of brushing quality and has significant clinical application value.

[0081] 4. Superior real-time performance: Optimized in C++, it achieves a feature extraction time of 200μs on the ESP32 platform. Compared with the second-level processing time of existing solutions, it has a significant real-time performance advantage and can support true real-time brushing guidance.

[0082] 5. Algorithm innovation: Innovative algorithms such as the single-pass statistical algorithm and the fast selection quantile algorithm have higher computational efficiency compared to existing multi-pass traversal and sorting algorithms.

[0083] 6. Multi-transform support: It supports both FFT and DCT transforms simultaneously. Compared with the single transform method of existing solutions, it can adapt to different signal characteristics and provide a more flexible analysis solution.

[0084] 7. High scalability: The modular design supports independent optimization and expansion of each module, such as feature extraction, feature selection, and classification algorithms. Compared with the tightly coupled design of existing solutions, it has better maintainability and scalability.

[0085] Example 2: like Figure 2 As shown, Embodiment 2 provides a brushing quality assessment system based on machine learning, including an acquisition module 10, a feature extraction module 20, a first screening module 30, a position recognition module 40, a second screening module 50, and a quality assessment module 60. The acquisition module 10 is used to acquire a real-time toothbrush motion dataset within a preset time window; The feature extraction module 20 is used to extract feature datasets from the real-time toothbrush motion dataset based on a preset frequency domain transformation method. The first filtering module 30 is used to filter and obtain several first toothbrush motion features from the feature dataset according to a preset first feature mapping table, wherein the first feature mapping table is constructed based on a genetic algorithm to select features from the first training dataset; The position recognition module 40 is used to input each of the first toothbrush motion features into a preset brushing position recognition model, so that the brushing position recognition model outputs the current brushing position, wherein the brushing position recognition model is constructed based on a machine learning model and a second training dataset; The second filtering module 50 is used to filter and obtain a number of second toothbrush motion features from the number of first toothbrush motion features according to a preset second feature mapping table, wherein the second feature mapping table is constructed based on the first feature mapping table and the Bass brushing technique standard; The quality assessment module 60 is used to calculate the brushing quality assessment result of the current brushing position based on the current brushing position, the movement characteristics of the several second toothbrushes and the preset scoring rules.

[0086] Furthermore, the acquisition module 10 acquires a toothbrush motion dataset, including: Acquire the initial triaxial acceleration data sequence and the initial triaxial angular velocity data sequence; Gravity compensation processing is performed on the initial triaxial acceleration data sequence and the initial triaxial angular velocity data sequence to obtain a gravity-compensated acceleration data sequence and a gravity-compensated angular velocity data sequence; The gravity-compensated acceleration data sequence and the gravity-compensated angular velocity data sequence are subjected to noise filtering to obtain an acceleration-filtered data sequence and an angular velocity-filtered data sequence. The acceleration filtered data sequence and the angular velocity filtered data sequence are subjected to data standardization processing to obtain a triaxial acceleration data sequence and a triaxial angular velocity data sequence. The real-time toothbrush motion dataset is obtained by combining the triaxial acceleration data sequence and the triaxial angular velocity data sequence.

[0087] Furthermore, the feature extraction module 20 extracts a feature dataset from the real-time toothbrush motion dataset based on a preset frequency domain transformation method, including: Extract axis-time domain feature datasets from the real-time toothbrush motion dataset, using axes as units; Using the frequency domain transformation method, axis frequency domain feature datasets are extracted from the real-time toothbrush motion dataset, with each axis as the unit. A three-axis composite acceleration amplitude sequence is calculated based on the three-axis acceleration data sequence in the real-time toothbrush motion dataset, and an acceleration composite time-domain feature dataset is extracted from the three-axis composite acceleration amplitude sequence. The three-axis angular velocity composite amplitude sequence is calculated based on the three-axis angular velocity data sequence in the real-time toothbrush motion dataset, and the angular velocity composite time domain feature dataset is extracted from the three-axis angular velocity composite amplitude sequence using the frequency domain transformation method. Based on the triaxial acceleration data sequence, the acceleration correlation coefficient between each acceleration axis and the angular velocity correlation coefficient between each angular velocity axis are calculated to obtain several acceleration correlation features and several angular velocity correlation features. The feature dataset is constructed by combining the time-domain feature datasets of each axis, the frequency-domain feature datasets of each axis, the time-domain feature dataset of acceleration, the time-domain feature dataset of angular velocity, the several acceleration-related features, and the several angular velocity-related features.

[0088] In one possible implementation, the brushing quality assessment system further includes a mapping table construction module, which is used to construct the first feature mapping table after feature selection on the first training dataset based on a genetic algorithm, including: Obtain several first toothbrush motion datasets and label each first toothbrush motion dataset to obtain a first training dataset; Based on each feature in the feature dataset, several feature selection schemes are randomly generated as several individuals, and the initial population in the genetic algorithm is constructed based on each individual. The initial population is iterated and evolved several times according to the genetic algorithm until the preset conditions are met, and the optimal feature selection scheme is obtained. The first feature mapping table is constructed based on the feature selection scheme. In each iteration, the fitness function value corresponding to each individual is calculated according to the feature selection scheme and the first training data. Based on the fitness function value, the current individuals are selected, crossovered, mutated and retained to obtain several individuals to enter the next iteration.

[0089] Furthermore, the step of calculating the corresponding fitness function value based on the feature selection scheme corresponding to each individual and the first training data includes: Based on the feature selection scheme corresponding to each individual and the first training dataset, the preset initial SVM model is trained to obtain the corresponding training SVM model. The average accuracy of each trained SVM model is calculated based on cross-validation. Based on the proportion of the number of features in the current feature selection scheme for each individual to the total number of features, calculate the corresponding feature quantity penalty term; The fitness function value of each individual is calculated based on the average accuracy and the feature quantity penalty term.

[0090] In one possible implementation, the step of constructing the brushing position recognition model based on a machine learning model and a second training dataset includes: An initial brushing position recognition model is obtained by constructing an initial SVM model based on a preset initial model; Several second toothbrush motion datasets are obtained, and each second toothbrush motion dataset is labeled to obtain a second training dataset; Several training data are extracted from the second training dataset according to the first feature mapping table; The initial brushing position recognition model is trained based on the aforementioned training data to obtain the brushing position recognition model.

[0091] In one possible implementation, the feature dataset includes several axis time-domain feature datasets, several axis frequency-domain feature datasets, acceleration synthesis time-domain feature datasets, angular velocity synthesis time-domain feature datasets, several acceleration-related features, and several angular velocity-related features. The axis time-domain feature dataset includes several statistical features, several peak features, and zero-crossing rate features. The axis frequency-domain feature dataset includes main frequency features, several spectral statistical features, and several frequency band energy features. The acceleration synthesis time-domain feature dataset includes several acceleration synthesis statistical features, several acceleration synthesis peak features, and acceleration synthesis zero-crossing rate features. The angular velocity synthesis time-domain feature dataset includes several angular velocity synthesis statistical features, several angular velocity synthesis peak features, and angular velocity synthesis zero-crossing rate features. The quality assessment module 60 calculates and obtains the brushing quality assessment result for the current position based on the current brushing position, the several second toothbrush motion features, and preset scoring rules, including: The vibration frequency of the target toothbrush is evaluated based on the aforementioned peak characteristics and the aforementioned composite peak characteristics of acceleration. The vibration intensity of the target toothbrush is evaluated based on the aforementioned frequency band energy characteristics. A vibration quality score is calculated based on the vibration frequency and the vibration intensity. The motion amplitude of the target toothbrush is evaluated based on the aforementioned statistical characteristics, the motion intensity and amplitude control stability of the target toothbrush are evaluated based on the aforementioned composite acceleration statistical characteristics, and an amplitude control score is calculated based on the motion amplitude, the motion intensity, and the amplitude control stability. The main frequency consistency of the target toothbrush is evaluated based on the aforementioned main frequency characteristics, the rationality of the spectrum distribution of the target toothbrush is evaluated based on the aforementioned spectral statistical characteristics, and a frequency consistency score is calculated based on the main frequency consistency and the rationality of the spectrum distribution. The rotation rationality of the target toothbrush is evaluated based on the current brushing position and the statistical features. The motion coordination of the target toothbrush is evaluated based on the acceleration-related features and the angular velocity-related features. A directional control score is calculated based on the rotation rationality and the motion coordination. A motion smoothness score is calculated based on the aforementioned statistical characteristics; The brushing quality assessment result is obtained by weighting and summing the vibration quality score, amplitude control score, frequency consistency score, direction control score, and motion smoothness score.

[0092] This application provides a machine learning-based brushing quality assessment system. First, a real-time toothbrush motion dataset is acquired within a preset time window. Temporal and frequency domain features are extracted using a preset frequency domain transformation method to construct a feature dataset. These features describe the toothbrush's motion state from multiple dimensions, providing a sufficient information foundation for subsequent analysis. Specifically, this embodiment introduces a first feature mapping table constructed based on a genetic algorithm to select the most discriminative first toothbrush motion features from the feature dataset, effectively avoiding feature redundancy and noise interference, and significantly improving the model's computational efficiency and classification performance. Then, a brushing position recognition model accurately identifies the current brushing position, and combined with a second feature mapping table constructed based on the Bass brushing technique standard, further filters out second toothbrush motion features directly related to brushing quality assessment, ensuring the professionalism and relevance of the assessment process. Finally, the brushing quality assessment results are comprehensively calculated using multi-dimensional evaluation indicators, providing comprehensive and detailed quantitative feedback. Overall, the embodiments of this application determine the current brushing position through feature extraction and primary feature filtering, and further evaluate the current brushing quality based on the current brushing position and secondary feature filtering, thereby improving the accuracy of brushing quality assessment. At the same time, the number of features is greatly reduced through two feature filtering processes, enabling efficient real-time analysis on resource-constrained embedded terminals and improving the real-time performance of brushing quality assessment.

[0093] For a more detailed explanation of the working principle and procedures of this embodiment, please refer to the relevant description in Embodiment 1.

[0094] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application for those skilled in the art.

Claims

1. A method for evaluating brushing quality based on machine learning, characterized in that, include: Obtain the real-time toothbrush motion dataset within a preset time window; Based on a preset frequency domain transformation method, a feature dataset is extracted from the real-time toothbrush motion dataset; According to the preset first feature mapping table, several first toothbrush motion features are obtained by filtering from the feature dataset, wherein the first feature mapping table is constructed based on the genetic algorithm to select features from the first training dataset; Each of the first toothbrush motion features is input into a preset brushing position recognition model so that the brushing position recognition model outputs the current brushing position. The brushing position recognition model is constructed based on a machine learning model and a second training dataset. According to the preset second feature mapping table, several second toothbrush motion features are obtained by filtering from the several first toothbrush motion features, wherein the second feature mapping table is constructed based on the first feature mapping table and the Bass brushing method standard; Based on the current brushing position, the movement characteristics of the several second toothbrushes, and the preset scoring rules, the brushing quality assessment result for the current position is calculated.

2. The brushing quality assessment method based on machine learning as described in claim 1, characterized in that, The acquisition of the real-time toothbrush motion dataset includes: Acquire the initial triaxial acceleration data sequence and the initial triaxial angular velocity data sequence; Gravity compensation processing is performed on the initial triaxial acceleration data sequence and the initial triaxial angular velocity data sequence to obtain a gravity-compensated acceleration data sequence and a gravity-compensated angular velocity data sequence; The gravity-compensated acceleration data sequence and the gravity-compensated angular velocity data sequence are subjected to noise filtering to obtain an acceleration-filtered data sequence and an angular velocity-filtered data sequence. The acceleration filtered data sequence and the angular velocity filtered data sequence are subjected to data standardization processing to obtain a triaxial acceleration data sequence and a triaxial angular velocity data sequence. The real-time toothbrush motion dataset is obtained by combining the triaxial acceleration data sequence and the triaxial angular velocity data sequence.

3. The brushing quality assessment method based on machine learning as described in claim 1, characterized in that, The preset frequency domain transformation method extracts a feature dataset from the real-time toothbrush motion dataset, including: Extract axis time-domain feature datasets from the real-time toothbrush motion dataset, using axes as units; Using the frequency domain transformation method, axis frequency domain feature datasets are extracted from the real-time toothbrush motion dataset, with each axis as the unit. A three-axis composite acceleration amplitude sequence is calculated based on the three-axis acceleration data sequence in the real-time toothbrush motion dataset, and an acceleration composite time-domain feature dataset is extracted from the three-axis composite acceleration amplitude sequence. The three-axis angular velocity composite amplitude sequence is calculated based on the three-axis angular velocity data sequence in the real-time toothbrush motion dataset, and the angular velocity composite time domain feature dataset is extracted from the three-axis angular velocity composite amplitude sequence using the frequency domain transformation method. Based on the triaxial acceleration data sequence, the acceleration correlation coefficient between each acceleration axis and the angular velocity correlation coefficient between each angular velocity axis are calculated to obtain several acceleration correlation features and several angular velocity correlation features. The feature dataset is constructed by combining the time-domain feature datasets of each axis, the frequency-domain feature datasets of each axis, the time-domain feature dataset of acceleration, the time-domain feature dataset of angular velocity, the several acceleration-related features, and the several angular velocity-related features.

4. The brushing quality assessment method based on machine learning as described in claim 1, characterized in that, The process of constructing the first feature mapping table after feature selection on the first training dataset based on a genetic algorithm includes: Several first toothbrush motion datasets are obtained, and each first toothbrush motion dataset is labeled to obtain a first training dataset; Based on each feature in the feature dataset, several feature selection schemes are randomly generated as several individuals, and the initial population in the genetic algorithm is constructed based on each individual. The initial population is iterated and evolved several times according to the genetic algorithm until the preset conditions are met, and the optimal feature selection scheme is obtained. The first feature mapping table is constructed based on the feature selection scheme. In each iteration, the fitness function value corresponding to each individual is calculated according to the feature selection scheme and the first training data. Based on the fitness function value, the current individuals are selected, crossovered, mutated and retained to obtain several individuals to enter the next iteration.

5. The brushing quality assessment method based on machine learning as described in claim 4, characterized in that, The step of calculating the corresponding fitness function value based on the feature selection scheme corresponding to each individual and the first training data includes: Based on the feature selection scheme corresponding to each individual and the first training dataset, the preset initial SVM model is trained to obtain the corresponding training SVM model. The average accuracy of each trained SVM model is calculated based on cross-validation. Based on the proportion of the number of features in the current feature selection scheme for each individual to the total number of features, calculate the corresponding feature quantity penalty term; The fitness function value of each individual is calculated based on the average accuracy and the feature quantity penalty term.

6. The brushing quality assessment method based on machine learning as described in claim 1, characterized in that, The brushing position recognition model, constructed based on a machine learning model and a second training dataset, includes: An initial brushing position recognition model is obtained by constructing an initial SVM model based on a preset initial model; Several second toothbrush motion datasets are obtained, and each second toothbrush motion dataset is labeled to obtain a second training dataset; Several training data are extracted from the second training dataset according to the first feature mapping table; The initial brushing position recognition model is trained based on the aforementioned training data to obtain the brushing position recognition model.

7. The brushing quality assessment method based on machine learning as described in claim 1, characterized in that, The feature dataset includes several axis time-domain feature datasets, several axis frequency-domain feature datasets, acceleration synthesis time-domain feature datasets, angular velocity synthesis time-domain feature datasets, several acceleration-related features, and several angular velocity-related features. The axis time-domain feature dataset includes several statistical features, several peak features, and zero-crossing rate features. The axis frequency-domain feature dataset includes main frequency features, several spectral statistical features, and several frequency band energy features. The acceleration synthesis time-domain feature dataset includes several acceleration synthesis statistical features, several acceleration synthesis peak features, and acceleration synthesis zero-crossing rate features. The angular velocity synthesis time-domain feature dataset includes several angular velocity synthesis statistical features, several angular velocity synthesis peak features, and angular velocity synthesis zero-crossing rate features. The brushing quality assessment result for the current position is calculated based on the current brushing position, the several second toothbrush motion features, and preset scoring rules, including: The vibration frequency of the target toothbrush is evaluated based on the aforementioned peak characteristics and the aforementioned composite peak characteristics of acceleration. The vibration intensity of the target toothbrush is evaluated based on the aforementioned frequency band energy characteristics. A vibration quality score is calculated based on the vibration frequency and the vibration intensity. The motion amplitude of the target toothbrush is evaluated based on the aforementioned statistical characteristics, the motion intensity and amplitude control stability of the target toothbrush are evaluated based on the aforementioned composite acceleration statistical characteristics, and an amplitude control score is calculated based on the motion amplitude, the motion intensity, and the amplitude control stability. The main frequency consistency of the target toothbrush is evaluated based on the aforementioned main frequency characteristics, the rationality of the spectrum distribution of the target toothbrush is evaluated based on the aforementioned spectral statistical characteristics, and a frequency consistency score is calculated based on the main frequency consistency and the rationality of the spectrum distribution. The rotation rationality of the target toothbrush is evaluated based on the current brushing position and the statistical features. The motion coordination of the target toothbrush is evaluated based on the acceleration-related features and the angular velocity-related features. A directional control score is calculated based on the rotation rationality and the motion coordination. A motion smoothness score is calculated based on the aforementioned statistical characteristics; The brushing quality assessment result is obtained by weighting and summing the vibration quality score, amplitude control score, frequency consistency score, direction control score, and motion smoothness score.

8. A machine learning-based brushing quality assessment system, characterized in that, It includes an acquisition module, a feature extraction module, a first filtering module, a location recognition module, a second filtering module, and a quality assessment module; The acquisition module is used to acquire a real-time toothbrush motion dataset within a preset time window. The feature extraction module is used to extract feature datasets from the real-time toothbrush motion dataset based on a preset frequency domain transformation method. The first filtering module is used to filter and obtain several first toothbrush motion features from the feature dataset according to a preset first feature mapping table, wherein the first feature mapping table is constructed based on a genetic algorithm to select features from the first training dataset; The position recognition module is used to input each of the first toothbrush motion features into a preset brushing position recognition model, so that the brushing position recognition model outputs the current brushing position, wherein the brushing position recognition model is constructed based on a machine learning model and a second training dataset; The second filtering module is used to filter and obtain several second toothbrush motion features from the several first toothbrush motion features according to a preset second feature mapping table, wherein the second feature mapping table is constructed based on the first feature mapping table and the Bass brushing technique standard; The quality assessment module is used to calculate the brushing quality assessment result at the current brushing position based on the current brushing position, the movement characteristics of the several second toothbrushes, and the preset scoring rules.

9. The brushing quality assessment system based on machine learning as described in claim 8, characterized in that, The feature extraction module extracts a feature dataset from the real-time toothbrush motion dataset based on a preset frequency domain transformation method, including: Extract axis time-domain feature datasets from the real-time toothbrush motion dataset, using axes as units; Using the frequency domain transformation method, axis frequency domain feature datasets are extracted from the real-time toothbrush motion dataset, with each axis as the unit. A three-axis composite acceleration amplitude sequence is calculated based on the three-axis acceleration data sequence in the real-time toothbrush motion dataset, and an acceleration composite time-domain feature dataset is extracted from the three-axis composite acceleration amplitude sequence. The three-axis angular velocity composite amplitude sequence is calculated based on the three-axis angular velocity data sequence in the real-time toothbrush motion dataset, and the angular velocity composite time domain feature dataset is extracted from the three-axis angular velocity composite amplitude sequence using the frequency domain transformation method. Based on the triaxial acceleration data sequence, the acceleration correlation coefficient between each acceleration axis and the angular velocity correlation coefficient between each angular velocity axis are calculated to obtain several acceleration correlation features and several angular velocity correlation features. The feature dataset is constructed by combining the time-domain feature datasets of each axis, the frequency-domain feature datasets of each axis, the time-domain feature dataset of acceleration, the time-domain feature dataset of angular velocity, the several acceleration-related features, and the several angular velocity-related features.

10. The brushing quality assessment system based on machine learning as described in claim 8, characterized in that, The brushing quality assessment system further includes a mapping table construction module, which is used to construct the first feature mapping table after feature selection on the first training dataset based on a genetic algorithm, including: Obtain several first toothbrush motion datasets and label each first toothbrush motion dataset to obtain a first training dataset; Based on each feature in the feature dataset, several feature selection schemes are randomly generated as several individuals, and the initial population in the genetic algorithm is constructed based on each individual. The initial population is iterated and evolved several times according to the genetic algorithm until the preset conditions are met, and the optimal feature selection scheme is obtained. The first feature mapping table is constructed based on the feature selection scheme. In each iteration, the fitness function value corresponding to each individual is calculated according to the feature selection scheme and the first training data. Based on the fitness function value, the current individuals are selected, crossovered, mutated and retained to obtain several individuals to enter the next iteration.