Rainfall matching method, device, equipment, medium and product

By performing spatiotemporal matrix processing and convolutional neural network analysis on historical rainfall data, an index database is established to achieve rainfall matching, which solves the problem of low rainfall matching accuracy in the existing technology and improves the accuracy and efficiency of matching.

CN120123385AActive Publication Date: 2025-06-10BEIJING WATER SCI & TECH INST +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510290426.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-06-10
Estimated Expiration
2045-03-12

AI Technical Summary

Technical Problem

The existing rainfall matchmaking technology has strong subjectivity in the extraction of rainfall characteristics, resulting in the loss of some rainfall information, affecting the accuracy of rainfall matching in the scene.

Method used

By obtaining the space-time matrix of historical rainfall in each scene, and processing the space-time matrix based on the convolutional neural network, encoded data is obtained and an index database is established to achieve fast matching.

Benefits of technology

It improves the accuracy and matching efficiency of rainfall matching, shortens the time for rainfall forecasting and disaster scenario prediction, and enhances the basis for flood prevention warning management decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120123385A_ABST
    Figure CN120123385A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of meteorological monitoring, and discloses a rainfall matching method, device and equipment, a medium and a product, and the method comprises the steps: obtaining a space-time matrix corresponding to the historical rainfall of each session; the space-time matrix is a two-dimensional matrix which takes the spatial position of the rainfall monitoring station as a spatial dimension and takes rainfall duration as a time dimension; processing the space-time matrix based on a convolutional neural network to obtain coded data corresponding to historical rainfall of each session; establishing an index database according to the coded data corresponding to the historical rainfall of each session; and the index database is used for querying historical rainfall meeting similar conditions with the rainfall data to be matched according to the input target coded data. According to the scheme, the time-space features of rainfall are considered, the time-space features are converted into the coded data through the convolutional neural network, and the coded data are indexed to realize rainfall matching, so that the accuracy of rainfall matching is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of meteorological monitoring, and particularly relates to a rainfall matching method, device, equipment, medium and product. Background Art

[0002] Deeply mining the spatio-temporal distribution characteristics of historical rainfall, and realizing the rapid matching of forecast rainfall by constructing a rapid matching method for similar rainfall, can effectively shorten the time of rainfall forecast and disaster scenario prediction, and is of great significance to flood control early warning management decision-making.

[0003] The existing rainfall event matching technologies mainly extract rainfall characteristic values. The rainfall characteristics include rainfall grade, total rainfall, rainfall duration, heavy rainfall duration, average rainfall amount, maximum rainfall amount, maximum rainfall intensity in 1 hour, etc. The extraction of rainfall characteristics is highly subjective, which is bound to cause the loss of some rainfall information and affect the accuracy of event rainfall matching. Summary of the Invention

[0004] In view of this, the present invention provides a rainfall matching method, device, equipment, medium and product to improve...

[0005] In a first aspect, the present invention provides a rainfall matching method, which includes:

[0006] Obtaining a spatio-temporal matrix corresponding to each historical rainfall event; the spatio-temporal matrix is a two-dimensional matrix with the spatial positions of rainfall monitoring stations as the spatial dimension and the rainfall duration as the time dimension;

[0007] Processing the spatio-temporal matrix based on a convolutional neural network to obtain encoded data corresponding to each historical rainfall event;

[0008] Establishing an index database according to the encoded data corresponding to each historical rainfall event; the index database is used to query historical rainfall that meets the similarity condition with the rainfall data to be matched according to the input target encoded data.

[0009] In a possible implementation manner, the method further includes:

[0010] Obtaining rainfall data to be matched;

[0011] Generating a target spatio-temporal matrix according to the rainfall data to be matched;

[0012] Processing the spatio-temporal matrix based on the convolutional neural network to obtain target encoded data corresponding to the rainfall data to be matched;

[0013] Inputting the target encoded data into the index database to obtain historical rainfall that meets the similarity condition with the rainfall data to be matched.

[0014] In a possible implementation, inputting the target encoded data into the index database to obtain historical rainfall that meets the similarity condition with the rainfall data to be matched includes:

[0015] Obtaining the similarity between the target encoded data and each encoded data in the index database;

[0016] Taking the historical rainfall corresponding to the encoded data with the highest similarity to the target encoded data in the index database as the historical rainfall that meets the similarity condition with the data to be matched.

[0017] In a possible implementation, each word is included in the encoded data;

[0018] The obtaining the similarity between the target encoded data and each encoded data in the index database includes:

[0019] Determining the similarity between the target encoded data and the encoded data in the index database through the following formula:

[0020] S = y / dp × 100%

[0021] Where S is the similarity; y is the number of times the word in the target encoded data appears in the encoded data in the index database; dp is the length of the encoded data.

[0022] In a possible implementation, processing the spatio-temporal matrix based on a convolutional neural network to obtain the encoded data corresponding to each historical rainfall includes:

[0023] Constructing a rainfall feature recognition model for each session based on a convolutional neural network; the rainfall feature recognition model for each session includes 1 input layer, a first number of convolutional layers, a second number of pooling layers, and a third number of fully connected layers;

[0024] Processing the spatio-temporal matrix through the rainfall feature recognition model for each session to obtain the encoded data corresponding to the historical rainfall for each session.

[0025] In a possible implementation, establishing an index database according to the encoded data corresponding to each historical rainfall includes:

[0026] Obtaining an orthogonal matrix; the orthogonal matrix is obtained by performing QR decomposition on a target matrix; the dimension of the target matrix is the same as the feature dimension of the encoded data;

[0027] Projecting the encoded data based on the orthogonal matrix to obtain the dimension-reduced features;

[0028] Determine the number of bits q of the quantization result for each dimension of the feature after dimensionality reduction, and obtain 2 q optional quantization values;

[0029] Arrange the features of each dimension of the feature after dimensionality reduction in ascending order and divide them into 2 q equal parts;

[0030] Quantize the features of each dimension of the feature after dimensionality reduction according to the segmentation interval where the features of each dimension of the feature after dimensionality reduction are located, so as to generate an image signature corresponding to the encoded data;

[0031] Construct an index with each word of the image signature to establish the index database.

[0032] In a second aspect, a rainfall matching device is provided, and the device includes:

[0033] An acquisition module, configured to acquire a spatio-temporal matrix corresponding to each historical rainfall; the spatio-temporal matrix is a two-dimensional matrix with the spatial positions of rainfall monitoring stations as the spatial dimension and the rainfall duration as the time dimension;

[0034] A processing module, configured to process the spatio-temporal matrix based on a convolutional neural network to obtain encoded data corresponding to each historical rainfall;

[0035] An index module, configured to establish an index database according to the encoded data corresponding to each historical rainfall; the index database is used to query historical rainfall that meets the similarity condition with the rainfall data to be matched according to the input target encoded data.

[0036] In a third aspect, a computer device is provided, including: a memory and a processor, which are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the above rainfall matching method.

[0037] In a fourth aspect, a computer-readable storage medium is provided, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the above rainfall matching method.

[0038] In a fifth aspect, a computer program product is provided, including computer instructions, and the computer instructions are used to cause a computer to execute the above rainfall matching method.

[0039] The technical solution provided by this application may include the following beneficial effects:

[0040] To achieve rainfall matching, a computer device can first obtain the data of historical rainfall for each event and generate a corresponding spatio-temporal matrix, that is, a two-dimensional matrix with the spatial positions of rainfall detection stations as the spatial dimension and the rainfall duration as the time dimension. The spatio-temporal matrix is processed based on a convolutional neural network to obtain the encoded data corresponding to each event of historical rainfall. Then, the computer device establishes an index database according to the encoded data corresponding to each event of historical rainfall. At this time, the index database can query the historical rainfall that meets the similarity condition with the rainfall data to be matched according to the input target encoded data. In the above solution, the spatio-temporal characteristics of rainfall are considered, and the spatio-temporal characteristics are converted into encoded data through a convolutional neural network, and rainfall matching is achieved through indexing with the encoded data, improving the accuracy of rainfall matching. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0042] Figure 1 is a flowchart of a rainfall matching method shown according to an exemplary embodiment.

[0043] Figure 2 is a flowchart of a rainfall matching method shown according to an exemplary embodiment.

[0044] Figure 3 shows a schematic diagram of the rainfall situation of 9 monitoring stations selected in a certain basin.

[0045] Figure 4 shows a schematic diagram of a rainfall matrix involved in an embodiment of the present application.

[0046] Figure 5 shows a spatio-temporal image of rainfall for each event involved in an embodiment of the present application.

[0047] Figure 6 shows a schematic diagram of rainfall matching involved in an embodiment of the present application.

[0048] Figure 7 shows a schematic diagram of the rainfall amount process lines of two matched rainfall events.

[0049] Figure 8 shows a schematic diagram of the rainfall patterns of the rainfall amounts of two matched rainfall events.

[0050] Figure 9It is a schematic structural diagram of a rainfall matching device provided by an embodiment of the present application.

[0051] Figure 10 It is a schematic structural diagram of a computer device provided by an optional embodiment of the present invention. Detailed implementation manners

