Machine Learning in Mobile Computing: Methods and ApplicationsView this Special Issue
Design and Implementation of Home Health System Based on ID Card Identification and Multidevice Access
With the development of society and the gradual arrival of an ageing society, various diseases threaten human health. If you use the software that comes with your medical device to understand and analyze your health, not only the user is in trouble but also a variety of health data can not be linked, giving users a more three-dimensional health analysis. In this case, this article will design and implement a mobile client for a home health system. The user’s information is hosted by the remote data center. It is necessary to collect the user’s information to facilitate management and analysis of health conditions. The manual input method is easy to input errors due to the long address and ID number, so the system will collect user information based on ID card identification. Train ID information to achieve accurate identification. For the multidevice access function, the key parts of the IEEE 11073 standard are used for communication. The mobile phone client that implements the home health system runs on the Android platform. According to the user information management, the user physiological data management, the user physiological data collection, and the user information synchronization are divided into four modules. The ID card identification module is called in the user management module, and the IEEE11073 communication plug-in is called by JNI in the health data measurement module. The health data can be presented intuitively to the user, or the information can be synchronized to the remote data center for further analysis.
With advances in science and technology, social, and economic development, people’s standard of living has improved. In daily life, they also pay more attention to their health. [1–4] At the same time, the global social demographic structure is rapidly entering the aging stage, and the demand for health monitoring and inspection is becoming more and more obvious . It is difficult to meet the normal monitoring needs of the large population in the physical condition. It is difficult to achieve the requirement only by the resource allocation of the existing hospitals. Therefore, it is necessary to establish a simple and effective home health monitoring system . With the development of portable computer technology, the home health system will gradually be developed, which we hope will meet the needs of daily physical examination and telemedicine of humans . The home health monitoring system includes various health intelligent devices, such as sphygmomanometer, ECG monitoring device, blood oxygen monitor, environment temperature and humidity sensor, lighting regulator, and other [8–10]. Some of these devices are carried by users in wearable form, while others are fixed in the home environment. Although functions are different, they are generally considered as sensor devices to collect physiological data or environmental data of users . After the completion of the acquisition, these devices will send data to the host in the home health network, and the host will gather data and analyze the .
The existing health system at home has some obvious shortcomings. On the one hand, the central computers in existing systems are mainly computers, and usually, there is only one central computer in a system. Users can view the device data via this central computer and receive the remote service [13, 14]. Then, with the rapid development of intelligent devices, the popularity of smart phones and tablet computers has been greatly increased in the home environment. Users hope to directly check their own blood pressure, ECG, and other information through mobile phones, tablet computers, or other portable devices, instead of restricting the use of PC [15–17]. This requires that the new home health system includes PC, health set-top boxes, tablet computers, smart phones, and other hosts, and support blood pressure meters, oximeter, and other health devices can be linked to Windows, Linux, Android, and other operating system cross platform . On the other hand, different communication interfaces adopted by different companies and organizations adopt different communication interfaces. Different communication protocols are used, which makes the existing system more closed. One device can only use  in one system. For example, using the terminal equipment of a company to measure the data of the user’s vital capacity can only be transmitted through a company’s own communication interface . If the user uses the equipment of the company’s blood pressure measurement, it needs to use another set of communication systems to transmit data. This undoubtedly increases the complexity of the use of equipment and increases the user’s use cost. If the home health system can include a host platform running multiple operating systems and support the communication connection between devices and different platforms  and solve the problem of relative closure between different systems, there is no need to design special terminal equipment for different system platforms, which will greatly save costs, improve people’s efficiency in life and work, and bring more convenience to real life [22–25].
In the country, there are many experts and scholars who do research on healthy home systems. Deng Yu proposed the concept of healthy home system through the analysis of the elements of healthy home system such as living population, lifestyle, and system design in modern cities. The theoretical preliminary construction, module construction, and related service construction of the healthy home system were carried out and further clarify the development trend and design direction of healthy home systems . Sun Lei studied the national physique health management software based on SSH framework technology . Combining database technology with Java language, we designed and implemented a personal health management system that provides comprehensive, comprehensive and effective tools, and means in the three processes of investigation, evaluation, and intervention with the health as the observation point . Zou and other scholars have studied the physiological parameters acquisition system and wireless transmission mode of the elderly, analyzed the significance of blood oxygen saturation and long-term monitoring of body temperature, combined with sensor technology and embedded technology, using Bluetooth wireless transmission technology, and the Android system platform has established an elderly health monitoring system. The system platform can collect the oxygen saturation and body temperature information of the elderly and has the function of falling to the detection. The system design uses a portable design, and the sensor adopts wearable type, which is more practical . In foreign countries, Maeng et al. designed a social network-based care delivery framework (CDF) for the elderly home telehealth system, transforming the family telehealth system into a relationship between the elderly and family members. The system connects to existing social networking sites, such as Facebook, to encourage interpersonal communication between seniors and young family members. The home telehealth system is implemented as an application on a personal mobile device . The research described above has certain deficiencies, not the low efficiency of data collection or the single use of equipment.
In this paper, the system will collect user information based on ID card identification and train ID card information to achieve accurate identification purposes. For multidevice access operations, the essential parts of IEEE 11073 shall be used for communication. The mobile phone client applying the home health system operates on the Android platform according to user information management, the management of normal user data, the collection of normal user data, and the synchronization of user information are divided into four modules. The ID card identification module is called in the user management module, and the IEEE11073 communication plug-in is called by JNI in the health data measurement module. The health data can be presented intuitively to the user, or the information can be synchronized to the remote data center for further analysis.
2. Proposed Method
2.1. ID Card Processing
2.1.1. Preprocessing of ID Card Images
In order to detect the destination file in relation to the area where the whole image is located, the image must first be preprocessed. Image preprocessing is the use of image processing technology to obtain the functions required for the current job, suppressing unwanted functions. In other words, reducing image noise and improving image quality so that subsequent work is not interfered with by unnecessary functions . Typical image preparation techniques include grayscale, binarization, expansion, and corrosion. Image processing will improve the quality of the original image or reduce it to the best quality for our next operation. The effect of the processing directly affects whether the area where the target file is located can be extracted without problems, which further affects the progress of the follow-up work.
(1) Gaussian Blur. Gaussian blur, also known as Gaussian filtering, is essentially a process of smoothing data. This process smoothes the data, because it can remove noise, so it is widely used in the process of image processing noise. The calculation of Gaussian blur is to calculate the weighted average of each pixel and specifically obtain the value of Gaussian blur for a specific pixel. The pixel values themselves and near the specified range are the result of a weighted average under the weight matrix obtained after calculation with the Gaussian function. The formula of the Gaussian function is as follows.
Taking the matrix as an example, the specific calculation of Gaussian blur with a blur radius of 1 and a standard deviation of 1.5 is as follows:
The first step, the application formula (1), is based on the coordinates of each point to obtain its weight:
In the second step, the weight matrix obtained above is normalized: each weight is divided by the sum of the ownership values. After this step, a new weight matrix will be obtained, and the sum of the weights is 1.
In the third step, the original image and the new weight matrix are multiplied correspondingly.
In the fourth step, all the pixel values of the new matrix obtained in the third step are added and reaveraged, and the obtained value is the value of the center point after the Gaussian blur with the blur radius of 1.
(2) Grayscale. Each pixel of a color picture needs to be represented by three color components of , , and . For example, RGB (29, 70, 180) represents a color pixel. The color pixel needs 3 components to represent, that is to say, 24 bit storage space is needed, so the color image requires a large storage space, and for the computer, a picture is a three-dimensional matrix, and the calculation of the three-dimensional matrix of the color image is processed. The amount is very complicated and is a serious test for efficiency. In fact, the three components of the color are only the reaction color matching information, and it has nothing to do with the image morphological features, and our extraction of the document image is to use the edge information of the document image and does not need color information to assist. For more convenient calculation and storage, we grayscale the color image for subsequent calculations. A specific variation of grayscale is to normalize the three components of the color pixel points to the same value according to the rules . For example, if the pixel point (29, 70, 180) is grayed out using the maximum rule, it is normalized to a point (180, 180, 180). In this way, a pixel needs only one value to represent, the storage space is also reduced from 24 bits to 8 bits, and the amount of calculation is also reduced accordingly, so that the subsequent use of the edge processing algorithm sobel operator, the Canny operator can be processed faster.
There are usually several common grayscale rules:(1)Component method
The value of any one of the three color components is selected as the grayscale image value according to the objective needs of the application.(2)Maximum method
The method compares the three component values by numerical value and uses the maximum value as the value of the grayscale image.(3)Average method
The values of the three components of the color are averaged to obtain the gray value of the grayscale image.(4)Weighted averaging method
According to formula (5), the gray image obtained by weighted averaging of three-component color is more natural, and the gray image is more in line with human visual perception.
(1) Image Noise Reduction. In reality, images obtained with camera equipment are definitely affected by light, and images are often affected by external environmental noise during transmission. Such images are called noise images. In the process of binarizing certain images, many granular unidentified objects appear on the image. These unidentified objects are called noise. The process of reducing noise in digital images is called image denoising . There are a lot of noises in the ID card image due to various factors, and these noises will cause some interference to the ID card identification. Filtering effectively removes noise from the image. After the image is filtered, the unknown objects μ can be removed, and the original binarized image contour can be kept unchanged. Filtering mainly includes mean filtering, median filtering, Wiener filtering and image wavelet domain filtering . Mean filtering is a kind of filtering algorithm. It refers to giving a template to the target pixel on the image. This template includes the pixels around it. The principle of the template is to form a template with 8 pixels around the target pixel, remove the target pixel itself, and then replace the original pixel value with the average of all the pixels in the template.
2.1.2. Edge Detection
(1) Canny Edge Detection. Canny is a point optimization operator with filtering, enhancement, and detection. Compared to other edge operators, Canny edge performs noise processing when exporting image characteristics , effectively suppressing noise, and has more advantages in anti-interference, and the edge processing effect is clearer, and the Canny operator can accurately determine the position of the edge. By measuring the signal-to-noise ratio and the positioning product, the Canny operator can quickly and accurately obtain the edge extraction map. The Canny operator smoothes the image after extracting the feature. The threshold is extracted in such a way that the resulting image features are more coherent. Before the edge feature extraction, the Canny operator performs Gaussian smoothing on the image to clear the image features, which is beneficial to the feature extraction of the image. After processing the color image into a grayscale image, edge feature extraction is performed on the two grayscale images by feature edge matching.
In order to evaluate the effectiveness of the edge detection method, Canny proposed three edge detection criteria: (1) good detection performance. The true edge is not missed, and the nonedge point is not detected as the edge point so that the output signal-to-noise ratio is maximized. (2) Good positioning performance. The detected edge point is closest to the actual edge point location. (3) Uniqueness. There is only one response for a single edge point. Under the guidance of the above three standards, Canny proposed the Canny edge detection algorithm as follows:(1)Select a Gaussian filter to smooth the image(2)Calculate the gradient of the smoothed image using the finite difference of the first-order partial derivative(3)The nonmaximum suppression of the gradient, the pixel that retains the local gradient maxima, and the largest gradient mutation at this point, in order to refine the ridgeband in the amplitude image(4)Detect and join edges with a double threshold algorithm 
The key to detecting the edge of the image using Canny is to select the appropriate threshold and C. A high and low level logical adjustment can detect more actual peaks and remove as many false peaks as possible. If the high threshold is set too small, the detected edge will be mixed with a lot of noise. If the setting is too large, the real edge will be missed. For the low threshold, if the setting is too large, the edge with a small change in the gray value will be caused. It is also missed. In addition, the reasonable σ size is also very important. The larger σ is, the more smooth the image will be, which will cause the image details to disappear, the gray level mutation will be far away from the original edge position, and the Gaussian filter length will be longer. To increase the amount of calculation, conversely, the smaller the σ is, the more the image is smoothed, so that there is a lot of noise mixed in the edge of the detection.
In general, the result of the Canny operator detection is better; it can reduce the interruption of the edge in the detection, which is beneficial to get a more complete edge. And in the case of noise, the Canny operator can effectively remove noise, so it is widely used to compare with other algorithms to evaluate the performance of other algorithms.
(2) Roberts Operator. The Roberts operator determines the gradient value by calculating the difference between two adjacent pixels in the diagonal direction of the point to be measured, so Roberts is also called the local difference operator. This method can effectively determine the edge points. Therefore, Roberts also called the gradient crossover operator; the Roberts operator uses a template with the difference:
Roberts’ gradient is centered on , and the metric is the change in pixel gray value in the 45 and 135 directions at the center point. The threshold is taken as , and when , the (, ) point is the edge point.
(3) Sobel Edge Detection Operator. Sobel operator is another common first-order edge detection operator, but unlike Roberts edge detection operator, Sobel edge detection operator uses a template. Sobel operator takes the template as the core and then convolutes and calculates with each pixel in the image to be processed. The difference between the longitudinal brightness and the transverse brightness can be obtained.
The characteristic of Sobel operator is that it can effectively eliminate the noise of the image to be processed and locate the edge direction of each edge point accurately. Although Sobel operator can find the edge direction better, the effect of Sobel operator in locating the edge is not ideal. This is mainly because when Sobel operator locates the edge, it can get 4 of a single pixel point by calculating . The weighted difference of neighboring pixels is used to find the extreme points of edges as edges. Therefore, in the application or experiment, the operator can be considered when the accuracy of the test results is not strict.
(4) Log Operator. The Log operator is also called the Laplace Gauss algorithm. Its principle is to combine the Gauss filter with Laplacian. The main reason is that the two-order derivative is more sensitive to noise. The Laplace transform of the two variable function is defined as:
The Gauss filtering function is as follows:
The Log operator uses two filtering methods to process images, namely, Gauss filter and pull Blass operator.
These two filtering methods are applied to low pass filtering and high pass filtering, respectively, and image edge detection is performed after filtering.
Log filter is as follows:
Compared with other edge detection operators, Log edge detection operator has the advantage that template can be calculated ahead of time, so when computing, it can directly call the calculated template to convolution the image.
2.2. Identity Card Recognition
2.2.1. Identity Card Character Feature Extraction
(1) Character Normalization. Typically, image extraction is not directly applicable to the export of features, because the quality of the image extracted from the preprocessed image directly poses the risk of identity card differences. Image size, attribute distribution, and so on will affect image output. Therefore, the character image obtained after character segmentation needs to be normalized before feature extraction.
Assuming that the size of the characters after segmentation is , the position of the center of gravity can be expressed by formula (10):
After obtaining the center of gravity of the image from formula (10), the center of gravity of the image is then transferred to the center of the image to normalize the position of the character image.
There are two ways to achieve normalization of image size: one is to enlarge or shrink the image to the specified scale through the border of the image. This method is simple in operation and relatively small in calculation. Another method is to incorporate the distribution characteristics of images into consideration. A relatively simple method is the distribution variance of images. The distribution variance of the image can be calculated by formula (11).
(2) Character Feature Statistics. The global characteristics of character images are essentially the processing of character images as a common image, and characters are only objects with certain characteristics. Therefore, the global feature extraction method of character image is similar to the general image feature extraction method. The global feature extraction methods of character images are mainly as follows:
Invariant moments (moment feature): invariant moments are important methods for object detection and recognition in optical image processing. The central moment and the origin moment of the image can distinguish the geometric information of the projection of the target in the imaging plane, but the geometry of the projection surface does not have scale, rotation, or affine invariance
Global projection features: the images are projected to several reference directions, respectively, and only the strokes that are perpendicular to the reference direction are projected to the reference direction. Compared with the stroke extraction method based on structural features, the method is simple and fast. The global projection features can reflect to some extent the complexity of the whole Chinese character, the main direction of strokes, and the possible connection between strokes
Background features: the background part of the ID card, the image, and the stroke of Chinese characters can also be used as a global feature of Chinese character and image. We usually select the blank points (nonstroke points) located on the two diagonal lines of the image to count the stroke density in each direction of the characters as the global background features of the images
2.2.2. Identity Card Identification
(1) Pattern Recognition Theory. Character recognition technology belongs to the category of pattern recognition and is also a very important application area. In short, pattern recognition is the identification of the category of a given object. It is an important branch of signal processing and artificial intelligence. Computers are used to describe and classify physical quantities and their changing processes. They are usually used to process, classify, and recognize information such as images, words, photographs, and sounds. In our daily life and work, we can not do without pattern recognition, such as recognition, discrimination, and discrimination. In general, we call information that is spatially and spatially distributed through observation of specific individual objects as patterns and refer to the category of patterns or the general pattern of the same category as mode classes. A pattern recognition system consists of 4 parts: data acquisition, preprocessing, feature extraction and selection, and classification decision. Its basic function is to identify which category the system has to deal with, as shown in Figure 1.
(2) Pattern Recognition Method and Classification. Pattern recognition technology can be generalized into two categories: statistical pattern recognition based on decision theory and syntactic pattern recognition based on formal language. They can be complementary in many cases. If the structural information of a schema is not important, the identification problem is mainly classified, rather than descriptive; then, the statistical method is enough; if the structure information of the pattern is very rich and the identification problem requires classification and description, then the syntax method is needed.(1)Statistical decision-making is a theoretical aspect which is relatively mature and has more methods. Its main idea is to classify decisions based on various posterior probabilities and probability density functions and minimize the error rate of decision-making. However, this method has its shortcomings, that is, it is very difficult to extract the pattern features in complex environment, and it is difficult to accurately reflect the structural characteristics of patterns. When using statistical decision method to classify and discriminate, the commonly used criteria are distance and similarity degree , which is the basis of classification and recognition. For example, the Minkowski distance of order :
When , it is the absolute distance:
When , the Euclidean distance is obtained.(2)Artificial Neural Network Method. Artificial neural network is a nonlinear dynamic system composed of a large number of simple basic units and neurons. The structure and function of each neuron are relatively simple, but the system composed of them can be very complex. It has some characteristics of human brain and can be used for association, recognition, and decision-making. Neural network is a “model independent” machine. It shows the performance of a classifier without tutor learning conditions, and it has the characteristics of training to make the output approximate any target in the type space, especially when the dimension of the training set is smaller than the dimension of the problem to be solved. In pattern recognition, noise interference or partial loss of input patterns often exist, while neural networks store the information distribution in the full coefficients of the links, making the network highly fault-tolerant and robust. This feature is also one of the reasons why it successfully solves the problem of pattern recognition. In addition, the self-organizing and adaptive learning function of neural network have shown great superiority in identifying problems. The distinguishing feature of this method is that the neural network after training can complete the extraction and classification of pattern features in parallel
3.1. Design of the Core Part of the IEEE 11073 Standard
The IEEE11073 standard is made up of many models, including communication model, domain information model, and service model. This paper focuses on the design and implementation of the three key models in the optimal exchange protocol of IEEE11073 standard. The administrator and agent in the protocol correspond to terminal devices (such as mobile phone terminals and computers) and medical devices (such as temperature apparatus and blood fat apparatus). The overall design of the IEEE11073 standard is shown in Figure 2.
3.2. Client Design
The home health system server is primarily responsible for connecting the user, registering users, measuring normal data, loading normal data, the question of normal data, and the management of normal data. Based on the above functions, the customer service terminal can be divided into the following modules: health data measurement module, antidata management module, user management module, and health data synchronization module four parts. The division of client software is shown in Figure 3 below.(1)The Health Data Measurement Module. The module obtains the user’s physiological data by calling the IEEE11073 standard communication plug-in and various health devices to create connections(2)Health Data Management. Statistical analysis of user health data and draw a data graph, allowing users to observe their health trends directly(3)Synchronization of Health Data. Home health system client and remote data center connect through the network, upload, or download health data(4)User Management Module. Manage user’s personal information, call the user when landing, if you have not saved the account password, you can register new users, use ID card identification module to collect user information, users can also register and modify their own information
4.1. Identity Card Image Preprocessing and Recognition Analysis
4.1.1. Image Processing of Identity Card
In order to have a more intuitive understanding of the edge detection algorithm proposed in this paper, we carry out two groups of experiments: the first group is to experiment with the algorithm in the case of no noise, and the second group is to experiment with the algorithm in the case of noise. The way of adding noise is to add 5% Gauss noise and 2% salt and pepper noise at the same time. The experimental results are shown in Figure 4.
Because Laplacian operator has good positioning performance, the gradient of real edge pixels can be increased by multiplying with Sobel operator, while the gradient of other pixels is weakened. Therefore, the edge detection algorithm based on gradient multiplication will have better accuracy than the edge detection based on first derivative, and the edge extracted by this algorithm is generally better than the edge detection based on first derivative. The result of edge detection based on derivative is finer and more complete. Compared with the edge detection algorithm based on second derivative, this algorithm has obvious advantages in antinoise.
4.1.2. Identity Card Image Recognition and Analysis
The recognition results of the algorithms and comparison algorithms used in this paper are shown in Table 1 and Figure 5. Random forest is a forest built randomly by multiple decision trees, and there is no correlation between each decision tree. For the recognition problem that can be solved by a single decision tree, it undoubtedly causes serious waste of resources without improving the results. Therefore, the design of this experiment is more reasonable for the resource overhead in smartphone environment. In conclusion, compared with the existing research methods and applications, the proposed method has been improved, and the recognition accuracy of basic behavior has also been improved. In a word, this method improves the accuracy and reduces the complexity, achieves the desired purpose, and proves the effectiveness of the proposed method. The recognition accuracy and resource utilization are good, and the identification of identity cards can be achieved.
4.2. Implementation of Main Functions of the System
The user can choose photos saved on the phone or use the camera on the phone to take photos. After shooting, you can automatically enter the photo clipping interface. Here, you can choose different proportions to tailor, cut out the background outside the frame of the ID card, cut out the photos on the identity card, and choose the tailoring. First of all, the system does the preprocessing and denoising of the ID card image and then identifies the text on the image. First, use the font library of the system to identify it, then recognize it with the font library that you have trained, and the result is shown in Figure 6.
After the mobile client connects with the health testing instrument, the data of the uploaded blood pressure is received. After analyzing the data of the XML format, the values of systolic blood pressure, diastolic pressure, average pressure, pulse, and measurement time are obtained. The blood pressure is calculated and compared and shown in the app measurement interface as shown in Figure 7.
In the main interface selection and cloud synchronization function, will download the recent eight measurement data or upload the new data collected by the mobile client. If the user chooses the function of healthy change trend at the main interface, it will synchronize data from the cloud and draw the trend line chart, for example, select the history blood pressure trend chart and display the result as shown in Figure 8.
(1)In order to better address the areas of text and portrait in the image of identity, image preprocessing is carried out, such as greying, duplication, improving image, and filtering to effectively separate useful areas of identity information(2)In the aspect of ID card character recognition, we design the function modules of image preprocessing, character segmentation, feature extraction, and character recognition. In this paper, we use uniform grid feature, rough periphery feature, and hog feature to describe character image and use CNN to classify character image. In view of the characteristics of carrying information on ID card, we design different character recognition methods. Classifier classifies and recognizes different information on ID card, which greatly improves the speed of character recognition(3)Design and implement the development of client and server under Android platform. The client program calls the core part of IEEE11073 standard implemented in this paper through JNI, receives and parses the health data of medical equipment, stores the data into the local database of mobile phone, and displays the health data of users in the way of graph statistics. At the same time, users can synchronize the data of local to remote centers to better realize the cross-device use of the client system
There is no data available to support this article.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
S. Chen, S. Liu, P. Wang, H. Liu, and L. Liu, “Highly stretchable fiber-shaped e-textiles for strain/pressure sensing, full-range human motions detection, health monitoring, and 2D force mapping,” Journal of Materials Science, vol. 53, no. 4, pp. 2995–3005, 2018.View at: Publisher Site | Google Scholar
J. J. Rissi, S. Gelmon, E. Saulino, R. Baker, P. Hatcher, and N. Merrithew, “Building the foundation for health system transformation: Oregon’s patient-centered primary care home program,” Journal of Public Health Management & Practice, vol. 21, no. 1, pp. 34–41, 2015.View at: Publisher Site | Google Scholar
R. Deng, “Design of healthy home system,” Design, vol. 12, pp. 17–19, 2017.View at: Google Scholar
L. Sun, “Design and implementation of personal health management system based on SSH,” Journal of University of Electronic Science and Technology., vol. 23, no. 4, pp. 71-72, 2016.View at: Google Scholar
S. B. Zou and C. X. Xie, “Development of family-based tele-health monitoring system,” Computer Engineering and Application, vol. 41, no. 10, pp. 30–34, 2015.View at: Google Scholar