An IoT-based low-cost architecture for smart libraries using SDN

An IoT-based low-cost architecture for smart libraries using SDN

The proposed method for imbuing libraries with intelligence leverages the synergy of IoT and SDN technologies. This architecture demonstrates the capability to intelligently oversee a diverse array of library activities, thereby mitigating the requirement for constant operator supervision. The suggested framework incorporates SDN to streamline the intricacies associated with resource management in IoT, offering an efficient and cost-effective strategy. The supported activities within libraries employing this architecture include:

1. RFID-based processes encompass:

2. Data exchange based on IoT SDN

Thus, the entire intelligent processes in the library can be categorized into two groups based on RFID and SDN, depending on the platform used. In the proposed architecture, authentication, property circulation management, and book lending processes utilize RFID technology and operate on the IoT communication platform. Conversely, the information exchange mechanism relies on SDN architecture to furnish an efficient communication platform in smart libraries. Figure 1 illustrates the proposed architecture, which, based on the amalgamation of Internet of Things and software-oriented network technologies, can be segmented into the following fundamental components:

Figure 1
figure 1

A view of the proposed smart library model.

The architecture presented in Fig. 1 offers the potential to modernize key processes in traditional libraries. In this proposed architecture, intelligent library information management relies on a data center, serving as the hub for organizing crucial data for intelligent library management. The data center accommodates key information in the following tables:

  • Books information

  • Member information

  • Book loan information

The table for book information encompasses key attributes associated with each book in the library. Within this table, access to individual books is facilitated through a master key. This unique key, recorded in the book information table, is also stored in the RFID tag affixed to the corresponding book. Consequently, by scanning the RFID tag and extracting its unique code, the book’s information can be retrieved via the data center. Similarly, the member information table comprises distinct characteristics of each library member, with each member differentiated by a unique membership ID. This unique code is stored in the RFID tag on the member’s card, enabling the retrieval of all personal information through tag access. The book loan information table serves as a communication interface between the aforementioned tables, managing transactions related to book entries and exits. Each entry in this table describes the loan or return of a book by a member, utilizing foreign keys corresponding to the unique identifiers of the book and the member. Additionally, it includes time information regarding the book’s loan and return. Two additional tables are employed to oversee book reservation processes and library property management. These tables mirror the structure of the book loan information table, storing information on book reservations or transfers of library property by members. It is evident that components such as book and member RFID tags, the data center, and RFID tag reader nodes play essential roles in processes related to member authentication, book loans, and returns.

Conducting the mentioned processes intelligently, especially in extensive libraries, necessitates the utilization of an efficient communication infrastructure. The proposed method addresses this requirement through the integration of IoT and SDN, as illustrated in Fig. 1. The suggested architecture categorizes the array of smart library sensors using SDN technology, organizing each group of adjacent sensors into a subnet. Controller nodes, supervising each sub-network, govern the data exchange between the sensors and the data center within the smart library. This communication mechanism, coupled with RFID technology, offers a solution to concerns related to the model’s cost and scalability in expansive environments. The subsequent section provides a detailed description of each process outlined in the proposed smart library model.

RFID-based processes in the proposed architecture

As mentioned, RFID-based processes encompass a range of functions associated with member authentication, property movement control, and library book loan management. In all these processes, three key components—data center, RFID tag, and tag reader—collaborate. Figure 2 illustrates the mechanism of RFID-based processes within the proposed system architecture.

Figure 2
figure 2

The mechanism of RFID-based processes in the proposed system architecture.

As illustrated in Fig. 2, the architecture of this system comprises four components: tag, tag reader, antenna, and computer network. In the proposed model, passive tags are utilized to minimize the overall implementation cost of the system. This choice is based on the suitable distance of 5–10 m supported by passive tags for effective identification. To detect the presence of a person, a sensor and an activating switch are employed in the identity verification station. When an individual enters the identity verification station, the switch within the sensor triggers the tag reader. The tag reader component is positioned adjacent to the sensor. Consequently, upon switch activation, the tag reader component transmits a coded signal to the tags affixed to the user’s membership card, books, or property. Each tag component then emits its unique identification code as a radio signal to the reader.

Upon receiving the identification codes, this information is transmitted to the computer system linked to the tag reader. Subsequently, the computer system relays this data to the data center via the network. The data center securely stores the encrypted IDs of all members, assets, and books in the library. The received identifier undergoes a search operation within the data center through the tag reader. If the desired identifier is located in the database, a confirmation message is dispatched to the sender’s computer system, signaling successful verification. Conversely, if the identifier is deemed invalid, an error message is generated. Upon successful identity verification, the data center records the transaction time and other pertinent details. Notably, the search and validation processes are carried out independently for each member and book/property component. To achieve this, the unique membership ID (Tagcard in Fig. 2) is sought in the member information table, while the book/property’s unique ID (Tagbook/Tagproperty) is searched in the books/property information table. The corresponding flowchart depicting these processes is presented in Fig. 3.