[0052] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0053] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect corresponding relationship between two parties, may also indicate an association relationship between two parties, or may be a relationship such as indication and being indicated, configuration and being configured, etc.

[0054] Deeply mining the spatio-temporal distribution characteristics of historical rainfall, through constructing a fast matching method for similar rainfall, realizing the fast matching of forecast rainfall, can effectively shorten the time of rainfall forecast and disaster scenario prediction, and is of great significance to flood control early warning management decision-making. The existing rainfall event matching technology mainly extracts rainfall characteristic values. Rainfall characteristics include rainfall grade, total rainfall, rainfall duration, heavy rainfall duration, average rainfall amount, maximum rainfall amount, maximum rainfall intensity in 1 hour, etc. The extraction of rainfall characteristics is highly subjective, which is bound to cause the loss of some rainfall information and affect the accuracy of event rainfall matching. The existing technology has proposed a matching technology for forecast rainfall and event rainfall in the scenario library based on the dynamic time warping method, which can quickly realize the fast matching of real-time forecast rainfall and event rainfall in the scenario library. However, this method only extracts the characteristic values of historical rainfall in the time dimension and does not reflect the spatial distribution characteristics of event rainfall. Rainfall has information in both time and space dimensions, which can be expressed by a two-dimensional matrix. Mapping the rainfall information to the two-dimensional matrix can transform the rainfall information into image information for expression. By borrowing mature image recognition methods, accurate, objective and fast extraction can be achieved. The present invention synthesizes the spatio-temporal distribution characteristics of event rainfall, extracts the characteristics of rainfall spatio-temporal images through a convolutional neural network, intelligently matches the similarity between forecast rainfall and historical event rainfall, improves the accuracy and matching efficiency of rainfall matching, and effectively shortens the timeliness and effectiveness of "rainfall forecast - disaster scenario prediction - flood control emergency plan".

[0055] Figure 1 It is a method flowchart of a rainfall matching method shown according to an exemplary embodiment. This method is executed by a computer device. As Figure 1As shown in the figure, the rainfall matching method may include the following steps:

[0056] Step 201, obtain the spatio-temporal matrix corresponding to each historical rainfall; the spatio-temporal matrix is a two-dimensional matrix with the spatial positions of rainfall monitoring stations as the spatial dimension and the rainfall duration as the time dimension.

[0057] Each historical rainfall event lasts for a period of time in a certain area, and the rainfall amounts in different areas may vary at different times. Therefore, each historical rainfall event has strong spatio-temporal attributes. At this time, for each historical rainfall event, the data collected by the rainfall monitoring stations over time can be converted into a two-dimensional matrix with the spatial positions of the rainfall monitoring stations as the spatial dimension and the rainfall duration as the time dimension, so as to more clearly and completely express the spatio-temporal variation characteristics during the rainfall process.

[0058] Step 202, process the spatio-temporal matrix based on a convolutional neural network to obtain the encoded data corresponding to each historical rainfall event.

[0059] The convolutional neural network CNN can effectively extract local features in images or matrices (such as spatial distribution patterns and temporal variation rules). Through multiple convolutional and pooling operations, high-order features of the spatio-temporal matrix are gradually extracted to generate encoded data of a fixed length. The spatio-temporal matrix is used as the input of the CNN. The CNN model performs high-dimensional encoding on the rainfall characteristics of each event to obtain the corresponding feature vector (encoded data), and the encoded data contains the key features of the rainfall event in terms of spatio-temporal distribution.

[0060] Step 203, establish an index database according to the encoded data corresponding to each historical rainfall event; the index database is used to query historical rainfall that meets the similarity conditions with the rainfall data to be matched according to the input target encoded data.

[0061] The encoded data of each historical rainfall event extracted in step 202 is stored in the index database, and each record includes the encoded data of the rainfall event and its corresponding meta-information (such as occurrence time, location, etc.). At this time, when similar rainfall data needs to be queried, only the rainfall data to be matched needs to be processed through the above convolutional neural network model to obtain the target encoded data, and then the target encoded data is input into the index database for similarity calculation, so as to return the historical rainfall events similar to the target encoded data.

[0062] This method converts the rainfall event into a spatio-temporal matrix, uses CNN to extract features, and then combines with the index database to achieve efficient matching. This process not only retains the spatio-temporal characteristics of rainfall, but also has the advantages of fast response and high accuracy, and is suitable for intelligent management of flood control warning and related scenarios.

