Rainfall prediction method and device fusing mixed precision, equipment and storage medium

CN122962687APending Publication Date: 2026-10-23TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610951118.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0004]然而,相关技术的降雨预报模型采用单一、固定的网络架构,在面对非线性和长尾分布的自然降雨现象时,无法自适应切换推理范式,限制了模型在多类型气象条件下的预报时效、预测精度以及泛化能力

Benefits of technology

[0010]本申请提出的融合混合精度的降雨预报方法、装置、设备及存储介质,其通过调用门控路由网络基于时空编码特征、降雨状态数据以及预报时效数据生成网络路由策略,相较于相关技术中采用单一网络主干架构,难以同时兼顾短时强对流突发性与长历时层状降雨的持续性等复杂气象场景,本申请基于网络路由策略,在自注意力网络、状态空间记忆网络以及自注意力与状态空间混合网络中筛选至少一个目标网络,能够依据当前具体的降雨状态数据与预报时效数据建立动态响应机制,将擅长捕捉短时局部突变的自注意力网络、擅长长时序记忆与背景建模的状态空间记忆网络以及兼顾高风险演变过程的混合网络进行按需匹配,并调用目标网络基于时空编码特征生成对应的目标网络输出结果。最终,本申请基于目标网络输出结果生成自适应时空编码特征。此外,本申请通过混合精度优化技术,在确保降雨预报精度与极端天气预警能力未受削弱的前提下,降低了模型参数冗余、推理计算量以及边缘侧气象设备的部署延迟,实现了降雨预测性能与计算效率的平衡,最后根据自适应时空编码特征预测生成未来预设时段内每一气象站点的降雨预报结果。如此,通过上述技术特征的有机结合,本申请实现了根据当前降雨预报任务特征自适应、灵活地切换推理范式,提高了在多类型气象条件下的预报时效、预测精度与泛化能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122962687A_ABST
    Figure CN122962687A_ABST
Patent Text Reader

Abstract

The application provides a rainfall prediction method and device with fusion mixed precision, equipment and a storage medium. The method comprises: acquiring historical meteorological data, rainfall state data of a plurality of meteorological stations in a target area, and prediction time limit data of the target area; generating a space-time coding feature according to the historical meteorological data, and calling a gating routing network to generate a network routing strategy based on the space-time coding feature, the rainfall state data and the prediction time limit data; screening at least one target network in a self-attention network, a state space memory network and a self-attention and state space hybrid network based on the network routing strategy, and calling the target network to generate an adaptive space-time coding feature based on the space-time coding feature; performing mixed precision optimization on the adaptive space-time coding feature, and predicting and generating a rainfall prediction result based on the mixed precision optimization result. The application can adaptively switch the reasoning paradigm, and improve the prediction accuracy and generalization ability under multiple types of meteorological conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device and storage medium for rainfall forecasting with fusion and hybrid accuracy. Background Technology

[0002] Short-term and hourly-level refined rainfall forecasts are crucial for urban flood control, flash flood warnings, reservoir flood control scheduling, and traffic safety. Accurate predictions of future, refined rainfall amounts provide a scientific basis for meteorological disaster prevention and mitigation, as well as production scheduling. The development of modern meteorological operations has placed higher demands on the spatial precision, temporal resolution, and long-term time-series dependency modeling capabilities of rainfall forecasts. This requires forecasting algorithms not only to accurately capture sudden, localized, short-duration, severe convective rainstorms, but also to effectively handle long-duration, continuous rainfall.

[0003] With the continuous accumulation of big data on the Internet and the rapid development of artificial intelligence deep learning technology, data-driven spatiotemporal sequence prediction algorithms have been widely researched and applied in the field of intelligent meteorological forecasting. Related technologies employ a single state-space model to construct long-term temporal state memory paths, enabling the extraction of long-sequence dependencies in the prediction of meteorological variables with strong continuity; alternatively, they introduce traditional self-attention network architectures into rainfall prediction, capturing long-distance spatiotemporal features through a global spatial interaction mechanism.

[0004] However, the rainfall forecasting models of related technologies adopt a single, fixed network architecture. When faced with nonlinear and long-tailed natural rainfall phenomena, they cannot adaptively switch inference paradigms, which limits the forecast timeliness, prediction accuracy, and generalization ability of the models under various meteorological conditions. Summary of the Invention

[0005] The main objective of this application is to propose a rainfall forecasting method, apparatus, device, and storage medium that integrates mixed accuracy, aiming to adaptively and flexibly switch inference paradigms to improve forecast timeliness, prediction accuracy, and generalization ability under various meteorological conditions.

[0006] To achieve the above objectives, a first aspect of this application proposes a method for rainfall forecasting with fused and mixed accuracy, the method comprising: Historical meteorological data and rainfall status data from multiple meteorological stations within the target area are obtained, along with forecast lead time data for the target area. Spatiotemporal coding features are generated based on the historical meteorological data, and a pre-trained gated routing network is invoked to generate a network routing strategy based on the spatiotemporal coding features, the rainfall status data, and the forecast lead time data. Based on the network routing strategy, at least one target network is selected from the preset self-attention network, state space memory network, and self-attention and state space hybrid network, and the target network is called to generate the corresponding target network output result based on the spatiotemporal coding features; Based on the output of the target network, an adaptive spatiotemporal coding feature is generated, and based on the adaptive spatiotemporal coding feature, a rainfall forecast result for each of the meteorological stations within a future preset time period is predicted.

[0007] To achieve the above objectives, a second aspect of this application proposes a rainfall forecasting device with fused and mixed accuracy, the device comprising: The acquisition unit is used to acquire historical meteorological data and rainfall status data from multiple meteorological stations within the target area, and to acquire forecast lead time data for the target area. The first generation unit is used to generate spatiotemporal coding features based on the historical meteorological data, and to call a pre-trained gated routing network to generate a network routing strategy based on the spatiotemporal coding features, the rainfall status data, and the forecast lead time data. The second generation unit is used to select at least one target network from the preset self-attention network, state space memory network and self-attention and state space hybrid network based on the network routing strategy, and call the target network to generate the corresponding target network output result based on the spatiotemporal coding features. The third generation unit is used to generate adaptive spatiotemporal coding features based on the output results of the target network, perform mixed precision optimization on the adaptive spatiotemporal coding features to obtain mixed precision optimization results, and predict and generate rainfall forecast results for each of the meteorological stations within a preset time period based on the mixed precision optimization results.

[0008] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.

[0009] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.

[0010] This application proposes a method, apparatus, device, and storage medium for fusion-precision rainfall forecasting. It generates a network routing strategy based on spatiotemporal coding features, rainfall state data, and forecast lead time data by invoking a gated routing network. Compared to related technologies that employ a single network backbone architecture, which struggles to simultaneously handle complex meteorological scenarios such as the suddenness of short-duration severe convection and the persistence of long-duration layered rainfall, this application, based on its network routing strategy, selects at least one target network from self-attention networks, state-space memory networks, and hybrid networks of self-attention and state-space memory. It establishes a dynamic response mechanism based on the current specific rainfall state data and forecast lead time data, matching the self-attention network (excelling at capturing short-duration local mutations), the state-space memory network (excelling at long-term memory and background modeling), and the hybrid network (accepting high-risk evolution processes) as needed. The target network is then invoked to generate the corresponding target network output based on its spatiotemporal coding features. Finally, this application generates adaptive spatiotemporal coding features based on the target network output. Furthermore, this application employs a hybrid accuracy optimization technique to reduce model parameter redundancy, inference computation, and deployment delays of edge-side meteorological equipment, while ensuring that rainfall forecast accuracy and extreme weather warning capabilities are not compromised. This achieves a balance between rainfall forecast performance and computational efficiency. Finally, rainfall forecast results for each meteorological station within a preset future time period are generated based on adaptive spatiotemporal coding features. Thus, through the organic combination of these technical features, this application enables adaptive and flexible switching of inference paradigms according to the characteristics of the current rainfall forecasting task, improving forecast timeliness, prediction accuracy, and generalization ability under various meteorological conditions. Attached Figure Description

