A method for retrieving similar weather data based on physically aligned fingerprints

By employing a physically aligned fingerprint-based similar weather retrieval method, which utilizes physically consistent dual-view contrast learning and fingerprint generation models, the method addresses the issues of insufficient efficiency and scalability in existing technologies, achieving high-accuracy similar weather retrieval.

CN121561165BActive Publication Date: 2026-04-03NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-22
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing similar weather retrieval methods cannot meet the efficiency and scalability requirements of practical applications, and their retrieval accuracy is low, failing to effectively capture similarities on large-scale datasets spanning multiple years, multiple variables, and multiple regions.

Method used

A similar weather retrieval method based on physical alignment fingerprints is adopted. By acquiring fingerprint database and spatiotemporal sequence data of target meteorological field, physical consistency dual-view comparison learning is performed to generate physical augmented dual-view results of scalar field and vector field. Then, a query fingerprint is generated using a trained fingerprint generation model to perform fingerprint retrieval to find similar weather.

Benefits of technology

It improves the accuracy of similar weather retrieval, reduces false positives and false negatives, enhances robustness to phase shifts and physical inconsistencies, and supports efficient retrieval across multiple variables and time periods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121561165B_ABST
    Figure CN121561165B_ABST
Patent Text Reader

Abstract

This application discloses a similar weather retrieval method based on physically aligned fingerprints. The method acquires a pre-constructed fingerprint database and spatiotemporal sequence data of the target meteorological field corresponding to the weather to be queried. The fingerprint database is constructed by generating fingerprints from spatiotemporal sequence data of meteorological fields corresponding to multiple historical weather events. Physically consistent dual-view comparison learning is performed on the spatiotemporal sequence data of the target meteorological field to generate a first physically enhanced dual-view result corresponding to a scalar field and / or a second physically enhanced dual-view result corresponding to a vector field. The first and / or second physically enhanced dual-view results are input into a trained fingerprint generation model to obtain the query fingerprint. Multiple fingerprints similar to the query fingerprint are retrieved from the fingerprint database to obtain fingerprint retrieval results. Based on the fingerprint retrieval results, multiple corresponding target historical weather events are found, and these multiple target historical weather events are used as similar weather retrieval results. This application can improve the accuracy of similar weather retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of meteorological forecasting technology, and in particular to a similar weather retrieval method based on physically aligned fingerprints. Background Technology

[0002] Similarity retrieval is a core task in Earth science applications: given a spatiotemporal sequence, it requires rapidly locating the most similar historical events from massive forecast and reanalysis datasets. This capability supports post-event analysis, forecast validation, model comparison, and scientific decision-making. The core challenge lies in how to achieve quantifiable similarity capture on large-scale datasets spanning multiple years, multiple variables, and multiple regions, encompassing both numerical accuracy and structural characteristics.

[0003] Despite the significant importance of similar weather retrieval, research directly addressing this issue remains relatively limited. Early explorations focused on application-driven approaches, while most subsequent studies have processed remote sensing imagery from a computer vision perspective, prioritizing visual similarity over the similarity of meteorological processes. Although some systems are designed for specific scenarios, significant gaps remain in constructing physical similarity metrics, aligning learned embeddings with real-world spatial errors, and ensuring system-level scalability.

[0004] The core challenges of this task can be summarized in three points: First, spatiotemporal coupling is crucial—weather phenomena exhibit dynamically evolving spatial structures, and effective retrieval must consider these temporal changes, rather than treating the input as isolated 2D frames. Second, physical interpretability is key; meaningful similarities must reflect underlying meteorological processes (such as fronts, vortices, and phase relationships), rather than superficial visual similarities. Black-box metrics often fail in common time-shift scenarios such as diurnal cycles and 6-12 hour phase lags, highlighting the necessity of physics-driven methods. Third, scalability is a practical requirement. The diversity of variable types, time ranges, and geographical regions in real-world applications necessitates robust retrieval systems with generalization capabilities across these dimensions, eliminating the need for redesign for each new scenario. Therefore, existing similar weather retrieval methods often fail to meet the efficiency and scalability requirements of practical applications, and their retrieval accuracy is relatively low. Summary of the Invention

[0005] This application aims to propose a similar weather retrieval method based on physically aligned fingerprints, which can meet the needs of practical applications for efficiency and scalability, and improve the accuracy of similar weather retrieval.

[0006] In a first aspect, embodiments of this application provide a similar weather retrieval method based on physically aligned fingerprints, the method comprising:

[0007] The fingerprint database and the spatiotemporal sequence data of the target meteorological field corresponding to the weather to be queried are obtained. The fingerprint database is constructed by generating fingerprints from the spatiotemporal sequence data of meteorological fields corresponding to multiple historical weather conditions.

[0008] Physically consistent dual-view comparison learning is performed on the spatiotemporal sequence data of the target meteorological field to generate a first physically enhanced dual-view result corresponding to the scalar field and / or a second physically enhanced dual-view result corresponding to the vector field.

[0009] The first physical augmented dual-view result and / or the second physical augmented dual-view result are input into the trained fingerprint generation model to obtain the query fingerprint;

[0010] The fingerprint database is used to retrieve multiple fingerprints that are similar to the queried fingerprint to obtain fingerprint retrieval results.

[0011] Based on the fingerprint retrieval results, find the corresponding target historical weather and use the target historical weather as similar weather retrieval results.

[0012] In some implementations, the step of performing physically consistent dual-view comparison learning on the spatiotemporal sequence data of the target meteorological field to generate a first physically enhanced dual-view result corresponding to the scalar field and / or a second physically enhanced dual-view result corresponding to the vector field includes:

[0013] Obtain multiple contrast enhancement operators;

[0014] The spatiotemporal sequence data of the target meteorological field is divided into scalar field data and / or vector field data;

[0015] Multiple contrast enhancement operators are randomly selected to perform physically consistent dual-view contrast learning on the scalar field data, generating the first physically enhanced dual-view result corresponding to the scalar field.

[0016] Multiple contrast enhancement operators are randomly selected to perform physically consistent dual-view contrast learning on the vector field data, generating a second physically enhanced dual-view result corresponding to the vector field.

[0017] In some implementations, the step of inputting the first physically augmented dual-view result and / or the second physically augmented dual-view result into a trained fingerprint generation model to obtain a query fingerprint includes:

[0018] Physically consistent dual-view comparison learning is performed on the spatiotemporal sequence data of meteorological fields corresponding to multiple historical weather conditions to generate physically enhanced dual-view results corresponding to historical scalar fields and physically enhanced dual-view results corresponding to historical vector fields.

[0019] Construct distance-preserving loss function, contrastive learning loss function, and keyframe reconstruction loss function;

[0020] The total loss function is obtained by weighted summing of the distance preservation loss function, the contrastive learning loss function, and the keyframe reconstruction loss function.

[0021] Based on the physical augmented dual-view results corresponding to the historical scalar field, the physical augmented dual-view results corresponding to the historical vector field, and the total loss function, the fingerprint generation model is trained to obtain a trained fingerprint generation model.

