Rainfall matching method, device, equipment, medium and product

By constructing a spatiotemporal matrix and using a convolutional neural network to extract rainfall characteristics, generating coded data and establishing an index database, the problem of insufficient rainfall matching accuracy in the existing technology is solved, and efficient and accurate rainfall matching and disaster prediction are achieved.

CN120123385BActive Publication Date: 2025-08-19BEIJING WATER SCI & TECH INST +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing rainfall matchmaking technology mainly relies on the extraction of rainfall characteristic values, which is highly subjective, resulting in the loss of some rainfall information, affecting the matching accuracy, and failing to effectively reflect the spatio-temporal distribution characteristics of rainfall.

Method used

By constructing a spatiotemporal matrix and using a convolutional neural network to extract the spatiotemporal characteristics of rainfall, generating coded data, and establishing an index database to match similar rainfalls, achieving accurate matching of rainfalls.

Benefits of technology

It improves the accuracy and efficiency of rainfall matching, shortens the time for rainfall forecasting and disaster scenario prediction, and improves the decision-making efficiency of flood prevention warning management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120123385B_ABST
    Figure CN120123385B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of meteorological monitoring technology, and discloses a rainfall matching method, apparatus, equipment, medium, and product. The method comprises: obtaining a spatiotemporal matrix corresponding to each historical rainfall event; the spatiotemporal matrix is a two-dimensional matrix with the spatial location of the rainfall monitoring station as the spatial dimension and the duration of rainfall as the temporal dimension; processing the spatiotemporal matrix based on a convolutional neural network to obtain coded data corresponding to each historical rainfall event; establishing an index database based on the coded data corresponding to each historical rainfall event; the index database is used to query historical rainfall that meets similar conditions to the rainfall data to be matched based on the input target coded data. The above scheme takes into account the spatiotemporal characteristics of rainfall, converts the spatiotemporal characteristics into coded data through a convolutional neural network, and achieves rainfall matching through indexing of the coded data, thereby improving the accuracy of rainfall matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] By deeply exploring the spatiotemporal distribution characteristics of historical rainfall and constructing a rapid matching method for similar rainfall, we can achieve rapid matching of forecast rainfall, which can effectively shorten the time for rainfall forecast and disaster scenario prediction, and is of great significance to flood control and early warning management decisions.

[0003] Existing rainfall event matching technology mainly extracts rainfall characteristic values, including rainfall level, total rainfall, rainfall duration, heavy rainfall duration, average rainfall, maximum rainfall, and maximum rainfall intensity in one hour. The extraction of rainfall characteristics is highly subjective and will inevitably cause the loss of some rainfall information, affecting the accuracy of rainfall event 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, the method comprising:

[0006] Obtaining a spatiotemporal matrix corresponding to each historical rainfall event; the spatiotemporal 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 temporal dimension;

[0007] Processing the spatiotemporal matrix based on a convolutional neural network to obtain coded data corresponding to each historical rainfall event;

[0008] An index database is established based on the coded data corresponding to each historical rainfall event; the index database is used to query historical rainfall that meets similar conditions to the rainfall data to be matched based on the input target coded data.

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

[0010] Get the rainfall data to be matched;

[0011] generating a target spatiotemporal matrix according to the rainfall data to be matched;

[0012] Processing the spatiotemporal matrix based on the convolutional neural network to obtain target coded data corresponding to the rainfall data to be matched;

[0013] The target coded data is input into the index database to obtain historical rainfall data that meets similar conditions to the rainfall data to be matched.

[0014] In a possible implementation, 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:

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

[0016] The historical rainfall corresponding to the coded data with the highest similarity to the target coded data in the index database is obtained as the historical rainfall that meets the similarity condition with the data to be matched.

[0017] In one possible implementation, the encoded data includes individual words;

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

[0019] The similarity between the target coded data and the coded data in the index database is determined by 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 one possible implementation, the processing of the spatiotemporal matrix based on a convolutional neural network to obtain coded data corresponding to each historical rainfall event includes:

[0023] Constructing a rainfall feature recognition model 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;

[0024] The space-time matrix is processed by the rainfall feature recognition model to obtain coded data corresponding to the historical rainfall events.

[0025] In a possible implementation, establishing an index database based on the coded data corresponding to each historical rainfall event includes:

[0026] 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;

[0027] Projecting the encoded data based on the orthogonal matrix to obtain features after dimensionality reduction;

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

