Weather object identification method, system, medium and electronic device

By cropping areas in the weather map and using pre-trained key point recognition models, the problems of low efficiency and insufficient accuracy of weather object analysis in meteorological forecasts are solved, and higher weather object recognition accuracy is achieved.

CN117893722BActive Publication Date: 2024-11-013CLEAR SCI & TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410089619.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-22
Publication Date
2024-11-01
Estimated Expiration
2044-01-22

AI Technical Summary

Technical Problem

In the prior art, weather object analysis in meteorological forecasting is inefficient in low efficiency, and conventional general algorithms cannot accurately characterize different weather maps, resulting in a decrease in the accuracy of weather object recognition.

Method used

By cropping the weather object area in the weather map of the target area, generating the target area map, and inputting a pre-trained key point recognition model based on the historical weather map key point sequence, outputting the target key point sequence, and then generating the target weather object.

Benefits of technology

The recognition accuracy of weather objects is improved, and the exclusive key point sequence can be output according to different weather maps to construct a unique weather object.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117893722B_ABST
    Figure CN117893722B_ABST
Patent Text Reader

Abstract

The present application discloses a weather object recognition method, system, medium and electronic device, the method comprising: in a weather map of a target area, cutting out an area where a weather object exists to obtain a target area map; inputting the target area map into a pre-trained key point recognition model, and outputting a target key point sequence corresponding to the target area map; the pre-trained key point recognition model is generated based on the training of the key point sequence corresponding to each historical weather map; and generating a target weather object corresponding to the target area map according to the target key point sequence. Since the pre-trained key point recognition model in the present application is generated based on the training of the key point sequence corresponding to each historical weather map, and the number of key point sequences corresponding to each historical weather map is different, the model can output a key point sequence exclusive to each weather map for different weather maps, and a unique weather object for each weather map can be constructed through the key point sequence exclusive to each weather map, thereby improving the recognition accuracy of the weather object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a weather object recognition method, system, medium and electronic device. Background Art

[0002] In the field of meteorology, weather objects include trough lines, fronts, shear lines, etc. For example, trough lines are an important basis for forecasting cloud formation and rain. It can be seen that identifying weather objects based on weather maps plays a very important role. It can reflect the changing trend of the weather to a certain extent and provide important reference for forecasters.

[0003] In the related art, weather object analysis in weather forecast is basically implemented by manual analysis. Manual analysis of weather objects is inefficient; at the same time, there are also examples of conventional general algorithms processing weather maps in the related art. The number of points regressed by the conventional general algorithm must be fixed, so that different weather maps have a uniform number of points. The uniform number of points cannot accurately depict weather objects for different weather maps, thereby reducing the recognition accuracy of weather objects. Summary of the invention

[0004] The embodiments of the present application provide a weather object identification method, system, medium and electronic device. In order to have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.

[0005] In a first aspect, an embodiment of the present application provides a weather object recognition method, the method comprising:

[0006] In the weather map of the target area, the area where the weather object exists is cut out to obtain the target area map corresponding to the target area;

[0007] Input the target area map into a pre-trained key point recognition model, and output a target key point sequence corresponding to the target area map; wherein the pre-trained key point recognition model is generated based on the key point sequence corresponding to each historical weather map;

[0008] According to the target key point sequence, the target weather object corresponding to the target area map is generated.

[0009] Optionally, in the weather map of the target area, before clipping the area where the weather object exists, it also includes:

[0010] Determine the weather objects to be analyzed existing in each collected historical weather map, and obtain the weather objects to be analyzed corresponding to each historical weather map;

[0011] Determine the first coordinate point sequence of the weather object to be analyzed corresponding to each historical weather map;

[0012] Generate a Bezier curve corresponding to the weather object to be analyzed and a second coordinate point sequence of the Bezier curve according to the first coordinate point sequence;

[0013] Calculate the iterative loss value corresponding to each historical weather map according to the first coordinate point sequence and the second coordinate point sequence;

[0014] According to the iterative loss value, iterate the key point sequence corresponding to each historical weather map;

[0015] Model training is performed according to the key point sequences corresponding to each historical weather map to generate a pre-trained key point recognition model.

[0016] Optionally, determining a first coordinate point sequence of a weather object to be analyzed corresponding to each historical weather map includes:

[0017] Calculate the first span of the weather object to be analyzed corresponding to each historical weather map in the vertical axis direction of the preset coordinate system;

[0018] Calculate the second span of the weather object to be analyzed corresponding to each historical weather map in the horizontal axis direction of the preset coordinate system;

[0019] When the first span is greater than or equal to the second span, the coordinate point with the smallest ordinate on the ordinate axis of the preset coordinate system of the weather object to be analyzed is determined as the starting point; or, when the first span is less than the second span, the coordinate point with the smallest ordinate on the ordinate axis of the preset coordinate system of the weather object to be analyzed is determined as the starting point;

[0020] Starting from the starting point, the coordinate points of the weather object to be analyzed are determined in sequence to obtain the first coordinate point sequence corresponding to each historical weather map.

[0021] Optionally, generating a Bezier curve corresponding to the weather object to be analyzed and a second coordinate point sequence of the Bezier curve according to the first coordinate point sequence includes:

[0022] Connect the first coordinate point and the last coordinate point in the first coordinate point sequence with a straight line to obtain a target line segment corresponding to the weather object to be analyzed;

[0023] Calculate the coordinate point farthest from the target line segment in the first coordinate point sequence to obtain the target segmentation point corresponding to the weather object to be analyzed;

[0024] The first coordinate point, the last coordinate point and the target segmentation point in the first coordinate point sequence are combined to obtain a curve fitting point sequence corresponding to the weather object to be analyzed;

[0025] Fitting a Bezier curve of a preset order according to a curve fitting point sequence corresponding to the weather object to be analyzed to obtain a Bezier curve corresponding to the weather object to be analyzed;

[0026] The coordinate points of the Bezier curve corresponding to the weather object to be analyzed are traversed in sequence to obtain a second coordinate point sequence of the Bezier curve.

[0027] Optionally, calculating the iterative loss value corresponding to each historical weather map according to the first coordinate point sequence and the second coordinate point sequence includes:

[0028] Calculating the target distance between each first coordinate point in the first coordinate point sequence and the corresponding second coordinate point in the second coordinate point sequence to obtain a plurality of target distances corresponding to each historical weather map;

[0029] The maximum target distance among multiple target distances corresponding to each historical weather map is determined as the iteration loss value corresponding to each historical weather map.

[0030] Optionally, according to the iterative loss value, the key point sequence corresponding to each historical weather map is iterated, including:

[0031] When the iteration loss value is less than or equal to the preset threshold, the curve fitting point sequence corresponding to each historical weather map is used as the key point sequence corresponding to each historical weather map; or,

[0032] When the iterative loss value is greater than a preset threshold, the first coordinate point sequence corresponding to each historical weather map is segmented according to the segmentation points corresponding to each historical weather map to obtain multiple groups of segmentation coordinate point sequences; the Bezier curve is refitted according to the multiple groups of segmentation coordinate point sequences to generate a key point sequence corresponding to each historical weather map.

[0033] Optionally, a target weather object corresponding to the target area map is generated according to the target key point sequence, including:

[0034] Generate a Bezier curve corresponding to the target area map according to the target key point sequence;

[0035] The Bezier curve corresponding to the target area graph is used as the target weather object corresponding to the target area graph.

[0036] In a second aspect, an embodiment of the present application provides a weather object recognition system, the system comprising:

[0037] A clipping module is used to clip the area where the weather object exists in the weather map of the target area to obtain a target area map corresponding to the target area;

[0038] A processing module is used to input the target area map into a pre-trained key point recognition model and output a target key point sequence corresponding to the target area map; the pre-trained key point recognition model is generated based on the key point sequence corresponding to each historical weather map;

[0039] The generation module is used to generate the target weather object corresponding to the target area map according to the target key point sequence.

[0040] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0041] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.

[0042] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0043] In an embodiment of the present application, the weather object recognition system first crops the area where the weather object exists in the weather map of the target area to obtain a target area map; then the target area map is input into a pre-trained key point recognition model to output a target key point sequence corresponding to the target area map; the pre-trained key point recognition model is generated based on the training of the key point sequence corresponding to each historical weather map; finally, the target weather object corresponding to the target area map is generated according to the target key point sequence. Since the pre-trained key point recognition model in the present application is generated based on the training of the key point sequence corresponding to each historical weather map, the number of key point sequences corresponding to each historical weather map is different, so that the model can output a key point sequence exclusive to each weather map for different weather maps, and a unique weather object for each weather map can be constructed through the key point sequence exclusive to each weather map, thereby improving the recognition accuracy of the weather object.

[0044] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0046] Figure 1 It is a flow chart of a weather object identification method provided in an embodiment of the present application;

[0047] Figure 2 It is a flowchart of a key point recognition model training method provided in an embodiment of the present application;

[0048] Figure 3 It is a regional map with weather objects marked provided by an embodiment of the present application;

[0049] Figure 4 It is a grayscale image of a weather object displayed on a coordinate axis provided in an embodiment of the present application;

[0050] Figure 5 It is a grayscale image after drawing line segments on a weather object provided in an embodiment of the present application;

[0051] Figure 6 It is a grayscale image showing a segmentation point on a weather object provided by an embodiment of the present application;

[0052] Figure 7 is a grayscale image of a Bezier curve provided in an embodiment of the present application;

[0053] Figure 8 It is a grayscale image showing three segmentation points on a weather object provided by an embodiment of the present application;

[0054] Fig. 9 is a structural diagram of a weather object identification system provided in an embodiment of the present application;

[0055] Fig.10 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The following description and the accompanying drawings sufficiently illustrate specific embodiments of the present application to enable those skilled in the art to practice them.

[0057] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0058] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of systems and methods consistent with some aspects of the present application as detailed in the attached claims.

[0059] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0060] The present application provides a weather object recognition method, system, medium and electronic device to solve the problems existing in the above-mentioned related technical problems. In the technical solution provided by the present application, since the key point recognition model pre-trained in the present application is generated based on the key point sequence training corresponding to each historical weather map, the number of key point sequences corresponding to each historical weather map is different, so that the model can output a key point sequence exclusive to each weather map for different weather maps, and a unique weather object for each weather map can be constructed through the key point sequence exclusive to each weather map, thereby improving the recognition accuracy of the weather object, which is described in detail using an exemplary embodiment below.