[0011] Figure 1 This is a flowchart of the rainfall forecasting method with fused and mixed accuracy provided in the embodiments of this application; Figure 2 This is a flowchart of the process for generating spatiotemporal coding features provided in this application; Figure 3 This application provides Figure 1 Flowchart of step S102; Figure 4 This is a diagram of the feature extraction and spatial coupling network structure provided in this application; Figure 5 This application provides Figure 3 Flowchart of step S303; Figure 6 This is a network structure diagram of the self-attention network and state-space memory network provided in this application; Figure 7 This application provides Figure 1 Flowchart of step S103; Figure 8 This is a structural diagram of the spatiotemporal coding model and gated routing network provided in this application; Figure 9 This is a flowchart of the processing of the self-attention and state-space hybrid network provided in this application; Figure 10 This is another flowchart of the rainfall forecasting method with fusion and mixing accuracy provided in this application; Figure 11 This is a schematic diagram of the structure of the rainfall forecasting device with fusion and mixing accuracy provided in the embodiments of this application; Figure 12 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0013] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0014] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0015] Short-term and hourly-level refined rainfall forecasts are key technologies in urban flood control, flash flood warning, reservoir management, traffic safety, and energy dispatch. Accurate and precise forecasts of future rainfall can provide a scientific basis for meteorological disaster prevention and mitigation and production scheduling. With the continuous accumulation of data from automatic weather stations, radar, satellites, reanalysis data, and numerical weather prediction products, deep learning-based rainfall forecasting is gradually becoming an important direction for the intelligentization of meteorological operations.

[0016] The development of modern meteorological operations has placed higher demands on the spatial precision, temporal resolution, and long-term time-series dependency modeling capabilities of rainfall forecasts. Forecasting algorithms are required not only to accurately capture sudden, localized, short-duration, severe convective rainstorms, but also to effectively handle long-duration, continuous rainfall. With the continuous accumulation of internet big data and the development of artificial intelligence technology, data-driven spatiotemporal sequence prediction algorithms have been widely researched and applied in the field of intelligent meteorological forecasting.

[0017] Related technologies employ single-state-space models or Mamba backbones for meteorological variable prediction, typically relying on a long-term temporal state memory path to model historical meteorological sequences. These approaches are applicable to predicting relatively continuous meteorological variables such as wind fields and temperature. However, hourly rainfall, especially severe convective storms, is characterized by its suddenness, locality, strong nonlinearity, and long-tailed distribution. Directly using a single Mamba backbone is insufficient to simultaneously adapt to the real-time warning requirements of short-duration severe convection, persistent stratiform rainfall, and varying computing power. On the other hand, Transformer-based rainfall prediction schemes can capture long-distance spatiotemporal dependencies. However, the computational complexity of ordinary global self-attention mechanisms increases significantly with sequence length and the number of spatial nodes, leading to high computational overhead and inference latency under conditions of multiple stations, multiple variables, and long historical windows. Furthermore, while graph neural network schemes can express partial spatial relationships between stations, they typically only consider geographical proximity or historical correlation.

[0018] Therefore, existing multi-site hourly rainfall forecasting models typically employ a single, fixed network architecture. When faced with nonlinear and long-tailed natural rainfall phenomena, they cannot adaptively switch inference paradigms, limiting forecast lead time, prediction accuracy, and generalization ability under various meteorological conditions. Due to the fixed backbone structure, existing technologies struggle to dynamically switch based on rainfall type, forecast lead time, and equipment computing power. Furthermore, the spatial coupling representation of multiple sites is insufficient, making it difficult to characterize non-Euclidean rainfall propagation relationships. In extreme rainstorm warnings, extreme rainstorm samples are scarce, and ordinary loss functions tend to favor samples with no rain or light rain, resulting in insufficient extreme weather warning capabilities.

[0019] Based on this, embodiments of this application provide a rainfall forecasting method, apparatus, device, and storage medium that integrates mixed accuracy, aiming to adaptively and flexibly switch inference paradigms to improve forecast timeliness, prediction accuracy, and generalization ability under various meteorological conditions.

[0020] The rainfall forecasting method, apparatus, device, and storage medium with fusion and mixing accuracy provided in this application are specifically described through the following embodiments. First, the rainfall forecasting method with fusion and mixing accuracy in this application embodiment is described.

[0021] The rainfall forecasting method with fused and mixed accuracy provided in this application relates to the field of artificial intelligence technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the rainfall forecasting method with fused and mixed accuracy, but is not limited to the above forms.

[0022] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0023] Figure 1 This is an optional flowchart of the rainfall forecasting method with fusion and mixing accuracy provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S104.

[0024] Step S101: Obtain historical meteorological data and rainfall status data from multiple meteorological stations within the target area, and obtain forecast lead time data for the target area; Step S102: Generate spatiotemporal coding features based on historical meteorological data, and call the pre-trained gated routing network to generate a network routing strategy based on the spatiotemporal coding features, rainfall status data, and forecast lead time data; Step S103: Based on the network routing strategy, at least one target network is selected from the preset self-attention network, state space memory network and self-attention and state space hybrid network, and the target network is called to generate the corresponding target network output result based on the spatiotemporal coding features. Step S104: Generate adaptive spatiotemporal coding features based on the target network output results, perform mixed precision optimization on the adaptive spatiotemporal coding features to obtain mixed precision optimization results, and predict and generate rainfall forecast results for each meteorological station within the future preset time period based on the mixed precision optimization results.

[0025] Steps S101 to S104 of this application embodiment involve generating a network routing strategy based on spatiotemporal coding features, rainfall status data, and forecast lead time data by calling a gated routing network. Compared to related technologies that use a single network backbone architecture, which struggles to simultaneously handle complex meteorological scenarios such as the suddenness of short-term strong convection and the persistence of long-duration layered rainfall, this application, based on the network routing strategy, selects at least one target network from self-attention networks, state-space memory networks, and hybrid networks of self-attention and state-space memory. It can establish a dynamic response mechanism based on the current specific rainfall status data and forecast lead time data, matching the self-attention network (adept at capturing short-term local mutations), the state-space memory network (adept at long-term memory and background modeling), and the hybrid network (accommodating high-risk evolution processes) as needed, and calling the target network to generate the corresponding target network output based on spatiotemporal coding features. Finally, this application generates adaptive spatiotemporal coding features based on the target network output. Furthermore, this application employs a hybrid accuracy optimization technique to reduce model parameter redundancy, inference computation, and deployment delays of edge-side meteorological equipment, while ensuring that rainfall forecast accuracy and extreme weather warning capabilities are not compromised. This achieves a balance between rainfall forecast performance and computational efficiency. Finally, rainfall forecast results for each meteorological station within a preset future time period are generated based on adaptive spatiotemporal coding features. Thus, through the organic combination of these technical features, this application enables adaptive and flexible switching of inference paradigms according to the characteristics of the current rainfall forecasting task, improving forecast timeliness, prediction accuracy, and generalization ability under various meteorological conditions.

[0026] In step S101, historical hourly multi-source meteorological data from multiple meteorological stations or spatial nodes within the target area are first acquired. This historical meteorological data includes various meteorological and geographical variables such as hourly rainfall, temperature, relative humidity, air pressure, wind speed, wind direction, total precipitable water, convective potential energy, radar combined reflectivity, terrain height, latitude and longitude, and land use type. To ensure data quality, preprocessing operations such as time alignment, spatial matching, outlier removal, missing data imputation, unit unification, and normalization are performed on the historical meteorological data. For the rainfall variable, to mitigate the common zero expansion and long-tail distribution characteristics of rainfall data, this embodiment employs long-tail transformation methods such as logarithmic smoothing, piecewise normalization, or threshold binning coding. Simultaneously, rainfall status data from multiple meteorological stations within the target area are acquired. This rainfall status data characterizes the current precipitation process and historical water vapor accumulation effects, including historical rainfall intensity, historical rainfall intensity change rate, continuous rainfall duration, continuous dry season duration, radar echo gradient, and previous cumulative rainfall. In addition, forecast lead time data for the target area is obtained. This forecast lead time data is used to characterize the prediction difficulty faced at different forecast time spans (such as the next 1 hour, 3 hours, 6 hours, etc.), providing a reference for the subsequent adaptive routing decisions of the network.

[0027] In step S102, the preprocessed historical meteorological data is transformed into a high-dimensional feature representation, i.e., spatiotemporal coded features are generated. First, the continuous meteorological variables, station static attributes, and time period features are branched and encoded separately through the multi-source feature encoding module. Then, the branch encoding results are concatenated and mapped to a unified hidden feature. Subsequently, the unified hidden feature is divided into multi-scale time series patches (data blocks) such as short-term, medium-term, and long-term along the time dimension, and the corresponding location encoding, scale encoding, and variable type encoding are superimposed to obtain a multi-scale spatiotemporal representation (i.e., spatiotemporal coded features).

[0028] In some embodiments, please refer to Figure 2 Spatiotemporal coding features are generated based on historical meteorological data, including: Step S201: Continuous meteorological variable coding is performed on historical meteorological data to obtain continuous meteorological variable coding features, and station static attribute coding is performed on historical meteorological data to obtain station static attribute coding features. Step S202: Time period coding is performed on historical meteorological data to obtain time period coding features, and historical rainfall status coding is performed on historical meteorological data to obtain historical rainfall status coding features. Step S203: Encode the forecast lead time of historical meteorological data to obtain the forecast lead time coding features; Step S204: Generate unified hidden features based on continuous meteorological variable coding features, station static attribute coding features, time period coding features, rainfall history state coding features, and forecast lead time coding features. Perform multi-scale time series division on the unified hidden features, and perform time location coding, station location coding, scale type coding, and variable type coding on the multi-scale time series division results to obtain the corresponding spatiotemporal coding features.

