A method for automatically acquiring and visualizing real-time information on urban waterlogging

By using social media data and deep learning technology to extract and visualize urban flooding information, the problems of poor data complexity and universality in traditional methods are solved, and real-time, accurate and efficient acquisition and display of flooding information are achieved.

CN115408592BActive Publication Date: 2025-02-28SUN YAT SEN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210810691.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-11
Publication Date
2025-02-28
Estimated Expiration
2042-07-11

AI Technical Summary

Technical Problem

The traditional method of obtaining geographical information in urban waterlogging relies on complex numerical simulations and refined precipitation observations, resulting in huge data volume, high timeliness, difficult model construction and poor universality.

Method used

Using social media data as the source, geographic location information in text form is extracted through deep learning and BiLSTM-CRF model, and converted to GCJ-02 coordinate system coordinates through Gaode Map API to realize automatic acquisition and visualization of real-time information in urban flooding.

Benefits of technology

It realizes the function of real-time feedback of urban flooding geographical information when flood disasters occur, adapts to the acquisition of information from different places, different times and environments, and the model is universal and high-precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115408592B_ABST
    Figure CN115408592B_ABST
Patent Text Reader

Abstract

The present invention provides a method for automatically acquiring and visualizing real-time information on urban waterlogging. The method is developed based on social media data, and can make full use of the characteristics of real-time update and large data volume of social media data, and can provide real-time feedback of urban waterlogging geographic information when flood disasters occur. Relying on network crawlers and neural network models, it has basically no dependence on actual conditions and can adapt to the acquisition of urban waterlogging geographic information in different locations, different time periods, and different environments. The present invention proposes excellent and accurate search keywords, combines neural network deep learning technology and longitude and latitude conversion technology, and realizes automatic acquisition and visualization of real-time information on urban waterlogging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of disaster prevention and reduction, and more specifically, to a method for automatically acquiring and visualizing real-time information on urban waterlogging. Background Art

[0002] Under the influence of climate change and human activities, urban waterlogging occurs frequently, and waterlogging disasters have become a prominent problem restricting the safe development of cities in my country. Timely and accurate grasp of urban waterlogging information, on the one hand, helps to improve the accuracy of urban waterlogging warning and forecasting, and on the other hand, helps relevant departments and the public to carry out disaster avoidance, disaster prevention and disaster relief work in a timely and effective manner, which is crucial to disaster emergency management.

[0003] Traditional waterlogging geographic information acquisition usually uses numerical simulation to simulate waterlogging conditions in various urban areas. Common methods include statistical methods combining hydrology and meteorology, comprehensive analysis of waterlogging causes, coupled mathematical calculation models and GIS spatial analysis module model simulation methods, etc. Most of these methods rely on the refined precipitation observation and forecast of the local meteorological bureau, and simulate the depth of waterlogging around the main hydrological and hydrodynamic physical processes of the city, such as the urban surface, drainage network, and river channels. These data are huge and very detailed, and they are also very time-sensitive and need to be updated frequently, which makes the construction of the model itself more difficult. In addition, both the model and the data are extremely regional, and are almost impossible to apply to other regions, and have poor universality. In addition, the commonly used methods of data simulation, such as the finite element method, are usually more complicated in mathematical principles, and are difficult to maintain or repair.

[0004] Scholars at home and abroad have conducted a lot of research on the application of social media in natural disasters. Starting from social media, the difficulty of data acquisition and model establishment is much lower than traditional numerical simulation methods. At the same time, with the popularization of the Internet in recent years, social media data is sufficient in the face of natural disasters. With the development of natural language processing technology, it is possible to extract effective information from media data through deep learning, which creates the possibility of establishing a convenient and efficient urban waterlogging geographic information query that can adapt to different environments. Summary of the invention

[0005] The present invention provides a method for automatically acquiring and visualizing real-time information on urban waterlogging. The method uses a social network platform as a data source and the results caused by waterlogging as a starting point to acquire geographic information on waterlogging in a specific city within a set time range.

[0006] In order to achieve the above technical effects, the technical solution of the present invention is as follows:

[0007] A method for automatically acquiring and visualizing real-time urban waterlogging information comprises the following steps:

[0008] S1: Obtain a corpus and preprocess the text data in the corpus;

[0009] S2: Use the preprocessed text data to obtain the word vector matrix through deep learning;

[0010] S3: Obtain a benchmark word vector according to the word vector matrix, and use the benchmark word vector and the remaining word vectors to calculate the forward keyword and the reverse keyword;

[0011] S4: Use positive keywords to search for relevant text information on social platforms through web crawlers and obtain relevant text information;

[0012] S5: Use reverse keywords and waterlogging occurrence time period to filter relevant text information and retain valid text information;

[0013] S6: Establish a BiLSTM-CRF model, divide the valid text information into benchmark data and test data, use the benchmark data to train the established BiLSTM-CRF model, and input the test data into the trained BiLSTM-CRF model to extract the geographic location in text form;

[0014] S7: The geographic location in text form is converted into GCJ-02 coordinate system coordinates by calling the API interface of Amap to obtain the geographic location data of the target location.

[0015] Furthermore, in step S1, the preprocessing uses the wenku encyclopedia and social platform text data, and the preprocessing of the text data therein includes: label removal, Chinese word segmentation, and removal of stop words as a corpus.

[0016] Furthermore, in step S2, a word vector matrix is ​​constructed for the preprocessed text using a Distributed encoding method and a continuous bag of words model CBOW; the continuous bag of words model CBOW is a three-layer neural network, including:

[0017] Input Layer:

[0018] Assume that the vocabulary used to generate word vectors based on the preprocessed text consists of V words. One-hot encoding is used to encode V words to obtain V one-dimensional 1×V vectors, in which only one element of the V elements is 1 and the rest are 0; let the target word vector be X0, and its related background words be C, and the background word vectors are X1, X2, ..., X C ;

[0019] Hidden Layer:

[0020] Assuming that the required word vector is N-dimensional, the connection relationship from the input layer to the hidden layer is represented by a matrix WI of size V×N. The parameters of the matrix WI need to be learned through training, that is, initialized with random numbers. The hidden layer multiplies each background word vector by the matrix WI to obtain a total of C one-dimensional 1×N vectors. Then, the C one-dimensional 1×N vectors are added and averaged to obtain the output vector h of the hidden layer. The calculation process is expressed in the following mathematical formula:

[0021]

[0022] Output layer:

[0023] The connection relationship from the input layer to the hidden layer is represented by a matrix WO of size N×V. The parameters of the matrix WO need to be learned through training, that is, initialized with random numbers. The output layer multiplies the output vector h of the hidden layer by the matrix WO to obtain a one-dimensional 1×V output vector y. The calculation process is expressed by the following mathematical formula:

[0024] y=h·WO.

[0025] Furthermore, for the output vector y of the output layer, let y = {x1, x2, ..., x V}, and use the Softmax function to normalize it to get a one-dimensional probability vector y′, which is the predicted word vector y′. The Softmax function formula is:

[0026]

