| Video surveillance technology has made up for many shortcomings such as the inability of the human eye to observe 24 hours of continuous work,fatigability and so on.It has been applied in a lot of fields such as homeland security,crime prevention and transportation control.Especially in large-scale security systems,video surveillance often needs to cover multiple nodes and aggregate the information of multiple nodes for processing,which has high requirements for accuracy and real-time performance.Therefore,designing a stable real-time system in which hardware,algorithm,and software cooperate with each other has great challenges and practical application value.The main topic of the research focus on the tasks splitting and modular design of real-time system from application background with the the hardware platform of multi-core processor,and how to realize and optimize the modules to achieve real-time and stability requirements.First combined the DARTS and NRL design methods to perform parallel task splitting and modular design on the system to give play to the performance of multi-core processors and achieve real-time goals.We build a hierarchical model from top to bottom,use pipeline design to parallelize sequential tasks,and use buffers to solve data conflicts and processing speed mismatches in the pipeline.Finally use a finite state machine to ensure the closed-loop state of the subsystem.The modular design makes the system reusable.According to the characteristics of the module’s low coupling and high cohesion,the system is divided into five modules.It uses efficient frontier algorithm to realize target detection and tracking,improves the algorithms in the current application scenarios.It adopts a more robust communication framework with certain concurrent processing capabilities,and re-encapsulates the application layer of TCP protocol to ensure the reliability of communication.Established a function-thread correspondence model for the display interaction module,and finally two software are used according to the characteristics of time separation.The optimization of real-time systems can be divided into three levels.The first is to optimize the architecture.Aiming at the performance bottleneck of the current systembandwidth problem,change the data flow direction,so that bandwidth pressure is dispersed,select a more efficient I / O multiplexing model to improve the system’s concurrency capability.Design a multi-level cache structure and optimize the data synchronization method to further improve the performance.The second is algorithm optimization.The algorithm with lower complexity is selected to improve the performance.On the other hand,the strategy is optimized logically to reduce the number of operations.Finished with the code optimization,sort out the code and use some techniques to improve the fault tolerance and speed of the code.System testing is a key link to verify whether the system meets the predetermined demand and performance level.According to the software test classification,we test the function and performance of the real-time system.The test items is tested one by one in real-world situation according to the system requirements.The test shows that the system can guarantee the frame rate of 20 fps to process the video sequence,real-time alarm and active tracking of the moving target within 200 m range on a single monitoring site,and collect the information of multiple nodes to the software for display and interaction.Thus,it is a real-time system with good concurrency and stability.The test shows that the system can guarantee the frame rate of 20 fps to process the video sequence,real-time alarm and active tracking of the moving target within 200 m range on a single monitoring site,and collect the information of multiple nodes to the software for display and interaction.The system runs stably for 7 × 24 hours with 50 sites connected,and the alarm response time and control response time are within 120 ms,which makes it subjectively no lag feeling.Under the condition of simulating 20 alarms per second and 3000 stations in high voltage,there is no lag handling which shows its good concurrency.It is a real-time system with strong concurrency and stability. |