Figure 2. The general architecture of the study
Our next top layer is the edge layer, hierarchically. The purpose of
this layer is to reduce the danger of network traffic that may occur on
the server if the data from a lower layer is transmitted to the central
server at once. Another purpose is to prevent data sending devices from
being suspended while waiting for a response in return for the data they
send. A simply modified version of the developed IoT_TH board is used
to build this layer. This change can be described as deactivating the
original sensors. In this layer, there are potentially different number
of node devices under the responsibility of IoT_TH devices.
Ɐ(THx) transmits the values in its environment to the
Nx device it is connected to. What is expected from this
layer in the whole organization is that the collecting devices in the
layer correctly label and accumulate the media data coming from the node
devices they are responsible for and periodically direct them to the
upper layer, the decision layer. The obtained values are sent to the
collection devices in the upper layer, the Edge Layer, in a format
(↋1,↋2,…,↋t)
prepared in accordance with the smart contract format prepared for the
blockchain. Each collection device ↋t then stores the
data sent to it by the Nn devices as shown in Equation
1. The data that is encrypted and stored in each ↋tdevice is sent to the Decision Layer, which is the upper layer, in fixed
periods.
\({}_{t}=\sum_{n=1}^{N_{n}}\left(N_{\text{Temp}_{n}}\right)_{n}\bigcup\ \left(N_{\text{Hum}_{n}}\right)_{n}\)(1)
The detailing of the layers in the hierarchical structure will be
continued with the last layer, not the next layer. We can explain the
reason for this as the training part and the classification part in
machine learning algorithms are inverse sequential in the architecture
realized in this study.
In the last layer, Education and blockchain layer, there is one local
server and one cloud server. Two main operations are performed in this
layer. The first of these processes is to carry out the training process
of the artificial intelligence model with data from different locations.
Another process is to convert the incoming data into a blockchain
structure and store it. In the first operation, a model is trained using
the LSTM algorithm. The weight values of the input variables formed
after the training are carefully extracted from the model. these
extracted weights are meaningful for the developed model and meaningless
for the human mind. The weights obtained are transferred to the decision
layer, which is a lower layer, in order to perform the classification
process. In the second main transaction, the incoming data is safely
stored in its raw form, under the guarantee of blockchain, in a
re-readable form when necessary. It is configured for both local and
cloud server storage in the blockchain layer, which is the last layer
where data reaches. The necessity of a dual storage system can be
decided depending on the importance of the data to be obtained and
transferred as a requirement of the infrastructure developed in this
study. In this layer, a single piece of operation that can be performed
through a machine learning algorithm is fragmented. this distribution
process has brought much more effective and successful results on
heterogeneous data. We proved this with numerical data in section 3.3.
Virtual machines (J1, J2,…,
Jk) are located in the Decision Layer.
Jk collects the encrypted data sent to it from
↋t and sends it to the final blockchain storage layer as
shown in Equation 2.
\(J_{k}=\sum_{t=1}^{{}_{t}}\left({}_{N_{x}}\right)_{t}\) (2)
The decision layer contains virtual machines (J1,
J2,…, Jk). Jk accumulates the
encrypted data sent to it from ↋t and sends it to the
last layer as shown in Equation 2. The decision layer completes the work
of the fragmented machine learning algorithm thanks to the trained model
weights it receives from the training layer. Classification processes
are carried out without the need for new training only thanks to the
weights, and the results are sent to the lower layer, the edge layer,
for implementation.