Abstract
Recognition of motion level is a popular research area in the field of image processing in recent years. Based on the sensor equipment of action data acquisition, this article analyses the sensitivity of the micro-electro-mechanical system sensor. Then, according to the data-centric characteristics of the Internet of things, a distributed memory file storage and file writing system is constructed in the Internet of things environment, and the reliability and effectiveness of SensorFS are verified. Finally, dynamic time warping algorithm is used to evaluate the standard degree of human movement with dynamic time warping difference as experimental parameter, and a demonstration experiment of shadowboxing is designed to verify it. The result error is less than 0.05% by changing the standard of shadowboxing artificially, which proves the accuracy of the system. It provides a theoretical basis for the establishment of the standard system based on the Internet of things.
Keywords
Introduction
Various human movements lead to multiple meanings of body behavior, such as habitual body movements in life, gymnastic movements, and dance movements. Many scholars at home and abroad have done a lot of research on motion recognition and standard. At present, many scientific research institutes have studied human motion recognition. Motion analysis based on computer simulation, video image analysis, and spatial quantitative assistant analysis system are the most commonly used technologies for motion recognition. 1 Developed countries such as Europe and the United States are leading the way in this field. 2 For example, researchers at MIT use statistical models of feature points to identify human postures. China started relatively late in human identification, but still achieved some scientific research results. Q Kun (Q Du) et al. 3 uses a cascaded hidden Markov model to model human posture, and uses maximum expectation estimation and particle filter to analyze image sequences. However, the combination of the Internet of things (IoT) and the evaluation of the degree of action standards can improve the accuracy and efficiency of the evaluation.
The IoT is a huge network formed by combining mass sensing devices with the Internet. In the IoT, mass sensing devices continuously collect data and send it to the data center. With the continuous development of sensing technology and network technology, data present a mass of characteristics forming a big data of the IoT. 4 By persistent storage of big data in the IoT, historical and current sensing data of any sensor can be obtained. Through data retrieval and statistical analysis, complex and regular perception and trend analysis can be achieved, and data storage and management run in the data center with streaming tasks. Through energy saving task scheduling, the cost of IoT applications can be reduced. 5 These characteristics of the IoT provide a basis for efficient machine implementation of the evaluation of the degree of motion standard.
Starting from the recognition mechanism of action standards, this article establishes an evaluation system of action standards by utilizing the advantages of IoT in efficient data acquisition and processing. The characteristics of efficient data acquisition and storage in the IoT are applied, and the dynamic data are processed effectively by distributed storage technology. Then, the key skeleton of human body is node-based. By comparing the interactive experiment of nodes with the standard action, dynamic time warping (DTW) algorithm is used to evaluate the performance of this method, and the feasibility of this method is verified by simulation.
Sensor-based motion standard machine recognition
With the development of data collection, big data processing, and other technologies, higher requirements are put forward for the sensitivity and accuracy of sensors. The action degree evaluation system based on the IoT relies on efficient sensor recognition technology. The sensor selected for human motion recognition must have a front-end data sensing and terminal data collection system. 6 This article intends to select a sensor based on micro-electro-mechanical system (MEMS) as the front-end sensor of the action standard degree system.
With the rapid development of MEMS technology, various sensor devices are becoming more and more miniaturized and the price is getting lower and lower, so they are more and more widely used in various market demands, such as our common mobile phones, pads, smart cars, and smart homes. In these rapidly developing MEMS, acceleration sensor is an electronic device that can measure acceleration force, sense acceleration, and convert it into available output signal. The gyroscope sensor calculates the actual direction by deviating from the initial direction. Its main principle is that the rotation axis of the internal gyroscope will not change the direction due to the gyroscopic effect. Therefore, we can get the angular velocity by reading the direction of the axis to get the angle between the device and the gyro. The magnetometer is used to test the intensity and direction of the magnetic field. At present, nine-axis inertial measurement sensors used for action signal acquisition include three-axis gyroscope sensor, three-axis acceleration sensor, and three-axis magnetic induction sensor, which are mature enough to realize the position positioning of each sensor node in human motion capture, so as to achieve accurate attitude capture. 7 The traditional sensor and data collection equipment is shown in Figure 1.

