Abstract
The Internet of things (IoT) is an emerging technology that enables ubiquitous devices to connect with the Internet. IoT technology has revolutionized the medical and healthcare industry by interconnecting smart devices and sensors. IoT-based devices and biosensors are ideal to detect diabetes disease by collecting the accurate value of glucose continuously. Diabetes is one of the well-known and major chronic diseases that has a worldwide social impact on community life. Blood glucose monitoring is a challenging task, and there is a need to propose a proper architecture of the noninvasive glucose sensing and monitoring mechanism, which could make diabetic people aware of self-management techniques. This survey presents a rigorous discussion of diabetes types and presents detection techniques based on IoT technology. In this research, an IoT-based healthcare network infrastructure has been proposed for monitoring diabetes disease based on big data analytics, cloud computing, and machine learning. The proposed infrastructure could handle the symptoms of diabetes, collect data, analyze it, and then transmit the results to the server for the next action. Besides, presented an inclusive survey on IoT-based diabetes monitoring applications, services, and proposed solutions. Furthermore, based on IoT technology the diabetes disease management taxonomy has also been presented. Finally, presented the attacks taxonomy as well as discussed challenges, and proposed a lightweight security model in order to secure the patient's health data.
Keywords
Introduction
Diabetes is a disease that is associated with fasting, abnormalities of the body's glucose, and disordered conditions of multiple organs and organ systems including the eyes, kidneys, nervous system, and blood circulatory system. 1 The disruption in these systems is linked with the debates, which also affects the heart rate and causes heart stroke as well as disease of arteries. It also affects the congestion of the heart and the failure of the heart. It has been observed that every year almost 805 diabetic patients die because of macrovascular disease. 2 Gestational diabetes occurs when a patient develops a high blood glucose level without a previous diagnosis of diabetes. 3 According to recent surveys, diabetes mellitus is the major cause of losing lives across the world.3,4 It has been observed that about 2.6 million adults are suffering from diabetes and this ratio is increasing every year. 4 Ketone is a special hormone developed in the human body when energy is produced by the consumption of body fat rather than glucose. This hormone increases the intracellular concentration of glucose by generating the substitute metabolism. 5
The key point for diagnosing diabetes is ketone testing. 6 Measurement of the ketone level helps in the effective monitoring of diabetes if there are a large number of ketones in the body then it is perceived that diabetes is going far beyond our control. 1 Therefore, a platform is needed for the self-management of diabetes to control the glucose level, blood pressure, and level of insulin required for the general working of the human body. 7 There are various medical sensors, devices, imaging, and diagnostic devices that can be considered smart objects instituting a major part of the Internet of things (IoT). IoT-based diabetes monitoring services are expected to minimize costs and enhance the experience for the user. Healthcare services provider claims that IoT has the ability to overcome downtime of devices remotely. Furthermore, IoT provides efficient resource scheduling by making its best use for monitoring diabetes patients.
Figure 1 shows the interdependency of the diabetes machines and medical staff. Diabetes sensors have been used for data collection from the patient and a medical device transfers the collected data to medical diabetes servers. These sensors can be of different types like pulse sensors, movement sensors, blood pressure sensors, and chest straps. A movement sensor is a tiny device that is inserted in any body part of your skin usually on the arm or belly. The sensor monitors the movement and measures the glucose level that exists between the cells. The transmitter sends information wirelessly to the diabetes sensor in order to measure the glucose level. Moreover, a pulse sensor monitors the blood glucose level in capillary blood which provides an easy and quick approach to measuring blood glucose. Chest strap sensor deals with Type 1 diabetes by monitoring heart rate continuously through a glucose meter and recording the blood sugar level.

Diabetes monitoring sensors and medical staff interdependency.
The new and improved IoT biomedical devices are not only helping diabetic patients in self-management but also the organizations which are responsible for the patient's health. Figure 2 presents trends of IoT and different levels of medical healthcare in the case of diabetes. Different kinds of data like blood pressure, glucose level, heart rate, electrocardiogram (ECG), and other vitals have been collected using IoT healthcare sensors and smart devices. Data is transferred via wireless local area network, personal local area network, or wireless metropolitan area network through gateway to store it on healthcare server. In recent times, the ambient assisted living methodology has been introduced to handle elderly diabetic patients that enabling the attendants to monitor the adult body's sugar and glucose levels using smart devices. Furthermore, in case of critical condition IoT-enabled emergency solutions such ambulance are available.