[0029] Arrange the dimensional features of the reduced features in ascending order and divide them into 2 q equal parts;

[0030] 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;

[0031] An index is constructed using each word of the image signature to establish the index database.

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

[0033] An acquisition module is used to obtain 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;

[0034] A processing module, configured to process the spatiotemporal matrix based on a convolutional neural network to obtain coded data corresponding to each historical rainfall event;

[0035] The index module is used to establish an index database based on the coded data corresponding to each historical rainfall event; the index database is used to query historical rainfall that meets similar conditions to the rainfall data to be matched based on the input target coded data.

[0036] In a third aspect, a computer device is provided, comprising: 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 above-mentioned rainfall matching method by executing the computer instructions.

[0037] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the above-mentioned rainfall matching method.

[0038] In a fifth aspect, a computer program product is provided, comprising computer instructions for causing a computer to execute the above-mentioned rainfall matching method.

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

[0040] To achieve rainfall matching, the computer can first obtain historical rainfall data for each episode and generate a corresponding spatiotemporal matrix—a two-dimensional matrix with the spatial location of the rain gauge station as the spatial dimension and the duration of rainfall as the temporal dimension. This matrix is then processed using a convolutional neural network to obtain the coded data corresponding to each episode of historical rainfall. The computer then creates an index database based on the coded data corresponding to each episode of historical rainfall. This index database can then query historical rainfall data that meets similar criteria to the rainfall data to be matched, based on the input target coded data. This approach takes into account the spatiotemporal characteristics of rainfall and converts these features into coded data through a convolutional neural network. This coded data is then used for indexing to achieve rainfall matching, 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 briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 The figure is a flow chart of a rainfall matching method according to an exemplary embodiment.

[0043] Figure 2 The figure is a flow chart of a rainfall matching method according to an exemplary embodiment.

[0044] Figure 3 A schematic diagram of rainfall conditions at nine selected monitoring stations in a certain river basin is shown.

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

[0046] Figure 5 A spatiotemporal image of rainfall events involved in an embodiment of the present application is shown.

[0047] Figure 6 A schematic diagram of rainfall matching involved in an embodiment of the present application is shown.

[0048] Figure 7 A schematic diagram of the two matched rainfall process lines is shown.

[0049] Figure 8 A schematic diagram of the rain patterns of the two matched rainfall events is shown.

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

[0051] Figure 10 It is a structural diagram of a computer device provided by an optional embodiment of the present invention. DETAILED DESCRIPTION

[0052] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

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

[0054] Deeply exploring the spatiotemporal distribution characteristics of historical rainfall and developing a rapid matching method for similar rainfall patterns can achieve rapid matching of forecast rainfall with predicted rainfall. This can effectively shorten rainfall forecasting and disaster scenario prediction timelines, and is of great significance for flood control and early warning management decisions. Existing rainfall event matching technologies primarily extract rainfall characteristics, including rainfall level, total rainfall, rainfall duration, duration of heavy rainfall, average rainfall, maximum rainfall, and maximum 1-hour rainfall intensity. This extraction of rainfall characteristics is highly subjective, inevitably resulting in the loss of some rainfall information, affecting the accuracy of event matching. Existing technologies have proposed a technique for matching forecast rainfall with event rainfall in a scenario database based on the dynamic time warping method, which can rapidly match real-time forecast rainfall with event rainfall in the scenario database. However, this method only extracts historical rainfall characteristics in the temporal dimension and does not reflect the spatial distribution characteristics of event rainfall. Rainfall information, which encompasses both temporal and spatial dimensions, can be expressed using a two-dimensional matrix. Mapping rainfall information to this two-dimensional matrix can transform rainfall information into image information. Leveraging established image recognition methods, this allows for accurate, objective, and rapid extraction. The present invention integrates the spatiotemporal distribution characteristics of rainfall events, realizes feature extraction of rainfall spatiotemporal images through convolutional neural networks, and intelligently matches the similarities between forecast rainfall and historical rainfall events, thereby improving the accuracy and efficiency of rainfall matching and effectively shortening the timeliness and effectiveness of "rainfall forecast - disaster scenario prediction - flood control emergency plan".

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

[0056] Step 201: Obtain 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.

[0057] Each historical rainfall event will last for a period of time in a certain area, and the rainfall in each area at different times may be different. Therefore, each historical rainfall event has a strong spatiotemporal attribute. At this time, for each historical rainfall event, the data collected by the rainfall monitoring station according to time can be converted into 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, so as to more clearly and completely express the spatiotemporal change characteristics of the rainfall process.

