Operation features of the expert system for tree and shrub pruning

. The article defines the importance of tree and shrub pruning for the environment of settlements and farms engaged in the cultivation of fruit plants. Such a process requires taking into account many parameters of both the plant itself and external conditions. This justifies the need to develop and use a software product capable of tracking over time the activities associated with pruning a plant and making recommendations to specialists for effective branch removal depending on the parameters of the setting. The problem domain has been analysed with the allocation of key parameters to create a formal model and a set of rules suitable for the use of object-orientated programming techniques. A user interface was created with the description of functional capabilities of the users of the developed software products.


Introduction
One of the techniques to preserve the health of a plant, eliminate the danger of its parts falling and ensure the longest possible period of ornamental value or yield is its pruning [1].Pruning is a complex process that depends not only on the plant species but also on many factors [2].Such factors include the time of carrying out, type and purpose of pruning, age and condition of the plant, as well as previously carried out types of pruning.
In the works of researchers, it is noted that in order to form a proper tree crown and quick recovery of the tree after pruning, it is necessary to select the right gardening tools and correctly make the cut [3,4].This requires selecting the right place of cutting and carrying out the work with the tool at the necessary angle.In the conditions of the built-up area, the proximity of trees to infrastructure objects should be added to the listed conditions for tree pruning [1].This is due to the fact that overhanging branches can create an emergency situation or a threat to life, health or property.For farms growing fruit trees, among other things, it is necessary to take into account the proximity of plants to each other, to the walls of the greenhouse (if they are grown in a closed space), as well as to the places of harvesting (for example, to consider the place for access of machinery) [5,6].
All this requires organisations that have trees on their balance sheet to employ a specialist with specialised education (arborist).In most cases, tree pruning is seasonal, so in settlements it is haphazard or occurs with the involvement of specialists without the necessary level of professional training [1,3].The same situation is typical for small farms [5].The development of specialised software tools capable of acting as an information assistant for determining the branches to be removed will help to systematise and simplify the process of tree maintenance for all types of farms [7][8][9].All this justifies the relevance of the current study.
Based on the above, the following research objective is formulated: to develop algorithms for the functioning of an expert system for tree pruning.To do this, it is required to perform the tasks of researching the subject area in terms of pruning types and establish the rules for their implementation; identify the participants of pruning processes depending on the type of farms on whose balance sheet the trees are kept; develop the basic algorithms for the functioning of the expert system; develop the user interface of the corresponding system.Accordingly, the object of the study is trees forming the green framework of settlements and fruit trees belonging to the horticulture industry.The subject of the study is the processes that determine and occur during tree pruning.
The theoretical significance of the study lies in the systematisation of the peculiarities of tree and shrub pruning, their formalisation and digitalisation.The practical significance of the study lies in the possibility of using the results obtained to create a comprehensive plan for the improvement of the territory, sustainable environmental development of territories or the development of horticultural farms.

Methods and Materials
To fulfil the formulated tasks, we applied general scientific methods, which can be conditionally divided into two functional blocks.Methods of the first block.They include all methods that allow obtaining a description of the problem domain according to the rules necessary for creating a formal description of objects and processes.This was necessary to create algorithms for the functioning of the expert system; to create digital twins of the objects of the subject area, which are the initial data for the algorithms' work; to determine the specialists who could use the obtained system or the specialists whose activities would be affected.In the works of researchers performing similar tasks, the methods of structural analysis, synthesis, groupings, statistical analysis, observation and expert survey are used [4,6,10].
Methods of the second block.Their complex use was necessary to create a software product.The works of domestic and foreign researchers distinguish several stages related to the development of backend and frontend [8,9,11].Such methods include methods of objectoriented programming (creation of code based on the behaviour of objects), bottom-up database design (for storing information about users, works in progress, data on plant models) and methods of creating a graphical interface (for convenient use of functionalities by users).

Results
The use of the claimed methods has resulted in a software product that allows to organise the tree pruning process depending on a variety of conditions.For ease of use, the user is offered to install the mobile application on his smartphone, allowing access to the camera or albums.Table 1 presents the main screens of the software product and a description of the functionality and algorithms realised by the expert system in the background after receiving the necessary data.

Screen image Characteristics Screen for recognising a plant
The user is advised to capture the tree from different angles so that a digital twin and the technical files required to identify redundant branches can be created in the background.
If conflicts arise in the system, a warning will be displayed to the user and the need to re-photograph certain areas of the tree.
In order to correctly determine the types of pruning, you will need to specify the approximate age and species of the tree.
Since the type of pruning is time-dependent, the system date and time values will be obtained in the background.
In case of a tall tree, images can be acquired from a copter.