[0029] In step S201, the historical meteorological data is encoded using a multi-source feature coding module to perform continuous meteorological variable coding and station static attribute coding. The multi-source feature coding module includes a continuous meteorological variable coding branch and a station static attribute coding branch. The continuous meteorological variable coding branch encodes meteorological elements with continuous numerical characteristics, such as hourly rainfall, temperature, relative humidity, air pressure, wind speed, wind direction, total precipitable water, convective effective potential energy, and radar combined reflectivity, to obtain continuous meteorological variable coding features. Simultaneously, to construct the geographical context of multiple meteorological stations, this embodiment encodes the inherent station attribute information of meteorological stations, such as topographic altitude, latitude and longitude, and land use type, which do not change over time, using the station static attribute coding branch to obtain station static attribute coding features. These station static attribute coding features can characterize the differences in spatial distribution and geographical environment among different meteorological stations.

[0030] In step S202, historical meteorological data is encoded with time period and rainfall history status to extract periodic variation patterns and rainfall evolution processes. The multi-source feature encoding module also includes a time period feature encoding branch and a rainfall history status encoding branch. On the one hand, the time period feature encoding branch encodes time information with periodic patterns, such as monthly periodic features and hourly periodic features, to obtain time period encoding features. The time period encoding features are used to capture the seasonal changes and diurnal variation patterns of meteorological models. In this way, the rainfall forecast model can perceive the periodic patterns of daily and seasonal variations in meteorological data. For example, a day of 24 hours and a year of 12 months are encoded as periodic feature vectors.

[0031] On the other hand, by encoding the specific indicators of the precipitation process through the historical precipitation state coding branch, the historical precipitation state coding characteristics are obtained. The specific precipitation indicators include time-series statistics that reflect the evolution of the precipitation process, such as historical rainfall intensity, historical rainfall intensity change rate, continuous rainfall duration, continuous rainless duration, radar echo gradient, and previous cumulative rainfall. In this way, the precipitation forecast model can determine the current rainfall stage based on the historical precipitation state.

[0032] In step S203, since the prediction difficulty varies across different forecast lead times, short-term forecasts typically have higher certainty, while long-term forecasts are more significantly affected by accumulated uncertainty. Therefore, it is necessary to encode the forecast lead time to enhance the model's predictive ability under different lead times. The multi-source feature coding module also includes a forecast lead time feature coding branch. This branch encodes the forecast lead time data for the target area to obtain forecast lead time coding features. These features characterize the prediction difficulty across different forecast time spans. For example, predicting short-term precipitation for the next 1 hour versus predicting precipitation evolution over the next 12 hours.

[0033] In step S204, the continuous meteorological variable coding features, station static attribute coding features, time period coding features, historical rainfall state coding features, and forecast lead time coding features are concatenated. The concatenated features are mapped through a linear projection layer or a gated residual layer to generate a unified hidden feature with uniform dimensions. To reduce the computational complexity of long time series, this embodiment performs multi-scale temporal series partitioning of the unified hidden feature along the time dimension. Specifically, the continuous time series is divided into several time segments according to different time window lengths and step sizes, forming short-time patches, medium-time patches, and long-time patches. Short-time patches are used to capture short-term abrupt changes, medium-time patches are used to capture medium-term evolution trends, and long-time patches are used to capture long-term background states. In this way, a multi-scale temporal resolution representation (i.e., multi-scale temporal series partitioning result) is constructed.

[0034] Furthermore, to compensate for the structural information lost during the time series partitioning process, this embodiment overlays time location encoding, station location encoding, scale type encoding, and variable type encoding onto each patch. It injects prompts about the time series order, spatial node topology, data block granularity, and input variable type into the features, respectively. Among them, the time location encoding is used to identify the relative position of each patch in the time series, the station location encoding is used to identify the meteorological station to which each patch belongs, the scale type encoding is used to distinguish between three scale types: short-term patch, medium-term patch, and long-term patch, and the variable type encoding is used to distinguish the feature type to which different meteorological variables belong. Finally, the features are fused to obtain a structurally complete multi-scale spatiotemporal representation, namely, spatiotemporal coded features.

[0035] This embodiment employs a multi-source parallel feature encoding mechanism to avoid mutual interference from heterogeneous multi-source data. This allows the model to simultaneously perceive changes in continuous meteorological variables, spatial distribution differences among meteorological stations, temporal periodicity, the evolution of rainfall processes, and differences in forecast lead time. Then, the unified hidden features are divided into multi-scale temporal patches to capture short-term abrupt changes, medium-term evolution, and long-term background features of the rainfall process. Combined with auxiliary encoding (time, station, scale, variable), this reduces the computational complexity and memory consumption of the spatiotemporal encoder's modeling of long- and short-term dependencies, while fully preserving the spatiotemporal topology and multi-scale temporal evolution patterns of the meteorological data. This improves the model's ability to model the spatiotemporal coupling relationships of multi-station rainfall.

[0036] In some embodiments, please refer to Figure 3 The pre-trained gated routing network is invoked to generate a network routing strategy based on spatiotemporal coding features, rainfall status data, and forecast lead time data, including: Step S301: Obtain the geographic meteorological correlation factors among multiple meteorological stations, and construct a static adjacency graph, a dynamic adjacency graph, and a causal environment graph based on the geographic meteorological correlation factors. Step S302: Generate a time-varying spatial graph based on the static adjacency graph, dynamic adjacency graph, and causal environment graph; and spatially couple the spatiotemporal coding features based on the time-varying spatial graph to generate spatially coupled spatiotemporal features. Step S303: Invoke the pre-trained gated routing network to generate a network routing strategy based on spatially coupled spatiotemporal characteristics, rainfall status data, and forecast lead time data.

[0037] In step S301, the geographic meteorological correlation factors between multiple meteorological stations are obtained. The geographic meteorological correlation factors refer to the various geographic and meteorological conditions that affect the mutual correlation of rainfall between different meteorological stations, including at least two of the following factors: station geographic distance, topographic differences, historical rainfall correlation, prevailing wind direction propagation relationship, and current radar echo gradient. These factors together determine the spatial propagation pattern and mutual influence of rainfall between multiple stations.

[0038] Specifically, a static adjacency graph is constructed based on inherent attributes such as geographical distance, altitude differences, topographic channel relationships, and average climate correlations between meteorological stations. This static adjacency graph is used to characterize the stable network topology connections and topographical constraints between meteorological stations. Simultaneously, considering the dynamic evolution of rainfall processes, this embodiment acquires real-time meteorological change factors such as wind direction, radar echo movement direction, rainfall intensity gradient, and water vapor transport similarity to update and construct a dynamic adjacency graph, thereby accurately reflecting the real-time movement and propagation paths of water vapor and convective systems under current meteorological conditions. Furthermore, to express the impact of the macro-environmental background, this embodiment also incorporates macro-factors such as seasons, weather patterns, and regional non-stationary environments to construct a causal environment graph. By constructing the above three graph structures, this embodiment can comprehensively characterize the spatial association features between multiple meteorological stations from three dimensions: fixed geographical constraints, real-time meteorological evolution, and macro-environmental background, providing a structured graph representation foundation for subsequent spatial coupling modeling.

[0039] In step S302, the static adjacency graph, dynamic adjacency graph, and causal environment graph are input into the adjacency matrix fusion layer. A time-varying spatial graph with structure awareness is generated through weighted fusion or splicing mapping. This time-varying spatial graph contains fixed geographical adjacency weights between meteorological stations and also incorporates the dynamic propagation characteristics of the non-stationary environment and wind field that change over time. Subsequently, in this embodiment, the spatiotemporal encoded features generated in the aforementioned steps are input together with the time-varying spatial graph into a graph convolution coupling unit. The graph convolution coupling unit aggregates information from the time-varying spatial graph and spatiotemporal encoded features using network operators such as graph convolution, edge-level message passing, or relational graph convolution. This allows the features of each meteorological station to aggregate meteorological information from its neighboring stations. After graph convolution coupling, the features of each meteorological station not only contain its own historical time-series information but also incorporate the spatial propagation information of adjacent meteorological stations under the influence of geographical, meteorological, and environmental factors, ultimately yielding spatially coupled spatiotemporal features.