[0058] Step 202: Process the spatiotemporal matrix based on a convolutional neural network to obtain coded data corresponding to each historical rainfall event.

[0059] Convolutional neural networks (CNNs) can effectively extract local features (such as spatial distribution patterns and temporal variations) from images or matrices. Through multiple layers of convolution and pooling, they gradually extract high-order features from the spatiotemporal matrix and generate fixed-length encoded data. The spatiotemporal matrix serves as the input to the CNN. The CNN model performs high-dimensional encoding on the rainfall characteristics of each rainfall event, generating a corresponding feature vector (encoded data). This encoded data contains the key characteristics of the rainfall event's spatiotemporal distribution.

[0060] Step 203 : establishing an index database based on the coded data corresponding to each historical rainfall event; the index database is used to search for historical rainfall that meets similar conditions to the rainfall data to be matched based on the input target coded data.

[0061] The coded data for each historical rainfall event extracted in step 202 is stored in an index database. Each record includes the coded data for the rainfall event and its corresponding metadata (such as the time and location of occurrence). When searching for similar rainfall data, the rainfall data to be matched is processed through the aforementioned convolutional neural network model to obtain target coded data. This target coded data is then input into the index database for similarity calculation, thereby returning historical rainfall events similar to the target coded data.

[0062] This method converts rainfall events into a spatiotemporal matrix, extracts features using a CNN, and then integrates it with an index database for efficient matching. This process not only preserves the spatiotemporal characteristics of rainfall but also offers rapid response and high accuracy, making it suitable for intelligent management of flood prevention and early warning systems and related scenarios.

[0063] To summarize, to achieve rainfall matching, a computer can first acquire historical rainfall data for each episode and generate a corresponding spatiotemporal matrix—a two-dimensional matrix with the spatial location of the rain gauge station as the spatial dimension and the duration of rainfall as the temporal dimension. This matrix is then processed using a convolutional neural network to obtain the coded data corresponding to each episode. The computer then creates an index database based on the coded data corresponding to each episode. This index database can then query historical rainfall data that meets similar criteria to the rainfall data to be matched, based on the input target coded data. This approach takes into account the spatiotemporal characteristics of rainfall, converts these features into coded data through a convolutional neural network, and uses this coded data for indexing to achieve rainfall matching, thereby improving the accuracy of rainfall matching.

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

[0065] Step 201: Obtain 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.

[0066] Specifically, in the embodiment of the present application, rainfall events can be divided in time and space based on historical rainfall station monitoring data. Furthermore, dividing rainfall events in time and space means that rainfall events can be divided into different hours based on the actual situation of the study area; and in space, rainfall events can be divided into different spatial scales such as geographical location, watershed, and administrative division.

[0067] Furthermore, the temporal and spatial division of rainfall events is based on the 5-minute rainfall data of rainfall stations in the study area, and the number of stations with rainfall values exceeding 0.1 mm (R i ), the minimum value of the total rainfall of all rain gauges (R min ) and maximum value (R max ) and the minimum time interval between rainfall events (R t ) to classify rainfall events. The specific classification criteria are divided into two stages: the first is to determine the time when rainfall starts. The number of stations with rainfall values exceeding 0.1 at a certain moment is greater than R i , or the total rainfall at all rain gauges at a certain moment is greater than R max , that is, a rainfall event begins; the second is to determine the end time of rainfall. After a certain moment, all rainfall stations at R t The total rainfall during the period is less than R minA rainfall event is considered to be over when

[0068] Then, the divided rainfall events of different durations can be mapped to a two-dimensional space-time matrix. At this time, the two-dimensional space-time matrix can be used as a space-time image of the rainfall event.

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

[0070] The spatial dimension (columns) is to arrange adjacent stations together. The farther the stations are from each other, the farther the columns are apart. The temporal dimension (rows) is to map the rainfall of each station to a fixed number of rows. Construct a two-dimensional space-time matrix. For example, the space-time matrix can be as follows:

[0071]

[0072] Where, X j is the two-dimensional space-time matrix of the j-th rainfall, where H m,1 , H m,2 ,...,H m,n Represents the rainfall at the 1st to nth rainfall monitoring stations in the basin at the mth moment during the jth rainfall event. 1,n , H 2,n ,...,H m,n Represents the rainfall at the nth rainfall monitoring station from the 1st to the mth moment during the jth rainfall process.

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

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