IoT-enabled diabetes trends.
In this article, a survey of multiple IoT devices, smart services, and ecosystems used for diabetic health management in literature has been discussed. The survey contributes in the following ways: firstly, the survey presents a rigorous discussion on IoT-based diabetes types and detection factors. Secondly, we have also discussed mobile applications for diabetes disease detection. Thirdly, we have discussed the IoT-diabetes network infrastructure comprehensively and proposed an IoT-diabetes network architecture, big data analytics-based framework, and a cloud-based platform. Fourthly, we also proposed an IoT-based diabetes monitoring taxonomy in order to analyze and predict the disease in a more accurate way. In the end, after presenting a comprehensive survey on IoT-based diabetes applications, sensors, communication protocols, and network infrastructure, we have discussed IoT-diabetes security attacks, and challenges, and proposed a lightweight security model.
However, the rest of the paper is organized as follows: Section “Introduction” introduces the work and section “Diabetes disease types and IoT-based detection factors” presents IoT-based diabetes disease types and detection factors. Section “IoT-based mobile diabetes management” describes IoT-based diabetes management through smartphone and mobile applications. Section “IoT network infrastructure for diabetes disease monitoring” presents IoT-diabetes network infrastructure along with proposed network architecture, machine learning & big data analytics framework, and cloud platform. Section “Diabetes disease monitoring taxonomy based on IoT” presents IoT-based diabetes monitoring taxonomy. In Section “IoT-based diabetes monitoring services and applications” IoT-based diabetes monitoring services and applications have been presented. Section “Comparisons of diabetes self-management cost” describes the cost-wise comparison of using IoT-based self-management techniques. Section “IoT-based diabetes security challenges, attacks taxonomy, and security model” discussed the challenges and security attacks of IoT-based diabetic healthcare and proposed a security model.
Diabetes disease types and IoT-based detection factors
In 1997, the Americans with Disabilities Act issued new diagnostic and classification criteria. 8 The classification of diabetes mellitus includes four clinical classes including Type1 which results from the destruction of B cells, Type2 which results from defective insulin resistance, Other types of diabetes which are caused by genetic defects, and Gestational diabetes which is caused during pregnancy issues. To classify diabetic patients a complete evaluation is needed which will detect whether the patient is suffering from the chronic disease Type 1 or not and it also helps them to model a plan and pathway. Figure 3 shows the medical database architecture for Type 1 diabetes self-monitoring infrastructure. All the data of the diabetic patients are stored on local databases that are not much bigger and a large medical cloud-based database. A communication channel is used to transfer the data from patient to doctor and vice versa. A medical repository at the user end handles this data and timely transfer is enabled on it to send the data to a healthcare organization. Protocols that are used for transmitting the data are responsible for securely communicating with the remote server and storing the data-to-data centers, which are mostly the organization whose responsibility is to monitor the patient. With the logical security of the data centers, these organizations are also responsible for the physical security and privacy breach of the data.

Medical database architecture for diabetes type 1.
This data is processed, and it is stored in a healthcare organization (HCO) archive for future use and analysis. All the data can be accessed by the Internet from any concerned party at any time by the concentrators used by the HCO. 9 Type 1 diabetes is mostly observed in the younger generation and adolescents for which a dedicated team should be provided that can address educational, nutritional, and other family issues. Mostly children that are under the age of 7 are attacked by this disease and they are under attack of great risk.
In the management of diabetes, it is very important that patients have a consistent doctor or team with them. These teams should include nurses, doctors, paramedical staff, and other relevant persons which have an interest in diabetes. Treatment goals should be implemented by discussing them with family and other relevant persons and the patient should also be involved continuously in these matters. Management is the main part of the control of this disease. Planning can include the factors like age, daily schedule, socioeconomic situations, and personality factors for a better understanding of the medical conditions.
Glycemic control is the key element that should be controlled in diabetes Type 2. Intensive control and planning can keep this factor under control. Many people who are suffering from this type of diabetes do not get the desired results so in such issues many steps like awareness and education of the individual, and an increase in self-monitoring evaluation techniques can be taken. 8 All the network architectures use the same basic flow for the monitoring and transferring of data to or from the doctor and patient. Figure 4 shows that different kinds of sensors collect data from the patient's devices that can be connected through Bluetooth, Wi-Fi, or local area network mediums and send this to gateway devices which are responsible for the transfer of data to medical servers. Medical data centers are established to store the data, which is analyzed on different parameters, and a final decision is made based on this data, which may or may not be in the favor of the patient. However, this data can be useful for future patients, which are suffering from the same type of diabetes, and symptoms this decision can be implemented on them for a speedy recovery and they can help for the efficient self-monitoring of the patients.