[0022] The first and / or second physical augmentation dual-view results are input into the trained fingerprint generation model. If the spatiotemporal sequence data of the target meteorological field corresponding to the first and / or second physical augmentation dual-view results is a single variable, then the query fingerprint corresponding to the single variable is obtained. If the spatiotemporal sequence data of the target meteorological field corresponding to the first and / or second physical augmentation dual-view results is multivariate, then the fingerprints corresponding to each variable are weighted and concatenated to obtain the query fingerprint corresponding to the multivariate.

[0023] In some implementations, the construction of the distance-preserving loss function includes:

[0024] Acquire reanalysis meteorological field data and real fingerprints corresponding to the spatiotemporal sequence data of meteorological fields for multiple historical weather events;

[0025] The spatiotemporal sequence data of the meteorological fields corresponding to the multiple historical weather events are input into the fingerprint generation model to obtain the predicted fingerprint and the predicted meteorological field data.

[0026] Calculate the distance between the real fingerprint and the predicted fingerprint to obtain the Euclidean distance in the embedding space;

[0027] The root mean square error between the reanalysis meteorological field data and the predicted meteorological field data is calculated to obtain the physical spatial distance.

[0028] Based on the Euclidean distance in the embedding space and the distance in the physical space, a distance-preserving loss function is constructed.

[0029] In some implementations, the contrastive learning loss function includes:

[0030] ;

[0031] in, This represents the contrastive learning loss function. This indicates the total number of samples. Take a positive integer. Represents an exponential function. Represents the cosine similarity function. Indicates the query sample. Indicates a positive sample. Indicates a negative sample. This represents the temperature parameter.

[0032] In some implementations, the keyframe reconstruction loss function includes:

[0033] ;

[0034] in, This represents the loss function for keyframe reconstruction. , and Indicates the weighting coefficient. Indicates the reconstructed frame. Represents the original frame. Represents the gradient. Represents the structural similarity index. This represents the L1 norm.

[0035] In some embodiments, retrieving multiple fingerprints similar to the query fingerprint from the fingerprint database to obtain fingerprint retrieval results includes:

[0036] If the number of fingerprints in the fingerprint database is less than a preset threshold, the first retrieval method is selected; if the number of fingerprints in the fingerprint database is equal to or greater than the preset threshold, the second retrieval method is selected.

[0037] Using the first retrieval method or the second retrieval method, multiple fingerprints similar to the query fingerprint are retrieved from the fingerprint database, and the distance between each similar fingerprint and the query fingerprint is obtained;

[0038] Based on the distance, the multiple fingerprints are sorted to obtain fingerprint retrieval results.

[0039] Secondly, embodiments of this application also provide a similar weather retrieval system based on physically aligned fingerprints, the system comprising:

[0040] The data acquisition unit is used to acquire the constructed fingerprint database and the spatiotemporal sequence data of the target meteorological field corresponding to the weather to be queried. The fingerprint database is constructed by generating fingerprints from the spatiotemporal sequence data of meteorological fields corresponding to multiple historical weather conditions.

[0041] The contrast learning unit is used to perform physically consistent dual-view contrast learning on the spatiotemporal sequence data of the target meteorological field, and generate a first physically enhanced dual-view result corresponding to the scalar field and / or a second physically enhanced dual-view result corresponding to the vector field.

[0042] The fingerprint generation unit is used to input the first physical augmented dual-view result and / or the second physical augmented dual-view result into the trained fingerprint generation model to obtain the query fingerprint;

[0043] A fingerprint retrieval unit is used to retrieve multiple fingerprints similar to the query fingerprint from the fingerprint database to obtain fingerprint retrieval results.

[0044] The similar weather retrieval unit is used to find multiple target historical weather based on the fingerprint retrieval results, and use the multiple target historical weather as similar weather retrieval results.

[0045] Thirdly, embodiments of this application also provide an electronic device, including at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, the instructions being executed by the at least one control processor to enable the at least one control processor to perform a similar weather retrieval method based on physically aligned fingerprints as described above.

[0046] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform a similar weather retrieval method based on physically aligned fingerprints as described above.

[0047] Compared with the prior art, this application has the following beneficial effects:

[0048] This application obtains a pre-constructed fingerprint database and spatiotemporal sequence data of the target meteorological field corresponding to the weather to be queried. The fingerprint database is constructed by generating fingerprints from spatiotemporal sequence data of meteorological fields corresponding to multiple historical weather conditions. Physically consistent dual-view comparison learning is performed on the spatiotemporal sequence data of the target meteorological field to generate a first physically enhanced dual-view result corresponding to the scalar field and / or a second physically enhanced dual-view result corresponding to the vector field. The first physically enhanced dual-view result and / or the second physically enhanced dual-view result are input into a trained fingerprint generation model to obtain the query fingerprint. Multiple fingerprints similar to the query fingerprint are retrieved from the fingerprint database to obtain fingerprint retrieval results. Based on the fingerprint retrieval results, multiple corresponding target historical weather conditions are found, and these multiple target historical weather conditions are used as similar weather retrieval results. Thus, by performing physically consistent dual-view comparison learning on the spatiotemporal sequence data of the target meteorological field, it is possible to ensure that the results of the physically enhanced dual-view are in the same dynamic system state, reduce false positives or false negatives, and improve robustness to phase shifts and physical inconsistencies. Then, based on the results of the first and / or second physically enhanced dual-views, a query fingerprint is generated. Multiple fingerprints similar to the query fingerprint are retrieved from the fingerprint database, and similar weather retrieval results are obtained based on the fingerprint retrieval results. Through physically consistent fingerprint representation and enhancement strategies, the accuracy of similar weather retrieval can be improved. Attached Figure Description

[0049] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0050] Figure 1 This is a flowchart illustrating an embodiment of the similar weather retrieval method based on physically aligned fingerprints provided in this application;

[0051] Figure 2 This is a schematic diagram of the overall process of the similar weather retrieval method in the preferred embodiment of the physically aligned fingerprint-based similar weather retrieval method provided in this application;

[0052] Figure 3 This is a schematic diagram of the structure of an embodiment of the similar weather retrieval system based on physically aligned fingerprints provided in this application;

[0053] Figure 4 This is a schematic diagram of the structure of an embodiment of the electronic device provided in this application. Detailed Implementation

[0054] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0055] In the description of this application, the use of terms such as "first," "second," etc., is for the purpose of distinguishing technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.

[0056] In the description of this application, it should be understood that the orientation descriptions, such as up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0057] In the description of this application, it should be noted that, unless otherwise explicitly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.

[0058] Existing similar weather retrieval methods often fail to meet the efficiency and scalability requirements of practical applications, and their retrieval accuracy is relatively low.

[0059] To address the problems existing in the prior art, this application proposes a similar weather retrieval method based on physically aligned fingerprints.

[0060] Reference Figure 1 This application provides a schematic flowchart of a similar weather retrieval method based on physically aligned fingerprints. This method is applied to electronic devices, such as servers or mobile terminals. Figure 1 As shown, the similar weather retrieval method based on physically aligned fingerprints may include the following steps:

[0061] Step S101: Obtain the constructed fingerprint database and the spatiotemporal sequence data of the target meteorological field corresponding to the weather to be queried. The fingerprint database is constructed by generating fingerprints from the spatiotemporal sequence data of meteorological fields corresponding to multiple historical weather conditions.

[0062] Step S102: Perform physical consistency dual-view comparison learning on the spatiotemporal sequence data of the target meteorological field to generate the first physical enhancement dual-view result corresponding to the scalar field and / or the second physical enhancement dual-view result corresponding to the vector field;

[0063] Step S103: Input the first physical augmentation dual-view result and / or the second physical augmentation dual-view result into the trained fingerprint generation model to obtain the query fingerprint;

[0064] Step S104: Search the fingerprint database for multiple fingerprints that are similar to the fingerprint being searched, and obtain the fingerprint search results;

[0065] Step S105: Find multiple target historical weather data based on the fingerprint retrieval results, and use the multiple target historical weather data as similar weather retrieval results.

[0066] In this embodiment, a pre-constructed fingerprint database and spatiotemporal sequence data of the target meteorological field corresponding to the weather to be queried are obtained. The fingerprint database is constructed by generating fingerprints from spatiotemporal sequence data of meteorological fields corresponding to multiple historical weather conditions. Physically consistent dual-view comparison learning is performed on the spatiotemporal sequence data of the target meteorological field to generate a first physically enhanced dual-view result corresponding to the scalar field and / or a second physically enhanced dual-view result corresponding to the vector field. The first physically enhanced dual-view result and / or the second physically enhanced dual-view result are input into the trained fingerprint generation model to obtain the query fingerprint. Multiple fingerprints similar to the query fingerprint are retrieved in the fingerprint database to obtain fingerprint retrieval results. Multiple corresponding target historical weather conditions are found based on the fingerprint retrieval results, and these multiple target historical weather conditions are used as similar weather retrieval results. Thus, by performing physically consistent dual-view comparison learning on the spatiotemporal sequence data of the target meteorological field, it is possible to ensure that the results of the physically enhanced dual-view are in the same dynamic system state, reduce false positives or false negatives, and improve robustness to phase shifts and physical inconsistencies. Then, based on the results of the first and / or second physically enhanced dual-views, a query fingerprint is generated. Multiple fingerprints similar to the query fingerprint are retrieved from the fingerprint database, and similar weather retrieval results are obtained based on the fingerprint retrieval results. Through physically consistent fingerprint representation and enhancement strategies, the accuracy of similar weather retrieval can be improved.

[0067] The aforementioned physically aligned fingerprint can be a fingerprint that uses a fingerprint generation model to transform the spatiotemporal sequence data of the meteorological field into a fingerprint form, while maintaining alignment between the Euclidean distance in the embedding space and the RMSE in the physical space.

[0068] The above-mentioned physical consistency dual-view comparison learning of the spatiotemporal sequence data of the target meteorological field can be carried out by using multiple comparison enhancement operators to perform physical consistency dual-view comparison learning of the spatiotemporal sequence data of the target meteorological field.

[0069] The above-mentioned method of retrieving multiple fingerprints similar to the query fingerprint from the fingerprint database to obtain fingerprint retrieval results can be achieved by using multiple fingerprints similar to the query fingerprint and metadata (such as timestamps) related to each fingerprint as fingerprint retrieval results.

[0070] The above-mentioned method of finding multiple target historical weather based on fingerprint search results can be achieved by finding the corresponding target historical weather based on the timestamp in the fingerprint search results. For example, if the returned fingerprint search results contain weather times corresponding to similar fingerprints (e.g., the fingerprint search results return December 21, 2017, corresponding to the target historical weather), then similar weather data can be obtained based on that weather time (December 21, 2017).

[0071] In some implementations, physically consistent dual-view comparison learning is performed on the spatiotemporal sequence data of the target meteorological field to generate a first physically enhanced dual-view result corresponding to the scalar field and / or a second physically enhanced dual-view result corresponding to the vector field, including:

[0072] Obtain multiple contrast enhancement operators;

[0073] The spatiotemporal sequence data of the target meteorological field are divided into scalar field data and / or vector field data;

[0074] Multiple contrast enhancement operators are randomly selected to perform physically consistent dual-view contrast learning on scalar field data, generating the first physically enhanced dual-view result corresponding to the scalar field.

[0075] Multiple contrast enhancement operators are randomly selected to perform physically consistent dual-view contrast learning on vector field data, generating a second physically enhanced dual-view result corresponding to the vector field.

[0076] In this embodiment, by performing physically consistent dual-view comparison learning on scalar field data and / or vector field data in the spatiotemporal sequence data of the target meteorological field, it is possible to ensure that the physically enhanced dual-view results are in the same dynamic system state, reduce false positives or false negatives, and improve robustness to phase shifts and physical inconsistencies.

[0077] The aforementioned scalar field data may include data such as temperature and pressure.

[0078] The aforementioned vector field data may include data such as wind speed.

[0079] In some implementations, the results of a first physically augmented dual-view and / or a second physically augmented dual-view are input into a trained fingerprint generation model to obtain a query fingerprint, including:

[0080] Physically consistent dual-view comparison learning is performed on the spatiotemporal sequence data of meteorological fields corresponding to multiple historical weather conditions to generate physically enhanced dual-view results corresponding to historical scalar fields and physically enhanced dual-view results corresponding to historical vector fields.

[0081] Construct distance-preserving loss function, contrastive learning loss function, and keyframe reconstruction loss function;

[0082] The total loss function is obtained by weighted summing of the distance-preserving loss function, the contrastive learning loss function, and the keyframe reconstruction loss function.

[0083] Based on the physical augmented dual-view results corresponding to the historical scalar field, the physical augmented dual-view results corresponding to the historical vector field, and the total loss function, the fingerprint generation model is trained to obtain the trained fingerprint generation model.

[0084] The results of the first and / or second physical augmentation dual-view images are input into the trained fingerprint generation model. If the spatiotemporal sequence data of the target meteorological field corresponding to the first and / or second physical augmentation dual-view images is a single variable, the query fingerprint corresponding to the single variable is obtained. If the spatiotemporal sequence data of the target meteorological field corresponding to the first and / or second physical augmentation dual-view images is a multivariate image, the fingerprints corresponding to each variable are weighted and concatenated to obtain the query fingerprint corresponding to the multivariate image.

[0085] In this embodiment, by inputting the first and / or second physical augmented dual-view results into a trained fingerprint generation model, if the spatiotemporal sequence data of the target meteorological field corresponding to the first and / or second physical augmented dual-view results is a single variable, a query fingerprint corresponding to the single variable is obtained; if the spatiotemporal sequence data of the target meteorological field corresponding to the first and / or second physical augmented dual-view results is multivariate, the fingerprints corresponding to each variable are weighted and concatenated to obtain a query fingerprint corresponding to the multivariate. Thus, this embodiment can support the concatenation retrieval of multiple variables and ensure retrieval accuracy and stability under different configurations.