[0027] where i = 1, 2, ..., V, j = 1, 2, ..., V, x i Convert to probability value;

[0028] The error between the predicted word vector y′ and the target word vector X0 is calculated through the loss function, and combined with the chain derivative rule, the parameters of the matrix WI and the matrix WO are updated by back-propagating the error to define the loss function. Here, the conditional probability of the background word is used and the logarithm is taken. The loss function can be understood as a special form of cross entropy that measures two probability distributions:

[0029]

[0030] where j * is the index of the real word in the vocabulary, and E is used to describe the size of the loss;

[0031] Derivative E, get the descending gradient, and update WI and WO:

[0032]

[0033]

[0034]

[0035]

[0036] EH is an N-dimensional vector, which is the weighted sum of the output vectors of all words in the vocabulary according to the prediction error;

[0037]

[0038] Since x is a one-hot encoding, according to its properties, So we get the following formula:

[0039]

[0040] Where η is a hyperparameter, representing the learning rate of the model, which is a constant; y represents the output of the model, that is, the prediction vector, which is a one-dimensional vector of length V; h is the output of the hidden layer, which has the same meaning as above, and is a one-dimensional vector of length N; t represents the true label, which is a one-dimensional vector of the same length as y, and is 1 only when j is the predicted word index, and 0 in all other cases; x is the input matrix, with a size of CxV, and each row and column has only one value that is 1 and not 0;

[0041] After updating the parameters of the matrix WI and the matrix WO, the training is iterated continuously until the predicted word vector y output by the model is consistent with the target word vector X0, which means the training is completed. After the training is completed, the matrix WI of size V×N is used as the word vector matrix of the vocabulary, where the row vector of the i-th row of the matrix corresponds to the word vector of the i-th word in the original vocabulary, that is, the Distributed encoded word vector.

[0042] Furthermore, the process of step S3 is:

[0043] S31: In view of the problem of urban waterlogging, "waterlogging" and "waterlogging" are selected as positive keywords. The word vectors corresponding to "waterlogging" and "waterlogging" are obtained through the word vector matrix of the vocabulary table. The cosine similarity is calculated between the remaining word vectors in the word vector matrix and the word vectors corresponding to "waterlogging" and "waterlogging". The vocabulary corresponding to the word vector with higher similarity is selected as the supplementary keyword. The cosine similarity calculation formula is as follows:

[0044] Assume that the two word vectors to be calculated are x = {x1, x2, ..., x V}, Y = {y1, y2, ..., y V},

[0045]

[0046] The larger the calculated cosine value cosθ is, the greater the similarity between the two word vectors is, and vice versa;

[0047] S32: The following positive keywords were finally determined through manual verification: "flooding", "flooding", "flooding", "rising water", "flood", "washed away", "drainage", "wading", "water inflow", and reverse keywords unrelated to urban waterlogging: "hydrocephalus", brain, brain, underwear, mobile phone, hydrocephalus, God of Wealth, cotton nylon, pond, cancer, hospital, running water, ward, Jinlun, head coach, brain, crazy, railroad track, rising water, ultrasound, sadness, precipitation, sweat, Zhou Suo, swimming, stock market, bone pain, China Securities Regulatory Commission, implantation, river wind, broken, river snow, bone tumor, pulmonary edema, drag put, salary, crater, girlfriend, aircraft carrier, product, saliva, seagull, lighthouse, ups and downs, the vast sea and sky, coarse flower, water in the ears, rolling set, World of Warcraft, news, computer, mobile phone, husband, culture, eating, hot water, sun, bathroom, screen, youth, cover the accumulated water, Domino's, sewer, North Korea, health care, moonlight entering the house, accumulated water into an abyss, spicy hot pot, cruise ship, stock market, microwave oven, mobile phone, traditional Chinese medicine, fallopian tube, reading, swimming, maintenance, wet compress, United States, knowledge, sweat, a natural process, bathing, doctor, water mill, distributed, Netherlands, pool, clear water, mac, bathroom, home, hydronephrosis.

[0048] Furthermore, in step S6, the specific training steps of the BiLSTM-CRF model are as follows:

[0049] S61: Split the pre-labeled benchmark data to obtain training data and test data;

[0050] S62: Establish a BiLSTM-CRF model and construct functions for training data and test data;

[0051] S63: Use the training data to repeatedly iterate the training model to obtain the optimal feature weights;

[0052] S64: Use the test data to test the calculation accuracy of the model, calculate the accuracy of the test data test results, and if it meets the standard, proceed to the next step; otherwise, adjust the model hyperparameters according to the evaluation results;

[0053] S65: Re-divide the benchmark data into training data and test data, repeat S63 and S64, and end the training after ensuring that the model can guarantee the accuracy of the test results under various conditions;

[0054] S66: Input the test data into the trained BiLSTM-CRF model to extract the geographic location in text form.

[0055] Furthermore, the process of step S66 is:

[0056] S661: Use the word vector matrix pre-trained using the CBOW model to map each word in the text data sentence from a one-hot vector to a low-dimensional dense word vector;

[0057] S662: Automatically extract sentence features through the BiLSTM layer, take the word vector obtained in S1 as input, and then concatenate the hidden states output by the forward LSTM and the reverse LSTM at each position to obtain a complete hidden state sequence;

[0058] S663: Access the linear layer to project the hidden state sequence into a score probability matrix corresponding to each word and each label;

[0059] S664: Use the score probability matrix in S663 as the input of the CRF model, i.e., the unnormalized emission probability;

[0060] S665: The scores of each annotation sequence are calculated by the CRF method. The specific calculation method is as follows:

[0061]

[0062] Among them, O is the score probability matrix passed in S663, O ij represents the probability of mapping the i-th character to the j-th label; A is the transition probability matrix, A yi,yi+1 Represents the label y i Transfer to y i+1 The probability of when; f(x, y) is the score of the current sequence;

[0063] S666: Calculate the labeling sequence corresponding to the maximum value in S665 as the optimal labeling sequence.

[0064] Furthermore, the process of step S7 is:

[0065] S71: Apply for Web service API type Key;

[0066] S72: Refer to the interface parameter document to initiate an HTTP / HTTPS request. The key applied in the first step must be sent as a required parameter. Here, you can specify the city to be queried in the HTTP / HTTPS request to achieve spatial filtering.

[0067] S73: receiving the data returned by the request (JSON or XML format), parsing the data with reference to the returned parameter document, and obtaining the GCJ-02 coordinate system coordinates corresponding to the input location;

[0068] S74: After obtaining the longitude and latitude coordinates and performing operations such as deduplication, relevant longitude and latitude information of urban waterlogging information can be obtained.

[0069] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0070] The present invention is developed based on social media data, and can make full use of the characteristics of real-time update and large data volume of social media data, and can provide real-time feedback of urban waterlogging geographic information when flood disasters occur; relying on web crawlers and neural network models, it has basically no dependence on actual conditions, and can adapt to the acquisition of urban waterlogging geographic information in different locations, different time periods, and different environments;