[0075] The spatiotemporal matrix is processed using the CNN-RFIM rainfall feature recognition model to obtain coded data corresponding to the historical rainfall events, thereby extracting the spatiotemporal image features of the rainfall events. Constructing a rainfall feature recognition model based on a convolutional neural network primarily involves two steps: extracting spatiotemporal image features from rainfall events and reducing their dimensionality.

[0076] Optionally, in an embodiment of the present application, before the convolutional neural network processes the spatiotemporal matrix, the spatiotemporal matrix can be mapped into a pixel-level rainfall spatiotemporal image. Specifically, the viridis color mapping algorithm can be used to construct the rainfall spatiotemporal image.

[0077] After generating the spatiotemporal image of rainfall events, the spatiotemporal image of rainfall events can be processed by a rainfall feature recognition model to obtain coded data corresponding to the historical rainfall events.

[0078] The extraction of spatiotemporal image features of rainfall events based on the CNN-RFIM model refers to gradually extracting the features of spatiotemporal images of rainfall events through multi-layer convolution and pooling calculations. Specifically, the CNN-RFIM model includes 1 input layer, 10 convolution layers, and 3 pooling layers. The input layer is a spatiotemporal image of rainfall events of 224 pixels × 224 pixels × 3 channels, which is located in the first layer of the model. The 10 convolution layers all use a 3×3 convolution kernel for convolution calculation, with a step size of 1 and a boundary padding of 1, and are located in 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, which are located in the 4th, 7th, and 11th layers of the model respectively;

[0079] Furthermore, the 10 convolutional layers all use a 3×3 convolution kernel for convolution calculation, and the formula is as follows:

[0080]

[0081] In formula (1) Represents the value of the jth feature map of the i-th 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 i-th layer, m is the index of the feature map of the i-1th layer, is the convolution kernel at position (x, y) that is connected to the kth feature map. i , Q i are the height and width of the convolution kernel respectively.

[0082] The dimensionality reduction of the spatiotemporal image features of rainfall events based on the CNN-RFIM model uses two fully connected layers for image feature dimensionality reduction. The number of neurons in the two 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

[0085] Step 203: Create an index database based on the coded data corresponding to each historical rainfall event.

[0086] In an embodiment of the present application, dimensionality reduction operations can be performed on the output features based on the fully connected layer in the neural network, and the dimensionality-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 an embodiment of the present application, an orthogonal matrix is obtained; the orthogonal matrix is obtained by performing a 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 dimensionality-reduced features;

[0089] Determine the number of quantization result bits q for each dimension of the dimensionality-reduced features, resulting in 2 q optional quantization values;

[0090] The features of each dimension of the dimensionality-reduced features are sorted in ascending order and divided into 2 q equal parts;

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

[0092] An index is constructed with each word of the image signature to establish the index database.

[0093] Specifically, assume that the fourth feature Figure X i output by the model is 1×d-dimensional, and the projected feature Z i is 1×d p -dimensional and d p <d. A d×d-dimensional matrix G (i.e., the above-mentioned target matrix) is randomly generated, 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 a QR decomposition on the matrix G, satisfying QR = G, Q T Q = I and R is an upper triangular matrix, to 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 dimensionality-reduced feature z i , where z i = x i P T = (z i1 , z i2 , …, z idp ).

[0096] Furthermore, determine each dimension z of the vector ij The quantization result bit number q is 2 q Optional quantization value. Then according to the selected q, the dimension-reduced feature z i The dimensions are arranged in ascending order and divided equally into 2 q Divide equally and get 2 q -1 split value, use m kj represents the kth segmentation value of the jth dimension, k∈[1,2 q -1],j∈[1,dp].

[0097] According to formula (3), the image signature is quantized to be b i =(b i1 ,b i2 ,...,b idp ):

[0098]

[0099] Build an index with each word of the image signature and assign each image signature b i Considered by d p According to the number of words in the signature p , generate d p index tables, from the 1st dimension to the dth dimension of the signature set p The word corresponding to the dimension is constructed. For the image signature bi=(b i1 ,b i2 ,...,b idp ), insert image i into the first index table [b i1 –T,b i1 +T], after each word in the second index table [b i2 –T,b i2 +T], and so on, until the dth word is inserted. p [b idp –T,b idp +T] range. Finally, when all image signatures are inserted, the index construction is completed.

[0100] Step 204: Obtain rainfall data to be matched.