Figure 3
figure 3

Flowchart of RFID-based processes in the proposed architecture.

The electronic tags employed to identify library members, books, and assets in the proposed model represent an automated data carrier utilizing RFID technology. The system’s architecture adopts passive RFID tags operating in the UHF band, with a reading range spanning 6–10 m. Figure 4 illustrates the structure of these tags. Passive tags, as mentioned, lack an independent energy source for transmitting identifiers to the reader component. Instead, they harness energy from radio frequency pulses dispatched by the reader component. Upon receiving these pulses, the tag charges its internal capacitor, utilizing it as an energy supply source. Subsequently, the tag transmits its information to the reader component through internal antennas. It’s noteworthy that the identifiers stored in these specialized electronic tags boast resistance to copying or alteration. The extended lifespan and cost-effectiveness of RFID technology contribute to its advantageous use in creating intelligent libraries.

Figure 4
figure 4

UFH band passive tag structure used in the proposed architecture.

SDN-based network configuration and routing

The proposed architecture for smart libraries adopts a scalable and software-oriented network-based mechanism to establish the data exchange pattern among network components. This entails defining the necessary mechanisms for constructing topology and data routing based on that topology—an essential process in the network operations of IoT-based architectures. The topology construction involves creating a network communication infrastructure using a subset of stable communication links. Simultaneously, the routing process dictates how data is exchanged between network sensors (such as members’ smartphones, tag readers, and controllers) and the data center, leveraging the established topology. This facilitates data routing for activities like book search, reservation, identity authentication, and other smart library functions between diverse network components. The proposed routing algorithm, detailed in the subsequent section, is a multi-step strategy rooted in the SDN architecture. This algorithm determines optimal routes for data transmission based on a cost function.

Construction of topology

The configuration process of the proposed intelligent library architecture commences with the construction and control of the network topology, utilizing a software-based network. In this method, network nodes initially exchange positional information and then establish the clustering structure based on SDN principles. Notably, as a substantial portion of network sensors consists of members’ smartphones, all of which are mobile, considering the movement characteristics of these objects during the topology construction process becomes paramount. Therefore, the topology construction process begins by calculating the relative speed between the network nodes. To assess the relative speed of two nodes, the first step involves estimating the distance to the node. In this proposed method, it is assumed that the distance between two nodes can be estimated based on the received signal strength of each node, calculated using the provided equation.

$$RSSI_d=K_1- K_2\textlog\left(d\right)+ u$$

(1)

In the given equation, ‘d’ denotes the distance between two nodes, and ‘u’ is an independent random parameter following a Gaussian distribution with a zero mean. Additionally, ‘K1’ and ‘K2’ represent the path loss parameters in the 802.11 standard. As expressed in Eq. (1), the distance between two nodes can be approximated through the received signal strength. This relationship can be estimated as described below, without taking the environmental noise factor into account:

$$d_c_1,c_2=e^\frac\left(K_1-rssi\right)K_2$$

(2)

In the next step of the proposed method, we calculate the relative speed and communication stability. Let’s consider two nodes, A and B, at a distance ‘d’ from each other. These nodes move in a straight line with a speed ‘v’, and each node has a movement angle ‘θ’. Therefore, the velocity vector for nodes A and B will be denoted as \(\overlineV _A=\left(v_A, \theta _A\right)\) and \(\overlineV _B=(v_B, \theta _B)\). We assume that the radio range of nodes is ‘R’, and.

d < R. The relative velocity vector of the two nodes can be calculated using the following equation:

$$\overlineV _BA=\overlineV _B-\overlineV _A=(v_BA,\theta _BA)$$

(3)

In the above relationship, θ_BA is the relative angle of two nodes A and B. also:

$$v_BA=\sqrt\left(v_Bcos\theta _B- v_Acos\theta _A\right)^2+\left(v_Bsin\theta _B- v_Asin\theta _A\right)^2 ,$$

(4)

$$\theta _BA=\texttan^-1\fracv_Bsin\theta _B- v_Asin\theta _Av_Bcos\theta _B- v_Acos\theta _A$$

(5)

Using relations (4) and (5), it can be shown that the duration of two nodes being neighbors will be equal to:

$$T_neighbor=\frac{dcos\theta _BA+ \sqrtr^2-d^2\textsin^2\theta _BA}v_BA$$

(6)

Using the above relationship, it is possible to predict whether two nodes A and B will be neighbors after the time interval tΔ or not? This will happen if T_neighbor > ∆t. In this case, the similarity of the movement pattern of two users A and B will be stored in a matrix as follows:

$$T_A,B=\left| loc_a^current- loc_b^current\right|+\left| loc_a^future- loc_b^future\right|$$

(7)

In the above relationship, loc_a^current is the current position of node A as (x_a,y_a) and loc_a^future is the predicted position for node A after the time interval tΔ and is calculated as follows:

$$loc_a^future=(x_a+ V_x_a* \Delta t , y_a+ V_y_a* \Delta t )$$

(8)

In the above relationship, \(V_x_a\) represents the speed of the node along the x-axis, and \(V_y_a\) is its speed along the y-axis. By calculating the value of Tab for each pair of nodes in the network, a portion of the similarity matrix is formed. This matrix contains the degree of similarity in the movement patterns of each pair of nodes. All nodes transmit their matrix portions to the data center node, contributing to the construction of the topology based on the clustering structure. The central node responsible for clustering the moving nodes integrates these \(T_ab\) matrix parts and categorizes nodes into clusters using two fundamental rules. In this method, nodes with similar movement patterns are grouped into a cluster. To assess the similarity of the movement pattern between two nodes, the following conditions are checked:

  1. 1.

    The term “two nodes should be in the same radio range (both nodes have direct one-step access to each other)” refers to the requirement that two nodes should be within each other’s direct radio communication range, enabling a one-step direct connection.

  2. 2.

    Additionally, it should be anticipated that after a period of time Δt, the distance between the two nodes does not exceed a predefined threshold distance.

The second condition involves predicting the persistent position of the connection between two nodes, and based on these criteria, the user’s movement pattern information is stored in a matrix, denoted as T. Following these rules, the steps for clustering network nodes by the central node are as follows:

  • Input: List of users L and connection period matrix T

  • Output: C network clusters

  • Repeat the following steps until a node is in the L list.

  • Pick a random node x from list L, remove it from L, and create a new cluster in C.

  • For each node \(y\in L\): if y is a neighbor of x and based on the matrix T, \(T_x,y\ge \Delta t\), then add y to the current cluster in clustering C and omit node y from the list L.

  • Go to step 1.

After this process, all network nodes will be grouped into clusters based on their movement patterns, and each cluster will be assigned to the nearest SDN controller node in the form of a subnet. The result will be a set of isolated clusters. At the end of the topology control step, these clusters need to be efficiently connected. The proposed algorithm achieves this by forming the network topology based on an optimal subset of connections for each cluster, facilitated through cluster head controller nodes. In the proposed method, neighbors belonging to other clusters are evaluated for each controller node, and the weight of the connection between two nodes i and j is determined using the provided relationship.

$$W_i,j=\frac-\fracPE_j\times D_ij$$

(9)

In the above relation, \(N_(i)\) represents the neighborhood set of node i. \(B_K^\prime\) represents the set of nodes covered by the current topology structure (nodes that are either members of the topology or are located in the neighborhood of at least one of its members). P represents the initial energy of network nodes, and \(E_j\) specifies the current energy of node j. Finally, \(D_ij\) indicates the end-to-end delay in communication between two nodes i and j, which is estimated during the neighbor discovery process.

The weight function used in relation (9) consists of two parts: profit and loss. This function states that connecting two clusters by adding a link between two nodes i and j to the network topology, how much benefit and how much loss will result. The first part of this relationship is \(\fracB_K^\prime\) and it shows the number of new nodes that will be covered by the topology by joining these two clusters. If the selection of a node can add more members to the topology, adding with that node will have a high benefit. On the other hand, if the selection of a node does not add any new member to the topology, then \(\frac=0\) and relation (9) is negative Will have. As a result, the proposed weight calculation relationship will prevent the addition of ineffective nodes in the topology. The second part of the weight function in relation (9) represents the amount of loss resulting from the selection of node j and is described as \(\fracP\times D_ijE_j\). This part of the weight function shows how adding node j to the topology will affect the topology’s lifetime and latency.

After evaluating the weight function by the nodes completing the topology (Relation 9), each time the link with the most positive weight is selected and the cluster corresponding to that selection will be added to the topology.

Considering this feature, the network clustering structure will become a hierarchical tree topology, an example of which is shown in Fig. 5.

Figure 5
figure 5

A view of the topology structure formed in the proposed method.

In Fig. 5, each SDN controller and its neighboring nodes are considered as a sub-domain in SDN. Communication between subdomains is facilitated through gateway nodes (shown in gray in the figure). Additionally, the connections between the controllers are illustrated with dashed lines in this figure. Once each cluster is formed, the controller node will possess its member list and exchange it with other controllers. After establishing the network topology, route selection, and data exchange operations will be executed. This step of the proposed method will be further elucidated in the following section.

Data routing using a structured structure

After forming the network topology, this structure will be utilized for data routing concerning library information. Due to the tree topology, it is evident that there will be only one path between each controller node and the data center. Thus, if a node intends to send a request to receive information from the data center, the source node initially transmits its ID to its subdomain controller. The controller node then searches for the source ID in its member list, and if it corresponds, it forwards the sensor request to the central node through the unique path in the hierarchical tree. Upon receiving this message, the central node matches the requester’s sensor ID with the requested information ID, and if the information is accurate, the requested media is transmitted to the controller node through the existing path.