[0063] In summary, to achieve rainfall matching, the computer device can first obtain the data of historical rainfall for each event, generate a corresponding spatio-temporal matrix, that is, a two-dimensional matrix with the spatial positions of rainfall gauging stations as the spatial dimension and the rainfall duration as the time dimension; process the spatio-temporal matrix based on a convolutional neural network to obtain the encoded data corresponding to each event of historical rainfall. Then, the computer device can establish an index database according to the encoded data corresponding to each event of historical rainfall. At this time, the index database can query the historical rainfall that meets the similarity condition with the rainfall data to be matched according to the input target encoded data. The above solution takes into account the spatio-temporal characteristics of rainfall, converts the spatio-temporal characteristics into encoded data through a convolutional neural network, and realizes rainfall matching through indexing with the encoded data, improving the accuracy of rainfall matching.

[0064] Figure 2 is a flowchart of a rainfall matching method shown according to an exemplary embodiment. This method is executed by a computer device. As Figure 2 shown, the rainfall matching method may include the following steps:

[0065] Step 201, obtain the spatio-temporal matrix corresponding to each event of historical rainfall; the spatio-temporal matrix is a two-dimensional matrix with the spatial positions of rainfall monitoring stations as the spatial dimension and the rainfall duration as the time dimension.

[0066] Specifically, in the embodiments of the present application, the rainfall for each event can be divided in terms of time and space according to the historical rainfall station monitoring data. Further, dividing the rainfall for each event in terms of time and space means that in terms of time, the rainfall events can be divided according to different hours according to the actual situation of the study area; in terms of space, the rainfall events can be divided according to different spatial scales such as geographical location, basin, and administrative division.

[0067] Furthermore, dividing the rainfall for each event in terms of time and space is based on the rainfall data of each rain gauge station in the study area every 5 minutes, through four indicators including the number of stations (R i ) where the rainfall value exceeds 0.1 mm, the minimum value (R min ) and the maximum value (R max ) of the total rainfall of all rain gauge stations, and the minimum time interval (R t ) of rainfall events to divide the rainfall events. The specific division criteria are divided into two stages: one is to judge the start time of rainfall. When the number of stations where the rainfall value exceeds 0.1 at a certain moment is greater than R i , or the total rainfall of all rain gauge stations at a certain moment is greater than R max , it is considered that a rainfall event starts; the other is to judge the end time of rainfall. After a certain moment, if the sum of the rainfall amounts of all rain gauge stations within the R t period is less than R minWhen this occurs, it is considered that a rainfall event has ended.

[0068] Then, the rainfall events with different durations can be mapped to a two-dimensional spatio-temporal matrix, and at this time, the two-dimensional spatio-temporal matrix can be used as the spatio-temporal image of the rainfall events.

[0069] Furthermore, mapping the rainfall events with different durations to a two-dimensional spatio-temporal matrix means using the spatial dimension (columns) of the rainfall monitoring stations distributed at different spatial positions in the basin, and using the rainfall duration as the time dimension (rows).

[0070] The spatial dimension (columns) arranges adjacent stations together, and the farther the stations are from each other, the farther apart the columns are; the time dimension (rows) maps the rainfall amounts of each station's rainfall events to values with a fixed number of rows. A two-dimensional spatio-temporal matrix is constructed. For example, the spatio-temporal matrix can be as follows:

[0071]

[0072] In the formula, X j is the two-dimensional spatio-temporal matrix of the j-th rainfall event, where H m,1 , H m,2 ,..., H m,n represent the rainfall amounts of the 1st to nth rainfall monitoring stations in the basin at the m-th moment during the j-th rainfall event. H 1,n , H 2,n ,..., H m,n represent the rainfall amounts of the nth rainfall monitoring station from the 1st to the m-th moment during the j-th rainfall event.

[0073] Step 202: Process the spatio-temporal matrix based on a convolutional neural network to obtain the encoded data corresponding to each historical rainfall event.

[0074] Based on a convolutional neural network, a rainfall event feature recognition model (CNN-RFIM) is constructed. The rainfall event feature recognition model includes 1 input layer, a first number of convolutional layers, a second number of pooling layers, and a third number of fully connected layers;

[0075] Process the spatio-temporal matrix through the rainfall event feature recognition model (CNN-RFIM) to obtain the encoded data corresponding to the historical rainfall events of the rainfall events, so as to extract the spatio-temporal image features of the rainfall events. Constructing the rainfall event feature recognition model based on a convolutional neural network mainly includes two processes: spatio-temporal image feature extraction of the rainfall events and feature dimensionality reduction processing.

