Research on sports fitness management based on blockchain and Internet of Things

The amount of exercise and fitness level of sports athletes can be quantitatively evaluated through the measurement of health and sports information, thereby ensuring effective fitness effects. The development of blockchain and Internet of Things technology provides a new perspective and technical means for fitness management technology. In view of the current problems in the field of sports fitness, this paper designs and implements a dynamic management technology for sports fitness based on the concept of Internet of Things and blockchain. First, based on an in-depth analysis of the current status of theoretical research and application of the Internet of health at home and abroad, the theories and methods of sports information and health information collection are studied. A temperature sensor and an acceleration sensor are used to collect human body temperature and exercise steps, respectively, and then estimate human health and exercise conditions. Second, solve the privacy problem in the collection and transmission of the Internet of Things by adding blockchain technology. Finally, the machine-learning method is used to clean and manage the information and data to realize the real-time detection and management of the athlete’s fitness status. The actual case test shows that the functions and technical performance indicators of the dynamic fitness management technology can meet the needs of users in indoor and outdoor fitness management, and promote the development of the sports industry and provide a scientific reference.


Introduction
In recent years, with the development of the social economy and the deepening of the popularization of science, people's awareness and demand for health and safety have also been continuously improved [1,2].Maintaining a healthy body requires not only a reasonable diet, but more importantly, a scientific exercise habit.A large number of studies have proved that regular aerobic exercise is beneficial to human health and can improve the body's athletic ability and physical fitness [3].In terms of health outcomes and the effectiveness of interventions, accurate quantification of physical exercise and physical health is crucial.If the health information and exercise information of the human body can be collected and analyzed, the athletes can be given effective guidance and intervention in sports and health [4,5].
At present, the collection of health and sports information has gone through several stages of development.In the network-acquisition phase, electronic equipment is used to detect human body-related information, and then, various networks are used to transmit the detected data to realize automatic data collection and upload [6].Neil Zhao used acceleration as a relevant parameter to analyze the characteristics of walking or running [7].The scholar plotted the relationship between each phase of the walking cycle and the changes in vertical and forward acceleration.The motion can be divided into three directions, namely the X-axis direction, the Y-axis direction, and the Z-axis direction, and the ADXL345 is used to detect the acceleration in the three directions.The armband fitness equipment FIT CORE and FIT LINK launched by Body Media in 2012 include four sensors at the same time.The three-axis acceleration sensor is used to detect human movement.The temperature sensor is used to detect the surface temperature of the human body, and the heat flux sensor is used to detect energy consumption.The technology detects people's life patterns from three aspects: energy intake, energy consumption, and sleep efficiency.The methods used to transmit data in portable devices include both traditional wired transmission methods and current wireless transmission methods such as Wi-Fi, radio frequency identification, Bluetooth, Zig-Bee, and other technologies [8,9].In recent years, researchers at home and abroad have conducted a lot of research and application in the field of sports detection using wireless technology and sensor technology, and promoted the development of sports detection technology [10].However, a single collection of motion information parameters has been unable to meet people's needs, and the method of judging human exercise intensity also needs to be improved.The evaluation and calculation of acceleration combined with human physiological indicators such as temperature and heart rate are the new entry points for research in university laboratories [11,12].
In response to the above problems, based on previous research, this paper proposes a sports fitness management technology based on the Internet of Things and blockchain.The system uses the Internet of Things to collect user movement and physical health information in real time, and interacts with the cloud-computing platform through blockchain encryption technology for data processing and professional diagnosis.The actual case test and analysis illustrate the good effects of the fitness management technology achieved, which can provide a scientific reference model and basis for the establishment of remote real-time dynamic sports fitness management technology using the Internet of Things and blockchain.

