etween each byte to be extracted. It is really important. Big packets lose data in a continuous read because of the defects of the original encapsulate algorithm. A large number of experiments have proved that if the pause time is not set, a large packet of data is successfully extracted every 3-4 seconds in general, but in theory, the large packet data is one for every 1026 ms. In order not to affect the accuracy of reading data, the pause time is smaller than the byte transmission time of large packets, and our algorithm takes 10 *μ*s.

After the checksum check is completed, cross-check with the previous packet is the second step of optimization. In a data set with more than 10,000 samples (under normal wearing conditions), no group of data has the same attention and meditation values as the previous group, and the two data are the same only when there is a problem in data collection. Therefore, cross-check can effectively eliminate incorrect data due to hardware contact or noise problems. After that, the poor signal at that moment will be extracted, which is located in the fifth byte of big packets. Poor signal can directly reflect the wearing quality.

After that, there are two boundary detection mechanisms. Our algorithm uses Isolation Forest to detect abnormal points and outline the decision boundary. Isolation Forest is an unsupervised anomaly detection method, which is suitable for continuous data. Isolation Forest uses a binary search tree structure (also known as "isolated tree") to isolate samples and detect outliers through the isolation of sample points, which is different from the anomaly detection algorithm that expresses the degree of alienation between samples by quantitative indexes such as distance and density \[[@B27]\]. Because most of the attention values in the TGAM are in the correct range, the number of outliers is small and there is a significant difference from most samples. In that case, the isolation of sample points will cause the outliers to be isolated earlier; that is, the ou