Method and system for visually customizing myopia prevention and control data of children and teenagers

By constructing a feature matrix and multi-time data model, combining real-time updates and dynamic displays, the shortcomings of visualization methods for myopia prevention and control data in children and adolescents in the existing technology are solved, and a comprehensive evaluation and dynamic display of myopia prevention and control data are realized. Intuitive and accurate data support helps decision makers effectively deal with myopia prevention and control problems.

CN119446513APending Publication Date: 2025-02-14YUNCHENG OPHTHALMOLOGY HOSPITAL CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411455658.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing visualization methods for myopia prevention and control data in children and adolescents cannot effectively process and display large-scale, multi-source, heterogeneous data, and there are obvious shortcomings in real-time updates and dynamic display of data, which ignores the time series characteristics and multiple data. The characteristics of the time period cannot accurately reflect the long-term effect and timeliness of myopia prevention and control measures.

Method used

By collecting and constructing data sets related to myopia prevention and control in children and adolescents, dividing the training set and test sets, building feature matrices, and dividing the training sets in multiple periods in chronological order, building multiple data models, and fusing the output of multiple data models To generate a visual model, real-time update and dynamic display of myopia prevention and control data.

Benefits of technology

A comprehensive assessment of myopia prevention and control data for children and adolescents has been achieved, and the key characteristics and trends of myopia prevention and control data have been captured and displayed dynamically, and intuitive and accurate data support is provided to help decision makers quickly and accurately grasp the overall situation of myopia prevention and control, and Discover problems in a timely manner and take corresponding intervention measures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119446513A_ABST
    Figure CN119446513A_ABST
Patent Text Reader

Abstract

The invention provides a visual customization method and system for myopia prevention and control data of children and teenagers, and the method comprises the steps: collecting data related to myopia prevention and control of children and teenagers, constructing a data set, and dividing a training set and a test set from the data set; constructing a feature matrix according to the features of the data in the training set and the myopia prevention and control effect; performing multi-period division on the training set according to a time sequence, constructing a plurality of data models according to each period, and fusing outputs of the plurality of data models to obtain a visual model; based on the training set and the feature matrix, training a visual model to obtain a trained visual model; and collecting to-be-visualized myopia prevention and control data, selecting to-be-displayed samples of each time period according to the to-be-visualized time period and a preset sample number of each time period, transmitting the selected to-be-displayed samples to the trained visualization model, and obtaining myopia prevention and control data display of the to-be-visualized time period. According to the invention, myopia prevention and control data of children and teenagers can be effectively analyzed and displayed, and the pertinence and effect of myopia prevention and control measures are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data visualization technology, and more specifically, to a method and system for customizing visualization of data for myopia prevention and control in children and adolescents. Background Art

[0002] In existing research on myopia prevention and control among children and adolescents, data collection and analysis mostly rely on traditional statistical methods, which often lack real-time and dynamic features and are difficult to fully reflect the multi-dimensional characteristics of myopia prevention and control effects. In addition, traditional data display methods are relatively simple and it is difficult to intuitively display the effects and trends of myopia prevention and control measures, making it difficult for relevant decision makers to quickly and accurately grasp the overall situation of myopia prevention and control. In terms of technical principles, existing research has mostly focused on the single effect evaluation of myopia prevention and control measures, while ignoring the mutual influence and comprehensive effects of different measures, resulting in the inability to effectively integrate and utilize a large number of scattered data resources.

[0003] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following problems or defects in the prior art: the existing myopia prevention and control data visualization method cannot effectively process and display large-scale, multi-source, heterogeneous data, and has obvious deficiencies in real-time updating and dynamic display of data. In addition, when processing myopia prevention and control data, the prior art often ignores the time series characteristics and multi-period characteristics of the data, resulting in the inability to accurately reflect the long-term effects and timeliness of myopia prevention and control measures. Summary of the invention

[0004] The present invention provides a method and system for visually customizing data on myopia prevention and control for children and adolescents.

[0005] In a first aspect of the present invention, a method for visualizing and customizing data on myopia prevention and control in children and adolescents is provided, comprising: Collect data related to myopia prevention and control among children and adolescents, construct a data set, and divide the data set into a training set and a test set; construct a feature matrix based on the characteristics of each data in the training set and the effect of myopia prevention and control; Divide the training set into multiple time periods in chronological order, build multiple data models according to each time period, and fuse the outputs of multiple data models to obtain a visualization model; train the visualization model based on the training set and the feature matrix to obtain a trained visualization model; Collect the myopia prevention and control data to be visualized, select the samples to be displayed in each time period according to the time period to be visualized and the preset number of samples in each time period, and pass them into the trained visualization model to obtain the myopia prevention and control data display of the time period to be visualized.