[0061] The following will be combined with the attached Figure 1 -Attached Figure 8 , the weather object recognition method provided by the embodiment of the present application is introduced in detail. The method can be implemented by a computer program and can be run on a weather object recognition system based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application.

[0062] See also Figure 1 , which is a flow chart of a weather object identification method provided in an embodiment of the present application.

[0063] like Figure 1 As shown, the method of the embodiment of the present application may include the following steps:

[0064] S101, in the weather map of the target area, cutting out the area where the weather object exists, to obtain a target area map corresponding to the target area;

[0065] The target area is a region where weather object identification is required, such as a province, a city or a county. The weather map of the target area is constructed based on the original meteorological data. The original meteorological data can be obtained in a variety of ways, such as meteorological historical data (such as measured data at the site, or reanalysis data of non-measured meteorological data, or meteorological historical data simulated by meteorological models), meteorological model simulation (or statistical law analysis) to obtain the original meteorological data.

[0066] Usually, weather objects include trough lines, front lines, shear lines, etc.

[0067] In an embodiment of the present application, when generating a weather map of a target area, the original meteorological data of the target area is first obtained, and an electronic map is constructed according to a preset longitude range and a preset latitude range. Then, a contour line drawing method is adopted, and a plurality of contour lines of different heights are drawn on the electronic map in combination with preset height parameters and spacing parameters to obtain a contour line map. Secondly, the arrow direction and arrow length of preset pixels are used to represent the wind field direction and wind field intensity of the historical grid data at each moment in the original meteorological data to obtain the wind field arrow mark at each moment. Finally, the wind field arrow mark at each moment is projected onto the contour line map to obtain a weather map of the target area.

[0068] In an embodiment of the present application, after obtaining a weather map of a target area, the weather map of the target area may be cropped to determine an area where a weather object exists, and obtain a target area map corresponding to the target area.

[0069] S102, inputting the target area map into a pre-trained key point recognition model, and outputting a target key point sequence corresponding to the target area map; wherein the pre-trained key point recognition model is generated based on key point sequence training corresponding to each historical weather map;

[0070] Among them, the pre-trained key point recognition model is a mathematical model that can determine the key points.

[0071] In an embodiment of the present application, when generating a pre-trained key point recognition model, first determine the weather objects to be analyzed that exist in each collected historical weather map, and obtain the weather objects to be analyzed corresponding to each historical weather map; then determine the first coordinate point sequence of the weather objects to be analyzed corresponding to each historical weather map; then, based on the first coordinate point sequence, generate a Bezier curve corresponding to the weather object to be analyzed and a second coordinate point sequence of the Bezier curve; secondly, based on the first coordinate point sequence and the second coordinate point sequence, calculate the iterative loss value corresponding to each historical weather map; finally, based on the iterative loss value, iterate out the key point sequence corresponding to each historical weather map; then perform model training based on the key point sequence corresponding to each historical weather map to generate a pre-trained key point recognition model.

[0072] In a possible implementation, after the target area map is obtained, the target area map may be input into a pre-trained key point recognition model, and the model outputs a target key point sequence corresponding to the target area map after processing.

[0073] S103, generating a target weather object corresponding to the target area map according to the target key point sequence.

[0074] In an embodiment of the present application, when generating a target weather object corresponding to a target area map based on a target key point sequence, a Bezier curve corresponding to the target area map is first generated based on the target key point sequence; then the Bezier curve corresponding to the target area map is used as the target weather object corresponding to the target area map.

[0075] Specifically, the target key point sequence may be n key points, and an n-1 order Bezier curve is fitted using the n key points as a front line or a groove line.

[0076] In an embodiment of the present application, the weather object recognition system first crops the area where the weather object exists in the weather map of the target area to obtain a target area map; then the target area map is input into a pre-trained key point recognition model to output a target key point sequence corresponding to the target area map; the pre-trained key point recognition model is generated based on the training of the key point sequence corresponding to each historical weather map; finally, the target weather object corresponding to the target area map is generated according to the target key point sequence. Since the pre-trained key point recognition model in the present application is generated based on the training of the key point sequence corresponding to each historical weather map, the number of key point sequences corresponding to each historical weather map is different, so that the model can output a key point sequence exclusive to each weather map for different weather maps, and a unique weather object for each weather map can be constructed through the key point sequence exclusive to each weather map, thereby improving the recognition accuracy of the weather object.

[0077] See also Figure 2 , which is a flowchart of a key point recognition model training method provided in an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps:

[0078] S201, determining the weather objects to be analyzed existing in each collected historical weather map, and obtaining the weather objects to be analyzed corresponding to each historical weather map;

[0079] In an embodiment of the present application, when determining the weather objects to be analyzed that exist in each collected historical weather map, first, based on the object labeling request from the client, the existing weather objects are labeled in the weather map; then, according to the preset coordinate axis parameters, a binary image with the same resolution as the weather map is established; the labeled weather image is projected into the preset coordinate system of the binary image to obtain the weather objects to be analyzed corresponding to each historical weather map.

