Internet of Things cloud monitoring system based on modular data

By building a data analysis model based on modular data in the Internet of Things cloud monitoring system, the problem of distinguishing between normal and abnormal crowd aggregation behaviors is solved, and more accurate abnormal activity identification and management efficiency is achieved.

CN120071234AInactive Publication Date: 2025-05-30BEIJING POLYTECHNIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411933798.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-05-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing IoT cloud monitoring system is difficult to effectively distinguish between normal crowd gathering behavior and abnormal crowd gathering situations, and it is easy to misjudge normal activities as abnormal situations, resulting in unnecessary alarms or interventions.

Method used

Design an IoT cloud monitoring system based on modular data, including data acquisition module, data analysis module, model construction module and signal generation module. A data analysis model is constructed through flow density information, flow change information and abnormal time point information, and the optimal threshold is determined using the confusion matrix and F1 score to improve the accuracy of the data analysis model.

Benefits of technology

Effectively identify abnormal activities in the monitoring area, reduce misjudgments, avoid unnecessary alarms or interventions, and improve resource utilization and management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120071234A_ABST
    Figure CN120071234A_ABST
Patent Text Reader

Abstract

The invention discloses an Internet of Things cloud monitoring system based on modular data, and particularly relates to the technical field of Internet of Things cloud monitoring, the Internet of Things cloud monitoring system comprises a data acquisition module, a data analysis module, a model construction module and a signal generation module, an image of a monitoring area monitored by monitoring equipment is acquired and uploaded to an Internet of Things cloud platform for analysis, and the data analysis module is used for analyzing the image; performing information extraction on the collected monitoring images, performing modular classification on the information, obtaining information of different modules, performing comprehensive analysis on the information of the different modules, constructing data analysis models, judging whether abnormal behaviors of crowds exist in the campus, and calculating recall rates and accuracy of the data analysis models of different monitoring areas through a confusion matrix. And determining the optimal threshold for judging the abnormal behavior of the crowd in the different monitoring areas according to the F1 score, so that the abnormal activity phenomenon in the monitoring areas can be identified, and unnecessary alarm or intervention caused by the fact that normal activity is easily misjudged as an abnormal condition is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things cloud monitoring, and more specifically, the present invention relates to an Internet of Things cloud monitoring system based on modular data. Background Art

[0002] The Internet of Things cloud monitoring system combined with modular data can provide a more intelligent and accurate solution. Through the combination of Internet of Things technology and cloud computing platform, the monitoring system can collect and analyze real-time data in various areas on campus more comprehensively. However, it is often difficult to effectively distinguish normal crowd gathering behaviors from abnormal crowd gathering situations, and it is easy to misjudge normal activities as abnormal situations. For example, behaviors such as students gathering, chatting, and playing on campus after school are easily misjudged as abnormal situations, which may lead to unnecessary alarms or interventions, resulting in waste of resources and management troubles.

[0003] To solve the above defects, a technical solution is provided now. Summary of the Invention

[0004] In order to overcome the above defects of the prior art, an embodiment of the present invention provides an Internet of Things cloud monitoring system based on modular data to solve the problems raised in the above background art.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] An Internet of Things cloud monitoring system based on modular data includes a data acquisition module, a data analysis module, a model construction module, and a signal generation module, and the modules are connected by signals.

[0007] The data acquisition module is used to collect images of the monitored areas of the monitoring devices according to the monitoring devices in different areas on campus and upload them to the Internet of Things cloud platform for analysis.

[0008] The data analysis module is used to extract information from the collected monitoring images and classify the information modularly to obtain information of different modules. Among them, the information of different modules includes crowd density information, crowd change information, and abnormal time point information.

[0009] The model construction module is used to comprehensively analyze the information of different modules, construct a data analysis model with crowd density information, crowd change information, and abnormal time point information, and judge whether there are abnormal behaviors of people on campus.

[0010] The signal generation module is used to calculate the recall rate and precision of the data analysis model of different monitoring areas through a confusion matrix, and determine the best threshold for judging crowd abnormal behaviors in different monitoring areas according to the F1 score, so as to improve the accuracy of the data analysis model of different monitoring areas.

[0011] 7. In a preferred embodiment, information of different modules is obtained, where the information of different modules includes crowd density information, crowd flow change information, and abnormal time point information;