[0006] Furthermore, the feature matrix is ​​constructed according to the features of each data in the training set and the effect of myopia prevention and control, including: According to the statistical characteristics of each data in the training set, a basic feature matrix is ​​constructed; According to the effect of myopia prevention and control of each data in the training set, the myopia prevention and control effect index of each data is obtained to form the myopia prevention and control effect distribution of each data; correlation analysis is adopted, and the Pearson correlation coefficient is used as the cost function of effect distribution transfer to calculate the myopia prevention and control effect distribution distance between any two data, and construct a correlation matrix; After multiplying and superimposing the element values ​​in the correlation matrix and the basic feature matrix with the preset correlation matrix weight and the basic feature matrix weight, the superimposed values ​​are binarized according to the threshold value to obtain the feature matrix.

[0007] Furthermore, dividing the training set into multiple time periods in chronological order includes: According to the temporal distribution of myopia prevention and control data, the training samples are divided into short-term, medium-term, long-term and special periods according to the preset number of samples in each time period; among them, the short-term period is the time period within the most recent [1.5,2.5] months of the myopia prevention and control data, the medium-term period is the time period every six months of the myopia prevention and control data, the long-term period is the time period every year of the myopia prevention and control data, and the special period is the specific holiday or school holiday time period in the myopia prevention and control data.

[0008] Furthermore, constructing multiple data models according to each time period and fusing the outputs of the multiple data models to obtain a visualization model includes: The data model corresponding to the short-term period includes a feature extraction layer, a time series analysis layer and a first fully connected layer connected in sequence. The medium-term period, long-term period and special period correspond to the same data model, including a feature extraction layer, a temporal attention layer and a temporal convolution layer connected in sequence. The outputs of the four data models are weightedly fused through the second fully connected layer to obtain a visualization model.

[0009] Furthermore, the feature extraction layer includes a feature attention layer and a feature extraction neural network connected in sequence. The feature attention layer calculates a feature attention score matrix according to the differences in myopia prevention and control effects between the data in the corresponding time period, and dynamically smoothes the feature attention score matrix according to the feature significance, and then passes it into the feature extraction neural network; the feature extraction neural network uses an autoencoder as an extraction kernel, and performs feature extraction on the training samples of the corresponding time period based on the feature matrix and the smoothed feature attention score matrix.

[0010] Furthermore, the temporal attention layer calculates a temporal attention score matrix according to the differences in myopia prevention and control effects between time slices in the corresponding period, and dynamically weights the output results of the corresponding feature extraction layer according to the temporal attention score matrix, and outputs them to the temporal convolution layer; the temporal convolution layer is a convolutional neural network, which convolves and merges the output results of the temporal attention layer, and maps them to output using the ReLU function.

[0011] Furthermore, the dynamically smoothing feature attention score matrix according to feature significance includes: According to the sum of the differences between the myopia prevention and control effect vectors of each data and its similar data, the mean of the sum of the differences is calculated as the characteristic significance of the corresponding period; Obtain the number to be retained based on feature significance and preset multiples; According to the number to be retained, the corresponding element values ​​are retained in the order of the element values ​​in the feature attention score matrix from large to small, and the remaining element values ​​are set to zero to obtain the smoothed feature attention score matrix.

[0012] Furthermore, the training of the visualization model based on the training set and the feature matrix to obtain the trained visualization model includes: Introducing the idea of ​​transfer learning, in each round of training, all training samples of the short-term period are selected and passed into the data model corresponding to the short-term period; according to the training schedulers corresponding to the medium-term period, long-term period and special period, the corresponding training samples are selected and passed into the corresponding data models respectively; Each data model outputs a prediction of the myopia prevention and control effect based on the input training samples and feature matrix, and compares it with the corresponding actual myopia prevention and control effect. The mean square error is selected as the loss function of the visualization model. When the mean square error reaches the preset error value, the training ends and a trained visualization model is obtained.

[0013] In a second aspect of the present invention, a system for visualizing and customizing data on myopia prevention and control in children and adolescents is provided, comprising: The data collection module is used to collect data related to the prevention and control of myopia among children and adolescents, and to construct a data set, from which training sets and test sets are divided; A feature construction module is used to construct a feature matrix based on the characteristics of each data in the training set and the effect of myopia prevention and control; The time period division module is used to divide the training set into multiple time periods in chronological order and build multiple data models according to each time period; Model fusion module, used to fuse the outputs of multiple data models to obtain a visualization model; The model training module is used to train the visualization model based on the training set and feature matrix to obtain a trained visualization model; The data display module is used to collect myopia prevention and control data to be visualized. According to the time period to be visualized and the preset number of samples in each time period, the samples to be displayed in each time period are selected and passed into the trained visualization model to obtain the myopia prevention and control data display of the time period to be visualized.