Sensors and data collection equipment.
The scheme based on MEMS sensor is relatively inexpensive, easy to operate, fearless of occlusion and other external interference, low requirement for environment and space, and accurate data acquisition. At the same time, it has the advantage of less intrusion to human privacy, and has obvious advantages compared with other schemes including optics. Therefore, the motion capture and behavior recognition system studied in this article is based on this scheme. 8 The human behavior recognition technology based on motion capture sensor is a comprehensive technology which integrates sensor technology, human dynamics, computer graphics, pattern recognition, and other disciplines. The technology consists of front-end hardware and back-end software. The main functions and contents of the front-end hardware include using motion capture sensors to collect human motion data and transmit these motion data to the computer. The main function and content of the back-end software is to use the computer to effectively process the collected transport data, so that the computer can automatically recognize the action categories of the captured objects, thus realizing the action reproduction and human-computer interaction. The content of this article is the front-end action data transmission and processing, and then based on the IoT distributed data storage system to improve data processing efficiency, the terminal uses classification algorithm to evaluate the action standards.
Distributed data storage system based on IoT
With the continuous development of perceptual devices to help network technology, the IoT has gradually become an important direction of common concern in research and industry. 9 In sensor sensing data of the IoT, dozens of Kilobyte (KB) small files are a universal way of data acquisition and storage. Therefore, how to store large and small files efficiently in the IoT has become a key issue in the research of big data in the IoT.
The core of the IoT is data storage and management technology. The data-centric nature of the IoT makes the design of IoT application different from other computer networks, such as the network-centric World Wide Web, transaction-centric financial network, and device-centric wireless sensor network. 10 The design of IoT application must take data storage and management as the center, database technology as the center, and realize a high-performance and data-centric network system from two aspects of logic concept and software and hardware technology, so as to provide an effective data storage and management system for users. This system needs to take into account the characteristics of big data storage, high-performance data retrieval, data-based mining and analysis. As shown in Figure 2, a small file data processing center structure diagram is shown.

Small file data processing center.
SensorFS overall design
Faced with the large amount of small file data generated by a large number of human motion nodes, two new designs are adopted in the writing performance of massive data-centric hydrological documents in the IoT:
Write cache: write a large number of small files into memory and then improve the write throughput rate of large number of small files by clustering write method, and reduce the communication feedbacks between nodes.
Cluster writing: cluster small files from different sensors, then merge them into large files, and write them to persistent storage.
SensorFS adds a distributed memory file system (DMFS) over the underlying storage of Hadoop Distributed File System (HDFS). DMFS mainly performs two tasks, that is, write caching and sensor clustering. 11 DMFS provides write throughput services in HDFS in a “top” way rather than “embedded” way, which makes the design of DMFS not needed to modify the source code of HDFS, and is easier to manage, as well as not subject to the risk of HDFS version changes. DMFS can be installed on the main node, storage node or any other server of HDFS, and connected with HDFS through the network. The system architecture design of SensorFS is shown in Figure 3. The innovations of SensorFS include the following three points:
Distributed parallel write cache: a distributed parallel write cache that can efficiently cache large numbers of small files is proposed to provide high throughput write caching services. The cached files will be clustered by file clustering algorithm. Compared with HDFS, distributed write cache can significantly improve write throughput.
Parallel write merge: use parallel write merge strategy to further improve system write throughput. In SenorFS, small files are first written to different chunk servers and then different chunk servers merge files in the form of multi-threaded parallel write. Write the merged large files into HDFS.
Sensor clustering: a sensor clustering algorithm based on dependency graph model is proposed. The dependency graph is used to measure and model the access correlation between sensors. Then the files with strong access correlation are merged into one large file, which can effectively reduce the time cost of object query in the IoT.

SensorFS system architecture design.
Document management system design of DMFS
At present, there are some open source software for memory caching system, such as Redis, Memcached, Tachyon and so on. Among them, Memcached and Redis store all data in memory in the form of key-value pairs, providing read-cache services for relational databases. Document management system (DMS) consists of a master node Master and multiple storage nodes chunk server. Master node is responsible for managing and coordinating chunkserver node, which is composed of write scheduling module and sensor clustering module. Write scheduling module is mainly responsible for returning appropriate chunkserver for sensor write requests. The request listener listens to request commands from the client and chunkserver. The mapping relationship between sensor and chunkserver is recorded in the metadata management module. 12 As shown in Figure 4, DMFS system architecture. Write cache module includes file writing interface, memory management sub-module and metadata management sub-module. Metadata management sub-module includes the mapping of storage sensor and object, sensor and file, and block information. Memory management sub-module allocates memory to files and manages all files in chunk server. As shown in Figure 5, Meta Info Map organizes and manages files in a two-way linked list. In addition, Meta Info Map manages the pointers of the sensor identifier and file block list using hash table. The number of each sensor is allocated to a bidirectional list by hash. The bidirectional list maintains the memory blocks allocated to the sensor.