[0040] In some embodiments, please refer to Figure 4 , Figure 4 This is a diagram of the feature extraction and spatial coupling network structure provided in this application, such as... Figure 4As shown, firstly, multi-source data, including continuous meteorological variables, station static attributes, time-cycle characteristics, historical rainfall data, and forecast lead time characteristics, are input into a branch coding network to extract their respective branch embedding features. Then, in a feature concatenation and fusion layer, these are mapped into unified hidden features. Next, the unified hidden features enter a multi-scale temporal patch partitioning unit, and time, station, scale, and variable type codes are superimposed through a location coding layer to form encoded multi-scale spatiotemporal features (i.e., spatiotemporal coded features). The static adjacency graph, dynamic adjacency graph, and causal environment graph are processed by an adjacency matrix fusion layer to generate a structure-aware dynamic adjacency matrix (i.e., time-varying spatial graph). Finally, the time-varying spatial graph and the spatiotemporal coded features are input together into a graph convolutional coupling unit, outputting spatially coupled spatiotemporal features.

[0041] In step S303, a pre-trained gated routing network is invoked to generate a network routing strategy for controlling the inference path of subsequent model networks. The gated routing network includes a global spatiotemporal pooling layer, a rainfall state embedding layer, a forecast lead time embedding layer, a computational resource embedding layer, and a routing weight prediction layer. Specifically, the global spatiotemporal pooling layer performs global statistical pooling on spatially coupled spatiotemporal features to extract overall spatiotemporal distribution features; the rainfall state embedding layer receives rainfall state data such as historical rainfall intensity, historical rainfall intensity change rate, continuous rainfall duration, continuous rainless duration, radar echo gradient, and previous cumulative rainfall, and performs feature encoding on the rainfall state data to generate a rainfall state embedding vector; the forecast lead time embedding layer maps different forecast lead times (such as 1 hour, 3 hours, 6 hours, etc.) to lead time embedding vectors.

[0042] The gated routing network then comprehensively evaluates the embedded features to generate a network routing strategy that controls the inference path of subsequent model networks. This network routing strategy includes a vector containing weights from various network modes output by the routing weight prediction layer. The network routing strategy guides the spatiotemporal encoder in dynamically selecting or weighted fusion operations between different network branches.

[0043] This embodiment constructs a time-varying spatial map by integrating geographical distance, real-time wind direction propagation, and causal environment factors, breaking through the limitations of traditional meteorological map neural network models that rely solely on single geographical proximity or historical correlation for spatial modeling. This enables a multi-dimensional, structured expression of spatial relationships among multiple stations. Furthermore, this embodiment introduces a gated routing network, combining spatial structural features, rainfall evolution, and forecast lead time requirements to generate adaptive routing strategies. Thus, this embodiment endows the rainfall forecast model with adaptive decision-making capabilities, enabling it to determine the optimal network routing strategy based on specific meteorological scenarios (such as short-term abrupt strong convection or long-duration stable rainfall), thereby improving the spatial coupling expression capability of multi-station rainfall.

[0044] In some embodiments, please refer to Figure 5The pre-trained gated routing network is invoked to generate a network routing strategy based on spatially coupled spatiotemporal characteristics, rainfall status data, and forecast lead time data, including: Step S501: Obtain the computational resource information of the rainfall forecasting equipment; Step S502: The pre-trained gated routing network is invoked to generate a network routing strategy based on computational resource information, spatial coupling spatiotemporal characteristics, rainfall status data, and forecast lead time data.

[0045] In step S501, the computing resource information of the rainfall forecasting equipment is obtained, and the decision-making process of the network routing strategy is constrained by the computing resource information to ensure that the rainfall forecasting model can perceive and adapt to the computing power and storage limitations of different hardware devices during the actual inference process.

[0046] Specifically, the rainfall forecasting equipment can be used to execute the fusion-mixed accuracy rainfall forecasting method provided in this application, and can be deployed with the rainfall forecasting model provided in this application. It can be an edge computing node or a meteorological service server, etc., without limitation. The computing resource information includes the rainfall forecasting equipment's delay budget, storage budget, and available computing power level. The delay budget refers to the maximum time overhead that the rainfall forecasting equipment can tolerate when processing meteorological data and generating forecast results; the storage budget represents the upper limit of storage capacity that the equipment can use to load model parameters and intermediate feature data; and the available computing power level represents the scale of computing resources currently available to the equipment, such as the number of CPU cores, graphics processing unit (GPU) computing power, or the computing power of a neural network accelerator. The gated routing network also includes a computing resource embedding layer. This layer is used to extract features from the rainfall forecasting equipment's delay budget, storage budget, and available computing power level, etc., to participate in subsequent path decisions. Thus, the gated routing network can dynamically adjust the model inference path selection strategy according to the actual hardware constraints of the equipment, thereby achieving the optimal rainfall forecasting effect while meeting the equipment's performance limitations.

[0047] In step S502, as described above, the gated routing network includes multiple feature embedding structures to handle inputs of different dimensions. After processing and obtaining the embedded representations of data of different dimensions, the routing weight prediction layer in the gated routing network integrates the aforementioned multi-dimensional feature inputs and outputs a network routing strategy. Thus, by incorporating computational resource constraints into the network routing decision process, this embodiment can reduce the number of parameters and inference latency through single-path hard gating when device computing power is limited. When computing power is sufficient or the risk of extreme rainfall is high, multi-path fusion maintains the accuracy of the rainstorm threshold probability output and quantile uncertainty estimation, achieving a balance between computational efficiency and forecast accuracy.

[0048] This embodiment incorporates the computational resource information of rainfall forecasting equipment into the routing decision-making process, enabling the model to automatically adjust its inference path based on the equipment's actual delay budget and computing power level, generating a network routing strategy that balances meteorological conditions and computational constraints. The gated routing network combines spatially coupled spatiotemporal characteristics, multidimensional rainfall status data, forecast lead time data, and computational resource information for routing decisions. This allows the rainfall forecasting system to sensitively detect the differences between short-duration severe convection and persistent stratiform rainfall, adaptively adjusting model complexity and inference paths under different computational resource conditions. While adapting to different rainfall types, it optimizes computational efficiency and ensures the reliability of extreme rainstorm warning results.

[0049] In step S103, based on the network routing strategy, this embodiment can perform network path filtering in a preset adaptive spatiotemporal encoder. The adaptive spatiotemporal encoder includes three parallel path architectures: a Transformer path (a self-attention network architecture), a Mamba state memory path (a state space memory network architecture), and a Transformer-Mamba hybrid network architecture path combining the two. The Transformer is a self-attention-based network architecture that can efficiently compute feature weights within local time windows and spatial neighborhoods through variable-inverted data block representation and sliding window sparse attention mechanisms. This accurately captures long-distance dependencies, short-term bursts, and local spatial interactions between stations in spatiotemporal sequences. However, the computational complexity of traditional global self-attention mechanisms increases quadratically with sequence length. Mamba, a selective state space model (SSM), constructs long-term temporal state memory paths through bidirectional state scanning units, channel compression attention units, and state forgetting calibration units. It can establish long-term temporal memories and maintain macroscopic background features (such as long-duration continuous rainfall backgrounds or water vapor accumulation effects) with low computational complexity that increases linearly with time steps. Both systems can leverage their unique feature modeling and computational optimization capabilities to address two different meteorological evolution patterns: localized sudden severe convection and large-scale continuous rainfall.

[0050] In some embodiments, please refer to Figure 6 , Figure 6 This is a network structure diagram of the self-attention network and state-space memory network provided in this application, such as... Figure 6As shown, spatially coupled spatiotemporal features are processed through two parallel main paths. In the Transformer path on the left, the input features are first rearranged using a variable-inversion patch representation unit with the station-variable dimension as the correlation modeling object. Then, the dependencies within the local temporal, spatial neighborhood, and global memory range are extracted by a sliding window sparse attention unit. Finally, the self-attention features (i.e., Transformer path features) that can capture short-term abrupt changes and local station interactions are output through a feedforward network layer. In the Mamba state memory path on the right, the input features are first extracted by a bidirectional state scanning unit to obtain forward and backward long-term dependent states. Then, the interaction relationship between different meteorological variables and stations is established by a channel compression attention unit. Finally, combined with auxiliary control signals including rainfall type and forecast lead time, the retention ratio of historical states is dynamically adjusted by a state forgetting calibration unit, thereby outputting state memory spatial features (i.e., Mamba path features) that are good at modeling long-term memory and persistent rainfall backgrounds.

[0051] Specifically, this embodiment selects at least one target network from the three network paths mentioned above for inference based on network routing strategies. For example, it may select a single Transformer path or a Transformer-Mamba hybrid path, or simultaneously select a Transformer path and a Mamba state memory path. These examples do not constitute a limitation of this embodiment. The selected target network receives spatiotemporal encoded features and utilizes the advantages of its respective architecture (such as self-attention networks focusing on capturing short-term mutations and local spatial interactions, and state space memory networks focusing on extracting long-term temporal background dependencies) to generate its corresponding target network output results in parallel.