[0014] According to the above-mentioned embodiments of the present invention, at least the following beneficial effects are achieved: the method for visualizing and customizing data on myopia prevention and control in children and adolescents of the present invention can effectively integrate and analyze data related to myopia prevention and control in children and adolescents, and realize a comprehensive evaluation of the effect of myopia prevention and control by constructing a feature matrix and a multi-period data model. Through feature extraction, time attention analysis, and feature attention analysis, the method can dynamically capture and display the key features and trends of myopia prevention and control data, thereby providing intuitive and accurate data support for decision makers. In addition, by fusing the outputs of multiple data models, the method can generate a comprehensive visualization model, making the effects and trends of myopia prevention and control more clearly visible, which helps to detect problems in a timely manner and take corresponding intervention measures.

[0015] The implementation of this system can improve the efficiency and effectiveness of myopia prevention and control for children and adolescents. By updating and dynamically displaying myopia prevention and control data in real time, relevant decision makers can respond quickly and adjust prevention and control strategies. At the same time, by introducing the idea of ​​transfer learning, the system can continuously optimize and adjust the visualization model to adapt to the ever-changing data and environment, ensuring the accuracy and reliability of the visualization results. The application of this method can not only improve the scientificity and systematicness of myopia prevention and control work, but also provide reference and reference for data visualization in other public health fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which: Figure 1 A schematic flow chart of a method for visualizing and customizing data on myopia prevention and control for children and adolescents provided in one embodiment of the present invention; Figure 2 A schematic diagram of the structure of a system for visualizing and customizing myopia prevention and control data for children and adolescents provided in an embodiment of the present invention; Figure 3 The schematic diagram schematically shows the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.

[0018] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, apparatus, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0019] It should be noted that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.

[0020] Reference below Figure 1 , Figure 1 A flow chart of a method for visualizing and customizing myopia prevention and control data for children and adolescents provided in one embodiment of the present invention. Figure 1 As shown, a method 100 for visualizing and customizing data on myopia prevention and control for children and adolescents includes: Step 101, collecting data related to myopia prevention and control among children and adolescents, constructing a data set, and dividing the data set into a training set and a test set; constructing a feature matrix according to the characteristics of each data in the training set and the effect of myopia prevention and control; Step 102, dividing the training set into multiple time periods in chronological order, constructing multiple data models according to each time period, and fusing the outputs of the multiple data models to obtain a visualization model; training the visualization model based on the training set and the feature matrix to obtain a trained visualization model; Step 103, collect the myopia prevention and control data to be visualized, select the samples to be displayed in each time period according to the time period to be visualized and the preset number of samples in each time period, and pass them into the trained visualization model to obtain the myopia prevention and control data display of the time period to be visualized.

[0021] Specifically, when constructing a data set, a database system can be used to store and manage data while ensuring data security and privacy. When dividing the training set and the test set, common data partitioning techniques such as random partitioning and stratified sampling can be used to ensure the uniformity and representativeness of data distribution. In addition, the construction of the feature matrix requires analysis of the statistical features in the data set, including but not limited to the mean, variance, maximum value, minimum value, etc., as well as indicators of myopia prevention and control effects, such as changes in myopia degree and improvements in corrected vision.

[0022] Preferably, in order to improve the accuracy and generalization ability of the data model, more statistical features and effect indicators can be introduced when constructing the feature matrix, such as the skewness and kurtosis of the data, as well as the implementation frequency and duration of myopia prevention and control measures. At the same time, when dividing the training set and the test set, the cross-validation method can be considered to further improve the stability and reliability of the model. In addition, in order to adapt to different data scales and complexities, the data model can be adjusted, such as increasing or decreasing the number of layers of the data model, adjusting the parameters of the model, etc., to achieve the best visualization effect.

[0023] In some embodiments, constructing a feature matrix according to the features of each data in the training set and the effect of myopia prevention and control includes: According to the statistical characteristics of each data in the training set, a basic feature matrix is ​​constructed; According to the effect of myopia prevention and control of each data in the training set, the myopia prevention and control effect index of each data is obtained to form the myopia prevention and control effect distribution of each data; correlation analysis is adopted, and the Pearson correlation coefficient is used as the cost function of effect distribution transfer to calculate the myopia prevention and control effect distribution distance between any two data, and construct a correlation matrix; After multiplying and superimposing the element values ​​in the correlation matrix and the basic feature matrix with the preset correlation matrix weight and the basic feature matrix weight, the superimposed values ​​are binarized according to the threshold value to obtain the feature matrix.

[0024] It should be noted that this embodiment involves constructing a feature matrix based on the characteristics of each data in the training set and the effect of myopia prevention and control. This step is a key link in the data visualization customization method, which allows the system to more accurately identify and process key information in the data, thereby improving the prediction and visualization effects of the model. The process of constructing a feature matrix includes the construction of a basic feature matrix and a correlation matrix, which together constitute the feature matrix ultimately used for model training.

[0025] Specifically, the construction of the basic feature matrix can be achieved by statistically analyzing the statistical features of each data in the training set. These statistical features may include but are not limited to the mean, standard deviation, maximum value, minimum value, etc. of the data. At the same time, the evaluation of the effect of myopia prevention and control can be completed by setting a series of effect indicators. These indicators may cover the change in myopia degree, vision improvement, etc. The construction of the correlation matrix involves calculating the distribution distance of the myopia prevention and control effect of any two data, which can usually be achieved through the Pearson correlation coefficient. The calculation of the correlation coefficient requires setting a threshold to determine which data points are strongly correlated enough to be worth representing in the matrix.

