Symptom classification model training method, symptom classification method and electronic equipment
By collecting and processing tremor and stress data, and training the LSTM classification model, the problem of low subjectivity and accuracy of Parkinson's patient status recognition in the prior art is solved, and more efficient and accurate patient status recognition is achieved.
Patent Information
- Application Number
- CN202510473350.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-08-01
AI Technical Summary
The existing methods of identifying Parkinson's patients based on physician experience are subjective and have low recognition accuracy.
By collecting user tremor and pressure data, preprocessing and performing feature fusion, the LSTM classification model is trained using low-dimensional training data, and noise is added to enhance the model's anti-interference ability.
It improves the accuracy and stability of identification of Parkinson's patient status, and enhances the model's adaptability and noise resistance to different data patterns.
Smart Images

Figure CN120412971A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of model training. Specifically, it relates to a method for training a symptom classification model, a symptom classification method, and an electronic device. Background Art
[0002] Currently, for the states of patients, such as the states of Parkinson's patients, most are identified based on the observation of doctors. However, this identification method mostly relies on the experience of doctors, and the identification results are relatively subjective.
[0003] Based on this, machine learning methods are introduced to determine some identification and classification models through the logic of machine learning. However, the accuracy of the current identification models is relatively low. Summary of the Invention
[0004] The purpose of this application is to provide a method for training a symptom classification model, a symptom classification method, and an electronic device, which can improve the classification accuracy.
[0005] In a first aspect, the present invention provides a method for training a symptom classification model, including: obtaining training data; wherein, the training data includes at least two types of state feature data of a user; compressing the training data to obtain low-dimensional training data in a low-dimensional space; using the low-dimensional training data to train a preset classification model to obtain a target classification model; wherein, the target classification model is used to classify the symptoms of a user.
[0006] In the above implementation, by further compressing the obtained training data, the complexity of the obtained data training data can be made lower, more valuable information can be effectively extracted from complex multi-modal data, the data dimension can be reduced, and key features can be retained at the same time. Through dimensionality reduction, the model can process data more efficiently and improve the training efficiency. In addition, since at least two types of state feature data are used for training, the trained target classification model can also better identify the symptoms of a user.
[0007] In an alternative embodiment, the obtaining of the training data includes: for each piece of training data, collecting the original state data of the user; wherein, the original state data includes the original tremor data and the original pressure data of the user; performing a first type of preprocessing on the original tremor data to obtain tremor feature data; performing a second type of preprocessing on the original pressure data to obtain pressure feature data; and performing feature fusion on the tremor feature data and the pressure feature data to obtain training data.
[0008] In the above implementation, for the training of the classification model, data used by non-traditional recognition models is not adopted. Instead, pressure data and tremor data that better characterize the user's body state and changes are used. Based on these two types of data for training the target classification model can enable the target classification model to better distinguish the user's actual state and improve the accuracy of user symptom recognition.
[0009] In an alternative implementation, the tremor feature data includes: tremor envelope, tremor spectrum information, and tremor instantaneous frequency. The first type of preprocessing of the tremor data to obtain tremor feature data includes: smoothing the original tremor data to obtain smoothed tremor data; extracting the tremor envelope of the smoothed tremor data; transforming the smoothed tremor data to obtain tremor spectrum information; and obtaining the tremor instantaneous frequency based on the calculation of the smoothed tremor data and the tremor envelope.
[0010] In the above implementation, information such as the envelope, spectrum information, and instantaneous frequency in the tremor data can be extracted. Based on this spectrum information and instantaneous frequency, the change of the user's state in the monitoring device can be better represented. For example, based on the envelope, the amplitude change trend of the signal can be intuitively reflected, and the instantaneous frequency can facilitate the analysis of the dynamic change characteristics of the tremor data.
[0011] In an alternative implementation, the pressure feature data includes the pressure change speed and the pressure change acceleration. The second type of preprocessing of the original pressure data to obtain pressure feature data includes: calculating the pressure change speed for the pressure data of adjacent two acquisition cycles; and calculating the pressure change acceleration for the pressure data of adjacent multiple consecutive acquisition cycles.
[0012] In the above implementation, through the determination of the acceleration and speed of the pressure data, the change rate of the pressure on the user's body part over time and the pressure dynamic characteristics can be reflected. Thus, the user's state can be determined from multiple dimensions and angles. Training the model based on various data in the pressure feature data can enable the model training to better recognize various states of the user.
[0013] In an alternative implementation, before using the low-dimensional training data to train a preset classification model to obtain a target classification model, the method further includes: for any two items of low-dimensional training data, performing a mixing process on the two training data to obtain mixed training data. Using the low-dimensional training data to train a preset classification model to obtain a target classification model includes: using the mixed training data to train a preset classification model to obtain a target classification model.
[0014] In an alternative embodiment, the mixing process of the two pieces of training data to obtain the mixed training data includes: performing a weighted calculation on the two pieces of training data to obtain initial mixed training data; adding noise to the initial mixed training data to obtain the mixed training data.
[0015] In the above implementation, the two pieces of data can also be mixed before training. After such processing, the model can learn the transitional features between samples and enhance its adaptability to different data patterns. Further, by adding noise, the model needs to learn the resistance to different degrees of interference during training, thereby improving the stability and accuracy when facing noisy data in practical applications.
[0016] In a second aspect, the present invention provides a symptom classification method, including: collecting status data of a target user; processing the status data to obtain status feature data of the target user; inputting the status feature data into a target classification model for classification to obtain a disease classification result of the target user; wherein, the target classification model is trained by using the method according to any one of the foregoing embodiments.
[0017] In a third aspect, the present invention provides an electronic device, including: a processor and a memory, where the memory stores machine-readable instructions executable by the processor. When the electronic device runs, the machine-readable instructions are executed by the processor to perform the steps of the method according to any one of the foregoing embodiments.
[0018] In an alternative embodiment, the electronic device further includes: a collection device; the collection device is used to collect status data of a user.
[0019] In an alternative embodiment, the electronic device further includes: an output device for outputting a prompt message.
[0020] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it performs the steps of the method according to any one of the foregoing embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 It is a block diagram of the electronic device provided by the embodiment of the present application;
[0023] Figure 2 This is a flowchart of the symptom classification model training method provided by the embodiments of the present application;
[0024] Figure 3 This is a partial flowchart of the symptom classification model training method provided by the embodiments of the present application;
[0025] Figure 4 This is a flowchart of the symptom classification method provided by the embodiments of the present application. Detailed implementation manners
[0026] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application.
[0027] It should be noted that: similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be construed as indicating or implying relative importance.
[0028] Parkinson's disease is often called "shaking palsy" and is a neurodegenerative disease of the nervous system. The symptoms of Parkinson's disease vary and are mainly manifested as two categories: motor and non-motor symptoms. Motor symptoms include resting tremor, muscle rigidity, bradykinesia, and postural balance disorder. Non-motor symptoms mainly include constipation, olfactory disorder, sleep disorder, autonomic nervous dysfunction, and mental and cognitive disorders, etc.
[0029] Currently, for the state recognition of Parkinson's disease in patients and the recognition of the severity of symptoms, it is mostly achieved based on the experience of doctors. However, inevitably, this recognition method is subjective.
[0030] Based on the above research, an embodiment of the present application can provide a symptom classification model training method, a symptom classification method, and an electronic device, which can improve the accuracy of users' disease recognition.
[0031] To facilitate the understanding of this embodiment, first, the electronic device that executes the symptom classification model training method and the symptom classification method disclosed in the embodiments of the present application will be introduced in detail.
[0032] As Figure 1 shown, it is a block diagram of the electronic device. The electronic device 100 may include a memory 111 and a processor 113. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the electronic device 100. For example, the electronic device 100 may further include more or fewer components than Figure 1 shown, or have the same asFigure 1 The different configurations shown.
[0033] Each of the above-mentioned memory 111 and processor 113 is electrically connected directly or indirectly to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The above-mentioned processor 113 is used to execute the executable module stored in the memory.
[0034] Among them, the memory 111 can be, but is not limited to, random access memory (Random Access Memory, abbreviated as RAM), read-only memory (Read Only Memory, abbreviated as ROM), programmable read-only memory (Programmable Read-Only Memory, abbreviated as PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, abbreviated as EPROM), electrically erasable read-only memory (Electric Erasable Programmable Read-Only Memory, abbreviated as EEPROM), etc. Among them, the memory 111 is used to store programs. After receiving the execution instruction, the processor 113 executes the program. The method executed by the electronic device 100 defined by the process disclosed in any embodiment of the present application can be applied to or implemented by the processor 113.
[0035] The above-mentioned processor 113 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 113 can be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), etc.; it can also be a digital signal processor (digital signal processor, abbreviated as DSP), an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), a field programmable gate array (Field Programmable Gate Array, abbreviated as FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0036] In the embodiment of the present application, the electronic device 100 may further include: a collection device; the collection device is used to collect the status data of the user.
[0037] Exemplarily, the acquisition device may include a cantilever piezoelectric sensor and a thin-film piezoresistive sensor.
[0038] The cantilever piezoelectric sensor can be used to acquire voltage data of the first part of the user's body, and the thin-film piezoresistive sensor can be used to acquire pressure data of the second part of the user's body. Exemplarily, the pressure data may represent the pressure formed by the extrusion of the second part of the user's body and the thin-film piezoresistive sensor.
[0039] Optionally, the voltage data acquired by the cantilever piezoelectric sensor is used as tremor data of the first part of the user's body.
[0040] Exemplarily, the first part may be parts such as the user's wrist, arm, thigh, etc. The second part may be parts such as the user's fingers, toes, etc.
[0041] In this embodiment, the acquisition device may be fixedly arranged on the main body of the electronic device 100, or the acquisition device may also be connected to the main body of the electronic device 100 through a data cable.
[0042] To facilitate the acquisition of the user's status data, the electronic device may further include an output device for outputting a prompt message.
[0043] The output device may be a device capable of outputting messages such as a speaker, a display, etc. Taking the speaker as an example, a voice prompt message is output through the speaker to facilitate the user to collect status data based on the voice prompt message. Taking the display as an example, the display can output prompt messages such as text, animation, etc. to prompt the user to perform a specified action to facilitate the user to collect status data based on the prompt message.
[0044] Taking the identification of Parkinson's related symptoms that need to be identified as an example, the user's status data needs to be acquired by the user in a specified state.
[0045] Exemplarily, the tremor data may include static detection data, postural detection data, kinematic detection data, writing behavior detection data; the pressure data may include writing behavior detection data.
[0046] When collecting static detection data, the prompt message may include: Please sit quietly on the chair, place your feet comfortably on the floor, place your hands naturally above your thighs or on the armrests of the chair, and maintain this posture for about 15 seconds during the detection process.
[0047] When collecting postural detection data, the prompt message may include: Please extend your arm straight in front of your body with your palm facing down, at shoulder level, keep your wrist straight and your fingers spread apart without touching the adjacent fingers. Maintain this posture for about 15 seconds during the detection process.
[0048] When collecting kinematic detection data, the prompt message may include: Hold a 500-ml mineral water bottle in the right hand, extend the arm straight, level with the shoulder, and maintain this posture for about 15 seconds during the detection process; Please externally rotate and extend the forearm, then touch your own nose tip with the index finger, and repeat the above movement 5 times to detect the entire movement process; Movement example: With the palm facing down, extend the arm straight in front of the body, and continuously turn the palm completely up and down at the fastest speed 10 times to detect the entire movement process.
[0049] When collecting writing behavior detection data, the prompt message may include: Detect the action of drawing an Archimedes spiral. Exemplarily, the drawing of the Archimedes curve can be divided into two parts. The first part is to copy the legend, and the second part is to freely draw according to the legend. Both actions need to be completed with the acquisition device in hand. Exemplarily, the legend copying can prompt the user to coherently complete the graphic copying according to the given reference legend at one time, and detect the tremor data and pressure data generated during the entire movement process. Exemplarily, the free drawing can be to freely draw an Archimedes spiral and coherently complete the graphic drawing at one time, and detect the tremor data and pressure data generated during the entire movement process.
[0050] The content of the above prompt message is merely exemplary. Based on the differences in the data to be collected actually, the content of this prompt message can also be adaptively adjusted.
[0051] Of course, based on different actual requirements, the electronic device 100 may further include more components. For example, the electronic device 100 may further include a positioning unit, etc.
[0052] In this embodiment, the electronic device 100 may further include a Graphics Processing Unit (GPU), and through this graphics processor, calculations can be implemented more quickly.
[0053] Optionally, the electronic device 100 may also be connected to install necessary libraries, such as PyTorch, scikit-learn, scikit-plot, and SciPy, etc.
[0054] The electronic device 100 in this embodiment can be used to execute each step in the various methods provided by the embodiments of the present application. The implementation processes of the symptom classification model training method and the symptom classification method are described in detail through several embodiments below.
[0055] Please refer to Figure 2 , which is a flowchart of the symptom classification model training method provided by the embodiments of the present application. The symptom classification model training method provided by the embodiments of the present application can be applied to an electronic device, and the steps in the symptom classification model training method are executed through this electronic device. The following will elaborate in detail on Figure 2 the specific process shown.
[0056] Step 210, obtain training data.
[0057] In this embodiment, the training data may include at least two types of state feature data of the user. Exemplarily, the state feature data may include data characterizing the action changes of the user. The actions may include the user's autonomous actions, involuntary actions, etc. The state feature data may also include data on the relative effects formed by the user on the surrounding environment or devices, such as data on squeezing and touching external objects. Taking the symptoms of Parkinson's disease that need to be recognized as an example, since Parkinson's disease involves behavior control, the training data may include feature data characterizing the user's behavior control situation.
[0058] Optionally, all the training data can be randomly divided into a training set, a validation set, and a test set. The amount of data in the training set may be much larger than that in the validation set and the test set. For example, the training set may account for 80% of all the data, the validation set may account for 10% of all the data, and the test set may also account for 10% of all the data.
[0059] Optionally, the training in the embodiments of the present application may be supervised training, and each piece of training data may correspond to a label. For example, there are C categories of labels. For the label value l, where l ∈ {0, 1,..., C - 1}.
[0060] Step 230, compress the training data to obtain low-dimensional training data in a low-dimensional space.
[0061] Optionally, high-dimensional data can be compressed into low-dimensional data. Exemplarily, methods such as linear dimensionality reduction methods, non-linear dimensionality reduction methods, and model-based dimensionality reduction methods can be used to compress high-dimensional data into low-dimensional data.
[0062] Taking the model-based dimensionality reduction method as an example. Exemplarily, an Autoencoder model can be used to compress the training data to obtain low-dimensional training data in a low-dimensional space.
[0063] In this embodiment, the AutoEncoder model may be a fully connected layer including L hidden layers.
[0064] Exemplarily, the input of the AutoEncoder model can be multi-feature data x ∈ R D , where D is the dimension of the original input features. Let the output of the l-th hidden layer of the encoder be represented as: h l = σ(W l h l-1 + b l ), h 0 = x, and the final output of the encoder for the low-dimensional data can be represented as d < D. The activation function of this model can be the ReLU function, expressed as σ(z) = max(0, z).
[0065] The mean squared error (MSE) can be used as the loss function L, expressed as: Taking stochastic gradient descent (SGD) as an example to update the parameters: where and respectively represent the parameters of the encoder and decoder at time t, and α is the learning rate.
[0066] Through continuous iterative training, the loss function of the AutoEncoder model gradually decreases to meet the set requirements, so that the required target AutoEncoder model can be obtained. The target AutoEncoder model can effectively compress multi-feature data into a low-dimensional representation space. After training is completed, the obtained by the input data x through the encoder is the compressed feature. Among them, represents the function of the AutoEncoder model. These features retain the important information of the original state data, while reducing the dimension and improving the training efficiency of subsequent models.
[0067] Step 250, use the low-dimensional training data to train a preset classification model to obtain a target classification model.
[0068] Among them, the target classification model is used to classify the symptoms of users.
[0069] Optionally, the preset classification model can be a Long Short-Term Memory (LSTM) network.
[0070] In this embodiment, the parameters related to training can be set in advance. For example, the parameters related to training can include: epochs: 200; learning rate: 0.003; number of features: 7 (corresponding to the data after compression of the features of 7 groups of actions); hidden size: 32 (the number of features in the hidden state); number of layers: 2; number of classes: 3 (output classes); Dropout: 0.1; activation function: rectified linear unit (ReLU). It can be understood that the above training-related parameters are only exemplary, and based on different actual needs, the values of each parameter may also be different. For example, in the case of more classes to be classified, the number of classes can be greater than 3.
[0071] During the training loop, calculate the cross-entropy loss between the predicted results and the actual labels of the training data, and the weights of the preset classification model can be updated using the Adam optimizer.
[0072] Use the test set to evaluate the performance of the trained model and calculate the accuracy between the predicted labels and the target labels. Finally, generate the corresponding confusion matrix to evaluate the model accuracy.
[0073] For the classification of different symptoms, the required data may be different. For the recognition of Parkinson's disease symptoms, the training data can include data that can characterize the user's tremor condition and data on the user's exertion. As Figure 3 shown, step 210 above can include steps from 211 to 213.
[0074] Step 211, for each piece of training data, collect the user's original state data.
[0075] If the user group to be identified and classified is the Parkinson's disease patient group, the state data of Parkinson's disease patients can be collected. And set labels for the state data collected for each user.
[0076] Among them, the original state data includes the user's original pressure data and original tremor data. Exemplarily, the original tremor data can include the involuntary movement data of the user's first part. The specified part can be parts such as the user's wrist, finger, foot, etc. The original pressure data can be the pressure of the user's second part squeezing the device that collects the original pressure data.
[0077] Step 212, perform the first type of preprocessing on the original tremor data to obtain tremor feature data.
[0078] Exemplarily, the first type of preprocessing can include: removing some abnormal data in the original tremor data, extracting representative data in the original tremor data, converting the original tremor data into vector data, etc.
[0079] Step 213, perform the second type of preprocessing on the original pressure data to obtain pressure feature data.
[0080] Exemplarily, the second type of preprocessing can include: removing some abnormal data in the original pressure data, extracting the user's pressure change trend data, converting the original pressure data into vector data, etc.
[0081] Step 214, perform feature fusion on the tremor feature data and the pressure feature data to obtain training data.
[0082] Optionally, the tremor feature data and pressure feature data can be zero-mean normalized. For example, if the feature vector is X, the normalized feature vector is calculated as follows: where μ is the mean of the feature vector X, and σ is the standard deviation of the feature vector X. Zero-mean normalization normalizes the feature data, making all feature data have the same scale, eliminating the influence of the dimension between different features, and helping to improve the stability and convergence speed of model training, enabling the model to better learn the feature patterns in the data.
[0083] Optionally, the normalized data can also be converted into a tensor, and the tensor is used as the data for subsequent training. The multi-modal features within each sampling window can be arranged according to time steps to construct a three-dimensional tensor structure of "number of samples × time step length × feature dimension". Reshape the normalized data into a three-dimensional tensor where B represents the batch size, T represents the time step length (determined by splitting the sliding window), and F represents the fused feature dimension (for example, features in dimensions such as tremor and pressure).
[0084] In this embodiment, the label of each training data can also be encoded in One-hot format. For example, assuming there are C categories for the label, for the label value l, where l ∈ {0, 1, …, C - 1}, its One-hot encoded vector o can be expressed as One-hot encoding converts the categorical label into a vector form, where only the element at the corresponding category position in the vector is 1, and the rest are 0.
[0085] In this embodiment, the above-mentioned tremor feature data may include: tremor envelope, tremor spectrum information, and tremor instantaneous frequency. The above step 212 may include steps 2121 to 2124.
[0086] Step 2121: Smooth the original tremor data to obtain smoothed tremor data.
[0087] The original tremor data signal can be smoothed using the moving average method. The signal is smoothed by calculating the average value of the data within the window, removing interferences such as high-frequency noise, so that the signal can better reflect the trend of the data. This window can refer to the time window for collecting tremor data.
[0088] Step 2122: Extract the tremor envelope of the smoothed tremor data.
[0089] Exemplarily, use the Hilbert transform to process the smoothed tremor data y n to obtain The definition of the Hilbert transform is: where P.V. represents the Cauchy principal value, and the envelope is calculated by the following formula: The envelope can intuitively reflect the amplitude change trend of the signal.
[0090] Step 2123: Transform the smoothed tremor data to obtain tremor spectrum information.
[0091] Optionally, the smoothed tremor data can be subjected to a Discrete Fourier Transform (DFT for short) to obtain tremor spectrum information.
[0092] For the smoothed tremor data y n Perform a discrete Fourier transform, which can be expressed by the formula: The discrete Fourier transform converts a time-domain signal into a frequency-domain signal and represents the original signal by superimposing different frequency components.
[0093] Step 2124: Based on the calculation of the smoothed tremor data and the tremor envelope, obtain the tremor instantaneous frequency.
[0094] First, an analytic signal can be constructed based on the tremor envelope and the smoothed tremor data y n The instantaneous phase of which can be expressed as: The instantaneous frequency can be expressed as: In the discrete case, since continuous differentiation cannot be directly performed, differentiation can be approximated by difference where Ts is the sampling period. Ts is the sampling period.
[0095] In this way, the instantaneous frequency of the tremor data at each moment can be obtained, which can better analyze the dynamic change characteristics of the user's tremor data.
[0096] In this embodiment, the pressure characteristic data includes the pressure change speed and the pressure change acceleration. The above step 213 may include steps 2131 to 2132.
[0097] Step 2131: Calculate the pressure data for two adjacent acquisition periods to obtain the pressure change speed.
[0098] Taking the pressure data as the finger pressure of the user as an example, the pressure data can be expressed as p n , and the pressure change speed is expressed as v n Through differential calculation By calculating the difference between the pressure data at adjacent moments divided by the sampling period T s , the pressure change speed of the finger is obtained. This pressure change speed can reflect how fast the pressure changes over time.
[0099] Step 2132: Calculate the pressure data for multiple adjacent consecutive acquisition periods to obtain the pressure change acceleration.
[0100] The pressure change acceleration can be expressed as a n , which can be calculated by taking the difference of the pressure change velocity This pressure change acceleration reflects the speed of change of the pressure change velocity, which is beneficial to analyzing the dynamic characteristics of the finger pressure signal.
[0101] To reduce the possible errors of some individual data, before using the training data for training, the training data can also be mixed. Based on this, before step 250, the method can further include step 240, for any two low-dimensional training data, mixing the two training data to obtain mixed training data.
[0102] Exemplarily, the mean of the two low-dimensional training data can be used as the initial mixed training data. Exemplarily, the initial mixed training data can be obtained by weighted summation of the two low-dimensional training data.
[0103] Randomly select two samples x i and x j from the low-dimensional training dataset. Let λ be the mixing coefficient, where λ ∈ [0, 1]. The new mixed sample
[0104] Optionally, the mixing coefficient λ can be randomly sampled from a specific distribution to introduce diversity. The specific distribution can be a continuous probability distribution on [0, ١], for example, it is a Beta distribution.
[0105] Mix the features of two different samples through linear combination to generate a new sample, enabling the model to learn the transitional features between samples and enhancing the adaptability to different data patterns.
[0106] To ensure the correspondence between the labels and the training data, for samples x i and x j , the One-hot labels are y i and y j respectively. The labels can also be mixed to obtain new labels where the mixing coefficient λ used for label mixing is the same as that used for samples. Thus, it can be ensured that while the model learns the features of the new samples, the corresponding label information can also correctly reflect the mixing situation, which helps the model learn a more generalizable decision boundary.
[0107] The above step 250 can include: using the mixed training data to train a preset classification model to obtain a target classification model.
[0108] In this embodiment, step 250 described above can also use the aforementioned low-dimensional training data and mixed training data to train a preset classification model to obtain a target classification model.
[0109] To further enhance the robustness of the model, noise ∈ can also be added to the mixed samples. Optionally, step 240 described above can include: performing weighted calculation on the two training data to obtain initial mixed training data; adding noise to the initial mixed training data to obtain mixed training data.
[0110] The noise ∈ is usually sampled from a normal distribution 2 with a mean of 0 and a variance of σ. The samples after adding noise can be expressed as:
[0111] By adding noise, the diversity of the training data can be increased. During the training process of the model, it needs to learn to resist different degrees of interference, thereby improving the stability and accuracy when facing noisy data in actual applications. During the model training process, the mixed samples after mixing and adding noise and their corresponding mixed labels are used for training to optimize the model parameters to enhance the generalization ability and robustness of the model.
[0112] Please refer to Figure 4 , which is a flowchart of the symptom classification method provided by the embodiment of the present application. The symptom classification method provided by the embodiment of the present application can be applied to an electronic device, and the steps in the symptom classification method are executed through the electronic device. The following will elaborate on Figure 4 the specific process shown in detail.
[0113] Step 310, collect the status data of the target user.
[0114] Among them, the method of collecting the status data of the target user can refer to the logic of collecting data by the collection device in the aforementioned electronic device, which will not be elaborated here.
[0115] Step 320, process the status data to obtain the status feature data of the target user.
[0116] In this embodiment, the specific processing of step 320 can be the same as that of step 210 and step 230 in the aforementioned embodiment and the content introduction related to the two steps, which will not be elaborated here.
[0117] Step 330, input the status feature data into the target classification model for classification to obtain the disease classification result of the target user.
[0118] Among them, the target classification model is trained by using the symptom classification model training method described in the foregoing embodiments. Other details of the target classification model according to the embodiments of the present application can be referred to the descriptions in the foregoing embodiments, and will not be elaborated herein.
[0119] By further compressing the obtained training data, the complexity of the obtained training data can be made lower, more valuable information can be effectively extracted from complex multi-modal data, the data dimension can be reduced, and at the same time, key features can be retained. Through dimensionality reduction, the model can process data more efficiently and improve the training efficiency. In addition, since at least two types of state feature data are used for training, the trained target classification model can also better identify the symptoms of the user.
[0120] In addition, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the symptom classification model training method or the symptom classification method described in the foregoing method embodiments.
[0121] The computer program product of the symptom classification model training method or the symptom classification method provided by the embodiments of the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the steps of the symptom classification model training method or the symptom classification method described in the foregoing method embodiments. For details, reference can be made to the foregoing method embodiments, and will not be elaborated herein.
[0122] In several embodiments provided by the present application, it should be understood that the disclosed method can also be implemented in other ways. The method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the drawings show the possible architectures, functions, and operations of the methods and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0123] In addition, in each embodiment of the present application, the method steps can be executed by being integrated together to form an independent part, or each method step can be executed by a separate module, or two or more steps can be formed together to form an independent part for execution.
[0124] If the above functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) 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 USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs. It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements that are not explicitly listed, or further includes elements that are inherent to such a process, method, article, or device. Without more limitations, the elements defined by the statement "including..." do not exclude the existence of additional identical elements in the process, method, article, or device including the said elements.
[0125] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application. It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0126] As described above, it is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for training a symptom classification model, characterized in that Including: Obtain training data; wherein, the training data includes at least two types of state feature data of a user; Compress the training data to obtain low-dimensional training data in a low-dimensional space; Use the low-dimensional training data to train a preset classification model to obtain a target classification model; wherein, the target classification model is used to classify the symptoms of a user.
2. The method according to claim 1, wherein, The obtaining of the training data includes: For each piece of training data, collect the original state data of the user; wherein, the original state data includes the original tremor data and the original pressure data of the user; Perform a first type of preprocessing on the original tremor data to obtain tremor feature data; Perform a second type of preprocessing on the original pressure data to obtain pressure feature data; Perform feature fusion on the tremor feature data and the pressure feature data to obtain training data.
3. The method according to claim 2, wherein Wherein, The tremor feature data includes: a tremor envelope, tremor spectrum information, and tremor instantaneous frequency; The performing of the first type of preprocessing on the tremor data to obtain tremor feature data includes: Perform smoothing processing on the original tremor data to obtain smoothed tremor data; Extract the tremor envelope of the smoothed tremor data; Perform transformation on the smoothed tremor data to obtain tremor spectrum information; Based on the calculation of the smoothed tremor data and the tremor envelope, obtain the tremor instantaneous frequency.
4. The method according to claim 2, wherein Wherein, The pressure feature data includes the pressure change speed and the pressure change acceleration; The performing of the second type of preprocessing on the original pressure data to obtain pressure feature data includes: Calculate for the pressure data of two adjacent acquisition cycles to obtain the pressure change speed; Calculate for the pressure data of multiple adjacent consecutive acquisition cycles to obtain the pressure change acceleration.
5. The method according to claim 1, characterized in that, Before the using of the low-dimensional training data to train a preset classification model to obtain a target classification model, the method further includes: For any two pieces of low-dimensional training data, perform mixing processing on the two pieces of training data to obtain mixed training data; The using of the low-dimensional training data to train a preset classification model to obtain a target classification model includes: using the mixed training data to train a preset classification model to obtain a target classification model.
6. The method according to claim 5, wherein The performing of mixing processing on the two pieces of training data to obtain mixed training data includes: Perform weighted calculation on the two pieces of training data to obtain initial mixed training data; Add noise to the initial mixed training data to obtain mixed training data.
7. A symptom classification method, characterized in that, Including: Collect the state data of a target user; Process the state data to obtain the state feature data of the target user; Input the state feature data into a target classification model for classification to obtain the disease classification result of the target user; wherein, the target classification model is trained by using the method according to any one of claims 1-6.
8. An electronic device, characterized in that, Including: A processor and a memory, the memory stores machine-readable instructions executable by the processor, and when the electronic device runs, when the machine-readable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are executed.
9. The electronic device according to claim 8, wherein, The electronic device further includes: an acquisition device; The acquisition device is used to acquire the status data of the user.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, it executes the steps of the method described in any one of claims 1 to 7.