Abstract
In the industrial Internet of Things, water and electricity is the most important hidden project. Its requirements are very high, especially the intelligent control of water and electricity. Therefore, a design and application of system with dual-control of water and electricity is proposed and convolutional neural networks–based video recognition technology is used to identify the security issues that occur in the field. Some sensors are used to control the use of water and electricity, while others are used to collect scalar data which include user’s data and video multimedia data in the wireless sensor network. The scalar data are used to update the user’s database, and the video multimedia data are used to monitor and prevent anomalies from occurring in the field of dual-control of water and electricity. In order to solve the security problem of the user in wireless sensor network, this article proposes a radio frequency identification mutual security authentication protocol based on shared secret hash function. Finally, experiments show that the proposed secure authentication protocol can guarantee the secure transmission of data between the sensor node and the server, and the video recognition technology can recognize some abnormalities well.
Keywords
Introduction
In the Internet of Things (IoT), radio frequency identification (RFID) technology has been widely used. RFID technology is used to identify objects and information by radio wave, which is similar to traditional automatic identification technology. RFID technology itself has no security and privacy issues. However, if the identification information of the target object is stored in the RFID tag, it may bring security and privacy problems. The system with dual-control of water and electricity proposed in this article is related to RFID technology. However, due to the uniqueness of data transmission tags in RFID system, designing a secure and efficient RFID security authentication scheme1–3 has become a major challenge in the field of RFID security protocols. Wireless sensor networks (WSNs) are widely used in emergency rescue systems, 4 monitoring systems, 5 smart cities, 6 and smart metering. 7 The main task of this network is to collect data to achieve monitoring goals. WSNs are composed of a large number of inexpensive micro-sensor nodes deployed in the monitoring area, and a multi-hop self-organizing network system formed by wireless communication. The purpose of WSN is to collaboratively perceive, collect, and process the information of the perceived objects in the network coverage area and send it to the observer. In this article, some sensor nodes that can collect more abundant video, audio, and image information are added to the WSN.8,9 These different nodes form a distributed sensor network with storage, computing, and communication capabilities. The WSN10–12 uses multimedia sensor nodes to perceive various media information in the surrounding environment. The information can be transmitted to the aggregation node through single-hop and multi-hop relays. Then, the aggregation node sends the received data from other nodes to the server for processing. This article uses convolutional neural networks (CNN)13,14 identification technology to identify surveillance video in real time. CNN, as a model structure of deep learning, is a depth learning perceptron designed for identifying two-dimensional shapes. At the same time, CNN deals with image information through the correlation of the convolution layers and the polling layers, which has low sensitivity to translation, scaling, tilt, and rotation, and is more suitable for unconstrained video object recognition.
The contribution of this article is summarized as follows: first, this article proposes a mutual authentication protocol to ensure the security and privacy of the user’s information data. Second, this article shows that WSN is used to collect scalar data and video multimedia data and control the use of water and electricity. Finally, the article shows that CNN is used to identify the video that monitors the field of dual-control of water and electricity.
This article is organized as follows. Section “Related work” presents a review of the related methods about monitoring systems based on WSN, CNN and security, and privacy issues constantly appearing in the RFID system. Section “RFID mutual authentication protocol based on shared secret hash function” details our proposed method which demonstrates the design and analysis of security authentication protocol. Section “Design and application of system with dual-control of water and electricity based on WSN and video recognition technology” details our proposed system. Experiments and discussions are presented in section “Experiment.” Finally, conclusions are drawn in section “Conclusion and future work.”
Related work
In the IoT era, WSN is increasingly used in various scenarios. 10 Using WSN to monitor the mining industry field to prevent accidents and disasters, we proposed a WSN-based system, which is capable of detecting and identifying events of interest (success rate of 90%) and effectively monitor and greatly reduce the risk. 12 WSNs were applied to airport cargo transportation, and the design of airport logistics monitoring system based on WSN and RFID was proposed. Its design scheme is similar to the method proposed in this article and also uses wireless sensor to collect data. Different from the idea presented in this article, this article uses RFID system to ensure the safety of user’s data and Le 12 uses RFID equipment to monitor the scene. Memos et al. 11 describe the upcoming IoT network architecture and its security challenges, and analyzes the most important studies on media security and privacy in WSNs. This article mainly focuses on the security issues brought by RFID systems. Zhang et al. 13 introduces that two-stream CNNs prove very successful for video-based motion recognition. However, the calculation of MV and OF will require a lot of memory and a lot of time. Since the motion vector only contains block level and inaccurate motion information, directly training CNN from the beginning with the motion vector will reduce the performance of motion recognition.
In the IoT, a RFID mutual security authentication protocol based on a shared secret hash function is used to ensure the security of user data between the RFID device and the server. In WSN, sensor devices collect water flows, electricity bills, and surveillance videos. The sensor node sends the data to the server to update the user database, which communicates with the Internet through the aggregation node of the WSN. The server can identify video in real time, thus preventing the occurrence of abnormal conditions. The video sensing technology based on convolution neural network is used to monitor15,16 the scene remotely and understand the situation at any time so as to achieve early warning and disaster reduction. For a variety of security and privacy issues that RFID systems are constantly presenting, scholars at home and abroad have found through long-term research that the privacy threats of RFID technology mainly include the following aspects:17–21 location threat, constellation threat, transaction threat, preference threat, and bread crumbs threats. These privacy threats will affect the normal operation of the system. The goal of privacy and security of an RFID system is to protect the communication between reader and tag from a variety of attacks. The security issues that RFID systems face include the following: information leakage, traceability and location privacy,2,22,23 simulation and replay attacks, and denial of service. In order to get a reliable solution, designing RFID systems should be based on these correlation issues.
RFID mutual authentication protocol based on shared secret hash function
In this section, our proposed RFID mutual authentication protocol is presented in detail. First, we provide an overview of RFID mutual authentication protocol. Then, design and principle of security authentication protocol are described in detail. Finally, security analysis model of the protocol proposed in this article is established.
In the IoT, a series of research experiments have been conducted by researchers at home and abroad in response to various kinds of security and privacy issues constantly appearing in the RFID system. Many classic solutions3,24–26 have been proposed to ensure the disappearance of security18,26,27 and privacy2,17,22,23,28 problems in RFID systems, and the these solutions are mainly divided into two categories: one is physical security mechanism; the other is password security mechanism that attempts to use a variety of passwords. Because the physical security mechanism is limited by factors such as the particularity and limitations of the RFID system, the password security mechanism is favored by researchers, especially the RFID security authentication mechanism1,25,29–33 with hash function34,35 is embedded in the system which has a more unique advantage in contrast with the physical security mechanism. In this article, we consider the security, cost, and complexity of RFID system. By summarizing the design concept of security protocol 36 proposed by our predecessors, this article proposes an improved solution of RFID system and introduces the initialization condition of new protocol, basic principles, and certification process. By setting up a security analysis model, this article analyses how to solve the security problems universally existing in the RFID system and completes the design of RFID system authentication protocol based on hash function.
Design of security authentication protocol
Initial conditions and design principles
The data transmission tag stores ID, S, and H(ID||S), and before the authentication, the status of the data transmission tag is locked. Server stores all values of data transmission tag (ID, S, H(ID||S)), and random number generator is embedded in the server, where ID is the identity of the data transmission tag, S is a secret value set before the operation of the system, H is a predefined hash function, Tag is a tag, Reader is a reader, and S and H(ID||S) will be constantly updated with different random numbers, while ignoring the shortcomings of hash function designed in the protocol (Figure 1).