DMFS system architecture diagram.

Meta_Info_Map.
Write merge module, the file merge module in chunkserver node merges the file blocks cached in the write cache sub-module into large files, and then writes them to HDFS. The merged file form is similar to the HTTP Archive (HAR) file, and the file size is the same as the default block size of HDFS. When the size of the merged file reaches the size of the block, we write the file to the HDFS. In addition, the merge write module contains a flush thread pool. The default number of flush threads is the number of central processing unit (CPU) threads. The flush threads merge files, generate index files, and perform file persistence in parallel.
Reliability of SensorFS
The reliability of SensorFS depends on two aspects: the reliability of files in DMFS and the reliability of files in HDFS. Considering that DMFS adopts the strategy of “top-setting” on HDFS, 13 the reliability of writing data into HDFS in DMFS is guaranteed by the reliability guarantee mechanism of multiple copies and redundant codes in HDFS. For the data reliability in DMFS, we improve the data reliability by setting up the main storage chunk server and the replica chunk server. Figure 6 shows the reliability model of DMFS.

DMFS data reliability assurance.
When a primary storage chunk server goes down, data recovery operations will be performed from any copy of chunk server. 14 When a replica chunk server goes down, data can be recovered from the main storage chunk server or other surviving replica chunk server.
Validity analysis of SensorFS
There are two steps for HDFS’s write operation. The first step is to establish a connection with NameNode in HDFS to store the metadata of the file, and then NameNode is returned to the DataNode designated by the client for storing the file. The second step, the client writes files to DataNode in parallel. Let the time cost in the first step be
Among them,
SensorFS has two steps to write large amounts of small files. First,
By comparing formula (3) with formulas (1) and (2), we can see that SenorFS can achieve better small file write performance by two factors. First, compared with HDFS, SensorFS uses file merge strategy to reduce the number of files written to HDFS. Second, compared with HMFS, SensorFS uses distributed write cache, parallel file merge, and parallel file write operation to improve the write performance of file cache. 16 Although sensor-based file aggregation and file caching operations in SensorFS incur additional time overhead, both operations occur in memory, and file clustering is triggered only when the file cache reaches a certain threshold and is not executed frequently.
Evaluation of DTW action standard in IoT environment
Based on the distributed data storage system of the IoT, data processing efficiency is improved. The human motion data are captured by sensors, and then the writing performance of massive hydrological documents is achieved through the IoT. A distributed parallel write cache that can efficiently cache large amounts of small files is proposed to provide high throughput write cache services, and the cached files will be clustered using file clustering algorithm. Compared with HDFS, distributed write cache improves throughput, thus realizing efficient storage and management of data. Then, DTW algorithm is embedded in the data processing process. The terminal uses classification algorithm to evaluate the action standard. DTW is a classical optimization problem processing algorithm. It uses regularization function to describe the matching relationship between experimental data and sample space. The minimum cumulative distance between two curves is the basis of classification.
17
Set the motion sequence
Each frame has
Structural distance matrix
To compare the similarity of two motion sequences, we need to construct the distance matrix of the motion sequence. The distance can be calculated by various parameters, including joint position, rotation angle, skeletal segment angle, and so on (in this article, joint information is used). The position information of the human skeletal root node and the rotation information of other joint points constitute a frame of motion data in the form of vectors.
18
The difference between motion postures is calculated by “point cloud” method. The distance matrix of
1. The joint number
2. Determine the length of the window, that is, the number of frames needed to calculate the distance between frames.
19
On one hand, because of the continuity of human motion, each moving frame is affected by its multiple frames, and the closer it is to the current frame, the greater the impact. On the other hand, in order to reduce the influence of noise, it is necessary to consider the effect of multiple frames before and after calculating the distance between
3. Aligning the coordinates
20
of the two motion sequences and aligning the transform matrix
In the formula
The position coordinates of the two
Collate the solution of the above formula
4. Through “Gauss window” 21
Get the weight vector of each frame in the “point cloud” window
This article takes
5. According to the upper form, the distance matrix of
Establishing time alignment curve
Based on the constructed distance matrix, a DTW path shape with minimum cost is obtained by local optimality detection,
22
that is, the accumulated value of each element on the path is the smallest. DTW path is a set of adjacent matrix elements. It defines the best mapping relationship between
In the formula,

