| With the rise and popularization of artificial intelligence technology,more and more traditional developers hope to improve or upgrade the existing service architecture with the help of artificial intelligence technology.Computer vision technology has always been a hot field in artificial intelligence.Various rich data and broad application scenarios such as images and videos provide us with rich imagination.AI surveillance video analysis is a hot field in computer vision.Many enterprises and individuals have rich needs.There are rich application scenarios in many fields,such as regional security,video data analysis and calculation,face and vehicle recognition and monitoring.The term "Middle platform" was first proposed by Alibaba in 2016.The innovation and flexibility of "big Middle platform,small front desk" made Middle platform technology sweep the industry in an instant.The middle platform integrates operational data capabilities and product technology capabilities,which can help the front desk adapt to the rapidly changing market and form a strong support for the front desk business.Therefore,this article starts from the needs of the industry and designs an AI middle-end system based on microservices.The system can complete one-stop services from camera video stream analysis,message push,real-time screen display,service deployment,and post-maintenance.Enterprise users only need to simply provide the real-time video stream address of the camera to be analyzed and the configuration information of the camera to seamlessly connect with the system designed in this paper.The underlying architecture of the system is developed using the popular docker container technology and the kubernetes container management platform,which realizes the rapid iterative development of the system and completes efficient operation and maintenance management.In addition,this paper designs two algorithms for cluster high availability research.One is the dynamic adaptive load balancing algorithm based on the entropy load coefficient method,which unifies the subjective and objective weighting algorithms and realizes the dynamic load balancing of the cluster.In the laboratory test environment,when the concurrency is between 2500r/s and 3500r/s,the cluster response time under the dynamic load balancing strategy is reduced by an average of 15%compared to the default polling strategy,and the throughput is increased by an average of 55%.Therefore,the algorithm we designed achieves better performance in the two dimensions of service average response time and system throughput.The second is the research on the cluster scheduling strategy based on the improved particle swarm algorithm.By improving the individual term coefficient and group term coefficient of the traditional particle swarm algorithm,the algorithm is more in line with the objective laws of actual system operation,and avoids the traditional particle swarm algorithm.The defect of falling into the local optimal solution due to precociousness,in the laboratory test environment,the scheduling strategy based on the improved particle swarm algorithm,compared with the default scheduling strategy of kubernetes and the scheduling strategy based on the classical particle swarm algorithm,the fitness function value comparison increased by 22%and 8%respectively,showing a better performance.Finally,this paper summarizes the system development and high-availability algorithm research of AI mid-stage,and looks forward to the details that can be improved and optimized. |