[0080] In a possible implementation, the fronts or troughs existing in the collected historical weather maps are marked in the corresponding areas, such as Figure 3 Project the marked front line onto a binary image with the same resolution as the weather map and establish a coordinate system with the x-axis and y-axis as shown in Figure 4 shown.

[0081] S202, determining a first coordinate point sequence of a weather object to be analyzed corresponding to each historical weather map;

[0082] In an embodiment of the present application, when determining the first coordinate point sequence of the weather object to be analyzed corresponding to each historical weather map, firstly, the first span of the weather object to be analyzed corresponding to each historical weather map in the direction of the vertical axis of the preset coordinate system is calculated; then, the second span of the weather object to be analyzed corresponding to each historical weather map in the direction of the horizontal axis of the preset coordinate system is calculated; then, when the first span is greater than or equal to the second span, the coordinate point with the smallest vertical coordinate on the vertical axis of the preset coordinate system of the weather object to be analyzed is determined as the starting point; or, when the first span is less than the second span, the coordinate point with the smallest horizontal coordinate on the horizontal axis of the preset coordinate system of the weather object to be analyzed is determined as the starting point; finally, starting from the starting point, the coordinate points of the weather object to be analyzed are determined in sequence to obtain the first coordinate point sequence corresponding to each historical weather map.

[0083] In one possible implementation, first calculate Figure 2 The span of the center trough or front line in the y-axis direction is recorded as h, and the span in the x-axis direction is recorded as w. If h is greater than or equal to w, the starting point is the point with the smallest y value. If h is less than w, the starting point is the point with the smallest x value. Figure 2 The coordinate points of the middle groove line or the front line are stored in the list in order according to the starting point determined by the above process, and the first coordinate point sequence is obtained, which is recorded as [(x 0 ,y 0 ),......,(x n ,y n )].

[0084] S203, generating a Bezier curve corresponding to the weather object to be analyzed and a second coordinate point sequence of the Bezier curve according to the first coordinate point sequence;

[0085] In an embodiment of the present application, when generating a Bezier curve corresponding to a weather object to be analyzed and a second coordinate point sequence of the Bezier curve based on a first coordinate point sequence, firstly, the first coordinate point and the last coordinate point in the first coordinate point sequence are connected by a straight line to obtain a target line segment corresponding to the weather object to be analyzed; then, the coordinate point farthest from the target line segment in the first coordinate point sequence is calculated to obtain a target segmentation point corresponding to the weather object to be analyzed; then, the first coordinate point, the last coordinate point and the target segmentation point in the first coordinate point sequence are combined to obtain a curve fitting point sequence corresponding to the weather object to be analyzed; secondly, according to the curve fitting point sequence corresponding to the weather object to be analyzed, a Bezier curve of a preset order is fitted to obtain a Bezier curve corresponding to the weather object to be analyzed; finally, the coordinate points of the Bezier curve corresponding to the weather object to be analyzed are traversed in sequence to obtain a second coordinate point sequence of the Bezier curve.

[0086] In a possible implementation, for example, the first coordinate point sequence [(x 0 ,y 0 ),......,(x n ,y n )] in [(x 0 ,y 0 ),(x n ,y n )] to form a line segment, for example Figure 5 As shown, point A can be the starting point and point B can be the end point. Calculate [(x 0 ,y 0 ),......,(x n ,y n )] is the vertical point farthest from the line segment. The calculated vertical point is as follows Figure 6 The white dot shown, the coordinate of this point is (x step0 ,y step0 ). step0 ,y step0 ) can be determined as the target segmentation point corresponding to the weather object to be analyzed. Then, [(x 0 ,y 0 ),(x n ,y n )] and (x step0 ,y step0 ) are combined to obtain the curve fitting point sequence corresponding to the weather object to be analyzed, fit the second-order Bezier curve, and project the second-order Bezier curve onto a binary image with the same resolution as the image, such as Figure 7As shown, the span of the second-order Bezier curve in the y direction is calculated as h, and the span in the x direction is recorded as w. If h is greater than or equal to w, the starting point is the point with the smallest y value. If h is less than w, the starting point is the point with the smallest x value. The coordinate points of the second-order Bezier curve are stored in the list in order according to the determined starting point, and the second coordinate point sequence of the Bezier curve is obtained, which is recorded as [(x b0 ,y b0 ),......,(x bn ,y bn )].

[0087] S204, calculating the iteration loss value corresponding to each historical weather map according to the first coordinate point sequence and the second coordinate point sequence;

[0088] In an embodiment of the present application, when calculating the iterative loss value corresponding to each historical weather map based on the first coordinate point sequence and the second coordinate point sequence, the target distance between each first coordinate point in the first coordinate point sequence and the corresponding second coordinate point in the second coordinate point sequence is first calculated to obtain multiple target distances corresponding to each historical weather map; then the maximum target distance among the multiple target distances corresponding to each historical weather map is determined as the iterative loss value corresponding to each historical weather map.

[0089] In a possible implementation, firstly calculate the first coordinate point sequence [(x 0 ,y 0 ),......,(x n ,y n )] and the second coordinate point sequence [(x b0 ,y b0 ),......,(x bn ,y bn )], find the maximum distance between the same coordinate points max , as the iterative loss value corresponding to each historical weather map.