[0052] In some embodiments, please refer to Figure 7 The network routing strategy includes a first weight corresponding to the self-attention network, a second weight corresponding to the state space memory network, and a third weight corresponding to the hybrid self-attention and state space network. The calculated resource information includes the equipment delay budget corresponding to the rainfall forecasting equipment. Based on the network routing strategy, at least one target network is selected from the preset self-attention network, state space memory network, and hybrid self-attention and state space network, including: Step S701: Determine the maximum weight value among the first weight, the second weight, and the third weight; Step S702: When the maximum weight value is not less than the preset hard gating threshold and the device latency budget is lower than the preset latency budget threshold, the corresponding target network is determined based on the maximum weight value in the preset self-attention network, state space memory network and self-attention and state space hybrid network.

[0053] In this embodiment, the network routing policy is presented in the form of a three-dimensional routing vector, for example... The three-dimensional routing vector contains the first weight. (Corresponding to self-attention networks, i.e., the Transformer path), second weight (Corresponding to state-space memory networks, i.e., Mamba paths), and the third weight. (Corresponding to a hybrid network of self-attention and state space, i.e., a Transformer-Mamba hybrid path). Weight coefficients participate in the decision-making process for the activation states of subsequent network architecture paths, and are also used to determine the output feature fusion ratio for each selected target network. Computational resource information includes the equipment delay budget corresponding to the rainfall forecasting equipment. The equipment delay budget, as a hard constraint, participates in inference decisions along with the network routing strategy.

[0054] In step S701, as described above, the first weight is the gated weight corresponding to the self-attention network (i.e., the Transformer path), the second weight is the gated weight corresponding to the state-space memory network (i.e., the Mamba state-space memory path), and the third weight is the gated weight corresponding to the hybrid self-attention and state-space network (i.e., the Transformer-Mamba hybrid path). The first, second, and third weights can be normalized first, and then the maximum weight value under the current rainfall state and computational resource constraints can be selected through numerical comparison. The maximum weight value reflects the model's preference for one of these three different network architecture paths under the current feature input.

[0055] In step S702, this embodiment performs single-path hard-gating selection. Specifically, it simultaneously performs two conditional judgments: comparing whether the maximum weight value is not less than a preset hard-gating threshold, where the preset hard-gating threshold is a preset confidence boundary used to measure the model's certainty towards a single network architecture. When the maximum weight value reaches or exceeds the preset hard-gating threshold, it indicates that a certain backbone path has a significant advantage under the current meteorological conditions and is suitable as a single target network for inference; and simultaneously evaluating whether the equipment delay budget of the rainfall forecasting equipment is lower than a preset delay budget threshold, where the preset delay budget threshold represents the maximum tolerable inference time overhead under the current scenario. When the equipment delay budget is lower than this threshold, it indicates that the equipment has real-time requirements and needs to reduce the number of computational paths to reduce inference latency. The single-path inference mode is adopted only when the above conditions are met simultaneously (i.e., when the maximum weight value is not less than the preset hard-gating threshold and the equipment delay budget is lower than the preset delay budget threshold).

[0056] Then, based on the maximum weight value, among the preset self-attention network, state space memory network, and self-attention and state space hybrid network, the network corresponding to the maximum weight value is determined as the only target network (for example, if the maximum weight value is the first weight, then the target network is only the self-attention network), and in this rainfall forecasting task, the other two unselected network paths are actively put into hibernation or blocked.

[0057] This embodiment employs a dual hard-gating mechanism to endow the model with dynamic pruning and adaptive degradation inference capabilities. When faced with device computing power bottlenecks, it combines the model's confidence level in identifying specific rainfall patterns to cut redundant parallel network branches, allocating limited computing resources to the most efficient single-target network. In this way, this embodiment avoids the enormous computational overhead and storage consumption caused by multi-path parallelism, reduces inference latency, and achieves a balance between model prediction accuracy and hardware computing efficiency.

[0058] In some embodiments, selecting at least one target network from a preset self-attention network, state-space memory network, and hybrid self-attention and state-space network based on a network routing strategy includes: Obtain meteorological risk indicators for the target area; When at least one of the following conditions is met: the maximum weight value is less than the preset hard gate threshold, the meteorological risk index exceeds the preset meteorological risk threshold, and the third weight exceeds the preset mixed threshold, at least two target networks are selected from the preset self-attention network, state space memory network, and self-attention and state space hybrid network based on the network routing strategy. Each target network is invoked to generate the corresponding target network output based on the spatial coupling spatiotemporal features; Adaptive spatiotemporal coding features are generated based on the target network output, including: The adaptive spatiotemporal coding features are obtained by weighted fusion of the target network output and the corresponding weights.

[0059] In this embodiment, meteorological risk indicators for the target area are obtained. These indicators measure the probability and difficulty of predicting extreme weather or complex rainfall events in the current meteorological environment. The meteorological risk indicators can be obtained by extracting a global statistical representation of spatially coupled spatiotemporal features through a global spatiotemporal pooling layer, and by comprehensively calculating features such as historical rainfall intensity, historical rainfall intensity change rate, continuous rainfall duration, continuous dry season duration, radar echo gradient, and previous cumulative rainfall received by the rainfall status embedding layer. The meteorological risk indicators include at least one of the following: a rainstorm risk indicator, a high uncertainty indicator, and an inter-site propagation intensity indicator. Specifically, the rainstorm risk indicator characterizes the probability of heavy rainfall or severe convective weather; the high uncertainty indicator characterizes the confidence level of the current meteorological state prediction results; and the inter-site propagation intensity indicator characterizes the degree of mutual influence between different meteorological nodes during the rainfall process.

[0060] When at least one of the following conditions is met—the maximum weight value being less than a preset hard gate threshold, the meteorological risk indicator exceeding a preset meteorological risk threshold, and the third weight exceeding a preset mixing threshold—at least two target networks are selected from the preset self-attention network, state-space memory network, and self-attention and state-space hybrid network based on the network routing strategy. Specifically, if the maximum weight value is less than the preset hard gate threshold, it indicates that the current rainfall characteristics are complex, and no single network structure can dominate. If the meteorological risk indicators such as rainstorm risk and high uncertainty obtained in the aforementioned steps exceed the preset meteorological risk threshold, or the third weight exceeds the preset mixing threshold, it indicates that there is a risk of heavy rainfall in the current environment, or that the feature information extracted by the hybrid network is indispensable. As long as any of the above three triggering conditions is met, the network routing strategy will determine that the current meteorological process is not suitable for independent reasoning by a single-path model, thereby triggering a multi-path parallel mode and simultaneously selecting at least two target networks from the above three preset network architectures. Specifically, the network selection process determines the path combination participating in the fusion based on the relative magnitudes of the first, second, and third weights. If the weight of one network is extremely small relative to the other two networks (e.g., ...), the network routing strategy will select the target network. This indicates that the network (the state-space memory network in this example) contributes almost nothing to the extraction of current rainfall features. In this case, these tiny weights can be cleared or discarded, thus preventing the network from being invoked. If the three weights are relatively balanced, and none are small enough to be safely removed, then a three-path fusion involving all three networks is triggered.

[0061] Furthermore, each target network is invoked to generate its corresponding output based on spatially coupled spatiotemporal features. Then, the independently extracted target network outputs are weighted using the routing weights corresponding to each target network, and the weighted results are then fused to obtain the adaptive spatiotemporal coding features. For example, using a three-path model, assuming the target network outputs for the self-attention network, state-space memory network, and hybrid self-attention and state-space network are HT, HM, and HF respectively, the adaptive spatiotemporal coding features can be obtained through... Result. It should be noted that in single-path inference mode, the network processing result can be output directly without weighting using the corresponding weight coefficients.

[0062] This embodiment breaks through the technical limitations of traditional models that rely on a single network architecture in rainfall forecasting, solving the problem of insufficient adaptability of a single network structure when facing long-tailed rainfall distributions. When facing forecast scenarios with high risk of localized severe convection or heavy rainfall, this embodiment can adaptively abandon single-path hard gating, triggering a multi-type network fusion mechanism. It fully utilizes the modeling capabilities of self-attention networks for short-term mutations and local station interactions, the modeling capabilities of state-space memory networks for long-term memory and persistent rainfall backgrounds, and the risk preservation capabilities of hybrid networks for heavy rainfall samples and high-uncertainty samples. This maximizes the preservation of the response and expression capabilities of different architectures to extreme rainfall samples and long-term and short-term dependencies, avoiding the risk information loss problem caused by single-path feature compression. While rationally allocating equipment computing power, it improves the accuracy of multi-site hourly rainfall forecasts and the reliability of early warnings for extreme rainstorms.