[0012] The crowd density information is represented by a crowd density accumulation coefficient, and the acquisition logic of the crowd density accumulation coefficient is as follows: Set a unit time range and mark the unit time range as: t 1 ~t 2 , obtain the number of people appearing in the monitoring device, draw a curve of the number of people changing with time according to the number of tasks at different times, and mark the relationship between the number of people changing with time as: R(t);

[0013] Calculate the crowd density accumulation coefficient, and the calculation formula is: Where, JL rw is the crowd density accumulation coefficient;

[0014] The crowd flow change information is represented by a crowd flow speed anomaly coefficient, and the acquisition logic of the crowd flow speed anomaly coefficient is as follows: Obtain the people identified in the monitoring device, determine the moving speeds of different people in the images uploaded by the monitoring device, and mark the moving speeds of different people in the images uploaded by the monitoring device within a unit time range as: SD i , where, i = 1, 2, 3... I, I is a positive integer, and i represents the number of different people within a unit time range;

[0015] Set a person speed threshold and mark the person speed threshold as: SD yz , compare the moving speeds of different people in the images uploaded by the monitoring device within a unit time range with the person speed threshold, obtain the moving speeds of the people whose moving speeds are greater than the person speed threshold, and re-mark the moving speeds of the people whose moving speeds are greater than the person speed threshold as: SD n , where, n = 1, 2, 3... N, N is a positive integer, and N represents the number of the moving speeds of the people whose moving speeds are greater than the person speed threshold;

[0016] Calculate the crowd flow speed anomaly coefficient, and the calculation formula is: Where, YC sd is the crowd flow speed anomaly coefficient;

[0017] The abnormal time point information is represented by a time deviation coefficient, and the acquisition logic of the time deviation coefficient is as follows: Determine the time period when the crowd in the monitoring area increases through historical data, obtain the set D of the time periods when the crowd in the monitoring area increases through historical data, D = {JD q} = {SJ 1 ~SJ 2 , SJ 3 ~SJ 4 ……SJ2Q-1 ~SJ 2Q}, where q = 1, 2, 3... Q, Q is a positive integer, q represents the number of the time period marked as the time when the population in the monitoring area increases determined by historical data, obtain the time point when the current population increases, and mark the time point when the current population increases as: SJ;

[0018] If the time point when the current population increases is not within the set D, calculate the time period when the time point when the current population increases is closest to the time when the population in the monitoring area increases determined by historical data, and mark the time period when the time point when the current population increases is closest to the time when the population in the monitoring area increases determined by historical data as: JD K , K represents the number of the closest time period;

[0019] Calculate the time deviation coefficient, and the calculation formula is: where PC sj is the time deviation coefficient;

[0020] If the time point when the current population increases is within the set D, then mark PC sj as 0.

[0021] In a preferred embodiment, construct a data analysis model for the crowd density information, crowd flow change information, and abnormal time point information, including:

[0022] Process and analyze the crowd density information, crowd flow change information, and abnormal time point information in different modules, and obtain the analysis results. The analysis results are the crowd density accumulation coefficient, the crowd flow speed abnormal coefficient, and the time deviation coefficient respectively. Construct a data analysis model for the crowd density accumulation coefficient, the crowd flow speed abnormal coefficient, and the time deviation coefficient to generate an abnormal evaluation coefficient. The calculation formula for the abnormal evaluation coefficient is: where pg is the abnormal evaluation coefficient of different monitoring areas, α 1 , α 2 , α 3 are the proportionality coefficients of the crowd density accumulation coefficient, the crowd flow speed abnormal coefficient, and the time deviation coefficient, and α 1 , α 2 , α 3 is greater than 0.

[0023] In a preferred embodiment, determine whether there are abnormal behaviors of the crowd on campus, including:

[0024] Set the abnormal evaluation coefficient thresholds for different monitoring areas, and mark the abnormal evaluation coefficient thresholds for different monitoring areas as: where b = 1, 2, 3... B, B is a positive integer, and b is the number of different areas.

[0025] Compare the abnormal evaluation coefficient threshold of the monitoring area with the abnormal evaluation coefficient. If the abnormal evaluation coefficient threshold is greater than the abnormal evaluation coefficient, it indicates that the monitoring area is abnormal. If the abnormal evaluation coefficient threshold is less than the abnormal evaluation coefficient, it indicates that the monitoring area is normal.

[0026] In a preferred embodiment, calculate the recall rate and precision of the data analysis models for different monitoring areas through a confusion matrix, including:

[0027] Obtain the sample results under the set abnormal evaluation coefficient threshold according to historical data;