Computing average path cost graph.
Experimental simulation of degree of motion evaluation
Motion standard assessment experiment design
When the human body makes an action, it can be divided into four angle nodes and four joint nodes, so eight joint angle data are selected in this article. The image information is collected by camera and written into the IoT system by image recognition sensor. Because the eigenvectors of motion evaluation select eight joint angle data, image information is collected by camera, and written into the IoT system through image recognition sensors. Through a large number of standard action cases of shadowboxing, this article evaluates the standard degree of action of the characters in the camera and compares it with the standard degree of traditional linear programming model. 22 After fully analyzing the characteristics of feature vectors, we use DTW algorithm based on template matching. The DTW algorithm calculates the sum of the minimum distances between curves of different lengths, and uses the DTW difference between two curves as the motion evaluation parameters. In the motion evaluation system, Jane’s shadowboxing, one of the knee-hugging steps, was selected as the evaluation object. Two participants were selected in the experiment, and each participant repeated 10 times. That is to say, 20 test samples are used to model the curve by non-linear regression. Finally, DTW algorithm is used to evaluate the action. Four angle points were selected as feature parameters in the experiment. Four joint angle points were selected for upper limbs and lower limbs, which could cover most of the action features and simplify the computational complexity. Figure 8 shows the schematic diagram of shadowboxing, and Figure 9 is the key skeleton node diagram.

Sketch map of shadowboxing.

Key skeleton node diagram.
Evaluation and analysis of standard of motion
Through the demonstration of shadowboxing action process, a large number of action data are obtained and written into the data storage system of the IoT. The DTW curve difference obtained by dynamic programming is shown in Figures 10 and 11. The abscissa indicates that the time axis is stretched by DTW dynamic programming. A total of 749 frames of skeletal data are collected from each group of curves. The longitudinal coordinates indicate the difference between DTW curves of action and standard action. Figures 10 and 11 show the comparison of upper and lower limb joints based on data processing of the IoT and traditional non-linear regression modeling.

DTW curve difference diagram of upper limb joint.

DTW curve difference diagram of lower extremity joint.
It can be seen that the evaluation efficiency of action standards in the IoT environment is significantly higher than that in the traditional non-linear regression model. Compared with the traditional non-linear regression modeling method, the distributed computing method of the IOT is more sensitive to time and can judge the action in the first time. Then, only the data processing system of the IoT is used to model the joint angle curve. The actual measurement of each standard joint angle curve is 749 frames of data. Through cross-validation method, one person’s data were selected as the test sample in turn in 20 groups of data. In the experiment, it was found that the DTW difference distribution of 8 joint angles had obvious trend. To validate the effectiveness of the action standard degree system under the IoT, as shown in Figures 12 and 13, respectively, are 20 sets of DTW difference distance evaluation broken line diagrams and error diagrams.

DTW difference distance evaluation polygon map.

DTW difference distance evaluation error chart.
From Figure 12, it can be seen that the distribution of DTW difference of upper limb angle points is obviously sparse and the range of difference is very large, while that of lower limb angle points is obviously denser and the range of difference is very small, which is caused by the variety of upper limb movements and joint angles. The range of change is very wide, but the range of change of lower limb movements is relatively small, and the range of angle change is very small. From Figure 13, the validity of the evaluation of the action standard degree based on the IoT is verified. It can be seen that the error of the system is less than 0.05% by changing the standard action and then adopting the action standard degree system of the IoT, which proves the validity of the system.
Conclusion
In this article, the current MEMS sensors suitable for action standard degree system are analyzed, and a distributed action data storage system in the IoT environment is constructed. Finally, DTW algorithm is used to evaluate the standard degree of human motion. The shadowboxing demonstration experiment was designed and verified:
In order to realize the construction of action standard degree system, the reliability of SensorFS data architecture was validated by combining the MEMS sensor with the data management system of the IoT.
DTW algorithm is used to match the joint angles of different lengths, and a set of formulas is defined to evaluate the action. Taking DTW difference as experimental parameter, it is concluded that the action standard degree system based on the IoT is more efficient than the traditional modeling and evaluation method.
By artificially changing the standard of shadowboxing and using the IoT action standard degree system to evaluate, the result error is less than 0.05%, which proves the accuracy of the system.
This article applies the characteristics of the IoT to receive and store data efficiently, and studies the evaluation system of action standards. However, fewer nodes are selected in motion analysis to improve the accuracy of the computational speed verification system. In the next study, we can further increase the joint node and joint angle, so as to improve the accuracy of evaluation.
Footnotes
Handling Editor: Jinsong Wu
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