[0076] Optionally, in the embodiments of the present application, before the convolutional neural network processes the spatio-temporal matrix, the spatio-temporal matrix can be first mapped to a pixel spatio-temporal image of the rainfall events. Specifically, the viridis color mapping algorithm can be used to construct the spatio-temporal image of the rainfall events.

[0077] After generating the spatio-temporal image of the rainfall in a session, the rainfall spatio-temporal image can be processed by a rainfall feature recognition model to obtain the encoded data corresponding to the historical rainfall in the session.

[0078] The extraction of the spatio-temporal image features of the rainfall in a session based on the CNN-RFIM model refers to gradually extracting the features of the spatio-temporal image of the rainfall in a session through multi-layer convolution and pooling calculations. Specifically, the CNN-RFIM model includes 1 input layer, 10 convolutional layers, and 3 pooling layers. Among them, the input layer is a spatio-temporal image of the rainfall in a session with a size of 224 pixels × 224 pixels × 3 channels, located at the first layer of the model. The 10 convolutional layers all use a convolutional kernel with a size of 3×3 for convolutional calculations, with a stride of 1 and a boundary padding of 1, and are located at the 2nd, 3rd, 5th, 6th, 8th, 9th, 10th, 12th, 13th, and 14th layers of the model respectively. The 3 pooling layers are 2×2 Max-Pooling layers, located at the 4th, 7th, and 11th layers of the model respectively;

[0079] Furthermore, the 10 convolutional layers all use a convolutional kernel with a size of 3×3 for convolutional calculations, and the formula is as follows:

[0080]

[0081] In formula (1) represents the value of the jth feature map of the ith layer at the (x, y) position, ReLU is the activation function of each layer, b ij is the deviation of the jth feature map of the ith layer, m is the index of the feature map of the (i - 1)th layer, is the convolutional kernel at the position (x, y), and this convolutional kernel is connected to the kth feature map. P i and Q i are the height and width of the convolutional kernel respectively.

[0082] The dimensionality reduction processing of the spatio-temporal image features of the rainfall in a session based on the CNN-RFIM model is to use 2 fully connected layers to reduce the dimensionality of the image features. The number of neurons in the 2 fully connected layers is 4096 and 1000 respectively, and the calculation formula of the fully connected layer is as follows:

[0083]

[0084] In formula (2), featurevetor j is the feature vector of the jth rainfall image in a session

[0085] Step 203: Establish an index database according to the encoded data corresponding to the historical rainfall in each session.

[0086] In an embodiment of the present application, the output features can be dimensionally reduced based on the fully connected layer in the neural network, and the dimensionally reduced features are quantized into binary codes and converted into image signatures to construct a historical rainfall feature index database.

[0087] In a possible implementation manner of the embodiment of the present application, an orthogonal matrix is obtained; the orthogonal matrix is obtained by performing QR decomposition on a target matrix; the dimension of the target matrix is the same as the feature dimension of the encoded data;

[0088] Based on the orthogonal matrix, the encoded data is projected to obtain dimensionally reduced features;

[0089] Determine the number of quantization result bits q for each dimension of the dimensionally reduced features, and obtain 2 q optional quantization values;

[0090] Arrange the features of each dimension of the dimensionally reduced features in ascending order and divide them into 2 q equal parts;

[0091] According to the segmentation intervals where the features of each dimension of the dimensionally reduced features are located, quantize the features of each dimension of the dimensionally reduced features to generate an image signature corresponding to the encoded data;

[0092] Build an index with each word of the image signature to establish the index database.

[0093] Specifically, assume that the fourth feature output by the model Figure X i is 1×d-dimensional, and the projected feature Z i is 1×d p dimensional and d p <d. Randomly generate a d×d-dimensional matrix G (i.e., the above-mentioned target matrix), and each element in G is taken from a random variable Y, and Y follows a Gaussian distribution with an expected value μ = 0 and a variance σ 2 = 1.

[0094] Perform QR decomposition on matrix G to satisfy QR = G, Q T Q = I and R is an upper triangular matrix, and obtain a d×d-dimensional Q matrix.

[0095] Take the first d p rows of the Q matrix to form a d p ×d-dimensional projection matrix P, and project the fourth feature Figure X i to obtain the dimensionally reduced feature z i , where z i = x i P T = (z i1 , z i2 , …, z idp ).

[0096] Further, each dimension z of the vector is determined ij The number of bits q of the quantization result is obtained, resulting in 2 q optional quantization values. Then, according to the selected q, the dimensions of the feature z after dimensionality reduction are sorted in ascending order and evenly divided into 2 i equal parts, obtaining 2 q -1 splitting values, where mkj represents the k-th splitting value of the j-th dimension, k ∈ [1, 2 q -1], j ∈ [1, dp]. kj q