[0101] Step 205: Generate a target spatiotemporal matrix based on the rainfall data to be matched.

[0102] Step 206: Process the spatiotemporal matrix based on the convolutional neural network to obtain target coded 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, the conversion of historical rainfall data into coded data is similar to the logic of converting the rainfall data to be matched into target coded data, which will not be repeated here.

[0104] Step 207: input the target coded data into the index database to obtain historical rainfall data that meets similar conditions to the rainfall data to be matched.

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

[0106] Furthermore, the query rainfall signature b i =(b i1 ,b i2 ,…,b idp ), respectively in index table 1, 2, ..., d p Find the word b in i1 ,b i2 ,…,b idp , obtain a set of rainfall sequence numbers, count the number of occurrences of each rainfall sequence number in the set, and suppose that the rainfall sequence number j appears y times in the set. Then the similarity between rainfall sequences i and j is determined by the following formula:

[0107] Optionally, the similarity between the target encoded data and the encoded data in the index database is determined by 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, the similarity values of rainfall event i and each rainfall event in the database are arranged in descending order, and the most similar Top-K rainfall events are output as historical rainfall events that meet the similarity conditions with the data to be matched.

[0111] The following uses a certain river basin as a case study 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 embodiment of the present invention. The specific application includes the following steps:

[0112] Step 1. Classification of rainfall events: Classify rainfall events according to the 5-minute rainfall monitoring data of 24 rain gauges distributed in a certain basin from January 1, 2016 to April 30, 2024. If the 5-minute rainfall is less than 0.1 mm for more than 4 consecutive hours, it is considered invalid rainfall. A total of 1042 rainfall events are classified. Figure 3 , which shows a schematic diagram of rainfall conditions at 9 monitoring stations selected in a certain basin.

[0113] Step 2: Construction of spatiotemporal image of rainfall events: Using 24 rainfall monitoring stations at different spatial locations in the basin as the spatial dimension and rainfall duration as the temporal dimension, a two-dimensional spatiotemporal matrix is constructed. Taking the 15th rainfall event divided in this section as an example, the rainfall started at 18:00 on September 17, 2016, and ended at 00:05 on September 18, 2016. The rainfall collection frequency was 5 minutes per event, and a total of 75 events were collected. There were 24 rainfall monitoring stations in the basin in terms of spatial dimension. The generated rainfall matrix is as follows: Figure 4 Then the rainfall is mapped to a two-dimensional matrix, as shown in Figure 5 The spatial and temporal images of the rainfall events shown.

[0114] Step 3: Build a rainfall feature recognition model (CNN-RFIM) based on a convolutional neural network and extract spatiotemporal image features of historical rainfall events. The specific processing of this rainfall feature recognition model (CNN-RFIM) can be found in step 202 above and will not be repeated here.

[0115] Step 4: Establish a feature index database based on the spatiotemporal image features of historical rainfall events: Quantize the features output by the CNN-RFIM model into binary codes and convert them into image signatures to construct a historical rainfall feature index database. The specific implementation method can be found in step 203 above and will not be repeated here.

[0116] Step 5: Use the constructed CNN-RFIM model to extract the spatiotemporal image features of the rainfall event to be matched, and generate the rainfall signature of the rainfall event to be matched.

[0117] Step 6: Input the spatiotemporal image features of the rainfall event to be matched into a feature index database consisting of feature indices of historical rainfall events to retrieve rainfall events with similar spatiotemporal characteristics. Cosine similarity is used to measure the similarity between rainfall feature maps, and the most similar rainfall events are output based on the similarity value.

[0118] Please refer to Figure 6 , which shows a schematic diagram of rainfall matching involved in the embodiment of the present application. Figure 6As shown in the figure, the left area is the rainfall feature map to be matched, and the right area is the matched historical rainfall feature map. Similar is the similarity, which is between 0 and 1. The larger the Similar value, the more similar it is. Figure 7 and Figure 8 These are the two matched rainfall process lines and rain types, and the similarity between the two rainfall process lines and rain type characteristics is relatively high.

[0119] To summarize, to achieve rainfall matching, a computer can first acquire historical rainfall data for each episode and generate a corresponding spatiotemporal matrix—a two-dimensional matrix with the spatial location of the rain gauge station as the spatial dimension and the duration of rainfall as the temporal dimension. This matrix is then processed using a convolutional neural network to obtain the coded data corresponding to each episode. The computer then creates an index database based on the coded data corresponding to each episode. This index database can then query historical rainfall data that meets similar criteria to the rainfall data to be matched, based on the input target coded data. This approach takes into account the spatiotemporal characteristics of rainfall, converts these features into coded data through a convolutional neural network, and uses this coded data for indexing to achieve rainfall matching, thereby improving the accuracy of rainfall matching.