Type 2 diabetic patient monitoring flowchart.
Medical history should be checked before implementing the new treatment of diabetes. Like symptoms faced by the patient, previous records, a test in the laboratory, food patterns, nutrition plans, education about the disease, exercise history, frequency and severity of the disease, medicines which are recommended for this, tobacco, alcohol, and any kind of sexual complications history should be addressed properly. Physicians need to do the proper physical examination of the patient before diagnosing any kind of treatment plan. This checkup should involve the body weight, height, sexual maturity in the case of younger children, oral examinations, examination of fingers, hands, feet, skin, and other signs that can create complications for diabetic patients. Multiple checks are conducted in laboratories including Cholesterol checks, Triglyciders, Tests for albuminuria, Screening of pubertal children, Serum creatinine, Thyroid stimulating hormone, and Urine analysis for proteins. 10
IoT is the game of gadgets, but it is observed that 32% of users stop wearing the wearables after six months and 50% after one year. The main reason is that the companies that are manufacturing them do not add functional value to their gadgets regularly which causes them to lose the interest of the people them. This kind of company should regularly survey and analyze the interest and lifestyles of the people and do changes to their devices for a good user end experience. 11 IoT and IT infrastructures provide education to people through an intervention like calls, emails, and SMS. Most of the studies use text messages for this purpose. One study showed that patient needs to input their glucose reading for measurements and sends reminders of the next appointment. Another study showed that it emails about the information. Only one study do all the interactions with the participants and do not provide any face-to-face interaction. 12 Mobile health involves the patient throughout the process of treatment. 13 In the USA diabetes is numbered in 5th position as the cause of death. 14 It is also a reason for blindness, failure of kidneys, and other conditions of health. 14 New monitoring tools for glucose have shown significant improvements in efficiency and precise measurements of the patient. 15 Expenditures for global diabetes management reached $418 billion in 2010 and will be at least $561 billion in 2030. 16
IoT-based mobile diabetes management
Mobile diabetes management is the main component that helps patients to monitor their glucose levels continuously and effectively. These mobile systems have some functional modules. The patient module collects the data from sensors. This data can be blood pressure, blood glucose, and other parameters that will be collected and sent to servers that are commercially available for these purposes from mobile or other connected devices. Web interface is accessible by both the doctors and patients to see the visualization of the treatment and alarms and notifications. The other part of the whole system is servers and data centers devoted to this purpose.
Mobile diabetes management in United Kingdom and Canada showed comparative results and increased efficiency in the telemonitoring system. It enables the patients to take measurements at any time and any place. This system can go with them at any place and can be used remotely. It provides real-time data and real-time feedback for this purpose. It automatically sends the data to the remote servers and saves the time and effort of the patient. Patients do not need to manually handle the system and go through the logs and website. The monitoring system that is used for UK trials was the Moto Health system. In this system, patients do not need a mobile system to connect but they have attendants with them and they receive treatment from diabetes centers when they wish. 17
Most of the applications use manual data entry for the diabetes patients like MySuger, SugarStreak, and OneDrop apps are used for manual data entry. 18 Chronic patients are encouraged that they should engage on daily basis for their monitoring. This monitoring will include the collection of data like heart rate, body weight, and these kinds of various symptoms. These applications are helpful in the self-estimation of the patient's parameters. The sensors used for this purpose are fully automated and collect data of different types via Bluetooth Wi-Fi, which is so far an available communication medium for this purpose. 19
Smartphone or these kinds of gadgets plays an important role in this kind of monitoring. Many smartphones provide a browser-based system, and they work on touch-sensitive gadgets provided for this. The user launches the application from their web browser, which shows different categories of their diet plan, exercise routines, and logs of their alarms that were collected. Blood glucose data is directly entered by the patient on their desktop via different kinds of web forms created. Time and date stamps are incorporated with them. User can adjust their food items by searching the given menu which provides a list of items that can be used or a compilation of foods that are best suited for them. 20 Results showed that IoT systems helped people to improve their health with chronic diseases which is quite promising, and it helped a lot in Type2 diabetes patients. Internet-based helps give us positive results. 21
IoT network infrastructure for diabetes disease monitoring
IoT network acts as a backbone in order to facilitate and transmit medical data among patients, doctors, and the entire designed diabetes disease monitoring system. This section presents network architecture, platform, and network framework based on machine learning, big data analytics, and cloud computing.
IoT-based diabetes healthcare network architecture
Information gathering architecture for the diabetes patient's database comprises multiple layers like data collection, data processing, and data storage layer. Every layer of this system works on different levels with distributed components connected with each other and located in different places. 22 The storage-level layer stores the diabetic patient's data collected from different sensors. This data can consist of glucose, blood pressure, temperature, etc. Data analytics and alarms of the diabetic patient are gathered by wearable gadgets, biometric sensors like ECG, temperature sensors, breath rate, movement of muscles, and different body positions while sleeping. 23 These sensors are connected to different mediator sensors which are mostly mobile phones and applications deployed in them for diabetes and these sensors are on the premises of the diabetic patient. Figure 5 presents IoT-based diabetes disease monitoring network architecture.24,25

IoT-based diabetes disease monitoring network architecture.
Presentation layer
The diabetic user enters his requirements through different access methods. This access can be availed from different browsers like chrome, safari, and other mobile applications. Multiple operating systems can also be used like windows, MAC and Linux, etc. This architecture is useful for the users because it is scalable on multiple platforms and layers can be extended and it uses application programming interfaces (APIs) for the users. Mobile devices-enabled application is used to get data from patient or user. The Healthcare monitoring system fetches this data for the classification of the disease and based on this data it does blood glucose forecasting, and stores it in the medical database for real-time processing and timely evaluation.
Integration layer
Functions of the user panel can be accessed through API at the lowest layer and it is beneficial for the patient's portal because it uses low computations capability which does not require many resources and security of the data can be ensured at the possible level.
This layer consists of four management options for diabetic patients, which are prevention of the disease, treatment of the disease, disease monitoring, and feedback about the data gathered at a specific time or alarm. 26
Services layer
When the patient sends the request to the centralized servers it checks the parameters and profile of the patient and ensures that the request is genuine and initiated by a genuine user portal so that data security can be ensured, that is why all the security parameters of the patient are matched like authentication and authorization. Some services in this system control the layers of the system to collaborate with other layers. When a request is generated by a diabetic patient it analyzes and decided whether to accept it or deny it for the time being or postponed it for the queue of services. 27
Data layer
All collected data of the diabetic patient is stored on the data layer, which is then arranged in a formatted structure for better analysis and also can add new resources to the system. 27 Recent researchers have discovered a number of solutions for diabetes management in mobile applications and web portals that can be handled remotely. However, in developing countries like the United Kingdom, different research methodologies for the evaluation of diabetes at different stages are discovered. Some of the developing countries experimented with a trial of the mobile health management of diabetes which showed results more than expectations and it was found very beneficial for blood pressure, glucose, and insulin. This technique of tele monitoring was found very effective for the continuous monitoring of diabetic patients.
Access layer
When a portal is accessed to get information about a specific patient's profile, then this layer works as a data provider or denies access for this request. For efficient data access architecture, this system uses five modules of access which are connectors with the retrieved form of data (RDF), medical database records, suggestions, and recommendations; social networking records and the last one is RDF and Non-RDF data of the patient. The access layer is used for medical record access and interactions between patients and doctors, which also includes social platforms.
IoT-enabled diabetes monitoring framework based on big data analytics
IoT-based diabetes monitoring system makes data sharing more valuable among doctors, patients, and healthcare service providers. However, data sharing and storing in a highly cost-effective manner is a challenging issue due to limited space and poor data management. Integration of big data analytics and machine learning (ML) techniques with IoT technology overcome the diabetes disease data storage and management challenge in an efficient way. Figure 6 shows a big data analytics and ML-based IoT-enabled network framework which includes four layers: analysis of sensing layer and personalized diagnosis layer, data sharing layer, personalized diagnostic layer, and sensing layer.