[0071] The core algorithm of the present invention can be transplanted on different platforms, including but not limited to mobile phone apps, WeChat applets, etc.; and the various component modules of the present invention are relatively independent, and can be adjusted for a certain module according to the needs of users, which is convenient for secondary development; the composition of the present invention is mainly composed of two modules, data acquisition and information extraction, both of which can be independently operated and secondary developed; data acquisition is used in the present invention to obtain relevant data on urban waterlogging. It only needs to modify keywords and reverse keywords to collect other aspects of Weibo data, such as sentiment analysis, disaster conditions, epidemic conditions, etc.; the essence of information extraction is a named entity recognition algorithm. The present invention only uses the extraction function of place names, that is, place adverbials. In fact, it can also be used to extract predicates, subjects, etc. The information extraction of the present invention is already a trained named entity recognition model, which can be applied to various scenarios requiring named entity recognition; in the present invention, the theme of urban waterlogging is determined in data acquisition (the theme is changeable), information extraction is a pure named entity recognition model, and the final acquisition is also a very basic and easy to operate and change csv file, so the various modules of the present invention have sufficient independence and are highly feasible for secondary development. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 is a flow chart of the method of the present invention;

[0073] Figure 2 Get a flow chart for the data;

[0074] Figure 3 This is a working diagram of the place name extraction model;

[0075] Figure 4 Comparison between the microblog waterlogging points obtained by the present invention and the official waterlogging points;

[0076] Figure 5 This is a spatiotemporal change diagram of waterlogging points in a certain city;

[0077] Figure 6 This is a graph showing the spatiotemporal changes of waterlogging points in a certain city. DETAILED DESCRIPTION

[0078] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;

[0079] In order to better illustrate the present embodiment, some parts in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product;

[0080] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0081] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0082] Example 1

[0083] like Figure 1 As shown, a method for automatically acquiring and visualizing real-time urban waterlogging information includes the following steps:

[0084] S1: Obtain a corpus and preprocess the text data in the corpus;

[0085] S2: Use the preprocessed text data to obtain the word vector matrix through deep learning;

[0086] S3: Obtain a benchmark word vector according to the word vector matrix, and use the benchmark word vector and the remaining word vectors to calculate the forward keyword and the reverse keyword;

[0087] S4: Use positive keywords to search for relevant text information on social platforms through web crawlers and obtain relevant text information;

[0088] S5: Use reverse keywords and waterlogging occurrence time period to filter relevant text information and retain valid text information;

[0089] S6: Establish a BiLSTM-CRF model, divide the valid text information into benchmark data and test data, use the benchmark data to train the established BiLSTM-CRF model, and input the test data into the trained BiLSTM-CRF model to extract the geographic location in text form;

[0090] S7: The geographic location in text form is converted into GCJ-02 coordinate system coordinates by calling the API interface of Amap to obtain the geographic location data of the target location.

[0091] like Figure 2 As shown, in step S1, the preprocessing uses the Wikipedia and social platform text data, and the preprocessing of the text data includes: label removal, Chinese word segmentation, and removal of stop words as a corpus.

[0092] In step S2, a word vector matrix is ​​constructed for the preprocessed text using a Distributed encoding method and a continuous bag-of-words model CBOW; the continuous bag-of-words model CBOW is a three-layer neural network, including:

[0093] Input Layer:

[0094] Assume that the vocabulary used to generate word vectors based on the preprocessed text consists of V words. One-hot encoding is used to encode V words to obtain V one-dimensional 1×V vectors, in which only one element of the V elements is 1 and the rest are 0; let the target word vector be X0, and its related background words be C, and the background word vectors are X1, X2, ..., X C ;

[0095] Hidden Layer:

[0096] Assuming that the required word vector is N-dimensional, the connection relationship from the input layer to the hidden layer is represented by a matrix WI of size V×N. The parameters of the matrix WI need to be learned through training, that is, initialized with random numbers. The hidden layer multiplies each background word vector by the matrix WI to obtain a total of C one-dimensional 1×N vectors. Then, the C one-dimensional 1×N vectors are added and averaged to obtain the output vector h of the hidden layer. The calculation process is expressed in the following mathematical formula:

[0097]

[0098] Output layer:

[0099] The connection relationship from the input layer to the hidden layer is represented by a matrix WO of size N×V. The parameters of the matrix WO need to be learned through training, that is, initialized with random numbers. The output layer multiplies the output vector h of the hidden layer by the matrix WO to obtain a one-dimensional 1×V output vector y. The calculation process is expressed by the following mathematical formula:

[0100] y=h·WO.

[0101] For the output vector y of the output layer, let y = {x1, x2, ..., x V}, and use the Sofimax function to normalize it to get the one-dimensional probability vector y′, which is the predicted word vector y′. The Softmax function formula is:

[0102]

[0103] where i = 1, 2, ..., V, j = 1, 2, ..., V, x i Convert to probability value;

[0104] The error between the predicted word vector y′ and the target word vector X0 is calculated through the loss function, and combined with the chain derivative rule, the parameters of the matrix WI and the matrix WO are updated by back-propagating the error to define the loss function. Here, the conditional probability of the background word is used and the logarithm is taken. The loss function can be understood as a special form of cross entropy that measures two probability distributions:

[0105]

[0106] where j * is the index of the real word in the vocabulary, and E is used to describe the size of the loss;

[0107] Derivative E, get the descending gradient, and update WI and WO:

[0108]

[0109]

[0110]

[0111]

[0112] EH is an N-dimensional vector, which is the weighted sum of the output vectors of all words in the vocabulary according to the prediction error;

[0113]

[0114] Since x is a one-hot encoding, according to its properties, So we get the following formula:

[0115]

[0116] Where η is a hyperparameter, representing the learning rate of the model, which is a constant; y represents the output of the model, that is, the prediction vector, which is a one-dimensional vector of length V; h is the output of the hidden layer, which has the same meaning as above, and is a one-dimensional vector of length N; t represents the true label, which is a one-dimensional vector of the same length as y, and is 1 only when j is the predicted word index, and 0 in all other cases; x is the input matrix, with a size of CxV, and each row and column has only one value that is 1 and not 0;

[0117] After updating the parameters of the matrix WI and the matrix WO, the training is iterated continuously until the predicted word vector y output by the model is consistent with the target word vector X0, which means the training is completed. After the training is completed, the matrix WI of size V×N is used as the word vector matrix of the vocabulary, where the row vector of the i-th row of the matrix corresponds to the word vector of the i-th word in the original vocabulary, that is, the Distributed encoded word vector.

[0118] The process of step S3 is:

[0119] S31: In view of the problem of urban waterlogging, "waterlogging" and "waterlogging" are selected as positive keywords. The word vectors corresponding to "waterlogging" and "waterlogging" are obtained through the word vector matrix of the vocabulary table. The cosine similarity is calculated between the remaining word vectors in the word vector matrix and the word vectors corresponding to "waterlogging" and "waterlogging". The vocabulary corresponding to the word vector with higher similarity is selected as the supplementary keyword. The cosine similarity calculation formula is as follows:

[0120] Suppose the two word vectors to be calculated are X = {x1, x2, ..., x V}, Y = {y1, y2, ..., y V},

[0121]

[0122] The larger the calculated cosine value cosθ is, the greater the similarity between the two word vectors is, and vice versa;

[0123] S32: The following positive keywords were finally determined through manual verification: "flooding", "flooding", "flooding", "rising water", "flood", "washed away", "drainage", "wading", "water inflow", and reverse keywords unrelated to urban waterlogging: "hydrocephalus", brain, brain, underwear, mobile phone, hydrocephalus, God of Wealth, cotton nylon, pond, cancer, hospital, running water, ward, Jinlun, head coach, brain, crazy, railroad track, rising water, ultrasound, sadness, precipitation, sweat, Zhou Suo, swimming, stock market, bone pain, China Securities Regulatory Commission, implantation, river wind, broken, river snow, bone tumor, pulmonary edema, drag put, salary, crater, girlfriend, aircraft carrier, product, saliva, seagull, lighthouse, ups and downs, the vast sea and sky, coarse flower, water in the ears, rolling set, World of Warcraft, news, computer, mobile phone, husband, culture, eating, hot water, sun, bathroom, screen, youth, cover the accumulated water, Domino's, sewer, North Korea, health care, moonlight entering the house, accumulated water into an abyss, spicy hot pot, cruise ship, stock market, microwave oven, mobile phone, traditional Chinese medicine, fallopian tube, reading, swimming, maintenance, wet compress, United States, knowledge, sweat, a natural process, bathing, doctor, water mill, distributed, Netherlands, pool, clear water, mac, bathroom, home, hydronephrosis.

[0124] In step S6, the specific training steps of the BiLSTM-CRF model are as follows:

[0125] S61: Split the pre-labeled benchmark data to obtain training data and test data;

[0126] S62: Establish a BiLSTM-CRF model and construct functions for training data and test data;

[0127] S63: Use the training data to repeatedly iterate the training model to obtain the optimal feature weights;

[0128] S64: Use the test data to test the calculation accuracy of the model, calculate the accuracy of the test data test results, and if it meets the standard, proceed to the next step; otherwise, adjust the model hyperparameters according to the evaluation results;

[0129] S65: Re-divide the benchmark data into training data and test data, repeat S63 and S64, and end the training after ensuring that the model can guarantee the accuracy of the test results under various conditions;

[0130] S66: Input the test data into the trained BiLSTM-CRF model to extract the geographic location in text form.

[0131] like Figure 3 As shown, the process of step S66 is:

[0132] S661: Use the word vector matrix pre-trained using the CBOW model to map each word in the text data sentence from a one-hot vector to a low-dimensional dense word vector;

[0133] S662: Automatically extract sentence features through the BiLSTM layer, take the word vector obtained in S1 as input, and then concatenate the hidden states output by the forward LSTM and the reverse LSTM at each position to obtain a complete hidden state sequence;

[0134] S663: Access the linear layer to project the hidden state sequence into a score probability matrix corresponding to each word and each label;

[0135] S664: Use the score probability matrix in S663 as the input of the CRF model, i.e., the unnormalized emission probability;

[0136] S665: The scores of each annotation sequence are calculated by the CRF method. The specific calculation method is as follows:

[0137]

[0138] Among them, O is the score probability matrix passed in S663, O ij represents the probability of mapping the i-th character to the j-th label; A is the transition probability matrix, A yi,yi+1 Represents the label y i Transfer to y i+1 The probability of when; f(x, y) is the score of the current sequence;

[0139] S666: Calculate the labeling sequence corresponding to the maximum value in S665 as the optimal labeling sequence.

[0140] The process of step S7 is:

[0141] S71: Apply for Web service API type Key;

[0142] S72: Refer to the interface parameter document to initiate an HTTP / HTTPS request. The key applied in the first step must be sent as a required parameter. Here, you can specify the city to be queried in the HTTP / HTTPS request to achieve spatial filtering.

[0143] S73: receiving the data returned by the request (JSON or XML format), parsing the data with reference to the returned parameter document, and obtaining the GCJ-02 coordinate system coordinates corresponding to the input location;

[0144] S74: After obtaining the longitude and latitude coordinates and performing operations such as deduplication, relevant longitude and latitude information of urban waterlogging information can be obtained.

[0145] The model of the present invention is universal and can be applied to different application environments without frequent and complex modeling processes. Figure 4 This is a comparison between the waterlogging points obtained by the model in a flood event in a certain city and the waterlogging points announced by the government. The number of place name information of a certain city extracted by the present invention is 109, and there are 77 waterlogging points within the city's jurisdiction. Figure 4 As shown by the blue and red dots in the middle; as of 18:00 on July 22, there were 28 waterlogging points in Zhengzhou City, as announced by a city traffic police official account. Figure 4 The white and red dots in the figure are shown in Figure 2. Figure 4 As shown by the red dots, there are 23 in total, and the coverage rate of Weibo waterlogging points to official waterlogging points is 82.14%, with a high accuracy rate.

[0146] Example 2

[0147] like Figure 1 As shown, a method for automatically acquiring and visualizing real-time urban waterlogging information includes the following steps:

[0148] S1: Obtain a corpus and preprocess the text data in the corpus;

[0149] S2: Use the preprocessed text data to obtain the word vector matrix through deep learning;

[0150] S3: Obtain a benchmark word vector according to the word vector matrix, and use the benchmark word vector and the remaining word vectors to calculate the forward keyword and the reverse keyword;

[0151] S4: Use positive keywords to search for relevant text information on social platforms through web crawlers and obtain relevant text information;

[0152] S5: Use reverse keywords and waterlogging occurrence time period to filter relevant text information and retain valid text information;

[0153] S6: Establish a BiLSTM-CRF model, divide the valid text information into benchmark data and test data, use the benchmark data to train the established BiLSTM-CRF model, and input the test data into the trained BiLSTM-CRF model to extract the geographic location in text form;

[0154] S7: The geographic location in text form is converted into GCJ-02 coordinate system coordinates by calling the API interface of Amap to obtain the geographic location data of the target location.

[0155] like Figure 2 As shown, in step S1, the preprocessing uses the Wikipedia and social platform text data, and the preprocessing of the text data includes: label removal, Chinese word segmentation, and removal of stop words as a corpus.

[0156] In step S2, a word vector matrix is ​​constructed for the preprocessed text using a Distributed encoding method and a continuous bag-of-words model CBOW; the continuous bag-of-words model CBOW is a three-layer neural network, including:

[0157] Input Layer:

[0158] Assume that the vocabulary used to generate word vectors based on the preprocessed text consists of V words. One-hot encoding is used to encode V words to obtain V one-dimensional 1×V vectors, in which only one element of the V elements is 1 and the rest are 0; let the target word vector be X0, and its related background words be C, and the background word vectors are X1, X2, …, X C ;

[0159] Hidden Layer:

[0160] Assuming that the required word vector is N-dimensional, the connection relationship from the input layer to the hidden layer is represented by a matrix WI of size V×N. The parameters of the matrix WI need to be learned through training, that is, initialized with random numbers. The hidden layer multiplies each background word vector by the matrix WI to obtain a total of C one-dimensional 1×N vectors. Then, the C one-dimensional 1×N vectors are added and averaged to obtain the output vector h of the hidden layer. The calculation process is expressed in the following mathematical formula:

[0161]

[0162] Output layer:

[0163] The connection relationship from the input layer to the hidden layer is represented by a matrix WO of size N×V. The parameters of the matrix WO need to be learned through training, that is, initialized with random numbers. The output layer multiplies the output vector h of the hidden layer by the matrix WO to obtain a one-dimensional 1×V output vector y. The calculation process is expressed by the following mathematical formula:

[0164] y=h·WO.

[0165] For the output vector y of the output layer, let y = {x1, x2, ..., x V}, and use the Softmax function to normalize it to get a one-dimensional probability vector y′, which is the predicted word vector y′. The Softmax function formula is:

[0166]

[0167] where i = 1, 2, ..., V, j = 1, 2, ..., V, x i Convert to probability value;

[0168] The error between the predicted word vector y′ and the target word vector X0 is calculated through the loss function, and combined with the chain derivative rule, the parameters of the matrix WI and the matrix WO are updated by back-propagating the error to define the loss function. Here, the conditional probability of the background word is used and the logarithm is taken. The loss function can be understood as a special form of cross entropy that measures two probability distributions:

[0169]

[0170] where j * is the index of the real word in the vocabulary, and E is used to describe the size of the loss;

[0171] Derivative E, get the descending gradient, and update WI and WO:

[0172]

[0173]

[0174]

[0175]

[0176] EH is an N-dimensional vector, which is the weighted sum of the output vectors of all words in the vocabulary according to the prediction error;

[0177]

[0178] Since x is a one-hot encoding, according to its properties, So we get the following formula:

[0179]

[0180] Where η is a hyperparameter, representing the learning rate of the model, which is a constant; y represents the output of the model, that is, the prediction vector, which is a one-dimensional vector of length V; h is the output of the hidden layer, which has the same meaning as above, and is a one-dimensional vector of length N; t represents the true label, which is a one-dimensional vector of the same length as y, and is 1 only when j is the predicted word index, and 0 in all other cases; x is the input matrix, with a size of CxV, and each row and column has only one value that is 1 and not 0;

[0181] After updating the parameters of the matrix WI and the matrix WO, the training is iterated continuously until the predicted word vector y output by the model is consistent with the target word vector X0, which means the training is completed. After the training is completed, the matrix WI of size V×N is used as the word vector matrix of the vocabulary, where the row vector of the i-th row of the matrix corresponds to the word vector of the i-th word in the original vocabulary, that is, the Distributed encoded word vector.

[0182] The process of step S3 is:

[0183] S31: In view of the problem of urban waterlogging, "waterlogging" and "waterlogging" are selected as positive keywords. The word vectors corresponding to "waterlogging" and "waterlogging" are obtained through the word vector matrix of the vocabulary table. The cosine similarity is calculated between the remaining word vectors in the word vector matrix and the word vectors corresponding to "waterlogging" and "waterlogging". The vocabulary corresponding to the word vector with higher similarity is selected as the supplementary keyword. The cosine similarity calculation formula is as follows:

[0184] Suppose the two word vectors to be calculated are X = {x1, x2, ..., x V}, Y = {y1, y2, ..., y V},

[0185]

[0186] The larger the calculated cosine value cosθ is, the greater the similarity between the two word vectors is, and vice versa;

[0187] S32: The following positive keywords were finally determined through manual verification: "flooding", "flooding", "flooding", "rising water", "flood", "washed away", "drainage", "wading", "water inflow", and reverse keywords unrelated to urban waterlogging: "hydrocephalus", brain, brain, underwear, mobile phone, hydrocephalus, God of Wealth, cotton nylon, pond, cancer, hospital, running water, ward, Jinlun, head coach, brain, crazy, railroad track, rising water, ultrasound, sadness, precipitation, sweat, Zhou Suo, swimming, stock market, bone pain, China Securities Regulatory Commission, implantation, river wind, broken, river snow, bone tumor, pulmonary edema, drag put, salary, crater, girlfriend, aircraft carrier, product, saliva, seagull, lighthouse, ups and downs, the vast sea and sky, coarse flower, water in the ears, rolling set, World of Warcraft, news, computer, mobile phone, husband, culture, eating, hot water, sun, bathroom, screen, youth, cover the accumulated water, Domino's, sewer, North Korea, health care, moonlight entering the house, accumulated water into an abyss, spicy hot pot, cruise ship, stock market, microwave oven, mobile phone, traditional Chinese medicine, fallopian tube, reading, swimming, maintenance, wet compress, United States, knowledge, sweat, a natural process, bathing, doctor, water mill, distributed, Netherlands, pool, clear water, mac, bathroom, home, hydronephrosis.

[0188] In step S6, the specific training steps of the BiLSTM-CRF model are as follows:

[0189] S61: Split the pre-labeled benchmark data to obtain training data and test data;

[0190] S62: Establish a BiLSTM-CRF model and construct functions for training data and test data;

[0191] S63: Use the training data to repeatedly iterate the training model to obtain the optimal feature weights;

[0192] S64: Use the test data to test the calculation accuracy of the model, calculate the accuracy of the test data test results, and if it meets the standard, proceed to the next step; otherwise, adjust the model hyperparameters according to the evaluation results;

[0193] S65: Re-divide the benchmark data into training data and test data, repeat S63 and S64, and end the training after ensuring that the model can guarantee the accuracy of the test results under various conditions;

[0194] S66: Input the test data into the trained BiLSTM-CRF model to extract the geographic location in text form.

[0195] like Figure 3 As shown, the process of step S66 is:

[0196] S661: Use the word vector matrix pre-trained using the CBOW model to map each word in the text data sentence from a one-hot vector to a low-dimensional dense word vector;

[0197] S662: Automatically extract sentence features through the BiLSTM layer, take the word vector obtained in S1 as input, and then concatenate the hidden states output by the forward LSTM and the reverse LSTM at each position to obtain a complete hidden state sequence;

[0198] S663: Access the linear layer to project the hidden state sequence into a score probability matrix corresponding to each word and each label;

[0199] S664: Use the score probability matrix in S663 as the input of the CRF model, i.e., the unnormalized emission probability;

[0200] S665: The scores of each annotation sequence are calculated by the CRF method. The specific calculation method is as follows:

[0201]

[0202] Among them, O is the score probability matrix passed in S663, O ij represents the probability of mapping the i-th character to the j-th label; A is the transition probability matrix, A yi,yi+1 Represents the label y i Transfer to y i+1 The probability of when; f(x, y) is the score of the current sequence;

[0203] S666: Calculate the labeling sequence corresponding to the maximum value in S665 as the optimal labeling sequence.

[0204] The process of step S7 is:

[0205] S71: Apply for Web service API type Key;

