System
The system integrates crime, weather, and social data to predict crime risk and optimize security force deployment, addressing inefficiencies in conventional methods and enhancing crime prevention and response.
Patent Information
- Application Number
- JP2024131456
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2026-02-20
AI Technical Summary
Conventional methods struggle to predict crime effectively and optimally allocate security resources, leading to insufficient crime prevention and rapid response due to personnel shortages and dynamically changing crime risks.
A system that integrates historical crime data, weather data, and social trend data using a generative AI model to predict crime risk and generate an optimized security force deployment plan, which is then notified to relevant agencies.
Enables efficient allocation of security resources and enhances crime prevention by providing real-time, accurate crime risk predictions and deployment plans.
Smart Images

Figure 2026028840000001_ABST
Abstract
Description
[Technical Field]
[0001] The technology of the present disclosure relates to a system. [Background technology]
[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to a description of the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2022-180282 Summary of the Invention [Problem to be solved by the invention]
[0004] In recent years, the number of crimes occurring in urban areas has been steadily increasing, leading to growing social anxiety. Furthermore, as personnel shortages at security companies and police forces become more serious, there is a need to efficiently allocate limited resources. Conventional methods have made it difficult to predict crime and optimally allocate security forces, resulting in insufficient crime prevention and rapid response. The objective of this invention is to solve these problems and achieve efficient and effective crime prevention and rapid response. [Means for solving the problem]
[0005] The present invention provides a system that collects historical crime data, weather data, and social trend data, integrates and pre-processes this data, and includes a means for predicting crime risk from the integrated data using a generative AI model. It also includes a means for generating a security force deployment plan for a specific area and time period based on the predicted crime risk, and for notifying the system of the plan. This provides a system that optimally utilizes limited resources to achieve crime prevention and rapid response.
[0006] "Past crime data" refers to data containing information about crimes that have occurred in the past, including the date and location of the crime, the type of crime, and the extent of the damage.
[0007] "Climate data" refers to data relating to weather conditions, including weather elements such as temperature, precipitation, wind speed, and humidity.
[0008] "Social trend data" is data that shows social events, people's interests, and trends, and includes information collected from social media posts, news, etc.
[0009] "Integration" refers to the process of bringing together data collected from multiple different data sources into a single format.
[0010] "Preprocessing" is the process of converting data into a format suitable for analysis and modeling, and includes processes such as filling in missing values, correcting outliers, and encoding categorical data.
[0011] A "generative AI model" is a predictive model built using machine learning or deep learning techniques that has the ability to learn patterns from data and predict future events.
[0012] "Crime risk" is an indicator of the likelihood of a crime occurring at a particular location and time, and is calculated using a predictive model.
[0013] A "security force deployment plan" is a plan that determines which areas and times security guards should be deployed, and is optimized based on predicted crime risks.
[0014] "Notification" refers to the process of transmitting the generated security force deployment plan to relevant agencies and terminals. [Brief explanation of the drawings]
[0015] [Figure 1] 1 is a conceptual diagram showing an example of the configuration of a data processing system according to a first embodiment. [Figure 2] 1 is a conceptual diagram showing an example of main functions of a data processing device and a smart device according to a first embodiment. [Figure 3] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a second embodiment. [Figure 4] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and smart glasses according to a second embodiment. [Figure 5] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a third embodiment. [Figure 6] FIG. 11 is a conceptual diagram showing an example of main functions of a data processing device and a headset-type terminal according to a third embodiment. [Figure 7] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a fourth embodiment. [Figure 8] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and a robot according to a fourth embodiment. [Figure 9] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 10] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 11] FIG. 3 is a sequence diagram showing a processing flow of the data processing system according to the first embodiment. [Figure 12] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 1. [Figure 13]FIG. 10 is a sequence diagram showing the flow of processing in the data processing system according to the second embodiment when an emotion engine is combined. [Figure 14] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 2 when an emotion engine is combined. DETAILED DESCRIPTION OF THE INVENTION
[0016] An example of an embodiment of a system according to the technology of the present disclosure will be described below with reference to the accompanying drawings.
[0017] First, the terms used in the following description will be explained.
[0018] In the following embodiments, a coded processor (hereinafter simply referred to as a "processor") may be a single arithmetic device or a combination of multiple arithmetic devices. Furthermore, a processor may be a single type of arithmetic device or a combination of multiple types of arithmetic devices. Examples of arithmetic devices include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-Purpose computing on Graphics Processing Units), and an APU (Accelerated Processing Unit).
[0019] In the following embodiments, a coded RAM (Random Access Memory) is a memory in which information is temporarily stored and is used as a working memory by a processor.
[0020] In the following embodiments, the coded storage is one or more non-volatile storage devices that store various programs, various parameters, etc. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., hard disks), and magnetic tapes.
[0021] In the following embodiments, a communication I / F (Interface) with a symbol is an interface including a communication processor, an antenna, etc. The communication I / F controls communication between multiple computers. Examples of communication standards applied to the communication I / F include wireless communication standards including 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), Bluetooth (registered trademark), etc.
[0022] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." In other words, "A and / or B" means that it may be only A, only B, or a combination of A and B. Furthermore, in this specification, the same concept as "A and / or B" is also applied when three or more things are expressed connected by "and / or."
[0023] [First embodiment]
[0024] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.
[0025] 1, a data processing system 10 includes a data processing device 12 and a smart device 14. An example of the data processing device 12 is a server.
[0026] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0027] The smart device 14 includes a computer 36, a reception device 38, an output device 40, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The reception device 38, the output device 40, and the camera 42 are also connected to the bus 52.
[0028] The reception device 38 includes a touch panel 38A, a microphone 38B, and the like, and receives user input. The touch panel 38A detects contact with an indicator (for example, a pen or a finger) to receive user input by the touch of the indicator. The microphone 38B detects the user's voice to receive user input by voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the data indicating the user input.
[0029] The output device 40 includes a display 40A and a speaker 40B, and presents data to the user 20 by outputting the data in a form of expression that the user 20 can perceive (for example, audio and / or text). The display 40A displays visible information such as text and images in accordance with instructions from the processor 46. The speaker 40B outputs audio in accordance with instructions from the processor 46. The camera 42 is a compact digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.
[0030] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 control the exchange of various information between the processor 46 and the processor 28 via the network 54.
[0031] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.
[0032] 2, in the data processing device 12, a specific process is performed by the processor 28. A specific processing program 56 is stored in the storage 32. The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific process is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0033] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0034] In the smart device 14, the processor 46 performs the reception output process. The storage 50 stores a reception output program 60. The reception output program 60 is used in conjunction with the specific processing program 56 by the data processing system 10. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0035] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0036] This invention is a system that predicts crime risk based on past crime data, weather data, and social trend data, and generates an optimal deployment plan for security forces based on that data. This system mainly consists of the following steps: data collection, data integration and preprocessing, AI model training and updating, crime risk prediction, generation of security force deployment plan, and notification of the results.
[0037] Data collection
[0038] The server first collects past crime data. Detailed information such as the date, location, and type of crime is obtained via API from databases held by police and security companies. Next, climate data such as temperature and precipitation is obtained from meteorological agencies, and trend data is also collected from social media analysis tools. In this way, a wide range of data is obtained.
[0039] Data Integration and Preprocessing
[0040] The server integrates the collected data and compiles it into a single format. First, it joins the data using a common key (usually a date) from each data source. For example, it might aggregate the number of crimes that occurred on a specific date, along with that day's temperature, precipitation, and related social media trend information, into a single dataset. It then performs preprocessing, such as filling in missing values, correcting outliers, and encoding categorical variables.
[0041] AI model training and updating
[0042] The server uses the preprocessed data to train a generative AI model for crime prediction. This can be done using machine learning or deep learning algorithms. For example, it uses random forests or neural networks to learn crime occurrence patterns from the data. After training is complete, the server evaluates the model's performance and adjusts its parameters as needed.
[0043] Crime risk prediction
[0044] The server uses the trained model to input new data and predict the crime risk in a specific area or time period. This prediction result is used as an indicator of the likelihood of a crime occurring in that area or time period.
[0045] Generate security force deployment plans
[0046] The server generates a specific security deployment plan based on the predicted crime risk, detailing where, how many guards should be deployed, and when. For example, areas predicted to be high risk may be planned to have more guards than usual.
[0047] Notification of results
[0048] The server then notifies the security company or police terminals of the generated security force deployment plan, which then receives the plan and provides specific deployment instructions to the security guards.
[0049] Specific examples
[0050] For example, to predict crime in City A for August, first collect crime data from the past few years for August, temperature and precipitation data for the area, and trend data on social media. After integrating and preprocessing this data, it is input into a generative AI model for training. Once the model has finished training, it predicts crime risk based on the new August data. As a result, it makes a plan to deploy additional security guards in areas where a high crime risk is predicted, and notifies the security company's terminal of this deployment plan. In this way, resources can be allocated efficiently and crime prevention effectiveness can be improved.
[0051] Through these steps, the present invention realizes crime prediction and optimal deployment of security forces, thereby contributing to the creation of a safe social environment.
[0052] The processing flow will be explained below.
[0053] Step 1: Data collection
[0054] The server first collects historical crime data, which is obtained via API from police and security company databases. The server then collects weather data, which is obtained via API from meteorological agencies and includes details such as temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data, which includes information such as the frequency of specific keywords and user sentiment analysis.
[0055] Step 2: Data integration and preprocessing
[0056] The server integrates the collected crime data, climate data, and social trend data. Specifically, each dataset is joined using a common key (e.g., date) and compiled into a single data frame. The server then performs preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data.
[0057] Step 3: Training and updating the AI model
[0058] The server uses the preprocessed data to train a machine learning model. For example, it uses random forests or neural networks to learn crime occurrence patterns from past data. The server then splits a portion of the training data into test data and evaluates the model's performance. After the evaluation, the server adjusts the model's parameters as necessary and retrains it.
[0059] Step 4: Predict crime risk
[0060] The server uses the trained model to input new data and predict the crime risk in a specific area and time period. The prediction results are output as a numerical value indicating the likelihood of a crime occurring in that area and time period. The server adds the prediction results to a data frame for use in the next processing step.
[0061] Step 5: Generate a security force deployment plan
[0062] The server generates a security force deployment plan based on the predicted crime risk. It creates a plan to deploy more security guards in high-risk areas and at high-risk times. Specifically, it takes into account the predicted crime risk and determines in detail how many security guards to deploy in which areas and at what times. The server creates a security force deployment plan based on this information and saves it in a database.
[0063] Step 6: Notification of results
[0064] The server notifies the security company or police terminal of the generated security force deployment plan. It uses an API to send details of the deployment plan in JSON format. The terminal analyzes the received deployment plan and prepares it for display.
[0065] Step 7: Display placement instructions
[0066] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[0067] Example 1
[0068] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0069] Currently, in order to develop optimal plans for crime prevention and the deployment of security forces, it is necessary to collect and analyze a large amount of data. However, it is difficult to integrate this data and make highly accurate predictions, and it is sometimes impossible to generate an efficient deployment plan for security forces. In particular, many variables are involved in predicting crime risk, and building a model that appropriately takes these into account is a challenge.
[0070] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0071] In this invention, the server includes: means for collecting historical crime data, means for collecting climate data, means for collecting social trend data, means for integrating the collected data using a common key to create a single dataset; means for performing preprocessing on the integrated dataset, such as filling in missing values, correcting outliers, and encoding categorical variables; means for training a generative AI model using a machine learning or deep learning algorithm using the integrated and preprocessed data; means for predicting crime risk in a specific area or time period using the trained generative AI model; means for generating a security force deployment plan based on the predicted crime risk; and means for notifying the user of the generated security force deployment plan. This enables the integration and preprocessing of complex data to perform highly accurate crime risk predictions, thereby enabling the generation of effective security force deployment plans.
[0072] "Historical crime data" refers to information about historically recorded crimes, such as the date, location, and type of crime.
[0073] "Climate data" refers to weather information for a specific region or period, such as temperature, precipitation, and wind speed.
[0074] "Social trend data" refers to information obtained from sources such as social media and news that indicates social interest and topics over a specific period of time.
[0075] "Integration" refers to the process of combining data from multiple data sources into a single data set using a common key.
[0076] "Preprocessing" refers to processes used to convert raw data into a format suitable for model training, such as imputing missing values, correcting outliers, and encoding categorical variables.
[0077] A "generative AI model" is a model that uses machine learning or deep learning algorithms to identify specific patterns or predictions from data.
[0078] "Crime risk prediction" refers to using a trained generative AI model to assess the likelihood of a crime occurring in a specific area or time period.
[0079] A "security force deployment plan" is a plan that determines in detail how many security guards will be deployed in which locations and at what times based on predicted crime risks.
[0080] "Notification" refers to transmitting the generated security force deployment plan to relevant agencies such as security companies and the police.
[0081] The present invention is a system that uses past crime data, weather data, and social trend data to predict crime risks and generate an optimal deployment plan for security forces based on the predictions. This system is implemented using the following hardware and software.
[0082] Hardware and software used
[0083] The system is implemented using the following major hardware and software:
[0084] Server: A server with high-performance computing power that collects, integrates, and preprocesses crime data, climate data, and social trend data, as well as trains and updates AI models and performs risk prediction.
[0085] Database: A relational database management system (RDBMS) for storing and managing data.
[0086] AI modeling tools: Tools for training machine learning and deep learning algorithms (e.g., TensorFlow, Scikit-learn).
[0087] API Interface: API for collecting crime data, climate data, and social trend data from external data sources.
[0088] Social Media Analytics Tools: Tools for collecting social trend data.
[0089] Program processing flow
[0090] The server first uses API interfaces to collect crime data from police and security company databases, then calls meteorological agencies' APIs to obtain weather data, and finally uses social media analytics tools to collect social trend data, which are then stored in a database.
[0091] To integrate the collected data, the server joins the data using a common key (usually a date) from each data source. For example, it might combine the number of crimes on a particular date, the temperature and precipitation for that day, and social media trend information. The server then performs preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables.
[0092] Using the preprocessed data, the server uses AI modeling tools to train a generative AI model using machine learning or deep learning algorithms (e.g., random forests, neural networks). After training is complete, the model's performance is evaluated and parameters are adjusted as needed.
[0093] The server then inputs new data sets (such as weather forecast data for the next month or the latest social media trends) into the model to predict the crime risk for a specific area and time period. This prediction indicates the likelihood of a crime occurring.
[0094] Based on the crime risk prediction results, the server generates a specific security force deployment plan, which includes a plan to deploy additional security guards in high-risk areas. The generated security force deployment plan is notified to the terminals of the security company and the police, which receive the plan and provide specific deployment instructions to the security guards.
[0095] Specific examples
[0096] For example, a prompt such as "Predict the crime risk in City A in August and generate an optimal security force deployment plan based on that risk" is input into the generative AI model. The server collects past crime data, weather data, and social media trend data, integrates and preprocesses it, and then trains the AI model. Based on the new data, the crime risk for August is predicted, and a plan is made to increase the number of security guards in high-risk areas. This deployment plan is then notified to the security company's terminal, which issues specific deployment instructions to the security guards.
[0097] This series of processes is expected to result in efficient allocation of security resources and improved crime prevention.
[0098] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0099] Step 1: Data collection
[0100] The server first connects to police and security company databases and collects past crime data via API. This includes detailed information such as the date, location, and type of crime. It then calls the API of a meteorological agency to obtain climate data such as temperature and precipitation for a specific area. It also uses social media analysis tools to collect social trend data for a specific area and period. This data is then stored in a data store within the server.
[0101] Inputs: Police and security company databases, weather agency APIs, social media analytics tools
[0102] Output: Historical crime data, climate data, social trend data
[0103] Step 2: Data integration
[0104] The server integrates the data collected from each data source using a common key (date). For example, it can combine the number of crimes on a specific date, the temperature and precipitation for that day, and social media trend information into a single dataset. This allows information obtained from different data sources to be centralized and consistent.
[0105] Inputs: Historical crime data, climate data, social trend data
[0106] Output: Unified dataset
[0107] Step 3: Data Preprocessing
[0108] The server performs preprocessing on the merged dataset. It imputes missing values using a method such as mean imputation, corrects outliers by detecting and correcting extremely high temperature values, and encodes categorical variables by converting strings to numbers. This prepares the data in a format suitable for model training.
[0109] Input: Unified dataset
[0110] Output: Preprocessed dataset
[0111] Step 4: Training the AI model
[0112] The server uses the preprocessed dataset to train a generative AI model using machine learning or deep learning algorithms, such as random forests or neural networks, to learn crime occurrence patterns from the data. Once training is complete, the server evaluates the model's performance and adjusts hyperparameters as needed.
[0113] Input: Preprocessed dataset
[0114] Output: Trained AI model
[0115] Step 5: Predict crime risk
[0116] The server uses the trained AI model to input new data sets and predict the crime risk in specific areas and times of day, which in turn indicates areas and times when crimes are likely to occur.
[0117] Input: Trained AI model, new dataset (such as next month's weather forecast data or the latest social media trends)
[0118] Output: Crime risk prediction results
[0119] Step 6: Generate a security force deployment plan
[0120] The server generates a security deployment plan based on the predicted crime risk, detailing how many guards should be deployed in which locations and at what times. For example, it might plan to deploy more guards than usual in areas predicted to be high risk.
[0121] Input: Crime risk prediction results
[0122] Output: Security Force Deployment Plan
[0123] Step 7: Notification of results
[0124] The server notifies the security company and police terminals of the generated security force deployment plan. Upon receiving this notification, the terminals issue specific deployment instructions to security guards, allowing them to be deployed efficiently at the designated locations and times.
[0125] Input: Security Force Deployment Plan
[0126] Output: Placement instruction notification
[0127] Through the above steps, complex data can be integrated and preprocessed, crime risk predictions can be made with high accuracy, and effective security force deployment plans can be generated.
[0128] (Application example 1)
[0129] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0130] Conventional security systems formulate security plans based only on past crime data and static data, making it difficult to respond to dynamically changing crime risks. Furthermore, because security guard deployment plans are not updated in real time, it is difficult to allocate resources appropriately. Furthermore, because feedback from the field is not reflected in security plans, it is difficult to constantly adapt to the latest situations.
[0131] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0132] In this invention, the server includes means for collecting historical crime data, means for collecting climate data, means for collecting social trend data, means for integrating and preprocessing the collected data, means for predicting crime risk based on the integrated and preprocessed data, means for generating a security force deployment plan based on the predicted crime risk, means for notifying the user of the generated security force deployment plan, means for displaying the crime risk in real time, and means for collecting on-site information from security guards and using it to improve the accuracy of the AI model. This makes it possible to respond to dynamically changing crime risks and appropriately deploy resources in real time. Furthermore, the accuracy of the AI model can be improved based on feedback from the field, allowing for the development of security plans that can always adapt to the latest situations.
[0133] "Past crime data" refers to detailed information held by the police and security companies, such as the date, location, and type of crime.
[0134] "Climate data" refers to information about weather conditions such as temperature and precipitation.
[0135] "Social trend data" refers to information about topics and trends on social media and the internet.
[0136] "Integrating and preprocessing" refers to the process of consolidating multiple collected data into one format, filling in missing values, and correcting outliers.
[0137] "Predicting crime risk" refers to using generative AI models to assess the likelihood of crime occurring in a specific area or time period.
[0138] A "security force deployment plan" refers to a plan that determines how many security guards should be deployed in which locations based on predicted crime risks.
[0139] "Notifying" refers to informing security companies and relevant parties of the generated security force deployment plan in real time.
[0140] "Displaying crime risk in real time" refers to instantly visualizing current crime risk on a map or interface.
[0141] "Collecting on-site information from security guards" means feeding back information obtained by security guards on-site into the system and using it as learning data for the AI model.
[0142] "Improving the accuracy of AI models" refers to using on-site information from security guards and newly collected data to improve the AI model's ability to predict crime risks.
[0143] This invention is a system that predicts crime risks based on past crime data, weather data, and social trend data, and then generates optimal deployment plans for security forces based on that data. This system functions through collaboration between servers, terminals, and users.
[0144] Hardware and software used
[0145] Hardware: Servers, users' smartphones
[0146] Software: Python, Requests (library for processing API requests), Geopy (library for processing geographic data), learning model (e.g., random forest)
[0147] Specific processing of the system
[0148] Data collection and preprocessing:
[0149] First, the server collects historical crime data, weather data, and social trend data. These data are obtained via APIs. Specifically, crime data is obtained from police and security company databases, weather data from meteorological agencies, and trend data from social media analysis tools.
[0150] These data are integrated and compiled into a single format, and the integrated data undergoes preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables.
[0151] Crime risk prediction:
[0152] Using the preprocessed data, the server trains a generative AI model, which is trained using random forests and neural networks. The trained model is then used to predict crime risk in specific areas and time periods based on new data.
[0153] Generate security force deployment plan:
[0154] Based on the predicted crime risk, the server generates a security deployment plan, detailing where, how many guards should be deployed, and when. For example, areas predicted to be high risk may be planned to have more guards than usual.
[0155] Real-time notifications and displays:
[0156] The server then notifies the user of the generated security deployment plan via their smartphone, where the user can view the current crime risk on a map in real time and take appropriate action based on the security deployment plan.
[0157] Feedback and learning model updates:
[0158] The user (security guard) feeds information from the scene back to the server via smartphone. The server collects this scene information and uses it to improve the accuracy of the generative AI model. This feedback function allows the creation of security plans that can always adapt to the latest situations.
[0159] Examples:
[0160] For example, to predict crime in City A for August, crime data from August over the past few years, temperature and precipitation data for the area, and trend data on social media are collected. After integrating and preprocessing this data, it is input into a generative AI model for training. Once the model has finished training, it predicts crime risk based on the new August data. As a result, it makes a plan to deploy additional security guards in areas where a high crime risk is predicted, and notifies the security company's terminal of this deployment plan. In this way, resources can be allocated efficiently and crime prevention effectiveness can be improved.
[0161] Example prompt sentence:
[0162] "Enter the following dataset into a generative AI model and predict the risk of crime in Tokyo in August. The dataset includes crime data from the past five years, climate data (temperature, precipitation, etc.), and social media trend data."
[0163] This makes it possible to flexibly respond to dynamically changing crime risks and allocate appropriate resources in real time. Furthermore, the accuracy of the AI model can be improved based on feedback from the field, allowing for the formulation of security plans that can always adapt to the latest situations.
[0164] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0165] Step 1:
[0166] The server collects historical crime data, weather data, and social trend data. Each piece of data is obtained via API. Specifically, crime data is obtained from police and security company databases, weather data is obtained from meteorological agencies, and trend data is collected from social media analysis tools. The input is each piece of data obtained from the API, and the output is the raw data before integration.
[0167] Step 2:
[0168] The server integrates and preprocesses the collected data. Specifically, it combines data using a common key (usually a date) from each data source. For example, it aggregates the number of crimes that occurred on a specific date with that day's temperature, precipitation, and related trend information on social media into a single dataset. It then performs preprocessing such as filling in missing values, correcting outliers, and encoding categorical variables. The input is the collected raw data, and the output is a preprocessed integrated dataset.
[0169] Step 3:
[0170] The server uses the preprocessed data to train a generative AI model for crime prediction. This uses machine learning and deep learning algorithms, and training is performed using random forests and neural networks. The input is the preprocessed dataset, and the output is a trained AI model. Specifically, the data is input into the algorithm and the model parameters are optimized.
[0171] Step 4:
[0172] The server uses the trained generative AI model to input new data and predict crime risk in specific areas and time periods. This prediction is used as an indicator of the likelihood of crime occurring in those areas and time periods. The inputs are current crime, weather, and trend data, and the output is a predicted crime risk for each area and time period.
[0173] Step 5:
[0174] The server generates a specific security force deployment plan based on the predicted crime risk. This plan details how many security guards should be deployed in which locations and at what times. The input is the predicted crime risk, and the output is a detailed security force deployment plan. Specifically, the server performs calculations to deploy more security guards in areas predicted to be high risk.
[0175] Step 6:
[0176] The server notifies the security company or police terminal of the generated security force deployment plan. The terminal receives this and gives specific deployment instructions to the security guards. The input is the security force deployment plan, and the output is a notification message. Specifically, the server sends a message to the terminal via a notification API.
[0177] Step 7:
[0178] Security guards (users) provide feedback from the scene to the server via devices such as smartphones. The server collects this scene information and uses it to improve the accuracy of the generative AI model. The input is feedback information from the scene, and the output is an updated AI model. Specifically, the feedback information is processed and added to the training data for the AI model.
[0179] Furthermore, an emotion engine that estimates the user's emotion may be combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59 and perform identification processing using the user's emotion.
[0180] This invention is a system that combines historical crime data, weather data, and social trend data with an emotion engine that recognizes user emotions, predicts crime risk, and generates an optimal deployment plan for security forces based on that. This system is composed of data collection, data integration and preprocessing, AI model training and updating, crime risk prediction, generation of security force deployment plans, and notification of the results, as well as an additional step of collecting emotion data using the emotion engine.
[0181] Data collection
[0182] The server first collects historical crime data, which is obtained through APIs from police and security company databases. The server then collects weather data, which is obtained through APIs from meteorological agencies and includes details such as temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data, which includes information such as the frequency of specific keywords and user sentiment analysis.
[0183] Collecting Emotional Data
[0184] The server uses an emotion engine to collect user emotion data, which is obtained from, for example, social media posts, forums, news comments, etc., and quantifies the user's emotional state (e.g., anger, joy, anxiety, etc.).
[0185] Data Integration and Preprocessing
[0186] The server integrates collected historical crime data, climate data, social trend data, and sentiment data. First, each dataset is joined using a common key (e.g., date) to create a single data frame. The server then performs preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data.
[0187] AI model training and updating
[0188] The server uses the preprocessed data to train a machine learning model. For example, it uses random forests or neural networks to learn crime occurrence patterns from past data. The server then splits a portion of the training data into test data and evaluates the model's performance. After the evaluation, the server adjusts the model's parameters as necessary and retrains it.
[0189] Crime risk prediction
[0190] The server uses the trained model to input new data and predict the crime risk in a specific area and time period. The prediction results are output as a numerical value indicating the likelihood of a crime occurring in that area and time period. Furthermore, user emotional data is also taken into account to verify how the emotional data affects the crime risk. The server adds the prediction results to a data frame and uses them in the next processing step.
[0191] Generate security force deployment plans
[0192] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy more security guards in high-risk areas and at high-risk times. It also takes emotional data into account to include deployment instructions and warnings for security guards. Specifically, it takes into account the predicted crime risk and emotional data to determine in detail how many security guards to deploy in which areas and at what times. The server creates a security force deployment plan based on this information and stores it in a database.
[0193] Notification of results
[0194] The server notifies the security company and police terminals of the generated security force deployment plan. Using an API, it sends the deployment plan details in JSON format. The terminals then analyze the received deployment plan and prepare it for display.
[0195] Display placement instructions
[0196] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[0197] Specific examples
[0198] For example, to predict crime in City A for August, we first collect crime data from August over the past few years, temperature and precipitation data for the area, and social media trend data. We then collect user emotion data, integrate these data, preprocess them, and input them into a generative AI model for training. Once the model has completed training, it predicts crime risk based on the new August data. As a result, a plan is made to deploy additional security guards in areas predicted to have a high crime risk, and this deployment plan is notified to the security company's terminal. This allows for efficient resource allocation and improved crime prevention. Furthermore, by utilizing emotion data and responding sensitively to users' emotional states, we can achieve more accurate crime predictions and countermeasures.
[0199] Through these steps, the present invention realizes crime prediction and optimal deployment of security forces, thereby contributing to the creation of a safe social environment.
[0200] The processing flow will be explained below.
[0201] Step 1: Data collection
[0202] The server first collects past crime data. This is obtained via API from police and security company databases. For example, this includes information such as the date and location of the crime, the type of crime, and the amount of damage. The server also collects weather data. This is obtained via API from meteorological agencies and includes details such as daily temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data. This includes the frequency of specific keywords and user sentiment analysis.
[0203] Step 2: Collecting emotion data
[0204] The server uses an emotion engine to collect user emotion data. This emotion data is obtained from text data such as social media posts, forums, and news comments, and the emotion engine analyzes it to quantify the user's emotional state (e.g., anger, joy, anxiety, etc.). This allows us to understand emotional trends by region.
[0205] Step 3: Data integration and preprocessing
[0206] The server integrates the collected historical crime data, weather data, social trend data, and sentiment data. Specifically, each dataset is joined using a common key (e.g., date, region) and compiled into a single data frame. It then performs preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables (numeric conversion). For example, missing temperature data can be imputed by estimating it from data from surrounding dates.
[0207] Step 4: Training and updating the AI model
[0208] The server uses the preprocessed data to train a machine learning model. For example, a random forest or neural network can be used. The model is first trained using the training data, and then its performance is evaluated using test data. Metrics such as accuracy, recall, and precision are used for evaluation. If necessary, the model parameters are adjusted and retrained.
[0209] Step 5: Predict crime risk
[0210] The server uses the trained AI model to predict crime risk in specific areas and time periods. It inputs newly collected data (past crime data, weather data, social trend data, and emotion data) into the model and outputs a numerical value representing the risk of crime. The server adds these prediction results to a data frame for use in the next step.
[0211] Step 6: Generate a security force deployment plan
[0212] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy more security guards in areas and time periods predicted to be high risk. Specifically, it determines the number of security guards and deployment times for each area based on the predicted crime risk value. It also takes into account emotional data, aiming to strengthen security in areas where emotions are particularly high.
[0213] Step 7: Notification of results
[0214] The server notifies the security company or police terminal of the generated security force deployment plan. Using an API, it sends the deployment plan details in JSON format. The terminal receives it and parses it appropriately.
[0215] Step 8: View placement instructions
[0216] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[0217] Example 2
[0218] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0219] Conventional crime prediction systems predict risk using past crime data, weather data, etc., but because they do not take into account social trends or user emotional data, there are limitations to the accuracy of predictions and they are difficult to adapt to actual situations. In addition, security force deployment plans based on prediction results are not fully optimized, making it difficult to deploy security forces effectively.
[0220] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0221] In this invention, the server includes means for collecting past crime data, means for collecting weather data, means for collecting social trend data, means for collecting user emotion data, means for integrating and preprocessing the collected data, means for predicting crime risk using a generative AI model based on the integrated and preprocessed data, means for generating a security force deployment plan based on the prediction results, means for notifying the generated security force deployment plan, and means for displaying the notified security force deployment plan on a terminal. This enables highly accurate crime risk prediction based on the integrated data and optimal security force deployment plans that take social conditions and emotion data into consideration.
[0222] "Past crime data" refers to information about crimes that have occurred in the past that is recorded in databases of the police, security companies, etc.
[0223] "Climate data" is information about weather conditions over a certain period of time, such as temperature, precipitation, and wind speed.
[0224] "Social trend data" is information collected from social media and news sources about the frequency and impact of topics and events over a specific period of time.
[0225] "User emotion data" is information that quantifies a user's emotional state (e.g., anger, joy, anxiety, etc.) collected from social media posts, news comments, etc.
[0226] "Data integration and preprocessing" refers to combining the various collected data using a common key and compiling it into a single data frame, and then performing preprocessing such as filling in missing values, correcting outliers, and converting categorical variables into numeric values.
[0227] A "generative AI model" refers to a mathematical model with artificial intelligence that is trained using machine learning and deep learning techniques to predict crime risk.
[0228] "Crime risk prediction" involves using a trained generative AI model to calculate the numerical probability of a crime occurring in a specific area or time period based on new data.
[0229] A "security force deployment plan" refers to a plan that determines how many security forces to deploy in high-risk areas and during high-risk times based on the results of crime risk predictions.
[0230] "Notification" refers to the act of sending the generated security force deployment plan to security company or police terminals via API.
[0231] "Display on terminal" means displaying the locations and times of security guard deployment on a map using a user interface that visually shows the security force deployment plan received from the server.
[0232] The present invention provides a system that combines past crime data, weather data, social trend data, and user emotion data to predict the risk of crime and generate an optimal security force deployment plan. A specific embodiment of the present invention will now be described.
[0233] The server first collects past crime data from police and security company databases using APIs. For example, it calls a police database API to obtain crime records from the past five years. It also uses a meteorological agency's API to collect detailed climate data such as temperature, precipitation, and wind speed, and obtains past weather patterns for specific cities and regions. It also uses social media analysis tools to collect the frequency of specific keywords and hashtag trends from social media such as Twitter and Facebook.
[0234] Next, the server uses an emotion engine to collect user emotion data. This is obtained in real time from social media posts and news comments, and uses an emotion analysis API (e.g., IBM Watson or Google Cloud Natural Language) to classify user posts into emotional states such as "anger," "joy," and "anxiety." For example, if the hashtag "feeling anxious" is frequently used, the emotional state of that region is added to the data as "anxiety."
[0235] The server combines this collected data using a common key (e.g., date or region) and integrates it into a single data frame. It then estimates and fills in missing values in the data frame using surrounding data, and detects and corrects outliers. For example, if there is missing temperature data, it fills in the missing data with the average temperature data for the preceding and following dates. It also formats categorical variables into a format that is easy to convert to numbers. For example, it converts weather data such as "sunny" and "rainy" into numerical data such as "1" and "0."
[0236] The server uses the preprocessed data to train a machine learning model. Examples of models include random forests and neural networks. This makes it possible to learn crime occurrence patterns from past data and predict future crime risks. The dataset is divided into a training set and a test set, and the model's performance is evaluated. For example, 80% of the training data is used for learning, and the remaining 20% is used for testing. Based on the model's evaluation indicators (e.g., precision and recall), the model's hyperparameters are adjusted and the model is trained again.
[0237] The server inputs new data using the trained generative AI model and numerically predicts the crime risk for a specific area and time period. For example, it inputs weather and trend data for the next month into the model and outputs a crime risk score. It also adjusts the risk score based on user emotion data. For example, if anger is increasing in area A, the risk score for that area is increased.
[0238] The server then generates a security force deployment plan based on the predicted crime risk. It creates a plan to deploy more security guards in high-risk areas and at high-risk times. For example, in areas with a predicted risk score of 80 or higher, it deploys twice the usual number of security guards. This makes it possible to reduce the possibility of crime occurring in areas with increased risk. The generated deployment plan is saved in a database.
[0239] The server then notifies the security company and police terminals of the generated security force deployment plan via API. The deployment plan is sent in JSON format, and the receiving terminal analyzes and displays the data. For example, it may contain details such as "Area A: 10 personnel deployed on August 1st" and "Area B: 5 personnel deployed on August 2nd."
[0240] The device displays the security force deployment plan received from the server through a user interface, visually communicating specific deployment instructions to security guards and personnel. For example, the locations of security guards can be color-coded and marked on a map, along with the time of deployment. The device receives the latest deployment plan in real time and updates it as needed. The device's notification function can be used to quickly communicate deployment changes and additional instructions.
[0241] Specific examples
[0242] For example, the steps to create a crime forecast and police deployment plan for City A in August are as follows:
[0243] 1. The server uses the police database API to collect crime data for August for the past few years.
[0244] 2. The server uses the weather agency's API to collect past temperature and precipitation data for City A.
[0245] 3. The server uses the Twitter API to collect the frequency of occurrence of keywords such as "summer" and "public safety" related to City A, as well as user sentiment data.
[0246] 4. The server aggregates and preprocesses this data into a single data frame using a common key (e.g., date or region).
[0247] 5. The server trains and evaluates a random forest model using the preprocessed data.
[0248] 6. The server uses the trained model to predict the crime risk for the following August and identifies areas and times of high risk.
[0249] 7. The server generates a security guard deployment plan for high-risk areas and notifies the security company's terminal of details such as "Area A: 10 guards deployed on August 1st" and "Area B: 5 guards deployed on August 2nd."
[0250] 8. The terminal displays the received deployment plan on a map, visually providing specific deployment instructions to the security guard.
[0251] Prompt Sentence Examples
[0252] "Predict crime in City A for August and plan the deployment of security guards based on the results."
[0253] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0254] Step 1:
[0255] The server uses APIs to collect past crime data from police and security company databases. Specifically, it sends an API request to retrieve crime records from the past five years. The input to this step is the API request, and the output is JSON-formatted data received as past crime data. This data includes the date, time, location, type, and details of the crime.
[0256] Step 2:
[0257] The server uses the weather agency's API to collect detailed climate data such as temperature, precipitation, and wind speed. Specifically, it retrieves climate data for a specific city or region for the past few years via an API request. The input for this step is the API request, and the output is the received climate data in JSON format. This data includes temperature, precipitation, wind speed, etc. for each date.
[0258] Step 3:
[0259] The server uses social media analysis tools to collect social trend data, including the frequency of specific keywords and user sentiment analysis. Specifically, it uses APIs such as Twitter and Facebook to obtain the frequency and trends of keywords such as "summer" and "public safety." The input for this step is an API request and a list of specific keywords, and the output is JSON-formatted data including the frequency of keyword appearances and user sentiment.
[0260] Step 4:
[0261] The server uses an emotion engine to collect user emotion data. Specifically, data collected from social media posts and news comments is input into an emotion analysis API (e.g., IBM Watson or Google Cloud Natural Language) to quantify the user's emotional state. The input for this step is the user's posted data, and the output is a quantified emotional state.
[0262] Step 5:
[0263] The server integrates historical crime data, climate data, social trend data, and sentiment data using a common key (e.g., date or region). Specifically, each dataset is joined and compiled into a single data frame. The input to this step is each dataset to be integrated, and the output is an integrated data frame. After integration, preprocessing is performed, such as filling in missing values, correcting outliers, and converting categorical variables to numeric values.
[0264] Step 6:
[0265] The server trains a generative AI model using the preprocessed data. Specifically, it uses a random forest or neural network model, splitting the data into training and test datasets for learning. The input for this step is the preprocessed data frame, and the output is a trained generative AI model. The performance of the trained model is evaluated, and hyperparameters are adjusted and retrained as necessary.
[0266] Step 7:
[0267] The server uses the trained generative AI model to predict crime risk in specific areas and time periods based on new data. Specifically, new weather and trend data is input into the model to calculate a crime risk score. The input for this step is new weather and trend data, and the output is a prediction result including a risk score. Furthermore, the risk score is adjusted based on emotion data.
[0268] Step 8:
[0269] The server generates a security force deployment plan based on the predicted crime risk. Specifically, it creates a plan to deploy more security guards in high-risk areas and at high-risk times. For example, in areas with a risk score of 80 or higher, it deploys twice the usual number of security guards. The input to this step is the predicted risk score, and the output is a security force deployment plan. The generated deployment plan is saved in a database.
[0270] Step 9:
[0271] The server notifies the security company and police terminals of the generated security force deployment plan via API. Specifically, it sends data containing details of the deployment plan in JSON format. The input of this step is the generated deployment plan, and the output is the notified deployment plan.
[0272] Step 10:
[0273] The terminal displays the security force deployment plan received from the server through a user interface. Specifically, it marks the deployment locations of security guards on a map and displays them along with the deployment time. The input of this step is the notified deployment plan, and the output is a visually displayed deployment instruction. The terminal receives the latest deployment plan in real time and updates it as needed.
[0274] (Application example 2)
[0275] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0276] Conventional security systems could predict crime risks by utilizing past crime data, weather data, and social trend data, but because they did not take into account user emotional data, the accuracy of risk predictions was insufficient. Furthermore, there was a lack of means to appropriately notify security guards of predicted risk information in real time and effectively deploy security personnel. Furthermore, notification methods were limited, often making it difficult to respond immediately on-site. Therefore, there is a need to build a system that can improve the accuracy of crime prevention and enable immediate response.
[0277] The identification processing by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for collecting past crime data, means for collecting weather data, means for collecting social trend data, and means for collecting user emotion data. This realizes a system including means for integrating and preprocessing the collected data, means for predicting crime risk based on the integrated and preprocessed data, means for generating a security force deployment plan based on the predicted crime risk, means for notifying the generated security force deployment plan, and means for displaying the notified security force deployment plan on a smart device. This enables highly accurate crime risk prediction in real time and rapid and appropriate security force deployment.
[0278] "Past crime data" is detailed information about crimes that have occurred in the past recorded by police agencies and security companies.
[0279] "Climate data" refers to detailed weather information such as temperature, precipitation, and wind speed provided by meteorological agencies.
[0280] "Social trend data" is information such as the frequency of occurrence of specific keywords or topics, and user interests, collected from social media, news sites, etc.
[0281] "User emotion data" is information that quantifies a user's emotional state (e.g., anger, joy, anxiety, etc.) collected from social media posts, news comments, forums, etc.
[0282] "Means for integrating and preprocessing data" refers to methods for combining different types of collected data into a single data frame, completing missing values, correcting outliers, and converting categorical variables into numeric values.
[0283] The "means for predicting crime risk" is a method that uses a machine learning model based on integrated and preprocessed data to output a numerical value indicating the likelihood of a crime occurring in a specific area or time period.
[0284] The "means for generating a security force deployment plan" is a method for specifically determining the deployment of security personnel in high-risk areas and time periods based on the predicted crime risk.
[0285] The "means for notifying the security force deployment plan" is a method for sending the generated security force deployment plan to a terminal of a security company or police, and conveying deployment instructions to the person in charge.
[0286] A "smart device" is a portable electronic device that can connect to the Internet and install applications, and examples include smart glasses and smartphones.
[0287] A "generative AI model" is a machine learning algorithm trained on historical data that is used to predict crime risk.
[0288] The system for implementing this invention integrates past crime data, weather data, social trend data, and user emotion data to predict crime risks and generate effective deployment plans for security forces. Specific examples are described below.
[0289] The system mainly consists of a server, smart devices (e.g., smart glasses, smartphones), and an API for data collection. The server has the following means:
[0290] Hardware and software used
[0291] Hardware:
[0292] Server (e.g. AWS EC2)
[0293] Smart devices (e.g., smart glasses, smartphones)
[0294] software:
[0295] Data Collection API
[0296] Data integration tools (Pandas, NumPy)
[0297] Machine learning libraries (e.g. TensorFlow, PyTorch)
[0298] Sentiment analysis engine (e.g. Azure Cognitive Services Emotion API)
[0299] Notification system (Firebase Cloud Messaging)
[0300] Step 1: Data collection
[0301] The server first collects historical crime data, weather data, social trend data, and user sentiment data through APIs, which are obtained in real time or periodically from their respective sources (police agencies, meteorological agencies, social media analysis tools, etc.).
[0302] Step 2: Data integration and preprocessing
[0303] The server aggregates the different types of collected datasets into a single data frame by using a common key (e.g., date), and performs preprocessing using Pandas and NumPy, such as imputing missing values, correcting outliers, and converting categorical variables to numeric values.
[0304] Step 3: Training and updating the AI model
[0305] The server uses the preprocessed data to train machine learning models. It uses TensorFlow and PyTorch to train random forests and neural networks to create crime risk prediction models. After evaluating the model's performance, it adjusts parameters and retrains it as needed.
[0306] Step 4: Predict crime risk
[0307] The trained model is used to predict crime risk in specific areas and time periods. New data is input and a risk assessment is performed. User emotional data is also taken into account to analyze how emotional state affects the risk of crime.
[0308] Step 5: Generate a security force deployment plan
[0309] The server generates a security force deployment plan based on the predicted crime risk, deploying additional security personnel in high-risk areas and during high-risk times, including analyzing the emotion data to create a more effective deployment plan.
[0310] Step 6: Notification of results
[0311] The generated security force deployment plan is sent from the server to the security company and police terminals, and details of the deployment plan are sent to smart devices using Firebase Cloud Messaging.
[0312] Step 7: View placement instructions
[0313] The deployment plan is then displayed on the smart device's HUD (head-up display), allowing security guards to check risk areas and security instructions in real time, enabling them to respond quickly.
[0314] Specific examples
[0315] If an area in City X is judged to be at increased risk of crime, the server generates instructions to deploy additional security guards in that area. The server makes predictions by integrating past crime data, weather information, social media trends, and user emotion data. For example, if emotions such as "anger" or "anxiety" are rising in a particular area, the crime risk in that area may increase. Based on this information, an optimal security force deployment plan is generated and notified to smart devices.
[0316] Prompt Sentence Examples
[0317] An example prompt for predicting crime risk using new data is:
[0318] import requests
[0319] import pandas as pd
[0320] from sklearn.model_selection import train_test_split
[0321] from sklearn.ensemble import RandomForestClassifier
[0322] import tensorflow as tf
[0323] Step 1: Data collection
[0324] crime_data = requests.get('https: / / api.example.com / crime_data').json()
[0325] climate_data = requests.get('https: / / api.weatherapi.com / v1 / current.json?key=YOUR_API_KEY&q=Tokyo').json()
[0326] social_trend_data = requests.get('https: / / api.socialmedia.com / trends').json()
[0327] emotion_data = requests.get('https: / / api.azure.com / emotion').json()
[0328] Step 2: Data integration and preprocessing
[0329] df_crime = pd.DataFrame(crime_data)
[0330] df_climate = pd.DataFrame(climate_data)
[0331] df_social_trend = pd.DataFrame(social_trend_data)
[0332] df_emotion = pd.DataFrame(emotion_data)
[0333] merged_data = df_crime.merge(df_climate, on='date').merge(df_social_trend, on='date').merge(df_emotion, on='date')
[0334] Missing value imputation and preprocessing
[0335] merged_data.fillna(method='ffill', inplace=True)
[0336] Step 3: Training and updating the AI model
[0337] X = merged_data.drop(columns=['crime_risk'])
[0338] y = merged_data['crime_risk']
[0339] X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
[0340] clf = RandomForestClassifier()
[0341] clf.fit(X_train, y_train)
[0342] Step 4: Real-time crime risk prediction and display
[0343] def predict_crime_risk(new_data):
[0344] risk = clf.predict(new_data)
[0345] return risk
[0346] Notifications on smart glasses
[0347] def notify_to_smart_glass(risk_area, risk_level):
[0348] Notifications using Firebase Cloud Messaging
[0349] placeholder code
[0350] print(f"Area: {risk_area}, Risk Level: {risk_level}")
[0351] The server periodically retrieves new data and updates the model.
[0352] Prompt statement
[0353] new_data = pd.DataFrame([{
[0354] 'temp': 30,
[0355] 'rain': 5,
[0356] 'wind': 3,
[0357] 'social_trend': 7,
[0358] 'emotion': 'anxiety'
[0359] }])
[0360] risk = predict_crime_risk(new_data)
[0361] if risk > 0.7:
[0362] notify_to_smart_glass('Area1', risk)
[0363] In this way, the server can integrate various data to generate highly accurate crime risk predictions and security force deployment plans. Security guards can receive information in real time using devices such as smart glasses, enabling them to respond quickly and effectively.
[0364] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0365] Step 1: Data collection
[0366] The server first collects historical crime data, weather data, social trend data, and user sentiment data through APIs. Specifically, the server obtains crime data from the police agency's API and weather data from the meteorological agency's API. It then obtains social trend data using a social media analysis tool and collects user sentiment data using a sentiment analysis engine. The raw data obtained from the API is used as input, and an unprocessed dataset is obtained as output.
[0367] Step 2: Data integration and preprocessing
[0368] The server integrates the different types of collected datasets using a common key (e.g., date) and stores them in a single data frame. It uses Pandas and NumPy to perform preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data. The input is a variety of raw datasets, and the output is a preprocessed integrated data frame.
[0369] Step 3: Training and updating the AI model
[0370] The server uses the preprocessed data to train a machine learning model. It uses TensorFlow and PyTorch to train a random forest or neural network to create a crime risk prediction model. After evaluating the model's performance, it adjusts parameters and retrains as necessary. The input is the preprocessed integrated data frame, and the output is a trained AI model.
[0371] Step 4: Predict crime risk
[0372] The server uses the trained AI model to predict crime risk in a specific area and time period based on new data. It inputs a new dataset and obtains a risk score output from the model. It also incorporates user sentiment data to further refine the risk assessment. The input is a new raw dataset, and the output is a crime risk score.
[0373] Step 5: Generate a security force deployment plan
[0374] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy additional security personnel in high-risk areas and during high-risk times. It also incorporates the results of emotion data analysis to create a more effective deployment plan. The input is a crime risk score, and the output is a security force deployment plan.
[0375] Step 6: Notification of results
[0376] The server notifies the security company and police terminals of the generated security force deployment plan. Firebase Cloud Messaging is used to notify smart devices of the deployment plan details. The input is the security force deployment plan, and the output is a notification message.
[0377] Step 7: Display placement instructions
[0378] The terminal displays the notified security force deployment plan on the smart device's HUD (head-up display). Security guards can check risk areas and security instructions in real time, enabling them to respond quickly. The input is the notification message, and the output is the deployment instructions displayed on the HUD.
[0379] The specific processing unit 290 transmits the result of the specific processing to the smart device 14. In the smart device 14, the control unit 46A causes the output device 40 to output the result of the specific processing. The microphone 38B acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0380] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0381] In the above embodiment, an example in which the specific process is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific process may be performed by the smart device 14.
[0382] [Second embodiment]
[0383] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.
[0384] 3, the data processing system 210 includes the data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.
[0385] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0386] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, and the camera 42 are also connected to the bus 52.
[0387] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0388] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0389] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0390] Fig. 4 shows an example of the main functions of the data processing device 12 and the smart glasses 214. As shown in Fig. 4, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0391] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0392] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0393] In the smart glasses 214, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0394] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the smart glasses 214 will be referred to as the "terminal."
[0395] This invention is a system that predicts crime risk based on past crime data, weather data, and social trend data, and generates an optimal deployment plan for security forces based on that data. This system mainly consists of the following steps: data collection, data integration and preprocessing, AI model training and updating, crime risk prediction, generation of security force deployment plan, and notification of the results.
[0396] Data collection
[0397] The server first collects past crime data. Detailed information such as the date, location, and type of crime is obtained via API from databases held by police and security companies. Next, climate data such as temperature and precipitation is obtained from meteorological agencies, and trend data is also collected from social media analysis tools. In this way, a wide range of data is obtained.
[0398] Data Integration and Preprocessing
[0399] The server integrates the collected data and compiles it into a single format. First, it joins the data using a common key (usually a date) from each data source. For example, it might aggregate the number of crimes that occurred on a specific date, along with that day's temperature, precipitation, and related social media trend information, into a single dataset. It then performs preprocessing, such as filling in missing values, correcting outliers, and encoding categorical variables.
[0400] AI model training and updating
[0401] The server uses the preprocessed data to train a generative AI model for crime prediction. This can be done using machine learning or deep learning algorithms. For example, it uses random forests or neural networks to learn crime occurrence patterns from the data. After training is complete, the server evaluates the model's performance and adjusts its parameters as needed.
[0402] Crime risk prediction
[0403] The server uses the trained model to input new data and predict the crime risk in a specific area or time period. This prediction result is used as an indicator of the likelihood of a crime occurring in that area or time period.
[0404] Generate security force deployment plans
[0405] The server generates a specific security deployment plan based on the predicted crime risk, detailing where, how many guards should be deployed, and when. For example, areas predicted to be high risk may be planned to have more guards than usual.
[0406] Notification of results
[0407] The server then notifies the security company or police terminals of the generated security force deployment plan, which then receives the plan and provides specific deployment instructions to the security guards.
[0408] Specific examples
[0409] For example, to predict crime in City A for August, first collect crime data from the past few years for August, temperature and precipitation data for the area, and trend data on social media. After integrating and preprocessing this data, it is input into a generative AI model for training. Once the model has finished training, it predicts crime risk based on the new August data. As a result, it makes a plan to deploy additional security guards in areas where a high crime risk is predicted, and notifies the security company's terminal of this deployment plan. In this way, resources can be allocated efficiently and crime prevention effectiveness can be improved.
[0410] Through these steps, the present invention realizes crime prediction and optimal deployment of security forces, thereby contributing to the creation of a safe social environment.
[0411] The processing flow will be explained below.
[0412] Step 1: Data collection
[0413] The server first collects historical crime data, which is obtained via API from police and security company databases. The server then collects weather data, which is obtained via API from meteorological agencies and includes details such as temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data, which includes information such as the frequency of specific keywords and user sentiment analysis.
[0414] Step 2: Data integration and preprocessing
[0415] The server integrates the collected crime data, climate data, and social trend data. Specifically, each dataset is joined using a common key (e.g., date) and compiled into a single data frame. The server then performs preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data.
[0416] Step 3: Training and updating the AI model
[0417] The server uses the preprocessed data to train a machine learning model. For example, it uses random forests or neural networks to learn crime occurrence patterns from past data. The server then splits a portion of the training data into test data and evaluates the model's performance. After the evaluation, the server adjusts the model's parameters as necessary and retrains it.
[0418] Step 4: Predict crime risk
[0419] The server uses the trained model to input new data and predict the crime risk in a specific area and time period. The prediction results are output as a numerical value indicating the likelihood of a crime occurring in that area and time period. The server adds the prediction results to a data frame for use in the next processing step.
[0420] Step 5: Generate a security force deployment plan
[0421] The server generates a security force deployment plan based on the predicted crime risk. It creates a plan to deploy more security guards in high-risk areas and at high-risk times. Specifically, it takes into account the predicted crime risk and determines in detail how many security guards to deploy in which areas and at what times. The server creates a security force deployment plan based on this information and saves it in a database.
[0422] Step 6: Notification of results
[0423] The server notifies the security company or police terminal of the generated security force deployment plan. It uses an API to send details of the deployment plan in JSON format. The terminal analyzes the received deployment plan and prepares it for display.
[0424] Step 7: Display placement instructions
[0425] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[0426] Example 1
[0427] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0428] Currently, in order to develop optimal plans for crime prevention and the deployment of security forces, it is necessary to collect and analyze a large amount of data. However, it is difficult to integrate this data and make highly accurate predictions, and it is sometimes impossible to generate an efficient deployment plan for security forces. In particular, many variables are involved in predicting crime risk, and building a model that appropriately takes these into account is a challenge.
[0429] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0430] In this invention, the server includes: means for collecting historical crime data, means for collecting climate data, means for collecting social trend data, means for integrating the collected data using a common key to create a single dataset; means for performing preprocessing on the integrated dataset, such as filling in missing values, correcting outliers, and encoding categorical variables; means for training a generative AI model using a machine learning or deep learning algorithm using the integrated and preprocessed data; means for predicting crime risk in a specific area or time period using the trained generative AI model; means for generating a security force deployment plan based on the predicted crime risk; and means for notifying the user of the generated security force deployment plan. This enables the integration and preprocessing of complex data to perform highly accurate crime risk predictions, thereby enabling the generation of effective security force deployment plans.
[0431] "Historical crime data" refers to information about historically recorded crimes, such as the date, location, and type of crime.
[0432] "Climate data" refers to weather information for a specific region or period, such as temperature, precipitation, and wind speed.
[0433] "Social trend data" refers to information obtained from sources such as social media and news that indicates social interest and topics over a specific period of time.
[0434] "Integration" refers to the process of combining data from multiple data sources into a single data set using a common key.
[0435] "Preprocessing" refers to processes used to convert raw data into a format suitable for model training, such as imputing missing values, correcting outliers, and encoding categorical variables.
[0436] A "generative AI model" is a model that uses machine learning or deep learning algorithms to identify specific patterns or predictions from data.
[0437] "Crime risk prediction" refers to using a trained generative AI model to assess the likelihood of a crime occurring in a specific area or time period.
[0438] A "security force deployment plan" is a plan that determines in detail how many security guards will be deployed in which locations and at what times based on predicted crime risks.
[0439] "Notification" refers to transmitting the generated security force deployment plan to relevant agencies such as security companies and the police.
[0440] The present invention is a system that uses past crime data, weather data, and social trend data to predict crime risks and generate an optimal deployment plan for security forces based on the predictions. This system is implemented using the following hardware and software.
[0441] Hardware and software used
[0442] The system is implemented using the following major hardware and software:
[0443] Server: A server with high-performance computing power that collects, integrates, and preprocesses crime data, climate data, and social trend data, as well as trains and updates AI models and performs risk prediction.
[0444] Database: A relational database management system (RDBMS) for storing and managing data.
[0445] AI modeling tools: Tools for training machine learning and deep learning algorithms (e.g., TensorFlow, Scikit-learn).
[0446] API Interface: API for collecting crime data, climate data, and social trend data from external data sources.
[0447] Social Media Analytics Tools: Tools for collecting social trend data.
[0448] Program processing flow
[0449] The server first uses API interfaces to collect crime data from police and security company databases, then calls meteorological agencies' APIs to obtain weather data, and finally uses social media analytics tools to collect social trend data, which are then stored in a database.
[0450] To integrate the collected data, the server joins the data using a common key (usually a date) from each data source. For example, it might combine the number of crimes on a particular date, the temperature and precipitation for that day, and social media trend information. The server then performs preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables.
[0451] Using the preprocessed data, the server uses AI modeling tools to train a generative AI model using machine learning or deep learning algorithms (e.g., random forests, neural networks). After training is complete, the model's performance is evaluated and parameters are adjusted as needed.
[0452] The server then inputs new data sets (such as weather forecast data for the next month or the latest social media trends) into the model to predict the crime risk for a specific area and time period. This prediction indicates the likelihood of a crime occurring.
[0453] Based on the crime risk prediction results, the server generates a specific security force deployment plan, which includes a plan to deploy additional security guards in high-risk areas. The generated security force deployment plan is notified to the terminals of the security company and the police, which receive the plan and provide specific deployment instructions to the security guards.
[0454] Specific examples
[0455] For example, a prompt such as "Predict the crime risk in City A in August and generate an optimal security force deployment plan based on that risk" is input into the generative AI model. The server collects past crime data, weather data, and social media trend data, integrates and preprocesses it, and then trains the AI model. Based on the new data, the crime risk for August is predicted, and a plan is made to increase the number of security guards in high-risk areas. This deployment plan is then notified to the security company's terminal, which issues specific deployment instructions to the security guards.
[0456] This series of processes is expected to result in efficient allocation of security resources and improved crime prevention.
[0457] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0458] Step 1: Data collection
[0459] The server first connects to police and security company databases and collects past crime data via API. This includes detailed information such as the date, location, and type of crime. It then calls the API of a meteorological agency to obtain climate data such as temperature and precipitation for a specific area. It also uses social media analysis tools to collect social trend data for a specific area and period. This data is then stored in a data store within the server.
[0460] Inputs: Police and security company databases, weather agency APIs, social media analytics tools
[0461] Output: Historical crime data, climate data, social trend data
[0462] Step 2: Data integration
[0463] The server integrates the data collected from each data source using a common key (date). For example, it can combine the number of crimes on a specific date, the temperature and precipitation for that day, and social media trend information into a single dataset. This allows information obtained from different data sources to be centralized and consistent.
[0464] Inputs: Historical crime data, climate data, social trend data
[0465] Output: Unified dataset
[0466] Step 3: Data Preprocessing
[0467] The server performs preprocessing on the merged dataset. It imputes missing values using a method such as mean imputation, corrects outliers by detecting and correcting extremely high temperature values, and encodes categorical variables by converting strings to numbers. This prepares the data in a format suitable for model training.
[0468] Input: Unified dataset
[0469] Output: Preprocessed dataset
[0470] Step 4: Training the AI model
[0471] The server uses the preprocessed dataset to train a generative AI model using machine learning or deep learning algorithms, such as random forests or neural networks, to learn crime occurrence patterns from the data. Once training is complete, the server evaluates the model's performance and adjusts hyperparameters as needed.
[0472] Input: Preprocessed dataset
[0473] Output: Trained AI model
[0474] Step 5: Predict crime risk
[0475] The server uses the trained AI model to input new data sets and predict the crime risk in specific areas and times of day, which in turn indicates areas and times when crimes are likely to occur.
[0476] Input: Trained AI model, new dataset (such as next month's weather forecast data or the latest social media trends)
[0477] Output: Crime risk prediction results
[0478] Step 6: Generate a security force deployment plan
[0479] The server generates a security deployment plan based on the predicted crime risk, detailing how many guards should be deployed in which locations and at what times. For example, it might plan to deploy more guards than usual in areas predicted to be high risk.
[0480] Input: Crime risk prediction results
[0481] Output: Security Force Deployment Plan
[0482] Step 7: Notification of results
[0483] The server notifies the security company and police terminals of the generated security force deployment plan. Upon receiving this notification, the terminals issue specific deployment instructions to security guards, allowing them to be deployed efficiently at the designated locations and times.
[0484] Input: Security Force Deployment Plan
[0485] Output: Placement instruction notification
[0486] Through the above steps, complex data can be integrated and preprocessed, crime risk predictions can be made with high accuracy, and effective security force deployment plans can be generated.
[0487] (Application example 1)
[0488] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0489] Conventional security systems formulate security plans based only on past crime data and static data, making it difficult to respond to dynamically changing crime risks. Furthermore, because security guard deployment plans are not updated in real time, it is difficult to allocate resources appropriately. Furthermore, because feedback from the field is not reflected in security plans, it is difficult to constantly adapt to the latest situations.
[0490] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0491] In this invention, the server includes means for collecting historical crime data, means for collecting climate data, means for collecting social trend data, means for integrating and preprocessing the collected data, means for predicting crime risk based on the integrated and preprocessed data, means for generating a security force deployment plan based on the predicted crime risk, means for notifying the user of the generated security force deployment plan, means for displaying the crime risk in real time, and means for collecting on-site information from security guards and using it to improve the accuracy of the AI model. This makes it possible to respond to dynamically changing crime risks and appropriately deploy resources in real time. Furthermore, the accuracy of the AI model can be improved based on feedback from the field, allowing for the development of security plans that can always adapt to the latest situations.
[0492] "Past crime data" refers to detailed information held by the police and security companies, such as the date, location, and type of crime.
[0493] "Climate data" refers to information about weather conditions such as temperature and precipitation.
[0494] "Social trend data" refers to information about topics and trends on social media and the internet.
[0495] "Integrating and preprocessing" refers to the process of consolidating multiple collected data into one format, filling in missing values, and correcting outliers.
[0496] "Predicting crime risk" refers to using generative AI models to assess the likelihood of crime occurring in a specific area or time period.
[0497] A "security force deployment plan" refers to a plan that determines how many security guards should be deployed in which locations based on predicted crime risks.
[0498] "Notifying" refers to informing security companies and relevant parties of the generated security force deployment plan in real time.
[0499] "Displaying crime risk in real time" refers to instantly visualizing current crime risk on a map or interface.
[0500] "Collecting on-site information from security guards" means feeding back information obtained by security guards on-site into the system and using it as learning data for the AI model.
[0501] "Improving the accuracy of AI models" refers to using on-site information from security guards and newly collected data to improve the AI model's ability to predict crime risks.
[0502] This invention is a system that predicts crime risks based on past crime data, weather data, and social trend data, and then generates optimal deployment plans for security forces based on that data. This system functions through collaboration between servers, terminals, and users.
[0503] Hardware and software used
[0504] Hardware: Servers, users' smartphones
[0505] Software: Python, Requests (library for processing API requests), Geopy (library for processing geographic data), learning model (e.g., random forest)
[0506] Specific processing of the system
[0507] Data collection and preprocessing:
[0508] First, the server collects historical crime data, weather data, and social trend data. These data are obtained via APIs. Specifically, crime data is obtained from police and security company databases, weather data from meteorological agencies, and trend data from social media analysis tools.
[0509] These data are integrated and compiled into a single format, and the integrated data undergoes preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables.
[0510] Crime risk prediction:
[0511] Using the preprocessed data, the server trains a generative AI model, which is trained using random forests and neural networks. The trained model is then used to predict crime risk in specific areas and time periods based on new data.
[0512] Generate security force deployment plan:
[0513] Based on the predicted crime risk, the server generates a security deployment plan, detailing where, how many guards should be deployed, and when. For example, areas predicted to be high risk may be planned to have more guards than usual.
[0514] Real-time notifications and displays:
[0515] The server then notifies the user of the generated security deployment plan via their smartphone, where the user can view the current crime risk on a map in real time and take appropriate action based on the security deployment plan.
[0516] Feedback and learning model updates:
[0517] The user (security guard) feeds information from the scene back to the server via smartphone. The server collects this scene information and uses it to improve the accuracy of the generative AI model. This feedback function allows the creation of security plans that can always adapt to the latest situations.
[0518] Examples:
[0519] For example, to predict crime in City A for August, crime data from August over the past few years, temperature and precipitation data for the area, and trend data on social media are collected. After integrating and preprocessing this data, it is input into a generative AI model for training. Once the model has finished training, it predicts crime risk based on the new August data. As a result, it makes a plan to deploy additional security guards in areas where a high crime risk is predicted, and notifies the security company's terminal of this deployment plan. In this way, resources can be allocated efficiently and crime prevention effectiveness can be improved.
[0520] Example prompt sentence:
[0521] "Enter the following dataset into a generative AI model and predict the risk of crime in Tokyo in August. The dataset includes crime data from the past five years, climate data (temperature, precipitation, etc.), and social media trend data."
[0522] This makes it possible to flexibly respond to dynamically changing crime risks and allocate appropriate resources in real time. Furthermore, the accuracy of the AI model can be improved based on feedback from the field, allowing for the formulation of security plans that can always adapt to the latest situations.
[0523] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0524] Step 1:
[0525] The server collects historical crime data, weather data, and social trend data. Each piece of data is obtained via API. Specifically, crime data is obtained from police and security company databases, weather data is obtained from meteorological agencies, and trend data is collected from social media analysis tools. The input is each piece of data obtained from the API, and the output is the raw data before integration.
[0526] Step 2:
[0527] The server integrates and preprocesses the collected data. Specifically, it combines data using a common key (usually a date) from each data source. For example, it aggregates the number of crimes that occurred on a specific date with that day's temperature, precipitation, and related trend information on social media into a single dataset. It then performs preprocessing such as filling in missing values, correcting outliers, and encoding categorical variables. The input is the collected raw data, and the output is a preprocessed integrated dataset.
[0528] Step 3:
[0529] The server uses the preprocessed data to train a generative AI model for crime prediction. This uses machine learning and deep learning algorithms, and training is performed using random forests and neural networks. The input is the preprocessed dataset, and the output is a trained AI model. Specifically, the data is input into the algorithm and the model parameters are optimized.
[0530] Step 4:
[0531] The server uses the trained generative AI model to input new data and predict crime risk in specific areas and time periods. This prediction is used as an indicator of the likelihood of crime occurring in those areas and time periods. The inputs are current crime, weather, and trend data, and the output is a predicted crime risk for each area and time period.
[0532] Step 5:
[0533] The server generates a specific security force deployment plan based on the predicted crime risk. This plan details how many security guards should be deployed in which locations and at what times. The input is the predicted crime risk, and the output is a detailed security force deployment plan. Specifically, the server performs calculations to deploy more security guards in areas predicted to be high risk.
[0534] Step 6:
[0535] The server notifies the security company or police terminal of the generated security force deployment plan. The terminal receives this and gives specific deployment instructions to the security guards. The input is the security force deployment plan, and the output is a notification message. Specifically, the server sends a message to the terminal via a notification API.
[0536] Step 7:
[0537] Security guards (users) provide feedback from the scene to the server via devices such as smartphones. The server collects this scene information and uses it to improve the accuracy of the generative AI model. The input is feedback information from the scene, and the output is an updated AI model. Specifically, the feedback information is processed and added to the training data for the AI model.
[0538] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0539] This invention is a system that combines historical crime data, weather data, and social trend data with an emotion engine that recognizes user emotions, predicts crime risk, and generates an optimal deployment plan for security forces based on that. This system is composed of data collection, data integration and preprocessing, AI model training and updating, crime risk prediction, generation of security force deployment plans, and notification of the results, as well as an additional step of collecting emotion data using the emotion engine.
[0540] Data collection
[0541] The server first collects historical crime data, which is obtained through APIs from police and security company databases. The server then collects weather data, which is obtained through APIs from meteorological agencies and includes details such as temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data, which includes information such as the frequency of specific keywords and user sentiment analysis.
[0542] Collecting Emotional Data
[0543] The server uses an emotion engine to collect user emotion data, which is obtained from, for example, social media posts, forums, news comments, etc., and quantifies the user's emotional state (e.g., anger, joy, anxiety, etc.).
[0544] Data Integration and Preprocessing
[0545] The server integrates collected historical crime data, climate data, social trend data, and sentiment data. First, each dataset is joined using a common key (e.g., date) to create a single data frame. The server then performs preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data.
[0546] AI model training and updating
[0547] The server uses the preprocessed data to train a machine learning model. For example, it uses random forests or neural networks to learn crime occurrence patterns from past data. The server then splits a portion of the training data into test data and evaluates the model's performance. After the evaluation, the server adjusts the model's parameters as necessary and retrains it.
[0548] Crime risk prediction
[0549] The server uses the trained model to input new data and predict the crime risk in a specific area and time period. The prediction results are output as a numerical value indicating the likelihood of a crime occurring in that area and time period. Furthermore, user emotional data is also taken into account to verify how the emotional data affects the crime risk. The server adds the prediction results to a data frame and uses them in the next processing step.
[0550] Generate security force deployment plans
[0551] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy more security guards in high-risk areas and at high-risk times. It also takes emotional data into account to include deployment instructions and warnings for security guards. Specifically, it takes into account the predicted crime risk and emotional data to determine in detail how many security guards to deploy in which areas and at what times. The server creates a security force deployment plan based on this information and stores it in a database.
[0552] Notification of results
[0553] The server notifies the security company and police terminals of the generated security force deployment plan. Using an API, it sends the deployment plan details in JSON format. The terminals then analyze the received deployment plan and prepare it for display.
[0554] Display placement instructions
[0555] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[0556] Specific examples
[0557] For example, to predict crime in City A for August, we first collect crime data from August over the past few years, temperature and precipitation data for the area, and social media trend data. We then collect user emotion data, integrate these data, preprocess them, and input them into a generative AI model for training. Once the model has completed training, it predicts crime risk based on the new August data. As a result, a plan is made to deploy additional security guards in areas predicted to have a high crime risk, and this deployment plan is notified to the security company's terminal. This allows for efficient resource allocation and improved crime prevention. Furthermore, by utilizing emotion data and responding sensitively to users' emotional states, we can achieve more accurate crime predictions and countermeasures.
[0558] Through these steps, the present invention realizes crime prediction and optimal deployment of security forces, thereby contributing to the creation of a safe social environment.
[0559] The processing flow will be explained below.
[0560] Step 1: Data collection
[0561] The server first collects past crime data. This is obtained via API from police and security company databases. For example, this includes information such as the date and location of the crime, the type of crime, and the amount of damage. The server also collects weather data. This is obtained via API from meteorological agencies and includes details such as daily temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data. This includes the frequency of specific keywords and user sentiment analysis.
[0562] Step 2: Collecting emotion data
[0563] The server uses an emotion engine to collect user emotion data. This emotion data is obtained from text data such as social media posts, forums, and news comments, and the emotion engine analyzes it to quantify the user's emotional state (e.g., anger, joy, anxiety, etc.). This allows us to understand emotional trends by region.
[0564] Step 3: Data integration and preprocessing
[0565] The server integrates the collected historical crime data, weather data, social trend data, and sentiment data. Specifically, each dataset is joined using a common key (e.g., date, region) and compiled into a single data frame. It then performs preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables (numeric conversion). For example, missing temperature data can be imputed by estimating it from data from surrounding dates.
[0566] Step 4: Training and updating the AI model
[0567] The server uses the preprocessed data to train a machine learning model. For example, a random forest or neural network can be used. The model is first trained using the training data, and then its performance is evaluated using test data. Metrics such as accuracy, recall, and precision are used for evaluation. If necessary, the model parameters are adjusted and retrained.
[0568] Step 5: Predict crime risk
[0569] The server uses the trained AI model to predict crime risk in specific areas and time periods. It inputs newly collected data (past crime data, weather data, social trend data, and emotion data) into the model and outputs a numerical value representing the risk of crime. The server adds these prediction results to a data frame for use in the next step.
[0570] Step 6: Generate a security force deployment plan
[0571] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy more security guards in areas and time periods predicted to be high risk. Specifically, it determines the number of security guards and deployment times for each area based on the predicted crime risk value. It also takes into account emotional data, aiming to strengthen security in areas where emotions are particularly high.
[0572] Step 7: Notification of results
[0573] The server notifies the security company or police terminal of the generated security force deployment plan. Using an API, it sends the deployment plan details in JSON format. The terminal receives it and parses it appropriately.
[0574] Step 8: View placement instructions
[0575] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[0576] Example 2
[0577] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0578] Conventional crime prediction systems predict risk using past crime data, weather data, etc., but because they do not take into account social trends or user emotional data, there are limitations to the accuracy of predictions and they are difficult to adapt to actual situations. In addition, security force deployment plans based on prediction results are not fully optimized, making it difficult to deploy security forces effectively.
[0579] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0580] In this invention, the server includes means for collecting past crime data, means for collecting weather data, means for collecting social trend data, means for collecting user emotion data, means for integrating and preprocessing the collected data, means for predicting crime risk using a generative AI model based on the integrated and preprocessed data, means for generating a security force deployment plan based on the prediction results, means for notifying the generated security force deployment plan, and means for displaying the notified security force deployment plan on a terminal. This enables highly accurate crime risk prediction based on the integrated data and optimal security force deployment plans that take social conditions and emotion data into consideration.
[0581] "Past crime data" refers to information about crimes that have occurred in the past that is recorded in databases of the police, security companies, etc.
[0582] "Climate data" is information about weather conditions over a certain period of time, such as temperature, precipitation, and wind speed.
[0583] "Social trend data" is information collected from social media and news sources about the frequency and impact of topics and events over a specific period of time.
[0584] "User emotion data" is information that quantifies a user's emotional state (e.g., anger, joy, anxiety, etc.) collected from social media posts, news comments, etc.
[0585] "Data integration and preprocessing" refers to combining the various collected data using a common key and compiling it into a single data frame, and then performing preprocessing such as filling in missing values, correcting outliers, and converting categorical variables into numeric values.
[0586] A "generative AI model" refers to a mathematical model with artificial intelligence that is trained using machine learning and deep learning techniques to predict crime risk.
[0587] "Crime risk prediction" involves using a trained generative AI model to calculate the numerical probability of a crime occurring in a specific area or time period based on new data.
[0588] A "security force deployment plan" refers to a plan that determines how many security forces to deploy in high-risk areas and during high-risk times based on the results of crime risk predictions.
[0589] "Notification" refers to the act of sending the generated security force deployment plan to security company or police terminals via API.
[0590] "Display on terminal" means displaying the locations and times of security guard deployment on a map using a user interface that visually shows the security force deployment plan received from the server.
[0591] The present invention provides a system that combines past crime data, weather data, social trend data, and user emotion data to predict the risk of crime and generate an optimal security force deployment plan. A specific embodiment of the present invention will now be described.
[0592] The server first collects past crime data from police and security company databases using APIs. For example, it calls a police database API to obtain crime records from the past five years. It also uses a meteorological agency's API to collect detailed climate data such as temperature, precipitation, and wind speed, and obtains past weather patterns for specific cities and regions. It also uses social media analysis tools to collect the frequency of specific keywords and hashtag trends from social media such as Twitter and Facebook.
[0593] Next, the server uses an emotion engine to collect user emotion data. This is obtained in real time from social media posts and news comments, and uses an emotion analysis API (e.g., IBM Watson or Google Cloud Natural Language) to classify user posts into emotional states such as "anger," "joy," and "anxiety." For example, if the hashtag "feeling anxious" is frequently used, the emotional state of that region is added to the data as "anxiety."
[0594] The server combines this collected data using a common key (e.g., date or region) and integrates it into a single data frame. It then estimates and fills in missing values in the data frame using surrounding data, and detects and corrects outliers. For example, if there is missing temperature data, it fills in the missing data with the average temperature data for the preceding and following dates. It also formats categorical variables into a format that is easy to convert to numbers. For example, it converts weather data such as "sunny" and "rainy" into numerical data such as "1" and "0."
[0595] The server uses the preprocessed data to train a machine learning model. Examples of models include random forests and neural networks. This makes it possible to learn crime occurrence patterns from past data and predict future crime risks. The dataset is divided into a training set and a test set, and the model's performance is evaluated. For example, 80% of the training data is used for learning, and the remaining 20% is used for testing. Based on the model's evaluation indicators (e.g., precision and recall), the model's hyperparameters are adjusted and the model is trained again.
[0596] The server inputs new data using the trained generative AI model and numerically predicts the crime risk for a specific area and time period. For example, it inputs weather and trend data for the next month into the model and outputs a crime risk score. It also adjusts the risk score based on user emotion data. For example, if anger is increasing in area A, the risk score for that area is increased.
[0597] The server then generates a security force deployment plan based on the predicted crime risk. It creates a plan to deploy more security guards in high-risk areas and at high-risk times. For example, in areas with a predicted risk score of 80 or higher, it deploys twice the usual number of security guards. This makes it possible to reduce the possibility of crime occurring in areas with increased risk. The generated deployment plan is saved in a database.
[0598] The server then notifies the security company and police terminals of the generated security force deployment plan via API. The deployment plan is sent in JSON format, and the receiving terminal analyzes and displays the data. For example, it may contain details such as "Area A: 10 personnel deployed on August 1st" and "Area B: 5 personnel deployed on August 2nd."
[0599] The device displays the security force deployment plan received from the server through a user interface, visually communicating specific deployment instructions to security guards and personnel. For example, the locations of security guards can be color-coded and marked on a map, along with the time of deployment. The device receives the latest deployment plan in real time and updates it as needed. The device's notification function can be used to quickly communicate deployment changes and additional instructions.
[0600] Specific examples
[0601] For example, the steps to create a crime forecast and police deployment plan for City A in August are as follows:
[0602] 1. The server uses the police database API to collect crime data for August for the past few years.
[0603] 2. The server uses the weather agency's API to collect past temperature and precipitation data for City A.
[0604] 3. The server uses the Twitter API to collect the frequency of occurrence of keywords such as "summer" and "public safety" related to City A, as well as user sentiment data.
[0605] 4. The server aggregates and preprocesses this data into a single data frame using a common key (e.g., date or region).
[0606] 5. The server trains and evaluates a random forest model using the preprocessed data.
[0607] 6. The server uses the trained model to predict the crime risk for the following August and identifies areas and times of high risk.
[0608] 7. The server generates a security guard deployment plan for high-risk areas and notifies the security company's terminal of details such as "Area A: 10 guards deployed on August 1st" and "Area B: 5 guards deployed on August 2nd."
[0609] 8. The terminal displays the received deployment plan on a map, visually providing specific deployment instructions to the security guard.
[0610] Prompt Sentence Examples
[0611] "Predict crime in City A for August and plan the deployment of security guards based on the results."
[0612] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0613] Step 1:
[0614] The server uses APIs to collect past crime data from police and security company databases. Specifically, it sends an API request to retrieve crime records from the past five years. The input to this step is the API request, and the output is JSON-formatted data received as past crime data. This data includes the date, time, location, type, and details of the crime.
[0615] Step 2:
[0616] The server uses the weather agency's API to collect detailed climate data such as temperature, precipitation, and wind speed. Specifically, it retrieves climate data for a specific city or region for the past few years via an API request. The input for this step is the API request, and the output is the received climate data in JSON format. This data includes temperature, precipitation, wind speed, etc. for each date.
[0617] Step 3:
[0618] The server uses social media analysis tools to collect social trend data, including the frequency of specific keywords and user sentiment analysis. Specifically, it uses APIs such as Twitter and Facebook to obtain the frequency and trends of keywords such as "summer" and "public safety." The input for this step is an API request and a list of specific keywords, and the output is JSON-formatted data including the frequency of keyword appearances and user sentiment.
[0619] Step 4:
[0620] The server uses an emotion engine to collect user emotion data. Specifically, data collected from social media posts and news comments is input into an emotion analysis API (e.g., IBM Watson or Google Cloud Natural Language) to quantify the user's emotional state. The input for this step is the user's posted data, and the output is a quantified emotional state.
[0621] Step 5:
[0622] The server integrates historical crime data, climate data, social trend data, and sentiment data using a common key (e.g., date or region). Specifically, each dataset is joined and compiled into a single data frame. The input to this step is each dataset to be integrated, and the output is an integrated data frame. After integration, preprocessing is performed, such as filling in missing values, correcting outliers, and converting categorical variables to numeric values.
[0623] Step 6:
[0624] The server trains a generative AI model using the preprocessed data. Specifically, it uses a random forest or neural network model, splitting the data into training and test datasets for learning. The input for this step is the preprocessed data frame, and the output is a trained generative AI model. The performance of the trained model is evaluated, and hyperparameters are adjusted and retrained as necessary.
[0625] Step 7:
[0626] The server uses the trained generative AI model to predict crime risk in specific areas and time periods based on new data. Specifically, new weather and trend data is input into the model to calculate a crime risk score. The input for this step is new weather and trend data, and the output is a prediction result including a risk score. Furthermore, the risk score is adjusted based on emotion data.
[0627] Step 8:
[0628] The server generates a security force deployment plan based on the predicted crime risk. Specifically, it creates a plan to deploy more security guards in high-risk areas and at high-risk times. For example, in areas with a risk score of 80 or higher, it deploys twice the usual number of security guards. The input to this step is the predicted risk score, and the output is a security force deployment plan. The generated deployment plan is saved in a database.
[0629] Step 9:
[0630] The server notifies the security company and police terminals of the generated security force deployment plan via API. Specifically, it sends data containing details of the deployment plan in JSON format. The input of this step is the generated deployment plan, and the output is the notified deployment plan.
[0631] Step 10:
[0632] The terminal displays the security force deployment plan received from the server through a user interface. Specifically, it marks the deployment locations of security guards on a map and displays them along with the deployment time. The input of this step is the notified deployment plan, and the output is a visually displayed deployment instruction. The terminal receives the latest deployment plan in real time and updates it as needed.
[0633] (Application example 2)
[0634] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0635] Conventional security systems could predict crime risks by utilizing past crime data, weather data, and social trend data, but because they did not take into account user emotional data, the accuracy of risk predictions was insufficient. Furthermore, there was a lack of means to appropriately notify security guards of predicted risk information in real time and effectively deploy security personnel. Furthermore, notification methods were limited, often making it difficult to respond immediately on-site. Therefore, there is a need to build a system that can improve the accuracy of crime prevention and enable immediate response.
[0636] The identification processing by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for collecting past crime data, means for collecting weather data, means for collecting social trend data, and means for collecting user emotion data. This realizes a system including means for integrating and preprocessing the collected data, means for predicting crime risk based on the integrated and preprocessed data, means for generating a security force deployment plan based on the predicted crime risk, means for notifying the generated security force deployment plan, and means for displaying the notified security force deployment plan on a smart device. This enables highly accurate crime risk prediction in real time and rapid and appropriate security force deployment.
[0637] "Past crime data" is detailed information about crimes that have occurred in the past recorded by police agencies and security companies.
[0638] "Climate data" refers to detailed weather information such as temperature, precipitation, and wind speed provided by meteorological agencies.
[0639] "Social trend data" is information such as the frequency of occurrence of specific keywords or topics, and user interests, collected from social media, news sites, etc.
[0640] "User emotion data" is information that quantifies a user's emotional state (e.g., anger, joy, anxiety, etc.) collected from social media posts, news comments, forums, etc.
[0641] "Means for integrating and preprocessing data" refers to methods for combining different types of collected data into a single data frame, completing missing values, correcting outliers, and converting categorical variables into numeric values.
[0642] The "means for predicting crime risk" is a method that uses a machine learning model based on integrated and preprocessed data to output a numerical value indicating the likelihood of a crime occurring in a specific area or time period.
[0643] The "means for generating a security force deployment plan" is a method for specifically determining the deployment of security personnel in high-risk areas and time periods based on the predicted crime risk.
[0644] The "means for notifying the security force deployment plan" is a method for sending the generated security force deployment plan to a terminal of a security company or police, and conveying deployment instructions to the person in charge.
[0645] A "smart device" is a portable electronic device that can connect to the Internet and install applications, and examples include smart glasses and smartphones.
[0646] A "generative AI model" is a machine learning algorithm trained on historical data that is used to predict crime risk.
[0647] The system for implementing this invention integrates past crime data, weather data, social trend data, and user emotion data to predict crime risks and generate effective deployment plans for security forces. Specific examples are described below.
[0648] The system mainly consists of a server, smart devices (e.g., smart glasses, smartphones), and an API for data collection. The server has the following means:
[0649] Hardware and software used
[0650] Hardware:
[0651] Server (e.g. AWS EC2)
[0652] Smart devices (e.g., smart glasses, smartphones)
[0653] software:
[0654] Data Collection API
[0655] Data integration tools (Pandas, NumPy)
[0656] Machine learning libraries (e.g. TensorFlow, PyTorch)
[0657] Sentiment analysis engine (e.g. Azure Cognitive Services Emotion API)
[0658] Notification system (Firebase Cloud Messaging)
[0659] Step 1: Data collection
[0660] The server first collects historical crime data, weather data, social trend data, and user sentiment data through APIs, which are obtained in real time or periodically from their respective sources (police agencies, meteorological agencies, social media analysis tools, etc.).
[0661] Step 2: Data integration and preprocessing
[0662] The server aggregates the different types of collected datasets into a single data frame by using a common key (e.g., date), and performs preprocessing using Pandas and NumPy, such as imputing missing values, correcting outliers, and converting categorical variables to numeric values.
[0663] Step 3: Training and updating the AI model
[0664] The server uses the preprocessed data to train machine learning models. It uses TensorFlow and PyTorch to train random forests and neural networks to create crime risk prediction models. After evaluating the model's performance, it adjusts parameters and retrains it as needed.
[0665] Step 4: Predict crime risk
[0666] The trained model is used to predict crime risk in specific areas and time periods. New data is input and a risk assessment is performed. User emotional data is also taken into account to analyze how emotional state affects the risk of crime.
[0667] Step 5: Generate a security force deployment plan
[0668] The server generates a security force deployment plan based on the predicted crime risk, deploying additional security personnel in high-risk areas and during high-risk times, including analyzing the emotion data to create a more effective deployment plan.
[0669] Step 6: Notification of results
[0670] The generated security force deployment plan is sent from the server to the security company and police terminals, and details of the deployment plan are sent to smart devices using Firebase Cloud Messaging.
[0671] Step 7: View placement instructions
[0672] The deployment plan is then displayed on the smart device's HUD (head-up display), allowing security guards to check risk areas and security instructions in real time, enabling them to respond quickly.
[0673] Specific examples
[0674] If an area in City X is judged to be at increased risk of crime, the server generates instructions to deploy additional security guards in that area. The server makes predictions by integrating past crime data, weather information, social media trends, and user emotion data. For example, if emotions such as "anger" or "anxiety" are rising in a particular area, the crime risk in that area may increase. Based on this information, an optimal security force deployment plan is generated and notified to smart devices.
[0675] Prompt Sentence Examples
[0676] An example prompt for predicting crime risk using new data is:
[0677] import requests
[0678] import pandas as pd
[0679] from sklearn.model_selection import train_test_split
[0680] from sklearn.ensemble import RandomForestClassifier
[0681] import tensorflow as tf
[0682] Step 1: Data Collection
[0683] crime_data = requests.get('https: / / api.example.com / crime_data').json()
[0684] climate_data = requests.get('https: / / api.weatherapi.com / v1 / current.json?key=YOUR_API_KEY&q=Tokyo').json()
[0685] social_trend_data = requests.get('https: / / api.socialmedia.com / trends').json()
[0686] emotion_data = requests.get('https: / / api.azure.com / emotion').json()
[0687] Step 2: Data integration and preprocessing
[0688] df_crime = pd.DataFrame(crime_data)
[0689] df_climate = pd.DataFrame(climate_data)
[0690] df_social_trend = pd.DataFrame(social_trend_data)
[0691] df_emotion = pd.DataFrame(emotion_data)
[0692] merged_data = df_crime.merge(df_climate, on='date').merge(df_social_trend, on='date').merge(df_emotion, on='date')
[0693] Missing value imputation and preprocessing
[0694] merged_data.fillna(method='ffill', inplace=True)
[0695] Step 3: Training and updating the AI model
[0696] X = merged_data.drop(columns=['crime_risk'])
[0697] y = merged_data['crime_risk']
[0698] X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
[0699] clf = RandomForestClassifier()
[0700] clf.fit(X_train, y_train)
[0701] Step 4: Real-time crime risk prediction and display
[0702] def predict_crime_risk(new_data):
[0703] risk = clf.predict(new_data)
[0704] return risk
[0705] Notifications on smart glasses
[0706] def notify_to_smart_glass(risk_area, risk_level):
[0707] Notifications using Firebase Cloud Messaging
[0708] placeholder code
[0709] print(f"Area: {risk_area}, Risk Level: {risk_level}")
[0710] The server periodically retrieves new data and updates the model.
[0711] Prompt statement
[0712] new_data = pd.DataFrame([{
[0713] 'temp': 30,
[0714] 'rain': 5,
[0715] 'wind': 3,
[0716] 'social_trend': 7,
[0717] 'emotion': 'anxiety'
[0718] }])
[0719] risk = predict_crime_risk(new_data)
[0720] if risk > 0.7:
[0721] notify_to_smart_glass('Area1', risk)
[0722] In this way, the server can integrate various data to generate highly accurate crime risk predictions and security force deployment plans. Security guards can receive information in real time using devices such as smart glasses, enabling them to respond quickly and effectively.
[0723] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0724] Step 1: Data collection
[0725] The server first collects historical crime data, weather data, social trend data, and user sentiment data through APIs. Specifically, the server obtains crime data from the police agency's API and weather data from the meteorological agency's API. It then obtains social trend data using a social media analysis tool and collects user sentiment data using a sentiment analysis engine. The raw data obtained from the API is used as input, and an unprocessed dataset is obtained as output.
[0726] Step 2: Data integration and preprocessing
[0727] The server integrates the different types of collected datasets using a common key (e.g., date) and stores them in a single data frame. It uses Pandas and NumPy to perform preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data. The input is a variety of raw datasets, and the output is a preprocessed integrated data frame.
[0728] Step 3: Training and updating the AI model
[0729] The server uses the preprocessed data to train a machine learning model. It uses TensorFlow and PyTorch to train a random forest or neural network to create a crime risk prediction model. After evaluating the model's performance, it adjusts parameters and retrains as necessary. The input is the preprocessed integrated data frame, and the output is a trained AI model.
[0730] Step 4: Predict crime risk
[0731] The server uses the trained AI model to predict crime risk in a specific area and time period based on new data. It inputs a new dataset and obtains a risk score output from the model. It also incorporates user sentiment data to further refine the risk assessment. The input is a new raw dataset, and the output is a crime risk score.
[0732] Step 5: Generate a security force deployment plan
[0733] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy additional security personnel in high-risk areas and during high-risk times. It also incorporates the results of emotion data analysis to create a more effective deployment plan. The input is a crime risk score, and the output is a security force deployment plan.
[0734] Step 6: Notification of results
[0735] The server notifies the security company and police terminals of the generated security force deployment plan. Firebase Cloud Messaging is used to notify smart devices of the deployment plan details. The input is the security force deployment plan, and the output is a notification message.
[0736] Step 7: Display placement instructions
[0737] The terminal displays the notified security force deployment plan on the smart device's HUD (head-up display). Security guards can check risk areas and security instructions in real time, enabling them to respond quickly. The input is the notification message, and the output is the deployment instructions displayed on the HUD.
[0738] The specific processing unit 290 transmits the result of the specific processing to the smart glasses 214. In the smart glasses 214, the control unit 46A causes the speaker 240 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0739] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0740] In the above embodiment, an example in which the specific processing is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the smart glasses 214.
[0741] [Third embodiment]
[0742] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.
[0743] 5, the data processing system 310 includes the data processing device 12 and a headset terminal 314. An example of the data processing device 12 is a server.
[0744] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0745] The headset type terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a display 343. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the display 343 are also connected to the bus 52.
[0746] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0747] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0748] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0749] Fig. 6 shows an example of the main functions of the data processing device 12 and the headset type terminal 314. As shown in Fig. 6, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0750] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0751] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0752] In the headset type terminal 314, a reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0753] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the headset type terminal 314 will be referred to as the "terminal."
[0754] This invention is a system that predicts crime risk based on past crime data, weather data, and social trend data, and generates an optimal deployment plan for security forces based on that data. This system mainly consists of the following steps: data collection, data integration and preprocessing, AI model training and updating, crime risk prediction, generation of security force deployment plan, and notification of the results.
[0755] Data collection
[0756] The server first collects past crime data. Detailed information such as the date, location, and type of crime is obtained via API from databases held by police and security companies. Next, climate data such as temperature and precipitation is obtained from meteorological agencies, and trend data is also collected from social media analysis tools. In this way, a wide range of data is obtained.
[0757] Data Integration and Preprocessing
[0758] The server integrates the collected data and compiles it into a single format. First, it joins the data using a common key (usually a date) from each data source. For example, it might aggregate the number of crimes that occurred on a specific date, along with that day's temperature, precipitation, and related social media trend information, into a single dataset. It then performs preprocessing, such as filling in missing values, correcting outliers, and encoding categorical variables.
[0759] AI model training and updating
[0760] The server uses the preprocessed data to train a generative AI model for crime prediction. This can be done using machine learning or deep learning algorithms. For example, it uses random forests or neural networks to learn crime occurrence patterns from the data. After training is complete, the server evaluates the model's performance and adjusts its parameters as needed.
[0761] Crime risk prediction
[0762] The server uses the trained model to input new data and predict the crime risk in a specific area or time period. This prediction result is used as an indicator of the likelihood of a crime occurring in that area or time period.
[0763] Generate security force deployment plans
[0764] The server generates a specific security deployment plan based on the predicted crime risk, detailing where, how many guards should be deployed, and when. For example, areas predicted to be high risk may be planned to have more guards than usual.
[0765] Notification of results
[0766] The server then notifies the security company or police terminals of the generated security force deployment plan, which then receives the plan and provides specific deployment instructions to the security guards.
[0767] Specific examples
[0768] For example, to predict crime in City A for August, first collect crime data from the past few years for August, temperature and precipitation data for the area, and trend data on social media. After integrating and preprocessing this data, it is input into a generative AI model for training. Once the model has finished training, it predicts crime risk based on the new August data. As a result, it makes a plan to deploy additional security guards in areas where a high crime risk is predicted, and notifies the security company's terminal of this deployment plan. In this way, resources can be allocated efficiently and crime prevention effectiveness can be improved.
[0769] Through these steps, the present invention realizes crime prediction and optimal deployment of security forces, thereby contributing to the creation of a safe social environment.
[0770] The processing flow will be explained below.
[0771] Step 1: Data collection
[0772] The server first collects historical crime data, which is obtained via API from police and security company databases. The server then collects weather data, which is obtained via API from meteorological agencies and includes details such as temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data, which includes information such as the frequency of specific keywords and user sentiment analysis.
[0773] Step 2: Data integration and preprocessing
[0774] The server integrates the collected crime data, climate data, and social trend data. Specifically, each dataset is joined using a common key (e.g., date) and compiled into a single data frame. The server then performs preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data.
[0775] Step 3: Training and updating the AI model
[0776] The server uses the preprocessed data to train a machine learning model. For example, it uses random forests or neural networks to learn crime occurrence patterns from past data. The server then splits a portion of the training data into test data and evaluates the model's performance. After the evaluation, the server adjusts the model's parameters as necessary and retrains it.
[0777] Step 4: Predict crime risk
[0778] The server uses the trained model to input new data and predict the crime risk in a specific area and time period. The prediction results are output as a numerical value indicating the likelihood of a crime occurring in that area and time period. The server adds the prediction results to a data frame for use in the next processing step.
[0779] Step 5: Generate a security force deployment plan
[0780] The server generates a security force deployment plan based on the predicted crime risk. It creates a plan to deploy more security guards in high-risk areas and at high-risk times. Specifically, it takes into account the predicted crime risk and determines in detail how many security guards to deploy in which areas and at what times. The server creates a security force deployment plan based on this information and saves it in a database.
[0781] Step 6: Notification of results
[0782] The server notifies the security company or police terminal of the generated security force deployment plan. It uses an API to send details of the deployment plan in JSON format. The terminal analyzes the received deployment plan and prepares it for display.
[0783] Step 7: Display placement instructions
[0784] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[0785] Example 1
[0786] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0787] Currently, in order to develop optimal plans for crime prevention and the deployment of security forces, it is necessary to collect and analyze a large amount of data. However, it is difficult to integrate this data and make highly accurate predictions, and it is sometimes impossible to generate an efficient deployment plan for security forces. In particular, many variables are involved in predicting crime risk, and building a model that appropriately takes these into account is a challenge.
[0788] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0789] In this invention, the server includes: means for collecting historical crime data, means for collecting climate data, means for collecting social trend data, means for integrating the collected data using a common key to create a single dataset; means for performing preprocessing on the integrated dataset, such as filling in missing values, correcting outliers, and encoding categorical variables; means for training a generative AI model using a machine learning or deep learning algorithm using the integrated and preprocessed data; means for predicting crime risk in a specific area or time period using the trained generative AI model; means for generating a security force deployment plan based on the predicted crime risk; and means for notifying the user of the generated security force deployment plan. This enables the integration and preprocessing of complex data to perform highly accurate crime risk predictions, thereby enabling the generation of effective security force deployment plans.
[0790] "Historical crime data" refers to information about historically recorded crimes, such as the date, location, and type of crime.
[0791] "Climate data" refers to weather information for a specific region or period, such as temperature, precipitation, and wind speed.
[0792] "Social trend data" refers to information obtained from sources such as social media and news that indicates social interest and topics over a specific period of time.
[0793] "Integration" refers to the process of combining data from multiple data sources into a single data set using a common key.
[0794] "Preprocessing" refers to processes used to convert raw data into a format suitable for model training, such as imputing missing values, correcting outliers, and encoding categorical variables.
[0795] A "generative AI model" is a model that uses machine learning or deep learning algorithms to identify specific patterns or predictions from data.
[0796] "Crime risk prediction" refers to using a trained generative AI model to assess the likelihood of a crime occurring in a specific area or time period.
[0797] A "security force deployment plan" is a plan that determines in detail how many security guards will be deployed in which locations and at what times based on predicted crime risks.
[0798] "Notification" refers to transmitting the generated security force deployment plan to relevant agencies such as security companies and the police.
[0799] The present invention is a system that uses past crime data, weather data, and social trend data to predict crime risks and generate an optimal deployment plan for security forces based on the predictions. This system is implemented using the following hardware and software.
[0800] Hardware and software used
[0801] The system is implemented using the following major hardware and software:
[0802] Server: A server with high-performance computing power that collects, integrates, and preprocesses crime data, climate data, and social trend data, as well as trains and updates AI models and performs risk prediction.
[0803] Database: A relational database management system (RDBMS) for storing and managing data.
[0804] AI modeling tools: Tools for training machine learning and deep learning algorithms (e.g., TensorFlow, Scikit-learn).
[0805] API Interface: API for collecting crime data, climate data, and social trend data from external data sources.
[0806] Social Media Analytics Tools: Tools for collecting social trend data.
[0807] Program processing flow
[0808] The server first uses API interfaces to collect crime data from police and security company databases, then calls meteorological agencies' APIs to obtain weather data, and finally uses social media analytics tools to collect social trend data, which are then stored in a database.
[0809] To integrate the collected data, the server joins the data using a common key (usually a date) from each data source. For example, it might combine the number of crimes on a particular date, the temperature and precipitation for that day, and social media trend information. The server then performs preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables.
[0810] Using the preprocessed data, the server uses AI modeling tools to train a generative AI model using machine learning or deep learning algorithms (e.g., random forests, neural networks). After training is complete, the model's performance is evaluated and parameters are adjusted as needed.
[0811] The server then inputs new data sets (such as weather forecast data for the next month or the latest social media trends) into the model to predict the crime risk for a specific area and time period. This prediction indicates the likelihood of a crime occurring.
[0812] Based on the crime risk prediction results, the server generates a specific security force deployment plan, which includes a plan to deploy additional security guards in high-risk areas. The generated security force deployment plan is notified to the terminals of the security company and the police, which receive the plan and provide specific deployment instructions to the security guards.
[0813] Specific examples
[0814] For example, a prompt such as "Predict the crime risk in City A in August and generate an optimal security force deployment plan based on that risk" is input into the generative AI model. The server collects past crime data, weather data, and social media trend data, integrates and preprocesses it, and then trains the AI model. Based on the new data, the crime risk for August is predicted, and a plan is made to increase the number of security guards in high-risk areas. This deployment plan is then notified to the security company's terminal, which issues specific deployment instructions to the security guards.
[0815] This series of processes is expected to result in efficient allocation of security resources and improved crime prevention.
[0816] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0817] Step 1: Data collection
[0818] The server first connects to police and security company databases and collects past crime data via API. This includes detailed information such as the date, location, and type of crime. It then calls the API of a meteorological agency to obtain climate data such as temperature and precipitation for a specific area. It also uses social media analysis tools to collect social trend data for a specific area and period. This data is then stored in a data store within the server.
[0819] Inputs: Police and security company databases, weather agency APIs, social media analytics tools
[0820] Output: Historical crime data, climate data, social trend data
[0821] Step 2: Data integration
[0822] The server integrates the data collected from each data source using a common key (date). For example, it can combine the number of crimes on a specific date, the temperature and precipitation for that day, and social media trend information into a single dataset. This allows information obtained from different data sources to be centralized and consistent.
[0823] Inputs: Historical crime data, climate data, social trend data
[0824] Output: Unified dataset
[0825] Step 3: Data Preprocessing
[0826] The server performs preprocessing on the merged dataset. It imputes missing values using a method such as mean imputation, corrects outliers by detecting and correcting extremely high temperature values, and encodes categorical variables by converting strings to numbers. This prepares the data in a format suitable for model training.
[0827] Input: Unified dataset
[0828] Output: Preprocessed dataset
[0829] Step 4: Training the AI model
[0830] The server uses the preprocessed dataset to train a generative AI model using machine learning or deep learning algorithms, such as random forests or neural networks, to learn crime occurrence patterns from the data. Once training is complete, the server evaluates the model's performance and adjusts hyperparameters as needed.
[0831] Input: Preprocessed dataset
[0832] Output: Trained AI model
[0833] Step 5: Predict crime risk
[0834] The server uses the trained AI model to input new data sets and predict the crime risk in specific areas and times of day, which in turn indicates areas and times when crimes are likely to occur.
[0835] Input: Trained AI model, new dataset (such as next month's weather forecast data or the latest social media trends)
[0836] Output: Crime risk prediction results
[0837] Step 6: Generate a security force deployment plan
[0838] The server generates a security deployment plan based on the predicted crime risk, detailing how many guards should be deployed in which locations and at what times. For example, it might plan to deploy more guards than usual in areas predicted to be high risk.
[0839] Input: Crime risk prediction results
[0840] Output: Security Force Deployment Plan
[0841] Step 7: Notification of results
[0842] The server notifies the security company and police terminals of the generated security force deployment plan. Upon receiving this notification, the terminals issue specific deployment instructions to security guards, allowing them to be deployed efficiently at the designated locations and times.
[0843] Input: Security Force Deployment Plan
[0844] Output: Placement instruction notification
[0845] Through the above steps, complex data can be integrated and preprocessed, crime risk predictions can be made with high accuracy, and effective security force deployment plans can be generated.
[0846] (Application example 1)
[0847] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0848] Conventional security systems formulate security plans based only on past crime data and static data, making it difficult to respond to dynamically changing crime risks. Furthermore, because security guard deployment plans are not updated in real time, it is difficult to allocate resources appropriately. Furthermore, because feedback from the field is not reflected in security plans, it is difficult to constantly adapt to the latest situations.
[0849] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0850] In this invention, the server includes means for collecting historical crime data, means for collecting climate data, means for collecting social trend data, means for integrating and preprocessing the collected data, means for predicting crime risk based on the integrated and preprocessed data, means for generating a security force deployment plan based on the predicted crime risk, means for notifying the user of the generated security force deployment plan, means for displaying the crime risk in real time, and means for collecting on-site information from security guards and using it to improve the accuracy of the AI model. This makes it possible to respond to dynamically changing crime risks and appropriately deploy resources in real time. Furthermore, the accuracy of the AI model can be improved based on feedback from the field, allowing for the development of security plans that can always adapt to the latest situations.
[0851] "Past crime data" refers to detailed information held by the police and security companies, such as the date, location, and type of crime.
[0852] "Climate data" refers to information about weather conditions such as temperature and precipitation.
[0853] "Social trend data" refers to information about topics and trends on social media and the internet.
[0854] "Integrating and preprocessing" refers to the process of consolidating multiple collected data into one format, filling in missing values, and correcting outliers.
[0855] "Predicting crime risk" refers to using generative AI models to assess the likelihood of crime occurring in a specific area or time period.
[0856] A "security force deployment plan" refers to a plan that determines how many security guards should be deployed in which locations based on predicted crime risks.
[0857] "Notifying" refers to informing security companies and relevant parties of the generated security force deployment plan in real time.
[0858] "Displaying crime risk in real time" refers to instantly visualizing current crime risk on a map or interface.
[0859] "Collecting on-site information from security guards" means feeding back information obtained by security guards on-site into the system and using it as learning data for the AI model.
[0860] "Improving the accuracy of AI models" refers to using on-site information from security guards and newly collected data to improve the AI model's ability to predict crime risks.
[0861] This invention is a system that predicts crime risks based on past crime data, weather data, and social trend data, and then generates optimal deployment plans for security forces based on that data. This system functions through collaboration between servers, terminals, and users.
[0862] Hardware and software used
[0863] Hardware: Servers, users' smartphones
[0864] Software: Python, Requests (library for processing API requests), Geopy (library for processing geographic data), learning model (e.g., random forest)
[0865] Specific processing of the system
[0866] Data collection and preprocessing:
[0867] First, the server collects historical crime data, weather data, and social trend data. These data are obtained via APIs. Specifically, crime data is obtained from police and security company databases, weather data from meteorological agencies, and trend data from social media analysis tools.
[0868] These data are integrated and compiled into a single format, and the integrated data undergoes preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables.
[0869] Crime risk prediction:
[0870] Using the preprocessed data, the server trains a generative AI model, which is trained using random forests and neural networks. The trained model is then used to predict crime risk in specific areas and time periods based on new data.
[0871] Generate security force deployment plan:
[0872] Based on the predicted crime risk, the server generates a security deployment plan, detailing where, how many guards should be deployed, and when. For example, areas predicted to be high risk may be planned to have more guards than usual.
[0873] Real-time notifications and displays:
[0874] The server then notifies the user of the generated security deployment plan via their smartphone, where the user can view the current crime risk on a map in real time and take appropriate action based on the security deployment plan.
[0875] Feedback and learning model updates:
[0876] The user (security guard) feeds information from the scene back to the server via smartphone. The server collects this scene information and uses it to improve the accuracy of the generative AI model. This feedback function allows the creation of security plans that can always adapt to the latest situations.
[0877] Examples:
[0878] For example, to predict crime in City A for August, crime data from August over the past few years, temperature and precipitation data for the area, and trend data on social media are collected. After integrating and preprocessing this data, it is input into a generative AI model for training. Once the model has finished training, it predicts crime risk based on the new August data. As a result, it makes a plan to deploy additional security guards in areas where a high crime risk is predicted, and notifies the security company's terminal of this deployment plan. In this way, resources can be allocated efficiently and crime prevention effectiveness can be improved.
[0879] Example prompt sentence:
[0880] "Enter the following dataset into a generative AI model and predict the risk of crime in Tokyo in August. The dataset includes crime data from the past five years, climate data (temperature, precipitation, etc.), and social media trend data."
[0881] This makes it possible to flexibly respond to dynamically changing crime risks and allocate appropriate resources in real time. Furthermore, the accuracy of the AI model can be improved based on feedback from the field, allowing for the formulation of security plans that can always adapt to the latest situations.
[0882] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0883] Step 1:
[0884] The server collects historical crime data, weather data, and social trend data. Each piece of data is obtained via API. Specifically, crime data is obtained from police and security company databases, weather data is obtained from meteorological agencies, and trend data is collected from social media analysis tools. The input is each piece of data obtained from the API, and the output is the raw data before integration.
[0885] Step 2:
[0886] The server integrates and preprocesses the collected data. Specifically, it combines data using a common key (usually a date) from each data source. For example, it aggregates the number of crimes that occurred on a specific date with that day's temperature, precipitation, and related trend information on social media into a single dataset. It then performs preprocessing such as filling in missing values, correcting outliers, and encoding categorical variables. The input is the collected raw data, and the output is a preprocessed integrated dataset.
[0887] Step 3:
[0888] The server uses the preprocessed data to train a generative AI model for crime prediction. This uses machine learning and deep learning algorithms, and training is performed using random forests and neural networks. The input is the preprocessed dataset, and the output is a trained AI model. Specifically, the data is input into the algorithm and the model parameters are optimized.
[0889] Step 4:
[0890] The server uses the trained generative AI model to input new data and predict crime risk in specific areas and time periods. This prediction is used as an indicator of the likelihood of crime occurring in those areas and time periods. The inputs are current crime, weather, and trend data, and the output is a predicted crime risk for each area and time period.
[0891] Step 5:
[0892] The server generates a specific security force deployment plan based on the predicted crime risk. This plan details how many security guards should be deployed in which locations and at what times. The input is the predicted crime risk, and the output is a detailed security force deployment plan. Specifically, the server performs calculations to deploy more security guards in areas predicted to be high risk.
[0893] Step 6:
[0894] The server notifies the security company or police terminal of the generated security force deployment plan. The terminal receives this and gives specific deployment instructions to the security guards. The input is the security force deployment plan, and the output is a notification message. Specifically, the server sends a message to the terminal via a notification API.
[0895] Step 7:
[0896] Security guards (users) provide feedback from the scene to the server via devices such as smartphones. The server collects this scene information and uses it to improve the accuracy of the generative AI model. The input is feedback information from the scene, and the output is an updated AI model. Specifically, the feedback information is processed and added to the training data for the AI model.
[0897] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0898] This invention is a system that combines historical crime data, weather data, and social trend data with an emotion engine that recognizes user emotions, predicts crime risk, and generates an optimal deployment plan for security forces based on that. This system is composed of data collection, data integration and preprocessing, AI model training and updating, crime risk prediction, generation of security force deployment plans, and notification of the results, as well as an additional step of collecting emotion data using the emotion engine.
[0899] Data collection
[0900] The server first collects historical crime data, which is obtained through APIs from police and security company databases. The server then collects weather data, which is obtained through APIs from meteorological agencies and includes details such as temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data, which includes information such as the frequency of specific keywords and user sentiment analysis.
[0901] Collecting Emotional Data
[0902] The server uses an emotion engine to collect user emotion data, which is obtained from, for example, social media posts, forums, news comments, etc., and quantifies the user's emotional state (e.g., anger, joy, anxiety, etc.).
[0903] Data Integration and Preprocessing
[0904] The server integrates collected historical crime data, climate data, social trend data, and sentiment data. First, each dataset is joined using a common key (e.g., date) to create a single data frame. The server then performs preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data.
[0905] AI model training and updating
[0906] The server uses the preprocessed data to train a machine learning model. For example, it uses random forests or neural networks to learn crime occurrence patterns from past data. The server then splits a portion of the training data into test data and evaluates the model's performance. After the evaluation, the server adjusts the model's parameters as necessary and retrains it.
[0907] Crime risk prediction
[0908] The server uses the trained model to input new data and predict the crime risk in a specific area and time period. The prediction results are output as a numerical value indicating the likelihood of a crime occurring in that area and time period. Furthermore, user emotional data is also taken into account to verify how the emotional data affects the crime risk. The server adds the prediction results to a data frame and uses them in the next processing step.
[0909] Generate security force deployment plans
[0910] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy more security guards in high-risk areas and at high-risk times. It also takes emotional data into account to include deployment instructions and warnings for security guards. Specifically, it takes into account the predicted crime risk and emotional data to determine in detail how many security guards to deploy in which areas and at what times. The server creates a security force deployment plan based on this information and stores it in a database.
[0911] Notification of results
[0912] The server notifies the security company and police terminals of the generated security force deployment plan. Using an API, it sends the deployment plan details in JSON format. The terminals then analyze the received deployment plan and prepare it for display.
[0913] Display placement instructions
[0914] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[0915] Specific examples
[0916] For example, to predict crime in City A for August, we first collect crime data from August over the past few years, temperature and precipitation data for the area, and social media trend data. We then collect user emotion data, integrate these data, preprocess them, and input them into a generative AI model for training. Once the model has completed training, it predicts crime risk based on the new August data. As a result, a plan is made to deploy additional security guards in areas predicted to have a high crime risk, and this deployment plan is notified to the security company's terminal. This allows for efficient resource allocation and improved crime prevention. Furthermore, by utilizing emotion data and responding sensitively to users' emotional states, we can achieve more accurate crime predictions and countermeasures.
[0917] Through these steps, the present invention realizes crime prediction and optimal deployment of security forces, thereby contributing to the creation of a safe social environment.
[0918] The processing flow will be explained below.
[0919] Step 1: Data collection
[0920] The server first collects past crime data. This is obtained via API from police and security company databases. For example, this includes information such as the date and location of the crime, the type of crime, and the amount of damage. The server also collects weather data. This is obtained via API from meteorological agencies and includes details such as daily temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data. This includes the frequency of specific keywords and user sentiment analysis.
[0921] Step 2: Collecting emotion data
[0922] The server uses an emotion engine to collect user emotion data. This emotion data is obtained from text data such as social media posts, forums, and news comments, and the emotion engine analyzes it to quantify the user's emotional state (e.g., anger, joy, anxiety, etc.). This allows us to understand emotional trends by region.
[0923] Step 3: Data integration and preprocessing
[0924] The server integrates the collected historical crime data, weather data, social trend data, and sentiment data. Specifically, each dataset is joined using a common key (e.g., date, region) and compiled into a single data frame. It then performs preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables (numeric conversion). For example, missing temperature data can be imputed by estimating it from data from surrounding dates.
[0925] Step 4: Training and updating the AI model
[0926] The server uses the preprocessed data to train a machine learning model. For example, a random forest or neural network can be used. The model is first trained using the training data, and then its performance is evaluated using test data. Metrics such as accuracy, recall, and precision are used for evaluation. If necessary, the model parameters are adjusted and retrained.
[0927] Step 5: Predict crime risk
[0928] The server uses the trained AI model to predict crime risk in specific areas and time periods. It inputs newly collected data (past crime data, weather data, social trend data, and emotion data) into the model and outputs a numerical value representing the risk of crime. The server adds these prediction results to a data frame for use in the next step.
[0929] Step 6: Generate a security force deployment plan
[0930] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy more security guards in areas and time periods predicted to be high risk. Specifically, it determines the number of security guards and deployment times for each area based on the predicted crime risk value. It also takes into account emotional data, aiming to strengthen security in areas where emotions are particularly high.
[0931] Step 7: Notification of results
[0932] The server notifies the security company or police terminal of the generated security force deployment plan. Using an API, it sends the deployment plan details in JSON format. The terminal receives it and parses it appropriately.
[0933] Step 8: View placement instructions
[0934] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[0935] Example 2
[0936] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0937] Conventional crime prediction systems predict risk using past crime data, weather data, etc., but because they do not take into account social trends or user emotional data, there are limitations to the accuracy of predictions and they are difficult to adapt to actual situations. In addition, security force deployment plans based on prediction results are not fully optimized, making it difficult to deploy security forces effectively.
[0938] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[0939] In this invention, the server includes means for collecting past crime data, means for collecting weather data, means for collecting social trend data, means for collecting user emotion data, means for integrating and preprocessing the collected data, means for predicting crime risk using a generative AI model based on the integrated and preprocessed data, means for generating a security force deployment plan based on the prediction results, means for notifying the generated security force deployment plan, and means for displaying the notified security force deployment plan on a terminal. This enables highly accurate crime risk prediction based on the integrated data and optimal security force deployment plans that take social conditions and emotion data into consideration.
[0940] "Past crime data" refers to information about crimes that have occurred in the past that is recorded in databases of the police, security companies, etc.
[0941] "Climate data" is information about weather conditions over a certain period of time, such as temperature, precipitation, and wind speed.
[0942] "Social trend data" is information collected from social media and news sources about the frequency and impact of topics and events over a specific period of time.
[0943] "User emotion data" is information that quantifies a user's emotional state (e.g., anger, joy, anxiety, etc.) collected from social media posts, news comments, etc.
[0944] "Data integration and preprocessing" refers to combining the various collected data using a common key and compiling it into a single data frame, and then performing preprocessing such as filling in missing values, correcting outliers, and converting categorical variables into numeric values.
[0945] A "generative AI model" refers to a mathematical model with artificial intelligence that is trained using machine learning and deep learning techniques to predict crime risk.
[0946] "Crime risk prediction" involves using a trained generative AI model to calculate the numerical probability of a crime occurring in a specific area or time period based on new data.
[0947] A "security force deployment plan" refers to a plan that determines how many security forces to deploy in high-risk areas and during high-risk times based on the results of crime risk predictions.
[0948] "Notification" refers to the act of sending the generated security force deployment plan to security company or police terminals via API.
[0949] "Display on terminal" means displaying the locations and times of security guard deployment on a map using a user interface that visually shows the security force deployment plan received from the server.
[0950] The present invention provides a system that combines past crime data, weather data, social trend data, and user emotion data to predict the risk of crime and generate an optimal security force deployment plan. A specific embodiment of the present invention will now be described.
[0951] The server first collects past crime data from police and security company databases using APIs. For example, it calls a police database API to obtain crime records from the past five years. It also uses a meteorological agency's API to collect detailed climate data such as temperature, precipitation, and wind speed, and obtains past weather patterns for specific cities and regions. It also uses social media analysis tools to collect the frequency of specific keywords and hashtag trends from social media such as Twitter and Facebook.
[0952] Next, the server uses an emotion engine to collect user emotion data. This is obtained in real time from social media posts and news comments, and uses an emotion analysis API (e.g., IBM Watson or Google Cloud Natural Language) to classify user posts into emotional states such as "anger," "joy," and "anxiety." For example, if the hashtag "feeling anxious" is frequently used, the emotional state of that region is added to the data as "anxiety."
[0953] The server combines this collected data using a common key (e.g., date or region) and integrates it into a single data frame. It then estimates and fills in missing values in the data frame using surrounding data, and detects and corrects outliers. For example, if there is missing temperature data, it fills in the missing data with the average temperature data for the preceding and following dates. It also formats categorical variables into a format that is easy to convert to numbers. For example, it converts weather data such as "sunny" and "rainy" into numerical data such as "1" and "0."
[0954] The server uses the preprocessed data to train a machine learning model. Examples of models include random forests and neural networks. This makes it possible to learn crime occurrence patterns from past data and predict future crime risks. The dataset is divided into a training set and a test set, and the model's performance is evaluated. For example, 80% of the training data is used for learning, and the remaining 20% is used for testing. Based on the model's evaluation indicators (e.g., precision and recall), the model's hyperparameters are adjusted and the model is trained again.
[0955] The server inputs new data using the trained generative AI model and numerically predicts the crime risk for a specific area and time period. For example, it inputs weather and trend data for the next month into the model and outputs a crime risk score. It also adjusts the risk score based on user emotion data. For example, if anger is increasing in area A, the risk score for that area is increased.
[0956] The server then generates a security force deployment plan based on the predicted crime risk. It creates a plan to deploy more security guards in high-risk areas and at high-risk times. For example, in areas with a predicted risk score of 80 or higher, it deploys twice the usual number of security guards. This makes it possible to reduce the possibility of crime occurring in areas with increased risk. The generated deployment plan is saved in a database.
[0957] The server then notifies the security company and police terminals of the generated security force deployment plan via API. The deployment plan is sent in JSON format, and the receiving terminal analyzes and displays the data. For example, it may contain details such as "Area A: 10 personnel deployed on August 1st" and "Area B: 5 personnel deployed on August 2nd."
[0958] The device displays the security force deployment plan received from the server through a user interface, visually communicating specific deployment instructions to security guards and personnel. For example, the locations of security guards can be color-coded and marked on a map, along with the time of deployment. The device receives the latest deployment plan in real time and updates it as needed. The device's notification function can be used to quickly communicate deployment changes and additional instructions.
[0959] Specific examples
[0960] For example, the steps to create a crime forecast and police deployment plan for City A in August are as follows:
[0961] 1. The server uses the police database API to collect crime data for August for the past few years.
[0962] 2. The server uses the weather agency's API to collect past temperature and precipitation data for City A.
[0963] 3. The server uses the Twitter API to collect the frequency of occurrence of keywords such as "summer" and "public safety" related to City A, as well as user sentiment data.
[0964] 4. The server aggregates and preprocesses this data into a single data frame using a common key (e.g., date or region).
[0965] 5. The server trains and evaluates a random forest model using the preprocessed data.
[0966] 6. The server uses the trained model to predict the crime risk for the following August and identifies areas and times of high risk.
[0967] 7. The server generates a security guard deployment plan for high-risk areas and notifies the security company's terminal of details such as "Area A: 10 guards deployed on August 1st" and "Area B: 5 guards deployed on August 2nd."
[0968] 8. The terminal displays the received deployment plan on a map, visually providing specific deployment instructions to the security guard.
[0969] Prompt Sentence Examples
[0970] "Predict crime in City A for August and plan the deployment of security guards based on the results."
[0971] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0972] Step 1:
[0973] The server uses APIs to collect past crime data from police and security company databases. Specifically, it sends an API request to retrieve crime records from the past five years. The input to this step is the API request, and the output is JSON-formatted data received as past crime data. This data includes the date, time, location, type, and details of the crime.
[0974] Step 2:
[0975] The server uses the weather agency's API to collect detailed climate data such as temperature, precipitation, and wind speed. Specifically, it retrieves climate data for a specific city or region for the past few years via an API request. The input for this step is the API request, and the output is the received climate data in JSON format. This data includes temperature, precipitation, wind speed, etc. for each date.
[0976] Step 3:
[0977] The server uses social media analysis tools to collect social trend data, including the frequency of specific keywords and user sentiment analysis. Specifically, it uses APIs such as Twitter and Facebook to obtain the frequency and trends of keywords such as "summer" and "public safety." The input for this step is an API request and a list of specific keywords, and the output is JSON-formatted data including the frequency of keyword appearances and user sentiment.
[0978] Step 4:
[0979] The server uses an emotion engine to collect user emotion data. Specifically, data collected from social media posts and news comments is input into an emotion analysis API (e.g., IBM Watson or Google Cloud Natural Language) to quantify the user's emotional state. The input for this step is the user's posted data, and the output is a quantified emotional state.
[0980] Step 5:
[0981] The server integrates historical crime data, climate data, social trend data, and sentiment data using a common key (e.g., date or region). Specifically, each dataset is joined and compiled into a single data frame. The input to this step is each dataset to be integrated, and the output is an integrated data frame. After integration, preprocessing is performed, such as filling in missing values, correcting outliers, and converting categorical variables to numeric values.
[0982] Step 6:
[0983] The server trains a generative AI model using the preprocessed data. Specifically, it uses a random forest or neural network model, splitting the data into training and test datasets for learning. The input for this step is the preprocessed data frame, and the output is a trained generative AI model. The performance of the trained model is evaluated, and hyperparameters are adjusted and retrained as necessary.
[0984] Step 7:
[0985] The server uses the trained generative AI model to predict crime risk in specific areas and time periods based on new data. Specifically, new weather and trend data is input into the model to calculate a crime risk score. The input for this step is new weather and trend data, and the output is a prediction result including a risk score. Furthermore, the risk score is adjusted based on emotion data.
[0986] Step 8:
[0987] The server generates a security force deployment plan based on the predicted crime risk. Specifically, it creates a plan to deploy more security guards in high-risk areas and at high-risk times. For example, in areas with a risk score of 80 or higher, it deploys twice the usual number of security guards. The input to this step is the predicted risk score, and the output is a security force deployment plan. The generated deployment plan is saved in a database.
[0988] Step 9:
[0989] The server notifies the security company and police terminals of the generated security force deployment plan via API. Specifically, it sends data containing details of the deployment plan in JSON format. The input of this step is the generated deployment plan, and the output is the notified deployment plan.
[0990] Step 10:
[0991] The terminal displays the security force deployment plan received from the server through a user interface. Specifically, it marks the deployment locations of security guards on a map and displays them along with the deployment time. The input of this step is the notified deployment plan, and the output is a visually displayed deployment instruction. The terminal receives the latest deployment plan in real time and updates it as needed.
[0992] (Application example 2)
[0993] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[0994] Conventional security systems could predict crime risks by utilizing past crime data, weather data, and social trend data, but because they did not take into account user emotional data, the accuracy of risk predictions was insufficient. Furthermore, there was a lack of means to appropriately notify security guards of predicted risk information in real time and effectively deploy security personnel. Furthermore, notification methods were limited, often making it difficult to respond immediately on-site. Therefore, there is a need to build a system that can improve the accuracy of crime prevention and enable immediate response.
[0995] The identification processing by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for collecting past crime data, means for collecting weather data, means for collecting social trend data, and means for collecting user emotion data. This realizes a system including means for integrating and preprocessing the collected data, means for predicting crime risk based on the integrated and preprocessed data, means for generating a security force deployment plan based on the predicted crime risk, means for notifying the generated security force deployment plan, and means for displaying the notified security force deployment plan on a smart device. This enables highly accurate crime risk prediction in real time and rapid and appropriate security force deployment.
[0996] "Past crime data" is detailed information about crimes that have occurred in the past recorded by police agencies and security companies.
[0997] "Climate data" refers to detailed weather information such as temperature, precipitation, and wind speed provided by meteorological agencies.
[0998] "Social trend data" is information such as the frequency of occurrence of specific keywords or topics, and user interests, collected from social media, news sites, etc.
[0999] "User emotion data" is information that quantifies a user's emotional state (e.g., anger, joy, anxiety, etc.) collected from social media posts, news comments, forums, etc.
[1000] "Means for integrating and preprocessing data" refers to methods for combining different types of collected data into a single data frame, completing missing values, correcting outliers, and converting categorical variables into numeric values.
[1001] The "means for predicting crime risk" is a method that uses a machine learning model based on integrated and preprocessed data to output a numerical value indicating the likelihood of a crime occurring in a specific area or time period.
[1002] The "means for generating a security force deployment plan" is a method for specifically determining the deployment of security personnel in high-risk areas and time periods based on the predicted crime risk.
[1003] The "means for notifying the security force deployment plan" is a method for sending the generated security force deployment plan to a terminal of a security company or police, and conveying deployment instructions to the person in charge.
[1004] A "smart device" is a portable electronic device that can connect to the Internet and install applications, and examples include smart glasses and smartphones.
[1005] A "generative AI model" is a machine learning algorithm trained on historical data that is used to predict crime risk.
[1006] The system for implementing this invention integrates past crime data, weather data, social trend data, and user emotion data to predict crime risks and generate effective deployment plans for security forces. Specific examples are described below.
[1007] The system mainly consists of a server, smart devices (e.g., smart glasses, smartphones), and an API for data collection. The server has the following means:
[1008] Hardware and software used
[1009] Hardware:
[1010] Server (e.g. AWS EC2)
[1011] Smart devices (e.g., smart glasses, smartphones)
[1012] software:
[1013] Data Collection API
[1014] Data integration tools (Pandas, NumPy)
[1015] Machine learning libraries (e.g. TensorFlow, PyTorch)
[1016] Sentiment analysis engine (e.g. Azure Cognitive Services Emotion API)
[1017] Notification system (Firebase Cloud Messaging)
[1018] Step 1: Data collection
[1019] The server first collects historical crime data, weather data, social trend data, and user sentiment data through APIs, which are obtained in real time or periodically from their respective sources (police agencies, meteorological agencies, social media analysis tools, etc.).
[1020] Step 2: Data integration and preprocessing
[1021] The server aggregates the different types of collected datasets into a single data frame by using a common key (e.g., date), and performs preprocessing using Pandas and NumPy, such as imputing missing values, correcting outliers, and converting categorical variables to numeric values.
[1022] Step 3: Training and updating the AI model
[1023] The server uses the preprocessed data to train machine learning models. It uses TensorFlow and PyTorch to train random forests and neural networks to create crime risk prediction models. After evaluating the model's performance, it adjusts parameters and retrains it as needed.
[1024] Step 4: Predict crime risk
[1025] The trained model is used to predict crime risk in specific areas and time periods. New data is input and a risk assessment is performed. User emotional data is also taken into account to analyze how emotional state affects the risk of crime.
[1026] Step 5: Generate a security force deployment plan
[1027] The server generates a security force deployment plan based on the predicted crime risk, deploying additional security personnel in high-risk areas and during high-risk times, including analyzing the emotion data to create a more effective deployment plan.
[1028] Step 6: Notification of results
[1029] The generated security force deployment plan is sent from the server to the security company and police terminals, and details of the deployment plan are sent to smart devices using Firebase Cloud Messaging.
[1030] Step 7: View placement instructions
[1031] The deployment plan is then displayed on the smart device's HUD (head-up display), allowing security guards to check risk areas and security instructions in real time, enabling them to respond quickly.
[1032] Specific examples
[1033] If an area in City X is judged to be at increased risk of crime, the server generates instructions to deploy additional security guards in that area. The server makes predictions by integrating past crime data, weather information, social media trends, and user emotion data. For example, if emotions such as "anger" or "anxiety" are rising in a particular area, the crime risk in that area may increase. Based on this information, an optimal security force deployment plan is generated and notified to smart devices.
[1034] Prompt Sentence Examples
[1035] An example prompt for predicting crime risk using new data is:
[1036] import requests
[1037] import pandas as pd
[1038] from sklearn.model_selection import train_test_split
[1039] from sklearn.ensemble import RandomForestClassifier
[1040] import tensorflow as tf
[1041] Step 1: Data Collection
[1042] crime_data = requests.get('https: / / api.example.com / crime_data').json()
[1043] climate_data = requests.get('https: / / api.weatherapi.com / v1 / current.json?key=YOUR_API_KEY&q=Tokyo').json()
[1044] social_trend_data = requests.get('https: / / api.socialmedia.com / trends').json()
[1045] emotion_data = requests.get('https: / / api.azure.com / emotion').json()
[1046] Step 2: Data integration and preprocessing
[1047] df_crime = pd.DataFrame(crime_data)
[1048] df_climate = pd.DataFrame(climate_data)
[1049] df_social_trend = pd.DataFrame(social_trend_data)
[1050] df_emotion = pd.DataFrame(emotion_data)
[1051] merged_data = df_crime.merge(df_climate, on='date').merge(df_social_trend, on='date').merge(df_emotion, on='date')
[1052] Missing value imputation and preprocessing
[1053] merged_data.fillna(method='ffill', inplace=True)
[1054] Step 3: Training and updating the AI model
[1055] X = merged_data.drop(columns=['crime_risk'])
[1056] y = merged_data['crime_risk']
[1057] X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
[1058] clf = RandomForestClassifier()
[1059] clf.fit(X_train, y_train)
[1060] Step 4: Real-time crime risk prediction and display
[1061] def predict_crime_risk(new_data):
[1062] risk = clf.predict(new_data)
[1063] return risk
[1064] Notifications on smart glasses
[1065] def notify_to_smart_glass(risk_area, risk_level):
[1066] Notifications using Firebase Cloud Messaging
[1067] placeholder code
[1068] print(f"Area: {risk_area}, Risk Level: {risk_level}")
[1069] The server periodically retrieves new data and updates the model.
[1070] Prompt statement
[1071] new_data = pd.DataFrame([{
[1072] 'temp': 30,
[1073] 'rain': 5,
[1074] 'wind': 3,
[1075] 'social_trend': 7,
[1076] 'emotion': 'anxiety'
[1077] }])
[1078] risk = predict_crime_risk(new_data)
[1079] if risk > 0.7:
[1080] notify_to_smart_glass('Area1', risk)
[1081] In this way, the server can integrate various data to generate highly accurate crime risk predictions and security force deployment plans. Security guards can receive information in real time using devices such as smart glasses, enabling them to respond quickly and effectively.
[1082] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1083] Step 1: Data collection
[1084] The server first collects historical crime data, weather data, social trend data, and user sentiment data through APIs. Specifically, the server obtains crime data from the police agency's API and weather data from the meteorological agency's API. It then obtains social trend data using a social media analysis tool and collects user sentiment data using a sentiment analysis engine. The raw data obtained from the API is used as input, and an unprocessed dataset is obtained as output.
[1085] Step 2: Data integration and preprocessing
[1086] The server integrates the different types of collected datasets using a common key (e.g., date) and stores them in a single data frame. It uses Pandas and NumPy to perform preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data. The input is a variety of raw datasets, and the output is a preprocessed integrated data frame.
[1087] Step 3: Training and updating the AI model
[1088] The server uses the preprocessed data to train a machine learning model. It uses TensorFlow and PyTorch to train a random forest or neural network to create a crime risk prediction model. After evaluating the model's performance, it adjusts parameters and retrains as necessary. The input is the preprocessed integrated data frame, and the output is a trained AI model.
[1089] Step 4: Predict crime risk
[1090] The server uses the trained AI model to predict crime risk in a specific area and time period based on new data. It inputs a new dataset and obtains a risk score output from the model. It also incorporates user sentiment data to further refine the risk assessment. The input is a new raw dataset, and the output is a crime risk score.
[1091] Step 5: Generate a security force deployment plan
[1092] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy additional security personnel in high-risk areas and during high-risk times. It also incorporates the results of emotion data analysis to create a more effective deployment plan. The input is a crime risk score, and the output is a security force deployment plan.
[1093] Step 6: Notification of results
[1094] The server notifies the security company and police terminals of the generated security force deployment plan. Firebase Cloud Messaging is used to notify smart devices of the deployment plan details. The input is the security force deployment plan, and the output is a notification message.
[1095] Step 7: Display placement instructions
[1096] The terminal displays the notified security force deployment plan on the smart device's HUD (head-up display). Security guards can check risk areas and security instructions in real time, enabling them to respond quickly. The input is the notification message, and the output is the deployment instructions displayed on the HUD.
[1097] The specific processing unit 290 transmits the result of the specific processing to the headset type terminal 314. In the headset type terminal 314, the control unit 46A causes the speaker 240 and the display 343 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[1098] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1099] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the headset type terminal 314.
[1100] [Fourth embodiment]
[1101] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.
[1102] 7, a data processing system 410 includes a data processing device 12 and a robot 414. An example of the data processing device 12 is a server.
[1103] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[1104] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a control target 443. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the control target 443 are also connected to the bus 52.
[1105] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[1106] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[1107] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[1108] The control object 443 includes a display device, LEDs in the eyes, and motors for driving the arms, hands, and feet. The posture and gestures of the robot 414 are controlled by controlling the motors of the arms, hands, and feet. Some of the emotions of the robot 414 can be expressed by controlling these motors. In addition, the facial expressions of the robot 414 can also be expressed by controlling the light emission state of the LEDs in the eyes of the robot 414.
[1109] Fig. 8 shows an example of the main functions of the data processing device 12 and the robot 414. As shown in Fig. 8, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[1110] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[1111] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[1112] In the robot 414, the processor 46 performs the reception output process. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[1113] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1114] This invention is a system that predicts crime risk based on past crime data, weather data, and social trend data, and generates an optimal deployment plan for security forces based on that data. This system mainly consists of the following steps: data collection, data integration and preprocessing, AI model training and updating, crime risk prediction, generation of security force deployment plan, and notification of the results.
[1115] Data collection
[1116] The server first collects past crime data. Detailed information such as the date, location, and type of crime is obtained via API from databases held by police and security companies. Next, climate data such as temperature and precipitation is obtained from meteorological agencies, and trend data is also collected from social media analysis tools. In this way, a wide range of data is obtained.
[1117] Data Integration and Preprocessing
[1118] The server integrates the collected data and compiles it into a single format. First, it joins the data using a common key (usually a date) from each data source. For example, it might aggregate the number of crimes that occurred on a specific date, along with that day's temperature, precipitation, and related social media trend information, into a single dataset. It then performs preprocessing, such as filling in missing values, correcting outliers, and encoding categorical variables.
[1119] AI model training and updating
[1120] The server uses the preprocessed data to train a generative AI model for crime prediction. This can be done using machine learning or deep learning algorithms. For example, it uses random forests or neural networks to learn crime occurrence patterns from the data. After training is complete, the server evaluates the model's performance and adjusts its parameters as needed.
[1121] Crime risk prediction
[1122] The server uses the trained model to input new data and predict the crime risk in a specific area or time period. This prediction result is used as an indicator of the likelihood of a crime occurring in that area or time period.
[1123] Generate security force deployment plans
[1124] The server generates a specific security deployment plan based on the predicted crime risk, detailing where, how many guards should be deployed, and when. For example, areas predicted to be high risk may be planned to have more guards than usual.
[1125] Notification of results
[1126] The server then notifies the security company or police terminals of the generated security force deployment plan, which then receives the plan and provides specific deployment instructions to the security guards.
[1127] Specific examples
[1128] For example, to predict crime in City A for August, first collect crime data from the past few years for August, temperature and precipitation data for the area, and trend data on social media. After integrating and preprocessing this data, it is input into a generative AI model for training. Once the model has finished training, it predicts crime risk based on the new August data. As a result, it makes a plan to deploy additional security guards in areas where a high crime risk is predicted, and notifies the security company's terminal of this deployment plan. In this way, resources can be allocated efficiently and crime prevention effectiveness can be improved.
[1129] Through these steps, the present invention realizes crime prediction and optimal deployment of security forces, thereby contributing to the creation of a safe social environment.
[1130] The processing flow will be explained below.
[1131] Step 1: Data collection
[1132] The server first collects historical crime data, which is obtained via API from police and security company databases. The server then collects weather data, which is obtained via API from meteorological agencies and includes details such as temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data, which includes information such as the frequency of specific keywords and user sentiment analysis.
[1133] Step 2: Data integration and preprocessing
[1134] The server integrates the collected crime data, climate data, and social trend data. Specifically, each dataset is joined using a common key (e.g., date) and compiled into a single data frame. The server then performs preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data.
[1135] Step 3: Training and updating the AI model
[1136] The server uses the preprocessed data to train a machine learning model. For example, it uses random forests or neural networks to learn crime occurrence patterns from past data. The server then splits a portion of the training data into test data and evaluates the model's performance. After the evaluation, the server adjusts the model's parameters as necessary and retrains it.
[1137] Step 4: Predict crime risk
[1138] The server uses the trained model to input new data and predict the crime risk in a specific area and time period. The prediction results are output as a numerical value indicating the likelihood of a crime occurring in that area and time period. The server adds the prediction results to a data frame for use in the next processing step.
[1139] Step 5: Generate a security force deployment plan
[1140] The server generates a security force deployment plan based on the predicted crime risk. It creates a plan to deploy more security guards in high-risk areas and at high-risk times. Specifically, it takes into account the predicted crime risk and determines in detail how many security guards to deploy in which areas and at what times. The server creates a security force deployment plan based on this information and saves it in a database.
[1141] Step 6: Notification of results
[1142] The server notifies the security company or police terminal of the generated security force deployment plan. It uses an API to send details of the deployment plan in JSON format. The terminal analyzes the received deployment plan and prepares it for display.
[1143] Step 7: Display placement instructions
[1144] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[1145] Example 1
[1146] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1147] Currently, in order to develop optimal plans for crime prevention and the deployment of security forces, it is necessary to collect and analyze a large amount of data. However, it is difficult to integrate this data and make highly accurate predictions, and it is sometimes impossible to generate an efficient deployment plan for security forces. In particular, many variables are involved in predicting crime risk, and building a model that appropriately takes these into account is a challenge.
[1148] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[1149] In this invention, the server includes: means for collecting historical crime data, means for collecting climate data, means for collecting social trend data, means for integrating the collected data using a common key to create a single dataset; means for performing preprocessing on the integrated dataset, such as filling in missing values, correcting outliers, and encoding categorical variables; means for training a generative AI model using a machine learning or deep learning algorithm using the integrated and preprocessed data; means for predicting crime risk in a specific area or time period using the trained generative AI model; means for generating a security force deployment plan based on the predicted crime risk; and means for notifying the user of the generated security force deployment plan. This enables the integration and preprocessing of complex data to perform highly accurate crime risk predictions, thereby enabling the generation of effective security force deployment plans.
[1150] "Historical crime data" refers to information about historically recorded crimes, such as the date, location, and type of crime.
[1151] "Climate data" refers to weather information for a specific region or period, such as temperature, precipitation, and wind speed.
[1152] "Social trend data" refers to information obtained from sources such as social media and news that indicates social interest and topics over a specific period of time.
[1153] "Integration" refers to the process of combining data from multiple data sources into a single data set using a common key.
[1154] "Preprocessing" refers to processes used to convert raw data into a format suitable for model training, such as imputing missing values, correcting outliers, and encoding categorical variables.
[1155] A "generative AI model" is a model that uses machine learning or deep learning algorithms to identify specific patterns or predictions from data.
[1156] "Crime risk prediction" refers to using a trained generative AI model to assess the likelihood of a crime occurring in a specific area or time period.
[1157] A "security force deployment plan" is a plan that determines in detail how many security guards will be deployed in which locations and at what times based on predicted crime risks.
[1158] "Notification" refers to transmitting the generated security force deployment plan to relevant agencies such as security companies and the police.
[1159] The present invention is a system that uses past crime data, weather data, and social trend data to predict crime risks and generate an optimal deployment plan for security forces based on the predictions. This system is implemented using the following hardware and software.
[1160] Hardware and software used
[1161] The system is implemented using the following major hardware and software:
[1162] Server: A server with high-performance computing power that collects, integrates, and preprocesses crime data, climate data, and social trend data, as well as trains and updates AI models and performs risk prediction.
[1163] Database: A relational database management system (RDBMS) for storing and managing data.
[1164] AI modeling tools: Tools for training machine learning and deep learning algorithms (e.g., TensorFlow, Scikit-learn).
[1165] API Interface: API for collecting crime data, climate data, and social trend data from external data sources.
[1166] Social Media Analytics Tools: Tools for collecting social trend data.
[1167] Program processing flow
[1168] The server first uses API interfaces to collect crime data from police and security company databases, then calls meteorological agencies' APIs to obtain weather data, and finally uses social media analytics tools to collect social trend data, which are then stored in a database.
[1169] To integrate the collected data, the server joins the data using a common key (usually a date) from each data source. For example, it might combine the number of crimes on a particular date, the temperature and precipitation for that day, and social media trend information. The server then performs preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables.
[1170] Using the preprocessed data, the server uses AI modeling tools to train a generative AI model using machine learning or deep learning algorithms (e.g., random forests, neural networks). After training is complete, the model's performance is evaluated and parameters are adjusted as needed.
[1171] The server then inputs new data sets (such as weather forecast data for the next month or the latest social media trends) into the model to predict the crime risk for a specific area and time period. This prediction indicates the likelihood of a crime occurring.
[1172] Based on the crime risk prediction results, the server generates a specific security force deployment plan, which includes a plan to deploy additional security guards in high-risk areas. The generated security force deployment plan is notified to the terminals of the security company and the police, which receive the plan and provide specific deployment instructions to the security guards.
[1173] Specific examples
[1174] For example, a prompt such as "Predict the crime risk in City A in August and generate an optimal security force deployment plan based on that risk" is input into the generative AI model. The server collects past crime data, weather data, and social media trend data, integrates and preprocesses it, and then trains the AI model. Based on the new data, the crime risk for August is predicted, and a plan is made to increase the number of security guards in high-risk areas. This deployment plan is then notified to the security company's terminal, which issues specific deployment instructions to the security guards.
[1175] This series of processes is expected to result in efficient allocation of security resources and improved crime prevention.
[1176] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1177] Step 1: Data collection
[1178] The server first connects to police and security company databases and collects past crime data via API. This includes detailed information such as the date, location, and type of crime. It then calls the API of a meteorological agency to obtain climate data such as temperature and precipitation for a specific area. It also uses social media analysis tools to collect social trend data for a specific area and period. This data is then stored in a data store within the server.
[1179] Inputs: Police and security company databases, weather agency APIs, social media analytics tools
[1180] Output: Historical crime data, climate data, social trend data
[1181] Step 2: Data integration
[1182] The server integrates the data collected from each data source using a common key (date). For example, it can combine the number of crimes on a specific date, the temperature and precipitation for that day, and social media trend information into a single dataset. This allows information obtained from different data sources to be centralized and consistent.
[1183] Inputs: Historical crime data, climate data, social trend data
[1184] Output: Unified dataset
[1185] Step 3: Data Preprocessing
[1186] The server performs preprocessing on the merged dataset. It imputes missing values using a method such as mean imputation, corrects outliers by detecting and correcting extremely high temperature values, and encodes categorical variables by converting strings to numbers. This prepares the data in a format suitable for model training.
[1187] Input: Unified dataset
[1188] Output: Preprocessed dataset
[1189] Step 4: Training the AI model
[1190] The server uses the preprocessed dataset to train a generative AI model using machine learning or deep learning algorithms, such as random forests or neural networks, to learn crime occurrence patterns from the data. Once training is complete, the server evaluates the model's performance and adjusts hyperparameters as needed.
[1191] Input: Preprocessed dataset
[1192] Output: Trained AI model
[1193] Step 5: Predict crime risk
[1194] The server uses the trained AI model to input new data sets and predict the crime risk in specific areas and times of day, which in turn indicates areas and times when crimes are likely to occur.
[1195] Input: Trained AI model, new dataset (such as next month's weather forecast data or the latest social media trends)
[1196] Output: Crime risk prediction results
[1197] Step 6: Generate a security force deployment plan
[1198] The server generates a security deployment plan based on the predicted crime risk, detailing how many guards should be deployed in which locations and at what times. For example, it might plan to deploy more guards than usual in areas predicted to be high risk.
[1199] Input: Crime risk prediction results
[1200] Output: Security Force Deployment Plan
[1201] Step 7: Notification of results
[1202] The server notifies the security company and police terminals of the generated security force deployment plan. Upon receiving this notification, the terminals issue specific deployment instructions to security guards, allowing them to be deployed efficiently at the designated locations and times.
[1203] Input: Security Force Deployment Plan
[1204] Output: Placement instruction notification
[1205] Through the above steps, complex data can be integrated and preprocessed, crime risk predictions can be made with high accuracy, and effective security force deployment plans can be generated.
[1206] (Application example 1)
[1207] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1208] Conventional security systems formulate security plans based only on past crime data and static data, making it difficult to respond to dynamically changing crime risks. Furthermore, because security guard deployment plans are not updated in real time, it is difficult to allocate resources appropriately. Furthermore, because feedback from the field is not reflected in security plans, it is difficult to constantly adapt to the latest situations.
[1209] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[1210] In this invention, the server includes means for collecting historical crime data, means for collecting climate data, means for collecting social trend data, means for integrating and preprocessing the collected data, means for predicting crime risk based on the integrated and preprocessed data, means for generating a security force deployment plan based on the predicted crime risk, means for notifying the user of the generated security force deployment plan, means for displaying the crime risk in real time, and means for collecting on-site information from security guards and using it to improve the accuracy of the AI model. This makes it possible to respond to dynamically changing crime risks and appropriately deploy resources in real time. Furthermore, the accuracy of the AI model can be improved based on feedback from the field, allowing for the development of security plans that can always adapt to the latest situations.
[1211] "Past crime data" refers to detailed information held by the police and security companies, such as the date, location, and type of crime.
[1212] "Climate data" refers to information about weather conditions such as temperature and precipitation.
[1213] "Social trend data" refers to information about topics and trends on social media and the internet.
[1214] "Integrating and preprocessing" refers to the process of consolidating multiple collected data into one format, filling in missing values, and correcting outliers.
[1215] "Predicting crime risk" refers to using generative AI models to assess the likelihood of crime occurring in a specific area or time period.
[1216] A "security force deployment plan" refers to a plan that determines how many security guards should be deployed in which locations based on predicted crime risks.
[1217] "Notifying" refers to informing security companies and relevant parties of the generated security force deployment plan in real time.
[1218] "Displaying crime risk in real time" refers to instantly visualizing current crime risk on a map or interface.
[1219] "Collecting on-site information from security guards" means feeding back information obtained by security guards on-site into the system and using it as learning data for the AI model.
[1220] "Improving the accuracy of AI models" refers to using on-site information from security guards and newly collected data to improve the AI model's ability to predict crime risks.
[1221] This invention is a system that predicts crime risks based on past crime data, weather data, and social trend data, and then generates optimal deployment plans for security forces based on that data. This system functions through collaboration between servers, terminals, and users.
[1222] Hardware and software used
[1223] Hardware: Servers, users' smartphones
[1224] Software: Python, Requests (library for processing API requests), Geopy (library for processing geographic data), learning model (e.g., random forest)
[1225] Specific processing of the system
[1226] Data collection and preprocessing:
[1227] First, the server collects historical crime data, weather data, and social trend data. These data are obtained via APIs. Specifically, crime data is obtained from police and security company databases, weather data from meteorological agencies, and trend data from social media analysis tools.
[1228] These data are integrated and compiled into a single format, and the integrated data undergoes preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables.
[1229] Crime risk prediction:
[1230] Using the preprocessed data, the server trains a generative AI model, which is trained using random forests and neural networks. The trained model is then used to predict crime risk in specific areas and time periods based on new data.
[1231] Generate security force deployment plan:
[1232] Based on the predicted crime risk, the server generates a security deployment plan, detailing where, how many guards should be deployed, and when. For example, areas predicted to be high risk may be planned to have more guards than usual.
[1233] Real-time notifications and displays:
[1234] The server then notifies the user of the generated security deployment plan via their smartphone, where the user can view the current crime risk on a map in real time and take appropriate action based on the security deployment plan.
[1235] Feedback and learning model updates:
[1236] The user (security guard) feeds information from the scene back to the server via smartphone. The server collects this scene information and uses it to improve the accuracy of the generative AI model. This feedback function allows the creation of security plans that can always adapt to the latest situations.
[1237] Examples:
[1238] For example, to predict crime in City A for August, crime data from August over the past few years, temperature and precipitation data for the area, and trend data on social media are collected. After integrating and preprocessing this data, it is input into a generative AI model for training. Once the model has finished training, it predicts crime risk based on the new August data. As a result, it makes a plan to deploy additional security guards in areas where a high crime risk is predicted, and notifies the security company's terminal of this deployment plan. In this way, resources can be allocated efficiently and crime prevention effectiveness can be improved.
[1239] Example prompt sentence:
[1240] "Enter the following dataset into a generative AI model and predict the risk of crime in Tokyo in August. The dataset includes crime data from the past five years, climate data (temperature, precipitation, etc.), and social media trend data."
[1241] This makes it possible to flexibly respond to dynamically changing crime risks and allocate appropriate resources in real time. Furthermore, the accuracy of the AI model can be improved based on feedback from the field, allowing for the formulation of security plans that can always adapt to the latest situations.
[1242] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1243] Step 1:
[1244] The server collects historical crime data, weather data, and social trend data. Each piece of data is obtained via API. Specifically, crime data is obtained from police and security company databases, weather data is obtained from meteorological agencies, and trend data is collected from social media analysis tools. The input is each piece of data obtained from the API, and the output is the raw data before integration.
[1245] Step 2:
[1246] The server integrates and preprocesses the collected data. Specifically, it combines data using a common key (usually a date) from each data source. For example, it aggregates the number of crimes that occurred on a specific date with that day's temperature, precipitation, and related trend information on social media into a single dataset. It then performs preprocessing such as filling in missing values, correcting outliers, and encoding categorical variables. The input is the collected raw data, and the output is a preprocessed integrated dataset.
[1247] Step 3:
[1248] The server uses the preprocessed data to train a generative AI model for crime prediction. This uses machine learning and deep learning algorithms, and training is performed using random forests and neural networks. The input is the preprocessed dataset, and the output is a trained AI model. Specifically, the data is input into the algorithm and the model parameters are optimized.
[1249] Step 4:
[1250] The server uses the trained generative AI model to input new data and predict crime risk in specific areas and time periods. This prediction is used as an indicator of the likelihood of crime occurring in those areas and time periods. The inputs are current crime, weather, and trend data, and the output is a predicted crime risk for each area and time period.
[1251] Step 5:
[1252] The server generates a specific security force deployment plan based on the predicted crime risk. This plan details how many security guards should be deployed in which locations and at what times. The input is the predicted crime risk, and the output is a detailed security force deployment plan. Specifically, the server performs calculations to deploy more security guards in areas predicted to be high risk.
[1253] Step 6:
[1254] The server notifies the security company or police terminal of the generated security force deployment plan. The terminal receives this and gives specific deployment instructions to the security guards. The input is the security force deployment plan, and the output is a notification message. Specifically, the server sends a message to the terminal via a notification API.
[1255] Step 7:
[1256] Security guards (users) provide feedback from the scene to the server via devices such as smartphones. The server collects this scene information and uses it to improve the accuracy of the generative AI model. The input is feedback information from the scene, and the output is an updated AI model. Specifically, the feedback information is processed and added to the training data for the AI model.
[1257] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[1258] This invention is a system that combines historical crime data, weather data, and social trend data with an emotion engine that recognizes user emotions, predicts crime risk, and generates an optimal deployment plan for security forces based on that. This system is composed of data collection, data integration and preprocessing, AI model training and updating, crime risk prediction, generation of security force deployment plans, and notification of the results, as well as an additional step of collecting emotion data using the emotion engine.
[1259] Data collection
[1260] The server first collects historical crime data, which is obtained through APIs from police and security company databases. The server then collects weather data, which is obtained through APIs from meteorological agencies and includes details such as temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data, which includes information such as the frequency of specific keywords and user sentiment analysis.
[1261] Collecting Emotional Data
[1262] The server uses an emotion engine to collect user emotion data, which is obtained from, for example, social media posts, forums, news comments, etc., and quantifies the user's emotional state (e.g., anger, joy, anxiety, etc.).
[1263] Data Integration and Preprocessing
[1264] The server integrates collected historical crime data, climate data, social trend data, and sentiment data. First, each dataset is joined using a common key (e.g., date) to create a single data frame. The server then performs preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data.
[1265] AI model training and updating
[1266] The server uses the preprocessed data to train a machine learning model. For example, it uses random forests or neural networks to learn crime occurrence patterns from past data. The server then splits a portion of the training data into test data and evaluates the model's performance. After the evaluation, the server adjusts the model's parameters as necessary and retrains it.
[1267] Crime risk prediction
[1268] The server uses the trained model to input new data and predict the crime risk in a specific area and time period. The prediction results are output as a numerical value indicating the likelihood of a crime occurring in that area and time period. Furthermore, user emotional data is also taken into account to verify how the emotional data affects the crime risk. The server adds the prediction results to a data frame and uses them in the next processing step.
[1269] Generate security force deployment plans
[1270] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy more security guards in high-risk areas and at high-risk times. It also takes emotional data into account to include deployment instructions and warnings for security guards. Specifically, it takes into account the predicted crime risk and emotional data to determine in detail how many security guards to deploy in which areas and at what times. The server creates a security force deployment plan based on this information and stores it in a database.
[1271] Notification of results
[1272] The server notifies the security company and police terminals of the generated security force deployment plan. Using an API, it sends the deployment plan details in JSON format. The terminals then analyze the received deployment plan and prepare it for display.
[1273] Display placement instructions
[1274] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[1275] Specific examples
[1276] For example, to predict crime in City A for August, we first collect crime data from August over the past few years, temperature and precipitation data for the area, and social media trend data. We then collect user emotion data, integrate these data, preprocess them, and input them into a generative AI model for training. Once the model has completed training, it predicts crime risk based on the new August data. As a result, a plan is made to deploy additional security guards in areas predicted to have a high crime risk, and this deployment plan is notified to the security company's terminal. This allows for efficient resource allocation and improved crime prevention. Furthermore, by utilizing emotion data and responding sensitively to users' emotional states, we can achieve more accurate crime predictions and countermeasures.
[1277] Through these steps, the present invention realizes crime prediction and optimal deployment of security forces, thereby contributing to the creation of a safe social environment.
[1278] The processing flow will be explained below.
[1279] Step 1: Data collection
[1280] The server first collects past crime data. This is obtained via API from police and security company databases. For example, this includes information such as the date and location of the crime, the type of crime, and the amount of damage. The server also collects weather data. This is obtained via API from meteorological agencies and includes details such as daily temperature, precipitation, and wind speed. The server also uses social media analysis tools to collect social trend data. This includes the frequency of specific keywords and user sentiment analysis.
[1281] Step 2: Collecting emotion data
[1282] The server uses an emotion engine to collect user emotion data. This emotion data is obtained from text data such as social media posts, forums, and news comments, and the emotion engine analyzes it to quantify the user's emotional state (e.g., anger, joy, anxiety, etc.). This allows us to understand emotional trends by region.
[1283] Step 3: Data integration and preprocessing
[1284] The server integrates the collected historical crime data, weather data, social trend data, and sentiment data. Specifically, each dataset is joined using a common key (e.g., date, region) and compiled into a single data frame. It then performs preprocessing such as imputing missing values, correcting outliers, and encoding categorical variables (numeric conversion). For example, missing temperature data can be imputed by estimating it from data from surrounding dates.
[1285] Step 4: Training and updating the AI model
[1286] The server uses the preprocessed data to train a machine learning model. For example, a random forest or neural network can be used. The model is first trained using the training data, and then its performance is evaluated using test data. Metrics such as accuracy, recall, and precision are used for evaluation. If necessary, the model parameters are adjusted and retrained.
[1287] Step 5: Predict crime risk
[1288] The server uses the trained AI model to predict crime risk in specific areas and time periods. It inputs newly collected data (past crime data, weather data, social trend data, and emotion data) into the model and outputs a numerical value representing the risk of crime. The server adds these prediction results to a data frame for use in the next step.
[1289] Step 6: Generate a security force deployment plan
[1290] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy more security guards in areas and time periods predicted to be high risk. Specifically, it determines the number of security guards and deployment times for each area based on the predicted crime risk value. It also takes into account emotional data, aiming to strengthen security in areas where emotions are particularly high.
[1291] Step 7: Notification of results
[1292] The server notifies the security company or police terminal of the generated security force deployment plan. Using an API, it sends the deployment plan details in JSON format. The terminal receives it and parses it appropriately.
[1293] Step 8: View placement instructions
[1294] The terminal displays the security force deployment plan received from the server. The terminal's user interface visually conveys specific deployment instructions to security guards and personnel. For example, the locations of security guard deployments can be marked on a map along with the time of deployment. The terminal receives the latest deployment plan in a timely manner, enabling real-time information updates.
[1295] Example 2
[1296] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1297] Conventional crime prediction systems predict risk using past crime data, weather data, etc., but because they do not take into account social trends or user emotional data, there are limitations to the accuracy of predictions and they are difficult to adapt to actual situations. In addition, security force deployment plans based on prediction results are not fully optimized, making it difficult to deploy security forces effectively.
[1298] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.
[1299] In this invention, the server includes means for collecting past crime data, means for collecting weather data, means for collecting social trend data, means for collecting user emotion data, means for integrating and preprocessing the collected data, means for predicting crime risk using a generative AI model based on the integrated and preprocessed data, means for generating a security force deployment plan based on the prediction results, means for notifying the generated security force deployment plan, and means for displaying the notified security force deployment plan on a terminal. This enables highly accurate crime risk prediction based on the integrated data and optimal security force deployment plans that take social conditions and emotion data into consideration.
[1300] "Past crime data" refers to information about crimes that have occurred in the past that is recorded in databases of the police, security companies, etc.
[1301] "Climate data" is information about weather conditions over a certain period of time, such as temperature, precipitation, and wind speed.
[1302] "Social trend data" is information collected from social media and news sources about the frequency and impact of topics and events over a specific period of time.
[1303] "User emotion data" is information that quantifies a user's emotional state (e.g., anger, joy, anxiety, etc.) collected from social media posts, news comments, etc.
[1304] "Data integration and preprocessing" refers to combining the various collected data using a common key and compiling it into a single data frame, and then performing preprocessing such as filling in missing values, correcting outliers, and converting categorical variables into numeric values.
[1305] A "generative AI model" refers to a mathematical model with artificial intelligence that is trained using machine learning and deep learning techniques to predict crime risk.
[1306] "Crime risk prediction" involves using a trained generative AI model to calculate the numerical probability of a crime occurring in a specific area or time period based on new data.
[1307] A "security force deployment plan" refers to a plan that determines how many security forces to deploy in high-risk areas and during high-risk times based on the results of crime risk predictions.
[1308] "Notification" refers to the act of sending the generated security force deployment plan to security company or police terminals via API.
[1309] "Display on terminal" means displaying the locations and times of security guard deployment on a map using a user interface that visually shows the security force deployment plan received from the server.
[1310] The present invention provides a system that combines past crime data, weather data, social trend data, and user emotion data to predict the risk of crime and generate an optimal security force deployment plan. A specific embodiment of the present invention will now be described.
[1311] The server first collects past crime data from police and security company databases using APIs. For example, it calls a police database API to obtain crime records from the past five years. It also uses a meteorological agency's API to collect detailed climate data such as temperature, precipitation, and wind speed, and obtains past weather patterns for specific cities and regions. It also uses social media analysis tools to collect the frequency of specific keywords and hashtag trends from social media such as Twitter and Facebook.
[1312] Next, the server uses an emotion engine to collect user emotion data. This is obtained in real time from social media posts and news comments, and uses an emotion analysis API (e.g., IBM Watson or Google Cloud Natural Language) to classify user posts into emotional states such as "anger," "joy," and "anxiety." For example, if the hashtag "feeling anxious" is frequently used, the emotional state of that region is added to the data as "anxiety."
[1313] The server combines this collected data using a common key (e.g., date or region) and integrates it into a single data frame. It then estimates and fills in missing values in the data frame using surrounding data, and detects and corrects outliers. For example, if there is missing temperature data, it fills in the missing data with the average temperature data for the preceding and following dates. It also formats categorical variables into a format that is easy to convert to numbers. For example, it converts weather data such as "sunny" and "rainy" into numerical data such as "1" and "0."
[1314] The server uses the preprocessed data to train a machine learning model. Examples of models include random forests and neural networks. This makes it possible to learn crime occurrence patterns from past data and predict future crime risks. The dataset is divided into a training set and a test set, and the model's performance is evaluated. For example, 80% of the training data is used for learning, and the remaining 20% is used for testing. Based on the model's evaluation indicators (e.g., precision and recall), the model's hyperparameters are adjusted and the model is trained again.
[1315] The server inputs new data using the trained generative AI model and numerically predicts the crime risk for a specific area and time period. For example, it inputs weather and trend data for the next month into the model and outputs a crime risk score. It also adjusts the risk score based on user emotion data. For example, if anger is increasing in area A, the risk score for that area is increased.
[1316] The server then generates a security force deployment plan based on the predicted crime risk. It creates a plan to deploy more security guards in high-risk areas and at high-risk times. For example, in areas with a predicted risk score of 80 or higher, it deploys twice the usual number of security guards. This makes it possible to reduce the possibility of crime occurring in areas with increased risk. The generated deployment plan is saved in a database.
[1317] The server then notifies the security company and police terminals of the generated security force deployment plan via API. The deployment plan is sent in JSON format, and the receiving terminal analyzes and displays the data. For example, it may contain details such as "Area A: 10 personnel deployed on August 1st" and "Area B: 5 personnel deployed on August 2nd."
[1318] The device displays the security force deployment plan received from the server through a user interface, visually communicating specific deployment instructions to security guards and personnel. For example, the locations of security guards can be color-coded and marked on a map, along with the time of deployment. The device receives the latest deployment plan in real time and updates it as needed. The device's notification function can be used to quickly communicate deployment changes and additional instructions.
[1319] Specific examples
[1320] For example, the steps to create a crime forecast and police deployment plan for City A in August are as follows:
[1321] 1. The server uses the police database API to collect crime data for August for the past few years.
[1322] 2. The server uses the weather agency's API to collect past temperature and precipitation data for City A.
[1323] 3. The server uses the Twitter API to collect the frequency of occurrence of keywords such as "summer" and "public safety" related to City A, as well as user sentiment data.
[1324] 4. The server aggregates and preprocesses this data into a single data frame using a common key (e.g., date or region).
[1325] 5. The server trains and evaluates a random forest model using the preprocessed data.
[1326] 6. The server uses the trained model to predict the crime risk for the following August and identifies areas and times of high risk.
[1327] 7. The server generates a security guard deployment plan for high-risk areas and notifies the security company's terminal of details such as "Area A: 10 guards deployed on August 1st" and "Area B: 5 guards deployed on August 2nd."
[1328] 8. The terminal displays the received deployment plan on a map, visually providing specific deployment instructions to the security guard.
[1329] Prompt Sentence Examples
[1330] "Predict crime in City A for August and plan the deployment of security guards based on the results."
[1331] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1332] Step 1:
[1333] The server uses APIs to collect past crime data from police and security company databases. Specifically, it sends an API request to retrieve crime records from the past five years. The input to this step is the API request, and the output is JSON-formatted data received as past crime data. This data includes the date, time, location, type, and details of the crime.
[1334] Step 2:
[1335] The server uses the weather agency's API to collect detailed climate data such as temperature, precipitation, and wind speed. Specifically, it retrieves climate data for a specific city or region for the past few years via an API request. The input for this step is the API request, and the output is the received climate data in JSON format. This data includes temperature, precipitation, wind speed, etc. for each date.
[1336] Step 3:
[1337] The server uses social media analysis tools to collect social trend data, including the frequency of specific keywords and user sentiment analysis. Specifically, it uses APIs such as Twitter and Facebook to obtain the frequency and trends of keywords such as "summer" and "public safety." The input for this step is an API request and a list of specific keywords, and the output is JSON-formatted data including the frequency of keyword appearances and user sentiment.
[1338] Step 4:
[1339] The server uses an emotion engine to collect user emotion data. Specifically, data collected from social media posts and news comments is input into an emotion analysis API (e.g., IBM Watson or Google Cloud Natural Language) to quantify the user's emotional state. The input for this step is the user's posted data, and the output is a quantified emotional state.
[1340] Step 5:
[1341] The server integrates historical crime data, climate data, social trend data, and sentiment data using a common key (e.g., date or region). Specifically, each dataset is joined and compiled into a single data frame. The input to this step is each dataset to be integrated, and the output is an integrated data frame. After integration, preprocessing is performed, such as filling in missing values, correcting outliers, and converting categorical variables to numeric values.
[1342] Step 6:
[1343] The server trains a generative AI model using the preprocessed data. Specifically, it uses a random forest or neural network model, splitting the data into training and test datasets for learning. The input for this step is the preprocessed data frame, and the output is a trained generative AI model. The performance of the trained model is evaluated, and hyperparameters are adjusted and retrained as necessary.
[1344] Step 7:
[1345] The server uses the trained generative AI model to predict crime risk in specific areas and time periods based on new data. Specifically, new weather and trend data is input into the model to calculate a crime risk score. The input for this step is new weather and trend data, and the output is a prediction result including a risk score. Furthermore, the risk score is adjusted based on emotion data.
[1346] Step 8:
[1347] The server generates a security force deployment plan based on the predicted crime risk. Specifically, it creates a plan to deploy more security guards in high-risk areas and at high-risk times. For example, in areas with a risk score of 80 or higher, it deploys twice the usual number of security guards. The input to this step is the predicted risk score, and the output is a security force deployment plan. The generated deployment plan is saved in a database.
[1348] Step 9:
[1349] The server notifies the security company and police terminals of the generated security force deployment plan via API. Specifically, it sends data containing details of the deployment plan in JSON format. The input of this step is the generated deployment plan, and the output is the notified deployment plan.
[1350] Step 10:
[1351] The terminal displays the security force deployment plan received from the server through a user interface. Specifically, it marks the deployment locations of security guards on a map and displays them along with the deployment time. The input of this step is the notified deployment plan, and the output is a visually displayed deployment instruction. The terminal receives the latest deployment plan in real time and updates it as needed.
[1352] (Application example 2)
[1353] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1354] Conventional security systems could predict crime risks by utilizing past crime data, weather data, and social trend data, but because they did not take into account user emotional data, the accuracy of risk predictions was insufficient. Furthermore, there was a lack of means to appropriately notify security guards of predicted risk information in real time and effectively deploy security personnel. Furthermore, notification methods were limited, often making it difficult to respond immediately on-site. Therefore, there is a need to build a system that can improve the accuracy of crime prevention and enable immediate response.
[1355] The identification processing by the identification processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for collecting past crime data, means for collecting weather data, means for collecting social trend data, and means for collecting user emotion data. This realizes a system including means for integrating and preprocessing the collected data, means for predicting crime risk based on the integrated and preprocessed data, means for generating a security force deployment plan based on the predicted crime risk, means for notifying the generated security force deployment plan, and means for displaying the notified security force deployment plan on a smart device. This enables highly accurate crime risk prediction in real time and rapid and appropriate security force deployment.
[1356] "Past crime data" is detailed information about crimes that have occurred in the past recorded by police agencies and security companies.
[1357] "Climate data" refers to detailed weather information such as temperature, precipitation, and wind speed provided by meteorological agencies.
[1358] "Social trend data" is information such as the frequency of occurrence of specific keywords or topics, and user interests, collected from social media, news sites, etc.
[1359] "User emotion data" is information that quantifies a user's emotional state (e.g., anger, joy, anxiety, etc.) collected from social media posts, news comments, forums, etc.
[1360] "Means for integrating and preprocessing data" refers to methods for combining different types of collected data into a single data frame, completing missing values, correcting outliers, and converting categorical variables into numeric values.
[1361] The "means for predicting crime risk" is a method that uses a machine learning model based on integrated and preprocessed data to output a numerical value indicating the likelihood of a crime occurring in a specific area or time period.
[1362] The "means for generating a security force deployment plan" is a method for specifically determining the deployment of security personnel in high-risk areas and time periods based on the predicted crime risk.
[1363] The "means for notifying the security force deployment plan" is a method for sending the generated security force deployment plan to a terminal of a security company or police, and conveying deployment instructions to the person in charge.
[1364] A "smart device" is a portable electronic device that can connect to the Internet and install applications, and examples include smart glasses and smartphones.
[1365] A "generative AI model" is a machine learning algorithm trained on historical data that is used to predict crime risk.
[1366] The system for implementing this invention integrates past crime data, weather data, social trend data, and user emotion data to predict crime risks and generate effective deployment plans for security forces. Specific examples are described below.
[1367] The system mainly consists of a server, smart devices (e.g., smart glasses, smartphones), and an API for data collection. The server has the following means:
[1368] Hardware and software used
[1369] Hardware:
[1370] Server (e.g. AWS EC2)
[1371] Smart devices (e.g., smart glasses, smartphones)
[1372] software:
[1373] Data Collection API
[1374] Data integration tools (Pandas, NumPy)
[1375] Machine learning libraries (e.g. TensorFlow, PyTorch)
[1376] Sentiment analysis engine (e.g. Azure Cognitive Services Emotion API)
[1377] Notification system (Firebase Cloud Messaging)
[1378] Step 1: Data collection
[1379] The server first collects historical crime data, weather data, social trend data, and user sentiment data through APIs, which are obtained in real time or periodically from their respective sources (police agencies, meteorological agencies, social media analysis tools, etc.).
[1380] Step 2: Data integration and preprocessing
[1381] The server aggregates the different types of collected datasets into a single data frame by using a common key (e.g., date), and performs preprocessing using Pandas and NumPy, such as imputing missing values, correcting outliers, and converting categorical variables to numeric values.
[1382] Step 3: Training and updating the AI model
[1383] The server uses the preprocessed data to train machine learning models. It uses TensorFlow and PyTorch to train random forests and neural networks to create crime risk prediction models. After evaluating the model's performance, it adjusts parameters and retrains it as needed.
[1384] Step 4: Predict crime risk
[1385] The trained model is used to predict crime risk in specific areas and time periods. New data is input and a risk assessment is performed. User emotional data is also taken into account to analyze how emotional state affects the risk of crime.
[1386] Step 5: Generate a security force deployment plan
[1387] The server generates a security force deployment plan based on the predicted crime risk, deploying additional security personnel in high-risk areas and during high-risk times, including analyzing the emotion data to create a more effective deployment plan.
[1388] Step 6: Notification of results
[1389] The generated security force deployment plan is sent from the server to the security company and police terminals, and details of the deployment plan are sent to smart devices using Firebase Cloud Messaging.
[1390] Step 7: View placement instructions
[1391] The deployment plan is then displayed on the smart device's HUD (head-up display), allowing security guards to check risk areas and security instructions in real time, enabling them to respond quickly.
[1392] Specific examples
[1393] If an area in City X is judged to be at increased risk of crime, the server generates instructions to deploy additional security guards in that area. The server makes predictions by integrating past crime data, weather information, social media trends, and user emotion data. For example, if emotions such as "anger" or "anxiety" are rising in a particular area, the crime risk in that area may increase. Based on this information, an optimal security force deployment plan is generated and notified to smart devices.
[1394] Prompt Sentence Examples
[1395] An example prompt for predicting crime risk using new data is:
[1396] import requests
[1397] import pandas as pd
[1398] from sklearn.model_selection import train_test_split
[1399] from sklearn.ensemble import RandomForestClassifier
[1400] import tensorflow as tf
[1401] Step 1: Data Collection
[1402] crime_data = requests.get('https: / / api.example.com / crime_data').json()
[1403] climate_data = requests.get('https: / / api.weatherapi.com / v1 / current.json?key=YOUR_API_KEY&q=Tokyo').json()
[1404] social_trend_data = requests.get('https: / / api.socialmedia.com / trends').json()
[1405] emotion_data = requests.get('https: / / api.azure.com / emotion').json()
[1406] Step 2: Data integration and preprocessing
[1407] df_crime = pd.DataFrame(crime_data)
[1408] df_climate = pd.DataFrame(climate_data)
[1409] df_social_trend = pd.DataFrame(social_trend_data)
[1410] df_emotion = pd.DataFrame(emotion_data)
[1411] merged_data = df_crime.merge(df_climate, on='date').merge(df_social_trend, on='date').merge(df_emotion, on='date')
[1412] Missing value imputation and preprocessing
[1413] merged_data.fillna(method='ffill', inplace=True)
[1414] Step 3: Training and updating the AI model
[1415] X = merged_data.drop(columns=['crime_risk'])
[1416] y = merged_data['crime_risk']
[1417] X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
[1418] clf = RandomForestClassifier()
[1419] clf.fit(X_train, y_train)
[1420] Step 4: Real-time crime risk prediction and display
[1421] def predict_crime_risk(new_data):
[1422] risk = clf.predict(new_data)
[1423] return risk
[1424] Notifications on smart glasses
[1425] def notify_to_smart_glass(risk_area, risk_level):
[1426] Notifications using Firebase Cloud Messaging
[1427] placeholder code
[1428] print(f"Area: {risk_area}, Risk Level: {risk_level}")
[1429] The server periodically retrieves new data and updates the model.
[1430] Prompt statement
[1431] new_data = pd.DataFrame([{
[1432] 'temp': 30,
[1433] 'rain': 5,
[1434] 'wind': 3,
[1435] 'social_trend': 7,
[1436] 'emotion': 'anxiety'
[1437] }])
[1438] risk = predict_crime_risk(new_data)
[1439] if risk > 0.7:
[1440] notify_to_smart_glass('Area1', risk)
[1441] In this way, the server can integrate various data to generate highly accurate crime risk predictions and security force deployment plans. Security guards can receive information in real time using devices such as smart glasses, enabling them to respond quickly and effectively.
[1442] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1443] Step 1: Data collection
[1444] The server first collects historical crime data, weather data, social trend data, and user sentiment data through APIs. Specifically, the server obtains crime data from the police agency's API and weather data from the meteorological agency's API. It then obtains social trend data using a social media analysis tool and collects user sentiment data using a sentiment analysis engine. The raw data obtained from the API is used as input, and an unprocessed dataset is obtained as output.
[1445] Step 2: Data integration and preprocessing
[1446] The server integrates the different types of collected datasets using a common key (e.g., date) and stores them in a single data frame. It uses Pandas and NumPy to perform preprocessing such as imputing missing values, correcting outliers, and converting categorical variables to numeric values. For example, missing temperature data can be imputed by estimating it from surrounding data. The input is a variety of raw datasets, and the output is a preprocessed integrated data frame.
[1447] Step 3: Training and updating the AI model
[1448] The server uses the preprocessed data to train a machine learning model. It uses TensorFlow and PyTorch to train a random forest or neural network to create a crime risk prediction model. After evaluating the model's performance, it adjusts parameters and retrains as necessary. The input is the preprocessed integrated data frame, and the output is a trained AI model.
[1449] Step 4: Predict crime risk
[1450] The server uses the trained AI model to predict crime risk in a specific area and time period based on new data. It inputs a new dataset and obtains a risk score output from the model. It also incorporates user sentiment data to further refine the risk assessment. The input is a new raw dataset, and the output is a crime risk score.
[1451] Step 5: Generate a security force deployment plan
[1452] The server generates a security force deployment plan based on the predicted crime risk. It plans to deploy additional security personnel in high-risk areas and during high-risk times. It also incorporates the results of emotion data analysis to create a more effective deployment plan. The input is a crime risk score, and the output is a security force deployment plan.
[1453] Step 6: Notification of results
[1454] The server notifies the security company and police terminals of the generated security force deployment plan. Firebase Cloud Messaging is used to notify smart devices of the deployment plan details. The input is the security force deployment plan, and the output is a notification message.
[1455] Step 7: Display placement instructions
[1456] The terminal displays the notified security force deployment plan on the smart device's HUD (head-up display). Security guards can check risk areas and security instructions in real time, enabling them to respond quickly. The input is the notification message, and the output is the deployment instructions displayed on the HUD.
[1457] The specific processing unit 290 transmits the result of the specific processing to the robot 414. In the robot 414, the control unit 46A causes the speaker 240 and the control target 443 to output the result of the specific processing. The microphone 238 acquires voice indicating a user input regarding the result of the specific processing. The control unit 46A transmits voice data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the voice data.
[1458] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1459] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the robot 414.
[1460] The emotion identification model 59 as an emotion engine may determine the user's emotion according to a specific mapping. Specifically, the emotion identification model 59 may determine the user's emotion according to an emotion map (see FIG. 9), which is a specific mapping. Similarly, the emotion identification model 59 may determine the robot's emotion, and the identification processing unit 290 may perform identification processing using the robot's emotion.
[1461] FIG. 9 is a diagram illustrating an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and actions arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.
[1462] These emotions are distributed in the 3 o'clock direction on emotion map 400, and typically fluctuate between relief and anxiety. In the right half of emotion map 400, situational awareness dominates over internal sensations, resulting in a sense of calm.
[1463] The inside of emotion map 400 represents what is going on in the mind, and the outside of emotion map 400 represents behavior, so the further you go outside emotion map 400, the more visible the emotions become (the more they are expressed in behavior).
[1464] Human emotions are based on various balances, such as posture and blood sugar levels. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. Emotions can also be created for robots, automobiles, and motorcycles, based on various balances, such as posture and remaining battery life. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. An emotion map can be generated, for example, based on Dr. Mitsuyoshi's emotion map (Research on Voice Emotion Recognition and Emotional Brain Physiological Signal Analysis Systems, Tokushima University, Doctoral Dissertation: https: / / ci.nii.ac.jp / naid / 500000375379). The left half of the emotion map lists emotions belonging to the "reaction" domain, where sensation is dominant. The right half of the emotion map lists emotions belonging to the "situation" domain, where situational awareness is dominant.
[1465] The emotion map defines two emotions that promote learning. One is a negative emotion on the situation side, around the middle of "repentance" or "reflection." In other words, this occurs when the robot experiences negative emotions such as "I never want to feel this way again" or "I don't want to be scolded again." The other is a positive emotion on the response side, around "desire." In other words, this occurs when the robot experiences positive feelings such as "I want more" or "I want to know more."
[1466] The emotion identification model 59 inputs user input into a pre-trained neural network, obtains emotion values indicating each emotion shown in the emotion map 400, and determines the user's emotion. This neural network is pre-trained based on multiple pieces of training data that are combinations of user input and emotion values indicating each emotion shown in the emotion map 400. Furthermore, this neural network is trained so that emotions that are located close to each other have similar values, as in the emotion map 900 shown in FIG. 10. FIG. 10 shows an example in which multiple emotions, "relieved," "calm," and "reassuring," have similar emotion values.
[1467] The system according to the present disclosure has been described above mainly with respect to the functions of the data processing device 12, but the system according to the present disclosure is not necessarily implemented on a server. The system according to the present disclosure may be implemented as a general information processing system. The present disclosure may be implemented, for example, as a software program running on a personal computer or an application running on a smartphone, etc. The method according to the present disclosure may be provided to users in the form of SaaS (Software as a Service).
[1468] In the above embodiment, an example was given in which the specific processing is performed by one computer 22, but the technology of the present disclosure is not limited to this, and the specific processing may be distributed and performed by a plurality of computers including the computer 22. For example, the data generation model 58 may be provided in an external device of the data processing device 12, and data may be generated in the external device in accordance with input dat...
Claims
1. a means of collecting historical crime data; a means for collecting climate data; a means of collecting social trend data; means for integrating and pre-processing the collected data; means for predicting crime risk based on the integrated and pre-processed data; means for generating a security force deployment plan based on the predicted crime risk; A system including a means for notifying the generated security force deployment plan.
2. 2. The system of claim 1, wherein the security force deployment plan determines the deployment of security personnel in a particular area and at a particular time period.
3. 10. The system of claim 1, further comprising means for predicting crime risk using a generative AI model.
Citation Information
Patent Citations
Persona chatbot control method and system
JP2022180282A