Sports fitness management technology
The progress of the collection of sports fitness information parameters has evolved from the traditional way to the ubiquitous way of collecting today.That is to comprehensively use the existing electronic technology and communication technology to detect various health and sports indexes of the human body at any time and any place, thereby providing a scientific basis for human health assessment and sports calculation [13].Through the detection of physical fitness information, health-related data such as body temperature, pulse, blood pressure, and speed and acceleration of human walking (walking or running) are obtained [14].People can timely monitor and evaluate their fitness progress based on these parameters.You can also check your own exercise history according to exercise parameters, and adjust the amount of exercise and exercise intensity in time, thus making it possible for people to exercise scientifically.The schematic diagram of the information function of the physical fitness Internet of Things is shown in Fig. 1.
To achieve the acceleration signal of human walking motion, we must first analyze the gait characteristics of human motion and use this as a theoretical basis to correctly guide the design and implementation of the acceleration acquisition system [15].Throughout the research on this aspect in recent years, it can be found that a large number of research scholars are digging deeply into the model of human walking movement in order to establish a better mathematical model to simulate the characteristics of human movement.Today, the research on fitness theory continues to deepen, and various portable and simple sports data collection devices also follow the trend, which brings great convenience to people's scientific fitness.Many people now wear a variety of fitness equipment when they start fitness, which is a high-tech way to monitor sports in real time [16].However, most of the various fitness equipments currently on the market are expensive and cannot be widely used.In summary, it is necessary to design a physical fitness detection technology with strong real-time performance, easy operation, and reasonable price.The design established in this paper can not only detect the acceleration of human motion, but also detect the body temperature of human body.The acceleration is used to analyze human motion.Moreover, the system can be used in places with high real-time requirements and meets the needs of some users.
In order to complete the design of sports fitness management technology based on the Internet of Things, this paper proposes to integrate multiple communication technologies to deeply integrate the Internet of Things and the blockchain, optimize the user experience, and make the connection between healthy Internet of Things applications and people closer.The entire architecture consists of a perception layer, a transmission layer, and an application layer [17].Sensors based on the Internet of Things can continuously acquire sports and fitness signals and perform multimodal data transmission and aggregation processing with the service system.The sports fitness management technology is a data collection system based on the Internet of Things, including health information collection and sports information collection.The system is divided into three layers [18].These structures are the lowest perception layer (data collection layer), the network layer (data transmission layer) to transmit data, and the application layer (data processing and display layer) located at the item layer.The architecture of this technology is shown in Fig. 2. As shown in the figure, the main task of the perception layer of the first layer is the design and implementation of the data collection terminal to complete the acquisition of information.The technologies involved are sensor technology and microprocessor technology [19].The second layer of the network transmission layer implements data transmission, that is, wireless communication is used for data transmission, such as ZigBee technology, Bluetooth technology, and Wi-Fi technology.The third layer of application layer is information processing and storage, using PC, smart terminal, and other devices to analyze, display, and apply data.

IoT privacy protection technology based on blockchain
In recent years, the Internet of Thing (IoT) technology and its innovative applications have rapidly developed in fields such as smart manufacturing, smart homes, and smart cities, which have changed the original production model and brought unprecedented convenience [20].However, the ubiquitous object-to-thing interconnection and human-to-thing data exchange also put forward higher security requirements for the collection, transmission, and exchange of sensitive information.The ultra-large-scale concurrent data processing requirements caused by the massive data exchange of the IoT nodes are also a huge challenge to the existing data center's computing, storage, and stable service capabilities.Blockchain technology with decentralized computing characteristics naturally provides a class of solutions for high concurrency problems.The Internet of Things usually uses information-aware devices to collect the perception information of the physical world and establish the connection between the information world and the physical world.However, most of these exchanges of perceptual information use the central server as the medium for information storage and forwarding.Once a malicious attack is encountered, the private data stored in the central server will be leaked, causing an inestimable impact.Therefore, the ultra-large-scale concurrent data processing requirements caused by the massive data exchange of the IoT nodes have brought huge challenges to the existing data center computing, storage, and stable service capabilities [21].
Blockchain technology with decentralized computing characteristics naturally provides a class of solutions for high concurrency problems.Blockchain is not a single technology but a decentralized distributed database formed by combining various technologies such as mathematics, economics, cryptography, and network science in a specific way.The unique characteristics of the blockchain can solve the trust and privacy issues faced in the development of the Internet of Things, and provide technical support for the entire Internet of Things such as transparency, distributed storage, trust, and other aspects [22].