[0028] Construct a confusion matrix, where TP represents true positive cases, which is the number of actual positive samples predicted as positive samples, that is, the actual monitoring area is abnormal and the predicted monitoring area is abnormal;

[0029] TN represents true negative cases, which is the number of actual negative samples predicted as negative samples, that is, the actual monitoring area is normal and the predicted monitoring area is normal.

[0030] FP represents false positive cases, which is the number of actual negative samples predicted as positive samples, that is, the actual monitoring area is normal and the predicted monitoring area is abnormal.

[0031] FN represents false negative cases, which is the number of actual positive samples predicted as negative samples, that is, the actual monitoring area is abnormal and the predicted monitoring area is normal.

[0032] Calculate the recall rate and precision. The formula for the recall rate is: The formula for precision is:

[0033] In a preferred embodiment, determine the best threshold for judging abnormal behaviors of people in different monitoring areas according to the F1 score to improve the accuracy of the data analysis models for different monitoring areas, including:

[0034] Calculate the F1 score under the set abnormal evaluation coefficient threshold. The calculation formula is:

[0035] Plot the curve of the F1 score against different abnormal evaluation coefficient thresholds, including for each possible abnormal evaluation coefficient threshold, calculate the corresponding precision and recall rate, calculate the F1 score for each abnormal evaluation coefficient threshold using the F1 score formula, plot the curve of the F1 score against different abnormal evaluation coefficient thresholds, observe the shape and trend of the curve, find the abnormal evaluation coefficient threshold that maximizes the F1 score, and select the abnormal evaluation coefficient threshold that maximizes the F1 score as the best abnormal evaluation coefficient threshold.

[0036] Determine the optimal abnormal evaluation coefficient threshold for different regions. If the abnormal evaluation coefficient threshold is greater than the optimal abnormal evaluation coefficient threshold, a warning signal is generated, indicating that there is a certain abnormal risk in the monitored area, and the staff is notified to conduct monitoring. If the abnormal evaluation coefficient threshold is less than the abnormal evaluation coefficient, no signal is generated.

[0037] Technical effects and advantages of the present invention:

[0038] The present invention collects monitoring image data of different monitored areas, uploads them to the Internet of Things cloud platform for modular processing, constructs a data analysis model based on the information of the crowd density, crowd change, and abnormal time point, verifies the correctness of the constructed data analysis model according to historical data, uses a confusion matrix to reduce the misjudgment of the data analysis model, and improves the success rate of the data analysis model, which helps to identify abnormal activity phenomena in the monitored area and avoid misjudging normal activities as abnormal situations, thereby triggering unnecessary alarms or interventions, resulting in waste of resources and management troubles. Brief Description of the Drawings

[0039] For the convenience of those skilled in the art to understand, the present invention will be further described below with reference to the accompanying drawings;

[0040] Figure 1 It is a schematic structural diagram of an Internet of Things cloud monitoring system based on modular data of the present invention. Detailed Embodiments

[0041] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0042] Embodiment 1

[0043] As Figure 1 It gives a schematic structural diagram of an Internet of Things cloud monitoring system based on modular data of the present invention, which includes a data acquisition module, a data analysis module, a model construction module, and a signal generation module;

[0044] The data acquisition module is used to collect images of the monitored areas of the monitoring devices according to the monitoring devices in different regions of the campus and upload them to the Internet of Things cloud platform for analysis;

[0045] The data analysis module is used to extract information from the collected monitoring images and classify the information modularly to obtain information of different modules. Among them, the information of different modules includes crowd density information, crowd change information, and abnormal time point information;

[0046] A model construction module for comprehensively analyzing information from different modules, constructing a data analysis model based on crowd density information, crowd change information, and abnormal time point information, and determining whether there are abnormal behaviors of people on campus.

[0047] A signal generation module for calculating the recall rate and precision of the data analysis model in different monitoring areas through a confusion matrix, and determining the optimal threshold for judging abnormal behaviors of people in different monitoring areas according to the F1 score, so as to improve the accuracy of the data analysis model in different monitoring areas.

[0048] Among them, for the monitoring devices in different areas of the campus, the images of the areas monitored by the monitoring devices are collected and uploaded to the Internet of Things cloud platform for analysis, which can be carried out according to the following steps:

[0049] Equipment layout planning: According to the actual situation of the campus and monitoring requirements, carry out layout planning for the monitoring devices. Determine the location, quantity, and coverage of the monitoring devices to ensure that all areas of the campus can be comprehensively covered and meet the monitoring requirements of different areas.