IoT-enabled diabetes monitoring framework based on big data analytics and machine learning.
Sensing layer
Sensing layers collect physiological information of the patients and other vitals that are necessary for diabetes diagnosis. For example, a blood glucose sensor is mounted on the body of the patient to collect real-time vitals. The connected mobile device monitors the patient's diet and records the entire diet statistics. In addition, the connected medical sensors collect the diabetes-related data thoroughly by using 4g/5g/Wi-Fi networks and store it on a cloud platform.
Personalized diagnosis layer
At this layer, diabetes disease-related big data is processed jointly by using ML approaches to develop an efficient model for predicting and analyzing the disease severity. This layer fetches the health-related data of diabetes patients from the sensing layer and implements cognitive intelligence for the diagnosis and treatment of diabetes disease. Furthermore, different types of learning tools and data analytics approaches are also implemented in the big data cloud.
Data sharing layer
This layer consists of social space and big data cloud space to store diabetes patients’ data. With the help of social networks, they can share diabetes disease-related information with each other in order to motivate others on how to fight against the disease. Furthermore, patients who have a long and successful history of suffering from diabetes disease will share their experience with people who are suffering from the disease severity.
Analysis of the sensing layer and personalized diagnostic layer
IoT-enabled diabetes monitoring systems analyze multidimensional data regarding diabetes disease based on big data analytics and ML techniques. This layer analyses and predict the disease severity based on personalized data and public data by implementing ML, deep learning, and cognitive computing approaches. The public data is obtained from hospitals where diabetes data is stored in the form of large datasets to train the diagnosis model. In this way, a personalized diagnosis analysis model is obtained based on personalized data as well as public diabetes diagnostic data. The data may be in structured, unstructured, or both forms. The structured data helps to identify the features related to diabetes, however, unstructured data such as images and text uses neural networks to choose a feature. 28 After deploying the algorithm of deep learning on the selected dataset, a diagnosis model for diabetes disease is obtained.
IoT-enabled diabetes monitoring cloud platform
Monitoring IoT-based diabetes disease remotely demands a flexible and scalable platform to store and process health-related data. Integration of cloud computing with IoT can offer such kind of scalability and flexibility to store and process health data. 29 In Figure 7 a cloud-based conceptual framework is presented to monitor diabetes disease remotely that consists of three layers including IoT-based diabetes monitoring sensor layer, cloud layer, and user layer.

IoT-based diabetes monitoring network platform based on cloud computing.
User layer
In the user layer, each diabetes patient is registered with the designed system by providing disease-related detail. The system will generate a unique registration number for all registered users. Furthermore, the data acquisition approach is applied to obtain diabetes patient health data in order to enhance the historical data. There are two major categories of users that are patients and doctors or healthcare experts who can access shared or isolated cloud databases in the proposed system.
Sensor layer
Multiple sensors are deployed around or in the patient's body to analyze and measure the functions of the body. These sensors can be implanted or wearable devices that are integrated with other biosensors to collect the structure or unstructured health parameters through a gateway. Furthermore, this gateway exchanges data with the cloud layer by utilizing wireless communication networks such as 4G/5G, general packet radio services (GPRS), or code division multiple access (CDMA). Moreover, different security techniques are implemented at the cloud layer such as user authentication, credential mapping, and encryption/decryption.
Cloud layer
The diabetes disease and other health-related parameters are stored on the cloud server. After storing on the cloud server, the data is sensed and retrieved on regular basis at different time intervals. In order to provide effective storage and efficient decision-making, a cloud data storage system is designed on the server side. The diabetes disease parameters are extracted and transmitted to the diabetes diagnostic system where extracted data is analyzed for further investigation. The diagnostic method is performed by considering predefined types of diabetes disease such as Type 1, Type 2, and gestational diabetes. Moreover, different tests are performed to detect the disease severity such as the A1C test, random or fasting blood sugar test, and blood glucose test.
Diabetes disease monitoring taxonomy based on IoT
IoT-based health management system empowers diabetic patient in selecting the choice of glucose monitors. Every device has the claim that it has an accuracy and precision rate better than others for diabetic patients and these claims are tested by the companies that produce them and somewhat tested indirectly by the users. 30 Figure 8 shows different working areas of IoT in diabetes healthcare, which include sensors and devices, data management of a diabetic patient, self-care management of the disease, emergency response mechanism in case of critical issues faced, and wireless protocols that are used for all the communications in this taxonomy. In case a patient has some initial symptoms of the diabetic disease like abnormality of glucose or blood pressure, this IoT taxonomy continuously reports the system. This system is linked with the caretakers, hospitals, doctors, and the patient module.

