Rainfall data analysis method, device and equipment of rainfall monitoring point and medium

Through the combination of Flink CDC and Doris, the problem that traditional statistical methods cannot meet the needs of water conservancy business scenarios is solved, and accurate analysis and efficient calculation of rainfall data are realized, which is suitable for the statistics and analysis of large-scale rainfall monitoring data.

CN119179726APending Publication Date: 2024-12-24山东浪潮智水数字科技有限公司 +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411193287.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

Traditional rainfall statistics cannot meet the needs of basin flood control and urban waterlogging analysis, and cannot effectively analyze the specific time points during the rainfall process and the relationship between rainfall and the flow or water level of the monitoring point, and the traditional relationship database cannot support large-scale rainfall monitoring data operations. .

Method used

Flink CDC is used to connect to the rainfall data, update the status data through Flink calculation, and write the data to Doris' detailed table and aggregation table, and use functions to perform statistical analysis to obtain rainfall details and statistical data.

Benefits of technology

It realizes accurate analysis of rainfall processes, improves computing performance and real-time performance, and can adapt to statistical analysis of rainfall monitoring data in different types of databases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179726A_ABST
    Figure CN119179726A_ABST
Patent Text Reader

Abstract

The invention discloses a rainfall data analysis method and device for a rainfall monitoring point, equipment and a medium, and the method comprises the steps: determining the observation station code of a target rainfall monitoring point, and accessing the rainfall data of the target rainfall monitoring point through an flink CDC; calculating the rainfall data through flink to update the state data of the target rainfall monitoring point; based on the observation station code, writing the state data into a detail table of the doris to obtain rainfall session detail data of the target rainfall monitoring point; and based on the observation station code, writing the state data into a doris convergence table to obtain rainfall session statistical data of the target rainfall monitoring point. By introducing an flink streaming calculation and doris storage and calculation integrated framework, a traditional relational database statistical analysis mode is changed, the calculation performance is greatly improved, and the real-time performance, the stability and the like are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of rainfall data processing, and in particular to a rainfall data analysis method, device, equipment and medium for a rainfall monitoring point. Background Art

[0002] The common way to count rainfall in the water conservancy industry is to count rainfall at the hourly level, such as 1 hour, 3 hours, 6 hours, 12 hours, and daily rainfall (8 am to 8 am the next day). The calculation method is relatively simple, and only requires cumulative statistics at each measuring station within the time range.

[0003] The above traditional rainfall statistics method cannot meet the requirements of data analysis in current water conservancy business scenarios. Specifically, in water conservancy business scenarios such as river basin flood control and urban waterlogging analysis, more attention is paid to a complete rainfall process, including the specific time when the rain starts, the specific time when the rain stops, the amount of rainfall, and the relationship between the above three types of data and the flow rate at the monitoring point in river basin flood control or the water level at the urban waterlogging point.

[0004] The existing statistical method uses traditional relational databases to count rainfall events, which requires multi-layer nested loops for statistical analysis. In addition, the amount of rainfall monitoring data is huge, and traditional relational databases cannot support the calculation scale of this data level. Summary of the invention

[0005] In order to solve the above problems, the present application proposes a rainfall data analysis method, device, equipment and medium for a rainfall monitoring point, wherein the method comprises:

[0006] Determine the station code of the target rainfall monitoring point, and access the rainfall data of the target rainfall monitoring point through Flink CDC; calculate the rainfall data through Flink to update the status data of the target rainfall monitoring point; based on the station code, write the status data into the detail table of Doris to obtain the detailed data of rainfall events at the target rainfall monitoring point; based on the station code, write the status data into the aggregation table of Doris, and use functions to perform statistical analysis on the status data to obtain the statistical data of rainfall events at the target rainfall monitoring point.

[0007] In an example, the access to the rainfall data of the target rainfall monitoring point through flink CDC specifically includes: determining that the MySQL binlog log of the rainfall meter monitoring data corresponding to the target rainfall monitoring point is in an open state; creating a flink streaming execution environment through a flink sql statement, creating a first temporary table, and configuring the library table information of the first temporary table; creating a second temporary table corresponding to kafka on the flink execution environment, configuring kafka's configuration information, executing the corresponding flink sql for data insertion, so as to complete the full incremental synchronization of MySQL rainfall data to kafka.