[0050] Installation of monitoring devices: Install monitoring devices in the campus according to the equipment layout planning, including cameras, sensors, etc. Ensure that the positions of the monitoring devices are reasonable, can effectively monitor the target area, and ensure the stability and safety of the devices.

[0051] Image acquisition: The monitoring devices collect the image data of the monitored areas and upload the image data to the Internet of Things cloud platform through network connections. The image data can include real-time video streams and static pictures, etc., and are selected and configured according to the actual situation.

[0052] Data transmission and storage: After receiving the uploaded image data, the Internet of Things cloud platform performs data transmission and storage. Ensure the stability and security of data transmission, and at the same time carry out reasonable storage management of the image data to ensure the integrity and availability of the data.

[0053] Image analysis and processing: The Internet of Things cloud platform analyzes and processes the uploaded image data, extracts image features, identifies target objects, detects abnormal situations, etc. Image processing and machine learning and other technologies can be used for image analysis to achieve intelligent analysis of the monitoring scene.

[0054] It should be noted that the processing of the images of the areas monitored by the monitoring devices uses deep learning technologies, such as convolutional neural networks (CNNs), which can detect and identify target objects in the monitoring images and analyze the behaviors of people in the monitoring images.

[0055] Extract information from the collected surveillance images and classify the information modularly, including: preprocessing the surveillance images, such as denoising, image enhancement, edge detection, etc., to improve the accuracy and efficiency of subsequent information extraction; using object detection algorithms (such as YOLO, SSD, Faster R-CNN, etc.) to identify different objects in the images, and tracking the detected objects to obtain the motion trajectories and state changes of the objects between different frames.

[0056] Divide the modules according to the information obtained for different categories. Modularly dividing the information for different categories can make the processing process more professional and efficient. Different processing algorithms and technologies can be adopted for different types of information, thereby improving the processing speed and efficiency of the system.

[0057] Among them, the information of different modules includes crowd density information, crowd change information, and abnormal time point information.

[0058] Crowd density information may imply potential abnormal situations. For example, when emergencies such as fires and earthquakes occur, people may gather together due to panic or seeking safety. At traffic arteries or narrow passages, traffic congestion and crowd gathering may occur due to traffic accidents, construction, etc. The appearance of onlookers may also lead to crowd gathering.

[0059] The crowd density information is represented by the crowd density accumulation coefficient. The acquisition logic of the crowd density accumulation coefficient is as follows: set the unit time range and mark the unit time range as: t 1 ~t 2 , obtain the number of people appearing in the surveillance device, draw a curve of the number of people changing with time based on the number of tasks at different times, and mark the relationship between the number of people changing with time as: R(t);

[0060] Calculate the crowd density accumulation coefficient. The calculation formula is: Among them, JL rw is the crowd density accumulation coefficient;

[0061] It can be seen from the formula that the larger the crowd density accumulation coefficient, the more people appear in the unit time range, indicating that there may be an abnormal situation of crowd gathering.

[0062] Among them, to draw a curve of the number of people changing with time and obtain the relationship between the number of people changing with time, it can be achieved by using data visualization tools or using some statistical analysis or time series analysis algorithms to process the data. For example, use the moving average method to smooth the data, or use linear regression analysis to fit the trend line.

[0063] The crowd density accumulation coefficient is an objective and quantifiable indicator that can intuitively reflect the crowd density in the monitored area. The crowd density accumulation coefficient can be calculated in real time and updated in real time as the monitoring data is updated, with high real-time performance. By uploading data from monitoring devices to the Internet of Things cloud platform for analysis, the system can promptly detect and respond to abnormal situations in the monitored area. The crowd density accumulation coefficient provides an intuitive reflection of the changes in the crowd density in the monitored area, which helps campus managers in management and decision-making.

[0064] The information on the change in the flow of people is represented by the coefficient of abnormal flow velocity. The acquisition logic of the coefficient of abnormal flow velocity is as follows: Obtain the people identified in the monitoring device and determine the moving speeds of different people in the images uploaded by the monitoring device. Mark the moving speeds of different people in the images uploaded by the monitoring device within a unit time range as: SD i , where i = 1, 2, 3... I, I is a positive integer, and i represents the serial numbers of different people within a unit time range;

[0065] Set the threshold of the people's speed and mark it as: SD yz , compare the moving speeds of different people in the images uploaded by the monitoring device within a unit time range with the threshold of the people's speed, obtain the moving speeds of the people whose speeds are greater than the threshold of the people's speed, and re-mark the moving speeds of the people whose speeds are greater than the threshold of the people's speed as: SD n , where n = 1, 2, 3... N, N is a positive integer, and N represents the serial numbers of the moving speeds of the people whose speeds are greater than the threshold of the people's speed;