Diabetes monitoring taxonomy based on IoT.
Sensors and devices
These monitoring devices and applications are the key components for communication and effective monitoring. Sensor and wearable devices are used to gather data from patients that are then stored on medical databases, they move toward different data processing techniques and analytical algorithms are performed on data. This data is then exported to the visualizable form that is visible to both doctor and patient remotely which tells the user about the progress of his health and informs the doctor to pursue the same diagnosis or try some different treatment. Data collected from the diabetic patient from sensors is collected at the server end. It relates to the low-power Bluetooth devices to collect the relevant material. These sensors are synchronized with the servers with the handshaking messages.
Wireless communication protocols
With a lot, more improvements in Internet-based diabetic health applications and advancements in technology, now the monitoring efficiency of diabetes has increased extensively. New research has proved it to be a more efficient way of handling diabetes by providing secure and fast data transmission over the network. With the help of IoT communication protocols, an individual is now aware of every move of the disease, and a proactive approach is really implemented well here. Different wireless communication protocols are used to provide a quick and fast diabetes disease management system. There are two major types of communication protocols, that is, IoT data acquisition protocol and standard data acquisition protocol. These protocols can be increased or decreased based on the designed IoT-enabled diabetes monitoring system.
Emergency response
There have been many studies on the effective intervention of monitoring the lifestyle of diabetes patients in the context of their metabolisms. It has different kinds of sensors, which gather the data in real-time and operate continuous monitoring. One of the researchers’ stone et al. 31 proposed the idea of using a smart guard for insulin pumps. It will work on predictive technology with the help of sensors that gather data about insulin congestion in the body and it will release or stop the injection of insulin accordingly by keeping in view the glucose levels. This model was proposed with a prototype with an artificial pancreas that will be easy to move and will use glucose sensors and insulin pumps via Bluetooth connection mediums with the body area network.
With the new trend of IoT in the healthcare field, it is now very easy for healthcare teams and individuals to handle diabetes in younger adults and adolescents. With these sensor-based monitoring techniques experiments, analytics of big diabetic data and its assessment can be implemented effectively with the help of mobile or web-based applications. Still, there is a lot of deficiency in this field to get better. We need to know where we are lacking, and which potential part of the sensor-based diabetes monitoring needs to be addressed the most and we are halfway there. Mostly diabetic diagnosed reasons are the hypertensions that the patient creates for different psychological reasons. 32 It affects blood pressure, glucose level, insulin consumption, and other hormones are also get affected. Continuous blood pressure organizations and other predictive analysts’ teams for future workings.
Diabetes is a disease that is directly relevant to your eating habits. Your diet routines and your meal attractions might be different, but they should be according to the diet plan if you are suffering from chronic diabetes. 33 Therefore, a specialist for a diet plan should be with the patient and will schedule his/her diet plan according to the severity level of the disease. Most of the technologies nowadays are using tele-conferencing solutions for individuals for better diet plans and timely help. These conferencing and apps help the patient to choose the diet plan and help them with food selection. 34 These applications relate to the food coach who timely responds to the client and in this therapy pictures, and video monitoring is valuable if done properly 24 h a day. It can help in deciding the lifestyle with the parameters of sleep and waking patterns. 35 Mobile health applications used for continuous monitoring of blood pressure and timely feedback can affect self-monitoring in a better way and physicians can also diagnose better for the next move. 36 In today's IoT world portable blood pressure monitors can be used that are always connected to the servers that take readings of the patient and send them directly to the centralized healthcare units or paramedical staff. 37
Data management
Data management for diabetes is the key component of any kind of analytics. Sensors collect data from patients and then send it to the server for multiple types of operations. This data can be diversified like age, gender, date of diagnosis of diabetes, type of diabetes, and history of family data affected by diabetes, this data can be gathered automatically or via sensors. The most commonly used sensors for diabetes monitoring are glucose sensors, blood pressure sensors, heartbeat sensors, weight sensors, and pulse sensors. These sensors receive diverse diabetes data and show the tendency of the disease toward a specific direction of abnormality. 38
Self-care behavior
Self-monitoring of diabetes plays an important role for people who are newly diagnosed with this disease and should be given education about it. They should be educated on critical issues about hypoglycemia and the effect of medication on the change of their routine lifestyles. 39 Anderson discussed that self-monitoring of diabetes can be an integral part of the patients’ life to change the Type 2 of diabetes to a lower level of destruction. There should be some habits maintained which are discussed as distress physically and mentally, should perform foot care to stop smoking habits, and should control alcohol consumption. 40
Zhang et al. 41 has been proposed a model that has gathered the specific grouped of population data, which was being analyzed for prediction of the next move of the disease in an individual. With the help of mobile applications, they get the daily data of the diabetic patient like his meal, exercises, socializing, sleep timings, body postures, and other routines. Diabetes monitoring is quite difficult because of its complexity and self-management schedules. It will take about 65 tasks for efficient and complete monitoring which includes food and body fitness exercise routines. It will also include location monitoring, behavioral change of the patient, social gatherings, and other personal activities round the clock. These routines can be disturbed by daily social life activities and living lifestyles of a person which can be changed during certain times for specific reasons. 41 However, the utilization of fast-growing IoT technology enables an efficient and reliable system for self-diabetes monitoring system.
IoT-based diabetes monitoring services and applications
A research study analysis revealed that 1657 participants exhibited reduced HbA1c values because of mobile phone interventions. Statistical analysis also showed a success rate over a median of 6 months. 42 The study provided strong evidence that mobile phone intervention was helpful in improving glycemic levels for patients who self-manage their diabetes levels. 43 In healthcare management IoT applications and proposed solutions are supporting remote monitoring efficiently as well as promote diabetes diseases care awareness. 3 An open-source platform Hadoop developed by Apache serves as the twin role for the management and analytical tool. The data of the different patients are the huge amount, and this platform is used for handling this. This medical data is handled by Hadoop principles which are Map/Reduce and distributed file system. 3 Self-management of diabetes has been proved a vital component of the diabetes management system. Figure 9 shows the IoT-based diabetes monitoring applications and proposed solutions. Table 1 some of the applications being used for diabetes monitoring with their functionalities and the help that they are providing.