[0120] The present application also provides a rainfall matching device for implementing the aforementioned embodiments and preferred implementations. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0121] The embodiment of the present application provides a rainfall matching device, Figure 9 : is a structural diagram of a rainfall matching device provided in an embodiment of the present application, the device comprising:

[0122] An acquisition module 901 is configured to acquire a space-time matrix corresponding to each historical rainfall event; the space-time matrix is a two-dimensional matrix having the spatial location of the rainfall monitoring station as the spatial dimension and the rainfall duration as the temporal dimension;

[0123] A processing module 902 is configured to process the spatiotemporal matrix based on a convolutional neural network to obtain coded data corresponding to each historical rainfall event;

[0124] The index module 903 is used to establish an index database based on the coded data corresponding to each historical rainfall event; the index database is used to query historical rainfall that meets similar conditions to the rainfall data to be matched based on the input target coded data.

[0125] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0126] To summarize, to achieve rainfall matching, a computer can first acquire historical rainfall data for each episode and generate a corresponding spatiotemporal matrix—a two-dimensional matrix with the spatial location of the rain gauge station as the spatial dimension and the duration of rainfall as the temporal dimension. This matrix is then processed using a convolutional neural network to obtain the coded data corresponding to each episode. The computer then creates an index database based on the coded data corresponding to each episode. This index database can then query historical rainfall data that meets similar criteria to the rainfall data to be matched, based on the input target coded data. This approach takes into account the spatiotemporal characteristics of rainfall, converts these features into coded data through a convolutional neural network, and uses this coded data for indexing to achieve rainfall matching, thereby improving the accuracy of rainfall matching.

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

[0128] See also Figure 10 , Figure 10 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 10 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information in the 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. Equally, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 10 A processor 10 is taken as an example.

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

[0130] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0131] The memory 20 may include a program storage area and a data storage area, wherein 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 based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[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 also include a combination of the above types of memory.

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

[0134] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is 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 can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. 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. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0135] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

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

Claims

1. A rainfall matching method, characterized in that: The method comprises: Obtaining a spatiotemporal matrix corresponding to each historical rainfall event; the spatiotemporal 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 temporal dimension; Processing the spatiotemporal matrix based on a convolutional neural network to obtain coded data corresponding to each historical rainfall event; An index database is established based on the coded data corresponding to each historical rainfall event; the index database is used to query historical rainfall data that meets similar conditions to the rainfall data to be matched based on the input target coded data; The index database is established based on 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 according to a normal distribution; Projecting the encoded data based on the orthogonal matrix to obtain features after dimensionality reduction; Determine the number of bits of each dimension quantization result of the reduced dimension feature q ,get Optional quantization value; Arrange the dimensional features of the reduced features in ascending order and divide them into 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.

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 data 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 satisfies similar conditions to the rainfall data to be matched comprises: Obtaining similarity between the target coded data and each coded data in the index database; The historical rainfall corresponding to the coded data with the highest similarity to the target coded data in the index database 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 includes: 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%; 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.

5. The method according to any one of claims 1 to 4, characterized in that: The convolutional neural network is used to process the spatiotemporal matrix to obtain coded data corresponding to each historical rainfall event, including: Constructing a rainfall feature recognition model 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 coded data corresponding to the historical rainfall events.

6. A rainfall matching device, characterized in that: The device comprises: An acquisition module is used to obtain 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, configured to process the spatiotemporal matrix based on a convolutional neural network to obtain coded data corresponding to each historical rainfall event; An index module is used to establish an index database based on the coded data corresponding to each historical rainfall event; the index database is used to query historical rainfall data that meets similar conditions to the rainfall data to be matched based on the input target coded data; The index database is established based on 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 according to a normal distribution; Projecting the encoded data based on the orthogonal matrix to obtain features after dimensionality reduction; Determine the number of bits of each dimension quantization result of the reduced dimension feature q ,get Optional quantization value; Arrange the dimensional features of the reduced features in ascending order and divide them into 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 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 5 by executing the computer instructions.

8. 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 5.

9. 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 5.

Citation Information

Patent Citations

  • Water flow prediction model based on neural network

    CN112561132A

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

    CN117892167A