[0097] Quantization is performed according to formula (3) to obtain the image signature b i =(b i1 , b i2 ,..., b idp ):

[0098]

[0099] Indexes are constructed with the words of each image signature. Each image signature b i is regarded as consisting of d p words. According to the number of words d p of the signature, d p index tables are generated, which are constructed with the words corresponding to the 1st to d p th dimensions of the signature set respectively. For the image signature bi = (b i1 , b i2 ,..., b idp ), the image i is inserted after each word within the range of [b i1 –T, b i1 +T] in the 1st index table, after each word within the range of [b i2 –T, b i2 +T] in the 2nd index table, and so on, until it is inserted after each word within the range of [b p –T, b idp +T] in the d idp th index table. Finally, when all image signatures are inserted, the index construction is completed.

[0100] Step 204, obtain the rainfall data to be matched.

[0101] Step 205, generate a target spatio-temporal matrix based on the rainfall data to be matched.

[0102] Step 206, process the spatio-temporal matrix based on the convolutional neural network to obtain the target encoded data corresponding to the rainfall data to be matched.

[0103] ​​Among them, the execution logic of steps 204 to 206 is similar to that of steps 201 to 202. That is to say, the conversion of historical rainfall data into encoded data is similar to the conversion of rainfall data to be matched into target encoded data, which will not be elaborated here.

[0104] Step 207: Input the target encoded data into the index database to obtain historical rainfall that meets the similarity condition with the rainfall data to be matched.

[0105] Optionally, obtain the similarity between the target encoded data and each encoded data in the index database; obtain the historical rainfall corresponding to the encoded data with the highest similarity to the target encoded data in the index database as the historical rainfall that meets the similarity condition with the data to be matched.

[0106] Further, for the query rainfall signature b i =(b i1 , b i2 ,…, b idp ), search for the words b p in index tables 1, 2,…, d i1 , b i2 ,…, b idp respectively, obtain the set of rainfall event numbers, count the occurrence times of each rainfall event number in the set. Let the rainfall event with number j appear y times in the set, then the similarity between rainfall events i and j is determined by the following formula:

[0107] Optionally, determine the similarity between the target encoded data and the encoded data in the index database through the following formula:

[0108] S = y / dp×100%

[0109] Where S is the similarity; y is the number of times the word in the target encoded data appears in the encoded data in the index database; dp is the length of the encoded data.

[0110] At this time, sort the similarity values of rainfall event i and each rainfall event in the database in descending order, and output the top-K rainfall events with the highest similarity as the historical rainfall that meets the similarity condition with the data to be matched.

[0111] The following takes a certain basin as the case area and the monitoring data of 24 rain gauges from January 2016 to April 2024 as the research object to further illustrate the specific application of the method shown in the embodiments of the present invention. The specific application includes the following steps:

[0112] Step 1, Division of storm rainfall: According to the rainfall monitoring data of 24 rain gauges in a certain basin at 5-minute intervals from January 1, 2016 to April 30, 2024, storm rainfall is divided. Rainfall with a 5-minute rainfall less than 0.1 mm for more than 4 consecutive hours is regarded as ineffective rainfall, and a total of 1042 storm rainfall events are divided. Please refer to Figure 3 , which shows a schematic diagram of rainfall at 9 selected monitoring stations in a certain basin.

[0113] Step 2, Construction of storm rainfall spatio-temporal image: Using 24 rain gauges at different spatial positions in the basin as the spatial dimension and rainfall duration as the time dimension, a two-dimensional spatio-temporal matrix is constructed. Taking the 15th storm rainfall event divided this time as an example, the rainfall start time is 18:00 on September 17, 2016, the rainfall end time is 00:05 on September 18, 2016, the rainfall collection frequency is 5 minutes per time, and a total of 75 times are collected. There are 24 rain gauges in the spatial dimension of the basin, and the generated rainfall matrix is as Figure 4 shown. Then the rainfall amount is mapped to the two-dimensional matrix to form a storm rainfall spatio-temporal image as shown in Figure 5 .

[0114] Step 3, Construct a storm rainfall feature recognition model (CNN-RFIM) based on a convolutional neural network, and extract the spatio-temporal image features of historical storm rainfall. The specific processing process of this rainfall feature recognition model (CNN-RFIM) can be referred to the above step 202 and will not be elaborated here.

[0115] Step 4, Establish a feature index database based on the spatio-temporal image features of historical storm rainfall: Quantify the features output by the CNN-RFIM model into binary codes and convert them into image signatures to construct a historical storm rainfall feature index database. The specific implementation method can be referred to the above step 203 and will not be elaborated here.

