Page 98 - ITU Journal Future and evolving technologies Volume 2 (2021), Issue 5 – Internet of Everything
P. 98
ITU Journal on Future and Evolving Technologies, Volume 2 (2021), Issue 5
As a representative case, let us consider the user that Whatever the application chosen, this function irst of
wants to enable remote surveillance of her home (at the all sets up the WebHook and then, if the setting is
moment this functionality is off). The user sends the fol‑ successful, sends the response produced to the user; if
lowing text “Set video On”; in order to understand what to the setting fails, it contacts the Failure Handler function
do with this command, the message must be broken down to manage the mistakes. A best practice is to use separate
and analyzed. From here, therefore, the function has to functions and topics for receiving, error handling and
understand the entity, the user intent and the context us‑ sending. This way there won’t be problems in
ing an NLU (Natural Language Understanding) algorithm. contacting the correct endpoints; accordingly,
Obviously, in order for the analysis to be relevant to what operations such as save and retry won’t be taken over
is requested in the messages, the system must be able to by this function.
store and analyze the status otherwise, if this was not the
case, the responses and actions taken would not be rel‑ 4.5 Failure Handler
evant to the general context of the conversation. On the
If the topic becomes send_failure, it means that there was a
basis of the results obtained then, if an intervention or a
problem sending data to the user. To manage these types
reading is required in a given device, you will have to be
of problems there is the need to rely on a special function.
able to invoke, through an appropriate topic, a function
When the Send Message function fails the irst attempt,
that will implement or request what the user needs and
it contacts the Failure Handler function passing the mes‑
then return it to the Message Handler. Once all the data
sage and the error code returned by the attempted send.
has been obtained, it is possible to create the reply and
make it available for sending. The function is encoded in order to retry the sending for
a certain number of times after which the user will be no‑
4.2 Action Service ti ied that there is a problem in satisfying their request.
If, on the other hand, the sending is completed within the
When the Massage Handler function needs data that is on established number of attempts, the message is delivered
the platform, it must be able to retrieve it. The simplest in a totally transparent way to the user.
way is to rely on a second function with this objective.
The Action Service function takes care of retrieving the 4.6 Save Logs
requested data. Once the Message Handler has processed
This is used to archive all messages related to the system
the request and on the basis of the NLU algorithm has un‑
in general; in this way it is possible to monitor the low
derstood the actions to be taken, it activates the Action
and see if there are any problems or if some parts need
Service which fetches to the platform requesting data or
some actions to be performed. This is a feature that can
making settings. In the event of an error, the identi ica‑
tion code will be returned. be implemented by relying on the logging of activities of
the cloud platform. In addition, some platforms such as
4.3 Save Conversation AWS or Google Cloud Platform allow for saving in the log
ile, in addition to the default entries, new ields at the
This function is invoked when the save event occurs. user’s discretion. In so doing, by integrating the system
This can be invoked by the Message Handler, Send Han‑ logs with those of the requests to the bot, it is possible to
dler, and Failure Handler functions. In the irst case, as have complete and detailed logs.
soon as the message is received, this (in addition to be‑
ing taken over by the Message Handler function) also 5. SCENARIO
passes through the function in question which will cre‑
ate a record containing the request and the status of the The IoT Lysis platform currently does not provide any
conversation. The second case is similar to the irst but help for the user either with regard to the deployment of
now it takes care of saving the response produced by the SVO or with regard to the resolution of any problems such
Message Handler function; however, if the sending fails, as failures, unresponsive devices and so on. To simplify
the save event cannot be invoked and send_failure will be the user‑platform‑SVO interaction, the intention is to in‑
invoked in its place. The last case is equal to the second sert a bot within the platform that guides the user in car‑
except for the fact that now failing or not, a record is still rying out those activities that are currently cumbersome
created which will be the message produced in the case or even impossible to perform remotely:
of success or an error message in the case of failure. Each
time you save the conversation, the status is also saved. • SVO deployment
• Problem resolution
4.4 Send Message
• Inquire of devices
The sending function is the one that takes care of
forwarding the response to the user through the chosen • Setting
messaging service. It could be for example a telegram
• Task automation
rather than a proprietary application created ad hoc.
86 © International Telecommunication Union, 2021