[0063] In some embodiments, please refer to Figure 8 , Figure 8 This is a structural diagram of the spatiotemporal coding model and gated routing network provided in this application. Figure 8 This application illustrates the dual-backbone backbone and gated routing core network architecture. In the data flow direction ( Figure 8 As shown by the solid line in the middle, spatially coupled spatiotemporal features serve as a common input, entering three parallel backbone paths: the Transformer path (self-attention network), the Mamba state memory path (state space memory network), and the Transformer-Mamba hybrid path (a hybrid network of self-attention and state space). Simultaneously, spatial structure and environmental information serve as conditional control signals (…). Figure 8As shown by the dashed line, the effects are applied to the three paths mentioned above and the gated routing network (i.e., the meteorological state-computing power dual-constraint gated router). The spatially coupled spatiotemporal features are processed by spatial dimension pooling, temporal dimension pooling and convolutional coding to extract the spatial propagation state, temporal evolution state and local environmental response features of the current region, forming spatial structure and environmental information. The spatial structure and environmental information are used as conditional control signals to assist in the path selection and weighted fusion of the Transformer path, Mamba state memory path, Transformer-Mamba hybrid path and meteorological state-computing power dual-constraint gated router.

[0064] After processing each path, the Transformer path outputs the feature HT, the Mamba state memory path outputs the feature HM, and the Transformer-Mamba hybrid path outputs the feature HF. The gated routing network then combines spatial structure, meteorological conditions, and device computing power constraints to generate a vector containing the gating weights or routing coefficients corresponding to the three paths. Finally, the weighted fusion layer receives the weight control signals from the gated routing network and the output characteristics of the three paths, and then performs fusion according to either a hard gating selection rule or a soft weighted fusion rule (expressed in the formula as follows). The system dynamically selects or weights HT, HM, and HF, ultimately outputting adaptive spatiotemporal coding features. It's important to note that the gated routing network is the true decision-making network, responsible for comprehensively evaluating spatial structure, meteorological conditions, and computational resource constraints to generate a three-mode routing vector containing the gating weights corresponding to the three paths. The weighted fusion layer itself does not have decision-making capabilities; it merely acts as an execution mechanism, receiving weight control signals from the router and performing actual feature truncation or matrix weighted combination operations on the target network output according to the hard gating selection rules or soft weighted fusion rules set in the decision-making process.

[0065] In some embodiments, please refer to Figure 9 The self-attention and state-space hybrid network includes a feature extraction module, a residual correction module, and a risk-preserving fusion module. The method provided in this application also includes: Step S901: When the target network is a hybrid network of self-attention and state space, the feature extraction module is invoked to generate self-attention features and state memory space features based on the spatially coupled spatiotemporal features, respectively. Step S902: Call the residual correction module to generate corresponding feature difference compensation terms based on self-attention features and state memory space features; Step S903: The risk-preserving fusion module performs feature fusion on the self-attention features and state memory space features based on the feature difference compensation term to generate the corresponding target network output. The risk-preserving fusion module is used to increase the weight of the self-attention and state space hybrid network when heavy rainfall samples or high uncertainty samples are identified.

[0066] In step S901, the feature extraction module of the self-attention and state-space hybrid network is invoked, taking the spatially coupled spatiotemporal features as input. The feature extraction module employs a dual-branch parallel structure: one branch uses a self-attention mechanism to capture short-term mutations and local site interaction information to generate self-attention features; the other branch uses a state-space sequence scanning mechanism to extract long-term memory and persistent background information to generate state-memory space features.

[0067] In step S902, the residual correction module is invoked to process the self-attention features and state-space memory features extracted in the previous step. Since the self-attention mechanism focuses on local extrema and instantaneous abrupt changes in meteorological states, while the state-space memory mechanism focuses on global evolution trends and long-term smoothness, the features extracted by the two mechanisms have inherent architectural differences in data distribution and representational emphasis. The residual correction module can learn and quantify the bias between these two heterogeneous feature representations, thereby calculating the corresponding feature difference compensation term. The feature difference compensation term is an adjustment parameter matrix used for feature alignment and dynamic error compensation. It compensates for the shortcomings of the self-attention mechanism in long-term dependency modeling and the state-space memory mechanism in short-term local interaction modeling by calculating the residual information between local abrupt change features and long-term memory features. This ensures that when these two features are subsequently fused, key warning signals will not cancel each other out or features will be abruptly spliced ​​together, guaranteeing the integrity of information transmission.

[0068] In step S903, the risk-preserving fusion module first superimposes the feature difference compensation term onto at least one of the self-attention feature or the state memory space feature to correct the bias between the two features; then, it performs a fusion operation on the corrected self-attention feature and the state memory space feature to generate the target network output result.

[0069] The risk-preserving fusion module identifies whether the current sample is a heavy rainfall sample or a high-uncertainty sample during the fusion process. Heavy rainfall samples are those with hourly rainfall exceeding a preset threshold, while high-uncertainty samples are those with model prediction confidence below a preset threshold. In real-world weather forecasting scenarios, heavy rainfall samples are highly destructive and sudden, while high-uncertainty samples mean greater prediction difficulty and a wider potential range of fluctuations. When the risk-preserving fusion module identifies the current input as belonging to either of these high-risk categories at the feature level, it can proactively increase the weight allocation of the self-attention and state-space hybrid network, giving the output of the hybrid path a greater weight in these key samples. This retains more comprehensive risk information and avoids the problem of underreporting extreme rainstorms caused by single-path compression or simple averaging fusion.

[0070] This embodiment addresses the problem that a single model backbone cannot simultaneously address long-term and short-term dependencies when dealing with complex, long-tailed rainfall processes. It achieves smooth alignment and complementary advantages between the self-attention mechanism and the state memory mechanism through feature difference compensation terms. Simultaneously, a risk-preserving fusion module is used to specifically enhance the weights of samples experiencing heavy rainfall and high uncertainty. This improves the sensitivity to capturing sudden rainstorms and the accuracy of early warnings while adapting to lightweight design and computational constraints.

[0071] In step S104, the outputs of one or more target networks are adaptively integrated to produce the final weather forecast output. When using a single-path inference mode, the target network outputs generated by the target network can be used as adaptive spatiotemporal coding features. When using a multi-path inference mode, as described above, the target network outputs can be weighted and fused using the gating weights corresponding to each target network to obtain adaptive spatiotemporal coding features. Then, this application introduces a hybrid precision optimization process (which can be implemented by a lightweight constraint layer or an independently configured hybrid precision computation unit). For the adaptive spatiotemporal coding features, relatively low numerical precision is intelligently configured during feature mapping, low-rank matrix factorization, or channel pruning operations in the intermediate layers to reduce computational load, while higher numerical precision is configured for subsequent computations directly related to the final prediction result to ensure numerical stability. Thus, the features after hybrid precision optimization are finally input to the joint prediction output layer to complete numerical regression and classification mapping, ultimately outputting hourly rainfall forecast values ​​for each meteorological station in the target area within a preset future time range.

[0072] Specifically, in this embodiment, the hybrid precision lightweight constraint layer is placed after the adaptive spatiotemporal encoder. At the numerical computation level, it is independent of the network structure and feature modeling logic of the front-end multi-source feature extraction, spatial graph coupling, and gated routing decision. It primarily uses a four-level joint compression system consisting of multi-head attention sparse pruning, model hierarchical parameter distillation, low-rank matrix factorization, and feature channel pruning to calculate and optimize the adaptive spatiotemporal encoded features. Specifically, multi-head attention sparse pruning selects and retains attention heads based on their contribution, attention entropy, gradient sensitivity, and extreme rainfall response intensity; feature channel pruning performs structured pruning based on activation intensity, gradient contribution, cross-site propagation contribution, and rainstorm sample response intensity; model hierarchical parameter distillation is used to distill the feature representation, routing distribution, and output probability distribution of the teacher model into the student model; and low-rank matrix factorization is used to decompose the attention projections. The model employs core feature matrices such as shadow, feedforward network, gating, and output mapping. Based on this, the constraint layer utilizes its internal mixed-precision computation unit to perform low-rank matrix decomposition calculations after adaptive spatiotemporal coding feature input, intermediate feature mapping calculations after feature channel pruning, intermediate feature calculations of the student model after hierarchical distillation, and output-related calculations of the joint prediction output layer. It is configured with at least two differentiated numerical precisions, including FP32, FP16, BF16, and INT8. This ensures that calculations directly related to the final meteorological forecast output use relatively high numerical precision, while lightweight intermediate process calculations use relatively low numerical precision while meeting preset error tolerance conditions. This significantly reduces the number of parameters, computational complexity, storage footprint, and edge inference latency when adapting the model to edge devices, while maintaining the stability of the rainstorm threshold probability output, quantile uncertainty estimation, and rainfall prediction results.

[0073] Finally, the adaptive spatiotemporal coding features are input into the prediction output layer, which includes a rainfall regression head, a rainstorm level classification head, and a quantile uncertainty head. This layer is used to predict rainfall forecasts for each meteorological station within a preset future time period (i.e., the next K hours). The rainfall regression head outputs the predicted hourly rainfall for each station within the preset future time period. The rainstorm level classification head outputs the probability that each station will exceed a preset rainfall threshold within the preset future time period. The quantile uncertainty head outputs the preset quantile rainfall estimate corresponding to the forecast lead time. The preset rainfall threshold includes at least one of 20 mm / h, 30 mm / h, and 50 mm / h. Therefore, the rainfall forecast results not only include the specific hourly rainfall prediction values ​​for each station output by the regression network branch, but also the probability that the future rainfall for each station will exceed the extreme rainfall threshold (such as rainstorm level) output by the classification network branch, as well as the corresponding preset quantile uncertainty estimates. In this way, station-by-station and time-by-time rainfall forecast results and early warning results for extreme rainstorms can be generated based on the rainfall prediction values, quantile uncertainties and rainstorm threshold probabilities, thus completing hourly refined rainfall forecasts and early warnings for extreme rainstorms for multiple stations and multiple time periods.

[0074] In some embodiments, please refer to Figure 10 , Figure 10 This is another flowchart of the rainfall forecasting method with fused and mixed accuracy provided in this application. (See diagram below.) Figure 10 As shown, the original input tensor sequentially passes through a multi-source feature encoding module, a multi-scale temporal patch partitioning module, and a structure-aware dynamic spatial graph coupling module to generate spatially coupled spatiotemporal features. Subsequently, these features are fed into an adaptive spatiotemporal encoder, which then enters in parallel through its internal Transformer path (self-attention network), Mamba state memory path (state space memory network), and Transformer-Mamba hybrid path (self-attention and state space hybrid network). Simultaneously, a gated routing network generates routing coefficient signals to guide the weighted fusion layer in selecting or combining features from these three paths. The fused features then enter a four-level lightweight constraint layer (shown as an overall process module) for computation and parameter optimization. Finally, the joint prediction output layer performs multi-task output to obtain the final rainfall forecast and rainstorm warning results.

[0075] In some embodiments, the application of the rainfall forecasting method to multi-site refined forecasting within a province or urban agglomeration is illustrated as an example. 200 to 1000 automatic weather stations are selected as spatial nodes, and hourly multi-source meteorological data is collected as the input sequence. The input tensor dimension is set to B×T×N×C, where the batch size B is 16, the historical input time step T is 24, the number of nodes N is 512, and the number of feature channels C is 12. Based on the meteorological input of the past 24 hours, the hourly rainfall of each station is predicted for the next 1 hour, 3 hours, 6 hours, and 12 hours, and the threshold probabilities and quantile uncertainties of rainfall exceeding 20 mm / h, 30 mm / h, and 50 mm / h are output. The output tensor dimension is set to B×K×N×Q, where the forecast lead time K is 6 and the number of output channels Q is 5, thereby achieving hourly refined rainfall forecasting and extreme rainstorm warnings for the target area.

[0076] Furthermore, this embodiment provides specific structural parameters for the rainfall forecast model. The output dimensions of each branch of the multi-source feature encoding module are set to 64, 32, 16, 16, and 16, respectively, and after concatenation, they are mapped to a unified hidden dimension of 128. The multi-scale temporal patch is divided into three scales: short-term (length 3, step size 1), medium-term (length 6, step size 3), and long-term (length 12, step size 6). In terms of the backbone network, the structure-aware dynamic spatial graph coupling module adopts a two-layer relational graph convolution with a hidden dimension of 128. The Transformer path contains four encoding layers with four attention heads. The Mamba state memory path contains four state space memory units with a state dimension of 64. The meteorological state-computing power dual-constraint gated router adopts a two-layer perceptron structure with a hidden dimension of 64. Through the above specific parameter configuration, a dual-backbone prediction network that efficiently captures long and short-term dependencies and multi-site spatial coupling is constructed.

[0077] The multi-site hourly rainfall forecast model in this application employs an adaptive gradient optimization algorithm during the training phase, by setting an initial learning rate... to The uncompressed teacher models with batch sizes of 8 to 32 and training rounds of 50 to 200 are initially trained. Subsequently, the feature representations, routing distributions, and output probability distributions of the teacher models are distilled into lightweight student models using a hierarchical distillation technique. During model training, in order to comprehensively consider prediction accuracy, sensitivity to extreme weather, and multi-task collaborative optimization, this application adopts a specific joint loss function for end-to-end guidance. The joint loss function includes at least three of the following: rainfall regression loss, extreme rainfall weighted loss, rainstorm level classification loss, quantile consistency loss, spatial neighborhood consistency loss, gated load balancing loss, and lightweight regularization loss. Through the collaborative constraints of multi-source loss terms, the joint loss function not only enables the rainfall regression head to accurately output the hourly rainfall prediction values ​​of each station within the future preset time period, but also drives the rainstorm level classification head to accurately predict the probability of each station exceeding the preset rainfall threshold in the future. The quantile uncertainty head outputs the preset quantile rainfall estimate corresponding to the forecast lead time, thereby effectively solving the problem of traditional loss functions being biased towards samples with no rain or light rain, and improving the model's sensitivity to capturing extreme weather samples such as heavy rainfall and its early warning capability.

[0078] In this embodiment, after receiving meteorological data from multiple stations in real time, a meteorological state-computing power dual-constraint gating router combines the current sample's rainfall evolution status with the device's computing power constraints to generate a routing vector containing the weights of three backbone paths, and then normalizes it. During inference and decision-making, the maximum routing weight is compared with the preset hard gating threshold, the device delay budget, and the rainstorm risk index. If the current local strong convection is significant, has strong propagation, or has high uncertainty, multi-path weighted fusion is automatically performed to avoid the loss of risk information. If it is characterized by long-duration stable rainfall and the device delay is limited, single-path hard gating inference is initiated, thereby adaptively finding the optimal solution between computing power overhead and early warning accuracy.

[0079] This application verifies the superior performance of the rainfall forecasting method through specific experimental data and comparative tests. In a specific scenario, the model uses 512 automatic weather stations in the target area as spatial nodes, collecting hourly multi-source meteorological data from the past 24 hours, including hourly rainfall, temperature, and radar combined reflectivity, across 12 feature channels. This data is used to regress and predict future multi-time-dependent station-specific rainfall, and to classify and estimate the probability of heavy rainfall exceeding 20 mm / h, 30 mm / h, and 50 mm / h, as well as quantile uncertainty. Internally, the model projects the hidden dimension to 128, divides the unified hidden features into three scales of multi-scale temporal patches, and constructs a dual-backbone prediction network using two layers of relational graph convolution, four layers of Transformer encoding layers, and four layers of Mamba state space memory units. This results in a 1×10⁻⁶... -4 Up to 5×10 -4After training for 50 to 200 epochs with an initial learning rate, hybrid precision joint compression is performed by setting an attention head retention ratio of 50% to 75%, a low-rank matrix factorization rank of 25% to 50%, and a channel pruning ratio of 20% to 40%. Actual results show that, compared to using only a single global Transformer path without gated routing and sparse compression, this invention, through sliding window sparse attention, dual-constraint gated routing, and four levels of lightweight constraints, significantly reduces the number of model parameters by approximately 40% to 70% and significantly shortens inference latency by approximately 30% to 60%. Furthermore, compared to using only a single Mamba state memory path without a structure-aware dynamic spatial graph and risk-preserving hybrid path, this application successfully improved the early warning index by 6% to 15% in the heavy rainfall threshold early warning task. This quantitatively demonstrates that while significantly compressing the model size and reducing deployment computational overhead, this application can effectively avoid missing extreme rainstorm samples, while simultaneously achieving lightweight, low-latency inference on the edge side and high-precision rainfall early warning.

[0080] In some embodiments, this application also provides a rainfall forecasting system based on multi-architecture adaptation and lightweight design. The system sequentially includes: a data preprocessing module responsible for anomaly removal and long-tail transformation; a multi-source feature encoding module for extracting multi-dimensional features; a multi-scale patch partitioning module for dividing time series; a structure-aware dynamic spatial graph coupling module that integrates causal environment and wind direction propagation; a dual-backbone adaptive spatiotemporal encoding module containing three paths, including Transformer and Mamba; a lightweight constraint module that performs four-level joint compression; and a prediction output and early warning release module that outputs rainfall and threshold probabilities. The dual-backbone module is controlled by the routing vector output by the dual-constraint gated router. When the maximum weight satisfies the hard gate and the risk index does not exceed the threshold, a single path is executed. When the mixed threshold or risk threshold is reached, multi-path adaptive weighted fusion is executed, thus realizing a complete closed-loop architecture for a high-precision rainfall forecasting system.

[0081] Please see Figure 11 This application embodiment also provides a rainfall forecasting device 1100 with fused and mixed accuracy, which can implement the above-mentioned rainfall forecasting method with fused and mixed accuracy. The rainfall forecasting device 1100 with fused and mixed accuracy includes: The acquisition unit 1110 is used to acquire historical meteorological data and rainfall status data from multiple meteorological stations within the target area, and to acquire forecast lead time data for the target area. The first generation unit 1120 is used to generate spatiotemporal coding features based on historical meteorological data, and call a pre-trained gated routing network to generate a network routing strategy based on the spatiotemporal coding features, rainfall status data and forecast lead time data. The second generation unit 1130 is used to select at least one target network from the preset self-attention network, state space memory network and self-attention and state space hybrid network based on the network routing strategy, and call the target network to generate the corresponding target network output result based on the spatiotemporal coding features. The third generation unit 1140 is used to generate adaptive spatiotemporal coding features based on the output results of the target network, perform mixed precision optimization on the adaptive spatiotemporal coding features to obtain mixed precision optimization results, and predict and generate rainfall forecast results for each meteorological station within a preset time period based on the mixed precision optimization results.

[0082] The specific implementation of this fusion-mixed accuracy rainfall forecasting device is basically the same as the specific implementation of the above-described fusion-mixed accuracy rainfall forecasting method, and will not be repeated here.

[0083] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned method for fusion and mixing precision rainfall forecasting. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0084] Please see Figure 12 , Figure 12 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 1201 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 1202 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1202 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1202 and is called and executed by the processor 1201 to execute the fusion and mixing accuracy rainfall forecasting method of the embodiments of this application. The input / output interface 1203 is used to implement information input and output; The communication interface 1204 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 1205 transmits information between various components of the device (e.g., processor 1201, memory 1202, input / output interface 1203, and communication interface 1204); The processor 1201, memory 1202, input / output interface 1203 and communication interface 1204 are connected to each other within the device via bus 1205.