[0026] Preferably, in order to improve the expressive power of the feature matrix and the prediction accuracy of the model, more data preprocessing steps can be introduced, such as data normalization, missing value processing, etc. In addition, the construction of the correlation matrix can consider the use of other correlation measurement methods, such as Spearman's rank correlation coefficient or Kendall's rank correlation coefficient, to adapt to different types of data distribution. In the binarization of the feature matrix, different threshold setting strategies can be selected, such as percentile thresholds based on data distribution or dynamic thresholds based on model performance optimization, to better reflect the relationship between data. These optimization measures help improve the model's ability to understand and process data, thereby improving the accuracy and effectiveness of data visualization.

[0027] In some embodiments, dividing the training set into multiple time periods in chronological order includes: According to the temporal distribution of myopia prevention and control data, the training samples are divided into short-term, medium-term, long-term and special periods according to the preset number of samples in each time period; among them, the short-term period is the time period within the most recent [1.5,2.5] months of the myopia prevention and control data, the medium-term period is the time period every six months of the myopia prevention and control data, the long-term period is the time period every year of the myopia prevention and control data, and the special period is the specific holiday or school holiday time period in the myopia prevention and control data.

[0028] Preferably, in the process of dividing the training set into multiple time periods in chronological order, the method divides the training samples into short-term period, medium-term period, long-term period and special period by considering the time distribution characteristics of myopia prevention and control data.

[0029] Specifically, the short-term period can be defined as the time period within the last 1.5 to 2.5 months of myopia prevention and control data, the medium-term period is the time period every six months, the long-term period is the time period every year, and the special period includes specific holidays or school vacations. When dividing, the corresponding training samples can be filtered out based on the preset number of samples in each time period using timestamp information and date range. For example, training samples for a short-term period may include vision examination records and outdoor activity time in recent months, while training samples for a special period may include myopia prevention and control data during the holidays.

[0030] More specifically, in order to divide the time periods more accurately, an automated time period division algorithm can be used, which can automatically determine the boundaries of each time period based on the timestamp of the data. In addition, the division of time periods can also be adjusted according to actual myopia prevention and control activities and research needs. For example, if it is found that the myopia prevention and control effects of certain special periods, such as summer vacation, have changed significantly, the number of samples in these time periods can be increased so that the model can better learn and predict the myopia prevention and control effects of these time periods. In practical applications, it is also possible to consider introducing machine learning technology to optimize the division of time periods, and to determine the optimal time period division strategy by analyzing historical data to improve the prediction accuracy and visualization effect of the model.

[0031] In some embodiments, constructing multiple data models according to each time period and fusing outputs of the multiple data models to obtain a visualization model includes: The data model corresponding to the short-term period includes a feature extraction layer, a time series analysis layer and a first fully connected layer connected in sequence. The medium-term period, long-term period and special period correspond to the same data model, including a feature extraction layer, a temporal attention layer and a temporal convolution layer connected in sequence. The outputs of the four data models are weightedly fused through the second fully connected layer to obtain a visualization model.

[0032] It should be noted that this embodiment involves constructing multiple data models according to each time period, and obtaining a comprehensive visualization model by fusing the outputs of these models. This method allows the system to adopt different data processing and analysis strategies according to the characteristics of different time periods, thereby improving the adaptability and accuracy of the model.

[0033] Specifically, the data model corresponding to the short-term period may include a feature extraction layer, a time series analysis layer, and a fully connected layer. The data model for the medium-term period, long-term period, and special period may include a feature extraction layer, a time attention layer, and a time convolution layer. The feature extraction layer is responsible for extracting useful features from the original data, while the time attention layer and the time convolution layer are used to analyze the time series data and capture time dependencies. The second fully connected layer is used to weightedly fuse the outputs of the models for different periods to form the final visualization model. When building these models, deep learning frameworks such as TensorFlow or PyTorch can be used to define and train the models.

[0034] Preferably, in order to improve the performance and adaptability of the model, the structure and parameters of the model can be adjusted. For example, the number of layers in the model can be increased or decreased, the number of neurons in the hidden layer can be adjusted, or different activation functions can be selected, such as ReLU, Leaky ReLU, or Sigmoid. In addition, the optimal model parameters can be determined by cross-validation or hyperparameter optimization techniques. When fusing the outputs of models in different time periods, different weighting strategies can be adopted, such as weighting based on the importance of the time period, or weighting based on model performance, to ensure that the final visualization model can accurately reflect the myopia prevention and control effects in different time periods. These optimization measures help to improve the prediction accuracy and visualization effect of the model.