[0090] S205, iterating the key point sequence corresponding to each historical weather map according to the iteration loss value;

[0091] In the embodiment of the present application, when the key point sequence corresponding to each historical weather map is iterated according to the iteration loss value, specifically when the iteration loss value is less than or equal to the preset threshold, the curve fitting point sequence corresponding to each historical weather map is used as the key point sequence corresponding to each historical weather map; for example, the maximum distance dis max When it is less than or equal to the preset threshold, [(x 0 ,y 0 ),(x step0 ,y step0 ), (x n ,y n)] as the key point sequence corresponding to each historical weather map.

[0092] In the embodiment of the present application, when iterating out the key point sequence corresponding to each historical weather map according to the iterative loss value, specifically when the iterative loss value is greater than the preset threshold, the first coordinate point sequence corresponding to each historical weather map is segmented according to the segmentation point corresponding to each historical weather map to obtain multiple groups of segmentation coordinate point sequences; the Bezier curve is refitted according to the multiple groups of segmentation coordinate point sequences to generate the key point sequence corresponding to each historical weather map. For example, the maximum distance dis max If it is greater than the preset threshold, [(x 0 ,y 0 ),......,(x n ,y n )]From(x step0 ,y step0 ) is split into [(x 0 ,y 0 ),....,(x step0 ,y step0 )] and [(x step0 ,y step0 ),.....,(x n ,y n )], the segmentation points are determined for each group of segmentation coordinate point sequences. The method for determining the segmentation points is the same as the method for determining the target segmentation points corresponding to the weather object to be analyzed, which will not be repeated here. For example, the segmentation points determined for each group of segmentation coordinate point sequences are (x step2 ,y step2 ), (x step3 ,y step3 ), where (x step2 ,y step2 ) is [(x 0 ,y 0 ),....,(x step0 ,y step0 )]Medium distance [(x 0 ,y 0 ),(x step0 ,y step0 )] is the farthest point of the line segment formed by the segmentation points of each group of segmentation coordinate point sequences. At this time, the target curve fitting point sequence is reassembled based on the segmentation points determined by each group of segmentation coordinate point sequences, and the curve fitting point sequence corresponding to the weather object to be analyzed [(x 0 ,y 0 ),(x step0 ,y step0 ), (x n ,y n )] is expanded to the target curve fitting point sequence [(x 0 ,y 0 ),(xstep2 ,y step2 ), (x step0 ,y step0 ), (x step3 ,y step3 ), (x n ,y n )]; At this time, based on the target curve fitting point sequence [(x 0 ,y 0 ),(x step2 ,y step2 ), (x step0 ,y step0 ), (x step3 ,y step3 ), (x n ,y n )] fits a 4th-order Bezier curve; finally, the iteration loss value is recalculated based on the fitted 4th-order Bezier curve. If the iteration loss value is less than the given threshold, the iteration ends and the target curve fitting point sequence is [(x 0 ,y 0 ),(x step2 ,y step2 ), (x step0 ,y step0 ), (x step3 ,y step3 ), (x n ,y n )] as the key point sequence corresponding to each historical weather map. Otherwise, continue to split and iterate until the loss value is less than the given threshold. step2 ,y step2 ), (x step0 ,y step0 ), (x step3 ,y step3 ) Three points, for example Figure 8 shown.

[0093] S206, performing model training according to the key point sequences corresponding to each historical weather map to generate a pre-trained key point recognition model.

[0094] In an embodiment of the present application, after obtaining the key point sequence corresponding to each historical weather map, the key points in the key point sequence corresponding to each historical weather map can be replaced with the data structure of the key point detection network, and the key point detection network can be trained based on the data structure to obtain a pre-trained key point recognition model.

[0095] Specifically, the key point detection network includes but is not limited to yolov8 or MMPose.

[0096] In an embodiment of the present application, the weather object recognition system first crops the area where the weather object exists in the weather map of the target area to obtain a target area map; then the target area map is input into a pre-trained key point recognition model to output a target key point sequence corresponding to the target area map; the pre-trained key point recognition model is generated based on the training of the key point sequence corresponding to each historical weather map; finally, the target weather object corresponding to the target area map is generated according to the target key point sequence. Since the pre-trained key point recognition model in the present application is generated based on the training of the key point sequence corresponding to each historical weather map, the number of key point sequences corresponding to each historical weather map is different, so that the model can output a key point sequence exclusive to each weather map for different weather maps, and a unique weather object for each weather map can be constructed through the key point sequence exclusive to each weather map, thereby improving the recognition accuracy of the weather object.

[0097] The following is a system embodiment of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the system embodiment of the present application, please refer to the method embodiment of the present application.

[0098] See also Fig. 9 , which shows a schematic diagram of the structure of a weather object recognition system provided by an exemplary embodiment of the present application. The weather object recognition system can be implemented as all or part of an electronic device through software, hardware or a combination of both. The system 1 includes a cutting module 10, a processing module 20, and a generating module 30.

[0099] A clipping module 10 is used to clip the area where the weather object exists in the weather map of the target area to obtain a target area map corresponding to the target area;