[0066] It should be noted that if the moving speed of a person is greater than the threshold of the people's speed, it means that the person is moving quickly, indicating that there may be some emergencies causing the person to move quickly. The setting of the threshold of the people's speed can help the monitoring system identify abnormal behaviors or specific situations.

[0067] Calculate the coefficient of abnormal flow velocity. The calculation formula is: where YC sd is the coefficient of abnormal flow velocity;

[0068] It can be seen from the formula that the larger the coefficient of abnormal flow velocity, the more serious the abnormal situation of the flow velocity of the people in the monitored area, indicating that there is a greater possibility of abnormal situations in the monitored area.

[0069] The specific steps for obtaining the moving speeds of the people in the images uploaded by the monitoring device include:

[0070] Object detection: Use object detection algorithms (such as YOLO, Faster R-CNN, etc.) to detect people in the monitoring images. These algorithms can identify the people in the images and frame their positions.

[0071] Object tracking: Select an object and then track its position in the next few frames of images. Use object tracking algorithms (such as Kalman filtering, correlation filter-based methods, etc.) to achieve continuous tracking of the object.

[0072] Calculating speed: By recording the position information of the object between different frames, its moving speed can be calculated. Assume that the same person is detected in two consecutive frames of images. Calculate the distance between the two frames and calculate the speed based on this distance and the time interval between the two frames.

[0073] The position of the person detected in the first frame of the image is (x 1 , y 1 ), and the position detected in the second frame of the image is (x 2 , y 2 ). Then the distance of the person between the two frames can be calculated by the Euclidean distance: Assume that the time interval between the two frames is JG. Then the average speed of the person can be calculated as:

[0074] Speed filtering and smoothing: The calculated speed can be filtered and smoothed to reduce the influence of noise and errors. Use a sliding window or filter to smooth the speed data, or set a threshold for the speed according to the characteristics of the scene for filtering.

[0075] The information of abnormal time points is represented by the time deviation coefficient. The acquisition logic of the time deviation coefficient is as follows: Determine the time period when the population in the monitoring area increases through historical data, and obtain the set D of the time periods when the population in the monitoring area increases determined through historical data. D = {JD q} = {SJ 1 ~SJ 2 , SJ 3 ~SJ 4 ……SJ 2Q-1 ~SJ 2Q}, where q = 1, 2, 3... Q, Q is a positive integer, q represents the number of the time period marked as the time period when the population in the monitoring area increases determined through historical data, obtain the current time point when the population increases, and mark the current time point when the population increases as: SJ;

[0076] If the current time point when the population increases is not in the set D, then calculate the distance between the current time point when the population increases and the nearest time period when the population in the monitoring area increases determined through historical data, and mark the nearest time period when the population in the monitoring area increases determined through historical data to the current time point when the population increases as: JD K , K represents the number of the nearest time period;

[0077] Calculate the time deviation coefficient, and the calculation formula is as follows: Among them, PC sj is the time deviation coefficient;

[0078] If the time point when the current population increases is within the set D, then mark PC sj as 0;

[0079] As can be seen from the formula, the larger the time deviation coefficient, it indicates that it may be caused by emergencies, urgent situations or other abnormal situations, and further investigation and handling are required. Because according to historical data, determining the time period when the population increases in the monitoring area represents normal situations such as after-school time, and it is normal for the population to increase. However, if the population increases in other time periods, it may indicate abnormal situations.

[0080] The time deviation coefficient helps to effectively distinguish normal crowd gathering behaviors from abnormal crowd gathering situations, and can distinguish normal activities from abnormal activities. For example, behaviors such as students gathering, chatting, and playing on campus after school.

[0081] Among them, the specific steps for determining the time period when the population increases in the monitoring area through historical data include:

[0082] Data collection: Collect the monitoring data of the monitoring area for a period of time. These data can come from the videos and images recorded by monitoring cameras, or the data collected by other sensors, and these data represent the characteristics of the increasing population, such as the decibel level of the monitoring area, the population density of the monitoring area, etc.

[0083] Data preprocessing: Preprocess the collected monitoring data, including steps such as data cleaning and noise removal. Ensure the quality and usability of the data for subsequent analysis.