Flowchart of security authentication protocol.
Process of authentication
The security protocol authentication process is as follows:
1. The server sends the generated random number R to the RFID reader.
2. The reader sends a query authentication request to the data transmission tag.
3. The data transmission tag gets the value of h_id_s calculated by H(ID||S) and h_id_r_s calculated by H(ID||R||S) and then sends the value of h_id_s and h_id_r_s to the server through the RFID reader. Where || is the logical OR operator
4. Based on the received value, the server retrieves whether a set of (idj, S, h_idj_s) in the server and h_idj_s and h_id_s are equal. h_idj_s is calculated using equation (3). If they are equal,
5. The server calculates S
DB
, h_idj_s
DB
, and h_idj_r_s
DB
using equations (8)–(10). Then, the server replaces the corresponding S and H(ID||S) with S
DB
and H(ID||S
DB
) and sends
6. The data transmission tag calculates S T , h_id_s T , and h_id_r_s T using equations (14)–(16) and determines whether h_id_r_s T is equal to received h_idj_r_s DB . If they are equal, the RFID reader succeeds in authentication, and the data transmission tag replaces corresponding S and H(ID||S) with S T and h_id_s T . Otherwise, RFID reader fails to be authenticated, where S T is the updated shared secret value in the tag
Design of secure authentication protocol
Model of security analysis
According to the secure issues that the RFID system has already faced and the established security analysis model of the new protocol, the model clearly points out the security of the new protocol from eight aspects. The security analysis model of the protocol is shown in Figure 2.