Screen of the digital twin of a plant
After processing the received graphic images, data from the user and the system settings of the smartphone, a decision on the branches recommended for removal is formed.Certain branches are highlighted in colour and an explanation appears when a finger is pressed on the corresponding area of the digital tree ("which tool to use", "what cut to make").
After tapping on an area, the user will have to select an action: confirm the recommendation (the selected object is removed from the digital twin), refuse to execute (the object remains in the digital twin, the recommendation remains in the system with a lower priority of execution) or send to the action standby mode (delayed action, the priority of execution is retained).You can rotate the digital twin and bring the camera closer to any of its elements.If no cropping is required, the system recommends that you recreate the digital double at a certain time (for example, in autumn) and saves the recommendation in your smartphone reminders and in your personal profile in the app.

Plant Info Screen
After scanning plants, a list of trees is created, information about which can be viewed by clicking on the corresponding record.
The information about the selected plant shows a preview of the digital twin, its geographical coordinates (or brief information about the location) and a list of actions performed on the object, with information about the executor saved.This information allows you to keep a record of the work done if a farm or management company employs many staff members.
Employee task screen Depending on the season and the type of digitised plants, the system generates a list of pruning tasks, which it notifies the user about.
The display of tasks is customised by the user.They can be grouped by the type of work or by the type of trees on the plot.
If there are 20 trees on the plot that require pruning, one task will be generated.The description of this task will include all trees and elements that are recommended to be trimmed from them.

Reference screen
While viewing the digital twin or the description of the task to be performed, the user has the opportunity to view background information about pruning: how and with what to do, consequences of incorrect pruning or refusal to do it.
In addition, there is a possibility to order the service of a specialist visit to perform pruning.
The main types of pruning defined in the programme are: 1) Sanitary: determines dry, diseased, broken and frozen branches regardless of seasonality; 2) Shaping: determines skeletal branches to create a beautiful and comfortable crown shape, carried out for young trees; 3) Rejuvenation: determines old branches to provoke the growth of new wood, is carried out for trees from a certain age or as needed depending on the degree of growth, for shrubsannual procedure; 4) Maintenance: identifies crossing, rubbing, shading or competing, ugly, branches growing inwards, at an acute angle, out of forks, carried out annually and periodically as required; 5) Pruning for fruiting: determined by the age of the fruit-tree, combination of several types of pruning at the same time.
Recommendations on fruit-tree pruning in the programme are based on seasonality according to the following rules: 1. Autumn pruning: after harvest and beginning of leaf fall, high priority for pruning fruit shrubs, low priority for stone crops.
2. Spring: before the start of active sap movement from late February to mid-April, all types of trees and shrubs.
3. Summer: medium priority for all tree and shrub species.4. Winter: low priority if no autumn pruning has been done.The user categories of the system are: 1. Worker -a specialist who performs the pruning of the plant directly.Available options are to digitise the plant; view the list of tasks for each available plant; confirm or reject the task; view help information.
2. Agronomist is a specialist who monitors the condition of the farm.Has the ability to create a plot occupied by plants; determine the availability of digital twins for Workers; confirm or create digital twins of plants; set the available types of pruning; generate reports on the work done by Workers; plan the employment of Workers.
3. Administrator is a specialist not related to the farms, who ensures the system operability.Creates and verifies the Agronomist's profile; sets up access levels; synchronises data; keeps rules and data up to date for system operation.

Discussion
Human life and labour activity in the modern world involve the use of different software products or their application to perform any task.The use of digital technologies determines the development and efficiency of any industry.Each software product has its own life cycle, through which developers have to carry it through [6][7][8].The results obtained correspond to those obtained by developers at each of these stages: data collection and analysis, formalisation of the obtained data, creation of program algorithms and its presentation in the form of program code, creation of user interface and definition of user categories [9,11].
The obtained software product meets the expectations and requirements of the industry, as it allows systematising the activity of pruning multiple trees, thus increasing yield (for fruit plants) or decorative appearance to create a favourable and ecologically sustainable environment of the locality [1,4].The obtained results can be used in the training or professional retraining of specialists related to the agricultural industry as reference materials and practice-oriented tasks to test the level of professional competences [12][13][14].

Conclusions
Creating a green framework in the context of human settlements is a crucial task, which, for example, preserves biodiversity, reduces carbon and provides shade for the environment.All this is only possible with the proper and systematic care of planted plants.The developed software product allows to keep records of green spaces and their states.At the same time to recommend to specialists a set of works that are required to create a decorative appearance that meets, among other things, the requirements of safety for others.
It should be noted that the developed software product does not allow to control sudden situations that may arise in case of an emergency (for example, a strong wind that falls trees or breaks branches).Monitoring such facts requires a person to carry out visual inspections and take appropriate decisions, also with the help of the software product.At the same time, constant monitoring of plants is possible using the means of unmanned aerial vehicles.The received image can be processed and analysed by the developed software product to make a directed work schedule.

Table 1 .
Characteristics of the main screens of the mobile application