[0116] Step 5, Use the constructed CNN-RFIM model to extract the spatio-temporal image features of the storm rainfall to be matched and generate a signature of the storm rainfall to be matched.

[0117] Step 6, Input the spatio-temporal image features of the storm rainfall to be matched into the feature index database composed of the feature indexes of historical storm rainfall to retrieve storm rainfall with spatio-temporal similarity. Use cosine similarity to measure the similarity between rainfall feature maps and output the most similar storm rainfall according to the size of the similarity value.

[0118] Please refer to Figure 6 , which shows a rainfall matching schematic diagram involved in the embodiment of the present application. As shown in Figure 6As shown, the left area is the rainfall feature map to be matched, and the right area is the matched historical rainfall feature map. Similarity is the similarity value, which ranges from 0 to 1. The larger the Similarity value, the more similar it is. Figure 7 and Figure 8 are respectively the rainfall amount process lines and rainfall patterns of two matched rainfall events. The similarity of the two rainfall process lines and rainfall pattern features is relatively high.

[0119] In summary, to achieve rainfall matching, the computer device can first obtain the data of each historical rainfall event and generate the corresponding spatio-temporal matrix, that is, a two-dimensional matrix with the spatial positions of rainfall monitoring stations as the spatial dimension and the rainfall duration as the time dimension. Then, based on a convolutional neural network, the spatio-temporal matrix is processed to obtain the encoded data corresponding to each historical rainfall event. Subsequently, the computer device establishes an index database according to the encoded data corresponding to each historical rainfall event. At this time, the index database can query the historical rainfall that meets the similarity conditions with the rainfall data to be matched according to the input target encoded data. The above solution takes into account the spatio-temporal characteristics of rainfall, converts the spatio-temporal characteristics into encoded data through a convolutional neural network, and realizes rainfall matching through indexing with the encoded data, improving the accuracy of rainfall matching.

[0120] In an embodiment of the present application, a rainfall matching device is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0121] An embodiment of the present application provides a rainfall matching device. Figure 9 is a schematic structural diagram of a rainfall matching device provided by an embodiment of the present application. The device includes:

[0122] An acquisition module 901, configured to acquire the spatio-temporal matrix corresponding to each historical rainfall event; the spatio-temporal matrix is a two-dimensional matrix with the spatial positions of rainfall monitoring stations as the spatial dimension and the rainfall duration as the time dimension;

[0123] A processing module 902, configured to process the spatio-temporal matrix based on a convolutional neural network to obtain the encoded data corresponding to each historical rainfall event;

[0124] An indexing module 903, configured to establish an index database according to the encoded data corresponding to each historical rainfall event; the index database is used to query the historical rainfall that meets the similarity conditions with the rainfall data to be matched according to the input target encoded data.

[0125] The further function descriptions of the above-mentioned modules and units are the same as those in the corresponding embodiments above, and will not be elaborated here.

[0126] In summary, to achieve rainfall matching, a computer device can first obtain the data of historical rainfall for each session and generate a corresponding spatio-temporal matrix, that is, a two-dimensional matrix with the spatial positions of rainfall detection stations as the spatial dimension and the rainfall duration as the time dimension. Based on a convolutional neural network, the spatio-temporal matrix is processed to obtain the encoded data corresponding to each session of historical rainfall. Then, the computer device establishes an index database according to the encoded data corresponding to each session of historical rainfall. At this time, the index database can query the historical rainfall that meets the similarity conditions with the rainfall data to be matched according to the input target encoded data. The above solution takes into account the spatio-temporal characteristics of rainfall, converts the spatio-temporal characteristics into encoded data through a convolutional neural network, and realizes rainfall matching through indexing with the encoded data, improving the accuracy of rainfall matching.

[0127] The rainfall matching device in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0128] Please refer to Figure 10 , Figure 10 which is a schematic structural diagram of a computer device provided by an optional embodiment of the present invention. As Figure 10 shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphic information in a graphical user interface on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a set of blade servers, or a multi-processor system). Figure 10 In

[0129] The processor 10 may be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 may further include a hardware chip. The above-mentioned hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The above-mentioned programmable logic device may be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.

[0130] Among them, the memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.

[0131] The memory 20 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may further include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely disposed relative to the processor 10, and these remote memories may be connected to the computer device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0132] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 may further include a combination of the above types of memories.

[0133] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or communication networks.

[0134] The embodiments of the present invention further provide a computer-readable storage medium. The method according to the embodiments of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium may be a magnetic disk, an optical disc, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium may further include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.