Security analysis model of RFID protocol.
Security analysis
Mutual authentication. By comparing whether H(IDj||R||S) and H(ID||R||S) of the server are equal and comparing whether H(ID||R||S T ) and H(IDj||R||S DB ) of the tag are equal, it realizes the mutual authentication of the legal identity of the RFID system.
Forward security. Due to the variability of R, the secret value S, and the immutability of the H-function, even though the values of H(ID||R||S) and H(ID||S) have been taken illegally, they cannot be used to trace back to records of previous authentication responses stored in the data transfer tag.
Prevention of position tracking. Because the R and the secret value S are mutable and can be updated, each time the values of H(ID||R||S) and H(ID||S) responded by the tag of system to the RFID reader’s inquiry are also different, thus preventing illegal users from location tracking based on specific response records of RFID system tag.
Preventing attacks from repeated transmission. With each secret value S changing, it is impossible for the attacker to simulate the value of H(IDj||R||S DB ) or the values of H(ID||S) and H(ID||R||S) again even if intercepting H(IDj||R||S DB ) previously sent by a valid RFID reader and H(ID||S) and H(ID||R||S) sent by a valid data transmission tag, thus effectively preventing attacks from repeated transmission.
Preventing eavesdropping and illegal reading. When ID is transmitted on non-secure channel, the data transmission tag ID is encrypted by the hash function. Therefore, illegal users cannot eavesdrop on the real ID of tag.
Preventing fake attacks. Value of S T of tag and value of S DB of server are updated after each authentication process is completed. Therefore, the attacker cannot forge the secret value S. The H(ID||S) and H(ID||R||S) as responded by the legitimate tag of the system are different from that of the attacker’s forged data transmission tag, so it cannot be authenticated by the system’s legitimate RFID reader.
Indiscernibility. Since random numbers, secret values, and hash functions are added during the authentication, illegal users cannot recognize the response of a tag by obtaining the responses of multiple valid tags nor can they distinguish a certain response of the tag by obtaining the multiple responses of the same tag, thereby achieving security goals of indistinguishability.
Denying service. The private data in the server and the tag will not be updated until they have passed the security authentication. If the legal label is undergoing safety authentication, it is stopped before it is completed. Then, there is no replacement for the numerical record in the server and system tag, which can satisfy the authentication of the next round, thus achieving the security goal of resisting illegal services.
It is concluded that the RFID security authentication protocol based on the shared secret hash function solves the privacy problems existing in the system to a certain level and possesses higher security level.
Design and application of system with dual-control of water and electricity based on WSN and video recognition technology
In this section, the design and application of the system with dual-control of water and electricity based on WSN and video recognition technology is presented in detail. First, we provide an overview of design and application of system and then each component of the proposed system is described in detail. Section “Application field of WSN” describes the application field of WSN. Section “Layout of field network of system with dual-control of water and electricity” presents a layout of field network of system with dual-control of water and electricity. Section “Network structure of system with dual-control of water and electricity” puts forward the network structure of system with dual-control of water and electricity. The security of the protocol is analyzed in section “Secure analysis of RFID mutual authentication protocol with shared secret hash function.” The framework of CNN is proposed in section “Structure principle and design of CNN.”
In the system with dual-control of water and electricity, WSN is used to manage and control the use of water and electricity and collect relevant scalar data, such as electricity bills, water flow, and surveillance video. The RFID mutual authentication protocol based on the shared secret hash function guarantees the user’s data security.
Application field of WSN
Figure 3 shows the working principle of field devices of WSN in a system with dual-control of water and electricity. First, user must have a contactless IC card which binds the user’s identity information. The card reader in Figure 3 is a swiping device of RFID. When the user swipes the card, the RFID card reader reads the user’s information of identity of the IC card in a wireless way, and then sends the user’s information to the aggregation node. After receiving the user’s information of identity, the aggregation node which communicates with the Internet wirelessly through the 4G Modem sends the user’s information of identity to the server. The new protocol proposed in this article verifies whether the user’s identity information is valid. After the user’s information of identity is verified, users can control the use of water and electricity through using sensor nodes in WSN. When the use of water and electricity is over, the sensor node sends the amount of water and electricity to the aggregation node. The camera is used to monitor the situation of field in real time. Then multimedia sensor nodes send the monitoring video to the aggregation node. Finally, the aggregation node which communicates with the Internet sends scalar data to the server. In the end, server will update the user’s database and monitor abnormal conditions in the video in real time.