[0100] The processing module 20 is used to input the target area map into a pre-trained key point recognition model and output a target key point sequence corresponding to the target area map; the pre-trained key point recognition model is generated based on the key point sequence corresponding to each historical weather map;

[0101] The generating module 30 is used to generate the target weather object corresponding to the target area map according to the target key point sequence.

[0102] It should be noted that the weather object identification system provided in the above embodiment only uses the division of the above functional modules as an example when executing the weather object identification method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the weather object identification system provided in the above embodiment and the weather object identification method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0103] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0104] In an embodiment of the present application, the weather object recognition system first crops the area where the weather object exists in the weather map of the target area to obtain a target area map; then the target area map is input into a pre-trained key point recognition model to output a target key point sequence corresponding to the target area map; the pre-trained key point recognition model is generated based on the training of the key point sequence corresponding to each historical weather map; finally, the target weather object corresponding to the target area map is generated according to the target key point sequence. Since the pre-trained key point recognition model in the present application is generated based on the training of the key point sequence corresponding to each historical weather map, the number of key point sequences corresponding to each historical weather map is different, so that the model can output a key point sequence exclusive to each weather map for different weather maps, and a unique weather object for each weather map can be constructed through the key point sequence exclusive to each weather map, thereby improving the recognition accuracy of the weather object.

[0105] The present application also provides a computer-readable medium having program instructions stored thereon, and when the program instructions are executed by a processor, the weather object identification methods provided by the above-mentioned various method embodiments are implemented.

[0106] The present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the weather object identification methods of the above-mentioned various method embodiments.

[0107] See also Fig.10 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.10 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .

[0108] The communication bus 1002 is used to realize the connection and communication between these components.

[0109] The user interface 1003 may include a display screen (Display) and a camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.

[0110] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0111] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts within the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1001 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.

[0112] Among them, the memory 1005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may also be optionally at least one storage system located away from the aforementioned processor 1001. As Fig.10 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a weather object recognition application.

[0113] exist Fig.10In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 1001 can be used to call the weather object recognition application stored in the memory 1005, and specifically perform the following operations:

[0114] In the weather map of the target area, the area where the weather object exists is cut out to obtain the target area map corresponding to the target area;

[0115] Input the target area map into a pre-trained key point recognition model, and output a target key point sequence corresponding to the target area map; wherein the pre-trained key point recognition model is generated based on the key point sequence corresponding to each historical weather map;

[0116] According to the target key point sequence, the target weather object corresponding to the target area map is generated.

[0117] In one embodiment, the processor 1001 further performs the following operations before clipping the area where the weather object exists in the weather map of the target area:

[0118] Determine the weather objects to be analyzed existing in each collected historical weather map, and obtain the weather objects to be analyzed corresponding to each historical weather map;

[0119] Determine the first coordinate point sequence of the weather object to be analyzed corresponding to each historical weather map;

[0120] Generate a Bezier curve corresponding to the weather object to be analyzed and a second coordinate point sequence of the Bezier curve according to the first coordinate point sequence;

[0121] Calculate the iterative loss value corresponding to each historical weather map according to the first coordinate point sequence and the second coordinate point sequence;

[0122] According to the iterative loss value, iterate the key point sequence corresponding to each historical weather map;

[0123] Model training is performed according to the key point sequences corresponding to each historical weather map to generate a pre-trained key point recognition model.

[0124] In one embodiment, when the processor 1001 determines the first coordinate point sequence of the weather object to be analyzed corresponding to each historical weather map, the processor 1001 specifically performs the following operations:

[0125] Calculate the first span of the weather object to be analyzed corresponding to each historical weather map in the vertical axis direction of the preset coordinate system;

[0126] Calculate the second span of the weather object to be analyzed corresponding to each historical weather map in the horizontal axis direction of the preset coordinate system;

[0127] When the first span is greater than or equal to the second span, the coordinate point with the smallest ordinate on the ordinate axis of the preset coordinate system of the weather object to be analyzed is determined as the starting point; or, when the first span is less than the second span, the coordinate point with the smallest ordinate on the ordinate axis of the preset coordinate system of the weather object to be analyzed is determined as the starting point;

[0128] Starting from the starting point, the coordinate points of the weather object to be analyzed are determined in sequence to obtain the first coordinate point sequence corresponding to each historical weather map.

[0129] In one embodiment, when the processor 1001 generates a Bezier curve corresponding to the weather object to be analyzed and a second coordinate point sequence of the Bezier curve according to the first coordinate point sequence, the processor 1001 specifically performs the following operations:

[0130] Connect the first coordinate point and the last coordinate point in the first coordinate point sequence with a straight line to obtain a target line segment corresponding to the weather object to be analyzed;

[0131] Calculate the coordinate point farthest from the target line segment in the first coordinate point sequence to obtain the target segmentation point corresponding to the weather object to be analyzed;

[0132] The first coordinate point, the last coordinate point and the target segmentation point in the first coordinate point sequence are combined to obtain a curve fitting point sequence corresponding to the weather object to be analyzed;

[0133] Fitting a Bezier curve of a preset order according to a curve fitting point sequence corresponding to the weather object to be analyzed to obtain a Bezier curve corresponding to the weather object to be analyzed;