IoT-based diabetes monitoring services.
IoT-based diabetes monitoring applications and services.
IoT: Internet of Things.
Comparisons of diabetes self-management cost
A study of the current cost of illness showed the monetary value of diabetes expenditures which can be vital information for many HCOs and other bodies that plan and execute national health policies. 55 This shows the spread of diabetes worldwide and indicates which country is bearing how much cost for a basic diabetes healthcare service. This data can be useful for researchers that are eager to invest their time in better diabetes cost management solutions. 55 Understanding the costs associated with diabetes disease management is important in health economic analyses and for policy decisions regarding the efficient use of healthcare resources in this disease. 52 Figure 10 shows the worldwide spread of diabetes on different continents.

Worldwide diabetes spread.
India
The direct cost per year of diabetes disease management in India is estimated to be INR 25,391. Hospital admission costs for the management of diabetes are up to INR 12,992 and 8595 INR for the drugs and monitoring of diabetes. People normally spend 2932 INR on average for checkups for diabetes. People who do not have diabetes have spent 6520 INR for their care and some of them who have three complications have spent the direct cost of 32,500 INR per year. People, who do not have diabetes, spent 6520 INR for their care and some of them who have diabetes complications have spent the direct cost of 32,500 INR per year for this.
Poland
In Poland, during the period (2005–2009) it was observed that the cost of diabetes became double. It is the basic cause of sickness and works incapacity in Poland which also affects the earning power of the masses. In total, 332 EUR was the direct cost for the hospital cases, which are now five times more. The expenditures for direct costs raised to 41%, and the cost for diabetes monitoring was estimated to be EUR 654 million which is approximately 2.8% of the total healthcare cost in Poland. 53
Pakistan
Different studies show that on average, a patient with diabetes pays Rs 700 on consultations, Rs. 400 on tests from labs, and an amount of Rs. 1000 spent monthly for sugar tests at home. Diabetes is a chronic disease that is affecting people worldwide not only physically but economically too. A diabetic patient spends Rs 1100 per month on medicines and the travel cost is about Rs 200. While Rs 1000 per month is spent on diabetic food. 56
Australia
According to some surveys, the diabetic patient limit reached one million by the age of 25 years in 2000 and it is expected to reach 2–2.9 million by the end of 2025. Australian diabetes study is one of the largest population-based studies on diabetes and its critical issues. Estimating the cost for Australians for diabetes was the multiplication of the prevalence of diabetes at 30 years of age with per capita cost that rises up with the change in inflation rate. 57
United Kingdom
Costs of diabetes in 2010/ 2011 were 23.7 bn Pounds, which includes one billion for the patient with diabetes Type 1 and another amount of about 8.8 bn for the patient of debates Type 2 and some indirect costs of about 13.9 bn Pounds. It is estimated that by 2035/2036 this cost will reach 39.8 bn. This will include 16.9 bn direct costs and an indirect cost of 22.9 bn. A huge amount of healthcare resources is served in diabetes which is about 10% and it will reach 17% in 2035/2036. 58
Kingdom of Saudi Arabia
Saudi Arabia is a country that has spent a huge amount of its resources on its health sector. Saudi health ministry hired 250,000 personnel which included physicians, nurses, 249 hospitals, and 34,000 beds. Sixty percent of the healthcare services are their responsibility and other is managed by private or semipublic organizations. Doctor visits for those who are receiving no treatment are about 1152 Riyals and the cost of a transplant is about 56,255 Riyals. The current cost of diabetes is about 17 bn Riyals and for those who were not diagnosed earlier is 27 bn Riyals. Diabetes cost estimated was 25,39.8 and 63.4 bn Riyals if the Saudis and non-Saudis are in the same pool of patterns of the disease. 56
Canada
Healthcare cost for the period of 2011/2012 was $7.55 billion for female patients and $7.81 billion for males. Intense care hospitalization costs about 43.2% of the resources. Intervention in the population would save about $2.03 billion and a 30% risk reduction intervention with the highest diabetes risk will save about $1.48 Billion. 59
IoT-based diabetes security challenges, attacks taxonomy, and security model
As we will reach the year 2022, billions of medical devices will be serving humanity for different purposes and aspects. 39 IoT will play a major role in remotely handling and tackling patients in far-flung areas that are not reachable till now. 2 As the number of medical devices is easily available online and publicly, therefore the chances of attacks and security threats are also increasing exponentially. 40 Healthcare companies and industries which are making gadgets and sensors for the purpose of remote monitoring are also ensuring that the data of their patients should not be exposed publicly without their prior approval. Many kinds of attacks are observed on IoT-based medical healthcare systems. Some of the most common attacks are discussed in this section. Figure 11 shows the taxonomy of attacks on IoT-based diabetes disease detection systems.