[0086] In some implementations, a distance-preserving loss function is constructed, including:

[0087] Acquire reanalysis meteorological field data and real fingerprints corresponding to the spatiotemporal sequence data of meteorological fields for multiple historical weather events;

[0088] Multiple historical weather-related spatiotemporal sequence data of meteorological fields are input into the fingerprint generation model to obtain predicted fingerprints and predicted meteorological field data;

[0089] Calculate the distance between the real fingerprint and the predicted fingerprint to obtain the Euclidean distance in the embedding space;

[0090] The root mean square error between the reanalysis meteorological field data and the predicted meteorological field data is calculated to obtain the physical spatial distance.

[0091] A distance-preserving loss function is constructed based on the Euclidean distance in the embedding space and the distance in the physical space.

[0092] In this embodiment, the similarity of weather events at the numerical error level can be expressed through physical spatial distance. Alignment between the Euclidean distance in the embedding space and the RMSE in the physical space is optimized by the goal of distance preservation, that is, by training the fingerprint generation model to make the distance in the embedding space consistent with the error in the physical space.

[0093] The aforementioned reanalysis of meteorological field data can utilize all historical meteorological observation data, and through computer models, perform "back-calculation" and "fusion" to obtain a complete, continuous, and consistent global meteorological dataset.

[0094] In some implementations, a contrastive learning loss function is constructed, including:

[0095] ;

[0096] in, This represents the contrastive learning loss function. This indicates the total number of samples. Take a positive integer. Represents an exponential function. Represents the cosine similarity function. Indicates the query sample. Indicates a positive sample. Indicates a negative sample. This represents the temperature parameter.

[0097] In this embodiment, by constructing a contrastive learning loss function, the embeddings of physically consistent views can be made similar, while irrelevant sample pairs are separated.

[0098] The positive samples mentioned above can be positive samples obtained through physical consistency dual-view comparison learning.

[0099] In some implementations, the keyframe reconstruction loss function is constructed, including:

[0100] ;

[0101] in, This represents the loss function for keyframe reconstruction. , and Indicates the weighting coefficient. Indicates the reconstructed frame. Represents the original frame. Represents the gradient. Represents the structural similarity index. This represents the L1 norm.

[0102] In this embodiment, by constructing a keyframe reconstruction loss function, structural fidelity can be guaranteed.

[0103] In some implementations, multiple fingerprints similar to the query fingerprint are retrieved from the fingerprint database to obtain fingerprint retrieval results, including:

[0104] If the number of fingerprints in the fingerprint database is less than a preset threshold, the first search method is selected; if the number of fingerprints in the fingerprint database is equal to or greater than the preset threshold, the second search method is selected.

[0105] Using either the first or second retrieval method, retrieve multiple fingerprints similar to the query fingerprint from the fingerprint database, and obtain the distance between each similar fingerprint and the query fingerprint;

[0106] Multiple fingerprints are sorted according to distance to obtain fingerprint retrieval results.

[0107] In this embodiment, the retrieval method is automatically selected based on the size of the dataset, thereby optimizing query efficiency while ensuring retrieval accuracy.

[0108] The aforementioned preset threshold can be a manually set value, which can be changed according to the actual situation. This embodiment does not impose any specific limitations.

[0109] The first and second retrieval methods described above can employ retrieval methods known to those skilled in the art (e.g., HNSW or IVFPQ index structures), and this embodiment does not specifically limit them.

[0110] To facilitate understanding by those skilled in the art, a set of preferred embodiments is provided below:

[0111] To address the problems of existing technologies, this embodiment proposes an efficient similar weather retrieval method based on physically aligned fingerprints (i.e., the SIM-Weather method). This method learns physically aligned fingerprints through a distance-preserving objective function, and the Euclidean distance and the root mean square error (RMSE) of the field space are statistically matched. For both scalar and vector variables, this embodiment designs physically consistent dual-view enhancement strategies (i.e., physically consistent dual-view contrastive learning); it uses a 3D Swin Transformer (i.e., Video Swin Transformer) combined with hierarchical temporal attention (HTA) to model spatiotemporal dependencies; and it reconstructs stable feature representations through keyframes. The resulting 256-dimensional fingerprints for each variable can be concatenated, and retrieval is achieved using a scale-adaptive approximate nearest neighbor (ANN) index (HNSW / IVFPQ), supporting fast queries without additional training. This embodiment's method was validated on the ERA5 dataset. Experiments show that the SIM-Weather method consistently outperforms existing technologies such as ClimaX, VideoMAE, and VideoSwin Transformer in terms of numerical error, relevance, and perceptual quality. The ablation experiment further verified the complementary effects of the components.

[0112] The SIM-Weather method in this embodiment transforms 24-hour 2D weather field spatiotemporal series data into compact univariate fingerprints, supporting efficient retrieval across variables and time periods. For example... Figure 2 As shown, during the training phase, two physically consistent augmented views (processing the scalar field and the vector field respectively) are generated for each input spatiotemporal sequence of meteorological field data. These two physically consistent augmented views are then input into a 3D Swin Transformer (i.e., a fingerprint generation model) embedded with a hierarchical temporal attention (HTA) module. This fingerprint generation model architecture also includes: a fingerprint head that outputs a normalized 256-dimensional embedding vector, a projection head used only for contrastive learning, and a lightweight decoder for keyframe reconstruction.

[0113] The fingerprint generation model is jointly optimized through three loss functions: 1. Distance Preservation Loss Function: aligns the embedding space distance with the physical space RMSE; 2. Contrastive Learning Loss Function: ensures that the embeddings of physically consistent views are semantically similar; 3. Keyframe Reconstruction Loss Function: maintains structural consistency.

[0114] In the inference phase, only the fingerprint header is retained: for any set of input variables, a 256-dimensional fingerprint is generated and concatenated in a fixed (optional) order, then retrieved using Approximate Nearest Neighbor (ANN). This process comprises three tightly integrated stages: fingerprint generation, index construction, and retrieval, collectively ensuring the effectiveness and scalability of the SIM-Weather method. The HTA, as a core component of the feature learning backbone, is retained throughout the entire process.

[0115] The method in this embodiment specifically includes the following:

[0116] 1. Learning through physical consistency by comparing two views.

[0117] The weak prior that "similar times indicate similarity, while distant times indicate dissimilarity" is unreliable for meteorological data. Frontal movement, diurnal cycles, and seasonal variations often lead to situations where data appears similar despite being distant in time or different despite being close in time. General enhancements (arbitrary distortion, large rotation / translation, and unfounded noise) violate geographic location and conservation constraints, disrupting the wind direction and vorticity of vector fields (such as 10-meter wind fields u10 and v10). To reduce mislabeled pairs and preserve interpretability, this embodiment designs a physically consistent dual-view design, specifically:

[0118] The input spatiotemporal sequence data of meteorological fields may contain only scalar field data, only vector field data, or both. Therefore, after acquiring the spatiotemporal sequence data of meteorological fields, it can be divided into scalar field data and / or vector field data according to the actual situation. For the case that contains both scalar field data and vector field data, physically consistent dual-view comparison learning is performed on the scalar field data and the vector field data respectively to obtain the first physically enhanced dual-view result (including the enhanced results of two perspectives) corresponding to the scalar field and the second physically enhanced dual-view result (including the enhanced results of two perspectives) corresponding to the vector field.

[0119] This embodiment employs multiple contrast enhancement operators for physically consistent dual-view comparative learning, with each operator referencing Table 1. Based on the characteristics of the scalar and vector fields, all contrast enhancement operators in Table 1 are used for the scalar field. For the vector field, a different directional consistency constraint is emphasized: any geometric transformations that alter wind direction or curl (rotation, affine transformations, and non-equidistant scaling, etc.) are prohibited to avoid violating geostrophic equilibrium and momentum conservation. Therefore, the vector field does not require small-amplitude geographic perturbations and random pruning, allowing the augmented samples to remain near the same dynamic state, reducing spurious positives and negatives and improving robustness to 6- to 12-hour phase misalignments. In other words, this embodiment uses two more contrast enhancement operators for the scalar field than for the vector field; the scalar field uses all contrast enhancement operators in Table 1, while the vector field does not use the small-amplitude geographic perturbation and random pruning operators in Table 1. The scalar field and the vector field each correspond to two perspectives. Each perspective in the scalar field is to randomly select multiple contrast enhancement operators from all the contrast enhancement operators in Table 1 to perform physically consistent dual-view contrast learning. Each perspective in the vector field is to randomly select multiple contrast enhancement operators from all the contrast enhancement operators in Table 1 except for the two contrast enhancement operators of small geographic perturbation and random cropping and filling to perform physically consistent dual-view contrast learning.

[0120] Table 1 Scalar Field Contrast Enhancement Operators

[0121]

[0122] The explanations of the parameters in Table 1 include: (1) In the small geographic disturbance operator, This indicates the latitude after a minor geographical disturbance. Represents the latitude of the original weather field. Indicates the longitude of the original weather field. This indicates the longitude after a minor geographical disturbance. Indicates the magnitude of the latitudinal disturbance. This indicates the magnitude of the longitude disturbance. Small geographic disturbances are used to simulate meteorological data disturbances caused by small-scale geographic changes, and are suitable for spatial variations between geographic information and meteorological fields. The physical motivation is to maintain large-scale morphology through small near-Earth latitude and longitude disturbances.

[0123] (2) In the local Gaussian mixture operator, This represents the output of the local Gaussian mixture operator. This represents the raw meteorological data. The standard deviation is expressed as Gaussian filter kernel, This indicates the ratio of the original data to the Gaussian smoothed data. Local Gaussian mixing suppresses local small-scale noise and simulates large-scale weather patterns by weighted mixing of the original meteorological field and the Gaussian smoothed field. The physical motivation is the assimilation / filtering effect, which reduces small-scale noise.

[0124] (3) In the random cut-and-fill operator, This indicates the proportion retained during cropping, that is, the proportion of the total area randomly cropped from the original meteorological field. Random cropping and filling is used to simulate changes in the field of view (such as image cropping) or changes in the observation scale. By randomly cropping and filling the missing areas in the original data, the original size of the meteorological field is maintained. The physical motivation is to change the field of view without altering the resolution.

[0125] (4) In the phase rolling operator, This represents the rolling offset over time, in hours. The phase rolling operator is used to simulate the temporal changes in meteorological fields, adjusting meteorological data at different times to simulate different phases of weather events. The physical motivation is synoptic-scale phase shifting.

[0126] (5) In the missing data interpolation operator, This represents the interpolated data. This represents the raw meteorological data. This indicates the time point where interpolation is required. This represents the weighting factor, used to control the interpolation weights of preceding and following data. Missing data interpolation is used to interpolate between missing data points, filling gaps by combining data from preceding and following time points. The underlying motivation is data missingness and linear interpolation.

[0127] (6) In the low-pass smoothing operator, This represents the output of the low-pass smoothing operator. Indicates the weather field at a certain time point The values ​​above are obtained by low-pass smoothing, which smooths meteorological data from 6 hours before and after the data to reduce high-frequency noise and preserve low-frequency variations, thus simulating larger-scale weather evolution. The physical motivation is to suppress high-frequency oscillations and preserve the weather scale.

[0128] (7) In the amplitude scaling operator, This indicates the output of the amplitude scaling operator. This represents the raw meteorological data. This represents the amplitude scaling factor, used to control variations in the amplitude of meteorological data, simulating measurement errors or changes in sensor sensitivity. Amplitude scaling is used to simulate small variations in the amplitude of meteorological data. The physical motivation is the uncertainty of the observed amplitude.

[0129] (8) In the small deviation operator, This represents the output of the small deviation operator. This represents the raw meteorological data. This represents the added bias, following a uniform distribution U, simulating sensor errors, etc. Small biases are simulated by adding small biases to the data, mimicking small-range measurement errors. The physical motivation is the site system bias.

[0130] (9) In the additive Gaussian noise operator, This represents the output of the additive Gaussian noise operator. This represents the raw meteorological data. Let N represent additive noise, which follows a Gaussian distribution, and let N represent measurement noise. This represents the variance of the noise. Additive Gaussian noise is used to simulate environmental noise or other unpredictable disturbances. The physical motivation is the observation of noise.

[0131] It should be noted that the range of each parameter in Table 1 is only a suggested range and can be adjusted according to the actual situation. This embodiment does not impose specific limitations.

[0132] For example, for scalar fields: local Gaussian mixing, low-pass smoothing, and small geographical perturbations are employed. For vector fields (u10, v10): additional direction-preserving constraints are applied, prohibiting any geometric transformations (rotation, affine, and various non-isotropic scaling, etc.) that alter wind direction or curl, to avoid violating geostrophic balance and momentum conservation; only amplitude scaling and small deviations are allowed to capture wind speed measurement uncertainties and reanalysis fusion errors; in the time dimension, operational delays and data gaps are simulated through phase rolling, low-pass smoothing, and short-interval interpolation (i.e., missing data interpolation) without changing the vector direction.

[0133] The core of physically consistent dual-view contrastive learning is learning feature representations through similarity learning; the similarity or consistency between viewpoint 1 and viewpoint 2 is crucial. Using different augmented viewpoints (e.g., temporal perturbations, spatial translations, and noise interference) allows the model to learn invariance to these transformations, thereby improving its robustness and enabling it to better cope with different transformations and perturbations. Theoretically, introducing multiple viewpoints helps the model learn more discriminative feature representations.

[0134] The physically consistent dual-view comparison learning method designed in this embodiment obtains only positive sample results, ensuring that the augmented view results are in the same dynamical system state, reducing false positives / false negatives, and improving robustness to 6- to 12-hour phase shifts. If all positive samples come from the same augmentation strategy, the model may overfit to certain specific feature changes (e.g., only learning to cope with additive noise). Using two perspectives, especially through different augmentation strategies, effectively avoids this overfitting because it allows the model to learn broader, more general features about the data itself, rather than mappings specific to a particular augmentation process.