[0035] In some embodiments, the feature extraction layer includes a feature attention layer and a feature extraction neural network connected in sequence. The feature attention layer calculates a feature attention score matrix based on the differences in myopia prevention and control effects between the data in the corresponding time period, and dynamically smoothes the feature attention score matrix according to the feature significance, and then passes it into the feature extraction neural network; the feature extraction neural network uses an autoencoder as an extraction kernel, and performs feature extraction on the training samples of the corresponding time period based on the feature matrix and the smoothed feature attention score matrix.

[0036] It should be noted that the construction of the feature extraction layer is a key part of the entire data model, which is responsible for extracting features useful for predicting the effect of myopia prevention and control from the input data. This layer includes a feature attention layer and a feature extraction neural network. The feature attention layer calculates the feature attention score matrix based on the difference in myopia prevention and control effects between data, while the feature extraction neural network uses technologies such as autoencoders to extract features.

[0037] Specifically, the feature attention layer can be implemented by designing an attention mechanism that can dynamically adjust the attention to each feature according to the difference in the myopia prevention and control effect of the data in the corresponding time period. For example, a weighted sum-based attention score calculation formula can be set, where the weight is determined by the correlation between the data. The feature extraction neural network can use an autoencoder architecture, which learns effective feature representations from the data through unsupervised learning. The autoencoder usually consists of two parts: an encoder and a decoder. The encoder is responsible for compressing the input data into a low-dimensional feature representation, and the decoder attempts to reconstruct the original data from this low-dimensional representation.

[0038] Preferably, in order to improve the efficiency and accuracy of feature extraction, the feature attention layer and feature extraction neural network can be further optimized. For example, more regularization techniques, such as dropout or L2 regularization, can be introduced to prevent the model from overfitting. At the same time, different autoencoder architectures, such as variational autoencoders VAE or sparse autoencoders, can be considered to better capture the potential structure of the data. In addition, the training process of the model can be optimized by adjusting the number of neurons in the encoding layer and decoding layer of the autoencoder, or by changing the learning rate and optimization algorithm. These improvements help to improve the model's ability to extract data features, thereby improving the performance of the entire data visualization customization method.

[0039] In some embodiments, the temporal attention layer calculates a temporal attention score matrix based on the differences in myopia prevention and control effects between time slices in the corresponding time period, and dynamically weights the output results of the corresponding feature extraction layer according to the temporal attention score matrix, and outputs them to the temporal convolution layer; the temporal convolution layer is a convolutional neural network, which convolves and merges the output results of the temporal attention layer, and then maps them to output using the ReLU function.

[0040] Specifically, the calculation of the temporal attention score matrix can be implemented through an attention mechanism, which analyzes the feature representation of each time slice and assigns different weights according to the importance of these features. For example, a weighted sum-based attention score calculation formula can be used, where the weight is determined by the correlation between time slices. The temporal convolution layer can adopt the structure of the convolutional neural network CNN, which processes time series data through convolution and merging operations, and enhances the nonlinear expression ability of the model through activation functions such as ReLU.

[0041] Preferably, in order to further improve the performance of the temporal attention layer, it is possible to consider introducing a more complex attention mechanism, such as a multi-head attention mechanism, which can analyze the relationship between time slices from multiple perspectives, thereby capturing the characteristics of the time series more comprehensively. In addition, the design of the temporal convolution layer can also be further optimized. For example, the model's ability to process time series data can be improved by increasing the depth of the convolution layer or changing the size of the convolution kernel. In practical applications, the parameters of the temporal attention layer and the temporal convolution layer, such as the learning rate and the choice of optimizer, can also be adjusted according to the characteristics and requirements of the data to achieve the best model performance. These optimization measures help improve the model's ability to analyze time series data, thereby improving the effect of the entire data visualization customization method.

[0042] In some embodiments, the element value A of the feature attention score matrix ij The calculation process is:

[0043] in, It represents the value of the i-th data on the k-th feature in the corresponding period. represents the value of the jth data on the kth feature in the corresponding period, W k and b k are the weight and bias parameters of the kth feature, α is an adjustable scaling factor, σ is the softmax activation function, LeakyReLU is a rectified linear unit activation function with a small slope, and N is the total number of data.

[0044] Specifically, the calculation of the feature attention score matrix can be implemented by a neural network layer containing weight parameters and bias parameters. In this process, the value of each feature will pass through a linear transformation, defined by the weight and bias parameters, and then normalized by an activation function such as softmax or ReLU to ensure that the sum of the attention scores of all features is 1. For example, a fully connected layer can be used to implement this linear transformation, where each feature corresponds to a weight and bias parameter. The choice of activation function and the initialization of the parameters will directly affect the distribution of the attention scores.

