MODELING THE INTERNET OF THINGS NETWORK FOR MONITORING AUDIO INFORMATION ON THE AMAZON PLATFORM

The subject of research is modeling the structure of the Internet of things (IoT) network for controlling audio information based on the IoT platform. The purpose of the article is to detail the process of modeling the audio information monitoring network based on the IoT platform. The authors proposed the structure of a multiagent system (MAS) for monitoring audio information (MASAI). The structure of MASAI includes many agents of sound transformation, analysis of information received from them, and decisionmaking. It was decided to use the IoT network, which includes sound sensors, the IoT platform, the notification service, and the user’s application to simulate the MASAI. The structure of this network using the Amazon platform is proposed. An algorithm for modeling the Internet of things network for analyzing audio information based on the AWS platform is presented, including simulating audio sensors, transmitting this information to the platform, sensors authenticating, processing information according to certain rules, generating notifications to a user. Detailed structure of the AWS platform is provided with a description of the functions of its components such as: device gateway, rule machine, certificate block, device copy block, database, analytics block, notification service. The algorithm for connecting devices to the AWS platform is given: creating a device certificate on the platform, creating a security policy, rules for processing information received from devices, and testing the network. The features of the algorithm for modeling the readings of sound information sensors on a smartphone are shown, steps are given for organizing its communication with the platform, performing security procedures, sending data in the form of an MQTT message, and displaying the captured audio information.


Introduction
Collecting and processing different types of sounds and their spatio-temporal effects is crucial. Using a model that embeds a representation of sound properties in sources, and rules that control their propagation through different environments, will help in both cases by tracking historical variations and predicting future changes in sound properties along space-time dimensions. In fact, such a model can represent noise levels in an urban space and help in studying noise pollution at various levels: inside a given building, in a particular public Park, or around the entire city. The model can also help predict how spatio-temporal changes might affect noise pollution levels at any of these levels, such as when a new building complex or complex community is emerging in a city.
In fact, the amplitude and effect of sound waves differ significantly in continuous spacetime dimensions. For example, the noise produced by a plane taking off is perceived by its neighbors with varying amplitudes over time: it starts out loud and then gradually decreases as it flies away. On the other hand, modeling data and especially spatio-temporal data is an important step that gives users a clear way to understand the case study and make some decisions [1,2].
The authors propose is the structure of multiagent system of sound information (MASSI) monitoring of surrounding environment [3,4]. MASSI structure has many agents such as sound transformation, analysis of the information received from sound agents, data base, decision-making. The network of IoT can be realization such multiagent system of sound information [5]. IoT platforms are good tools for quick this realization.

IoT Platforms
To automate the creation of IoT systems, leading global companies have developed design tools in the form of IoT platforms [6,7]. IoT platforms are becoming the central backbone of IoT deployments -the IoT platform market will reach $ 22.3 billion by 2023 [8]. Due to the large volume of information received from IoT sensors, such platforms provide analytical tools for processing 2 Research's study of versatility and other parameters, the fi rst position was taken by the Microsoft Azure platform, and the second position was taken by Amazon Web Services (AWS) [9]. Consider modeling the network for monitoring audio information using the AWS platform.