[0084] Identification of the time period when the population increases: Based on the collected monitoring data, identify the time period when the population increases. Usually, the time period when the population increases may be related to the daily operation of the campus, such as class start and end times, lunch time, break time, etc.

[0085] Process and analyze the crowd density information, crowd flow change information, and abnormal time point information in different modules, and obtain the analysis results. The analysis results are the crowd density accumulation coefficient, the crowd flow speed anomaly coefficient, and the time deviation coefficient respectively. Construct a data analysis model with the crowd density accumulation coefficient, the crowd flow speed anomaly coefficient, and the time deviation coefficient to generate an abnormal evaluation coefficient. The calculation formula of the abnormal evaluation coefficient is as follows: Among them, pg is the abnormal evaluation coefficient of different monitoring areas, α 1 、α 2 、α 3is the proportionality coefficient of the crowd density accumulation coefficient, the abnormal coefficient of the flow velocity of people, and the time deviation coefficient, α 1 α 2 α 3 is greater than 0.

[0086] As can be seen from the formula, the larger the crowd density accumulation coefficient, the abnormal coefficient of the flow velocity of people, and the time deviation coefficient, the larger the abnormal evaluation coefficient, indicating a higher possibility of abnormal activities in the monitored area. Conversely, the smaller the crowd density accumulation coefficient, the abnormal coefficient of the flow velocity of people, and the time deviation coefficient, the smaller the abnormal evaluation coefficient, indicating a lower possibility of abnormal activities in the monitored area.

[0087] Set the threshold of the abnormal evaluation coefficient for different monitored areas, and mark the threshold of the abnormal evaluation coefficient for different monitored areas as: where b = 1, 2, 3... B, B is a positive integer, and b is the number of different areas.

[0088] Compare the threshold of the abnormal evaluation coefficient of the monitored area with the abnormal evaluation coefficient. If the threshold of the abnormal evaluation coefficient is greater than the abnormal evaluation coefficient, it indicates that the monitored area is abnormal. If the threshold of the abnormal evaluation coefficient is less than the abnormal evaluation coefficient, it indicates that the monitored area is normal. According to historical data, obtain the sample results under the set threshold of the abnormal evaluation coefficient;

[0089] Construct a confusion matrix, where TP represents the true positive example, which is the number of actual positive samples and predicted positive samples, that is, the actual monitored area is abnormal and the predicted monitored area is abnormal;

[0090] TN represents the true negative example, which is the number of actual negative samples and predicted negative samples, that is, the actual monitored area is normal and the predicted monitored area is normal.

[0091] FP represents the false positive example, which is the number of actual negative samples but predicted positive samples, that is, the actual monitored area is normal and the predicted monitored area is abnormal.

[0092] FN represents the false negative example, which is the number of actual positive samples but predicted negative samples, that is, the actual monitored area is abnormal and the predicted monitored area is normal.

[0093] Calculate the recall rate and precision. The formula for the recall rate is: The formula for precision is:

[0094] It should be noted that the smaller the recall rate, the more the threshold of the abnormal evaluation coefficient needs to be reduced in the monitored area, indicating that the abnormal evaluation coefficient generated by the data analysis model fails to detect the abnormal activities in the area. The smaller the precision, the more misjudgments are generated by the abnormal evaluation coefficient generated by the data analysis model.

[0095] Calculate the F1 score under the threshold of the anomaly evaluation coefficient. The calculation formula is as follows:

[0096] It should be noted that the F1 score is affected by precision and recall. When the model reaches a balance between precision and recall, the F1 score reaches its maximum value. Therefore, choosing the threshold that maximizes the F1 score usually results in a better balance between precision and recall for the model.

[0097] Compared with considering precision or recall alone, using the F1 score to select the threshold is more robust because it comprehensively considers the influence of both. If only precision or only recall is used to select the threshold, the influence of the other metric may be ignored, resulting in the model performing well in one aspect but poorly in another. Using the F1 score can balance these two considerations and more comprehensively evaluate the performance of the model.

[0098] Plot the curve of the F1 score against different anomaly evaluation coefficient thresholds. This includes calculating the corresponding precision and recall for each possible anomaly evaluation coefficient threshold, using the F1 score formula to calculate the F1 score for each anomaly evaluation coefficient threshold, plotting the curve of the F1 score against different anomaly evaluation coefficient thresholds, observing the shape and trend of the curve, finding the anomaly evaluation coefficient threshold that maximizes the F1 score, and selecting the anomaly evaluation coefficient threshold that maximizes the F1 score as the optimal anomaly evaluation coefficient threshold.