[0045] Preferably, in order to improve the flexibility and accuracy of the feature attention score matrix calculation, more parameters and complex calculation methods can be introduced. For example, a fully connected layer with mini-batch regularization can be used to reduce the overfitting of the model to the training data. In addition, nonlinear activation functions such as the hyperbolic tangent function tanh can be considered to increase the expressive power of the model. In practical applications, cross-validation can also be used to select the best parameter settings, such as weight initialization strategy, learning rate, and regularization strength to ensure that the model can achieve good performance on different data sets. These optimization measures help improve the performance of the feature attention layer, thereby improving the prediction accuracy of the entire data model.

[0046] In some embodiments, the element value T of the temporal attention score matrix ij The calculation process is:

[0047] in, represents the myopia prevention and control effect vector of the i-th data at time slice p in the corresponding period, represents the myopia prevention and control effect vector of the jth data at time slice p in the corresponding period, V p and c p are the weight and bias parameters of time slice p, β is an adjustable scaling factor, softmax is the softmax activation function, tanh is the hyperbolic tangent activation function, and M is the number of time slices in the corresponding period.

[0048] Specifically, the calculation of the temporal attention score matrix can be implemented through a neural network layer based on time series data. In this process, the myopia prevention and control effect vector of each time slice will pass through a linear transformation, defined by weight parameters and bias parameters, and then normalized by an activation function such as softmax or hyperbolic tangent function to ensure that the sum of the attention scores of all time slices is 1. For example, a fully connected layer can be used to implement this linear transformation, in which each time slice corresponds to a weight and bias parameter. The choice of activation function and the initialization of parameters will directly affect the distribution of attention scores.

[0049] Preferably, in order to improve the flexibility and accuracy of the temporal attention score matrix calculation, more parameters and complex calculation methods can be introduced. For example, a fully connected layer with mini-batch regularization can be used to reduce the overfitting of the model to the training data. In addition, more complex activation functions, such as the hyperbolic tangent function tanh, can be considered to increase the expressive power of the model. In practical applications, cross-validation can also be used to select the best parameter settings, such as weight initialization strategy, learning rate, and regularization strength, to ensure that the model can achieve good performance on different data sets.

[0050] In some embodiments, the dynamically smoothing the feature attention score matrix according to feature saliency includes: According to the sum of the differences between the myopia prevention and control effect vectors of each data and its similar data, the mean of the sum of the differences is calculated as the characteristic significance of the corresponding period; Obtain the number to be retained based on feature significance and preset multiples; According to the number to be retained, the corresponding element values ​​are retained in the order of the element values ​​in the feature attention score matrix from large to small, and the remaining element values ​​are set to zero to obtain the smoothed feature attention score matrix.

[0051] Specifically, the calculation of feature significance can be achieved by analyzing the sum of the differences between the myopia prevention and control effect vectors of each data and its similar data. The mean of the sum of differences is used as a measure of feature significance, which reflects the overall importance of the feature in the myopia prevention and control effect. According to the feature significance and the preset multiples, the number of features to be retained can be determined, and then the high-value features are retained in the order of the element values ​​in the feature attention score matrix, and the values ​​of the remaining features are set to zero to achieve dynamic smoothing of the features.

[0052] Preferably, in order to further improve the accuracy of feature saliency calculation and the generalization ability of the model, more feature selection and smoothing techniques can be introduced. For example, methods based on information gain or mutual information can be used to evaluate the importance of features, or methods based on cluster analysis can be used to identify and retain those features that are representative in the data set. In addition, an adaptive threshold strategy can be considered to dynamically adjust the smoothing threshold according to the distribution of the data and the training progress of the model to better reflect the importance of the feature. In practical applications, the optimal smoothing parameters and methods can also be determined through experiments and verification to ensure that the model can achieve optimal performance on different data sets.

[0053] In some embodiments, the step of training the visualization model based on the training set and the feature matrix to obtain the trained visualization model includes: Introducing the idea of ​​transfer learning, in each round of training, all training samples of the short-term period are selected and passed into the data model corresponding to the short-term period; according to the training schedulers corresponding to the medium-term period, long-term period and special period, the corresponding training samples are selected and passed into the corresponding data models respectively; Each data model outputs a prediction of the myopia prevention and control effect based on the input training samples and feature matrix, and compares it with the corresponding actual myopia prevention and control effect. The mean square error is selected as the loss function of the visualization model. When the mean square error reaches the preset error value, the training ends and a trained visualization model is obtained.

[0054] Specifically, the application of transfer learning can be achieved by first selecting all the training samples of the short-term period in each round of training, and passing them into the data model corresponding to the short-term period. Then, according to the training schedulers corresponding to the medium-term period, long-term period and special period, the corresponding training samples are selected and passed into the corresponding data models respectively. In this process, different training strategies can be used, such as different learning rates, batch sizes or optimization algorithms, to adapt to the characteristics of data in different time periods. The mean square error is used as a loss function to measure the difference between the model prediction value and the actual myopia prevention and control effect. The training will continue until the mean square error reaches the preset error value. At this time, the training ends and a trained visualization model is obtained.