[0135] A part of the present invention can be applied as a computer program product, for example, computer program instructions, which, when executed by a computer, can call or provide the methods and / or technical solutions according to the present invention through the operations of the computer. Those skilled in the art should understand that the forms in which computer program instructions exist in a computer-readable medium include but are not limited to source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include but are not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0136] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A rainfall matching method, characterized in that: The method comprises: Obtaining the space-time matrix corresponding to each historical rainfall event; the space-time matrix is ​​a two-dimensional matrix with the spatial location of the rainfall monitoring station as the spatial dimension and the rainfall duration as the time dimension; The space-time matrix is ​​processed based on a convolutional neural network to obtain coded data corresponding to each historical rainfall event; An index database is established according to the coded data corresponding to each historical rainfall event; the index database is used to query the historical rainfall that meets similar conditions to the rainfall data to be matched according to the input target coded data.

2. The method according to claim 1, characterized in that The method further comprises: Get the rainfall data to be matched; Generating a target spatiotemporal matrix according to the rainfall data to be matched; Processing the spatiotemporal matrix based on the convolutional neural network to obtain target coded data corresponding to the rainfall data to be matched; The target coded data is input into the index database to obtain historical rainfall that meets similar conditions to the rainfall data to be matched.

3. The method according to claim 2, characterized in that The step of inputting the target coded data into the index database to obtain historical rainfall data that meets similar conditions to the rainfall data to be matched includes: Obtaining the similarity between the target coded data and each coded data in the index database; The historical rainfall corresponding to the coded data in the index database having the highest similarity to the target coded data is obtained as the historical rainfall that meets the similarity condition with the data to be matched.

4. The method according to claim 3, characterized in that The encoded data includes individual words; The obtaining of the similarity between the target coded data and each coded data in the index database comprises: The similarity between the target coded data and the coded data in the index database is determined by the following formula: S = y / dp × 100%; Among them, S is the similarity; y is the number of times the word in the target encoded data appears in the encoded data in the index database; dp is the length of the encoded data.

5. The method according to any one of claims 1 to 4, characterized in that: The processing of the space-time matrix based on the convolutional neural network to obtain the coded data corresponding to each historical rainfall event includes: A rainfall feature recognition model is constructed based on a convolutional neural network; the rainfall feature recognition model includes an input layer, a first number of convolutional layers, a second number of pooling layers, and a third number of fully connected layers; The space-time matrix is ​​processed by the rainfall feature recognition model to obtain the coded data corresponding to the historical rainfall event.

6. The method according to any one of claims 1 to 4, characterized in that: The index database is established according to the coded data corresponding to each historical rainfall event, including: Obtain an orthogonal matrix; the orthogonal matrix is ​​obtained by performing QR decomposition on the target matrix; the dimension of the target matrix is ​​the same as the characteristic dimension of the encoded data; each element in the target matrix is ​​randomly selected from a normal distribution; Based on the orthogonal matrix, projecting the encoded data to obtain features after dimensionality reduction; Determine the number of bits q of the quantization result of each dimension of the feature after dimensionality reduction, and obtain 2 q Optional quantization value; Arrange the dimensional features of the reduced features in ascending order and divide them into 2 q equal parts; quantizing the features of each dimension of the features after dimensionality reduction according to the segmentation intervals in which the features of each dimension of the features after dimensionality reduction are located, so as to generate an image signature corresponding to the encoded data; An index is constructed using each word of the image signature to establish the index database.

7. A rainfall matching device, characterized in that: The device comprises: An acquisition module is used to acquire the space-time matrix corresponding to each historical rainfall event; the space-time matrix is ​​a two-dimensional matrix with the spatial location of the rainfall monitoring station as the spatial dimension and the rainfall duration as the time dimension; A processing module, used for processing the spatiotemporal matrix based on a convolutional neural network to obtain coded data corresponding to each historical rainfall event; The index module is used to establish an index database according to the coding data corresponding to each historical rainfall event; the index database is used to query the historical rainfall that meets similar conditions to the rainfall data to be matched according to the input target coding data.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the rainfall matching method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the rainfall matching method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions for causing a computer device to execute the rainfall matching method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Water flow prediction model based on neural network

    CN112561132A

  • Big data query method and device, electronic equipment and storage medium

    CN115168752A

  • Urban inland inundation agent model construction method for replacing numerical simulation

    CN117892167A

  • Rapid Deep Learning-Based Flood Losses / Risk Prediction Tool, Methods of Making and Uses Thereof

    US20250060512A1