[0206] S72: Refer to the interface parameter document to initiate an HTTP / HTTPS request. The key applied in the first step must be sent as a required parameter. Here, you can specify the city to be queried in the HTTP / HTTPS request to achieve spatial filtering.

[0207] S73: receiving the data returned by the request (JSON or XML format), parsing the data with reference to the returned parameter document, and obtaining the GCJ-02 coordinate system coordinates corresponding to the input location;

[0208] S74: After obtaining the longitude and latitude coordinates and performing operations such as deduplication, relevant longitude and latitude information of urban waterlogging information can be obtained.

[0209] The present invention also simulates the development trend of waterlogging in a certain city at that time. Figure 5 , the spatiotemporal development of urban waterlogging in a certain city can be clearly observed: the urban waterlogging caused by heavy rain initially occurred mainly in the urban area of ​​a certain city; and as the duration of heavy rain increased, net rain on the ground continued to accumulate, and serious waterlogging and even urban waterlogging occurred in many places in the urban area of ​​a certain city; in addition to the urban area, other county-level cities were also gradually affected by the heavy rain and began to experience waterlogging.

[0210] Example 3

[0211] like Figure 1 As shown, a method for automatically acquiring and visualizing real-time urban waterlogging information includes the following steps:

[0212] S1: Obtain a corpus and preprocess the text data in the corpus;

[0213] S2: Use the preprocessed text data to obtain the word vector matrix through deep learning;

[0214] S3: Obtain a benchmark word vector according to the word vector matrix, and use the benchmark word vector and the remaining word vectors to calculate the forward keyword and the reverse keyword;

[0215] S4: Use positive keywords to search for relevant text information on social platforms through web crawlers and obtain relevant text information;

[0216] S5: Use reverse keywords and waterlogging occurrence time period to filter relevant text information and retain valid text information;

[0217] S6: Establish a BiLSTM-CRF model, divide the valid text information into benchmark data and test data, use the benchmark data to train the established BiLSTM-CRF model, and input the test data into the trained BiLSTM-CRF model to extract the geographic location in text form;

[0218] S7: The geographic location in text form is converted into GCJ-02 coordinate system coordinates by calling the API interface of Amap to obtain the geographic location data of the target location.

[0219] like Figure 2 As shown, in step S1, the preprocessing uses the Wikipedia and social platform text data, and the preprocessing of the text data includes: label removal, Chinese word segmentation, and removal of stop words as a corpus.

[0220] In step S2, a word vector matrix is ​​constructed for the preprocessed text using a Distributed encoding method and a continuous bag-of-words model CBOW; the continuous bag-of-words model CBOW is a three-layer neural network, including:

[0221] Input Layer:

[0222] Assume that the vocabulary used to generate word vectors based on the preprocessed text consists of V words. One-hot encoding is used to encode V words to obtain V one-dimensional 1×V vectors, in which only one element of the V elements is 1 and the rest are 0; let the target word vector be X0, and its related background words be C, and the background word vectors are X1, X2, ..., X C ;

[0223] Hidden Layer:

[0224] Assuming that the required word vector is N-dimensional, the connection relationship from the input layer to the hidden layer is represented by a matrix WI of size V×N. The parameters of the matrix WI need to be learned through training, that is, initialized with random numbers. The hidden layer multiplies each background word vector by the matrix WI to obtain a total of C one-dimensional 1×N vectors. Then, the C one-dimensional 1×N vectors are added and averaged to obtain the output vector h of the hidden layer. The calculation process is expressed in the following mathematical formula:

[0225]

[0226] Output layer:

[0227] The connection relationship from the input layer to the hidden layer is represented by a matrix WO of size N×V. The parameters of the matrix WO need to be learned through training, that is, initialized with random numbers. The output layer multiplies the output vector h of the hidden layer by the matrix WO to obtain a one-dimensional 1×V output vector y. The calculation process is expressed by the following mathematical formula:

[0228] y=h·WO.

[0229] For the output vector y of the output layer, let y = {x1, x2, ..., x V}, and use the Softmax function to normalize it to get a one-dimensional probability vector y′, which is the predicted word vector y′. The Softmax function formula is:

[0230]

[0231] where i = 1, 2, ..., V, j = 1, 2, ..., V, x i Convert to probability value;

[0232] The error between the predicted word vector y′ and the target word vector X0 is calculated through the loss function, and combined with the chain derivative rule, the parameters of the matrix WI and the matrix WO are updated by back-propagating the error to define the loss function. Here, the conditional probability of the background word is used and the logarithm is taken. The loss function can be understood as a special form of cross entropy that measures two probability distributions:

[0233]

[0234] where j * is the index of the real word in the vocabulary, and E is used to describe the size of the loss;

[0235] Derivative E, get the descending gradient, and update WI and WO:

[0236]

[0237]

[0238]

[0239]

[0240] EH is an N-dimensional vector, which is the weighted sum of the output vectors of all words in the vocabulary according to the prediction error;

[0241]

[0242] Since x is a one-hot encoding, according to its properties, So we get the following formula:

[0243]

[0244] Where η is a hyperparameter, representing the learning rate of the model, which is a constant; y represents the output of the model, that is, the prediction vector, which is a one-dimensional vector of length V; h is the output of the hidden layer, which has the same meaning as above, and is a one-dimensional vector of length N; t represents the true label, which is a one-dimensional vector of the same length as y, and is 1 only when j is the predicted word index, and 0 in all other cases; x is the input matrix, with a size of CxV, and each row and column has only one value that is 1 and not 0;

[0245] After updating the parameters of the matrix WI and the matrix WO, the training is iterated continuously until the predicted word vector y output by the model is consistent with the target word vector X0, which means the training is completed. After the training is completed, the matrix WI of size V×N is used as the word vector matrix of the vocabulary, where the row vector of the i-th row of the matrix corresponds to the word vector of the i-th word in the original vocabulary, that is, the Distributed encoded word vector.

[0246] The process of step S3 is:

[0247] S31: In view of the problem of urban waterlogging, "waterlogging" and "waterlogging" are selected as positive keywords. The word vectors corresponding to "waterlogging" and "waterlogging" are obtained through the word vector matrix of the vocabulary table. The cosine similarity is calculated between the remaining word vectors in the word vector matrix and the word vectors corresponding to "waterlogging" and "waterlogging". The vocabulary corresponding to the word vector with higher similarity is selected as the supplementary keyword. The cosine similarity calculation formula is as follows:

[0248] Assume that the two word vectors to be calculated are x = {x1, x2, ..., x V}, Y = {y1, y2, ..., y V},

[0249]

[0250] The larger the calculated cosine value cosθ is, the greater the similarity between the two word vectors is, and vice versa;