[0055] Preferably, in order to improve the training efficiency and prediction accuracy of the model, the training process can be further optimized. For example, early stopping can be used to prevent overfitting, by monitoring the performance of the model on the validation set, and stopping training when the performance no longer improves. In addition, model integration techniques, such as random forests or boosting methods, can be introduced to combine the prediction results of multiple models to improve the overall prediction performance. In practical applications, the performance of the model can be further optimized by adjusting the architecture of the model, such as increasing or decreasing the number of layers, changing the connection method of the layers, etc. These optimization measures help to improve the model's learning and prediction capabilities for myopia prevention and control data, thereby improving the effect and practicality of data visualization.

[0056] The above-mentioned embodiments of the present invention have the following beneficial effects: the method for visualizing and customizing myopia prevention and control data for children and adolescents of the present invention can conduct in-depth analysis and effective display of data related to myopia prevention and control, and realize a comprehensive evaluation of the effect of myopia prevention and control by constructing a feature matrix and a multi-period data model. Through feature extraction, time attention analysis and feature attention analysis, this method can dynamically capture and display the key features and trends of myopia prevention and control data, and provide intuitive and accurate data support for decision makers. In addition, by fusing the outputs of multiple data models, a comprehensive visualization model is generated, which makes the effects and trends of myopia prevention and control more clearly visible, and helps to find problems in a timely manner and take corresponding intervention measures.

[0057] The implementation of this method can improve the efficiency and effectiveness of myopia prevention and control for children and adolescents. By updating and dynamically displaying myopia prevention and control data in real time, relevant decision makers can respond quickly and adjust prevention and control strategies. At the same time, by introducing the idea of ​​transfer learning, this method can continuously optimize and adjust the visualization model to adapt to the ever-changing data and environment, ensuring the accuracy and reliability of the visualization results. The application of this method can not only improve the scientificity and systematicness of myopia prevention and control work, but also provide reference and reference for data visualization in other public health fields.

[0058] like Figure 2 As shown, in some embodiments, a system 200 for visualizing and customizing myopia prevention and control data for children and adolescents includes: The data collection module 201 is used to collect data related to the prevention and control of myopia in children and adolescents, and to construct a data set, and to divide the data set into a training set and a test set; A feature construction module 202 is used to construct a feature matrix according to the features of each data in the training set and the effect of myopia prevention and control; The time period division module 203 is used to divide the training set into multiple time periods according to the time sequence, and construct multiple data models according to each time period; A model fusion module 204 is used to fuse the outputs of multiple data models to obtain a visualization model; A model training module 205 is used to train a visualization model based on a training set and a feature matrix to obtain a trained visualization model; The data display module 206 is used to collect myopia prevention and control data to be visualized, and select samples to be displayed in each time period according to the time period to be visualized and the preset number of samples in each time period, and pass them into the trained visualization model to obtain the myopia prevention and control data display of the time period to be visualized.

[0059] It is understandable that the modules and references recorded in the system 200 for visualizing and customizing data on myopia prevention and control for children and adolescents Figure 1 Therefore, the operations, features and beneficial effects described above for the method for visualizing and customizing data for myopia prevention and control in children and adolescents are also applicable to the system 200 for visualizing and customizing data for myopia prevention and control in children and adolescents and the modules contained therein, and will not be described in detail here.

[0060] Reference below Figure 3 , which shows a schematic diagram of a structure 300 of an electronic device suitable for implementing some embodiments of the present invention. The electronic devices in some embodiments of the present invention may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0061] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0062] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0063] Furthermore, the storage medium of the embodiment of the present application stores program instructions that can implement all the above methods, wherein the program instructions can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.

[0064] The above descriptions are only some preferred embodiments of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present invention to form a technical solution.

Claims

1. A method for visualizing and customizing data on myopia prevention and control for children and adolescents, characterized in that: The following steps are involved: Collect data related to myopia prevention and control among children and adolescents, construct a data set, and divide the data set into a training set and a test set; construct a feature matrix based on the characteristics of each data in the training set and the effect of myopia prevention and control; The training set is divided into multiple time periods in chronological order, multiple data models are constructed according to each time period, and the outputs of multiple data models are integrated to obtain a visualization model; Based on the training set and the feature matrix, the visualization model is trained to obtain a trained visualization model; Collect the myopia prevention and control data to be visualized, select the samples to be displayed in each time period according to the time period to be visualized and the preset number of samples in each time period, and pass them into the trained visualization model to obtain the myopia prevention and control data display of the time period to be visualized.

2. The method for visualizing and customizing data on myopia prevention and control for children and adolescents according to claim 1, characterized in that: According to the characteristics of each data in the training set and the effect of myopia prevention and control, a feature matrix is ​​constructed, including: According to the statistical characteristics of each data in the training set, a basic feature matrix is ​​constructed; According to the effect of myopia prevention and control of each data in the training set, the myopia prevention and control effect index of each data is obtained to form the myopia prevention and control effect distribution of each data; correlation analysis is adopted, and the Pearson correlation coefficient is used as the cost function of effect distribution transfer to calculate the myopia prevention and control effect distribution distance between any two data, and construct a correlation matrix; After multiplying and superimposing the element values ​​in the correlation matrix and the basic feature matrix with the preset correlation matrix weight and the basic feature matrix weight, the superimposed values ​​are binarized according to the threshold value to obtain the feature matrix.