[0135] 2. Backbone network and learning objectives.

[0136] The fingerprint generation model in this embodiment mainly includes a 3D Swin Transformer, hierarchical temporal attention, and a gated fusion mechanism with residual connections. SIM-Weather uses a 3D Swin Transformer as its backbone network to model the spatiotemporal evolution of the weather field. To further enhance the representation of temporal features, this embodiment embeds a hierarchical temporal attention (HTA) module into the 3D Swin Transformer, applying multi-scale 1D deep convolutions (kernel sizes 3, 6, and 12) along the time axis to expand the temporal receptive field and capture phase information at different time scales. Specifically, the HTA module applies multi-scale one-dimensional deep separable convolutions to temporal features, using convolution kernel lengths of 3, 6, and 12 to handle phase changes at different time scales. HTA helps the model capture cross-temporal dependencies, thereby better handling the temporal changes of the weather field, especially at time scales of 6 to 12 hours, solving the problems of temporal misalignment and boundary effects.

[0137] A gated fusion mechanism with residual connections is embedded in the 3D Swin Transformer. Specifically, the HTA module first generates temporal gate weights and multiplies them element-wise with the input temporal feature map to adjust the feature contribution at each time step through weighting. Then, the weighted feature map is added to the original feature map through residual connections to ensure the stability and information flow during network training.

[0138] Gated fusion mechanisms with residual connections enable models to capture temporal dependencies across different time scales, particularly helping to mitigate boundary effects and capture 6- to 12-hour phase lags. The gating mechanism is introduced to dynamically adjust the model's emphasis on features at different time steps. When processing time-series data, specific moments may be more important for prediction, while other moments have relatively less impact. By weighting features at specific moments, the gating mechanism can selectively amplify features from certain moments (e.g., extreme weather periods) while suppressing irrelevant or unimportant features, such as relatively stable periods. This helps fingerprint generation models learn more effective temporal patterns.

[0139] The fingerprint generation model is optimized and trained using the following three loss functions:

[0140] (1) Distance Preservation Loss Function Make the embedded space Euclidean distance physical space distance Alignment ensures statistical consistency, specifically as follows:

[0141] ;

[0142] in, The embedding space Euclidean distance is obtained by calculating the Euclidean distance between the real fingerprint and the predicted fingerprint output by the fingerprint generation model. The physical spatial distance is represented by the root mean square error between the reanalysis meteorological field data and the predicted meteorological field data output by the fingerprint generation model. This represents the mean square error.

[0143] Physical spatial distance can express the similarity of weather events at the numerical error level. Alignment between the Euclidean distance in the embedding space and the RMSE in the physical space is optimized by the goal of distance preservation, that is, by training the fingerprint generation model to make the distance in the embedding space consistent with the error in the physical space.

[0144] (2) Contrastive learning loss function This makes the embeddings of physically consistent views similar, while separating irrelevant sample pairs, specifically:

[0145] ;

[0146] in, This represents the contrastive learning loss function. This indicates the total number of samples. Represents an exponential function. Represents the cosine similarity function. Indicates the query sample. This represents a positive sample (which is a positive sample obtained through physical consistency dual-view comparison learning). Indicates a negative sample. This represents the temperature parameter.

[0147] (3) Keyframe reconstruction loss function To ensure structural fidelity, a multi-scale reconstruction loss is applied to keyframes (such as 00:00, 06:00, 12:00, and 18:00 UTC), fusing pixel-level, gradient-level, and perceptual SSIM constraints, specifically:

[0148] ;

[0149] in, This represents the loss function for keyframe reconstruction. , and Indicates the weighting coefficient. Indicates the reconstructed frame. Represents the original frame. Represents the gradient operator. Represents the structural similarity index. This represents the L1 norm.

[0150] The total loss function is the weighted sum of the three loss functions mentioned above:

[0151] ;

[0152] in, , and This represents the loss weight.

[0153] 3. Adaptive retrieval.

[0154] The core advantage of the SIM-Weather method in this embodiment lies in its modular, scalable, plug-and-play retrieval capabilities, enabling efficient similar weather retrieval. This method generates and processes a 256-dimensional fingerprint representation of the weather field and combines it with an adaptive indexing strategy to achieve seamless integration of new variables, cross-variable queries, and model-independent retrieval capabilities. This ensures system scalability across different spatial regions, time periods, and data modalities.

[0155] (1) Fingerprint generation and representation.

[0156] This embodiment uses any given 24-hour spatiotemporal sequence of meteorological field data as input to a pre-trained fingerprint generation model. This meteorological field spatiotemporal sequence data can be univariate or multivariate data. Each physical variable (such as the u10 / v10 components of 2m air temperature, sea level pressure, and 10m wind speed) is independently represented as a 256-dimensional dense "fingerprint." Each variable fingerprint first undergoes isomorphic linear transformation and standardization processes, including principal component analysis (PCA), Z-score standardization, and sample-level L2 normalization, to ensure stable fingerprint data distribution and consistent dimensions. Then, it is scaled according to default or preset weights.

[0157] For univariate retrieval, the method in this embodiment directly uses the 256-dimensional fingerprint of the variable; while for multivariate retrieval, the fingerprints of each variable after weighted scaling are concatenated in a preset order to form a 1024-dimensional (or adaptively growing with the number of variables) combined vector, and L2 normalization is performed on the combined vector again to ensure that the geometric measure of the retrieval results under different numbers of variables and different weight configurations is comparable and stable.

[0158] (2) Adaptive indexing strategy.

[0159] To balance the accuracy of medium-sized fingerprint databases with the memory / latency constraints of ultra-large-scale fingerprint databases, this embodiment employs an adaptive selection strategy for the underlying Approximate Nearest Neighbor (ANN) index. When the number of fingerprints in the database falls below a preset threshold (e.g., ...), ... When the number of fingerprints in the fingerprint database is equal to or exceeds a preset threshold, the system prioritizes building a graph-based HNSW index (i.e., the first retrieval method). By setting a reasonable graph degree and construction / query expansion factor (e.g., on the order of M≈32, efConstruction≈200), a high recall rate and low query latency are achieved. When the number of fingerprints in the fingerprint database equals or exceeds a preset threshold, the system automatically switches to an inverted product quantization (IVFPQ) architecture (i.e., the second retrieval method). This uses a coarse cluster center number (nlist) of the same order as the fingerprint database size and the code length of each sub-quantizer (e.g., 8 bits) to balance query latency and memory usage. The preset threshold, index selection, and parameter settings can be automatically evaluated and fixed offline based on the fingerprint database size and target latency. They can also be rate-limited and dynamically adjusted online based on real-time load, thereby achieving elastic adaptation to different scales and load scenarios.

[0160] (3) Index generation and retrieval process.

