A public behavior early warning method and system under extreme meteorological disasters
By using network crawlers to obtain data in extreme meteorological disasters, establishing a database of entity attribute relationship maps and training machine learning models, the problems of one-sidedness and prediction limitations in traditional methods are solved, and a comprehensive understanding of public behavior and real-time prediction are achieved. Improved coping skills.
Patent Information
- Application Number
- CN202410597318.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-05-14
AI Technical Summary
Traditional emergency response methods lack in-depth exploration of entity relations in extreme meteorological disasters, resulting in one-sided information and limitations in predicting public behavior and risk assessment.
By obtaining historical and real-time data based on web crawlers, extracting relevant features, establishing an entity attribute relationship map database, and using machine learning models for training, combining real-time data for public behavior prediction and risk assessment, and sending alert information to take emergency measures.
A comprehensive understanding and real-time prediction of public behavior in extreme meteorological disasters is achieved, rapid decision-making support is provided, and response capabilities and emergency response efficiency are improved.
Smart Images

Figure CN118446524B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer data mining, and in particular to a method and system for early warning of public behavior under extreme meteorological disasters. Background Art
[0002] In recent years, extreme weather disasters have occurred frequently, such as heavy rain, heavy snow, high temperature, strong wind, etc. In this context, studying an effective public behavior prediction and early warning method has become an urgent need to improve society's response capabilities.
[0003] However, traditional emergency response methods usually focus on a single type of data, which leads to one-sidedness and insufficiency of information. In addition, traditional emergency response methods usually lack in-depth mining of entity relationships in the analysis of emergency data. In addition, traditional emergency response methods usually have limitations in predicting public behavior and conducting risk assessments. Summary of the invention
[0004] In order to solve the technical problems existing in the prior art, the embodiment of the present invention provides a method and system for early warning of public behavior under extreme meteorological disasters. The technical solution is as follows:
[0005] On the one hand, a method for early warning of public behavior under extreme meteorological disasters is provided, which is implemented by a public behavior early warning device under extreme meteorological disasters, and the method includes:
[0006] S1. Obtain historical and real-time data related to emergencies based on web crawlers;
[0007] Wherein, the historical data includes historical text data and historical picture data;
[0008] Wherein, the real-time data includes real-time text data and real-time picture data;
[0009] S2, extracting the relevant features of the historical data related to the emergency, environment, public and behavior to obtain the historical data features, and at the same time, extracting the relevant features of the real-time data related to the emergency, environment, public and behavior to obtain the real-time data features;
[0010] Analyze the characteristics of the historical data to obtain historical entity attribute relationship graph data;
[0011] S3, establishing an entity attribute relationship graph database according to the historical entity attribute relationship graph data;
[0012] S4, matching the real-time data features with the entity attribute relationship graph database to obtain a real-time entity attribute relationship graph;
[0013] S5. Use historical data to train the machine learning model, input real-time data into the trained machine learning model, and combine the output of the trained machine learning model with the real-time entity attribute relationship graph to obtain real-time public behavior prediction information;
[0014] S6. Combining the output of the trained machine learning model with the real-time public behavior prediction information to obtain real-time risk assessment prediction indicators;
[0015] S7, determining whether the real-time risk assessment prediction indicator is higher than a preset threshold;
[0016] If it is higher than the preset threshold, an alarm message is sent and emergency measures are taken according to the alarm message;
[0017] Otherwise, repeat S1.
[0018] Optionally, extracting relevant features of the historical data related to emergencies, environment, the public and behavior in S2 to obtain historical data features, and analyzing the historical data features to obtain historical entity attribute relationship graph data includes:
[0019] According to natural language processing technology, historical text data is segmented, part-of-speech tagged and named entity recognized to obtain historical text data after natural language processing;
[0020] Based on the historical text data after natural language processing, extract the relevant features of the emergency, environment, public and behavior, as well as the historical public attitude feedback information on the emergency, to obtain the historical text data features;
[0021] The keywords of the relevant characteristics of the emergency, environment, public and behavior include: time of the event, location, event type and social media hot words;
[0022] Based on computer vision technology, the historical image data is processed to obtain relevant features of the emergency, environment, public and behavior, as well as environmental information when the emergency occurred and public behavior information when the emergency occurred, to obtain historical image data features;
[0023] Obtaining historical data features according to historical text data features and historical image data features;
[0024] Based on the keywords in the historical data features, historical public attitude feedback information on emergencies, environmental information when emergencies occur, and public behavior information when emergencies occur, natural language processing technology is used to establish the association between events, environment and behavior, and obtain historical entity attribute relationship graph data.
[0025] Optionally, the historical public attitude feedback information on emergencies includes:
[0026] Information about news reports and social media comments, as well as information about actual public behavior;
[0027] The actual behavior information of the public includes: text information of material donations and information on the number of people involved in the rescue;
[0028] The environmental information when the incident occurs includes: weather information and traffic information when the emergency occurs;
[0029] The public behavior information when the emergency occurs includes: video information of volunteers rescuing.
[0030] Optionally, the training of the machine learning model using historical data in S5 includes:
[0031] The BERT model is trained by the historical text data and the CNN model is trained by the historical image data;
[0032] The training of the BERT model using the historical text data includes:
[0033] S5011, read historical text data and establish a historical text data set;
[0034] S5012, dividing the established historical text data set into a text training data set and a text verification data set;
[0035] S5013, training the BERT model using the text training data set to obtain a text loss function;
[0036] S5014. Evaluate the performance of the BERT model using the text verification data set, and adjust the parameters of the BERT model according to the performance evaluation result of the BERT model until the attitude feedback information predicted by the BERT model is consistent with the actual attitude feedback information.
[0037] Optionally, the training of the CNN model using historical image data includes:
[0038] S5021. Read historical picture data and establish a historical picture data set;
[0039] S5022, dividing the historical picture data set into a picture training data set and a picture verification data set;
[0040] S5023, training the CNN model using the image training data set to obtain an image loss function;
[0041] S5024. Evaluate the performance of the CNN model through the image verification data set, and adjust the parameters of the CNN model according to the performance evaluation results of the CNN model, until the environmental information when the emergency event occurs predicted by the CNN model is consistent with the environmental information when the actual historical emergency event occurs, and the public behavior information when the emergency event occurs is consistent with the public behavior information of the actual historical emergency events.
[0042] Optionally, the step of inputting the real-time data into a trained machine learning model in S5, and combining the output result of the trained machine learning model with the real-time entity attribute relationship graph to obtain real-time public behavior prediction information includes:
[0043] S5031. Read the prediction information of the model, where the prediction information of the model includes: the attitude feedback information predicted by the BERT model, and the environmental information when the emergency occurs and the public behavior information when the emergency occurs predicted by the CNN model;
[0044] S5032, inputting the prediction information of the model into the real-time entity attribute relationship map to obtain real-time public behavior prediction information;
[0045] The real-time public behavior prediction information includes the predicted amount of material donations and the predicted number of people participating in the rescue.
[0046] Optionally, the real-time risk assessment prediction index obtained by combining the output result of the trained machine learning model and the real-time public behavior prediction information in S6 includes:
[0047] S601, reading the predicted amount of donated materials, the predicted number of people involved in rescue, and the environmental information when the emergency occurs, performing sum calculation, and obtaining an evaluation value;
[0048] The environmental information when the emergency occurs includes: weather information when the emergency occurs and traffic information indicators when participating in rescue;
[0049] S602, calculating the ratio of the predicted material donation quantity, the predicted number of people participating in the rescue, and the environmental information when the emergency occurs to the evaluation value, respectively, to obtain the proportional coefficient of the predicted material donation quantity, the proportional coefficient of the predicted number of people participating in the rescue, and the proportional coefficient of the environmental information when the emergency occurs;
[0050] S602, respectively calculating the ratios with the evaluation and the value, and using the obtained ratio results as corresponding proportional coefficients;
[0051] The predicted amount of material donations, the predicted number of people involved in the rescue, and the environmental information when the emergency occurs are multiplied by the corresponding proportional coefficients and then summed to obtain the real-time risk assessment prediction index.
[0052] Optionally, the calculation formula of the real-time risk assessment prediction index of S6 is formula (1):
[0053] ; (1)
[0054] in, For real-time risk assessment predictive indicators, For the predicted amount of material donations, is the estimated number of rescuers involved. For weather information in case of emergencies, Traffic information indicators for participating in rescue operations. for The proportionality coefficient, for The proportionality coefficient, for The proportionality coefficient, for The proportionality factor.
[0055] Optionally, taking emergency measures according to the alarm information in S7 includes:
[0056] When the predicted amount of donated materials in the alarm information is higher than the set threshold and the predicted number of people participating in the rescue is lower than the set threshold, emergency measures are implemented to increase the number of people participating in the rescue;
[0057] When the weather information at the time of the emergency in the alarm information is not within the threshold range, weather response measures 1 to 7 are taken:
[0058] Weather response measure 1: When the temperature is higher than the set high temperature threshold, a sprinkler truck will be dispatched to spray water and cool down the area where the emergency occurred;
[0059] Weather response measure 2: When the temperature is below the set low temperature threshold, take measures to send clothes and hot water to the emergency site;
[0060] Weather response measure three: When the wind force is higher than the set wind force threshold, take measures to mobilize personnel to evacuate the people at the location where the emergency occurs;
[0061] Weather response measure 4: When the rainy weather is higher than the set maximum rainy day threshold, measures such as sending raincoats to the emergency area and unclogging sewers are taken;
[0062] Weather response measure 5: When the snowy weather is higher than the set maximum snowy threshold, measures such as spreading salt on roads around the emergency site, delivering clothes, and delivering hot water will be taken;
[0063] Weather response measure six: When the traffic information index during rescue is higher than the set corresponding threshold, measures will be taken to mobilize traffic personnel to evacuate traffic in the area of the emergency.
[0064] On the other hand, a public behavior warning system under extreme meteorological disasters is provided, comprising a data acquisition unit, an extraction unit, a building unit, a matching unit, a training unit, a calculation unit and an output unit connected in sequence;
[0065] A data collection unit, used to obtain historical data and real-time data related to the emergency based on a web crawler; the historical data includes historical text data and historical image data; the real-time data includes real-time text data and real-time image data;
[0066] An extraction unit is used to extract the relevant features of the historical data and the emergency, environment, public and behavior to obtain the historical data features, and extract the relevant features of the real-time data and the emergency, environment, public and behavior to obtain the real-time data features; analyze the historical data features to obtain the historical entity attribute relationship graph data;
[0067] An establishing unit, used for establishing an entity attribute relationship graph database according to the historical entity attribute relationship graph data;
[0068] A matching unit, used to match the real-time data features with the entity attribute relationship graph database to obtain a real-time entity attribute relationship graph;
[0069] A training unit is used to train the machine learning model using historical data, input real-time data into the trained machine learning model, and combine the output results of the trained machine learning model with the real-time entity attribute relationship map to obtain real-time public behavior prediction information;
[0070] A computing unit, used to combine the output of the trained machine learning model with the real-time public behavior prediction information to obtain real-time risk assessment prediction indicators;
[0071] An output unit, used to determine whether the real-time risk assessment prediction indicator is higher than a preset threshold;
[0072] If it is higher than the preset threshold, an alarm message is sent and emergency measures are taken according to the alarm message;
[0073] Otherwise, return to the data collection unit. On the other hand, a public behavior warning device under extreme meteorological disasters is provided, and the public behavior warning device under extreme meteorological disasters comprises: a processor; a memory, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, any one of the public behavior warning methods under extreme meteorological disasters described above is implemented.
[0074] On the other hand, a computer-readable storage medium is provided, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned methods for warning public behavior under extreme meteorological disasters.
[0075] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0076] In the above scheme, by comprehensively utilizing historical and real-time data, extracting key features from text and image information, and establishing an entity attribute relationship graph database, the system can more comprehensively understand the relationship between events, environment, the public, and behavior. The training of machine learning models further enhances the intelligence of the system, enabling it to predict the public's behavior in real time and provide rapid decision support through risk assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0078] Figure 1 is a flow chart of a method for early warning of public behavior under extreme meteorological disasters provided by an embodiment of the present invention;
[0079] Figure 2 is a structural schematic diagram of a public behavior early warning system under extreme meteorological disasters provided by an embodiment of the present invention;
[0080] Figure 3 It is a structural schematic diagram of a public behavior early warning device under extreme meteorological disasters provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0081] The technical solution of the present invention is described below in conjunction with the accompanying drawings.
[0082] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0083] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.
[0084] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.
[0085] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0086] The embodiment of the present invention provides a method for warning public behavior under extreme weather disasters. The method can be implemented by a device for warning public behavior under extreme weather disasters. The device for warning public behavior under extreme weather disasters can be a terminal or a server. Figure 1 The flowchart of the public behavior early warning method under extreme meteorological disasters shown in the figure, the processing flow of the method may include the following steps:
[0087] S1. Obtain historical and real-time data related to emergencies based on web crawlers;
[0088] Wherein, the historical data includes historical text data and historical picture data;
[0089] The real-time data includes real-time text data and real-time picture data.
[0090] In this step, web crawler refers to an automated program used to browse and collect information on the Internet and extract required data from web pages. Historical text data refers to previous text information about emergencies, such as news reports and social media posts. Historical image data refers to image information related to emergencies in the past. Real-time text data refers to current text information related to emergencies, such as the latest news and social media updates. Real-time image data refers to image information related to emergencies acquired in real time. Entity attribute relationship graph refers to a graphical structure describing the relationship between emergencies, environment, public, and behavior entities in historical data.
[0091] S2, extracting the relevant features of the historical data related to the emergency, environment, public and behavior to obtain the historical data features, and at the same time, extracting the relevant features of the real-time data related to the emergency, environment, public and behavior to obtain the real-time data features;
[0092] The historical data characteristics are analyzed to obtain historical entity attribute relationship graph data.
[0093] The extracting of the features related to the emergency, environment, public and behavior in the historical data in S2 to obtain the features of the historical data, and analyzing the features of the historical data to obtain the historical entity attribute relationship graph data includes:
[0094] S201, performing word segmentation, part-of-speech tagging and named entity recognition processing on the historical text data according to natural language processing technology to obtain the historical text data after natural language processing;
[0095] Natural language processing technology refers to technology in the field of computer science, which is a computer algorithm used to process and analyze human language. Word segmentation refers to the process of dividing continuous text into meaningful words or phrases. Part-of-speech tagging refers to labeling each word in the text with its grammatical part of speech in the sentence, such as noun, verb, and adjective. Named entity recognition refers to identifying proper nouns in the text, such as names of people, places, and organizations. Historical text data refers to previous text information about emergencies, such as news reports, social media posts, the time, place, and type of events. Social media hot words refer to the time, place, and type related to emergencies and the words that have caused heated discussions on social media.
[0096] S202, based on the historical text data after natural language processing, extract relevant features related to emergencies, environment, public and behavior, as well as historical public attitude feedback information on emergencies, to obtain historical text data features, mainly based on the processed historical text data, extract relevant features related to emergencies, environment, public and behavior, including the time, location, event type, and social media hot words of the event, and perform sentiment analysis to obtain historical public attitude feedback information on emergencies;
[0097] The keywords of the relevant characteristics of the emergency, environment, public and behavior include: time of the event, location, event type and social media hot words;
[0098] Sentiment analysis refers to the automatic identification of emotions in texts, such as positive, negative or neutral, through algorithms. Historical public attitude feedback information on emergencies refers to the public's comments and feedback on emergencies in historical texts, reflecting their emotions and attitudes.
[0099] In this step, the attitude feedback information is specifically descriptive information related to historical emergencies, news reports, comment information on social media, and actual public behavior information. The actual public behavior information is specifically text information on material donations and information on the number of people involved in rescue. The environmental information when historical emergencies occurred is specifically weather information and traffic information when historical emergencies occurred. The public behavior information when historical emergencies occurred is specifically video information of volunteer rescue.
[0100] The attitude feedback information refers to descriptive information, news reports, comment information on social media, and actual behavior information of the public related to historical emergencies. Historical emergencies refer to emergency events or crises that occurred previously. Descriptive information refers to text content that describes the details of historical emergencies, including the nature and impact of the events. News reports refer to news articles or reports on historical emergencies published by media organizations. Comment information on social media refers to the opinions, comments, and feedback on historical emergencies posted by the public on social media platforms. Actual behavior information of the public refers to the actual actions taken by the public in historical emergencies, including text information on material donations and information on the number of people involved in rescue operations, and information on the number of people who participated in the rescue operations. Text information refers to information about donated materials conveyed by the public in text form, including the items and quantities donated. Information on the number of people participating in the rescue indicates the actual number of people participating in the rescue of emergencies, reflecting the collaborative efforts of the community. Environmental information when historical emergencies occur refers to the specific environmental conditions when the emergencies occur, including weather information and traffic information. Weather information refers to weather conditions when the emergencies occur, such as temperature and precipitation, which have a significant impact on the events. Traffic information refers to traffic conditions when the emergencies occur, including road blockages and traffic jams. Public behavior information when historical emergencies occur refers to visual information on volunteer rescue, recording scenes of the public actively participating in rescue in historical events.
[0101] In this implementation scheme, since the attitude feedback information is specifically descriptive information related to historical emergencies, news reports, comment information on social media, and actual public behavior information, the attitude feedback information provides attitude feedback information from multiple angles and sources, which helps to more comprehensively understand the public's feelings and reactions to emergencies. By integrating feedback from different channels, the impact of historical emergencies on public attitudes can be more accurately grasped, providing more in-depth emotional information for establishing a historical entity attribute relationship map. Since the actual public behavior information is specifically text information on material donations, the actual public behavior information provides actual behavior information, reflecting the public's specific response to the emergency, rather than just based on speech. In addition, the addition of actual behavior information helps to more intuitively understand the public behavior pattern, provides substantial behavioral data for the model, and improves the practicality of the historical entity attribute relationship map. The environmental information at the time of occurrence is specifically the weather information, traffic information, and building status information when the historical emergency occurred. Therefore, the environmental information when the historical emergency occurred provides specific background information when the historical event occurred, which helps to understand the factors behind the public behavior. Moreover, weather, traffic and building status information can affect public behavior. Including these environmental information in the analysis scope helps to more comprehensively understand the impact of historical events on public behavior and improve the comprehensiveness of the map. Since the public behavior information when the historical emergency occurred is specifically the picture information of the evacuated crowd and the picture information of the volunteer rescue, the public behavior information when the historical emergency occurred provides an intuitive scene presentation, increases the visualization information of the public behavior when the historical event occurred, and adds image information to the historical entity attribute relationship map, which helps the model to more vividly understand the actual behavior of the public in the emergency and establishes a more specific visual foundation for prediction.
[0102] S203. Based on computer vision technology, the historical image data is processed to obtain relevant features of the emergency, environment, public and behavior, as well as environmental information when the emergency occurs and public behavior information when the emergency occurs, to obtain historical image data features.
[0103] Computer vision technology refers to the technical field of using computers to analyze and understand images or videos. Historical image data refers to image information related to past emergencies. The environmental and public behavior information at the time of historical emergencies means that the environmental conditions at the time of the emergency and the public's behavior are reflected in the images.
[0104] S204, obtaining historical data features according to historical text data features and historical image data features;
[0105] S205. Based on the keywords in the historical data features, historical public attitude feedback information on emergencies, environmental information when emergencies occur, and public behavior information when emergencies occur, natural language processing technology is used to establish the association between events, environments, and behaviors to obtain historical entity attribute relationship graph data.
[0106] Keywords and phrases represent words or phrases that are of special importance or express specific meanings in the text. The association between events, environments, and behaviors represents the establishment of connections and relationships between events, environments, and behaviors in the text by analyzing keywords, phrases, and sentiment information. The historical entity attribute relationship graph represents the visualization of event, environment, public, and behavior entities and the associations between them into a graphical structure.
[0107] In this implementation scheme, based on natural language processing technology, historical text data is processed by word segmentation, part-of-speech tagging, and named entity recognition. This step can accurately extract key information from historical texts and identify important elements of events, places, and time through word segmentation, part-of-speech tagging, and named entity recognition, thereby improving the structural degree of text data, making subsequent associations and analysis more accurate, and laying the foundation for building an entity attribute relationship map. Based on the processed historical text data, relevant features related to emergencies, environments, the public, and behaviors are extracted, including the time, location, event type, and social media hot words of the event, and sentiment analysis is performed to obtain historical public attitude feedback information on emergencies. This step provides more comprehensive historical text information, including time, location, and event type. It also reveals the public's attitude feedback through sentiment analysis and enriches the level of historical data. This step provides more information for building a detailed and specific entity attribute relationship map, enabling the system to more comprehensively understand the impact of historical events on public behavior. Based on computer vision technology, historical image data is The data is processed and relevant features of emergencies, environment, public and behavior are extracted, including the environment and public behavior information when historical emergencies occurred. This step uses image processing technology to intuitively capture the environment and public behavior when historical events occurred, and provides rich visual information. This step makes the historical data more three-dimensional by combining text and image information, adds multimodal data to the establishment of entity attribute relationship maps, and makes the relationship more comprehensive. According to the extracted keywords and phrases, historical public attitude feedback information on emergencies, and the environment and public behavior information when historical emergencies occurred, and based on natural language processing technology, the association between events, environment and behavior is established to form a historical entity attribute relationship map. This step integrates text, images, and attitude feedback information, and establishes the association between these information through natural language processing technology to form a more comprehensive historical entity attribute relationship map. This step provides more semantically rich data for subsequent machine learning models, which helps the model better understand and predict the impact of emergencies on public behavior and improves the overall prediction accuracy.
[0108] S3, establishing an entity attribute relationship graph database according to the historical entity attribute relationship graph data;
[0109] The entity attribute relationship graph database represents a database that stores and manages entity attribute relationship graph data, making it possible to quickly retrieve and query historical data. The machine learning model represents a mathematical model that can predict and classify new data by learning patterns and rules from historical data.
[0110] S4. Match the real-time data features with the entity attribute relationship graph database to obtain a real-time entity attribute relationship graph.
[0111] S5. Use historical data to train the machine learning model, input real-time data into the trained machine learning model, and combine the output of the trained machine learning model with the real-time entity attribute relationship graph to obtain real-time public behavior prediction information;
[0112] The training of the machine learning model using historical data in S5 includes:
[0113] The BERT model is trained by the historical text data and the CNN model is trained by the historical image data;
[0114] The training of the BERT model using the historical text data includes:
[0115] S5011, read historical text data and establish a historical text data set;
[0116] S5012, dividing the established historical text data set into a text training data set and a text verification data set;
[0117] S5013, training the BERT model using the text training data set to obtain a text loss function;
[0118] S5014. Evaluate the performance of the BERT model using the text verification data set, and adjust the parameters of the BERT model according to the performance evaluation result of the BERT model until the attitude feedback information predicted by the BERT model is consistent with the actual attitude feedback information.
[0119] Optionally, the training of the CNN model using historical image data includes:
[0120] S5021. Read historical picture data and establish a historical picture data set;
[0121] S5022, dividing the historical picture data set into a picture training data set and a picture verification data set;
[0122] S5023, training the CNN model using the image training data set to obtain an image loss function;
[0123] S5024. Evaluate the performance of the CNN model through the image verification data set, and adjust the parameters of the CNN model according to the performance evaluation results of the CNN model, until the environmental information when the emergency event occurs predicted by the CNN model is consistent with the environmental information when the actual historical emergency event occurs, and the public behavior information when the emergency event occurs is consistent with the public behavior information of the actual historical emergency events.
[0124] Optionally, the step of inputting the real-time data into a trained machine learning model in S5, and combining the output result of the trained machine learning model with the real-time entity attribute relationship graph to obtain real-time public behavior prediction information includes:
[0125] S5031. Read the prediction information of the model, where the prediction information of the model includes: the attitude feedback information predicted by the BERT model, and the environmental information when the emergency occurs and the public behavior information when the emergency occurs predicted by the CNN model;
[0126] S5032, inputting the prediction information of the model into the real-time entity attribute relationship map to obtain real-time public behavior prediction information;
[0127] The real-time public behavior prediction information includes the predicted amount of material donations and the predicted number of people participating in the rescue.
[0128] In step S5, the machine learning model is trained using historical data, specifically using historical text data to train the BERT model, and using historical image data to train the CNN model. The specific steps for training the BERT model are as follows: read historical text data and establish a historical text data set; divide the historical text data set into a training data set and a verification data set; read the training data set to train the constructed BERT model, and calculate the text loss function; use the verification data set to evaluate the model performance, and adjust the model parameters according to the verification results until the model's predicted attitude feedback information is consistent with the actual attitude feedback information; the input and input data of the constructed BERT model are historical text data and predicted attitude feedback information, respectively, and the BERT model is a text deep learning model with Transformer as the architecture and DistilBERT as a variant, wherein the text deep learning model includes: an input layer for receiving historical text data, a Transformer encoder layer, an output layer for outputting predicted attitude feedback information, a loss function for measuring the difference between the model output and the true label, and an optimizer for adjusting the model parameters to minimize the loss function, and the input layer It includes: an embedding layer for embedding input discrete symbols into dense vector representations, a position encoding for adding position encoding so that the model can process the order information of words in the sequence, and a type encoding for distinguishing different parts in the input sequence. The Transformer encoder layer includes: a multi-head self-attention mechanism for obtaining context-related representations by paying attention to information at different positions in the input sequence, a feedforward neural network for processing the output of the self-attention mechanism layer, further extracting features and generating the final representation, and residual connections and layer normalization added between each sublayer that help train deep networks. The specific steps for inputting historical text data into the BERT model are as follows: First, the text data is segmented, and sentences or paragraphs are divided into single words. In the sequence after segmentation, special tags are added, such as "[CLS]" to indicate the beginning of the sequence and "[SEP]" to indicate the end of the sequence or to separate different sentences. Since the BERT model has a limit on the length of the input sequence, the sequence needs to be padded or truncated to make it have the same length. Padding tokens such as "[PAD]" are added to ensure that the length of the input sequence is consistent, and the sequence after segmentation is converted to the corresponding ID in the model vocabulary.Each word or subword in the vocabulary has a unique integer ID. An embedding layer is used to map the ID of each word to a dense vector representation. These vectors are learnable parameters and are updated during training. Position encoding is added to the embedded vector to handle the order information of words in the sequence. The BERT model uses a self-attention mechanism and needs to build an attention mask for the input sequence to indicate to the model which positions are filled and which positions are real inputs. If the input sequence contains multiple sentences, a sentence identifier needs to be added to each word. This can be done through an additional "Segment Embeddings" is implemented, and then the sequence after the above processing steps is input into the BERT model; the calculation steps of the text loss function are as follows: the environmental text values and public behavior information text values of several historical text data when the actual historical emergencies occurred are obtained, and each historical text data is input into the BERT model respectively to obtain the environmental text value and public behavior information text value of each historical text data when the predicted emergency occurs, and then the difference between the environmental text value and public behavior information text value of each historical text data when the predicted emergency occurs and the environmental text information value and public behavior text information value when the actual historical emergency occurs is calculated, and then the difference is calculated by the mean square error, and the model parameters are continuously adjusted until the difference is zero, so that the predicted attitude feedback information of the model is consistent with the actual attitude feedback information.
[0129] In this implementation scheme, a data set containing text information is established by reading historical text data, which provides basic data for subsequent model training, so that the BERT model can learn the semantics and contextual information of the text from the rich historical text data, and improve the model's ability to understand historical events. Dividing the data set into a training set and a validation set helps to evaluate the generalization ability of the model and prevent overfitting. By using the validation data set, the performance of the model on new data can be discovered in a timely manner, the model parameters can be optimized, and the robustness of the model can be improved. The model learns the semantic information of the text data through the training data set, and calculates the degree of fit of the model to the task through the text loss function, thereby improving the model's abstraction and expression capabilities for historical text data, enabling the model to better understand text information and lay the foundation for predicting attitude feedback information. Evaluating model performance through the validation data set helps to adjust model parameters and improve the model. The generalization ability and accuracy are improved, and the model parameters are optimized to make it better adapt to historical text data, ensuring that the model's prediction of attitude feedback information is more accurate, and enhancing the practicality of the model. The application of Transformer architecture and DistilBERT makes the model more suitable for processing long texts, while reducing the number of model parameters and improving computational efficiency. The selection of advanced model structure helps to improve the model's expressiveness and training efficiency, and enhances the model's understanding and learning ability of historical text data. The inclusion of embedding layers, position encoding, and type encoding components helps to extract key features of text data, while the Transformer encoder layer can better capture contextual information in text sequences. This structure makes the text deep learning model more hierarchical and contextually understanding, which makes the model have a deeper understanding of historical text data and improves the accuracy of predicting attitude feedback information.
[0130] The specific steps of training the CNN model in step S5 are as follows: reading historical image data and establishing a historical image data set; dividing the historical image data set into an image training data set and an image verification data set; reading the image training data set to train the constructed CNN model and calculate the image loss function; using the image verification data set to evaluate the model performance, and adjusting the model parameters according to the verification results, until the environment and public behavior information predicted by the model when historical emergencies occurred are consistent with the environment and public behavior information when actual historical emergencies occurred; the input and input data of the constructed CNN model are respectively the historical image data, the environment and public behavior information predicted when historical emergencies occurred, and the CNN model is an image deep learning model with DistilCNN as a variant, wherein the image deep learning model includes: an input layer for receiving historical image data, a convolutional layer for detecting local features in the input image, an activation function layer for using the activation function ReLU after the convolutional layer to introduce nonlinear characteristics and increase the expression ability of the model, and a pool for reducing the size of the feature map, reducing the computational burden, and retaining important information at the same time. A distillation layer, a fully connected layer for mapping the final features to the output space, an output layer for outputting the final prediction results of the model, a distillation operation for creating a lightweight CNN model, a loss function for measuring the difference between the model output and the true label, and an optimizer for adjusting the model parameters to minimize the loss function. The calculation steps of the loss function are as follows: The calculation steps of the image loss function are as follows: Obtain the environmental image information values and public behavior image information values of several historical image data when the actual historical emergencies occurred, input each historical image data into the CNN model respectively, and obtain the environmental image information values and public behavior image information values of each historical image data when the predicted emergency occurs, and then calculate the difference between the environmental image information values and public behavior image information values of each historical image data when the predicted emergency occurs and the environmental image information values and public behavior image information values when the actual historical emergencies occur, and then calculate the mean square error of the difference, and continuously adjust the model parameters until the difference is zero, so that the model predicts the environmental and public behavior information when the historical emergencies occur in accordance with the actual environmental and public behavior information when the historical emergencies occur.
[0131] By reading historical image data, a dataset containing image information is established, which provides basic data for subsequent CNN model training, so that the CNN model can learn visual features from a variety of historical images, providing the model with more comprehensive image data. The division of the dataset helps to evaluate the generalization performance of the model on new data and prevent overfitting. By using the verification dataset, the performance of the model on new data can be discovered in a timely manner, the model parameters can be optimized, and the robustness and generalization of the model can be improved. The model learns the local features and visual information of historical images through the training dataset, and calculates the degree of fit of the model to the task through the loss function, thereby improving the model's feature extraction ability for historical image data, enabling the model to better understand image information, laying the foundation for predicting environmental and public behavior information when historical emergencies occur. Evaluating model performance through the verification dataset helps to adjust model parameters. The number of images is increased, the generalization ability and accuracy of the model are improved, and the model parameters are optimized to make it better adapt to historical image data, ensuring that the model's prediction of the environment and public behavior information when historical emergencies occur is more accurate, and the practicality of the model is enhanced. The DistilCNN variant structure is adopted to make the CNN model lighter and more suitable for mobile terminals and real-time applications. The selection of a lightweight structure helps to improve the computational efficiency of the model, making the model more suitable for practical application scenarios, while retaining the effective modeling ability for image data. The convolution layer can extract local features in the image, the activation function introduces nonlinearity, the pooling layer reduces the computational complexity, the fully connected layer captures global features, and the output layer provides the final prediction results. This structure enables the image deep learning model to effectively extract key features from historical images, providing a strong image analysis foundation for predicting the environment and public behavior information when historical emergencies occur.
[0132] S6. Combine the output of the trained machine learning model with the real-time public behavior prediction information to obtain real-time risk assessment prediction indicators, including:
[0133] S601, reading the predicted amount of donated materials, the predicted number of people involved in rescue, and the environmental information when the emergency occurs, performing sum calculation, and obtaining an evaluation value;
[0134] The environmental information when the emergency occurs includes: weather information when the emergency occurs and traffic information indicators when participating in rescue;
[0135] S602, calculating the ratio of the predicted material donation quantity, the predicted number of people participating in the rescue, and the environmental information when the emergency occurs to the evaluation value, respectively, to obtain the proportional coefficient of the predicted material donation quantity, the proportional coefficient of the predicted number of people participating in the rescue, and the proportional coefficient of the environmental information when the emergency occurs;
[0136] S602, respectively calculating the ratios with the evaluation and the value, and using the obtained ratio results as corresponding proportional coefficients;
[0137] The predicted amount of material donations, the predicted number of people involved in the rescue, and the environmental information when the emergency occurs are multiplied by the corresponding proportional coefficients and then summed to obtain the real-time risk assessment prediction index.
[0138] The calculation formula of the real-time risk assessment prediction index is formula (1):
[0139] ; (1)
[0140] in, For real-time risk assessment predictive indicators, For the predicted amount of material donations, is the estimated number of rescuers involved. For weather information in case of emergencies, Traffic information indicators for participating in rescue operations. for The proportionality coefficient, for The proportionality coefficient, for The proportionality coefficient, for The proportionality factor.
[0141] In this implementation scheme, the predicted attitude feedback information representation model predicts the public's attitude towards emergencies, reflecting the public's emotional tendencies and attitudes towards events. The predicted material donation quantity representation model predicts the number of material donations made by the public in real-time emergencies, reflecting the public's actual behavioral tendencies. The predicted number of people participating in rescue represents the model predicts the number of people participating in rescue, reflecting the public's degree of participation in rescue operations. The predicted environment and public behavior information representation model at the time of historical emergencies predicts the environment and public behavior information at the time of historical emergencies, providing background information of real-time situations. The attitude feedback information predicted by the model and the predicted environment and public behavior information at the time of historical emergencies are read. This step obtains the model's comprehensive prediction of real-time situations by reading the information predicted by the model, providing a basis for real-time public behavior prediction information. The real-time prediction information is more comprehensive and accurate, which provides strong support for subsequent response measures. The read information is input into the real-time entity attribute relationship map to obtain real-time public behavior prediction information. This step combines the information predicted by the model with the real-time entity attribute relationship map, which can more comprehensively understand the real-time situation and provide richer information for subsequent decision-making, thereby improving the in-depth understanding of the real-time situation, helping to more accurately predict public behavior, and providing a more scientific basis for responding to emergencies. The real-time public behavior prediction information specifically includes the predicted amount of material donations and the predicted number of people involved in rescue. The two specific prediction information in this step are directly related to the real-time public's behavioral tendencies, providing targeted information for subsequent emergency measures. Through specific behavior prediction information, the system can formulate response strategies more targetedly and improve the effectiveness of responding to emergencies.
[0142] The specific logic of calculating the real-time risk assessment prediction index is as follows: read the predicted amount of material donations, the predicted number of people participating in the rescue, the weather information when the emergency occurs, and the traffic information index when participating in the rescue, and perform sum calculation to obtain the evaluation and value; calculate the ratio of the predicted amount of material donations, the predicted number of people participating in the rescue, the weather information when the emergency occurs, and the traffic information index when participating in the rescue with the evaluation and value, and use the obtained ratio result as the corresponding proportional coefficient; multiply the predicted amount of material donations, the predicted number of people participating in the rescue, the weather information when the emergency occurs, and the traffic information index when participating in the rescue with the corresponding proportional coefficient respectively, and then sum them to obtain the real-time risk assessment prediction index, among which the predicted amount of material donations and the predicted number of people participating in the rescue can be directly obtained, and the formulas for calculating the weather information index when an emergency occurs are as follows:
[0143] ;
[0144] in, is the temperature value of the location where the emergency occurred, is the precipitation at the location where the emergency occurred, is the wind force level at the location where the emergency occurred. is the amount of snowfall at the location where the emergency occurred, , , , They are , , , The weight value of , , , The calculation formulas are as follows:
[0145] ;
[0146] ;
[0147] ;
[0148] ;
[0149] For the history The temperature value at the location where the emergency occurred, , is the total number of emergencies that occurred in history, For the history The amount of precipitation at the location where the emergency occurred, For the history The wind force level at the location where the emergency occurred, For the history The snowfall at the location when the emergency occurred, and the logic of calculating the weather information indicators when the emergency occurred is: respectively obtain the temperature value, precipitation, wind force level, snowfall at the location when the emergency occurred through the temperature monitoring system, precipitation monitoring system, and wind force level monitoring system, as well as the temperature value, precipitation, wind force level, and snowfall at the location when each emergency occurred in history. First, the temperature value, precipitation, wind force level, and snowfall at the location when each emergency occurred in history are respectively averaged, geometrically averaged, and harmonic averaged, and the results are averaged to obtain the mean temperature, mean precipitation, mean wind force level, and mean snowfall. Then, the mean temperature, mean precipitation, mean wind force level, and mean snowfall are normalized and respectively obtained through the temperature monitoring system, The precipitation monitoring system, wind force level monitoring system, and snowfall monitoring system obtain the temperature value, precipitation, wind force level, and snowfall at the location where the emergency occurs, and then perform normalization processing. The normalized temperature value, precipitation, wind force level, and snowfall are summed to obtain the weather sum value, and then the temperature value, precipitation, wind force level, and snowfall are respectively calculated by ratio with the weather sum value, and the ratio results are used as their respective weight values. Then, the temperature value, precipitation, wind force level, and snowfall are multiplied by their respective weight values and summed to obtain the weather information index when the emergency occurs. This index is used to provide a comprehensive and standardized weather evaluation value to help the system more accurately evaluate the weather conditions when the emergency occurs. The formula for calculating the traffic information index when participating in the rescue is as follows:
[0150] ;
[0151] in, is the current number of people at the location where the emergency occurs, The number of people who participated in the rescue when the emergency occurred. is the current number of vehicles at the location where the emergency occurs, The number of vehicles required to reach the location of the emergency for the number of rescuers involved. , , , , , They are , , , , , The logic of calculating the traffic information index for participating in the rescue is as follows: the current number of people at the location where the emergency occurs, the number of people participating in the rescue going to the location where the emergency occurs, and the current number of vehicles at the location where the emergency occurs are respectively obtained through the monitoring system, and the number of people participating in the rescue going to the location where the emergency occurs is based on the judgment to obtain the number of vehicles required for the number of people participating in the rescue going to the location where the emergency occurs, and then the current number of people at the location where the emergency occurs and the number of people participating in the rescue going to the location where the emergency occurs are first summed up to obtain the sum of the number of people, and then the current number of people at the location where the emergency occurs, the number of people participating in the rescue going to the location where the emergency occurs and the sum of the number of people are calculated to obtain their respective proportional coefficients, and then the current number of vehicles at the location where the emergency occurs and the number of vehicles required for the number of people participating in the rescue going to the location where the emergency occurs are summed up to obtain the sum of vehicles, and then the current number of people at the location where the emergency occurs and the number of people participating in the rescue going to the location where the emergency occurs are respectively calculated to obtain the proportion coefficient. The number of previous vehicles and the number of vehicles required for the number of people participating in the rescue going to the location where the emergency occurred are ratioed to the vehicle sum value to obtain their respective proportional coefficients. Then the current number of people at the location where the emergency occurred and the number of people participating in the rescue going to the location where the emergency occurred are multiplied by their respective proportional coefficients and then summed to obtain the number of people index. The current number of vehicles at the location where the emergency occurred and the number of vehicles required for the number of people participating in the rescue going to the location where the emergency occurred are multiplied by their respective proportional coefficients and then summed to obtain the vehicle index. Then the number of people index and the vehicle index are summed to obtain the total value. Then the number of people index and the vehicle index are ratioed to the total value to obtain their respective proportional coefficients. Then the number of people index and the vehicle index are multiplied by their respective proportional coefficients and then added to obtain the traffic information index when participating in the rescue. The traffic information index when participating in the rescue represents the traffic condition index used to represent the predicted number of people participating in the rescue increased to the location where the emergency occurs.
[0152] S7, determining whether the real-time risk assessment prediction indicator is higher than a preset threshold;
[0153] If it is higher than the preset threshold, an alarm message is sent and emergency measures are taken according to the alarm message;
[0154] Otherwise, repeat S1.
[0155] The historical public attitude feedback information on emergencies includes:
[0156] Information about news reports and social media comments, as well as information about actual public behavior;
[0157] The actual behavior information of the public includes: text information of material donations and information on the number of people involved in the rescue;
[0158] The environmental information when the incident occurs includes: weather information and traffic information when the emergency occurs;
[0159] The public behavior information when the emergency occurs includes: video information of volunteers rescuing.
[0160] Real-time public behavior prediction information means predicting the behavior of the public in real-time emergencies by combining the results of the machine learning model output and the real-time entity attribute relationship map. Real-time risk assessment prediction indicators mean indicators calculated from the machine learning model output and real-time behavior prediction information, which are used to assess the risk level of real-time emergencies. Threshold values mean set limit values, which are used to determine whether real-time risk assessment prediction indicators meet the standards of emergency situations.
[0161] Taking emergency measures according to the alarm information in S7 includes:
[0162] When the predicted amount of donated materials in the alarm information is higher than the set threshold and the predicted number of people participating in the rescue is lower than the set threshold, emergency measures are implemented to increase the number of people participating in the rescue;
[0163] When the weather information at the time of the emergency in the alarm information is not within the threshold range, weather response measures 1 to 7 are taken:
[0164] Weather response measure 1: When the temperature is higher than the set high temperature threshold, a sprinkler truck will be dispatched to spray water and cool down the area where the emergency occurred;
[0165] Weather response measure 2: When the temperature is below the set low temperature threshold, take measures to send clothes and hot water to the emergency site;
[0166] Weather response measure three: When the wind force is higher than the set wind force threshold, take measures to mobilize personnel to evacuate the people at the location where the emergency occurs;
[0167] Weather response measure 4: When the rainy weather is higher than the set maximum rainy day threshold, measures such as sending raincoats to the emergency area and unclogging sewers are taken;
[0168] Weather response measure 5: When the snowy weather is higher than the set maximum snowy threshold, measures such as spreading salt on roads around the emergency site, delivering clothes, and delivering hot water will be taken;
[0169] Weather response measure six: When the traffic information index during rescue is higher than the set corresponding threshold, measures will be taken to mobilize traffic personnel to evacuate traffic in the area of the emergency.
[0170] In this implementation plan, by considering indicators such as the amount of material donations, the number of people involved in the rescue, weather information, and traffic information, real-time risk assessment can comprehensively integrate historical and real-time data to provide a more global forecast and assessment. By introducing a proportional coefficient, different indicators are weighed to ensure that the contribution of each indicator to the real-time risk assessment is balanced as a whole, which helps to more accurately judge the degree of risk. The introduction of each proportional coefficient gives the system a certain degree of flexibility and adjustability. System administrators or relevant persons in charge can adjust the proportional coefficient to adapt to different emergency situations and needs to make the system more adaptable. By normalizing the temperature, precipitation, wind force level, and snowfall indicators, data from different units and ranges are unified, which helps to more effectively compare and integrate various information. By acquiring data in real time and calculating real-time risk assessments, the system can issue early warnings and take emergency measures in a timely manner, thereby improving the speed and effectiveness of responding to emergencies. Based on the results of real-time risk assessments, the system can provide targeted suggestions, such as mobilizing rescue personnel, sprinkling water to cool down, and increasing material donations, which helps to more effectively respond to different risk levels. By calculating the ratio of the current number of people, the number of people involved in the rescue, the current number of vehicles, and the number of vehicles required, it more accurately reflects the traffic conditions when an emergency occurs, providing more detailed information for taking corresponding traffic measures.
[0171] Specifically, if yes, an alarm message is sent, and emergency measures are taken, specifically: respectively determine whether the predicted amount of material donations, the predicted number of people participating in the rescue, the traffic information indicators when participating in the rescue are higher than the set corresponding thresholds, and whether the weather information when the emergency occurs is within the set threshold range; if the predicted amount of material donations is higher than the set threshold, further determine whether the predicted number of people participating in the rescue is higher than the set threshold; if yes, no measures are taken; if not, a rescue number recommendation is sent to increase the number of people participating in the rescue; if the weather information when the emergency occurs is within the set threshold range, no measures are taken; if the weather information when the emergency occurs is not within the set threshold range, then determine whether each weather type in the weather information is higher than the set threshold, and the weather types are temperature weather, windy weather, rainy weather, and snowy weather; if the temperature weather is higher than the set high temperature threshold, then determine to send a cooling suggestion to the system, and the cooling suggestion is specifically to call a sprinkler truck to spray water and cool down at the emergency site; if the temperature weather is lower than the set low temperature threshold, then send a warming suggestion to the system, The warming suggestion is specifically to send clothes and hot water to the emergency site; if the wind weather is higher than the set wind threshold, it is determined to send an evacuation suggestion to the system, and the evacuation suggestion is specifically to mobilize personnel to evacuate the people at the location where the emergency occurs; if the wind weather is lower than the set wind threshold, no measures are taken; if the rainy weather is higher than the set maximum rainy day threshold, it is determined to send a first protection suggestion to the system, and the first protection suggestion is specifically to send raincoats to the emergency site and dredge sewers; if the rainy weather is lower than the set minimum rainy day threshold, no measures are taken; if the snowy weather is higher than the set maximum snowy day threshold, it is determined to send a second protection suggestion to the system, and the second protection suggestion is specifically to spread salt on the roads around the emergency site and send clothes and hot water; if the snowy weather is lower than the set minimum snowy day threshold, no measures are taken; if the traffic information index when participating in the rescue is higher than the set corresponding threshold, a mobilization suggestion is sent to the system to mobilize traffic personnel to evacuate the traffic at the emergency site; if the traffic information index when participating in the rescue is lower than the set corresponding threshold, no measures are taken.
[0172] In this implementation scheme, an alarm message is sent and emergency measures are taken. When it is found that the real-time risk assessment prediction index is higher than the threshold, this step can respond quickly and take emergency measures to deal with potential public risks, thereby improving the ability to respond to emergencies in a timely manner, helping to mitigate potential damage and ensure public safety. It determines whether the predicted amount of material donations, the number of rescuers, traffic information, and weather information are higher than the set corresponding thresholds. This step conducts a comprehensive evaluation of multiple indicators to fully understand the situation of the emergency and provide a comprehensive basis for subsequent decision-making, thereby improving the comprehensive understanding of all aspects of the emergency, helping to formulate a more scientific response strategy, and further judging whether measures need to be taken according to the threshold, such as rescue number recommendations, cooling recommendations, warming recommendations, and mobilization recommendations. This step makes different suggestions based on the specific situation, responds in a targeted manner, and minimizes potential risks, thereby improving the flexibility and pertinence of responding to emergencies, and helping to respond to different emergencies more effectively. It sends rescue number recommendations to increase the number of people involved in the rescue. This step is sent by the system. Sending suggestions can mobilize more rescue personnel in time and improve the efficiency of responding to emergencies, thereby improving the timeliness and effectiveness of emergency rescue and helping to launch rescue operations more quickly. Sending cooling suggestions specifically involves mobilizing sprinkler trucks to spray water and cool down the emergency site. This step takes practical measures to reduce the ambient temperature and mitigate potential hazards. Through specific cooling suggestions, it helps to ensure the comfort of the public in emergencies and reduce the adverse effects of emergencies. Sending warming suggestions specifically involves sending clothes and hot water to the emergency site. This step provides practical material support for cold environments and ensures the warmth and basic needs of the public. By providing practical warming suggestions, it helps to improve the quality of life of the public in emergencies and reduce the discomfort caused by emergencies. Sending mobilization suggestions to mobilize traffic personnel to evacuate traffic in the emergency site. This step mobilizes traffic resources to increase the speed at which the rescue team can quickly arrive at the emergency site, thereby optimizing the deployment of the rescue team, helping to launch emergency rescue work more quickly and efficiently and minimize potential risks.
[0173] This method uses historical and real-time data to extract key features from text and image information and builds an entity attribute relationship graph database, so that the system can more comprehensively understand the relationship between events, environment, the public, and behavior. The training of machine learning models further enhances the intelligence of the system, enabling it to predict the public's behavior in real time and provide rapid decision support through risk assessment.
[0174] Figure 2 This is a block diagram of a public behavior warning system under extreme meteorological disasters according to an exemplary embodiment. The device is used in a public behavior warning method under extreme meteorological disasters. Figure 2The system includes a data acquisition unit 310, an extraction unit 320, a building unit 330, a matching unit 340, a training unit 350, a calculation unit 360 and an output unit 370 connected in sequence; specifically:
[0175] The data collection unit 310 is used to obtain historical data and real-time data related to the emergency based on a web crawler; the historical data includes historical text data and historical image data; the real-time data includes real-time text data and real-time image data;
[0176] The extraction unit 320 is used to extract the relevant features of the historical data and the emergency, environment, public and behavior to obtain the historical data features, and extract the relevant features of the real-time data and the emergency, environment, public and behavior to obtain the real-time data features; analyze the historical data features to obtain the historical entity attribute relationship graph data;
[0177] An establishing unit 330, configured to establish an entity attribute relationship graph database according to the historical entity attribute relationship graph data;
[0178] A matching unit 340, configured to match the real-time data feature with the entity attribute relationship graph database to obtain a real-time entity attribute relationship graph;
[0179] A training unit 350 is used to train the machine learning model using historical data, input real-time data into the trained machine learning model, and combine the output of the trained machine learning model with the real-time entity attribute relationship graph to obtain real-time public behavior prediction information;
[0180] A computing unit 360, for combining the output of the trained machine learning model with the real-time public behavior prediction information to obtain a real-time risk assessment prediction index;
[0181] Output unit 370, used to determine whether the real-time risk assessment prediction index is higher than a preset threshold;
[0182] If it is higher than the preset threshold, an alarm message is sent and emergency measures are taken according to the alarm message;
[0183] Otherwise, return to the data collection unit 310 .
[0184] By comprehensively utilizing historical and real-time data, extracting key features from text and image information, and establishing an entity attribute relationship graph database, the system can more comprehensively understand the relationship between events, environments, the public, and behaviors. The training of machine learning models further enhances the intelligence of the system, enabling it to predict the public's behavior in real time and provide rapid decision support through risk assessment. The system is able to execute all the steps in this method.
[0185] On the other hand, a public behavior warning device under extreme meteorological disasters is provided, and the public behavior warning device under extreme meteorological disasters comprises: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, any one of the above-mentioned public behavior warning methods under extreme meteorological disasters is implemented.
[0186] On the other hand, a computer-readable storage medium is provided, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned methods for warning public behavior under extreme meteorological disasters.
[0187] like Figure 3 As shown, the public behavior warning equipment under extreme weather disasters may include the above Figure 2 The public behavior warning device under extreme weather disasters shown in FIG. Optionally, the public behavior warning device under extreme weather disasters 410 may include a first processor 2001 .
[0188] Optionally, the public behavior warning device 410 under extreme meteorological disasters may also include a memory 2002 and a transceiver 2003 .
[0189] The first processor 2001, the memory 2002 and the transceiver 2003 may be connected via a communication bus.
[0190] Combine the following Figure 3 The components of the public behavior warning device 410 under extreme weather disasters are specifically introduced:
[0191] The first processor 2001 is the control center of the public behavior warning device 410 under extreme weather disasters, and can be a processor or a general term for multiple processing elements. For example, the first processor 2001 is one or more central processing units (CPUs), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (field programmable gate arrays, FPGAs).
[0192] Optionally, the first processor 2001 can perform various functions of the public behavior warning device 410 under extreme meteorological disasters by running or executing a software program stored in the memory 2002 and calling data stored in the memory 2002.
[0193] In a specific implementation, as an embodiment, the first processor 2001 may include one or more CPUs, such as Figure 3 CPU0 and CPU1 are shown in FIG.
[0194] In a specific implementation, as an embodiment, the public behavior warning device 410 under extreme weather disasters may also include multiple processors, such as Figure 3 The first processor 2001 and the second processor 2004 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0195] The memory 2002 is used to store the software program for executing the solution of the present invention, and is controlled to be executed by the first processor 2001. The specific implementation method can refer to the above method embodiment, which will not be repeated here.
[0196] Optionally, the memory 2002 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2002 may be integrated with the first processor 2001, or may exist independently, and may be connected to the computer through the interface circuit ( Figure 3 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0197] The transceiver 2003 is used to communicate with a network device or a terminal device.
[0198] Optionally, the transceiver 2003 may include a receiver and a transmitter ( Figure 3 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0199] Optionally, the transceiver 2003 may be integrated with the first processor 2001, or may exist independently, and communicate with the first processor 2001 through the interface circuit ( Figure 3 (not shown) is coupled to the first processor 2001, which is not specifically limited in this embodiment of the present invention.
[0200] It should be noted that Figure 3 The structure of the public behavior warning device 410 under extreme weather disasters shown in the figure does not constitute a limitation on the router. The actual knowledge structure recognition device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0201] In addition, the technical effects of the public behavior warning device 410 under extreme meteorological disasters can refer to the technical effects of the public behavior warning method under extreme meteorological disasters described in the above method embodiment, and will not be repeated here.
[0202] It should be understood that the first processor 2001 in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0203] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0204] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0205] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0206] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0207] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0208] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0209] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0210] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0211] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0212] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0213] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0214] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for early warning of public behavior under extreme meteorological disasters, characterized in that: The method comprises: S1. Obtain historical and real-time data related to emergencies based on web crawlers; The historical data includes historical text data and historical picture data; The real-time data includes real-time text data and real-time picture data; S2, respectively extracting features related to emergencies, environment, the public and behavior from the historical data and real-time data to obtain historical data features, analyzing the historical data features to obtain historical entity attribute relationship graph data; S3, establishing an entity attribute relationship graph database according to the historical entity attribute relationship graph data; S4, matching the real-time data features with the entity attribute relationship graph database to obtain a real-time entity attribute relationship graph; S5. Use historical data to train the machine learning model, input real-time data into the trained machine learning model, and combine the output of the trained machine learning model with the real-time entity attribute relationship graph to obtain real-time public behavior prediction information; S6. Combining the output of the trained machine learning model with the real-time public behavior prediction information to obtain real-time risk assessment prediction indicators; S7, determining whether the real-time risk assessment prediction indicator is higher than a preset threshold; If it is higher than the preset threshold, an alarm message is sent and emergency measures are taken according to the alarm message; Otherwise, repeat S1; The extracting of the relevant features of the historical data related to the emergency, environment, public and behavior in S2 to obtain the historical data features, and analyzing the historical data features to obtain the historical entity attribute relationship graph data include: According to natural language processing technology, historical text data is segmented, part-of-speech tagged and named entity recognized to obtain historical text data after natural language processing; Based on the historical text data after natural language processing, extract the relevant features of the emergency, environment, public and behavior, as well as the historical public attitude feedback information on the emergency, to obtain the historical text data features; The keywords of the relevant characteristics of the emergency, environment, public and behavior include: time of the event, location, event type and social media hot words; Based on computer vision technology, the historical image data is processed to obtain relevant features of the emergency, environment, public and behavior, as well as environmental information when the emergency occurred and public behavior information when the emergency occurred, to obtain historical image data features; Obtaining historical data features according to historical text data features and historical image data features; Based on the keywords in the historical data features, historical public attitude feedback information on emergencies, environmental information when emergencies occur, and public behavior information when emergencies occur, natural language processing technology is combined to establish the association between events, environments, and behaviors, and obtain historical entity attribute relationship graph data; The historical public attitude feedback information on emergencies includes: Information about news reports and social media comments, as well as information about actual public behavior; The actual behavior information of the public includes: text information of material donations and information on the number of people involved in the rescue; The environmental information when the incident occurs includes: weather information and traffic information when the incident occurs; The public behavior information when the emergency occurs includes: video information of volunteers rescuing; The step of training the machine learning model using historical data in S5 includes: The BERT model is trained by the historical text data and the CNN model is trained by the historical image data; The training of the BERT model using the historical text data includes: S5011, read historical text data and establish a historical text data set; S5012, dividing the established historical text data set into a text training data set and a text verification data set; S5013, training the BERT model using the text training data set to obtain a text loss function; S5014, evaluating the performance of the BERT model through the text verification data set, and adjusting the parameters of the BERT model according to the performance evaluation result of the BERT model until the attitude feedback information predicted by the BERT model is consistent with the actual attitude feedback information; The training of the CNN model using historical image data includes: S5021. Read historical picture data and establish a historical picture data set; S5022, dividing the historical picture data set into a picture training data set and a picture verification data set; S5023, training the CNN model using the image training data set to obtain an image loss function; S5024, evaluating the performance of the CNN model through the image verification data set, and adjusting the parameters of the CNN model according to the performance evaluation result of the CNN model, until the environmental information when the emergency event occurs predicted by the CNN model is consistent with the environmental information when the actual historical emergency event occurs, and the public behavior information when the emergency event occurs is consistent with the public behavior information of the actual historical emergency event; The step of inputting the real-time data into the trained machine learning model in S5, and combining the output of the trained machine learning model with the real-time entity attribute relationship graph to obtain real-time public behavior prediction information includes: S5031. Read the prediction information of the model, where the prediction information of the model includes: the attitude feedback information predicted by the BERT model, and the environmental information when the emergency occurs and the public behavior information when the emergency occurs predicted by the CNN model; S5032, inputting the prediction information of the model into the real-time entity attribute relationship map to obtain real-time public behavior prediction information; The real-time public behavior prediction information includes the predicted amount of material donations and the predicted number of people participating in the rescue; The real-time risk assessment prediction indicators obtained by combining the output results of the trained machine learning model and the real-time public behavior prediction information in S6 include: S601, reading the predicted amount of donated materials, the predicted number of people involved in rescue, and the environmental information when the emergency occurs, performing sum calculation, and obtaining an evaluation value; The environmental information when the emergency occurs includes: weather information when the emergency occurs and traffic information indicators when participating in rescue; S602, calculating the ratio of the predicted material donation quantity, the predicted number of people participating in the rescue, and the environmental information when the emergency occurs to the evaluation value, respectively, to obtain the proportional coefficient of the predicted material donation quantity, the proportional coefficient of the predicted number of people participating in the rescue, and the proportional coefficient of the environmental information when the emergency occurs; S603: Multiply the predicted amount of donated materials, the predicted number of people involved in rescue, and the environmental information when the emergency occurs by the corresponding proportional coefficients respectively, and then sum them up to obtain a real-time risk assessment prediction index.
2. According to the public behavior early warning method under extreme meteorological disasters according to claim 1, the calculation formula of the real-time risk assessment prediction index of S6 is formula (1): Fx=ξ Wz *Wz+ξ Jy *Jy+ξ Tq ; (1) in, Fx is the real-time risk assessment prediction index, Wz is the predicted amount of material donations, Jy is the predicted number of people participating in the rescue, Tq is the weather information when the emergency occurs, Jt is the traffic information index when participating in the rescue, ξ Wz is the proportionality coefficient of Wz, ξ Jy is the proportionality coefficient of Jy, ξ Tq is the proportionality coefficient of Tq, ξ Jy is the proportional coefficient of Jt.
3. The method for early warning of public behavior under extreme weather disasters according to claim 2 is characterized in that: Taking emergency measures according to the alarm information in S7 includes: When the predicted amount of donated materials in the alarm information is higher than the set threshold and the predicted number of people participating in the rescue is lower than the set threshold, emergency measures are implemented to increase the number of people participating in the rescue; When the weather information at the time of the emergency in the alarm information is not within the threshold range, weather response measures 1 to 7 are taken: Weather response measure 1: When the temperature is higher than the set high temperature threshold, a sprinkler truck will be dispatched to spray water and cool down the area where the emergency occurred; Weather response measure 2: When the temperature is below the set low temperature threshold, take measures to send clothes and hot water to the emergency site; Weather response measure three: When the wind force is higher than the set wind force threshold, take measures to mobilize personnel to evacuate the people at the location where the emergency occurs; Weather response measure 4: When the rainy weather is higher than the set maximum rainy day threshold, measures such as sending raincoats to the emergency area and unclogging sewers are taken; Weather response measure 5: When the snowy weather is higher than the set maximum snowy threshold, measures such as spreading salt on roads around the emergency site, delivering clothes, and delivering hot water will be taken; Weather response measure six: When the traffic information index during rescue is higher than the set corresponding threshold, measures will be taken to mobilize traffic personnel to evacuate traffic in the area of the emergency.
