{'fraction_non_alphanumeric': 0.017516827507906903, 'fraction_numerical': 0.002513989133079231, 'mean_word_length': 5.018545632015617, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Designing an Expert System for Recognizing the Emotional State of an Enterprise Employee

The emotional state of an employee of any enterprise influences both the efficiency of work performance and the quality and stability of the final result. Management of production processes, taking into account the monitoring of the emotional state of the employee, is a rather urgent task that allows minimizing the risks of deviations from the specified level of product quality and production safety. However, the quality of the assessment of this influence is currently subjective and is based both on the personal opinion and competences of the expert conducting the monitoring, and on the tools used by him for assessing the emotional state. At the same time, the use of modern intelligent automated methods and tracking systems will reduce the distortion of expert judgment. Creation of an expert system for analyzing the emotional state of employees of an enterprise will make it possible to recognize the emotions of a particular employee with a fairly high degree of accuracy, accumulate a system of knowledge and generate analytical conclusions and predictions of behavior based on it, compile an emotional portfolio of each employee and draw conclusions about the ability to perform a certain type of work and current states. This paper presents the concept of an algorithm of an expert system (hereinafter referred to as ES), which is able, on the basis of the data obtained on the individual methods of non-verbal expression of an employee's emotions, to assess the influence of his emotions on the quality of his work. The article reflects the results obtained in the framework of the implementation of the Agreement on research No. 05.601.21.0019 dated


Introduction
Today, the issue of using emotional monitoring systems (EM) at enterprises is becoming more and more relevant. Such systems are software tools for security services and employees who manage human capital, such as HR analysts and heads of structural divisions. With EM tools, you can minimize safety risks as well as increase production efficiency. The main focus of the emotional monitoring system is the development of emotional intelligence -the use of employees' emotions for a more effective solution [1][2][3][4]. The efficiency of an employee's work depends on the emotions he experiences. Some emotional states force you to focus on completing a task, thereby increasing its effectiveness, while others greatly distract from work, thereby worsening its results. Moreover, the strength of the impact of emotions on a person is not the same for everyone and varies depending on individual characteristics. Consequently, such a factor as emotions experienced by employees significantly affects the efficiency of the enterprise and must be taken into account [5,6].
Working with the emotional intelligence of an employee is the task of his immediate supervisor, however, assessing the strength of the influence of emotions on the task performed by the employee is subjective and may not be very accurate. An expert system capable of recognizing the emotional state of an employee with a sufficiently high accuracy, generating analytical conclusions and predictions of behavior based on it, can help in solving problems of optimization and quality control of business processes. The developed ES for analyzing the emotional state of employees of the enterprise should accurately recognize the emotions of employees and take into account the individual characteristics of the non-verbal manifestation of emotions of each. The tasks of a system of this type are the need to identify and personify these features with the involvement of an expert, the subsequent analytical processing of the obtained statistical data based on the developed rules of the knowledge base, as well as the accumulation of experience and self-learning of the system.

Results and discussion
The projected expert system for analyzing the emotional state of enterprise employees can be represented in the form of four main subsystems: • The subsystem for collecting data on the individual characteristics of the manifestation of emotions of the company's employees works in the mode of inputting knowledge of the expert system and consists of two modules: o A neural network that registers and interprets changes in the respondent's facial expressions that occurred in response to the question asked; o The user interface that the respondent works with. This interface is a window with questions and answers to them. • Knowledge base of the expert system. This subsystem is based on knowledge, which contains information about all the individual characteristics of the non-verbal expression of emotions of each specific employee. The data in the database are presented in the form of production rules (fact 1: if the corners of this employee's lips have lifted, then fact 2: he is more likely to be angry), where the variable will be the feature of the employee's expressions of emotion, and the value is the emotion most likely experienced in this case. The value affects the corresponding weight of the neural network that interprets facial expressions. • A subsystem for the interpretation of emotions, which analyzes the experienced emotion from the input video stream, taking into account the features existing in the knowledge base. This subsystem is based on two convolutional neural networks, one of which interprets facial expressions of the muscles of the face, and the second interprets the context of the environment; • A subsystem for assessing the quality of the enterprise personnel. This part of the program is a solver that, according to some static parameters and the results of the execution of the emotion interpretation module, analyzes the dependence of the employee's work quality on his emotions and generates on its basis behavior forecasts and conclusions about current abilities to perform a certain type of work. Reports on the results obtained are sent to the manager's user interface window.
To obtain data on individual ways of expressing certain emotions, the most effective option would be to conduct one interview with each of the employees. The knowledge acquisition module is responsible for this. During the interview, the respondent receives questions on the user interface window that should provoke an emotional reaction. This reaction will be recorded and interpreted by the convolutional neural network. The data received from it is converted into a form that can be added to the knowledge base of the system. The neural network, which is responsible for the interpretation of the incoming information, is combined and it receives data obtained from several sources at once: the facial expressions of the muscles of the interviewee's face and the context of his environment. The emotion interpretation subsystem includes a neural network for detecting emotions, which is almost identical to the neural network from the knowledge acquisition module. This combined network analyzes the emotions of a working employee based on data on facial expressions and the environment obtained from the video stream, taking into account the data in the knowledge base of the system. The result of the work of this subsystem is sent to the subsystem for assessing the quality of the work of the enterprise personnel.
Based on the data obtained in the user interface of the system, the manager can draw conclusions about which job to assign this or that employee.

Fig. 2. Configuration of the CAER-Net consisting of dualstream coding networks and adaptive merge networks
When developing a system whose functions include the recognition of emotions experienced by a person, it is necessary to take into account the high complexity of such a task caused by the variety of ways of expressing emotions in people, as well as a possible attempt on the part of a person to hide their emotions (even in people themselves, the recognition accuracy is relatively poor is large and varies greatly from person to person). For these reasons, you cannot rely on data from just one source (for example, facial expressions). A person has many ways to convey information about his emotional state to others, many of them are not accessible to consciousness, and it is very difficult to control them deliberately, such as narrowing / dilating the pupils. However, it is not necessary to take into account all the manifestations of emotions, a few will suffice. The criterion of fidelity in this case is accuracy. These facts indicate the possibility of correctly choosing the analyzed combinations of the manifestation of emotions and accurately determining a person's feelings.
As a result of the analysis of existing systems, it was decided that a neural network using a combined method of emotion recognition based on two convolutional neural networks will be used as an emotion interpretation module in the system. An example of such a neural network can be the Korean CAER-net, which is able to recognize emotions by facial expressions and the context of a person's environment, with an accuracy of 74.51%. In general, the architecture of this network is a system of two convolutional neural networks, one of which analyzes the face of a person in the picture, and the other, separately from the first, is the context of the environment. On the last layers, the data are combined and the result is given on them, which speaks of the emotions experienced.
To realize the ability to accurately recognize human emotions, in addition to the correct interpretation of facial expressions and analysis of the environment, the system needs to take into account the individual characteristics of the expression of emotions in each specific person. For the possibility of such accounting, it is necessary to collect data personally about each specific person. The best option is to observe the behavior of each individual person for some time, and it is important that there are external stimuli to which he will have to actively react. A suitable environment can be created by interviewing a person. In the process of conducting such an interview, the respondent should be asked questions that will provoke an emotional reaction in him, which will then be analyzed by the expert. Accordingly, the questions will have to evoke various emotional reactions (fear, joy, etc.). An expert is also needed to create a list of the questions themselves.
Due to the difficulty of identifying the most important features of the manifestation of emotions in a particular person, the module for obtaining data on the individual characteristics of the manifestation of emotions of company employees cannot be fully automated [7][8][9][10]. The data obtained by the expert must be converted into a form understandable for the system. That is, the expert himself will have to evaluate the strength of the expression of expressed emotions and highlight the key elements of the interviewee's facial expressions that indicate this or that experience, and then enter them into the ES interface.

Conclusion
The study allows us to conclude that the ability of the head of an enterprise to accurately recognize the emotions of other people and take them into account when assigning them to perform a particular task is an important factor that can significantly increase production efficiency [11]. However, the subjective nature of such an assessment can greatly affect its accuracy. Tools for analyzing the emotional state of enterprise employees can help in solving this problem. To build such a system, it is necessary that it be able to accurately recognize the emotions experienced by a person. The ES designed in this work takes into account the individual characteristics of the non-verbal manifestation of the internal emotional state of a particular employee, which can significantly increase the accuracy of emotion recognition. Based on the data obtained during the interpretation of the emotions of a particular employee, the expert system draws up a report in which it indicates the current state of the employee and draws conclusions about the ability to perform a certain type of work. This information can help a leader to more effectively manage business processes in the enterprise