[0099] Determine the optimal anomaly evaluation coefficient threshold for different regions. If the anomaly evaluation coefficient threshold is greater than the optimal anomaly evaluation coefficient threshold, generate a warning signal indicating that there is a certain anomaly risk in the monitored area and notify the staff for monitoring. If the anomaly evaluation coefficient threshold is less than the anomaly evaluation coefficient, no signal is generated.

[0100] The present invention collects the monitoring image amount data of different monitored areas, uploads it to the Internet of Things cloud platform for modular processing, constructs a data analysis model with the crowd density information, crowd change information, and abnormal time point information, verifies the correctness of the constructed data analysis model based on historical data, uses the confusion matrix to reduce the misjudgment of the data analysis model, and improves the success rate of the data analysis model, which helps to identify abnormal activity phenomena in the monitored area and avoid easily misjudging normal activities as abnormal situations, thereby triggering unnecessary alarms or interventions, resulting in waste of resources and management troubles.

[0101] The above formulas are all dimensionless and take their numerical values for calculation. The formulas are obtained by collecting a large amount of data for software simulation to get a formula closest to the real situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0102] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that contains a set of one or more available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.

[0103] It should be understood that in various embodiments of the present application, the magnitudes of the sequence numbers of the above processes do not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0104] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0105] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0106] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.

[0107] If the above functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present application, or the part that contributes to the prior art, or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0108] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. An IoT cloud monitoring system based on modular data, characterized in that: It includes a data acquisition module, a data analysis module, a model building module and a signal generation module, and the signals between the modules are connected; The data acquisition module is used to collect images of the areas monitored by the monitoring devices in different areas of the campus and upload them to the IoT cloud platform for analysis; The data analysis module is used to extract information from the collected surveillance images and classify the information into modules to obtain information of different modules, where the information of different modules includes crowd density information, crowd change information and abnormal time point information; The model building module is used to conduct a comprehensive analysis of the information of different modules, build a data analysis model based on the crowd density information, crowd change information and abnormal time point information, and determine whether there is abnormal behavior of the crowd on campus; The signal generation module is used to calculate the recall rate and precision of the data analysis model in different monitoring areas through the confusion matrix, and determine the optimal threshold for judging abnormal behavior of people in different monitoring areas based on the F1 score, thereby improving the accuracy of the data analysis model in different monitoring areas.

2. The IoT cloud monitoring system based on modular data according to claim 1 is characterized in that: Obtaining information from different modules, wherein the information from different modules includes crowd density information, crowd change information, and abnormal time point information; The crowd density information is represented by a crowd density accumulation coefficient. The logic for obtaining the crowd density accumulation coefficient is as follows: a unit time range is set and the unit time range is marked as: t1-t2, the number of people appearing in the monitoring device is obtained, and a curve of the number of people changing with time is drawn according to the number of tasks at different times, and the relationship between the number of people changing with time is marked as: R(t); Calculate the crowd density accumulation coefficient, the calculation formula is: Among them, JL rw is the accumulation coefficient of population density; The crowd flow change information is represented by the crowd flow speed abnormality coefficient. The logic of obtaining the crowd flow speed abnormality coefficient is: obtain the person identified in the monitoring device, and determine the moving speed of different people in the image uploaded by the monitoring device, and mark the moving speed of different people in the image uploaded by the monitoring device within a unit time range as: SD i , where i=1, 2, 3...I, I is a positive integer, and i represents the number of different characters within a unit time range; Set the character speed threshold and mark it as: SD yz , compare the moving speeds of different people in the images uploaded by the monitoring device within a unit time range with the person speed threshold, obtain the moving speeds of people greater than the person speed threshold, and re-mark the moving speeds of people greater than the person speed threshold as: SD n , where n=1, 2, 3, ..., N, N is a positive integer, and N represents the number of the moving speed of the character that is greater than the character speed threshold; Calculate the abnormal coefficient of passenger flow speed using the following formula: Among them, YC sd is the abnormal coefficient of human flow speed; The abnormal time point information is represented by a time deviation coefficient. The logic for obtaining the time deviation coefficient is: determine the time period when the number of people in the monitored area increases through historical data, and obtain a set D of time periods when the number of people in the monitored area increases through historical data, where D={JD q }={SJ1~SJ2, SJ3~SJ4……SJ 2Q-1 ~SJ 2Q }, where q=1, 2, 3...Q, Q is a positive integer, q represents the number of the time period marked as the time period when the number of people in the monitoring area increases through historical data, the time point when the current number of people increases is obtained, and the time point when the current number of people increases is marked as: SJ; If the time point at which the current crowd increases is not in set D, then calculate the distance between the time point at which the current crowd increases and the time period in which the crowd increases most recently in the monitoring area determined by historical data, and mark the distance between the time point at which the current crowd increases and the time period in which the crowd increases most recently in the monitoring area determined by historical data as: JD K , K represents the number of the most recent time period; Calculate the time deviation coefficient, the calculation formula is: Among them, PC sj is the time deviation coefficient; If the time point when the current crowd increases is within set D, then PC sj Marked as 0.