[0161] When generating the index, the query side and the database creation side share the same set of fingerprint transformation parameters and variable weights to ensure geometric consistency. The fingerprints in the fingerprint database are obtained by extracting fingerprints from the spatiotemporal sequence data of historical weather fields, performing projection standardization, cross-variable weighting, concatenation, and normalization. The system uses FAISS (Facebook AISimilarity Search) to build the index and automatically selects either HNSW or IVFPQ strategies based on the size of the fingerprints in the database and the query requirements.

[0162] In the retrieval process, the method in this embodiment first processes the query data (i.e., the spatiotemporal sequence data of the target meteorological field) through the same fingerprint extraction and standardization process to generate a query fingerprint. Then, it performs a retrieval using the same index structure as the training data, returning the most similar fingerprint and metadata related to the similar fingerprint (such as timestamps and spatial ranges). The retrieval results are sorted by distance from smallest to largest, and multiple candidates (such as Top-K results) are supported for further evaluation or visualization comparison. The corresponding target historical weather can be found based on the metadata related to the similar fingerprint; this target historical weather is the retrieved similar weather, with a Top-K number.

[0163] 4. System scalability and maintainability.

[0164] To accommodate the expansion needs of fingerprinting, the introduction of new variables only requires generating a 256-dimensional fingerprint for that variable, without requiring destructive modifications to existing fingerprint or index structures. When new variables are added or the weighting strategy changes, the system can achieve "plug-and-play" retrieval capabilities by recalculating the combined vector on the query side and updating the index hyperparameters online, without needing to retrain the model.

[0165] Compared with the prior art, the technical solution of this embodiment has the following advantages:

[0166] (1) Efficient cross-variable retrieval: The system can support the concatenation retrieval of multiple variables and ensure the retrieval accuracy and stability under different configurations.

[0167] (2) Adaptive indexing strategy: The HNSW or IVFPQ index structure is automatically selected based on the dataset size, thereby optimizing query efficiency while ensuring retrieval accuracy. Furthermore, scalable and efficient retrieval is supported through adaptive approximate nearest neighbor indexes (HNSW / IVFPQ).

[0168] (3) Seamless support for new variables: When adding new variables, the system does not need to reconstruct the index or train the model. It only needs to generate fingerprints incrementally and update the query vector to achieve seamless integration.

[0169] (4) Physical consistency and interpretability: The system ensures that the retrieval results are not only numerically accurate, but also physically meaningful and interpretable through physically consistent fingerprint representation and enhancement strategies.

[0170] To better illustrate the technical effects of this embodiment, the following experiment was conducted:

[0171] SIM-Weather was validated on the ERA5 reanalysis dataset provided by the European Centre for Medium-Range Weather Forecasts (ECMWF). The study area is East Asia, centered on southeastern China, with longitudes ranging from 112.5°E to 130.5°E and latitudes ranging from 17.0°N to 33.25°N; spatial resolution is 0.25° × 0.25°, and temporal resolution is hourly (00:00 to 23:00 UTC).

[0172] This embodiment considers four meteorological variables: mean sea level pressure (hPa), 2-meter air temperature (°C), and the U and V components of 10-meter wind (m / s). The dataset spans from January 1, 1979 to December 31, 2020. Data from 1979 to 2018 was used for training, data from 2019 was used for validation, and data from 2020 was used for testing. All data underwent consistent preprocessing during both the training and inference phases to ensure the integrity of the evaluation.

[0173] The SIM-Weather method in this embodiment is compared with three representative baseline methods in the prior art: ClimaX, VideoMAE, and Video Swin Transformer. Table 2 summarizes the performance from eight quantitative indicators across three categories: 1. Numerical accuracy: Mean squared error (MSE), root mean square error (RMSE), and L2 distance; 2. Correlation: Pearson correlation coefficient and cosine similarity; 3. Structural / perceptual similarity: Structural similarity index (SSIM), feature similarity index (FSIM), and perceptual image patch similarity (LPIPS). It should be noted that SSIM and FSIM measure the degree of preservation of spatial structure and phase details; LPIPS reflects perceptual similarity and is more sensitive to noise and detail errors.

[0174] Table 2 compares the performance of the method in this embodiment with ClimaX, VideoMAE, and VideoSwin Transformer.

[0175]

[0176] Table 3 shows the results of the ablation experiment.

[0177]

[0178] In this embodiment, the SIM-Weather method outperforms all metrics: compared to ClimaX and VideoMAE, it significantly reduces numerical error and improves perceptual and structural fidelity; even compared to the strong baseline Video SwinTransformer, it still achieves a small but stable improvement (especially in relevance and perceptual similarity). These gains stem from the synergistic effect of the physics-driven enhancement, HTA-enhanced Swin3D backbone network, and multi-objective training strategy.

[0179] To separate the contributions of each core component of the SIM-Weather method, a progressive ablation experiment was conducted: starting from a baseline (B0) containing only the backbone network, modules were gradually added and performance changes were measured. Table 3 shows the validation set results, with the following key findings: the HTA module (B0→B1) expands the temporal receptive field with minimal computational overhead, improving performance; naive contrastive learning (B1→B2) suffers from performance degradation due to physically unreasonable enhancements that disrupt the learning signal; physically consistent enhancements (B1→B3) bring significant performance improvements, validating the importance of the meteorological significance view in contrastive learning; keyframe reconstruction (B3→B4) further optimizes the results while preserving spatial structure and perception quality.

[0180] The experimental results above confirm that HTA, physics-driven enhancement, and multi-scale reconstruction components all make significant contributions to the final performance of the SIM-Weather method.

[0181] Reference Figure 3 This application also provides a similar weather retrieval system based on physically aligned fingerprints. The system includes a data acquisition unit 301, a comparison learning unit 302, a fingerprint generation unit 303, a fingerprint retrieval unit 304, and a similar weather retrieval unit 305, wherein:

[0182] The data acquisition unit 301 is used to acquire the constructed fingerprint database and the spatiotemporal sequence data of the target meteorological field corresponding to the weather to be queried. The fingerprint database is constructed by generating fingerprints from the spatiotemporal sequence data of meteorological fields corresponding to multiple historical weather conditions.

[0183] The contrast learning unit 302 is used to perform physically consistent dual-view contrast learning on the spatiotemporal sequence data of the target meteorological field, and generate a first physically enhanced dual-view result corresponding to the scalar field and / or a second physically enhanced dual-view result corresponding to the vector field.

[0184] The fingerprint generation unit 303 is used to input the first physical augmentation dual-view result and / or the second physical augmentation dual-view result into the trained fingerprint generation model to obtain the query fingerprint;

[0185] The fingerprint retrieval unit 304 is used to retrieve multiple fingerprints similar to the query fingerprint in the fingerprint database and obtain fingerprint retrieval results;

[0186] The similar weather retrieval unit 305 is used to find multiple target historical weather based on the fingerprint retrieval results and use the multiple target historical weather as similar weather retrieval results.

[0187] It should be noted that since the similar weather retrieval system based on physical alignment fingerprints in this embodiment is based on the same inventive concept as the similar weather retrieval method based on physical alignment fingerprints described above, the corresponding content in the method embodiment is also applicable to this system embodiment, and will not be described in detail here.