Working principle diagram of node of sensor.
Layout of field network of system with dual-control of water and electricity
A possible field network layout is shown in Figure 4. There are multiple irrigation fields in the system with dual-control of water and electricity. Because each irrigation field requires a WSN, there may be multiple WSN in some locations. In Figure 4, the Internet and 4G Modem are wired. Moreover, 4G Modem and WSNs are wireless. Because the communication mode of the WSN is different from the Internet, the communication signal of the WSN can be converted into an analog signal that the computer can understand, through using 4G Modem. In this way, user’s data can be sent to the server to complete the mutual authentication of the new protocol.

Layout of field network.
Network structure of system with dual-control of water and electricity
Figure 5 mainly shows the communication between the WSN and the server. However, there are database servers and web servers. The database server is used to store user’s related data, and the web server obtains the user’s data by communicating with the database server through the Internet. Therefore, the user can use the mobile phone and the tablet computer to log in the web server to inquire the user’s own personal data on the web page and can also use the APP to control the use of water and electricity remotely via communication between Internet and WSN. At the same time, users can recharge accounts directly through online UnionPay or Alipay and WeCha.

Diagram of network structure.
In the field, users do not always need to bring an IC card. Because the intelligent device adds function of near-field communication (NFC), 37 the user can simulate the mobile phone with function of NFC into an IC card. In the application, the user just keeps the mobile phone close to the reader, waiting for the reader to read the data.
Secure analysis of RFID mutual authentication protocol with shared secret hash function
In the IoT, the goal of privacy and security of RFID systems18,26 is to protect the communication between readers and tags from all kinds of attacks. There are several security issues that the system faces: information leakage, traceability and location privacy, simulation and replay attacks, and denial of service. Designing RFID systems should be based on these correlation issues in order to get a reliable solution.
Information leakage
In a typical RFID system, because the tag has a unique identifier that is passed to the reader, it is easy to identify with this unique identifier. Due to this unique identifier, information of unique identifier is vulnerable to hostile attacks. In order to prevent information leakage, RFID systems need to provide privacy control, so that unauthorized readers cannot access the tag.
Tracking and location privacy
If the tag’s response can link to the tag, you can track the location of the tag. If the tag sends a static response to the reader, the adversary can distinguish it from other responses. If the tag’s response is anonymous, you can avoid tracking issues.
Simulation and replay attacks
The adversary can query the tag or reader. If an adversary can collect information during the communication between the tag and the reader, they will simulate the tag to explore more information and in the meantime use this information to replay in the future.
Denial of service
The adversary may interrupt the communication between the valid reader and the tag. If an adversary can block the transmission successfully, it may cause the server and the tag losing synchronization. RFID systems should be able to handle this problem in order to keep tags and readers in sync.
It is usually evaluated whether a secure protocol of application layer is with privacy and integrity. From this perspective, the security protocol can meet the standards such as preventing information leakage, counterfeit attack, analog and replay attack, user tracking, user eavesdropping, and denial of service. The new protocol designed in this article is also based on such standards for security analysis. The new protocol is designed on the basis of the typical security authentication mechanism. The new protocol effectively solves the mutual authentication problem of RFID system, and adds the three elements of hash function, shared secret value, and random number. In addition, the new protocol strengthens the resistance to position tracking, replay attack, impersonation attack, and eavesdropping. Based on the security analysis presented in the previous RFID mutual authentication protocol, the new protocol basically solves all kinds of typical secure problems of the RFID system and has better security performance. For system with dual-control of water and electricity, the main risk of security is the identification of RFID. Once the user’s information of identity is leaked, the user’s relevant data will be illegally used, resulting in great losses.
In order to solve the problem of data privacy of communication, the transmitted data need to be encrypted in the Internet. This article uses MD5 algorithm for data encryption. MD5 is used to ensure integrity and consistency of data transmission. The MD5 algorithm process is as follows. First, the length of the input data needs to be filled so that the length(data)%512 = 448. Second, record the length of the message, using 64 bits to store and fill the length of message. Finally, load data into standard magic numbers for four cycles operating.
Structure, principle and design of CNN
In this article, WSN sends surveillance video11,38,39 to servers via video-sensing devices. The server uses CNN to identify each frame of the video in real time.
As a deep neural network, CNN
40
has a multi-layer network structure. Each layer contains multiple neurons. The layer-by-layer feature extraction of the image from the bottom layer to the high layer is performed by simulating the processing of visual information by simple cells and complex cells in the visual cortex. Currently, CNN has been widely used in the field of pattern recognition and has a variety of model structures that have achieved good effects of recognition, such as FastRCNN for object recognition and LeNet5 for hand-written digital recognition. These models have different network depths. The more the number of network layers, the more the neurons are included, and the greater the amount of calculations. The basic CNN model structure includes a convolution layer, a polling layer, a fully connected layer, and a classification layer (output layer). Normally, the Softmax classifier is selected as the classification layer. Considering that the CNN designed in this article need to be applied to object recognition with video, it not only meets the requirement of real accuracy but also ensures the performance of real time. Through the achievements of predecessors, this article determines that the network structure is six layers. As shown in Figure 6, there are two convolution layers (C1 and C2), two polling layers (S1 and S2), one fully connected layers, and Softmax classification layer. The convolutional kernel between input layers and C1 is 3