[0085] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for fusion and mixing precision rainfall forecasting.

[0086] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0087] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0088] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0089] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0090] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0091] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0092] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0093] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0094] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0095] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0096] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0097] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A rainfall forecasting method that integrates and blends different levels of accuracy, characterized in that, The method includes: Historical meteorological data and rainfall status data from multiple meteorological stations within the target area are obtained, along with forecast lead time data for the target area. Spatiotemporal coding features are generated based on the historical meteorological data, and a pre-trained gated routing network is invoked to generate a network routing strategy based on the spatiotemporal coding features, the rainfall status data, and the forecast lead time data. Based on the network routing strategy, at least one target network is selected from the preset self-attention network, state space memory network, and self-attention and state space hybrid network, and the target network is called to generate the corresponding target network output result based on the spatiotemporal coding features; Based on the output of the target network, an adaptive spatiotemporal coding feature is generated. The adaptive spatiotemporal coding feature is then optimized for mixed precision to obtain a mixed precision optimization result. Based on the mixed precision optimization result, a rainfall forecast result for each of the meteorological stations within a preset time period is predicted and generated.

2. The method according to claim 1, characterized in that, The process of invoking a pre-trained gated routing network to generate a network routing strategy based on the spatiotemporal coding features, the rainfall status data, and the forecast lead time data includes: Geographic and meteorological correlation factors among the multiple meteorological stations are obtained, and static adjacency graphs, dynamic adjacency graphs, and causal environment graphs are constructed based on the geographic and meteorological correlation factors. A time-varying spatial graph is generated based on the static adjacency graph, the dynamic adjacency graph, and the causal environment graph. The spatiotemporal coding features are then spatially coupled based on the time-varying spatial graph to generate spatially coupled spatiotemporal features. The pre-trained gated routing network is invoked to generate a network routing strategy based on the spatially coupled spatiotemporal characteristics, the rainfall status data, and the forecast lead time data.