[0251] S32: The following positive keywords were finally determined through manual verification: "flooding", "flooding", "flooding", "rising water", "flood", "washed away", "drainage", "wading", "water inflow", and reverse keywords unrelated to urban waterlogging: "hydrocephalus", brain, brain, underwear, mobile phone, hydrocephalus, God of Wealth, cotton nylon, pond, cancer, hospital, running water, ward, Jinlun, head coach, brain, crazy, railroad track, rising water, ultrasound, sadness, precipitation, sweat, Zhou Suo, swimming, stock market, bone pain, China Securities Regulatory Commission, implantation, river wind, broken, river snow, bone tumor, pulmonary edema, drag put, salary, crater, girlfriend, aircraft carrier, product, saliva, seagull, lighthouse, ups and downs, the vast sea and sky, coarse flower, water in the ears, rolling set, World of Warcraft, news, computer, mobile phone, husband, culture, eating, hot water, sun, bathroom, screen, youth, cover the accumulated water, Domino's, sewer, North Korea, health care, moonlight entering the house, accumulated water into an abyss, spicy hot pot, cruise ship, stock market, microwave oven, mobile phone, traditional Chinese medicine, fallopian tube, reading, swimming, maintenance, wet compress, United States, knowledge, sweat, a natural process, bathing, doctor, water mill, distributed, Netherlands, pool, clear water, mac, bathroom, home, hydronephrosis.

[0252] In step S6, the specific training steps of the BiLSTM-CRF model are as follows:

[0253] S61: Split the pre-labeled benchmark data to obtain training data and test data;

[0254] S62: Establish a BiLSTM-CRF model and construct functions for training data and test data;

[0255] S63: Use the training data to repeatedly iterate the training model to obtain the optimal feature weights;

[0256] S64: Use the test data to test the calculation accuracy of the model, calculate the accuracy of the test data test results, and if it meets the standard, proceed to the next step; otherwise, adjust the model hyperparameters according to the evaluation results;

[0257] S65: Re-divide the benchmark data into training data and test data, repeat S63 and S64, and end the training after ensuring that the model can guarantee the accuracy of the test results under various conditions;

[0258] S66: Input the test data into the trained BiLSTM-CRF model to extract the geographic location in text form.

[0259] like Figure 3 As shown, the process of step S66 is:

[0260] S661: Use the word vector matrix pre-trained using the CBOW model to map each word in the text data sentence from a one-hot vector to a low-dimensional dense word vector;

[0261] S662: Automatically extract sentence features through the BiLSTM layer, take the word vector obtained in S1 as input, and then concatenate the hidden states output by the forward LSTM and the reverse LSTM at each position to obtain a complete hidden state sequence;

[0262] S663: Access the linear layer to project the hidden state sequence into a score probability matrix corresponding to each word and each label;

[0263] S664: Use the score probability matrix in S663 as the input of the CRF model, i.e., the unnormalized emission probability;

[0264] S665: The scores of each annotation sequence are calculated by the CRF method. The specific calculation method is as follows:

[0265]

[0266] Among them, O is the score probability matrix passed in S663, O i j represents the probability of mapping the i-th character to the j-th label; A is the transition probability matrix, A yi,yi+1 Represents the label y i Transfer to y i+1 The probability of when; f(x, y) is the score of the current sequence;

[0267] S666: Calculate the labeling sequence corresponding to the maximum value in S665 as the optimal labeling sequence.

[0268] The process of step S7 is:

[0269] S71: Apply for Web service API type Key;

[0270] S72: Refer to the interface parameter document to initiate an HTTP / HTTPS request. The key applied in the first step must be sent as a required parameter. Here, you can specify the city to be queried in the HTTP / HTTPS request to achieve spatial filtering.

[0271] S73: receiving the data returned by the request (JSON or XML format), parsing the data with reference to the returned parameter document, and obtaining the GCJ-02 coordinate system coordinates corresponding to the input location;

[0272] S74: After obtaining the longitude and latitude coordinates and performing operations such as deduplication, relevant longitude and latitude information of urban waterlogging information can be obtained.

[0273] The present invention can also monitor the temporal and spatial changes of waterlogging with high precision. Figure 6 The spatial and temporal changes of waterlogging points on an hourly scale can be seen. Figure 6 There are 43 waterlogging points from 0 to 6 o'clock, 53 waterlogging points from 6 to 12 o'clock, 63 waterlogging points from 12 to 18 o'clock, and 58 waterlogging points from 18 to 24 o'clock. This is generally consistent with the changing trend of rainfall every 6 hours in a certain city, and the spatiotemporal changes of waterlogging points on an hourly scale are consistent with reality.

[0274] The same or similar reference numerals correspond to the same or similar components;

[0275] The positional relationships described in the drawings are only for illustrative purposes and should not be construed as limiting the present patent;

[0276] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A method for automatically acquiring and visualizing real-time information on urban waterlogging, characterized in that: The following steps are involved: S1: Obtain a corpus and preprocess the text data in the corpus; The preprocessing uses the text data from the library encyclopedia and social platform, and the preprocessing of the text data includes: label removal, Chinese word segmentation, and removal of stop words as a corpus; S2: Use the preprocessed text data to obtain the word vector matrix through deep learning; Use Distributed encoding and continuous bag-of-words model (CBOW) to construct word vector matrix for preprocessed text; The continuous bag of words model CBOW is a three-layer neural network, including: Input Layer: Assume that the vocabulary used to generate word vectors based on the preprocessed text consists of V words. One-hot encoding is used to encode V words to obtain V one-dimensional 1×V vectors, in which only one element of the V elements is 1 and the rest are 0; let the target word vector be X0, and its related background words be C, and the background word vectors are X1, X2, …, X C ; Hidden Layer: Assuming that the required word vector is N-dimensional, the connection relationship from the input layer to the hidden layer is represented by a matrix WI of size V×N. The parameters of the matrix WI need to be learned through training, that is, initialized with random numbers. The hidden layer multiplies each background word vector by the matrix WI to obtain a total of C one-dimensional 1×N vectors. Then, the C one-dimensional 1×N vectors are added and averaged to obtain the output vector h of the hidden layer. The calculation process is expressed in the following mathematical formula: Output layer: The connection relationship from the input layer to the hidden layer is represented by a matrix WO of size N×V. The parameters of the matrix WO need to be learned through training, that is, initialized with random numbers. The output layer multiplies the output vector h of the hidden layer by the matrix WO to obtain a one-dimensional 1×V output vector y. The calculation process is expressed by the following mathematical formula: y = h·WO; For the output vector y of the output layer, let y = {x1, x2, …, x V }, and use the Softmax function to normalize it to get a one-dimensional probability vector y′, which is the predicted word vector y′. The Softmax function formula is: where i = 1, 2, ..., V, j = 1, 2, ..., B, x i Convert to probability value; The error between the predicted word vector y′ and the target word vector X0 is calculated through the loss function, and combined with the chain derivative rule, the parameters of the matrix WI and the matrix WO are updated by back-propagating the error to define the loss function. Here, the conditional probability of the background word is used and the logarithm is taken. The loss function can be understood as a special form of cross entropy that measures two probability distributions: where j * is the index of the real word in the vocabulary, and E is used to describe the size of the loss; Derivative E, get the descending gradient, and update WI and WO: EH is an N-dimensional vector, which is the weighted sum of the output vectors of all words in the vocabulary according to the prediction error; Since x is a one-hot encoding, according to its properties, So we get the following formula: Where η is a hyperparameter, representing the learning rate of the model, which is a constant; y represents the output of the model, that is, the prediction vector, which is a one-dimensional vector of length V; h is the output of the hidden layer, which has the same meaning as above, and is a one-dimensional vector of length N; t represents the true label, which is a one-dimensional vector of the same length as y, and is 1 only when j is the predicted word index, and 0 in all other cases; x is the input matrix, with a size of CxV, and each row and column has only one value that is 1 and not 0; After updating the parameters of the matrix WI and the matrix WO, the training is iterated continuously until the predicted word vector y output by the model is consistent with the target word vector X0, which means the training is completed. After the training is completed, the V×N-sized matrix WI is used as the word vector matrix of the vocabulary, where the row vector of the i-th row of the matrix corresponds to the word vector of the i-th word in the original vocabulary, that is, the Distributed Encoded Word Vector. S3: Obtain a benchmark word vector according to the word vector matrix, and use the benchmark word vector and the remaining word vectors to calculate the forward keyword and the reverse keyword; S4: Use positive keywords to search for relevant text information on social platforms through web crawlers and obtain relevant text information; S5: Use reverse keywords and waterlogging occurrence time period to filter relevant text information and retain valid text information; S6: Establish a BiLSTM-CRF model, divide the valid text information into benchmark data and test data, use the benchmark data to train the established BiLSTM-CRF model, and input the test data into the trained BiLSTM-CRF model to extract the geographic location in text form; S7: The geographic location in text form is converted into GCJ-02 coordinate system coordinates by calling the API interface of Amap to obtain the geographic location data of the target location.