Methods
The hardware of this system is mainly composed of signal nodes, pulse nodes, and sensors as a platform on which nodes are integrated [23].On the basis of briefly elaborating the design of ECG, respiration, pulse, temperature, and motion state acquisition module, the paper introduces the signal node as an integration of various modules and main control chip and the overview of the clothing as the acquisition front-end and platform.The schematic diagram of the basic hardware design of the Internet of Things is shown in Fig. 3.
Continuous monitoring of the user's movement status can achieve effective monitoring when the user falls, violent collisions, and other personal safety conditions.Therefore, the system directly integrates a three-axis acceleration detection module in the signal node to achieve detection of user movement status [24].This article selects LIS3DH three-axis MEMS acceleration sensor produced by STMicroelectronics to detect the motion state.The sampling rate is selectable from 1 Hz to 5 kHz, the operating voltage range is 1.713.6V, the current is 2 μA in low-power sleep mode, and the power consumption is 11 μA in normal operating mode, compatible with I2C and SPI interfaces.As shown in Fig. 3, the acceleration values of the chip in the X, Y, and Z directions can be measured.LIS3DH outputs the original three-axis acceleration data through the SPVI2C interface and performs further processing according to user needs.In this system, the underlying acceleration data is read directly through the I2C interface.
The amplitude of normal body surface ECG is between 10 μV and 4 mV, the typical value is 1 mV, the signal frequency is 0.05~100 Hz, and 90% of the ECG spectrum energy is concentrated between 0.25 and 35 Hz.The contact ECG acquisition method will inevitably introduce power frequency interference and EMG interference from the body surface.Since this system uses a single-lead two-electrode method to obtain ECG differential signals, a high-precision ADC is required for analog-to-digital conversion [25].This chip can perform dual-channel simultaneous acquisition of ECG and respiration signals.At the same time, a 24-bit high-precision A/D conversion function is built-in.Combined with this chip, a signal acquisition and conditioning circuit is built, which can reduce the size of the module and improve the anti-interference ability.
For the real-time collection of the user's body surface temperature, this system uses the DS18B20 contact digital temperature sensor produced by Maxim to collect the body surface temperature.The chip is packaged in the form of TO-92, and its shape is a straight-in triode.The black part is the temperature-sensing end.In the parasitic power mode of the DS18B20 chip, the sensor only needs to be connected to the GND and DQ signal lines.When the bus is high, the DS 18B20 can obtain energy from the DQ signal line and store the energy in the storage capacitor of the parasitic power supply.When the DQ and the signal level drops, the energy is released for the sensor to work with.Because the system uses a battery with a voltage of 3.7 V to supply power, and the main device power supply is 3.3 V, the normal external power supply method is used.
The system uses a separate wrist node to collect pulse signals.As the heart periodically expands and contracts, the volume of blood vessels in the body also periodically increases and decreases, and the light intensity signal received by the photoelectric receiver exhibits periodic changes with the arterial pulse.The photoelectric volume pulse signal is obtained from the wrist using a reflective photoelectric sensor, and the conditioned signal is led out to the pulse node through the interface, and the analogto-digital conversion is performed by the main control chip of the signal node.

Experiment
Dynamic ECG and other sports fitness collection sensors are used to continuously record 24 h of dynamic ECG and other data, including activity data in different situations such as rest and activities.In addition to monitoring the state of physical fitness, the sensor can also help users discover symptoms such as arrhythmia and myocardial ischemia, providing an important basis for clinical analysis and diagnosis and treatment [26].With the development of technology, most sports fitness detection equipment is equipped with various types of filters to eliminate these interferences, but when portable devices are used in sports scenes, the interference of sports may seriously limit the quality of signals such as dynamic electrocardiogram.
In the data processing and transmission model of this paper, the main analysis is the process of data backhaul.The link from the user side to the computing server side uses the millimeter wave frequency band.Millimeter wave communication generally refers to a communication method that uses millimeter waves with a frequency band between 30 and 300 GHz and a wavelength between 1 and 10 mm as a carrier for transmitting data.Due to its beamforming method and high frequency band, the corresponding interferences are few, the transmission is stable and reliable, and it is worth mentioning that it has strong penetrating power to sand and smoke [27].Because millimeter wave communication is greatly affected by weather outdoors, this fading problem is not the focus of this study.In communication systems, only when there are no visible obstacles in the transmission link between the signal transmitter and the signal receiver, called the signal transmitter, has a line of sight (LOS) to the signal receiver.When passing obstacles in the middle, there is no line-of-sight (NLOS) between the signal transmitter and the signal receiver.This paper discusses the case of LOS.
Generally, at a given location, the path loss is expressed in dB as follows: in which P TX represents the total transmit power, P RX represents the total received power, and G TX and G RX represent the transmit and receive antenna gain, respectively.Path loss is also called propagation loss, that is, the loss caused by the propagation of radio waves in space mainly determined by the radiation spread of the transmitted power [28].The transmission process is not related to the characteristics of the transmitter and receiver, so the free space path loss described in dB is: in which f represents the carrier frequency in MHz, γ represents the path loss index, and its value depends on the environment in the transmission path.h represents the transmission distance between nodes in km; A represents the atmosphere and rain attenuation factor.In the simulation, we make the transmission nodes on the backhaul link all LOS.
A layer of Sigmoid function mapping is added to the feature-to-result mapping to limit the predicted value to [0, 1], which can output the probability of different categories.The probability p (y = 1| x, θ) represents the probability that y belongs to 1 given the characteristic variable x, and h θ (x) = p (y = 1| x, θ), then there is a logistic regression model: in which θ = {θ 0 , θ 1 , ⋯θ p } represents the coefficient value corresponding to each feature, θ value.It can be obtained by solving the maximum likelihood estimation function [29].Assuming that each sample in the data set is independent of each other, the likelihood function: In practical applications, when classifying feature instances, we choose the one with the largest probability value as the final category, which can be formalized as Formula 5.
The gradient descent method is often used to obtain the parameter θ, but due to the limited learning ability of the LR model, a lot of artificial feature engineering is usually required to improve the learning ability of the model.How to automatically mine effective features and feature combinations has become an urgent problem to be solved, and using models to explore the combined relationship between features has become an effective way to solve this problem.
In this paper, we mainly analyze a single data stream, assuming that the user's traffic demand at the data collection end is D. This demand mainly depends on the user and the application they use.In order to reflect, the uncertainty and sensitivity of demand is inversely proportional.Use the following formula to describe the relationship between them [30]: Node L provides data services to the terminal.We noticed that in the uplink data transmission link, the energy consumption on node Z is always related to the data traffic and the wireless channel parameters of the next hop node on the edge computing data transmission link.In the downlink, the energy consumption on the downlink node Z also depends on the data traffic and channel parameters.Therefore, the resource allocation method mentioned in this article is applied to the uplink data backhaul link or the downlink in addition to the terminal nodes.

