Smart city user behavior and security supervision method and system based on CNN recognition
Through the CNN-based identification method, combined with user behavior scores and security awareness scores, personalized security suggestions are provided, which solves the problems of delayed information feedback and lack of intelligence in traditional security supervision methods, and realizes the efficiency and intelligence of smart city security management .
Patent Information
- Application Number
- CN202411111881.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-14
AI Technical Summary
Traditional security supervision methods rely on manual patrols and fixed equipment, and there are problems of delayed information feedback and untimely incident response. It is difficult to effectively deal with rapid changes in large-scale activities or high-density population areas. It lacks intelligence and automation, making it difficult to capture and analyze users in real time. Behavioral data.
Using CNN-based recognition method, users' behavior images in smart city areas are collected, behavior categories are output through pre-trained behavior recognition models, user behavior scores are calculated based on the category-scoring mapping table, and online questionnaires, offline inspections and sensor data are obtained. , calculate security awareness scores and formulate personalized security suggestions.
It realizes effective collection and analysis of user behavior data, provides timely feedback and intelligent management, improves the efficiency of smart city safety management, and can timely identify potential safety hazards and formulate targeted suggestions.
Smart Images

Figure CN118629096B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of smart cities, and in particular to a method and system for supervising user behavior and security in a smart city based on CNN recognition. Background Art
[0002] With the rapid development of science and technology and the acceleration of urbanization, the construction of smart cities has gradually become a key development direction for countries around the world. Smart cities aim to improve urban governance, increase resource utilization efficiency, and enhance the quality of life of citizens through the integration of information and communication technology (ICT) and the Internet of Things (IoT). At the same time, with the increase in urban population, urban security issues have become increasingly prominent. How to effectively identify and monitor user behavior and promptly warn of potential safety hazards has become an important issue in the construction of smart cities.
[0003] In traditional security monitoring methods, security monitoring mainly relies on manual patrols and fixed monitoring equipment for monitoring. This method not only has high human resource costs, but also often has problems such as delayed information feedback and untimely event response. Especially in large-scale events or areas with high-density crowds, traditional security measures are difficult to effectively respond to rapidly changing situations. In addition, traditional security monitoring methods often lack intelligence and automation, making it difficult to capture and analyze user behavior data in real time. Summary of the invention
[0004] The purpose of the present invention is to provide a smart city user behavior and security supervision method and system based on CNN recognition to solve the deficiencies in the prior art, effectively collect and analyze user behavior data, and provide personalized security solutions in combination with the user's security awareness score, thereby achieving timely feedback and intelligent management of information and improving the efficiency of smart city security management.
[0005] An embodiment of the present application provides a method for monitoring user behavior and security in a smart city based on CNN recognition, the method comprising:
[0006] Collect user behavior images within a preset time period in the smart city area;
[0007] The user behavior images are respectively input into the pre-trained CNN-based behavior recognition model to output the corresponding user behavior category; the behavior sub-score corresponding to each behavior category is determined according to the pre-constructed category-score mapping table, and the user behavior score is calculated according to each behavior sub-score; wherein the calculation formula of the user behavior score is: Among them, the Scoring user behavior, is the sub-score of the ith behavior, is the weight coefficient of the ith behavior, is the time impact factor, which indicates the influence of the time when the i-th behavior occurs on the weight coefficient. is the nonlinear adjustment index of the time impact factor, is the linkage impact score of the jth pair of mutually influencing behaviors, is the weighted coefficient of mutual influence between behaviors, is the penalty value for the user's negative behavior within a preset time period. is the penalty coefficient for negative behavior, is the number of user behavior categories, is the number of mutually influencing behavior logs; obtain online questionnaires, offline inspections and related sensor data for security within a preset time period, and calculate the user's security awareness score based on the obtained data; determine the security recommendation plan for the user based on the user behavior score and the security awareness score and send it to the user terminal to achieve user behavior and security supervision. Optionally, the calculation formula for the negative behavior penalty value is: Among them, the is the severity score of the kth negative behavior, is the frequency of occurrence of the kth negative behavior, is the number of negative behaviors. Optionally, the security awareness score is calculated as follows:
[0008]
[0009] Among them, the For security awareness scoring, Score the online questionnaire. Rating for offline inspections, Scoring sensor data, is the corresponding weight factor, is the influence coefficient of the rth question, Score the answer to the rth question, is the total number of questionnaire questions, is the score of the u-th inspection item, is the influence coefficient of the u-th inspection item, is the total number of inspection items, is the quantitative score of the g-th sensor data, is the influence coefficient of the g-th sensor data, Another embodiment of the present application provides a smart city user behavior and security monitoring system based on CNN recognition, the system comprising:
[0010] A collection module, used to collect user behavior images within a preset time period in the smart city area;
[0011] A recognition module, used to input the user behavior images into a pre-trained CNN-based behavior recognition model and output corresponding user behavior categories;
[0012] The first calculation module is used to determine the behavior sub-score corresponding to each behavior category according to the pre-constructed category-score mapping table, and calculate the user behavior score according to each behavior sub-score; wherein the calculation formula of the user behavior score is: Among them, the Scoring user behavior, is the sub-score of the ith behavior, is the weight coefficient of the ith behavior, is the time impact factor, which indicates the influence of the time when the i-th behavior occurs on the weight coefficient. is the nonlinear adjustment index of the time impact factor, is the linkage impact score of the jth pair of mutually influencing behaviors, is the weighted coefficient of mutual influence between behaviors, is the penalty value for the user's negative behavior within a preset time period. is the penalty coefficient for negative behavior, is the number of user behavior categories, is the number of behavior logs that have mutual influence; the second calculation module is used to obtain online questionnaires, offline inspections and relevant sensor data for security within a preset time period, and calculate the user's security awareness score based on the obtained data;
[0013] The supervision module is used to determine a security suggestion plan for the user according to the user behavior score and the security awareness score and send it to the user terminal to realize the supervision of user behavior and security.
[0014] Yet another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above methods when running.
[0015] Yet another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any of the methods described above.
[0016] Compared with the prior art, the present invention provides a method for supervising user behavior and security in a smart city based on CNN recognition, which collects user behavior images within a preset time period in a smart city area; inputs the user behavior images into a pre-trained CNN-based behavior recognition model, and outputs corresponding user behavior categories; determines the behavior sub-scores corresponding to each behavior category according to a pre-constructed category-score mapping table, and calculates the user behavior score according to each behavior sub-score; obtains online questionnaires, offline inspections, and related sensor data for security within a preset time period, and calculates the user's security awareness score based on the obtained data; determines a security recommendation plan for the user based on the user behavior score and the security awareness score and sends it to the user terminal to realize user behavior and security supervision, thereby effectively collecting and analyzing user behavior data, and providing personalized security plans in combination with the user's security awareness score, thereby realizing timely feedback and intelligent management of information, and improving the efficiency of smart city security management. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A hardware structure block diagram of a computer terminal for a smart city user behavior and security supervision method based on CNN recognition provided by an embodiment of the present invention;
[0018] Figure 2 A flow chart of a method for supervising user behavior and security in a smart city based on CNN recognition provided by an embodiment of the present invention;
[0019] Figure 3 A schematic diagram of the structure of a smart city user behavior and security monitoring system based on CNN recognition provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, but should not be construed as limiting the present invention.
[0021] The embodiment of the present invention first provides a smart city user behavior and security supervision method based on CNN recognition, which can be applied to electronic devices such as computer terminals, specifically ordinary computers, etc.
[0022] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal of a smart city user behavior and security monitoring method based on CNN recognition provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0023] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the smart city user behavior and security supervision method based on CNN recognition in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0024] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0025] See also Figure 2 , an embodiment of the present invention provides a method for smart city user behavior and security supervision based on CNN recognition, which may include the following steps:
[0026] S201, collecting user behavior images within a preset time period in a smart city area;
[0027] In a smart city environment, user behavior has a significant impact on public safety and security management. In order to conduct effective supervision based on these behaviors, it is first necessary to "collect user behavior images within a preset time period in the smart city area." This process is not only the first step in data collection, but also the basis for subsequent analysis and decision-making. By accurately obtaining user behavior images, it can provide original data support for subsequent behavior identification, scoring, and security recommendations. Role and significance:
[0028] - Improve security monitoring capabilities: By collecting user behavior images in real time, the monitoring system can promptly identify suspicious behaviors and potential safety hazards, and respond immediately, thereby improving security capabilities and response speed.
[0029] - Data-driven decision support: The collected behavioral data can be analyzed through deep learning models to provide accurate user behavior assessments. This provides a scientific data basis for city managers to help them make more reasonable administrative and security decisions.
[0030] - Intelligent management: Combined with modern image recognition technology, this process has taken an important step towards the intelligent management of smart cities, opening up a new era of safer and more efficient urban management.
[0031] Specifically, one implementation may include:
[0032] Step 1: Determine the collection area and preset time period
[0033] - Select the smart city areas that need to be monitored (e.g. main streets, public squares, commercial areas, etc.).
[0034] - Determine the preset time periods for image acquisition (e.g., morning rush hour, evening rush hour, holidays, etc.) and identify high-risk periods based on historical data analysis.
[0035] Step 2: Configure video surveillance equipment
[0036] - Deploy high-definition cameras in selected areas to ensure coverage of the entire surveillance area.
[0037] - Set the camera’s shooting angle, resolution, and frame rate to ensure that you can capture clear images of user behavior.
[0038] Step 3: Real-time image acquisition
[0039] - Start the monitoring system to continuously capture user behavior images within a set preset time period.
[0040] - Image collection can be done by combining timed snapshots and real-time video recording to ensure the comprehensiveness and accuracy of behavioral data in different situations.
[0041] Step 4: Image Preprocessing
[0042] - During the acquisition process, the image data is preprocessed, including:
[0043] - Image denoising: Use filtering algorithms (such as Gaussian filtering) to remove image noise and improve image quality.
[0044] - Image enhancement: Use methods such as histogram equalization to increase the contrast of the image, making user behavior more obvious.
[0045] - Image Cropping: Crop the captured image as needed to highlight the relevant parts of the user behavior.
[0046] This specific technical algorithm implementation method shows how to effectively collect user behavior images in a smart city environment through systematic steps. Through precise device configuration, real-time data collection, image preprocessing and behavior detection, effective user monitoring is finally achieved. This process provides a solid foundation for subsequent user behavior scoring and security awareness assessment, and provides a scientific basis for urban security governance.
[0047] S202, inputting the user behavior images into a pre-trained CNN-based behavior recognition model, and outputting corresponding user behavior categories;
[0048] In smart city security monitoring, the identification and analysis of user behavior is an important part of improving security management. This step aims to quickly and accurately classify the collected user behavior images through deep learning technology. By inputting the images into the pre-trained convolutional neural network (CNN) model, the system can automatically identify the user's behavior category, which provides basic data support for subsequent behavior scoring and security assessment.
[0049] - Automated behavior recognition: Relying on the powerful image processing capabilities of the CNN model, it can efficiently and automatically complete the classification of user behaviors, reduce labor costs and errors, and improve monitoring efficiency.
[0050] - Real-time response: By quickly identifying user behavior categories, the system can respond to suspicious behavior in the first place, take timely security measures, and enhance public safety.
[0051] - Data-driven decision support: Accurate behavior classification results provide city managers with behavior pattern data to help them analyze users' safety behavior habits and formulate scientific management strategies.
[0052] Specifically, one implementation may include:
[0053] Step 1: Prepare user behavior images
[0054] - Extract the images to be identified from the previously collected user behavior image dataset. These images should be properly preprocessed, such as image scaling, denoising, and standardization, to ensure the uniformity of the input.
[0055] Step 2: Load the pre-trained CNN model
[0056] - Import a CNN model pre-trained for behavior recognition tasks. This model should be trained on large-scale and representative behavior datasets (such as UCF101, Kinetics, etc.) and have high recognition accuracy and generalization ability.
[0057] Step 3: Image input format conversion
[0058] - Convert the format of the user behavior images to meet the input requirements of the CNN model. This usually includes adjusting the image size (such as 224x224 pixels), color channel normalization (ensuring that the RGB channel data is normalized to the 0-1 range), and batching (combining multiple images into a batch for processing).
[0059] Step 4: Perform inference operations
[0060] - Input the processed user behavior images into the loaded CNN model in batches and perform forward propagation to calculate the output. This process will go through multiple convolutional layers, activation functions, pooling layers, etc., and finally map the image features to the corresponding behavior categories.
[0061] Step 5: Get the output results
[0062] - The model output is usually a probability distribution for each category. The user's behavior category (e.g., exercise, wandering, making phone calls, etc.) is determined based on the highest probability value.
[0063] Step 6: Post-processing of results
[0064] - Post-processing of identified behavior categories, for example:
[0065] - Mapping category labels to specific behavior descriptions (e.g., “running” is converted to “running behavior”).
[0066] - Set a threshold and mark images with recognition probability lower than the threshold as “unrecognized” to enhance the credibility of the results.
[0067] Step 7: Record and store the recognition results
[0068] - Record the identified user behavior categories together with their corresponding images, timestamps and other information and store them in a database or data warehouse. This can provide data support for subsequent trend analysis and behavior scoring.
[0069] Step 8: Feedback and model optimization
[0070] - Regularly verify and analyze the recognition results, collect feedback on the accuracy of user behavior recognition, and optimize the CNN model based on the feedback information:
[0071] - If necessary, use new datasets for incremental training or fine-tuning to improve the model's recognition capabilities in specific scenarios.
[0072] Through the above steps, the CNN-based behavior recognition model can efficiently and automatically classify user behavior images, thus providing strong technical support for the security monitoring of smart cities. This process can not only improve the accuracy of security analysis, but also provide a solid data foundation for subsequent decision-making and management, which helps to build a safer and smarter city management system.
[0073] S203, determining the behavior sub-score corresponding to each behavior category according to a pre-constructed category-score mapping table, and calculating the user behavior score according to each behavior sub-score;
[0074] In the smart city security system, the calculation of user behavior scores is crucial. The core content of this step is "determining the behavior sub-scores corresponding to each behavior category based on the pre-built category-score mapping table, and calculating the user behavior score based on each behavior sub-score." Specifically, the implementation process of this step is as follows:
[0075] - Category-score mapping table construction: First, a category-score mapping table needs to be established, which associates different user behavior categories (e.g., walking, running, loitering, gathering, etc.) with corresponding behavior sub-scores. Scores are usually set based on criteria such as safety and social suitability.
[0076] - Determination of behavior sub-scores: Compare each user behavior category identified by the CNN model with the mapping table to extract the corresponding sub-scores. For example, if a user's behavior is identified as a positive behavior "wearing a helmet", then refer to the mapping table and assign a higher sub-score to the behavior, indicating that the behavior has a higher security significance. If a user's behavior is identified as a negative behavior "running a red light", then refer to the mapping table and assign a lower sub-score to the behavior, because running a red light will bring public safety risks.
[0077] - User behavior score calculation: By summarizing the sub-scores of all classified behaviors, the overall user behavior score is calculated according to a pre-set formula. This score reflects the user's overall behavior performance within a preset time period. Functional significance:
[0078] - Risk assessment: Through quantitative assessment of user behavior, potential security risks can be effectively identified. For example, certain behaviors may indicate public safety hazards, and timely measures can be taken to reduce risks.
[0079] - Personalized security recommendations: Accurate user behavior scores can provide personalized security recommendations. For example, users with low scores may need more safety tips or personal protection measures.
[0080] - Data-driven decision support: Through systematic data analysis, city managers can formulate more reasonable public safety management strategies based on user behavior scores, thereby improving the city’s safety level.
[0081] Specifically, a calculation formula for user behavior score can be: This formula aims to comprehensively consider the impact of multiple factors on user behavior scores, including the importance of each behavior, the time of occurrence, and the mutual influence. At the same time, a negative penalty mechanism is used to encourage users to improve their behavior. Score user behavior to reflect the user's overall behavior performance for subsequent security recommendations. is the sub-score of the ith behavior, reflecting the contribution of this behavior to public safety. is the weight coefficient of the ith behavior, representing the importance of the behavior in the score. is the time impact factor, which indicates the influence of the time when the i-th behavior occurs on the weight coefficient, considering the importance of the time when the behavior occurs to its safety. is the nonlinear adjustment index of the time impact factor, which adjusts the influence of the time factor on the user behavior score. is the linkage impact score of the jth pair of mutually influencing behaviors, reflecting the correlation and mutual influence between the behaviors, which can be quantified and determined through historical data analysis and expert evaluation. is the weighted coefficient of the mutual influence between behaviors, which affects the degree of linkage influence when evaluating the overall behavior. It is the penalty value for the user's negative behavior within the preset time period, reflecting the negative impact of the user's bad behavior on the score within the preset time period. is the penalty coefficient for negative behavior, which adjusts the intensity of the penalty. is the number of user behavior categories, is the number of behaviors that have mutual influence. Specifically, a calculation formula for the penalty value of negative behavior can be: This formula is used to quantify the impact of a user's negative behavior and ensure that the risk factors brought by negative behavior are taken into account in the overall score. is the severity score of the kth negative behavior, representing the potential threat level of the behavior to public safety. It can be quantified by public safety experts based on the potential harm assessment of the behavior and combined with historical accident data. is the frequency of occurrence of the kth negative behavior, reflecting the number of occurrences of the behavior in a specific time period. is the number of negative behaviors, indicating different types of negative behaviors. Through the above steps, the scientificity and rationality of the smart city user behavior and security supervision methods are clarified. Each step and formula design is aimed at improving public safety and security awareness, achieving accurate behavior analysis and management in a data-driven manner, and providing city managers and users with practical improvement suggestions and solutions. S204, obtaining online questionnaires, offline inspections, and related sensor data for security within a preset time period, and calculating the user's security awareness score based on the acquired data;
[0082] Specifically, online questionnaires: collect users’ knowledge and attitudes towards security through designed questionnaires. The questionnaires usually include questions on personal safety habits, cognition of the surrounding environment, emergency response capabilities, etc., in order to quantify users’ security awareness.
[0083] Offline inspection: Through on-site inspection and evaluation of users’ security measures and behaviors, professionals can conduct on-site inspections of users’ living environments, public areas, etc., and record the current status of security and potential risks.
[0084] Sensor data: Use smart sensors to collect security-related data, such as abnormal activity records from surveillance cameras, alarm data from intrusion sensors, etc. These data can reflect the security status of users and the surrounding environment in real time.
[0085] Calculate security awareness score: Based on the collected data, the security awareness score is calculated through a preset scoring formula. This score quantifies the user's security awareness and provides a basis for subsequent management decisions.
[0086] Function and significance: - Comprehensively evaluate users' security awareness: Combining the multi-dimensional information of online questionnaires, offline inspections and sensor data, it provides a comprehensive evaluation perspective for users' security awareness.
[0087] - Data-driven security management: By collecting and analyzing users’ security awareness scores, city managers can identify security weaknesses of specific groups of people and formulate corresponding security education and intervention measures.
[0088] - Improve social sense of security: Effective security awareness scoring and corresponding feedback measures can enhance the public's sense of security and enable them to participate more actively in security management.
[0089] Specifically, a calculation formula for security awareness score can be: This formula comprehensively considers the user's online questionnaire score, offline inspection score and sensor data score to quantify the user's security awareness level. Through the form of weighted average, it can reflect the influence of different scoring sources. This formula aims to extract users' security awareness from online questionnaires and provide basic data for security awareness scores by taking a weighted average of the influence and response of each question. The formula quantifies the security level in the user environment by taking a weighted average of the results of offline checks, helping to evaluate the user's actual security measures and behaviors. This formula extracts the user's security status from the sensor data and reflects the impact of real-time monitoring data on the user's security awareness. It is a security awareness score that reflects the user's overall level of security awareness and self-protection awareness. Score the online questionnaire to reflect the security awareness shown by the users in the questionnaire. Provide scores for offline inspections, reflecting the security status of the user environment and the effectiveness of actual measures. Score sensor data to quantify the security status information provided by monitoring devices. are corresponding weight factors, which determine the influence of different scoring sources on the final security awareness score and can be adjusted according to actual conditions. is the influence coefficient of the rth question, indicating the importance of the question in the overall safety awareness. Score the answer to the rth question, quantifying the user's answer to the question, usually as a score (e.g., a 1-5 rating system). is the total number of questions in the questionnaire, indicating the number of questions answered by the participants. is the score of the u-th inspection item, which quantifies the score of the inspection result and is usually based on the on-site evaluation criteria. is the influence coefficient of the u-th check item, indicating the importance of this check item to the overall security awareness. is the total number of inspection items, is a quantitative score for the g-th sensor data, which is usually scored based on the sensor's alarm status or monitoring results. is the influence coefficient of the g-th sensor data, indicating the importance of the monitoring data to the user's security awareness. is the number of sensor data. The above steps and formulas elaborate on how to calculate the user's security awareness score in a smart city environment by obtaining online questionnaires, offline inspections and sensor data. This process not only provides quantitative indicators that reflect the user's sense of security for security management, but also provides data support for city managers to formulate practical security strategies, ultimately improving public safety and citizens' safety awareness. S205, based on the user behavior score and the security awareness score, determine a security recommendation plan for the user and send it to the user terminal to achieve supervision of user behavior and security.
[0090] In the smart city security supervision method, the main contents of this step include:
[0091] - Integrate scoring information: First, integrate the results obtained from user behavior scoring and security awareness scoring, and consider them comprehensively through the set algorithm.
[0092] - Develop security recommendations: Based on the integrated scores, generate personalized security recommendations to enhance users’ safety awareness and behavior habits.
[0093] - Sending recommended solutions: Promptly notify users of the formulated security recommended solutions through user terminals (such as mobile APP, WeChat public accounts, etc.) to ensure that users can receive relevant information and implement them.
[0094] Function and significance:
[0095] - Personalized security guidance: By analyzing the user's behavior and security awareness, more targeted security suggestions can be formulated to help users recognize their own security deficiencies.
[0096] - Enhance public safety awareness: Effective suggestions can enhance users’ safety awareness and encourage them to take more reasonable safety measures.
[0097] - Build a smart city security ecosystem: Through user feedback and participation, a multi-faceted interactive security management strategy can be formed to enhance the city’s overall security protection capabilities.
[0098] Specifically, one implementation may include:
[0099] 1. Input and scoring integration:
[0100] - Collect user behavior score UBS and security awareness score SAS.
[0101] - Classification based on user ratings:
[0102] - Category 1: If both UBS and SAS are less than 50, the user is marked as a high-risk user (low score);
[0103] - Category 2: If one of UBS and SAS is less than 50 and the other is greater than or equal to 50, the user is marked as a medium-risk user (medium score);
[0104] - Category 3: If both UBS and SAS are greater than or equal to 50, the user is marked as a low-risk user (high score).
[0105] 2. Proposal generation:
[0106] - Design corresponding security suggestions for different scoring categories:
[0107] - High-risk users:
[0108] - It is recommended to attend security training and lectures regularly.
[0109] - Push security alert information around your residence.
[0110] - Provide purchase recommendations for personal safety equipment (such as alarms, portable self-defense devices, etc.).
[0111] - Medium risk users:
[0112] - Provide personalized recommendations for improving safe behaviors (e.g., nighttime activity tips, precautions in social situations).
[0113] - Push information about safety activities in the local community.
[0114] - Low risk users:
[0115] - Continue to maintain good safety behaviors and encourage the dissemination of safety knowledge.
[0116] - Provide recommendations for advanced courses to enhance safety awareness.
[0117] 3. Filter and customize information:
[0118] - Further refine the recommendations based on the user's historical feedback, residential area, behavior patterns, etc. For example:
[0119] - If the user's security risk is higher in a certain area, strengthen the prevention strategy in that area.
[0120] - Update personalized recommendations based on the user's recent behavior data.
[0121] 4. Generate and send suggestions:
[0122] - Format the final proposal into a user-friendly message (e.g., a notification with both text and pictures).
[0123] - Send information to users through mobile apps, SMS or email. - Try to provide interactive functions so that users can provide feedback on the suggestions for subsequent optimization.
[0124] 5. Follow-up and evaluation:
[0125] - Establish a user feedback mechanism to collect users’ feedback on the implementation and effectiveness of security recommendations.
[0126] - Continuously adjust security recommendations based on feedback to ensure their continued effectiveness and adaptability.
[0127] Through the above detailed steps, not only the supervision and improvement of user behavior and security awareness are achieved, but also the safety management and prevention awareness of the entire community are enhanced. This method is not only applicable to individual users, but can also be extended to a wider area to form a safer smart city ecosystem.
[0128] It can be seen that user behavior images within a preset time period in the smart city area are collected; the user behavior images are respectively input into a pre-trained CNN-based behavior recognition model to output the corresponding user behavior category; the behavior sub-score corresponding to each behavior category is determined according to a pre-constructed category-score mapping table, and the user behavior score is calculated according to each behavior sub-score; online questionnaires, offline inspections and related sensor data for security within a preset time period are obtained, and the user's security awareness score is calculated based on the obtained data; based on the user behavior score and the security awareness score, a security recommendation plan for the user is determined and sent to the user terminal to realize the supervision of user behavior and security, so as to effectively collect and analyze user behavior data, and provide personalized security plans in combination with the user's security awareness score, so as to realize timely feedback and intelligent management of information, and improve the efficiency of smart city security management.
[0129] Another embodiment of the present invention provides a smart city user behavior and security monitoring system based on CNN recognition, see Figure 3 , the system may include:
[0130] The collection module 301 is used to collect user behavior images within a preset time period in the smart city area;
[0131] The recognition module 302 is used to input the user behavior images into a pre-trained CNN-based behavior recognition model and output the corresponding user behavior category;
[0132] A first calculation module 303, configured to determine the behavior sub-score corresponding to each behavior category according to a pre-constructed category-score mapping table, and calculate the user behavior score according to each behavior sub-score;
[0133] The second calculation module 304 is used to obtain online questionnaires, offline inspections and relevant sensor data for security within a preset time period, and calculate the user's security awareness score based on the obtained data;
[0134] The supervision module 305 is used to determine a security suggestion plan for the user according to the user behavior score and the security awareness score and send it to the user terminal to realize the supervision of user behavior and security.
[0135] It can be seen that user behavior images within a preset time period in the smart city area are collected; the user behavior images are respectively input into a pre-trained CNN-based behavior recognition model to output the corresponding user behavior category; the behavior sub-score corresponding to each behavior category is determined according to a pre-constructed category-score mapping table, and the user behavior score is calculated according to each behavior sub-score; online questionnaires, offline inspections and related sensor data for security within a preset time period are obtained, and the user's security awareness score is calculated based on the obtained data; based on the user behavior score and the security awareness score, a security recommendation plan for the user is determined and sent to the user terminal to realize the supervision of user behavior and security, so as to effectively collect and analyze user behavior data, and provide personalized security plans in combination with the user's security awareness score, so as to realize timely feedback and intelligent management of information, and improve the efficiency of smart city security management.
[0136] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0137] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:
[0138] S201, collecting user behavior images within a preset time period in a smart city area;
[0139] S202, inputting the user behavior images into a pre-trained CNN-based behavior recognition model, and outputting corresponding user behavior categories;
[0140] S203, determining the behavior sub-score corresponding to each behavior category according to a pre-constructed category-score mapping table, and calculating the user behavior score according to each behavior sub-score;
[0141] S204, obtaining online questionnaires, offline inspections, and relevant sensor data for security within a preset time period, and calculating the user's security awareness score based on the obtained data;
[0142] S205: Determine a security suggestion plan for the user based on the user behavior score and the security awareness score and send it to the user terminal to achieve user behavior and security supervision.
[0143] It can be seen that user behavior images within a preset time period in the smart city area are collected; the user behavior images are respectively input into a pre-trained CNN-based behavior recognition model to output the corresponding user behavior category; the behavior sub-score corresponding to each behavior category is determined according to a pre-constructed category-score mapping table, and the user behavior score is calculated according to each behavior sub-score; online questionnaires, offline inspections and related sensor data for security within a preset time period are obtained, and the user's security awareness score is calculated based on the obtained data; based on the user behavior score and the security awareness score, a security recommendation plan for the user is determined and sent to the user terminal to realize the supervision of user behavior and security, so as to effectively collect and analyze user behavior data, and provide personalized security plans in combination with the user's security awareness score, so as to realize timely feedback and intelligent management of information, and improve the efficiency of smart city security management.
[0144] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0145] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0146] Specifically, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0147] S201, collecting user behavior images within a preset time period in a smart city area;
[0148] S202, inputting the user behavior images into a pre-trained CNN-based behavior recognition model, and outputting corresponding user behavior categories;
[0149] S203, determining the behavior sub-score corresponding to each behavior category according to a pre-constructed category-score mapping table, and calculating the user behavior score according to each behavior sub-score;
[0150] S204, obtaining online questionnaires, offline inspections, and relevant sensor data for security within a preset time period, and calculating the user's security awareness score based on the obtained data;
[0151] S205: Determine a security suggestion plan for the user based on the user behavior score and the security awareness score and send it to the user terminal to achieve user behavior and security supervision.
[0152] It can be seen that user behavior images within a preset time period in the smart city area are collected; the user behavior images are respectively input into a pre-trained CNN-based behavior recognition model to output the corresponding user behavior category; the behavior sub-score corresponding to each behavior category is determined according to a pre-constructed category-score mapping table, and the user behavior score is calculated according to each behavior sub-score; online questionnaires, offline inspections and related sensor data for security within a preset time period are obtained, and the user's security awareness score is calculated based on the obtained data; based on the user behavior score and the security awareness score, a security recommendation plan for the user is determined and sent to the user terminal to realize the supervision of user behavior and security, so as to effectively collect and analyze user behavior data, and provide personalized security plans in combination with the user's security awareness score, so as to realize timely feedback and intelligent management of information, and improve the efficiency of smart city security management.
[0153] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the drawings. Any changes made according to the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the description and drawings, should be within the protection scope of the present invention.
Claims
1. A smart city user behavior and security supervision method based on CNN recognition, characterized in that: The method comprises: Collect user behavior images within a preset time period in the smart city area; Input the user behavior images into a pre-trained CNN-based behavior recognition model, and output corresponding user behavior categories; The behavior sub-score corresponding to each behavior category is determined according to the pre-constructed category-score mapping table, and the user behavior score is calculated according to each behavior sub-score; wherein the calculation formula of the user behavior score is: Wherein, UBS is the user behavior score, F_i is the sub-score of the ith behavior, w_i is the weight coefficient of the ith behavior, t_i is the time influence factor, which indicates the influence of the time of occurrence of the ith behavior on the weight coefficient, theta is the nonlinear adjustment index of the time influence factor, C_j is the linkage influence score of the jth pair of mutually influencing behaviors, lambda is the weight coefficient of mutual influence between behaviors, Pen is the penalty value of the user's negative behavior within a preset time period, delta is the penalty coefficient of negative behavior, n is the number of user behavior categories, and m is the number of mutually influencing behavior logarithms; Obtain online questionnaires, offline inspections, and relevant sensor data for security within a preset time period, and calculate the user's security awareness score based on the acquired data; According to the user behavior score and the security awareness score, a security suggestion plan for the user is determined and sent to the user terminal to achieve supervision of user behavior and security.
2. The method according to claim 1, characterized in that: The calculation formula of the negative behavior penalty value is: Wherein, B_k is the severity score of the k-th negative behavior, S_k is the occurrence frequency of the k-th negative behavior, and p is the number of negative behaviors.
3. The method according to claim 2, characterized in that The calculation formula for the security awareness score is: SAS=gamma_1·W+gamma_2·C+gamma_3·S Wherein, SAS is the security awareness score, W is the online questionnaire score, C is the offline inspection score, S is the sensor data score, and gamma_1, gamma_2, and gamma_3 are corresponding weight factors; Wherein, A_r is the influence coefficient of the rth question, R_r is the answer score of the rth question, and q is the total number of questions in the questionnaire; Wherein, L_u is the score of the u-th inspection item, O_u is the influence coefficient of the u-th inspection item, and v is the total number of inspection items; Wherein, D_g is the quantitative score of the g-th item of sensor data, E_g is the influence coefficient of the g-th item of sensor data, and h is the number of sensor data.
4. A smart city user behavior and security monitoring system based on CNN recognition, characterized in that: The system comprises: A collection module, used to collect user behavior images within a preset time period in the smart city area; A recognition module, used to input the user behavior images into a pre-trained CNN-based behavior recognition model and output corresponding user behavior categories; The first calculation module is used to determine the behavior sub-score corresponding to each behavior category according to the pre-constructed category-score mapping table, and calculate the user behavior score according to each behavior sub-score; wherein the calculation formula of the user behavior score is: Wherein, UBS is the user behavior score, F_i is the sub-score of the ith behavior, w_i is the weight coefficient of the ith behavior, t_i is the time influence factor, which indicates the influence of the time of occurrence of the ith behavior on the weight coefficient, theta is the nonlinear adjustment index of the time influence factor, C_j is the linkage influence score of the jth pair of mutually influencing behaviors, lambda is the weight coefficient of mutual influence between behaviors, Pen is the penalty value of the user's negative behavior within a preset time period, delta is the penalty coefficient of negative behavior, n is the number of user behavior categories, and m is the number of mutually influencing behavior logarithms; The second calculation module is used to obtain online questionnaires, offline inspections and relevant sensor data for security within a preset time period, and calculate the user's security awareness score based on the obtained data; The supervision module is used to determine a security suggestion plan for the user according to the user behavior score and the security awareness score and send it to the user terminal to realize the supervision of user behavior and security.
5. The system according to claim 4, characterized in that The calculation formula of the negative behavior penalty value is: Wherein, B_k is the severity score of the k-th negative behavior, S_k is the occurrence frequency of the k-th negative behavior, and p is the number of negative behaviors.
6. The system according to claim 5, characterized in that The calculation formula for the security awareness score is: SAS=gamma_1·W+gamma_2·C+gamma_3·S Wherein, SAS is the security awareness score, W is the online questionnaire score, C is the offline inspection score, S is the sensor data score, and gamma_1, gamma_2, and gamma_3 are corresponding weight factors; Wherein, A_r is the influence coefficient of the rth question, R_r is the answer score of the rth question, and q is the total number of questions in the questionnaire; Wherein, L_u is the score of the u-th inspection item, O_u is the influence coefficient of the u-th inspection item, and v is the total number of inspection items; Wherein, D_g is the quantitative score of the g-th item of sensor data, E_g is the influence coefficient of the g-th item of sensor data, and h is the number of sensor data.
7. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 3 when executed by a processor.
8. An electronic device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 3.
