Abstract:The intelligent pharmacy system is gradually being applied to hospital pharmacies. In order to solve the deficiencies of the existing intelligent pharmacy control system, such as relatively simple functions, insufficient scalability, and insufficient intelligence. The article proposes a control system design method based on modularization, easy debugging, and multi-threaded message framework.The article introduces the system composition, module division, task and thread allocation, communication protocol design and the realization process of each module of the intelligent pharmacy in detail, and explains the calling structure of each worker thread.The system has good usability, maintainability and expansibility, integrates rich parameter debugging configuration interface and expandable external call communication protocol.Practical application shows that the system can realize the expansion function of system modules through simple adjustments, and meet the control requirements under the parallel and serial timing of the components of the intelligent pharmacy system, and release the work efficiency of the intelligent pharmacy to a large extent.The operation of the intelligent pharmacy system in the hospital shows that the control system module has strong independence, simple installation and maintenance, and stable and reliable operation.