3. The method for visualizing and customizing data on myopia prevention and control for children and adolescents according to claim 1, characterized in that: The step of dividing the training set into multiple time periods in chronological order includes: According to the temporal distribution of myopia prevention and control data, the training samples are divided into short-term, medium-term, long-term and special periods according to the preset number of samples in each time period; among them, the short-term period is the time period within the most recent [1.5,2.5] months of the myopia prevention and control data, the medium-term period is the time period every six months of the myopia prevention and control data, the long-term period is the time period every year of the myopia prevention and control data, and the special period is the specific holiday or school holiday time period in the myopia prevention and control data.

4. The method for visualizing and customizing data on myopia prevention and control for children and adolescents according to claim 1, characterized in that: The method of constructing multiple data models according to each time period and fusing the outputs of the multiple data models to obtain a visualization model includes: The data model corresponding to the short-term period includes a feature extraction layer, a time series analysis layer and a first fully connected layer connected in sequence. The medium-term period, long-term period and special period correspond to the same data model, including a feature extraction layer, a temporal attention layer and a temporal convolution layer connected in sequence. The outputs of the four data models are weightedly fused through the second fully connected layer to obtain a visualization model.

5. The method for visual customization of myopia prevention and control data for children and adolescents according to claim 4, characterized in that: The feature extraction layer includes a feature attention layer and a feature extraction neural network connected in sequence. The feature attention layer calculates a feature attention score matrix according to the differences in myopia prevention and control effects among the data in the corresponding time period, and dynamically smoothes the feature attention score matrix according to the feature significance before passing it into the feature extraction neural network. The feature extraction neural network uses an autoencoder as an extraction kernel, and performs feature extraction on the training samples of the corresponding time period based on the feature matrix and the smoothed feature attention score matrix.

6. The method for visualizing and customizing data on myopia prevention and control for children and adolescents according to claim 4, characterized in that: The temporal attention layer calculates a temporal attention score matrix according to the differences in myopia prevention and control effects between time slices in the corresponding period, and dynamically weights the output results of the corresponding feature extraction layer according to the temporal attention score matrix, and outputs them to the temporal convolution layer; the temporal convolution layer is a convolutional neural network, which convolves and merges the output results of the temporal attention layer, and maps them to output using the ReLU function.

7. The method for visualizing and customizing myopia prevention and control data for children and adolescents according to claim 6, characterized in that: The dynamically smoothing feature attention score matrix according to feature significance includes: According to the sum of the differences between the myopia prevention and control effect vectors of each data and its similar data, the mean of the sum of the differences is calculated as the characteristic significance of the corresponding period; Obtain the number to be retained based on feature significance and preset multiples; According to the number to be retained, the corresponding element values ​​are retained in the order of the element values ​​in the feature attention score matrix from large to small, and the remaining element values ​​are set to zero to obtain the smoothed feature attention score matrix.

8. The method for visual customization of myopia prevention and control data for children and adolescents according to claim 7, characterized in that: The step of training the visualization model based on the training set and the feature matrix to obtain the trained visualization model includes: Introducing the idea of ​​transfer learning, in each round of training, all training samples of the short-term period are selected and passed into the data model corresponding to the short-term period; according to the training schedulers corresponding to the medium-term period, long-term period and special period, the corresponding training samples are selected and passed into the corresponding data models respectively; Each data model outputs a prediction of the myopia prevention and control effect based on the input training samples and feature matrix, and compares it with the corresponding actual myopia prevention and control effect. The mean square error is selected as the loss function of the visualization model. When the mean square error reaches the preset error value, the training ends and a trained visualization model is obtained.

9. A system for visualizing and customizing data on myopia prevention and control for children and adolescents, the system implementing the method according to any one of claims 1 to 8, characterized in that: Includes the following modules: The data collection module is used to collect data related to the prevention and control of myopia among children and adolescents, and to construct a data set, from which training sets and test sets are divided; A feature construction module is used to construct a feature matrix based on the characteristics of each data in the training set and the effect of myopia prevention and control; The time period division module is used to divide the training set into multiple time periods in chronological order and build multiple data models according to each time period; Model fusion module, used to fuse the outputs of multiple data models to obtain a visualization model; The model training module is used to train the visualization model based on the training set and feature matrix to obtain a trained visualization model; The data display module is used to collect myopia prevention and control data to be visualized. According to the time period to be visualized and the preset number of samples in each time period, the samples to be displayed in each time period are selected and passed into the trained visualization model to obtain the myopia prevention and control data display of the time period to be visualized.