[0134] The coordinate points of the Bezier curve corresponding to the weather object to be analyzed are traversed in sequence to obtain a second coordinate point sequence of the Bezier curve.

[0135] In one embodiment, when the processor 1001 calculates the iterative loss value corresponding to each historical weather map according to the first coordinate point sequence and the second coordinate point sequence, the processor 1001 specifically performs the following operations:

[0136] Calculating the target distance between each first coordinate point in the first coordinate point sequence and the corresponding second coordinate point in the second coordinate point sequence to obtain a plurality of target distances corresponding to each historical weather map;

[0137] The maximum target distance among multiple target distances corresponding to each historical weather map is determined as the iteration loss value corresponding to each historical weather map.

[0138] In one embodiment, when the processor 1001 iterates the key point sequence corresponding to each historical weather map according to the iterative loss value, the processor 1001 specifically performs the following operations:

[0139] When the iteration loss value is less than or equal to the preset threshold, the curve fitting point sequence corresponding to each historical weather map is used as the key point sequence corresponding to each historical weather map; or,

[0140] When the iterative loss value is greater than a preset threshold, the first coordinate point sequence corresponding to each historical weather map is segmented according to the segmentation points corresponding to each historical weather map to obtain multiple groups of segmentation coordinate point sequences; the Bezier curve is refitted according to the multiple groups of segmentation coordinate point sequences to generate a key point sequence corresponding to each historical weather map.

[0141] In one embodiment, when the processor 1001 generates the target weather object corresponding to the target area map according to the target key point sequence, the processor 1001 specifically performs the following operations:

[0142] Generate a Bezier curve corresponding to the target area map according to the target key point sequence;

[0143] The Bezier curve corresponding to the target area graph is used as the target weather object corresponding to the target area graph.

[0144] In an embodiment of the present application, the weather object recognition system first crops the area where the weather object exists in the weather map of the target area to obtain a target area map; then the target area map is input into a pre-trained key point recognition model to output a target key point sequence corresponding to the target area map; the pre-trained key point recognition model is generated based on the training of the key point sequence corresponding to each historical weather map; finally, the target weather object corresponding to the target area map is generated according to the target key point sequence. Since the pre-trained key point recognition model in the present application is generated based on the training of the key point sequence corresponding to each historical weather map, the number of key point sequences corresponding to each historical weather map is different, so that the model can output a key point sequence exclusive to each weather map for different weather maps, and a unique weather object for each weather map can be constructed through the key point sequence exclusive to each weather map, thereby improving the recognition accuracy of the weather object.

[0145] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the weather object recognition program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium of the weather object recognition program can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0146] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A weather object recognition method, characterized in that: The method comprises: In the weather map of the target area, the area where the weather object exists is cut out to obtain a target area map corresponding to the target area; Input the target area map into a pre-trained key point recognition model, and output a target key point sequence corresponding to the target area map; wherein the pre-trained key point recognition model is generated based on the key point sequence training corresponding to each historical weather map; the pre-trained key point recognition model is a mathematical model that can determine the key points; Generating a target weather object corresponding to the target area map according to the target key point sequence; Wherein, before clipping the area where the weather object exists in the weather map of the target area, the method further includes: Determine the weather objects to be analyzed existing in each collected historical weather map, and obtain the weather objects to be analyzed corresponding to each historical weather map; Determine a first coordinate point sequence of the weather object to be analyzed corresponding to each of the historical weather maps; generating, according to the first coordinate point sequence, a Bezier curve corresponding to the weather object to be analyzed and a second coordinate point sequence of the Bezier curve; Calculating the iteration loss values ​​corresponding to each of the historical weather maps according to the first coordinate point sequence and the second coordinate point sequence; Iterating the key point sequences corresponding to the historical weather maps according to the iterative loss values; Model training is performed according to the key point sequences corresponding to the historical weather maps to generate a pre-trained key point recognition model; wherein, The step of determining a first coordinate point sequence of the weather object to be analyzed corresponding to each of the historical weather maps comprises: Calculating a first span of the weather object to be analyzed corresponding to each of the historical weather maps in the vertical axis direction of the preset coordinate system; Calculating a second span of the weather object to be analyzed corresponding to each of the historical weather maps in the direction of the horizontal axis of the preset coordinate system; When the first span is greater than or equal to the second span, the coordinate point with the smallest ordinate of the weather object to be analyzed on the ordinate axis of the preset coordinate system is determined as the starting point; or, when the first span is less than the second span, the coordinate point with the smallest ordinate of the weather object to be analyzed on the ordinate axis of the preset coordinate system is determined as the starting point; Starting from the starting point, the coordinate points of the weather object to be analyzed are determined in sequence to obtain a first coordinate point sequence corresponding to each historical weather map; wherein, The step of generating, according to the first coordinate point sequence, a Bezier curve corresponding to the weather object to be analyzed and a second coordinate point sequence of the Bezier curve comprises: Connecting the first coordinate point and the last coordinate point in the first coordinate point sequence with a straight line to obtain a target line segment corresponding to the weather object to be analyzed; Calculate the coordinate point farthest from the target line segment in the first coordinate point sequence to obtain the target segmentation point corresponding to the weather object to be analyzed; Combine the first coordinate point, the last coordinate point and the target segmentation point in the first coordinate point sequence to obtain a curve fitting point sequence corresponding to the weather object to be analyzed; Fitting a Bezier curve of a preset order according to the curve fitting point sequence corresponding to the weather object to be analyzed, to obtain the Bezier curve corresponding to the weather object to be analyzed; The coordinate points of the Bezier curve corresponding to the weather object to be analyzed are traversed in sequence to obtain a second coordinate point sequence of the Bezier curve.