2. The method for automatically acquiring and visualizing real-time urban waterlogging information according to claim 1 is characterized in that: The process of step S3 is: S31: In view of the problem of urban waterlogging, "waterlogging" and "waterlogging" are selected as positive keywords. The word vectors corresponding to "waterlogging" and "waterlogging" are obtained through the word vector matrix of the vocabulary table. The cosine similarity is calculated between the remaining word vectors in the word vector matrix and the word vectors corresponding to "waterlogging" and "waterlogging". The vocabulary corresponding to the word vector with higher similarity is selected as the supplementary keyword. The cosine similarity calculation formula is as follows: Assume that the two word vectors to be calculated are X = {x1, x2, ..., x V }、Y={y1,y2,…,y V }, The larger the calculated cosine value cosθ is, the greater the similarity between the two word vectors is, and vice versa; S32: The following positive keywords were finally determined through manual verification: "flooding", "flooding", "flooding", "rising water", "flood", "washed away", "drainage", "wading", "water inflow", and reverse keywords not related to urban waterlogging: "hydrocephalus", brain, brain, underwear, mobile phone, hydrocephalus, God of Wealth, cotton nylon, pond of water, cancer, hospital, running water, ward, Jinlun, head coach, brain, crazy, railroad track, rising water, ultrasound, sadness, precipitation, sweat, Zhou Suo, swimming, stock market, bone pain, China Securities Regulatory Commission, implantation, river wind, broken, river snow, bone tumor, pulmonary edema, drag put, salary, crater, girlfriend, aircraft carrier, product, saliva, seagull, lighthouse, ups and downs, the vast sea and sky, coarse flower, water in the ears, rolling set, World of Warcraft, news, computer, mobile phone, husband, culture, eating, hot water, sun, bathroom, screen, youth, cover the accumulated water, Domino's, sewer, North Korea, health care, moonlight entering the house, accumulated water into an abyss, spicy hot pot, cruise ship, stock market, microwave oven, mobile phone, traditional Chinese medicine, fallopian tube, reading, swimming, maintenance, wet compress, United States, knowledge, sweat, a natural process, bathing, doctor, water mill, distributed, Netherlands, pool, clear water, mac, bathroom, home, hydronephrosis.

3. The method for automatically acquiring and visualizing real-time urban waterlogging information according to claim 2 is characterized in that: In step S6, the specific training steps of the BiLSTM-CRF model are as follows: S61: Split the pre-labeled benchmark data to obtain training data and test data; S62: Establish a BiLSTM-CRF model and construct functions for training data and test data; S63: Use the training data to repeatedly iterate the training model to obtain the optimal feature weights; S64: using the test data to test the calculation accuracy of the model, and calculating the accuracy of the test results of the test data. If it meets the standard, proceed to the next step; Otherwise, adjust the model hyperparameters based on the evaluation results; S65: Re-divide the benchmark data into training data and test data, repeat S63 and S64, and end the training after ensuring that the model can guarantee the accuracy of the test results under various conditions; S66: Input the test data into the trained BiLSTM-CRF model to extract the geographic location in text form.

4. The method for automatically acquiring and visualizing real-time urban waterlogging information according to claim 3 is characterized in that: The process of step S66 is: S661: Use the word vector matrix pre-trained using the CBOW model to map each word in the text data sentence from a one-hot vector to a low-dimensional dense word vector; S662: Automatically extract sentence features through the BiLSTM layer, take the word vector obtained in S1 as input, and then concatenate the hidden states output by the forward LSTM and the reverse LSTM at each position to obtain a complete hidden state sequence; S663: Access the linear layer to project the hidden state sequence into a score probability matrix corresponding to each word and each label; S664: Use the score probability matrix in S663 as the input of the CRF model, i.e., the unnormalized emission probability; S665: The scores of each annotation sequence are calculated by the CRF method. The specific calculation method is as follows: Among them, O is the score probability matrix passed in S663, O ij represents the probability of mapping the i-th character to the j-th label; A is the transition probability matrix, A yi,yi+1 Represents the label y i Transfer to y i+1 The probability of when; f(x,y) is the score of the current sequence; S666: Calculate the labeling sequence corresponding to the maximum value in S665 as the optimal labeling sequence.

5. The method for automatically acquiring and visualizing real-time urban waterlogging information according to claim 4 is characterized in that: The process of step S7 is: S71: Apply for Web service API type Key; S72: Refer to the interface parameter document to initiate an HTTP / HTTPS request. The key applied in the first step must be sent as a required parameter. Here, you can specify the city to be queried in the HTTP / HTTPS request to achieve spatial filtering. S73: receiving the data returned by the request, parsing the data with reference to the returned parameter document, and obtaining the GCJ-02 coordinate system coordinates corresponding to the input location; S74: After obtaining the longitude and latitude coordinates and performing operations such as deduplication, relevant longitude and latitude information of urban waterlogging information can be obtained.

6. The method for automatically acquiring and visualizing real-time urban waterlogging information according to claim 5 is characterized in that: The data returned by the receiving request is in JSON or XML format.

Citation Information

Patent Citations

  • Invoice false decline risk assessment method based on keyword extraction and rapid text classification

    CN112182207A

  • Intelligent contract code defect detection method based on structured word embedding network

    CN112416358A

  • Urban waterlogging public opinion result obtaining method and device

    CN112417148A