Reaching a sufficient number of data sets, learning past experiences from many systems and using this experience in instant or future predictions are among the capabilities of artificial intelligence. The horizontal and vertical growth of industrial systems and the transfer of experience from each location to all other locations increase the quality of the process. However, the rapid growth of IoT (Internet of Things) and OT (Operational Technology) assets in recent years raises questions about data integrity, confidentiality and accessibility. It deploys edge computing and blockchain-based solutions for data security and secure transmission in the IoT ecosystem. In this study, a four-layer IoT ecosystem network is proposed that combines the learning capabilities of artificial intelligence-based systems used in different locations and offers a blockchain-based storage system for data security. These layers consist of node layer, edge layer, decision layer, and training and blockchain layer, respectively. The lowest layer, the node layer, is responsible for collecting the temperature and humidity values ​​in different locations with the developed node devices in order to evaluate them. The data generated in the node devices is transferred to the communicating edge device in the edge layer. The edge layer collects the data from the nodes in the edge system and transfers it to the server centrally. The training and blockchain layer provide the collection of data from edge devices, training the artificial intelligence model and transferring the weights to the decision layer. At the same time, the blockchain-based storage system works at this layer to securely store the processed data. As a result, with this study, it is aimed to develop a framework for transferring the local learning experiences of distributed IoT devices to all IoT devices and for the secure storage of data.