Results
The above describes the design and implementation of sports fitness management technology.In order to verify the feasibility and efficiency of the sports fitness management technology based on the Internet of Things proposed in this article, we have built a sports fitness IoT platform and adopted blockchain technology.We will perform functional tests on the system to analyze and verify the practicability and efficiency of the system.In order to achieve real-time interaction of sensor data, Internet of Things sensors are used to collect sports and fitness data in life scenarios, and a sports and fitness information collection platform based on the Internet of Things is built.In addition, the blockchain technology is used to make the collected information private.
In order to test the reliability of the parameters of the physical fitness management technology in the actual wearing and using process, we organized various types of volunteer experiments.The experiment included observing the state parameters of the subject in a quiet state and the information parameters of the subject in a moving state.
Sports fitness management technology can obtain high-quality cardio and other sports fitness data.The human activity information captured by the three-axis acceleration sensor is shown in Fig. 4.
The physical parameters of the subjects collected during the exercise test by the physical fitness management technology are shown in Figs. 5, 6, 7, and 8. Figures 5, 6, 7, and 8 show the ECG, respiration, and triaxial acceleration sensor information in 4, 6, 8, 10, and the recovery state after exercise.In order to facilitate comparison, each way of physical fitness has been normalized in general, so we can also see the changes in exercise intensity and the relative changes in signal amplitude.It can be seen that, even in the state of high-intensity exercise, the physical fitness management technology can effectively obtain high-quality cardio and other physical fitness.
During the system test, volunteers wore sports fitness management technology, and there was no discomfort during the period.Through the retrospective analysis of the data, it was found that the ECG, breathing, and posture/exercise information of each volunteer can be captured and recorded by the physical fitness management technology, and the overall signal quality is very good.Only in certain situations where the body posture suddenly changes, the ECG baseline drift limit and the amplitude of the respiratory wave change greatly, which may affect the accurate calculation of heart rate and respiratory rate.Periodic movements, such as walking and running, will introduce movement trajectories on ECG and breathing signals, but generally do not affect the calculation of heart rate and breathing rate.The physical fitness management technology based on the Internet of Things has many advantages compared with the conventional health care system.It upgrades the traditional health care mode of the medical treatment environment to a remote monitoring mode centered on patients or families, while optimizing the allocation of medical resources.It can also bring great convenience and security to the broad masses of the people.

Discussion
This paper studies the application prospects of sports fitness management technology based on blockchain and Internet of Things.The system uses a combination of Internet of Things and blockchain technology to collect real-time fitness signals through Internet of Things technology and process and transmit data through blockchain technology.The actual case test and analysis illustrate the good effects of the sports fitness management technology achieved, which can provide a scientific reference model and basis for the establishment of a remote real-time dynamic sports fitness management system using Internet of Things, blockchain, and other technologies.In addition, focusing on the increasing and deepening of people's needs for fitness in the future, we will continue to tap and improve existing fitness management technologies.We will provide scientific assistance for improving fitness informatization, promoting the development of the sports and health industry, and improving the quality of life of the people.

Fig. 1
Fig. 1 Schematic diagram of the information function of the Internet of Things

Fig. 2
Fig. 2 Schematic diagram of the framework of sports fitness management technology system

Fig. 3
Fig. 3 Schematic diagram of the basic hardware design of the Internet of Things

Fig. 4
Fig. 4 Human body fitness status information based on Internet of Things monitoring