[0008] In one example, the calculation of the rainfall data by flink to update the status data of the target rainfall monitoring point specifically includes: after receiving the newly sent rainfall data from the rainfall monitoring point, determining the newly sent rainfall data of the target rainfall monitoring point according to the station code; obtaining the status data of the target rainfall monitoring point, the status data including the station code, rainfall duration, accumulated rainfall, rainfall start time, and rainfall end time; and updating the status data by comparing the status data with the newly sent rainfall data.

[0009] In one example, the status data is updated by comparing the status data with the newly sent rainfall data, specifically including: reading the initial status data of the target rainfall monitoring station, and determining whether the initial status data is empty; if the initial status data is empty, filling the newly sent rainfall data into the initial status data; if the initial status data is not empty, obtaining the collection time in the newly sent rainfall data and the rainfall end time in the initial status data; and updating the initial status data by comparing the collection time and the rainfall end time.

[0010] In one example, the initial state data is updated by comparing the collection time and the rainfall end time, specifically including: if the difference between the collection time and the rainfall end time is lower than a preset time threshold, then based on the newly sent rainfall data, the rainfall duration, accumulated rainfall and rainfall end time in the initial state data are updated; if the difference between the collection time and the rainfall end time is higher than the preset time threshold, then after saving the initial state data, the state data is initialized, and the initialized state data is updated based on the newly sent rainfall data.

[0011] In one example, based on the station code, the status data is written into the Doris detail table to obtain the rainfall event detail data of the target rainfall monitoring point, specifically including: obtaining the current status data of the target rainfall monitoring point; writing the current status data into the Doris detail table; the fields of the detail table include: station code, rainfall start time, rainfall end time, rainfall duration, accumulated rainfall; wherein the station code, rainfall start time, and rainfall end time constitute a joint primary key.

[0012] In one example, based on the station code, the status data is written into the Doris aggregation table, and a function is used to perform statistical analysis on the status data to obtain rainfall statistics of the target rainfall monitoring point, specifically including: obtaining the current status data of the target rainfall monitoring point; writing the current status data into the Doris aggregation table; the fields of the aggregation table include: station code, continuous rainfall times, longest rainfall duration, maximum rainfall value; based on the station code and the current status data, the continuous rainfall times of the target rainfall monitoring point are counted using a summation function; based on the station code and the current status data, the longest rainfall duration and the maximum rainfall of the target rainfall monitoring point are counted using a maximum value function.

[0013] The present application also provides a rainfall data analysis device for a rainfall monitoring point, comprising: a data access module, which determines the station code of a target rainfall monitoring point and accesses the rainfall data of the target rainfall monitoring point through Flink CDC; a data calculation module, which calculates the rainfall data through Flink to update the status data of the target rainfall monitoring point; a detailed table module, which writes the status data into the Doris detailed table based on the station code to obtain the rainfall event detailed data of the target rainfall monitoring point; an aggregation table module, which writes the status data into the Doris aggregation table based on the station code, and uses a function to perform statistical analysis on the status data to obtain the rainfall event statistical data of the target rainfall monitoring point.

[0014] The present application also provides a rainfall data analysis device for a rainfall monitoring point, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of the above examples.

[0015] The present application also provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the method described in any one of the above examples.

[0016] The method proposed in this application can bring the following beneficial effects:

[0017] 1. Innovative changes have been made in the way rainfall statistics are collected, which can more realistically reflect a rainfall process and facilitate accurate analysis of rainfall.

[0018] 2. This method introduces Flink streaming computing and Doris storage and computing integrated framework, which changes the way of statistical analysis of traditional relational databases, greatly improves computing performance, and ensures real-time performance and stability.

[0019] 3. This method has good adaptability and can perform statistical analysis on rainfall monitoring data stored in different types of databases. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0021] Figure 1 A schematic diagram of a flow chart of a rainfall data analysis method for a rainfall monitoring point in an embodiment of the present application;

[0022] Figure 2 A schematic diagram of the overall architecture of a rainfall data analysis method for a rainfall monitoring point in an embodiment of the present application;