3. The method according to claim 2, characterized in that, The process of invoking a pre-trained gated routing network to generate a network routing strategy based on the spatially coupled spatiotemporal features, the rainfall status data, and the forecast lead time data includes: Obtain computational resource information for rainfall forecasting equipment; The pre-trained gated routing network is invoked to generate a network routing strategy based on the computing resource information, the spatial coupling spatiotemporal characteristics, the rainfall status data, and the forecast lead time data.

4. The method according to claim 3, characterized in that, The network routing strategy includes a first weight corresponding to the self-attention network, a second weight corresponding to the state space memory network, and a third weight corresponding to the hybrid self-attention and state space network. The computational resource information includes the equipment delay budget corresponding to the rainfall forecasting equipment. The step of selecting at least one target network from the preset self-attention network, state space memory network, and hybrid self-attention and state space network based on the network routing strategy includes: Determine the maximum weight value among the first weight, the second weight, and the third weight; When the maximum weight value is not less than a preset hard gating threshold and the device latency budget is lower than a preset latency budget threshold, the corresponding target network is determined based on the maximum weight value among the preset self-attention network, state space memory network, and self-attention and state space hybrid network.

5. The method according to claim 4, characterized in that, The step of selecting at least one target network from a preset self-attention network, state-space memory network, and hybrid self-attention and state-space network based on the network routing strategy, and calling the target network to generate the corresponding target network output based on the spatially coupled spatiotemporal features, includes: Obtain meteorological risk indicators for the target area; When at least one of the following conditions is met: the maximum weight value is less than the preset hard gate threshold, the meteorological risk index exceeds the preset meteorological risk threshold, and the third weight exceeds the preset hybrid threshold, at least two target networks are selected from the preset self-attention network, state space memory network, and self-attention and state space hybrid network based on the network routing strategy. Each target network is invoked to generate a corresponding target network output result based on the spatial coupling spatiotemporal features; The process of generating adaptive spatiotemporal coding features based on the output of the target network includes: The adaptive spatiotemporal coding features are obtained by weighted fusion based on the output of the target network and the corresponding weights.

6. The method according to claim 4, characterized in that, The self-attention and state-space hybrid network includes a feature extraction module, a residual correction module, and a risk-preserving fusion module. The method further includes: When the target network is a hybrid network of self-attention and state space, the feature extraction module is invoked to generate self-attention features and state memory space features based on the spatially coupled spatiotemporal features, respectively. The residual correction module is invoked to generate corresponding feature difference compensation terms based on the self-attention features and state memory space features; The risk-preserving fusion module performs feature fusion on the self-attention features and the state memory space features based on the feature difference compensation term to generate the corresponding target network output result. The risk-preserving fusion module is used to increase the weight of the self-attention and state space hybrid network when heavy rainfall samples or high uncertainty samples are identified.

7. The method according to claim 1, characterized in that, The generation of spatiotemporal coding features based on the historical meteorological data includes: The historical meteorological data is encoded with continuous meteorological variables to obtain continuous meteorological variable encoding features, and the historical meteorological data is encoded with station static attributes to obtain station static attribute encoding features. The historical meteorological data is time-cycle encoded to obtain time-cycle encoding features, and the historical meteorological data is rainfall history state encoded to obtain rainfall history state encoding features. The historical meteorological data is encoded with forecast lead time to obtain forecast lead time coding features; A unified hidden feature is generated based on the continuous meteorological variable coding features, the station static attribute coding features, the time period coding features, the rainfall historical state coding features, and the forecast lead time coding features. The unified hidden feature is then divided into multi-scale time series, and the multi-scale time series division results are encoded with time location, station location, scale type, and variable type to obtain the corresponding spatiotemporal coding features.

8. A rainfall forecasting device with fusion and hybrid accuracy, characterized in that, The device includes: The acquisition unit is used to acquire historical meteorological data and rainfall status data from multiple meteorological stations within the target area, and to acquire forecast lead time data for the target area. The first generation unit is used to generate spatiotemporal coding features based on the historical meteorological data, and to call a pre-trained gated routing network to generate a network routing strategy based on the spatiotemporal coding features, the rainfall status data, and the forecast lead time data. The second generation unit is used to select at least one target network from the preset self-attention network, state space memory network and self-attention and state space hybrid network based on the network routing strategy, and call the target network to generate the corresponding target network output result based on the spatiotemporal coding features. The third generation unit is used to generate adaptive spatiotemporal coding features based on the output results of the target network, perform mixed precision optimization on the adaptive spatiotemporal coding features to obtain mixed precision optimization results, and predict and generate rainfall forecast results for each of the meteorological stations within a preset time period based on the mixed precision optimization results.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the rainfall forecasting method with fusion and mixing accuracy as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the rainfall forecasting method with fusion and mixing accuracy as described in any one of claims 1 to 7.