IoT attacks taxonomy in diabetes disease network.
Attacks based on access level
A secure mechanism is needed for secure access to IoT healthcare systems. Two types of security measures can be taken for the security mechanism which are passive attacks and active attacks. Access-level security mechanism is implemented to secure the IoT healthcare systems infrastructure. 60 Important information about the patients is stored on healthcare servers to access from anywhere and this kind of attack does not disturb communications. They just monitor and do eavesdropping. They only try to steal the data from the systems. For example, a patient sends his abnormalities to the doctor and the doctor receives it but the person who is accessing the information in between is the passive attacker who only wants to know about the information. 61 On the other hand, if a person is interested in destroying the security wall and wants to steal the patient's information as well as be willing to disturb the communications an active attacker is more dangerous than a passive attacker.
Physical level security is the main security framework that should be implemented on priority. 62 Health data and medical databases are extremely sensitive, and people do not want to share this kind of information with other than their relevant doctors or physicians. So before implementing logical security we must implement physical security. 63 Logical attacks are launched to dysfunctional the capabilities of the healthcare system from the core of IoT so that all the functionalities can be stopped or hung for some time or for a longer period. Host-based attacks are launched to affect the user's data or the software that is being used for the IoT functions and hardware misfunctioning, as IoT devices consist of operating systems and applications for their connectivity so this kind of attack is usually launched on them. 64
Sybil attack
Health data is stored in the cloud which can be accessed by both doctors and patients. Therefore, the data is vulnerable, and an attack is done to steal the patient's information by inserting viruses into the website. It looks like a normal user, but it is not. Many social websites also suffer from this attack like Facebook, Twitter, and Instagram. 65 The Healthcare system and resources are required to be used 24/7 but this kind of attack can stop the services for some time or for a longer period. This attack has two types that are ordinary denial of service (DoS) attacks and distributed denial of service (DDoS) attacks. DoS attack sends a burst of packets to the Servers, which results in crashing the system and stopping the services for everyone while the DDoS attacker can be a single attacker, but it is not as powerful as a proxy attack.
Compromise attack
If the users or patients are not aware of the importance of data security, then they can easily share their data with any unknown person and this thing makes their data and privacy compromised on various levels in the network. Therefore, users can be guided well for the security and privacy of their credentials. 66
Software compromise
Software used for communication between healthcare organizations and users can also be compromised if not handled properly and this makes the resources unavailable, or downtime can be observed. 67 IoT devices are embedded with custom-made software that is used for different purposes. In IoT-based diabetes healthcare systems, IoT technologies have a very thin layer of security frameworks that is not enough to handle large attacks. That is why lightweight but powerful security mechanisms should be implemented at the software level security. 58
Hardware compromise
Gadgets, sensors, and other hardware devices are the key elements for communication in diabetes healthcare and mobile data management systems. If someone is successful to reach the hardware, then it can be easily tempered for unethical purposes. Host-based attacks can be done on the hardware by injecting viruses and malware into the hardware and it is possible that no one knows about it for a longer period. Hardware incapacity is the main problem to tackle the patient's data because hardware devices have battery power, and they are energy-consuming devices due to the high volume of computations. Therefore, for fast and accurate results we cannot use less efficient devices in IoT healthcare systems. Many healthcare gadgets and devices are in remote areas, patients are not able to reach the doctor physically, and a professional does not attend to these devices at any time. This scenario is quite alarming because any person can attack these devices. An attacker can modify the security frameworks and inject the desired code into the device. 57 IoT gadgets are devices that can be used at anytime and anywhere, and this mobility of the devices should have a secure mechanism to interact with the patient as well as with the servers remotely, so mobility-enabled security mechanisms should be implemented. Many IoT healthcare gadgets are not made for scalable functionality and this schema is not suited for the best implementations of the security mechanism. 59
IoT system has now become vast in diversity and different kinds of devices from different manufacturers have been introduced for the diabetes healthcare industry, so it is not possible for the security handlers to deal with every device with the same strategy. As we discussed that different devices are manufactured by different companies and their diversity is vast. It is the case with the communication mediums that are also different for every device. Some are using a wired area network and other is using wireless technology or Bluetooth or in some case, they are using infrared technology, so implementation of the same security patch is difficult for different devices in this case. 68
Routing attacks
Spoofing or replay attacks occur when data is exchanged between the medical nodes. This attack is generated by false messages that are shown on the machines for a trap. In this attack, the first attacker only listens to the communication between the nodes, and when the communication stops sending the signal it sends unreliable signals to the medical devices. This kind of attack on the healthcare system reflects the message that is sent to the desired person, but it is stopped by the middleman, and they manipulate it and replay or send them after some time which can confuse the IoT system, and this is dangerous for all the infrastructure where machines are not capable to handle this kind of attack anymore.
They can steal the communication data and then show them on their behalf by altering the actual data. Diabetes healthcare infrastructure can be interrupted inside or outside the network and can cause huge disasters for the IoT infrastructures. As we can see that health gadgets, sensors, and other mobile devices are resource-consuming therefore it is a bad idea to implement the traditional security mechanisms on smart devices that will not be compatible with the security that you need to implement to secure the data. 48 IoT-diabetes healthcare systems and other IoT structures are vulnerable to security threats at a massive level; therefore, high-level security should be implemented.
Patients might find it a compulsion and uncomfortable to use self-monitoring IoT devices for diabetes. And it is found more uncomfortable for patients of diabetes Type2 to self-control diabetes and they find it more intrusive. It is a big question whether wearable devices are completing the security measures or not. The majority of the devices promise the best functionality in the healthcare sector but very less of them promise security infrastructure management and are on real grounds, so it is very difficult to promise security in IoT health infrastructure.
IoT deployment challenges in healthcare for diabetes disease
Medical IoT platforms were designed to help in composing analytics rapidly, gaining insights, and achieving organizational data transformation and integration. However, five main requirements represent a serious challenge to achieve in these IoT-based medical platforms including providing simple connectivity to devices and data through cloud-based services. Medical device management activities (e.g. check asset availability, increase throughput, minimize outages, and reduce maintenance costs). Intelligent data storage and transformation through APIs bridge the gap that exists between the data and the cloud is also a big challenge. Moreover, informative analytics of huge data is needed at run time to gain insight and make better decisions. The rising prevalence of diabetes and its vascular complications is a global public health issue. Studies evaluating diabetic patients over 20–30 years have identified complication risk factors including worse glycemic control, longer Diabetes Care, 2011 diabetes duration, hypertension, and hyperlipidemia. However, other than glycemic and systemic control, no clinical or biochemical factors have conclusively been shown to protect against long-term complications.
Secure diabetes disease monitoring model
A secure health monitoring model has been proposed in Figure 12 by implementing a lightweight encryption method. Concerning the development of blood glucose, weight, cholesterol, blood pressure, and all other physiological activities are considered in this research for proper monitoring of diabetes disease. Therefore, the primary purpose of this research is to provide secure monitoring of multiple diseases for the early diagnosis of diabetes disease. The security model implementation process for diabetes disease detection is shown in Figure 12. It can be seen that diabetes data collection through healthcare sensing devices and data collection from IoT devices is performed in parallel. Furthermore, the implementation of an encryption mechanism to secure collected diabetes data, transmit data to the service provider, data storage on a cloud server, deploy a decryption mechanism to secure collected diabetes data, and perform preliminary processing on collected data. In addition, on the behalf of diagnosis outcomes and detected abnormalities, the diabetes disease detection results are consulted with doctors and in case of any severity level, a message is sent to emergency service providers and patients simultaneously. If it is not an emergency case, then diabetes disease diagnosis results are directly sent to the patient.