[0023] Figure 3 A schematic diagram of detailed table data of a rainfall data analysis method for a rainfall monitoring point in an embodiment of the present application;

[0024] Figure 4 A schematic diagram of aggregation table data of a rainfall data analysis method for a rainfall monitoring point in an embodiment of the present application;

[0025] Figure 5 This is a structural schematic diagram of a rainfall data analysis device at a rainfall monitoring point in an embodiment of the present application;

[0026] Figure 6 This is a structural schematic diagram of a rainfall data analysis device at a rainfall monitoring point in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0028] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0029] Figure 1 A flowchart of a rainfall data analysis method for a rainfall monitoring point provided in one or more embodiments of the present specification. The method can be applied to rainfall statistics, for example, to solve the problem of determining the number of consecutive rainfall events at a rainfall monitoring point, to solve the problem of cumulative rainfall statistics during a rainfall process at a rainfall monitoring point, to solve the problem of rainfall event statistics at a rainfall monitoring station within a time period, to solve the problem of continuous rainfall duration statistics at a rainfall monitoring station, or to solve the problem of full-increment integrated synchronization of rainfall monitoring data.

[0030] like Figure 2 As shown in the figure, this method uses Flink CDC to introduce historical data of rainfall monitoring and real-time new data into Kafka at one time, uses Flink to judge rainfall events, count rainfall duration and rainfall, and uses Doris to store rainfall event details and count rainfall events and maximum continuous rainfall.

[0031] The process can be executed by a computing device in the corresponding field, and certain input parameters or intermediate results in the process can be manually intervened and adjusted to help improve accuracy.

[0032] The analysis method involved in the embodiments of the present application can be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For the convenience of understanding and description, the following embodiments are described in detail by taking a server as an example.

[0033] It should be noted that the server can be a single device or a system composed of multiple devices, that is, a distributed server, and this application does not make any specific limitations on this.

[0034] like Figure 1 As shown, the embodiment of the present application provides a rainfall data analysis method for a rainfall monitoring point, comprising:

[0035] S101: Determine the station code of the target rainfall monitoring point, and access the rainfall data of the target rainfall monitoring point through Flink CDC.

[0036] Flink CDC is a real-time data integration framework based on database log CDC (Change Data Capture) technology, which supports advanced features such as full incremental integration, lock-free reading, parallel reading, automatic synchronization of table structure changes, and distributed architecture. With Flink's excellent pipeline capabilities and rich upstream and downstream ecosystems, Flink CDC can efficiently achieve real-time integration of massive data.

[0037] First, determine the target rainfall monitoring points where rainfall data analysis is required, and use Flink CDC to complete the full incremental synchronization of rainfall meter monitoring data to Kafka by configuring the basic information of the database and Kafka.

[0038] Specifically, when accessing the rainfall data of the target rainfall monitoring point through flink CDC, you first need to ensure that the MySQL binlog log is turned on, create a StreamTableEnvironment through StreamTableEnvironment.create(env), and obtain the StreamExecutionEnvironment flink streaming execution environment. Then, through the flink sql statement, create a temporary table and configure the library table information. At this time, you can complete the full reading of the rainfall table monitoring data in MySQL by executing the executeSql() method. Then you also need to write the data read by flink from MySQL to kafka. At this time, you can create a temporary table corresponding to kafka on the flink execution environment, configure the relevant configuration information of kafka, execute the corresponding flink sql for data insertion, and complete the full incremental synchronization of mysql rainfall data to kafka.

[0039] S102: Calculate the rainfall data through Flink to update the status data of the target rainfall monitoring point.

[0040] Apache Flink is an open source stream processing framework developed by the Apache Software Foundation. Its core is a distributed data stream engine written in Java and Scala. Flink executes any stream data program in a data-parallel and pipelined manner. Flink's pipeline runtime system can execute batch and stream processing programs. In addition, Flink's runtime itself also supports the execution of iterative algorithms.

[0041] After receiving the rainfall data, Apache Flink can be used to calculate the rainfall data, thereby updating the status data of the target rainfall monitoring point. The status data here is used to represent the rainfall status of the current rainfall event, and its specific form is as follows:

[0042] Tuple5<String,Long,Double,Timestamp,Timestamp> Represents the five values ​​of station code, rainfall duration, cumulative rainfall, rainfall start time, and rainfall end time. After the current rainfall ends, the status data will write the five-tuple result data into doris.

[0043] In one embodiment, during the process of updating the status data, after the server receives the newly sent rainfall data from the rainfall monitoring point, it will classify the rainfall data according to the station code to determine the newly sent rainfall data of the target rainfall monitoring point. The core fields of the rainfall data table here include: station code STCD, rainfall DRP, collection time TM, etc. Then, the current status data of the target rainfall monitoring point is obtained, and the status data is updated by comparing the current status data with the newly sent rainfall data.

[0044] Here is an explanation of the meaning of "a rain" and "continuous rainfall" in the field of water conservancy: In meteorology, "a rain" usually refers to a precipitation process. This process may include multiple precipitation events, and there may be breaks in between, but they are all considered a precipitation process. Rainfall refers to the depth of water that falls to the ground within a certain period of time, usually in millimeters (mm). Continuous rainfall refers to the accumulated value of rainfall with an interval of no more than 24 hours between rain stops. If the interruption between two rainfalls exceeds 24 hours, it is not considered continuous rainfall.

[0045] When comparing the current state data with the newly sent rainfall data, first read the initial state data of the target rainfall monitoring station and determine whether the initial state data is empty. If the initial state data is empty, it means that the newly sent rainfall data represents a new rain, and the newly sent rainfall data needs to be filled into the initial state data. If the initial state data is not empty, it means that the newly sent rainfall data may still be within the range of the current rain, and the collection time and the rainfall end time in the initial state data need to be obtained from the newly sent rainfall data, and the initial state data is updated by comparing the collection time and the rainfall end time.

[0046] In one embodiment, when the initial state data is updated, if the difference between the acquisition time and the rainfall end time is lower than a preset time threshold, the rainfall duration, accumulated rainfall, and rainfall end time in the initial state data are updated based on the newly sent rainfall data; if the difference between the acquisition time and the rainfall end time is higher than the preset time threshold, after the initial state data is saved, the state data is initialized, and the initialized state data is updated based on the newly sent rainfall data. The preset time threshold here can be 24 hours.

[0047] S103: Based on the station code, the status data is written into the doris detail table to obtain the rainfall event detail data of the target rainfall monitoring point.

[0048] Apache Doris is a high-performance, real-time analytical database based on the MPP architecture. It is well-known for its extremely fast and easy-to-use features. It can return query results under massive data in sub-second response time. It can not only support high-concurrency point query scenarios, but also support high-throughput complex analysis scenarios. Based on this, Apache Doris can better meet the use scenarios such as report analysis, ad hoc query, unified data warehouse construction, data lake federated query acceleration, etc. Users can build user behavior analysis, AB experiment platform, log retrieval analysis, user portrait analysis, order analysis and other applications on it.

[0049] After the rainfall data is calculated, the five-tuple result data returned by Flink processing can be written into the doris detail table according to the station code of the target rainfall monitoring point. The detail table mainly contains 5 fields: stcd (station code), start_tm (rainfall start time), end_tm (rainfall end time), continuous_time (rainfall duration), drp_sum (accumulated rainfall), among which the station code, rainfall start time and rainfall end time constitute the joint primary key. The detail table means data such as Figure 3 The details indicate the data.

[0050] In one embodiment, a person skilled in the art can create a detailed list by using the following statement:

[0051] CREATE TABLE IF NOT EXISTS st_continuous_pptn (

[0053] stcd VARCHAR(20)NOT NULL COMMENT"Station code",

[0054] start_tm DATETIME COMMENT "Rainfall start time",

[0055] end_tm DATETIME COMMENT "Rainfall end time",

[0056] continuous_time BIGINT COMMENT "Rainfall duration",

[0057] drp_sum DOUBLE COMMENT "Rainfall value" )

[0059] DUPLICATE KEY(stcd,start_tm,end_tm)

[0060] DISTRIBUTED BY HASH(stcd)BUCKETS10

[0061] properties(

[0062] "replication_num"="1" );

