## 3 Proposed System
### Edge-Server Architecture-Based Pedestrian Abnormal Behavior Detection System
Meanwhile, when the ABER receives a pedestrian anomaly end event from the edge, the SATS passes the analysis end time to the analysis module on the GPU server to which it assigned the analysis request, and the analysis module analyzes the video only until the analysis end time. The SATS has information about the connected analytics module and maintains the number of assigned analytics requests and the section of the analytics request currently being processed. Since the analysis module installed on the GPU server is docker-based, it can be installed as long as CUDA and docker are installed. SATS can simply connect the ICS and GPU using IP and port information, contributing to the system's scalability. Figure 3 shows the analysis engines comprising the GPU server's analysis modules. The GPU server's pedestrian anomaly detection engine performs DNN-based pedestrian anomaly analysis based on the results of the object detection, object tracking, and pose estimation engines. For more information about the pedestrian anomaly detection engine used in the GPU server, see the experiments described in Section 4. Since most pedestrian anomaly analyses are performed on GPUs, we can install as many analysis engines as there are GPUs on the server. The GPU server analysis module then passes the results to the  
Figure 2: Analysis module structure of the edge device. The video stream from the CCTV is analyzed by the edge device to detect the abnormal behavior of a pedestrian. After frame separation, object detection, and tracking, the event information is sent to the ABER in the ICS if abnormal behavior is detected. RND. If the analysis engine on the GPU server detects pedestrian anomalies, the RND notifies the control center operator of the CCTV section in which the anomaly occurred. ```
1:Input: analysisRequest--a request with a type (start/end) and associated data. 2:Input: analysisModules--list of available analysis modules, each with a current task list. 3:Output: assignment--description of how the request was handled. 4:procedureManageRequest(\(analysisRequest,analysisModules\))
5:\(bestModule\leftarrow\) None
6:ifanalysisRequest.\(type=\)\"start\"then
7:\(minTasks\leftarrow\infty\)
8:\(earliestCompletionTime\leftarrow\infty\)
9:for each module in analysisModulesdo
10:if\(module\_currentTasks<minTasks\)then
11:\(minTasks\leftarrow module\_currentTasks\)
12:\(earliestCompletionTime\gets module.estimatedCompletionTime\)
13:\(bestModule\gets module\)
14:elseif\(module\_currentTasks=minTasks\)then
15:if\(module.estimatedCompletionTime<earliestCompletionTime\)then
16:\(earliestCompletionTime\gets module.estimatedCompletionTime\)
17:\(bestModule\gets module\)
18:SATS informs bestModule to prepare for new task
19: Append analysisRequest to bestModule's queue
20:\(bestModule\_currentTasks\gets bestModule\_currentTasks+1\)
21:\(assignment\leftarrow\)\"Request assigned to module \"&\(bestModule.id\)
22:elseif\(analysisRequest.type=\)\"end\"then
23:\(requestModule\leftarrow\) None
24:for each module in analysisModulesdo
25:if\(module\) is currently processing analysisRequestthen
26:\(requestModule\gets module\)
27:break
28:if\(requestModule\
eq\) None then
29: SATS manages requestModule to end task
30: Notify requestModule of analysisRequest's end
31:\(requestModule.currentTasks\gets requestModule.currentTasks-1\)
32:\(assignment\leftarrow\)\"Request end notified to module \"&\(requestModule.id\)
33:else
34:\(assignment\leftarrow\)\"Request end not found in any module\"
35:return assignment
```  
**Algorithm 1** Assign and manage analysis requests in analysis modules. The proposed system first processes CCTV videos on the edge device, and the number of CCTVs that can be processed on the edge device (\(N_{\text{edge}_{\text{cap}}}\)) according to the frames that can be processed on the edge device (\(f_{\text{edge}_{\text{need}}}\)) and (\(f_{\text{edge}_{\text{cap}}}\)) can be defined as follows: Formula (1), which gives the number of CCTVs that an edge device can handle.