[0188] Reference Figure 4 This application also provides an electronic device, which includes:

[0189] At least one memory;

[0190] At least one processor;

[0191] At least one program;

[0192] The program is stored in memory, and the processor executes at least one program to implement the physical alignment fingerprint-based similar weather retrieval method described above in this disclosure.

[0193] This electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), and in-vehicle computers.

[0194] The electronic devices according to embodiments of this application will now be described in detail.

[0195] The processor 1600 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 disclosure.

[0196] The memory 1700 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1700 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 1700 and is called and executed by the processor 1600 to execute the physically aligned fingerprint-based similar weather retrieval method of the embodiments of this disclosure.

[0197] The input / output interface 1800 is used to implement information input and output.

[0198] The communication interface 1900 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0199] Bus 2000 transmits information between various components of the device (e.g., processor 1600, memory 1700, input / output interface 1800, and communication interface 1900);

[0200] The processor 1600, memory 1700, input / output interface 1800 and communication interface 1900 are connected to each other within the device via bus 2000.

[0201] This disclosure also provides a storage medium, which is a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the above-described similar weather retrieval method based on physically aligned fingerprints.

[0202] 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.

[0203] The embodiments described in this disclosure are for the purpose of more clearly illustrating the technical solutions of this disclosure and do not constitute a limitation on the technical solutions provided by this disclosure. 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 this disclosure are also applicable to similar technical problems.

[0204] 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 disclosure, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0205] 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.

[0206] 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.

[0207] 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 a 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.

[0208] 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.

[0209] 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 units 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.

[0210] The units described 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.

[0211] 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.

[0212] 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 an electronic 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. The embodiments of this application have been described in detail above with reference to the accompanying drawings, but this application is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of this application.

[0213] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application.

Claims

1. A method for retrieving similar weather conditions based on physically aligned fingerprints, characterized in that, The method includes: The fingerprint database and the spatiotemporal sequence data of the target meteorological field corresponding to the weather to be queried are obtained. The fingerprint database is constructed by generating fingerprints from the spatiotemporal sequence data of meteorological fields corresponding to multiple historical weather conditions. Physically consistent dual-view comparison learning is performed on the spatiotemporal sequence data of the target meteorological field to generate a first physically enhanced dual-view result corresponding to the scalar field and / or a second physically enhanced dual-view result corresponding to the vector field, including: Obtain multiple contrast enhancement operators; The spatiotemporal sequence data of the target meteorological field is divided into scalar field data and / or vector field data; Multiple contrast enhancement operators are randomly selected to perform physically consistent dual-view contrast learning on the scalar field data, generating the first physically enhanced dual-view result corresponding to the scalar field. Multiple contrast enhancement operators are randomly selected to perform physically consistent dual-view contrast learning on the vector field data, generating a second physically enhanced dual-view result corresponding to the vector field. The first physical augmented dual-view result and / or the second physical augmented dual-view result are input into the trained fingerprint generation model to obtain the query fingerprint; The fingerprint database is used to retrieve multiple fingerprints that are similar to the queried fingerprint to obtain fingerprint retrieval results. Based on the fingerprint retrieval results, find the corresponding target historical weather and use the target historical weather as similar weather retrieval results.

2. The similar weather retrieval method based on physically aligned fingerprints according to claim 1, characterized in that, The step of inputting the first physical augmented dual-view result and / or the second physical augmented dual-view result into the trained fingerprint generation model to obtain the query fingerprint includes: Physically consistent dual-view comparison learning is performed on the spatiotemporal sequence data of meteorological fields corresponding to multiple historical weather conditions to generate physically enhanced dual-view results corresponding to historical scalar fields and physically enhanced dual-view results corresponding to historical vector fields. Construct distance-preserving loss function, contrastive learning loss function, and keyframe reconstruction loss function; The total loss function is obtained by weighted summing of the distance preservation loss function, the contrastive learning loss function, and the keyframe reconstruction loss function. Based on the physical augmented dual-view results corresponding to the historical scalar field, the physical augmented dual-view results corresponding to the historical vector field, and the total loss function, the fingerprint generation model is trained to obtain a trained fingerprint generation model. The first and / or second physical augmentation dual-view results are input into the trained fingerprint generation model. If the spatiotemporal sequence data of the target meteorological field corresponding to the first and / or second physical augmentation dual-view results is a single variable, then the query fingerprint corresponding to the single variable is obtained. If the spatiotemporal sequence data of the target meteorological field corresponding to the first and / or second physical augmentation dual-view results is multivariate, then the fingerprints corresponding to each variable are weighted and concatenated to obtain the query fingerprint corresponding to the multivariate.

3. The similar weather retrieval method based on physically aligned fingerprints according to claim 2, characterized in that, The constructed distance-preserving loss function includes: Acquire reanalysis meteorological field data and real fingerprints corresponding to the spatiotemporal sequence data of meteorological fields for multiple historical weather events; The spatiotemporal sequence data of the meteorological fields corresponding to the multiple historical weather events are input into the fingerprint generation model to obtain the predicted fingerprint and the predicted meteorological field data. Calculate the distance between the real fingerprint and the predicted fingerprint to obtain the Euclidean distance in the embedding space; The root mean square error between the reanalysis meteorological field data and the predicted meteorological field data is calculated to obtain the physical spatial distance. Based on the Euclidean distance in the embedding space and the distance in the physical space, a distance-preserving loss function is constructed.

4. The similar weather retrieval method based on physically aligned fingerprints according to claim 2, characterized in that, The contrastive learning loss function includes: ; in, This represents the contrastive learning loss function. This indicates the total number of samples. Take a positive integer. Represents an exponential function. Represents the cosine similarity function. Indicates the query sample. Indicates a positive sample. Indicates a negative sample. This represents the temperature parameter.

5. The similar weather retrieval method based on physically aligned fingerprints according to claim 2, characterized in that, The keyframe reconstruction loss function includes: ; in, This represents the loss function for keyframe reconstruction. , and Indicates the weighting coefficient. Indicates the reconstructed frame. Represents the original frame. Represents the gradient. Represents the structural similarity index. This represents the L1 norm.

6. The similar weather retrieval method based on physically aligned fingerprints according to claim 1, characterized in that, The step of retrieving multiple fingerprints similar to the query fingerprint from the fingerprint database to obtain fingerprint retrieval results includes: If the number of fingerprints in the fingerprint database is less than a preset threshold, the first retrieval method is selected; if the number of fingerprints in the fingerprint database is equal to or greater than the preset threshold, the second retrieval method is selected. Using the first retrieval method or the second retrieval method, multiple fingerprints similar to the query fingerprint are retrieved from the fingerprint database, and the distance between each similar fingerprint and the query fingerprint is obtained; Based on the distance, the multiple fingerprints are sorted to obtain fingerprint retrieval results.

Citation Information

Patent Citations

  • Method and system for quickly retrieving historical similar weather situations and medium

    CN117609568A

  • Tunnel construction deformation monitoring system based on machine vision and monitoring method thereof

    CN120740486A