# AI-Enabled Animal Behavior Analysis with High Usability: A Case Study on Open-Field Experiments
## 4 High Availability of Animal Behavior Recognition  
Automatic recognition of animal behavior is the core function of the platform. It is of great significance for medical animal behavior experiments to be able to select behavior recognition methods flexibly and effectively recognize the behavior of animals in \begin{table}
\begin{tabular}{c c} \hline \hline
**Module Name** & **Functionality** \\ \hline Data acquisition and transmission module & Capture video data and pass it on to the server. \\ Data receiving and preprocessing module & Receive and convert data into standardized form. \\ Controller & Receive and process the requests sent by the client. \\ Algorithm library management module & Manage plug-ins and interface services within the algorithm library. \\ Pose estimation module & Training or execution of different pose estimation algorithms. \\ Behavior recognition module & Training or execution different behavior recognition algorithms. \\ Natural language query interface module & Converting natural language queries entered by researchers into \\  & computer instructions. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Relevant information of each module. Figure 2: The main architecture of the platform, in which the pose estimation module, the behavior recognition module and the natural language processing model are the main modules. experimental videos. In order to improve the usability of the platform and enable it to flexibly select and extend the behavior recognition algorithm according to the actual needs of researchers, we integrated the design idea of plug-in management, unified interface, and algorithm library when designing the platform architecture. Plugin design is a software architecture design pattern that modularizes the functionality of software, and each module can be developed and used as a separate plugin. In the laboratory animal behavior analysis platform, we design each behavior recognition algorithm as a plugin and deploy it locally. Each plugin contains all the code and resources to implement a certain behavior recognition algorithm. These behavior recognition algorithm plugins can be developed and tested independently of the platform and only need to follow certain interface specifications and data formats. At runtime, the platform can dynamically load and unload plugins to execute the algorithms in the plugins. To realize this design, we define a local plugin interface and require all plugins to implement this interface. This interface includes the initialization of the plugin, setting and obtaining parameters, executing analysis, obtaining results, and other operations. The plugin design allows the platform to have higher flexibility and extensibility. Researchers can choose and combine plugins according to their needs and even develop their own plugins. Although plug-in local deployment can bring good response speed, local deployment is sometimes limited by hardware performance. Therefore, in addition to supporting plug-in algorithm access for local deployment, the platform also supports access to non-locally deployed behavior recognition algorithm services in the form of a unified interface. The platform requires all behavior recognition algorithms to have a unified remote web interface. We define the basic operations of this interface about behavior recognition algorithms, such as initialization, setting parameters, executing analysis, obtaining results, and so on. The unified network interface approach allows the platform to use behavior recognition services deployed on other computing resources. In addition, the unified interface service removes the platform's focus on the specific details of the service and is not affected by upgrades or replacements of the algorithms. An algorithm library is a software library that stores and manages algorithms. The platform stores all available behavior recognition algorithm plug-ins and remote service interfaces in an algorithm library. The algorithm library contains service resources for all available behavior recognition algorithms.