CN-121979912-A - Rainfall data processing method, rainfall data processing device, program product and electronic equipment
Abstract
The disclosure provides a rainfall data processing method, a device, a program product and electronic equipment, wherein the method comprises the steps of obtaining rainfall data to be processed, storing the rainfall data to be processed in a first database, and controlling to migrate the rainfall data with the period exceeding a preset period from the first database to a second database for storage in response to the period exceeding the preset period when the rainfall data exist in the first database. According to the method and the device, the rainfall data are stored in the first database, when the period of the rainfall data exceeds the preset period, the rainfall data are migrated to the second database to be stored, so that layered storage of hot data and cold data is realized, the storage pressure of a single database can be reduced, the inquiry and response time is improved, and meanwhile, the frequent occurrence of the phenomenon of locking a table is avoided, so that a reliable data base is provided for timely analyzing rainfall conditions.
Inventors
- ZHANG QUN
- GUO YUAN
- LIU FAN
- WANG JINNA
- WANG ZIYANG
- LIU QINGYI
- WANG JIEYU
Assignees
- 中国电建集团西北勘测设计研究院有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251231
Claims (10)
- 1. A method of rainfall data processing, the method comprising: Acquiring rainfall data to be processed, and storing the rainfall data to be processed into a first database; and in response to the fact that the period of time when the rainfall data exist in the first database exceeds a preset period, controlling the rainfall data with the period of time exceeding the preset period to be migrated from the first database to a second database for storage.
- 2. The method of claim 1, wherein the first database is stored in fragments of a first time length, wherein each fragment capacity of the first database is a first preset capacity, wherein the second database is stored in fragments of a second time length, and wherein each fragment capacity of the second database is a second preset capacity, wherein the first time length is less than the second time length, and wherein the first preset capacity is less than the second preset capacity; The obtaining rainfall data to be processed and storing the rainfall data to be processed into a first database comprises the following steps: Acquiring rainfall data to be processed, and storing the rainfall data to be processed in a first database in a slicing way according to a drainage basin and/or a time period corresponding to the rainfall data to be processed.
- 3. The method of claim 1, wherein controlling migration of rainfall data from the first database to a second database for storage in response to a period of time for which there is rainfall data in the first database exceeding a preset period of time comprises: And in response to the fact that the period of rainfall data in the first database exceeds a preset period, according to the mapping relation between the first database and the second database, migrating the rainfall data with the period exceeding the preset period from the first database to the second database for storage through incremental synchronization and full-quantity verification.
- 4. The method of claim 1, wherein the rainfall data to be processed is rainfall data within a target period, the method further comprising: Determining a target time window based on the target time period, wherein the target time window comprises the target time period and a plurality of continuous time periods before the target time period, and the target time window slides backwards based on a preset time step; Determining a heavy rain threshold corresponding to the target time window according to rainfall data corresponding to a plurality of time windows before the target time window or rainfall data in a plurality of continuous preset time periods before the target time window; determining a comparison result of the target period by comparing rainfall data of the target period with a storm threshold corresponding to the target time window; and determining a storm occurrence condition based on a comparison result of the target period.
- 5. The method of claim 4, wherein the determining a stormwater occurrence condition based on the comparison of the target time period comprises: and determining a storm occurrence condition based on the comparison result of the target period and the comparison result of one or more continuous periods before the target period.
- 6. The method according to claim 4, wherein the method further comprises: if it is determined that heavy rain occurs in the target drainage basin, determining rainfall data of the target drainage basin in the target time window, wherein the target drainage basin is the drainage basin corresponding to the rainfall data to be processed; determining the flow production information corresponding to the target river basin and/or the confluence information corresponding to the target river basin according to the rainfall data of the target river basin in the target time window; And issuing early warning information according to the flow information corresponding to the target drainage basin and/or the confluence information corresponding to the target drainage basin.
- 7. The method of claim 6, wherein determining, according to rainfall data of a target river basin in the target time window, production flow information corresponding to the target river basin and/or confluence information corresponding to the target river basin comprises: Determining the flow production information corresponding to the target drainage basin according to the rainfall data corresponding to the target time window and the gradient information corresponding to the target drainage basin; And determining confluence information corresponding to the target river basin by adopting Ma Sijing root methods and a Xinanjiang model according to rainfall data of the target river basin in the target time window.
- 8. A rainfall data processing device, the device comprising: The first storage module is used for acquiring rainfall data to be processed and storing the rainfall data to be processed into a first database; and the second storage module is used for responding to the fact that the period of the rainfall data in the first database exceeds a preset period, and controlling the rainfall data with the period exceeding the preset period to be migrated from the first database to the second database for storage.
- 9. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any of claims 1 to 7.
- 10. An electronic device, comprising: processor, and A memory for storing executable instructions of the processor; Wherein the processor is configured to perform the method of any one of claims 1 to 7 via execution of the executable instructions.
Description
Rainfall data processing method, rainfall data processing device, program product and electronic equipment Technical Field The present disclosure relates to the field of data processing technologies, and in particular, to a rainfall data processing method, a rainfall data processing device, a computer program product, and an electronic apparatus. Background The rainfall data acquisition is a key support for flood control and disaster reduction work, and the data processing efficiency directly influences the timeliness and accuracy of flood control decisions. In the related art, a single relational database architecture is generally adopted in a storage link of precipitation data, and the mode has obvious limitations that when the precipitation data volume reaches a certain scale, the time consumption of data inquiry and response is obviously prolonged, so that the analysis efficiency of precipitation conditions is further compromised, the database locking phenomenon is frequently triggered by multi-table correlation inquiry operation, and the continuity and timeliness of rainfall data processing are seriously affected. It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art. Disclosure of Invention The disclosure provides a rainfall data processing method, a rainfall data processing device, a computer program product and electronic equipment, so as to solve the problems of low query and response efficiency and frequent lock manifestations caused by the fact that rainfall data is stored by a single relational database to a certain extent. According to a first aspect of the disclosure, a rainfall data processing method is provided, and the method comprises the steps of obtaining rainfall data to be processed, storing the rainfall data to be processed in a first database, and controlling migration of the rainfall data with the period exceeding a preset period from the first database to a second database for storage in response to the period exceeding the preset period when the rainfall data exist in the first database. In an exemplary embodiment of the disclosure, the first database is stored in a sliced manner according to a first time length, each sliced capacity of the first database is a first preset capacity, the second database is stored in a sliced manner according to a second time length, each sliced capacity of the second database is a second preset capacity, the first time length is smaller than the second time length, the first preset capacity is smaller than the second preset capacity, the rainfall data to be processed are obtained, and the rainfall data to be processed are stored in the first database, wherein the steps of obtaining the rainfall data to be processed, and storing the rainfall data to be processed in the first database in a sliced manner according to a drainage basin and/or a time period corresponding to the rainfall data to be processed are carried out. In one exemplary embodiment of the disclosure, the controlling of the migration of the rainfall data with the period exceeding the preset period from the first database to the second database to be stored in response to the period exceeding the preset period when the rainfall data exists in the first database includes migrating the rainfall data with the period exceeding the preset period from the first database to the second database to be stored in response to the period exceeding the preset period when the rainfall data exists in the first database, through incremental synchronization and full verification according to the mapping relation between the first database and the second database. In an exemplary embodiment of the disclosure, the rainfall data to be processed is rainfall data in a target period, and the method further comprises determining a target time window based on the target period, wherein the target time window comprises the target period and a plurality of continuous periods before the target period, sliding the target time window backwards based on a preset time step, determining a storm threshold corresponding to the target time window according to rainfall data corresponding to the plurality of time windows before the target time window or rainfall data in the plurality of continuous preset time periods before the target time window, determining a comparison result of the target period by comparing the rainfall data of the target period with the storm threshold corresponding to the target time window, and determining a storm occurrence condition based on the comparison result of the target period. In one exemplary embodiment of the present disclosure, the determining a storm occurrence condition based on the comparison result of the target period includes determining a storm occurrence condition