A human body temperature data fitting method based on a clustering algorithm and a neural network
By combining clustering algorithms and neural networks, cluster center points of human body temperature data are obtained for fitting, which solves the problems of poor fitting effect and large error in existing technologies and achieves more efficient temperature data fitting.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2026-04-10
AI Technical Summary
Existing methods for fitting human body temperature data suffer from poor fitting results and large errors. In particular, under conditions of heat production during exercise, traditional methods struggle to obtain representative temperature points, leading to significant errors in the fitted curves.
A method based on clustering algorithms and neural networks is adopted. Real-time temperature data is collected within a preset time period, divided into sub-time periods for clustering, cluster center points are obtained, and a neural network model is used to fit the human body temperature data fitting curve.
It improves the fitting effect of human body temperature data fitting curves, reduces errors, is suitable for fitting nonlinear functions, and improves the representativeness and accuracy of the fitting.
Smart Images

Figure CN116701977B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of human body temperature analysis, and in particular to a human body temperature data fitting method based on a clustering algorithm and a neural network. BACKGROUND
[0002] The surface temperature mechanism of human chest skin is very complex, mainly affected by environment and skin heat dissipation. Under the action of body temperature regulation, the human body temperature is kept constant, but under the condition of exercise heat production, the human chest surface temperature will increase with the increase of exercise time, and will be stable in a certain interval due to the action of heat production and heat dissipation mechanism.
[0003] At present, when analyzing and fitting human body temperature data, the temperature value at each time point is usually directly taken, but the temperature value at each time point is too much, it is difficult to obtain representative points, resulting in large error of human body temperature data fitting curve after fitting.
[0004] In Chinese Patent Publication No. CN102736911A, a data fitting method is disclosed, comprising: obtaining coordinate values of each sample point to be fitted; performing difference operation on the coordinate values of each point; generating a fitting function according to the difference operation result; obtaining special points passed by the target curve, integrating the fitting function, and obtaining the target curve according to the integral formula and the coordinate values of the special points.
[0005] However, if there is a coordinate point with large deviation from other coordinate values, the above fitting method will produce a large abnormality. Subsequently, the fitting curve is integrated again, and the coordinate point with large deviation will also affect the integration, seriously affecting the fitting effect. That is to say, the existing human body temperature data fitting method has the problems of poor fitting effect and large error. SUMMARY
[0006] The problem to be solved by the present application is to provide a human body temperature data fitting method based on a clustering algorithm and a neural network, which can improve the fitting effect of human body temperature data fitting curve and reduce error.
[0007] To solve the above problems, the present application provides a human body temperature data fitting method based on a clustering algorithm and a neural network, comprising the following steps:
[0008] Step S1, continuously collecting real-time temperature data of multiple experimenters during continuous running on a treadmill in a preset time period;
[0009] Step S2, dividing the preset time period into a plurality of sub-time periods, for each of the sub-time periods, obtaining each of the real-time temperature data in the sub-time period as the corresponding cluster data set of the sub-time period;
[0010] Step S3, for each of the cluster data set, using a clustering algorithm to cluster each of the real-time temperature data in the cluster data set to obtain the corresponding cluster center point;
[0011] Step S4, for each of the experimenters, inputting each of the cluster center points corresponding to the experimenter and the sub-time period corresponding to each of the cluster center points into a pre-constructed neural network model to obtain the corresponding human body temperature data fitting curve.
[0012] Preferably, in step S1, a plurality of healthy males with an age of 23-25 years old, a height of 174-176 cm, and a weight of 65-75 kg are selected as the experimenters.
[0013] Preferably, in step S1, the real-time temperature data of each of the experimenters during continuous running at a speed of 6 km / h, 7.5 km / h, and 9 km / h is collected respectively.
[0014] Preferably, in step S2, the preset time period is set to 10 minutes, and the preset time period is evenly divided into a plurality of sub-time periods with a length of 1 minute. The temperature at the wrist of each of the experimenters is measured every 1 minute as the real-time temperature data.
[0015] Preferably, step S3 comprises:
[0016] Step S31, determining whether an algorithm instruction input from outside is received:
[0017] If yes, go to step S32;
[0018] If no, go to step S33;
[0019] Step S32, randomly obtaining a plurality of the real-time temperature data in each of the cluster data sets as initial cluster center points, and obtaining the remaining real-time temperature data as data points. The corresponding cluster center points are calculated according to the Euclidean distance between each of the initial cluster center points and each of the data points, and then go to step S4;
[0020] Step S33, taking each of the cluster data sets as an initial cluster number, randomly obtaining a plurality of the real-time temperature data in each of the initial cluster numbers as initial cluster center points, and obtaining the remaining real-time temperature data as data points. The corresponding cluster center points are obtained according to the Euclidean distance and similarity between each of the initial cluster center points and each of the data points.
[0021] Preferably, the step S32 comprises:
[0022] Step S321, randomly obtaining a plurality of the real-time temperature data in each of the cluster data sets as the initial clustering center points, and taking the rest of the real-time temperature data as the data points;
[0023] Step S322, for each of the data points, based on the Euclidean distance between the data points and each of the initial clustering center points, assigning the data points to the cluster data set where the initial clustering center point with the closest Euclidean distance is located;
[0024] Step S323, converting each of the initial clustering center points into the corresponding data points, for each of the data points in each of the cluster data sets, calculating the sum of Euclidean distances between the data point and the rest of the data points, and taking the data point with the minimum sum of Euclidean distances as the second-generation clustering center point;
[0025] Step S324, obtaining the corresponding first clustering error sum of squares according to each of the second-generation clustering center points and each of the data points, returning each of the second-generation clustering center points to the step S322 as the initial clustering center points, and taking the data point with the minimum sum of Euclidean distances in the step S323 as the third-generation clustering center point, and obtaining the corresponding second clustering error sum of squares according to each of the third-generation clustering center points and each of the data points;
[0026] Step S325, determining whether the second clustering error sum of squares is equal to the first clustering error sum of squares:
[0027] If not, taking each of the third-generation clustering center points as the initial clustering center points and returning to the step S322;
[0028] If yes, taking each of the third-generation clustering center points as the cluster center points.
[0029] Preferably, the step S33 comprises:
[0030] Step S331, taking each of the cluster data sets as the initial clustering number, randomly obtaining a plurality of the real-time temperature data in each of the initial clustering number as the initial clustering center points, and taking the rest of the real-time temperature data as the data points;
[0031] Step S332, for each of the data points, based on the Euclidean distance between the data points and each of the initial clustering center points and the negative correlation principle between the Euclidean distance and the similarity, assigning the data points to the cluster data set where the initial clustering center point with the closest Euclidean distance is located;
[0032] Step S333, converting each of the initial cluster center points into a corresponding data point, and for each of the cluster data sets, taking the average value of each of the data points in the cluster data set as the cluster center point.
[0033] Preferably, in the step S4, the neural network model takes the time attribute corresponding to the sub-time period as the input layer input, takes the temperature attribute corresponding to each of the cluster center points as the output layer output, and fits to obtain the human body temperature data fitting curve.
[0034] The present application has the following advantages: compared with the differential integral data fitting method, the present application adopts a clustering algorithm to cluster the real-time temperature data in the cluster data set to obtain cluster center points to ensure the representativeness of the cluster center points, which is less error than the traditional method of directly taking representative points, and then a neural network model is used to fit the cluster center points to obtain a human body temperature data fitting curve, which is more in line with the fitting strategy of a nonlinear function, so as to improve the fitting effect. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 is a step flowchart of the present application;
[0036] Figure 2 is a specific flowchart of step S3 of the present application;
[0037] Figure 3 is a specific flowchart of step S32 of the present application;
[0038] Figure 4 is a specific flowchart of step S33 of the present application;
[0039] Figure 5 is a processing result schematic diagram of real-time temperature data at 6km / h processed by the K-medoids algorithm of the present application;
[0040] Figure 6 is a processing result schematic diagram of real-time temperature data at 7.5km / h processed by the K-means algorithm of the present application;
[0041] Figure 7 is a processing result schematic diagram of real-time temperature data at 9km / h processed by the K-medoids algorithm of the present application;
[0042] Figure 8 is a neural network structure schematic diagram of the present application;
[0043] Figure 9 is a fitting result schematic diagram of the cluster center points at 6km / h of the present application;
[0044] Figure 10 This is a schematic diagram of the fitting results of fitting the cluster center point at 7.5 km / h according to the present invention;
[0045] Figure 11 This is a schematic diagram of the fitting results of fitting the cluster center point at 9 km / h according to the present invention. Detailed Implementation
[0046] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0047] In a preferred embodiment of the present invention, based on the above-mentioned problems existing in the prior art, a method for fitting human body temperature data based on clustering algorithms and neural networks is provided, such as... Figure 1 As shown, it includes the following steps:
[0048] Step S1: During a preset time period, continuously collect real-time temperature data of multiple participants while they are running on a treadmill.
[0049] Step S2: Divide the preset time period into multiple sub-time periods. For each sub-time period, collect the real-time temperature data within the sub-time period as the cluster dataset corresponding to the sub-time period.
[0050] Step S3: For each cluster dataset, a clustering algorithm is used to cluster the real-time temperature data within the cluster dataset to obtain the corresponding cluster center points.
[0051] Step S4: For each subject, input the cluster center points and the sub-time periods corresponding to each cluster center point into the pre-built neural network model to obtain the corresponding human body temperature data fitting curve.
[0052] Specifically, in this embodiment, compared to differential integral data fitting, this embodiment processes the cluster dataset using a clustering algorithm to extract the cluster center points (the cluster center points are the most representative points in the cluster data), and then performs neural network data fitting on them. The cluster center points extracted by the clustering algorithm are more representative, and the data fitting effect is improved by the neural network fitting, which is more suitable for fitting nonlinear functions.
[0053] In a preferred embodiment of the present invention, in step S1, several healthy men aged 23-25 years, with a height of 174-176 cm and a weight of 65-75 kg are selected as test subjects.
[0054] Specifically, in the embodiment, 20 normal healthy male experimenters are selected, with an age of 24±1 years old, a height of 175±1 cm, and a weight of 70±5 kg. All the experimenters meet three conditions: (1) no heart and lung diseases and no movement disorder diseases; (2) no cold and the like during the test; and (3) voluntarily complete the entire experiment.
[0055] Preferably, all the test processes are performed in a constant temperature and humidity laboratory. In order to avoid the influence of human biological rhythm on the test, the experiment is arranged in the afternoon. The experiment environment used in the embodiment is performed under the condition that the room temperature is 20±1 degrees Celsius, the humidity is 40±5%, the indoor wind speed is negligible, the body temperature is measured by using a temperature tester, and the sweat amount is measured by using a local collection method.
[0056] In the preferred embodiment of the present application, in step S1, real-time temperature data of each experimenter is collected when the experimenter runs at a speed of 6 km / h, 7.5 km / h and 9 km / h.
[0057] In the preferred embodiment of the present application, in step S2, the preset time period is set to 10 minutes, and the preset time period is evenly divided into a plurality of sub-time periods with a length of 1 minute. The temperature at the wrist of each experimenter is measured every 1 minute as real-time temperature data.
[0058] Specifically, in the embodiment, the treadmill is set to 6 km / h, 7.5 km / h and 9 km / h for testing, and the running test is performed for 10 minutes. The temperature at the wrist of the experimenter is tested every 1 minute, and the real-time temperature data is recorded.
[0059] In the preferred embodiment of the present application, as shown in Figure 2 Step S3 includes:
[0060] Step S31, whether an algorithm instruction input from outside is received is judged:
[0061] If yes, step S32 is turned to;
[0062] If no, step S33 is turned to;
[0063] Step S32, a plurality of real-time temperature data are randomly obtained in each cluster data set as initial cluster center points, and the remaining real-time temperature data are taken as data points. The corresponding cluster center points are iteratively calculated according to the Euclidean distance between each initial cluster center point and each data point. Then, step S4 is turned to;
[0064] Step S33, taking each cluster data set as an initial cluster number, randomly obtaining a plurality of real-time temperature data as initial cluster center points in each initial cluster number, taking the remaining real-time temperature data as data points, and obtaining corresponding cluster center points according to the Euclidean distance and similarity between each initial cluster center point and each data point.
[0065] Specifically, in the embodiment, step S32 adopts the K-medoids clustering algorithm, and a cost function is used to evaluate the cluster quality, and the most suitable cluster division and cluster center point are found through repeated iteration of the algorithm. Step S33 adopts the K-means algorithm, and the cluster center point is selected by calculating the average value of the cluster center point. The selected cluster center point may not exist due to the sensitivity to isolated points. The K-medoids algorithm eliminates the sensitivity to isolated points by selecting sample points near the cluster center point as the selection object in the iteration process. Both have advantages and disadvantages, and can be processed respectively.
[0066] In a preferred embodiment of the present application, as shown in Figure 3 Step S32 includes:
[0067] Step S321, randomly obtaining a plurality of real-time temperature data as initial cluster center points in each cluster data set, and taking the remaining real-time temperature data as data points;
[0068] Step S322, for each data point, based on the Euclidean distance between the data point and each initial cluster center point, the data point is assigned to the cluster data set in which the initial cluster center point with the nearest Euclidean distance is located;
[0069] Step S323, converting each initial cluster center point into a corresponding data point, for each data point in each cluster data set, calculating the sum of Euclidean distances between the data point and the remaining data points, and taking the data point with the minimum sum of Euclidean distances as the second-generation cluster center point;
[0070] Step S324, obtaining corresponding first cluster error sum of squares according to each second-generation cluster center point and each data point, returning each second-generation cluster center point to step S322 as an initial cluster center point, and taking the data point with the minimum sum of Euclidean distances in step S323 as a third-generation cluster center point, and obtaining corresponding second cluster error sum of squares according to each third-generation cluster center point and each data point;
[0071] Step S325, determining whether the second cluster error sum of squares is equal to the first cluster error sum of squares:
[0072] If not, taking each third-generation cluster center point as an initial cluster center point and returning to step S322;
[0073] If yes, each three generations of clustering center points are taken as cluster center points.
[0074] Specifically, in the embodiment, the goodness of the clustering center points is evaluated by using the error square of the Euclidean distance, which is defined as follows:
[0075]
[0076] wherein,
[0077] x represents real-time temperature data in each cluster data set C j .
[0078] O j represents a clustering center point.
[0079] In a preferred embodiment of the application, as shown in Figure 4 , step S33 comprises:
[0080] Step S331, each cluster data set is taken as an initial clustering number, a plurality of real-time temperature data are randomly obtained in each initial clustering number as initial clustering center points, and the remaining real-time temperature data are taken as data points;
[0081] Step S332, for each data point, based on the Euclidean distance between the data point and each initial clustering center point and the negative correlation principle between the Euclidean distance and the similarity, the data point is assigned to the cluster data set in which the initial clustering center point with the nearest Euclidean distance is located;
[0082] Step S333, each initial clustering center point is converted into a corresponding data point, and for each cluster data set, the average value of each data point in the cluster data set is taken as a cluster center point.
[0083] Specifically, in the embodiment, the K-means algorithm measures the similarity of different data objects by selecting a suitable distance formula, the distance between data is inversely proportional to the similarity, and it can be considered that the smaller the similarity, the greater the distance. The distance here is selected as the Euclidean distance, and the formula of the Euclidean distance is as follows:
[0084]
[0085] wherein,
[0086] x represents a data point;
[0087] C i represents the i-th clustering center point;
[0088] m represents the dimension of the data point;
[0089] x j , C ij represents the data point x and the clustering center point Ci the attribute value of the jth dimension.
[0090] Preferably, the similarity SSE formula is as follows:
[0091]
[0092] Preferably, the real-time temperature data collected at 6 km / h is processed by the K-medoids algorithm, and the processing result is as shown in Figure 5 The real-time temperature data collected at 7.5 km / h is processed by the K-means algorithm, and the processing result is as shown in Figure 6 The real-time temperature data collected at 9 km / h is processed by the K-medoids algorithm, and the processing result is as shown in Figure 7
[0093] In the preferred embodiment of the present application, in step S4, the neural network model takes the time attribute corresponding to the sub-time period as the input layer input, and takes the temperature attribute corresponding to each cluster center point as the output layer output, to fit the human body temperature data fitting curve.
[0094] Specifically, in the present embodiment, the neural network structure as shown in Figure 8 is adopted to fit the cluster center points at 6 km / h, and the fitting result is as shown in Figure 9 The cluster center points at 7.5 km / h are fitted, and the fitting result is as shown in Figure 10 The cluster center points at 9 km / h are fitted, and the fitting result is as shown in Figure 11
[0095] Although the present disclosure is disclosed as above, the protection scope of the present disclosure is not limited to this. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present disclosure, and these changes and modifications shall fall within the protection scope of the present application.
Claims
1. A method for fitting human body temperature data based on clustering algorithms and neural networks, characterized in that, Includes the following steps: Step S1: During a preset time period, continuously collect real-time temperature data of multiple participants while they are running on a treadmill. Step S2: Divide the preset time period into multiple sub-time periods. For each sub-time period, statistically obtain the real-time temperature data within the sub-time period as the cluster dataset corresponding to the sub-time period. Step S3: For each cluster dataset, a clustering algorithm is used to cluster the real-time temperature data within the cluster dataset to obtain the corresponding cluster center point; Step S4: For each subject, input the cluster center points corresponding to the subject and the sub-time periods corresponding to each cluster center point into the pre-built neural network model to obtain the corresponding human body temperature data fitting curve. In step S3, multiple real-time temperature data points are randomly selected from each of the cluster datasets as initial cluster centers, and the remaining real-time temperature data points are used as data points. The corresponding cluster centers are iteratively calculated based on the Euclidean distance between each initial cluster center and each data point.
2. The human body temperature data fitting method according to claim 1, characterized in that, In step S1, several healthy men aged 23-25, with a height of 174-176 cm and a weight of 65-75 kg were selected as the experimental subjects.
3. The human body temperature data fitting method according to claim 1, characterized in that, In step S1, real-time temperature data are collected from each of the subjects while they are running continuously at speeds of 6 km / h, 7.5 km / h, and 9 km / h.
4. The human body temperature data fitting method according to claim 1, characterized in that, In step S2, the preset time period is set to 10 minutes, and the preset time period is divided into multiple sub-time periods of 1 minute each. The temperature of each subject's wrist is measured every minute as the real-time temperature data.
5. The human body temperature data fitting method according to claim 1, characterized in that, Step S3 includes: Step S31: Determine whether an externally input algorithm instruction has been received. If so, proceed to step S32; If not, proceed to step S33; Step S32: Randomly select multiple real-time temperature data points from each of the cluster datasets as initial cluster centers, and use the remaining real-time temperature data points as data points. Iteratively calculate the corresponding cluster centers based on the Euclidean distance between each initial cluster center and each data point, and then proceed to step S4. Step S33: Take each of the cluster datasets as the initial number of clusters, randomly select multiple of the real-time temperature data from each of the initial number of clusters as initial cluster centers, take the remaining real-time temperature data as data points, and obtain the corresponding cluster centers based on the Euclidean distance and similarity between each of the initial cluster centers and each of the data points.
6. The human body temperature data fitting method according to claim 5, characterized in that, Step S32 includes: Step S321: Randomly select multiple real-time temperature data points from each of the cluster datasets as the initial cluster center points, and use the remaining real-time temperature data points as the data points; Step S322: For each data point, based on the Euclidean distance between the data point and each initial cluster center, the data point is assigned to the cluster dataset where the initial cluster center with the nearest Euclidean distance is located; Step S323: Convert each initial cluster center point into a corresponding data point. For each data point in each cluster dataset, calculate the sum of Euclidean distances between the data point and the other data points. Take the data point with the smallest sum of Euclidean distances as the second-generation cluster center point. Step S324: Based on each of the second-generation cluster centers and each of the data points, obtain the corresponding first sum of squared clustering errors, return to step S322 with each of the second-generation cluster centers as the initial cluster centers, and take the data point with the smallest sum of Euclidean distance in step S323 as the third-generation cluster center, and obtain the corresponding second sum of squared clustering errors based on each of the third-generation cluster centers and each of the data points; Step S325: Determine whether the second clustering error sum of squares is equal to the first clustering error sum of squares. If not, then each of the three-generation cluster centers is taken as the initial cluster center and the process returns to step S322; If so, then the three-generation cluster centers are taken as the cluster centers.
7. The human body temperature data fitting method according to claim 5, characterized in that, Step S33 includes: Step S331: Take each of the cluster datasets as the initial number of clusters, randomly select multiple of the real-time temperature data from each of the initial number of clusters as the initial cluster center points, and take the remaining real-time temperature data as the data points. Step S332: For each data point, based on the Euclidean distance between the data point and each initial cluster center and the negative correlation principle between Euclidean distance and similarity, the data point is assigned to the cluster dataset where the initial cluster center with the nearest Euclidean distance is located. Step S333: Convert each initial cluster center point into the corresponding data point, and for each cluster dataset, use the average value of each data point in the cluster dataset as the cluster center point.
8. The human body temperature data fitting method according to claim 1, characterized in that, In step S4, the neural network model uses the time attribute corresponding to the sub-time period as the input layer input and the temperature attribute corresponding to each cluster center point as the output layer output to fit the human body temperature data fitting curve.
Citation Information
Patent Citations
Method and device for date fitting
CN102736911A
Application method for artificial intelligence in seasonal load prediction
CN110991723A
Determining a time point corresponding to change in data values based on fitting with respect to plural aggregate value sets
US7809781B1