Constructed CNN structure.
Experiment
The experiment is based on Omnet++. Figure 7 shows the communication between the sensor nodes and other sensor nodes in WSN, and the communication between the aggregation nodes and the server. The figure shows the sequence of message forwarding between nodes and other nodes. Finally, message will arrive at the server.

Diagram of node forwarding sequence, where node represents the sensor node.
Figures 8–11 are experiments based on MATLAB simulation. In the experiment, we simulate the RFID mutual authentication protocol with shared secret hash function applied to the communication between client and server to observe whether the communication is stable and secure. Among them, the client will send the data read by the card reader to the server after swiping the card. It is assumed that the experimental equipment is fully functional and the communication is secure in the experiment. In Figure 8, it is pointed out that when the user continuously swipes a card, the response time of the server is basically about 1 s, which shows that the IoT applied by the new protocol is very stable and the phenomenon of packet loss is rare. Because the server runs single process, it can be seen from Figure 9 that as the number of users who access server increases, at the same time, the response time of the server is slightly longer at 1.2–1.25 s. It demonstrates that the new protocol in the case of multi-user accessing server at the same time, the communication is still very stable, there is no packet loss, but only the response time increases. In Figure 10, the client sends a request to the server every 0.3 s. As the number of requests increases, the average response time of the server will stay at 1.2–1.25 s because the server also runs single process. The communication is still very stable, there is no packet loss phenomenon, and only time increases. In the communication, if the ID and the shared secret key value S in the user’s IC card are stolen, when the user completes the communication, other people use the ID and the shared secret key value S to attack the server. As the communication of IC card is completed each time, the shared secret key value of each IC card changes, and illegal person will fail to access the server. In Figure 11, it is shown that when a user is continuously swiping a card, the fake attack is simulated. As the server does not have too much computing, the server’s average response time is particularly fast. Basically, 0.8 s can inform illegal users to read failure.

Diagram of server response time.

Diagram of average server response time.

Diagram of average server response time.

Diagram of time that server respond to user.
Detection dataset
The training set is the surveillance video in the laboratory.
It can be seen from the figure that the person selected by the box is identified by the CNN algorithm, and the accuracy rate is still considerable (Figure 12).

People in the video are walking around. The CNN algorithm is used to identify the moving people in the video.
Conclusion and future work
This article puts forward a mutual authentication protocol based on shared secret hash function to detect whether the user’s identity is valid, thus ensuring the security and privacy of the user’s information data. In addition, WSN is used to collect scalar data and video data and control the use of water and electricity. Finally, the article shows that CNN is used to identify the field of dual-control of water and electricity. However, the new protocol does not take into account the shortcoming of the encryption algorithm and assumes that encryption algorithm is absolutely secure. Therefore, the next step is to discuss the security of the encryption algorithm. Moreover, the proposed protocols are all designed under the ideal model because there may be multiple tags in the WSN, but the new protocol does not take into account the problem of multiple tags to identify collisions. Therefore, it is important to design a secure and reliable mechanism of authentication based on the anti-collision algorithm. Moreover, the CNN framework proposed in this article does not consider the real-time and does not work well in situations where lighting conditions change dramatically. Therefore, the next step is to consider the real-time nature of CNN and the difficulties in dealing with lighting.
Footnotes
Acknowledgements
The authors would like to appreciate all anonymous reviewers for their insightful comments and constructive suggestions to polish this paper in high quality.
Handling Editor: Jaime Lloret
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research was supported by Shanghai Science and Technology Innovation Action Plan Project (16111107502, 17511107203) and Shanghai Key Laboratory of Modern Optical System.