Structure and composition of network emulation on the Amazon platform
In [10], the structure of a system for collecting environmental sound information is presented. It includes sound sensors, a wireless network, and a server for processing and monitoring their readings. We will model this system based on the Amazon platform, using a smartphone as sensors [11].
We use a smartphone that will emulate an IoT device with sound sensors and send readings to the Amazon IoT platform. The platform will formulate the rule that when you receive data from our device will cause the notifi cation service (Notifi cation Service), which will send the user an e-mail received sound data (fi g. 1).
The General algorithm of the network platform comprises the steps: 1 Sensors measure process parameters (the device receiving audio information), they interact with the IoT platform using the development system (SDK).
2 Devices send messages to the platform, which are verifi ed by the authentication and authorization service.
3 Messages are sent to the gateway block using different network protocols, and then they are sent to the rule handler (4.1) and copied to the device copy block (4.2).
4.1 Depending on the received data, the rule handler performs pre-defi ned actions (5). for example, it saves data in the database, sends an SMS or e-mail notifi cation, calls the HTTP API, sends data to the Analytics system, and so on.
4.2 The device copy block stores the current device States that are available to applications. If there is no connection to the device, block Device Shadow executes control commands from applications and syncs the current state with the device when the connection is restored.
5 Applications use this data to monitor and manage devices using the AWS API 6 Information about all devices is stored on the AWS IoT platform.
Let 's describe the detailed structure of the AWS platform, the scheme of which is shown in fi gure 2, in which the following components appear: -Jobs -perform standard actions on devices: install applications, update fi rmware, reboot devices, etc.
-Topics -entities of the MQTT Protocol. Messages from IoT devices are sent to specifi c topics.
-IAM Roles -AWS users on whose behalf rules are executed and who have access to the necessary AWS resources.
Rules consist of the following components: -Filter -message fi lter for processing, set as an SQL query: Action -action to perform; Role -one or more IAM roles.  3 Creating a rule for processing information received from the device. The rule will call the AWS SNS (Simple Notifi cation Service) notifi cation service to send to your email address. So fi rst you need to create a topic in AWS SNS (my-iot-dev-sns-topic).
4 Confi gure what this topic will do when receiving data. To do this, create a subscription to the topic (Subscribe to the Amazon SNS topic), enter the target e-mail address, wait for the verification email, and confi rm the e-mail. 5 Creating the rule itself (my_iot_dev_ rule), which will call the created topic: -Filter: SELECT * FROM 'my/dev-topic' -the fi lter is triggered when any message in the topic named 'my/dev-topic' is received; -Action: sending a message to a pre-created SNS topic «arn:aws:sns:eu-central-1:1219xxx-34064:my-iot-dev-sns-topic»; -IAM role: creating the my-dev-role role with access to SNS topics.
6 All logical entities for our device are created. Now you can test that the created network diagram works. To do this, AWS has a test tool that allows you to send and receive messages in the same way as real devices. Launch it, subscribe to topic (my/dev-topic) and send the message "Hello World!" 7 Check that the e-mail with the message «Hello IoT!» and we conclude that IoT network is working.
Emulating a device on a smartphone Next, you need to configure IoT devices, which will be our smartphone. To do this, we use the description [8]. To turn a smartphone into an IoT device, you need to: copy security information to the device: private key, X. 509, and "Root CA for AWS « certificates; • Install Node.js and npm package manager; • Install the AWS SDK; • Install and run the test program. In our network, everything will be easier, because the certificates, AWS SDK, and test program are recorded on GitHub and you can clone the repository [10]. You can also use the test program provided by the AWS SDK.
Android OS is based on Linux OS, but with its own limitations, so to run JS applications, you need to install a special terminal, for example, Termux. For the initial development of Termux, there are a number of articles, we use [9]. After installing Termux, you need to run several commands: git clone github.com/AlexeySushkov/ IoT-Sensors.git installing the cd ~/IoT-Sensors/server server npm install npm start If everything was successful, the terminal will display the line: Server started on port: 8081. Next, enter the commands for installing the client: Cd ~/IoT-Sensors/client npm install npm run serve If everything was successful, the following line will appear in the terminal: App running at port: 8080. Next, enter the code in the smartphone browser: http://localhost:8080, the test app will appear on the screen.

Modeling the operation of sensors and the network
Click the «INIT DEV» button. This process authenticates and authorizes the IoT device on the AWS IoT platform. The status becomes «Init OK», if the execution is success.
Next, enter the values of the sound sensor readings in Dcb units, for example: Sound1: 23; Sound2: 35; Sound2: 42, then click the «SEND DATA» button.
After that, the application adds a timestamp and sends the data as an MQTT message to the «my/ dev-topic» topic. The IoT platform receives the message and activates a rule that sends the message to the AWS SNS notification service, which sends an e-mail with the received data in JSON format: {«time»: «Mon, Oct 12 2020 13:54:52 GMT», «Sound1»: «23», «Sound2»: «35», «Sound3»: «48»} If the message is sent successfully, the status changes to: "publish OK" and it is sent to the email address. e-mail.
The AWS IoT platform has a monitoring system that shows the number of connections and messages from IoT devices, statistics on protocols, message types, and so on.

Conclusion
1. The simulated operating network of the IoT, using the platform from Amazon. The General algorithm for working with the platform is given. The detailed structure of the platform is described, indicating the functions of its components.
2. Algorithm for configuring the IoT network and monitoring audio information based on the Amazon platform is Presented. The sequence of the process of modeling sound sensors using a smartphone with the output of information in the form of an email to the user is shown.