3. The IoT cloud monitoring system based on modular data according to claim 2 is characterized in that: The data analysis model is constructed based on the crowd density information, crowd change information and abnormal time point information, including: The crowd density information, crowd change information and abnormal time point information are processed and analyzed in different modules, and the analysis results are obtained. The analysis results are crowd density accumulation coefficient, crowd speed abnormal coefficient and time deviation coefficient. The crowd density accumulation coefficient, crowd speed abnormal coefficient and time deviation coefficient are used to construct a data analysis model to generate an abnormal evaluation coefficient. The calculation formula of the abnormal evaluation coefficient is: Among them, pg is the abnormal evaluation coefficient of different monitoring areas, α1, α2, and α3 are the proportional coefficients of the crowd density accumulation coefficient, the crowd flow speed abnormal coefficient, and the time deviation coefficient, and α1, α2, and α3 are greater than 0.

4. The IoT cloud monitoring system based on modular data according to claim 3 is characterized in that: Determine whether there is abnormal behavior among the crowd on campus, including: Set the anomaly assessment coefficient thresholds for different monitoring areas and mark the anomaly assessment coefficient thresholds for different monitoring areas as: Wherein, b=1, 2, 3...B, B is a positive integer, and b is the number of different areas; The abnormality assessment coefficient threshold of the monitoring area is compared with the abnormality assessment coefficient. If the abnormality assessment coefficient threshold is greater than the abnormality assessment coefficient, it means that the monitoring area is abnormal. If the abnormality assessment coefficient threshold is less than the abnormality assessment coefficient, it means that the monitoring area is normal.

5. The IoT cloud monitoring system based on modular data according to claim 4 is characterized in that: The recall and precision of the data analysis models for different monitoring areas are calculated through the confusion matrix, including: Based on historical data, obtain sample results under the set abnormal assessment coefficient threshold; Construct a confusion matrix, where TP represents the number of true positive samples that are actually positive and predicted to be positive, that is, the actual monitoring area is abnormal and the predicted monitoring area is abnormal; TN represents the true negative examples, which are actually negative samples and predicted to be negative samples, that is, the actual monitoring area is normal and the predicted monitoring area is normal; FP represents false positive examples, which are actually negative samples but predicted as positive samples, that is, the actual monitoring area is normal, and the predicted monitoring area is abnormal; FN represents false negative examples, which are actually positive samples but predicted as negative samples, that is, the actual monitoring area is abnormal, and the predicted monitoring area is normal; Calculate the recall rate and precision. The calculation formula for the recall rate is: The calculation formula for accuracy is:

6. The IoT cloud monitoring system based on modular data according to claim 5, characterized in that: Determine the optimal threshold for judging abnormal behavior of people in different monitoring areas based on the F1 score, and improve the accuracy of data analysis models in different monitoring areas, including: Calculate the F1 score under the set abnormal evaluation coefficient threshold. The calculation formula is: Draw a curve of F1 score and different anomaly assessment coefficient thresholds, including calculating the corresponding precision and recall for each possible anomaly assessment coefficient threshold, using the F1 score formula to calculate the F1 score under each anomaly assessment coefficient threshold, drawing a curve of F1 score and different anomaly assessment coefficient thresholds, observing the shape and trend of the curve, finding the anomaly assessment coefficient threshold that maximizes the F1 score, and selecting the anomaly assessment coefficient threshold that maximizes the F1 score as the optimal anomaly assessment coefficient threshold; Determine the optimal anomaly assessment coefficient threshold for different areas. If the anomaly assessment coefficient threshold is greater than the optimal anomaly assessment coefficient threshold, a warning signal is generated, indicating that there is a certain abnormal risk in the monitored area, and the staff is notified to monitor. If the anomaly assessment coefficient threshold is less than the anomaly assessment coefficient, no signal occurs.