[0064] S104: Based on the station code, the status data is written into the aggregation table of Doris, and a function is used to perform statistical analysis on the status data to obtain the statistical data of rainfall events at the target rainfall monitoring point.

[0065] At the same time, the five-tuple result data returned by Flink processing is written into the aggregation table of Doris. According to the station code, the SUM function is used to count the number of consecutive rainfall events, and the MAX function is used to count the longest rainfall duration and the maximum rainfall.

[0066] In one embodiment, a person skilled in the art can create a aggregation table by using the following statement:

[0067] CREATE TABLE IF NOT EXISTS st_continuous_pptn_agg (

[0069] stcd VARCHAR(20)NOT NULL COMMENT"Station code",

[0070] count INT SUM DEFAULT"0"COMMENT"Continuous rainfall events",

[0071] continuous_time_max BIGINT MAX DEFAULT"0"COMMENT"Maximum rainfall duration",

[0072] drp_sum_max DOUBLE MAX DEFAULT"0"COMMENT"Maximum rainfall value" )

[0074] AGGREGATE KEY(stcd)

[0075] DISTRIBUTED BY HASH(stcd)BUCKETS10

[0076] properties(

[0077] "replication_num"="1" );

[0079] In one embodiment, the state data is written into the aggregation table of Doris, and the state data is statistically analyzed by using a function to obtain the statistical data of the rainfall events of the target rainfall monitoring point. It is necessary to obtain the current state data of the target rainfall monitoring point, and then write the current state data into the aggregation table of Doris. The fields of the aggregation table here include: station code, continuous rainfall events, longest rainfall duration, and maximum rainfall value. The aggregation table data is shown as follows: Figure 4 Then, based on the station code and current status data, the continuous rainfall events of the target rainfall monitoring point need to be counted using the summation function, and based on the station code and current status data, the longest rainfall duration and the maximum rainfall of the target rainfall monitoring point need to be counted using the maximum value function.

[0080] This application changes the traditional statistical analysis method of relational databases by introducing Flink streaming computing and Doris storage and computing integrated framework, which greatly improves the computing performance, and ensures real-time and stability. At the same time, this method has good adaptability and can perform statistical analysis on rainfall monitoring data stored in different types of databases.

[0081] like Figure 5 As shown, the embodiment of the present application also provides a rainfall data analysis device for a rainfall monitoring point, comprising:

[0082] The data access module 501 determines the station code of the target rainfall monitoring point and accesses the rainfall data of the target rainfall monitoring point through flink CDC.

[0083] The data calculation module 502 calculates the rainfall data through Flink to update the status data of the target rainfall monitoring point.

[0084] The detailed table module 503 writes the status data into the detailed table of Doris based on the station code to obtain the detailed data of the rainfall events at the target rainfall monitoring point.

[0085] The aggregation table module 504 writes the state data into the aggregation table of Doris based on the station code, and uses a function to perform statistical analysis on the state data to obtain the rainfall event statistics of the target rainfall monitoring point.

[0086] like Figure 6 As shown, the embodiment of the present application also provides a rainfall data analysis device for a rainfall monitoring point, including:

[0087] at least one processor; and,

[0088] a memory communicatively connected to the at least one processor; wherein,

[0089] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of the above embodiments.

[0090] An embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to be able to execute the method described in any one of the above embodiments.

[0091] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0092] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0093] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0094] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.

[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0097] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0098] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0099] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory media such as modulated data signals and carrier waves.

[0100] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0101] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A rainfall data analysis method for a rainfall monitoring point, characterized in that: include: Determine the station code of the target rainfall monitoring point and access the rainfall data of the target rainfall monitoring point through flink CDC; Calculate the rainfall data through Flink to update the status data of the target rainfall monitoring point; Based on the station code, the status data is written into the doris detail table to obtain the rainfall event detail data of the target rainfall monitoring point; Based on the station code, the status data is written into the aggregation table of Doris, and the status data is statistically analyzed using a function to obtain the rainfall event statistics of the target rainfall monitoring point.

