Implementation of FSM Based Chat-Bots in a Graphical Designer

Uloženo v:
Podrobná bibliografie
Název: Implementation of FSM Based Chat-Bots in a Graphical Designer
Autoři: Nataliya Gulayeva, Mykhailo Kobieliev
Zdroj: NaUKMA Research Papers. Computer Science; Vol. 5 (2022): NaUKMA Research Papers. Computer Science; 31-40
Наукові записки НаУКМА. Комп'ютерні науки; Том 5 (2022): Наукові записки НаУКМА. Комп’ютерні науки; 31-40
Informace o vydavateli: National University of Kyiv - Mohyla Academy, 2023.
Rok vydání: 2023
Témata: finite state machine, генерація кода, скінченний автомат, code generation, Telegram messenger, Telegram месенджер, документна база даних, in-memory database, мікросервісна архітектура, чат-бот, резидентна база даних, FSM, model driven development, document database, microservice architecture, chat-bot, СА
Popis: Finite state machine (FSM) is a powerful tool to model object behavior. Using FSM and its extensions to model program behavior followed by the automatic generation of executable code is the approach encouraged by the model-driven development (MDD) – a software development methodology based on the concepts of model and model transformation.In this paper, a brief overview of FSM-based common methods to model and develop software programs of any nature is given. These methods include David Harel’s statecharts, UML State Machines, Virtual Finite State Machine, etc. Examples of all types of software systems (transformational, interactive, reactive) implemented using FSM are cited.Chat-bots as an example of an interactive software system are considered: concept, classification methods, implementation techniques. A graphical designer of rule-based chat-bots to be integrated in the messenger Telegram is developed and implemented. In this designer, chat-bot behavior is modeled using FSM.Formal method to model a rule-based chat-bot using FSM is provided. The FSM concept is extended by disabled transitions to save history of transition changes made during the FSM design process. A brief overview of code generation methods from FSM specification is done; advantages and disadvantages of the most popular approaches are considered. Dynamic approach to generate code by FSM specification saved in DB is proposed. To implement this approach, document MongoDB and in-memory key-value Redis DB are used; FSM is kept as a JSON-document. This approach is efficient in flexibility, speed and memory needs.Architecture diagram of developed chat-bot graphical designer is given. It has the microservice architecture. The FSM model-to-code transformation is carried out by the bot-execution service written using compiled language Go. Other services include the front-end (UI for end-user, CRUD API for chat-bot) and the bot-management (synchronization of document and key-value databases) services.
Druh dokumentu: Article
Popis souboru: application/pdf
ISSN: 2617-7323
2617-3808
DOI: 10.18523/2617-3808.2022.5.31-40
Přístupová URL adresa: http://nrpcomp.ukma.edu.ua/article/view/275187
Rights: CC BY
Přístupové číslo: edsair.doi.dedup.....9b390628274a4db86230e2ba0b9c3269
Databáze: OpenAIRE
Popis
Abstrakt:Finite state machine (FSM) is a powerful tool to model object behavior. Using FSM and its extensions to model program behavior followed by the automatic generation of executable code is the approach encouraged by the model-driven development (MDD) – a software development methodology based on the concepts of model and model transformation.In this paper, a brief overview of FSM-based common methods to model and develop software programs of any nature is given. These methods include David Harel’s statecharts, UML State Machines, Virtual Finite State Machine, etc. Examples of all types of software systems (transformational, interactive, reactive) implemented using FSM are cited.Chat-bots as an example of an interactive software system are considered: concept, classification methods, implementation techniques. A graphical designer of rule-based chat-bots to be integrated in the messenger Telegram is developed and implemented. In this designer, chat-bot behavior is modeled using FSM.Formal method to model a rule-based chat-bot using FSM is provided. The FSM concept is extended by disabled transitions to save history of transition changes made during the FSM design process. A brief overview of code generation methods from FSM specification is done; advantages and disadvantages of the most popular approaches are considered. Dynamic approach to generate code by FSM specification saved in DB is proposed. To implement this approach, document MongoDB and in-memory key-value Redis DB are used; FSM is kept as a JSON-document. This approach is efficient in flexibility, speed and memory needs.Architecture diagram of developed chat-bot graphical designer is given. It has the microservice architecture. The FSM model-to-code transformation is carried out by the bot-execution service written using compiled language Go. Other services include the front-end (UI for end-user, CRUD API for chat-bot) and the bot-management (synchronization of document and key-value databases) services.
ISSN:26177323
26173808
DOI:10.18523/2617-3808.2022.5.31-40