2. The method according to claim 1, characterized in that The calculating, according to the first coordinate point sequence and the second coordinate point sequence, the iteration loss value corresponding to each historical weather map comprises: Calculating the target distance between each first coordinate point in the first coordinate point sequence and the corresponding second coordinate point in the second coordinate point sequence to obtain a plurality of target distances corresponding to each of the historical weather maps; The maximum target distance among the multiple target distances corresponding to the historical weather maps is determined as the iteration loss value corresponding to the historical weather maps.

3. The method according to claim 1, characterized in that The iterating out the key point sequence corresponding to each historical weather map according to the iterative loss value comprises: When the iteration loss value is less than or equal to a preset threshold, the curve fitting point sequence corresponding to each historical weather map is used as the key point sequence corresponding to each historical weather map; or When the iterative loss value is greater than a preset threshold, the first coordinate point sequence corresponding to each historical weather map is segmented according to the segmentation points corresponding to each historical weather map to obtain multiple groups of segmented coordinate point sequences; the Bezier curve is refitted according to the multiple groups of segmented coordinate point sequences to generate a key point sequence corresponding to each historical weather map.

4. The method according to claim 1, characterized in that: The step of generating a target weather object corresponding to the target area map according to the target key point sequence includes: Generating a Bezier curve corresponding to the target area map according to the target key point sequence; The Bezier curve corresponding to the target area graph is used as the target weather object corresponding to the target area graph.

5. A weather object recognition system, characterized in that: The system comprises: A clipping module, used for clipping the area where the weather object exists in the weather map of the target area, to obtain a target area map corresponding to the target area; A processing module, used for inputting the target area map into a pre-trained key point recognition model, and outputting a target key point sequence corresponding to the target area map; the pre-trained key point recognition model is generated based on the key point sequence corresponding to each historical weather map; the pre-trained key point recognition model is a mathematical model capable of determining key points; A generating module, used for generating a target weather object corresponding to the target area map according to the target key point sequence; Wherein, the weather object identification system is also specifically used for: Determine the weather objects to be analyzed existing in each collected historical weather map, and obtain the weather objects to be analyzed corresponding to each historical weather map; Determine a first coordinate point sequence of the weather object to be analyzed corresponding to each of the historical weather maps; generating, according to the first coordinate point sequence, a Bezier curve corresponding to the weather object to be analyzed and a second coordinate point sequence of the Bezier curve; Calculating the iteration loss values ​​corresponding to each of the historical weather maps according to the first coordinate point sequence and the second coordinate point sequence; Iterating the key point sequences corresponding to the historical weather maps according to the iterative loss values; Model training is performed according to the key point sequences corresponding to the historical weather maps to generate a pre-trained key point recognition model; wherein, The step of determining a first coordinate point sequence of the weather object to be analyzed corresponding to each of the historical weather maps comprises: Calculating a first span of the weather object to be analyzed corresponding to each of the historical weather maps in the vertical axis direction of the preset coordinate system; Calculating a second span of the weather object to be analyzed corresponding to each of the historical weather maps in the direction of the horizontal axis of the preset coordinate system; When the first span is greater than or equal to the second span, the coordinate point with the smallest ordinate of the weather object to be analyzed on the ordinate axis of the preset coordinate system is determined as the starting point; or, when the first span is less than the second span, the coordinate point with the smallest ordinate of the weather object to be analyzed on the ordinate axis of the preset coordinate system is determined as the starting point; Starting from the starting point, the coordinate points of the weather object to be analyzed are determined in sequence to obtain a first coordinate point sequence corresponding to each historical weather map; wherein, The step of generating, according to the first coordinate point sequence, a Bezier curve corresponding to the weather object to be analyzed and a second coordinate point sequence of the Bezier curve comprises: Connecting the first coordinate point and the last coordinate point in the first coordinate point sequence with a straight line to obtain a target line segment corresponding to the weather object to be analyzed; Calculate the coordinate point farthest from the target line segment in the first coordinate point sequence to obtain the target segmentation point corresponding to the weather object to be analyzed; Combine the first coordinate point, the last coordinate point and the target segmentation point in the first coordinate point sequence to obtain a curve fitting point sequence corresponding to the weather object to be analyzed; Fitting a Bezier curve of a preset order according to the curve fitting point sequence corresponding to the weather object to be analyzed, to obtain the Bezier curve corresponding to the weather object to be analyzed; The coordinate points of the Bezier curve corresponding to the weather object to be analyzed are traversed in sequence to obtain a second coordinate point sequence of the Bezier curve.

6. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 4.

7. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method according to any one of claims 1 to 4.