A lightweight security model.
Research findings
The findings of this research in IoT-based diabetes disease detection serve three purposes. Firstly, the research explicates the current status and understanding in the literature on the implementation of IoT for diabetes disease detection through undertaking the review. It highlights that IoT-based diabetes disease monitoring can detect real-time health conditions by improving connectivity and integration and provide improved health efficiencies. Secondly, the research provides deep insights into IoT-based diabetes monitoring network infrastructure that indicates IoT network acts as a backbone in order to facilitate and transmit the medical data among patients, doctors, and designed diabetes disease monitoring systems. Thirdly, taxonomy designed for IoT-enabled diabetes monitoring indicates that IoT devices and sensors are ideal for diabetic patients in selecting the choice of glucose and other important aspects for disease prevention. We have identified that still there is a large number of security issues with connected devices while transferring data in real time. Every device has the claimed that it has accuracy and precision rate better than others for diabetic patients but personal data can be hacked. Therefore, we have proposed a lightweight security model to mitigate the security issues. Fourthly, this survey has identified some challenges as well as gaps and suggested future direction.
Conclusion
Researchers and industries worldwide are putting their efforts into making the IoT more valuable and effective in all domains of life including healthcare. Chronic diseases like diabetes have also been included in this category to make the patients independent of visiting their doctor every time physically. Although IoT technology has played a vital role till now in controlling diabetes worldwide with the benefit of cost-cutting and an independent environment. This survey presents how the integration of IoT technology with ML, cloud computing, and big data analytics revolutionizes diabetes disease monitoring and controlling patterns. IoT-enabled diabetes monitoring taxonomy has been proposed in order to show how this technology transmits and processes health-related data. Presented an extensive over of proposed diabetes smart solutions, and services, and discussed a cost comparison in different countries on traditional diabetes monitoring methods. But it still has drawbacks of network security, communication mediums, and lack of awareness among users and their caretakers. A rigorous discussion has been presented on security attacks and challenges in IoT-based diabetes monitoring and proposed a lightweight security model to mitigate the attacks. Governments around the world have started taking IoT seriously in digitalizing the healthcare domain including most diseases such as diabetes and it is strongly hoped that IoT will revolutionize the health industry all around the world. Furthermore, it is expected that this survey will be a useful piece of information for students, researchers, health industry stakeholders, and policymakers to control diabetes disease in a more efficient and effective way in the future with IoT.
Footnotes
Acknowledgments
The authors gratefully acknowledge the continuous support of senior research fellows for their expertise and assistance throughout all aspects of our study and for their help in writing the manuscript.
Contributorship
médecins sans frontières (MSF) led this research work and statistically analyzed the whole article. This manuscript presents the network architecture, taxonomies, and security model that are designed to measure the diabetes disease effectively. Sustained Release (SR) has supported for the problem statement refinement with state-of-the-art literature review. Moreover, MSF and SR have contributed in the selection of frequently used open-source software in the field of diabetes. The manuscript draft was proofread and revised three times before submitting to your prestigious journal by RT and UF. RT and KS has made contribution in designing methodology and proof reading of manuscript. In the end, all authors read and final the manuscript.
Patient consent
Patient informed consent was not required due to the study design (survey of systematic reviews/literature).
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.
Ethical approval
Ethical approval was not required as this research was a survey of the literature.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article
Guarantor
MSF.