2. The method according to claim 1, characterized in that The rainfall data of the target rainfall monitoring point accessed through flink CDC specifically includes: Determine that the MySQL binlog log of the rain gauge monitoring data corresponding to the target rainfall monitoring point is in an open state; Use the flink sql statement to create a flink streaming execution environment, create a first temporary table, and configure the library table information of the first temporary table; Create a second temporary table corresponding to Kafka on the Flink execution environment, configure Kafka's configuration information, and execute the corresponding Flink SQL to insert data to complete the full incremental synchronization of MySQL rainfall data to Kafka.

3. The method according to claim 1, characterized in that The calculating the rainfall data by flink to update the status data of the target rainfall monitoring point specifically includes: After receiving the newly transmitted rainfall data from the rainfall monitoring point, determining the newly transmitted rainfall data of the target rainfall monitoring point according to the measuring station code; Acquire status data of the target rainfall monitoring point, wherein the status data includes a station code, rainfall duration, accumulated rainfall, rainfall start time, and rainfall end time; The status data is updated by comparing the status data with the newly sent rainfall data.

4. The method according to claim 3, characterized in that The updating of the status data by comparing the status data with the newly sent rainfall data specifically includes: Reading the initial state data of the target rainfall monitoring station, and determining whether the initial state data is empty; If the initial state data is empty, then the newly sent rainfall data is filled into the initial state data; If the initial state data is not empty, obtaining the collection time from the newly sent rainfall data and the rainfall end time in the initial state data; The initial state data is updated by comparing the collection time and the rainfall end time.

5. The method according to claim 4, characterized in that The updating of the initial state data by comparing the collection time and the rainfall end time specifically includes: If the difference between the collection time and the rainfall end time is lower than a preset time threshold, the rainfall duration, accumulated rainfall and rainfall end time in the initial state data are updated based on the newly sent rainfall data; If the difference between the acquisition time and the rainfall end time is higher than the preset time threshold, the state data is initialized after the initial state data is saved, and the initialized state data is updated based on the newly sent rainfall data.

6. The method according to claim 5, characterized in that Based on the station code, the status data is written into the doris detail table to obtain the rainfall event detail data of the target rainfall monitoring point, specifically including: Acquire current status data of the target rainfall monitoring point; Write the current status data into the doris detail list; The fields of the detailed table include: station code, rainfall start time, rainfall end time, rainfall duration, and accumulated rainfall; wherein the station code, rainfall start time, and rainfall end time constitute a joint primary key.

7. The method according to claim 5, characterized in that Based on the station code, the state data is written into the aggregation table of Doris, and the state data is statistically analyzed by using a function to obtain the rainfall statistics of the target rainfall monitoring point, specifically including: Acquire current status data of the target rainfall monitoring point; The current state data is written into the aggregation table of doris; the fields of the aggregation table include: station code, continuous rainfall events, longest rainfall duration, and maximum rainfall value; Based on the station code and current status data, a summation function is used to count the number of consecutive rainfall events at the target rainfall monitoring point; Based on the station code and current status data, the maximum rainfall duration and the maximum rainfall at the target rainfall monitoring point are counted using a maximum value function.

8. A rainfall data analysis device for a rainfall monitoring point, characterized in that: include: The data access module determines the station code of the target rainfall monitoring point and accesses the rainfall data of the target rainfall monitoring point through flink CDC; A data calculation module calculates the rainfall data through Flink to update the status data of the target rainfall monitoring point; A detailed table module, based on the station code, writes the status data into the doris detailed table to obtain the rainfall event detailed data of the target rainfall monitoring point; The aggregation table module writes the state data into the aggregation table of Doris based on the station code, and uses a function to perform statistical analysis on the state data to obtain the rainfall event statistics of the target rainfall monitoring point.

9. A rainfall data analysis device for a rainfall monitoring point, characterized in that: include: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 7.

10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured to perform the method as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Station sliding rainfall accumulation real-time calculation method and system based on Flink

    CN115438304A

  • Super-large scale NFV network resource pool mass data processing and data access method

    CN116932619A

  • Data warehouse processing method and device for business data flow online analysis

    CN117421376A

  • Data table structure synchronization method and device applied to data aggregation

    CN117763041A

  • Real-time sliding minute cumulative rainfall calculation model and establishment method thereof

    CN118069696A