Method, device, equipment and storage medium for predicting dangerous areas
Through data matching and feature data set fusion, the hazardous areas are identified using regional prediction models, which solves the problems of low efficiency and poor generalization of the hydrological model, and realizes efficient prediction of natural disaster disasters and is suitable for complex urban surface environments.
Patent Information
- Application Number
- CN202111519161.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-12-13
AI Technical Summary
Existing hydrological models are inefficient and poorly generalized in the prediction of natural disaster-affected areas, making them difficult to apply in a large range, and require multiple incoming data, especially in complex urban surfaces, which are difficult to obtain and calibrate.
By obtaining precipitation-related data and risk-related data, data matching and feature data set construction are carried out, data fusion is carried out in combination with regional reference maps, region prediction is used to predict the region, pixel count and loss value are counted, and standard region prediction is output. model, and then identify the hazardous area in the image to be identified.
The efficiency of predicting hazardous areas has been improved, the workload of model parameter adjustment has been reduced, the calculation efficiency has been improved, and practical guidance has been provided for pre-disaster warning and personnel and material allocation.
Smart Images

Figure CN114186743B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, electronic device and computer-readable storage medium for predicting a dangerous area. Background Art
[0002] In the insurance field, it is usually necessary to carry out refined early warning and targeted deployment of personnel and materials based on the scope of natural disasters known in advance, so as to carry out rescue as soon as possible in the disaster and minimize the losses caused by the disaster. The existing prediction method for the scope of the disaster-stricken area usually uses a hydrological model to model water accumulation under given precipitation conditions. The hydrological model itself requires a large number of inputs, many of which, such as pipe network data, are difficult to obtain, and the urban surface is relatively complex, which poses a great challenge to the calibration of hydrological model parameters. In addition, the hydrological model has poor generalization and is difficult to apply on a large scale. Therefore, it is urgent to propose a more efficient method for predicting the risk area. Summary of the invention
[0003] The present invention provides a method and device for predicting a dangerous area, and a computer-readable storage medium, the main purpose of which is to improve the efficiency of predicting a dangerous area.
[0004] To achieve the above object, the present invention provides a method for predicting a dangerous area, comprising:
[0005] Acquire precipitation-related data and accident-related data, and use the accident-related data to perform data matching on the precipitation-related data to obtain standard accident-related data;
[0006] Constructing a feature data set based on the precipitation-related data and the standard accident data;
[0007] Acquire a preset regional reference map, and fuse the feature data set with the regional reference map to obtain a standard reference map;
[0008] Performing regional prediction on the standard reference image using a preset regional prediction model to obtain a regional prediction image;
[0009] Counting the number of pixels in the regional prediction image, and calculating a loss value based on the number of pixels and a preset loss function, and outputting a standard regional prediction model according to the difference between the loss value and a preset loss threshold;
[0010] An image to be identified is obtained, and the image to be identified is input into the standard area prediction model to obtain a risk area of the image to be identified.
[0011] Optionally, performing regional prediction on the standard reference image using a preset regional prediction model to obtain a regional prediction image includes:
[0012] Based on a preset compression level, the standard reference image is respectively subjected to convolution compression to obtain a first compressed image, a second compressed image, a third compressed image, and a fourth compressed image;
[0013] Inputting the first compressed image into a first semantic segmentation module in the region prediction model to obtain a first semantic image;
[0014] Inputting the first semantic map and the second compressed map into a second semantic segmentation module in the region prediction model to obtain a second semantic map;
[0015] Inputting the second semantic map and the third compressed map into a third semantic segmentation module in the region prediction model to obtain a third semantic map;
[0016] The third semantic map and the fourth compressed map are input into a fourth semantic segmentation module in the region prediction model to obtain a region prediction image.
[0017] Optionally, the step of inputting the first semantic map and the second compressed map into a second semantic segmentation module in the region prediction model to obtain a second semantic map includes:
[0018] Using the residual convolution unit in the second semantic segmentation module to extract information from the first semantic map and the second compressed map respectively, to obtain residual information corresponding to the first semantic map and the second compressed map;
[0019] Using a multi-resolution fusion unit to perform multi-resolution fusion on the residual information to obtain fusion information;
[0020] The fusion information is pooled based on the chain residual pooling unit in the second semantic segmentation module to obtain a second semantic map.
[0021] Optionally, the calculating the loss value based on the number of pixels and a preset loss function includes:
[0022]
[0023] in, is the loss value, The number of pixels in the image labeled as positive for the region prediction, is the number of predicted positive pixels, is the number of pixels that are labeled positive and predicted to be positive.
[0024] Optionally, before fusing the feature data set with the regional reference map, the method further includes:
[0025] Cutting the regional reference image into a plurality of regional sub-images of preset sizes;
[0026] De-noising is performed on the plurality of region sub-images respectively to obtain de-noised sub-images.
[0027] Optionally, constructing a feature data set based on the precipitation-related data and the standard accident data includes:
[0028] Performing time correction and discretization processing on the precipitation-related data to obtain a plurality of standard precipitation intervals;
[0029] The frequencies of the standard accident data in the plurality of standard precipitation intervals are counted, and the plurality of standard precipitation intervals and the frequencies are summarized to obtain a feature data set.
[0030] Optionally, the using the accident-related data to perform data matching on the precipitation-related data to obtain standard accident data includes:
[0031] Extracting the accident location data and the accident time data corresponding to the accident location data from the accident related data, and performing time correction on the accident time to obtain a standard accident time;
[0032] The precipitation-related data is matched with the accident location data based on a preset precipitation mapping table, and the accident time data is marked to obtain standard accident data.
[0033] In order to solve the above problems, the present invention further provides a device for predicting a dangerous area, the device comprising:
[0034] A data processing module, used to obtain precipitation-related data and accident-related data, use the accident-related data to perform data matching on the precipitation-related data to obtain standard accident data, and construct a feature data set based on the precipitation-related data and the standard accident data;
[0035] A data fusion module is used to obtain a preset regional reference map, and fuse the feature data set with the regional reference map to obtain a standard reference map;
[0036] A model training module, used to perform regional prediction on the standard reference image using a preset regional prediction model to obtain a regional prediction image, count the number of pixels in the regional prediction image, and calculate a loss value based on the number of pixels and a preset loss function, and output a standard regional prediction model according to the size between the loss value and a preset loss threshold;
[0037] The area prediction module is used to obtain the image to be identified, input the image to be identified into the standard area prediction model, and obtain the risk area of the image to be identified.
[0038] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0039] at least one processor; and,
[0040] a memory communicatively connected to the at least one processor; wherein,
[0041] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned dangerous area prediction method.
[0042] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned dangerous area prediction method.
[0043] The embodiment of the present invention uses accident-related data to match precipitation-related data, and the obtained standard accident data includes the connection between accident-related data and precipitation-related data. A feature data set is constructed based on precipitation-related data and standard accident data, and the feature data set includes multiple feature data. The feature data set is data-fused with a regional reference map, and the feature data is intuitively displayed on the regional reference map. The standard reference map is regionally predicted using a preset regional prediction model to obtain a regional prediction image, and a loss value is calculated based on the number of pixels in the regional prediction image and a preset loss function. The standard regional prediction model is output according to the size between the loss value and the preset loss threshold. The image to be identified is regionally predicted according to the standard regional prediction model, which can improve the efficiency of accident area prediction. Therefore, the accident area prediction method, device, electronic device and computer-readable storage medium proposed in the present invention can solve the problem of insufficient efficiency of accident area prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of a flow chart of a method for predicting a dangerous area provided by an embodiment of the present invention;
[0045] Figure 2 A functional module diagram of a risk area prediction device provided by an embodiment of the present invention;
[0046] Figure 3 A schematic diagram of the structure of an electronic device for implementing the risk area prediction method provided by an embodiment of the present invention.
[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0049] The embodiment of the present application provides a method for predicting a dangerous area. The execution subject of the method for predicting a dangerous area includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for predicting a dangerous area can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0050] Reference Figure 1 FIG. 1 is a flow chart of a method for predicting a dangerous area according to an embodiment of the present invention. In this embodiment, the method for predicting a dangerous area includes:
[0051] S1. Obtain precipitation-related data and accident-related data, and use the accident-related data to perform data matching on the precipitation-related data to obtain standard accident-related data.
[0052] In an embodiment of the present invention, the precipitation-related data may be a 1x1km grid reanalysis of daily precipitation data from 2020 to the present, and the accident-related data may be national auto insurance claim data from 2020 to the present and national auto insurance underwriting data from 2020 to the present. The precipitation-related data and the accident-related data are not limited here.
[0053] Specifically, the using the accident-related data to perform data matching on the precipitation-related data to obtain standard accident data includes:
[0054] Extracting the accident location data and the accident time data corresponding to the accident location data from the accident related data, and performing time correction on the accident time to obtain a standard accident time;
[0055] The precipitation-related data is matched with the accident location data based on a preset precipitation mapping table, and the accident time data is marked to obtain standard accident data.
[0056] In detail, since the accident date may have a long tail phenomenon, it is necessary to perform time correction processing on the accident time. The average precipitation of 3x3km in the area where the accident point is located can be used as the precipitation intensity, and the accident date can be adjusted to the date with the largest precipitation intensity in the interval [T-3, T+1]. According to the date and location of the accident data, the corresponding precipitation is matched to the accident point.
[0057] S2. Constructing a feature data set based on the precipitation-related data and the standard accident data.
[0058] In the embodiment of the present invention, the step of constructing a feature data set based on the precipitation-related data and the standard accident data includes:
[0059] Performing time correction and discretization processing on the precipitation-related data to obtain a plurality of standard precipitation intervals;
[0060] The frequencies of the standard accident data in the plurality of standard precipitation intervals are counted, and the plurality of standard precipitation intervals and the frequencies are summarized to obtain a feature data set.
[0061] Specifically, the time correction and discretization processing of the standard precipitation data is to discretize the time-corrected precipitation into multiple intervals, for example, multiple intervals are (0,10], (10,50], (50,100], (100,200], (200, ). The frequency of the standard accident data in the plurality of standard precipitation intervals is counted according to the precipitation interval, and the frequency of the standard accident data in the region (0,10], (10,50], (50,100], (100,200], (200, ) plus the total number of accidents in history.
[0062] S3. Obtain a preset regional reference map, and fuse the feature data set with the regional reference map to obtain a standard reference map.
[0063] In the embodiment of the present invention, the regional reference map may refer to a map covering the whole country, or a map covering a specific province. The regional reference map is selected and obtained according to the actual needs of the prediction of the risk area, and the acquisition of the preset regional reference map is not limited here.
[0064] Specifically, before fusing the feature data set with the regional reference map, the method further includes:
[0065] Cutting the regional reference image into a plurality of regional sub-images of preset sizes;
[0066] De-noising is performed on the plurality of region sub-images respectively to obtain de-noised sub-images.
[0067] In detail, the preset size is The denoising process mainly refers to removing samples with no precipitation or little precipitation, removing samples with a cumulative number of accidents <= 1, and removing accidents caused by known flood events.
[0068] Among them, no or little precipitation is unlikely to cause accidents in theory, so they can be directly eliminated. Even if there are samples of accidents, the accidents may be caused by non-precipitation directly, or the accident address deviation and other data are all considered as noise and eliminated. Daily precipitation <30mm is considered as a small amount of precipitation. The number of historical accidents in the region is <=1, and the amount of historical information is insufficient. It is impossible to predict the current amount of accidents through the information of historical accidents, so it is directly eliminated. Some special sudden disaster events are eliminated. Flood events are not simply caused by the precipitation at the danger point. The causes are more complicated, and it is difficult to directly predict accidents through precipitation.
[0069] Furthermore, fusing the feature data set with the regional reference map refers to marking the feature data in the feature data set at corresponding positions on the regional reference map.
[0070] S4. Perform regional prediction on the standard reference image using a preset regional prediction model to obtain a regional prediction image.
[0071] In an embodiment of the present invention, the preset region prediction model is a refinenet model, wherein the refinenet model uses a large number of renet blocks and identity mapping between different refinenet modules. These operations retain a large number of original details of the image, thereby improving the accuracy of pixel-level prediction.
[0072] Specifically, the using a preset regional prediction model to perform regional prediction on the standard reference image to obtain a regional prediction image includes:
[0073] Based on a preset compression level, the standard reference image is respectively subjected to convolution compression to obtain a first compressed image, a second compressed image, a third compressed image, and a fourth compressed image;
[0074] Inputting the first compressed image into a first semantic segmentation module in the region prediction model to obtain a first semantic image;
[0075] Inputting the first semantic map and the second compressed map into a second semantic segmentation module in the region prediction model to obtain a second semantic map;
[0076] Inputting the second semantic map and the third compressed map into a third semantic segmentation module in the region prediction model to obtain a third semantic map;
[0077] The third semantic map and the fourth compressed map are input into a fourth semantic segmentation module in the region prediction model to obtain a region prediction image.
[0078] In detail, the compression level is , , , , so based on the preset compression level, the standard reference image is convolutionally compressed, and the compression level is obtained as The first compression map of The second compression map, the compression level is The third compression map and the compression level are The region prediction model includes a plurality of semantic segmentation modules, and the input of the semantic segmentation module is usually the compressed information of the original image and the information extracted by the high-order semantic segmentation module.
[0079] Furthermore, the step of inputting the first semantic map and the second compressed map into a second semantic segmentation module in the region prediction model to obtain a second semantic map includes:
[0080] Using the residual convolution unit in the second semantic segmentation module to extract information from the first semantic map and the second compressed map respectively, to obtain residual information corresponding to the first semantic map and the second compressed map;
[0081] Using the multi-resolution fusion unit to perform multi-resolution fusion on the residual information to obtain fusion information;
[0082] The fusion information is pooled based on the chain residual pooling unit in the second semantic segmentation module to obtain a second semantic map.
[0083] In detail, the second semantic segmentation module includes a residual convolution unit (RCU), a multi-resolution fusion unit and a chained residual pooling unit. The residual convolution unit includes a ReLU layer and a convolution layer. In the network structure, two series-connected RCU modules are applied at each resolution to extract the residual of the segmentation result at that resolution. The multi-resolution fusion unit processes the input segmentation results at different resolutions through a convolution layer, thereby learning the adaptive weights of each channel. Subsequently, upsampling is applied to unify the segmentation results of all channels, and the results of each channel are summed to obtain a fusion result. The chained residual pooling unit is mainly composed of a residual structure, a pooling layer and a convolution layer. The pooling layer plus the convolution layer are used to learn the residual for correction.
[0084] S5. Count the number of pixels in the regional prediction image, and calculate a loss value based on the number of pixels and a preset loss function, and output a standard regional prediction model according to the size between the loss value and a preset loss threshold.
[0085] In the embodiment of the present invention, counting the number of pixels in the regional prediction image refers to summing up the number of pixels in different regions of the regional prediction image.
[0086] Specifically, the loss value is calculated based on the number of pixels and a preset loss function, including:
[0087]
[0088] in, is the loss value, The number of pixels in the image labeled as positive for the region prediction, is the number of predicted positive pixels, is the number of pixels that are labeled positive and predicted to be positive.
[0089] Furthermore, a standard regional prediction model is output according to the size between the loss value and a preset loss threshold; if the loss value is less than the loss threshold, the regional prediction model is output as the standard regional prediction model; if the loss value is greater than or equal to the loss threshold, the model parameters of the regional prediction model are adjusted until the loss value is less than the loss threshold, and the regional prediction model with adjusted model parameters is used as the standard regional prediction model.
[0090] In detail, since there are relatively fewer dangerous areas than non-dangerous areas, there is a significant sample imbalance problem. Therefore, the original cross entropy loss of refinenet is changed to dice loss to improve the training effect of sample imbalance data.
[0091] S6. Acquire an image to be identified, input the image to be identified into the standard area prediction model, and obtain a risk area of the image to be identified.
[0092] In the embodiment of the present invention, the image to be identified is a pre-disaster city map. The image to be identified is input into the standard area prediction model, and multiple risk areas in the image to be identified can be identified. In the insurance scenario, if the approximate disaster-affected area can be known before the disaster, detailed warning and targeted personnel and material deployment can be carried out in advance, so as to carry out rescue as soon as possible during the disaster and minimize the losses caused by the disaster.
[0093] In detail, this solution uses a generalized model to predict the approximate range of accidents caused by precipitation across the country. Compared with the hydrological model, it greatly reduces the workload of model parameter adjustment and improves the calculation efficiency of the model, providing practical guidance for targeted pre-disaster warnings and personnel and material allocation of insurance.
[0094] The embodiment of the present invention uses accident-related data to perform data matching on precipitation-related data, and the obtained standard accident data includes the connection between accident-related data and precipitation-related data. A feature data set is constructed based on precipitation-related data and standard accident data, and the feature data set includes multiple feature data. The feature data set is data-fused with a regional reference map, and the feature data is intuitively displayed on the regional reference map. A regional prediction is performed on the standard reference map using a preset regional prediction model to obtain a regional prediction image, and a loss value is calculated based on the number of pixels in the regional prediction image and a preset loss function. A standard regional prediction model is output based on the size between the loss value and a preset loss threshold. Regional prediction is performed on the image to be identified based on the standard regional prediction model, and the efficiency of accident area prediction can be improved. Therefore, the accident area prediction method proposed in the present invention can solve the problem of insufficient efficiency of accident area prediction.
[0095] like Figure 2 , which is a functional module diagram of a risk area prediction device provided by an embodiment of the present invention.
[0096] The danger area prediction device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the danger area prediction device 100 may include a data processing module 101, a data fusion module 102, a model training module 103 and an area prediction module 104. The module of the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, and is stored in the memory of the electronic device.
[0097] In this embodiment, the functions of each module / unit are as follows:
[0098] The data processing module 101 is used to obtain precipitation-related data and accident-related data, use the accident-related data to perform data matching on the precipitation-related data to obtain standard accident data, and construct a feature data set based on the precipitation-related data and the standard accident data;
[0099] The data fusion module 102 is used to obtain a preset regional reference map, and perform data fusion on the feature data set and the regional reference map to obtain a standard reference map;
[0100] The model training module 103 is used to perform regional prediction on the standard reference image using a preset regional prediction model to obtain a regional prediction image, count the number of pixels in the regional prediction image, and calculate a loss value based on the number of pixels and a preset loss function, and output a standard regional prediction model according to the difference between the loss value and a preset loss threshold;
[0101] The region prediction module 104 is used to obtain the image to be identified, input the image to be identified into the standard region prediction model, and obtain the risk region of the image to be identified.
[0102] In detail, the specific implementation of each module of the risk area prediction device 100 is as follows:
[0103] Step 1: Obtain precipitation-related data and accident-related data, and use the accident-related data to perform data matching on the precipitation-related data to obtain standard accident data.
[0104] In an embodiment of the present invention, the precipitation-related data can be a 1x1km grid reanalysis of daily precipitation data from 2020 to the present, and the accident-related data can be the national motor insurance claim data from 2020 to the present and the national motor insurance underwriting data from 2020 to the present. The precipitation-related data and the accident-related data are not limited here.
[0105] Specifically, the using the accident-related data to perform data matching on the precipitation-related data to obtain standard accident data includes:
[0106] Extracting the accident location data and the accident time data corresponding to the accident location data from the accident related data, and performing time correction on the accident time to obtain a standard accident time;
[0107] The precipitation-related data is matched with the accident location data based on a preset precipitation mapping table, and the accident time data is marked to obtain standard accident data.
[0108] In detail, since the accident date may have a long tail phenomenon, it is necessary to perform time correction processing on the accident time. The average precipitation of 3x3km in the area where the accident point is located can be used as the precipitation intensity, and the accident date can be adjusted to the date with the largest precipitation intensity in the interval [T-3, T+1]. According to the date and location of the accident data, the corresponding precipitation is matched to the accident point.
[0109] Step 2: construct a feature data set based on the precipitation-related data and the standard accident data.
[0110] In the embodiment of the present invention, the step of constructing a feature data set based on the precipitation-related data and the standard accident data includes:
[0111] Performing time correction and discretization processing on the precipitation-related data to obtain a plurality of standard precipitation intervals;
[0112] The frequencies of the standard accident data in the plurality of standard precipitation intervals are counted, and the plurality of standard precipitation intervals and the frequencies are summarized to obtain a feature data set.
[0113] Specifically, the time correction and discretization processing of the standard precipitation data is to discretize the time-corrected precipitation into multiple intervals, for example, multiple intervals are (0,10], (10,50], (50,100], (100,200], (200, ). The frequency of the standard accident data in the plurality of standard precipitation intervals is counted according to the precipitation interval, and the frequency of the standard accident data in the region (0,10], (10,50], (50,100], (100,200], (200, ) plus the total number of accidents in history.
[0114] Step 3: Obtain a preset regional reference map, fuse the feature data set with the regional reference map, and obtain a standard reference map.
[0115] In the embodiment of the present invention, the regional reference map may refer to a map covering the whole country, or a map covering a specific province. The regional reference map is selected and obtained according to the actual needs of the prediction of the risk area, and the acquisition of the preset regional reference map is not limited here.
[0116] Specifically, before fusing the feature data set with the regional reference map, the following steps are further performed:
[0117] Cutting the regional reference image into a plurality of regional sub-images of preset sizes;
[0118] De-noising is performed on the plurality of region sub-images respectively to obtain de-noised sub-images.
[0119] In detail, the preset size is The denoising process mainly refers to removing samples with no precipitation or little precipitation, removing samples with a cumulative number of accidents <= 1, and removing accidents caused by known flood events.
[0120] Among them, no or little precipitation is unlikely to cause accidents in theory, so they can be directly eliminated. Even if there are samples of accidents, the accidents may be caused by non-precipitation directly, or the accident address deviation and other data are all considered as noise and eliminated. Daily precipitation <30mm is considered as a small amount of precipitation. The number of historical accidents in the region is <=1, and the amount of historical information is insufficient. It is impossible to predict the current amount of accidents through the information of historical accidents, so it is directly eliminated. Some special sudden disaster events are eliminated. Flood events are not simply caused by the precipitation at the danger point. The causes are more complicated, and it is difficult to directly predict accidents through precipitation.
[0121] Furthermore, fusing the feature data set with the regional reference map refers to marking the feature data in the feature data set at corresponding positions on the regional reference map.
[0122] Step 4: Use a preset regional prediction model to perform regional prediction on the standard reference image to obtain a regional prediction image.
[0123] In an embodiment of the present invention, the preset region prediction model is a refinenet model, wherein the refinenet model uses a large number of renet blocks and identity mapping between different refinenet modules. These operations retain a large number of original details of the image, thereby improving the accuracy of pixel-level prediction.
[0124] Specifically, the using a preset regional prediction model to perform regional prediction on the standard reference image to obtain a regional prediction image includes:
[0125] Based on a preset compression level, the standard reference image is respectively subjected to convolution compression to obtain a first compressed image, a second compressed image, a third compressed image, and a fourth compressed image;
[0126] Inputting the first compressed image into a first semantic segmentation module in the region prediction model to obtain a first semantic image;
[0127] Inputting the first semantic map and the second compressed map into a second semantic segmentation module in the region prediction model to obtain a second semantic map;
[0128] Inputting the second semantic map and the third compressed map into a third semantic segmentation module in the region prediction model to obtain a third semantic map;
[0129] The third semantic map and the fourth compressed map are input into a fourth semantic segmentation module in the region prediction model to obtain a region prediction image.
[0130] In detail, the compression level is , , , , so based on the preset compression level, the standard reference image is convolutionally compressed, and the compression level is obtained as The first compression map of The second compression map, the compression level is The third compression map and the compression level are The region prediction model includes a plurality of semantic segmentation modules, and the input of the semantic segmentation module is usually the compressed information of the original image and the information extracted by the high-order semantic segmentation module.
[0131] Furthermore, the step of inputting the first semantic map and the second compressed map into a second semantic segmentation module in the region prediction model to obtain a second semantic map includes:
[0132] Using the residual convolution unit in the second semantic segmentation module to extract information from the first semantic map and the second compressed map respectively, to obtain residual information corresponding to the first semantic map and the second compressed map;
[0133] Using the multi-resolution fusion unit to perform multi-resolution fusion on the residual information to obtain fusion information;
[0134] The fusion information is pooled based on the chain residual pooling unit in the second semantic segmentation module to obtain a second semantic map.
[0135] In detail, the second semantic segmentation module includes a residual convolution unit (RCU), a multi-resolution fusion unit and a chained residual pooling unit. The residual convolution unit includes a ReLU layer and a convolution layer. In the network structure, two series-connected RCU modules are applied at each resolution to extract the residual of the segmentation result at that resolution. The multi-resolution fusion unit processes the input segmentation results at different resolutions through a convolution layer, thereby learning the adaptive weights of each channel. Subsequently, upsampling is applied to unify the segmentation results of all channels, and the results of each channel are summed to obtain a fusion result. The chained residual pooling unit is mainly composed of a residual structure, a pooling layer and a convolution layer. The pooling layer plus the convolution layer are used to learn the residual for correction.
[0136] Step 5: Count the number of pixels in the regional prediction image, and calculate a loss value based on the number of pixels and a preset loss function, and output a standard regional prediction model according to the size between the loss value and a preset loss threshold.
[0137] In the embodiment of the present invention, counting the number of pixels in the regional prediction image refers to summing up the number of pixels in different regions of the regional prediction image.
[0138] Specifically, the loss value is calculated based on the number of pixels and a preset loss function, including:
[0139]
[0140] in, is the loss value, The number of pixels in the image labeled as positive for the region prediction, is the number of predicted positive pixels, is the number of pixels that are labeled positive and predicted to be positive.
[0141] Furthermore, a standard regional prediction model is output according to the size between the loss value and a preset loss threshold; if the loss value is less than the loss threshold, the regional prediction model is output as the standard regional prediction model; if the loss value is greater than or equal to the loss threshold, the model parameters of the regional prediction model are adjusted until the loss value is less than the loss threshold, and the regional prediction model with adjusted model parameters is used as the standard regional prediction model.
[0142] In detail, since there are relatively fewer dangerous areas than non-dangerous areas, there is a significant sample imbalance problem. Therefore, the original cross entropy loss of refinenet is changed to dice loss to improve the training effect of sample imbalance data.
[0143] Step 6: Obtain the image to be identified, input the image to be identified into the standard area prediction model, and obtain the risk area of the image to be identified.
[0144] In the embodiment of the present invention, the image to be identified is a pre-disaster city map. The image to be identified is input into the standard area prediction model, and multiple risk areas in the image to be identified can be identified. In the insurance scenario, if the approximate disaster-affected area can be known before the disaster, detailed warning and targeted personnel and material deployment can be carried out in advance, so as to carry out rescue as soon as possible during the disaster and minimize the losses caused by the disaster.
[0145] In detail, this solution uses a generalized model to predict the approximate range of accidents caused by precipitation across the country. Compared with the hydrological model, it greatly reduces the workload of model parameter adjustment and improves the calculation efficiency of the model, providing practical guidance for targeted pre-disaster warnings and personnel and material allocation of insurance.
[0146] The embodiment of the present invention uses accident-related data to perform data matching on precipitation-related data, and the obtained standard accident data includes the connection between accident-related data and precipitation-related data. A feature data set is constructed based on precipitation-related data and standard accident data, and the feature data set includes multiple feature data. The feature data set is data-fused with a regional reference map, and the feature data is intuitively displayed on the regional reference map. A regional prediction is performed on the standard reference map using a preset regional prediction model to obtain a regional prediction image, and a loss value is calculated based on the number of pixels in the regional prediction image and a preset loss function. A standard regional prediction model is output based on the size between the loss value and a preset loss threshold. Regional prediction is performed on the image to be identified based on the standard regional prediction model, and the efficiency of accident area prediction can be improved. Therefore, the accident area prediction device proposed by the present invention can solve the problem of insufficient efficiency of accident area prediction.
[0147] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a method for predicting a dangerous area provided by an embodiment of the present invention.
[0148] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a dangerous area prediction program.
[0149] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions and processes data of the electronic device by running or executing programs or modules stored in the memory 11 (for example, executing a risk area prediction program, etc.), and calling data stored in the memory 11.
[0150] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the danger area prediction program, but also be used to temporarily store data that has been output or is to be output.
[0151] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0152] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0153] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0154] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0155] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0156] The dangerous area prediction program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0157] Acquire precipitation-related data and accident-related data, and use the accident-related data to perform data matching on the precipitation-related data to obtain standard accident-related data;
[0158] Constructing a feature data set based on the precipitation-related data and the standard accident data;
[0159] Acquire a preset regional reference map, and fuse the feature data set with the regional reference map to obtain a standard reference map;
[0160] Performing regional prediction on the standard reference image using a preset regional prediction model to obtain a regional prediction image;
[0161] Counting the number of pixels in the regional prediction image, and calculating a loss value based on the number of pixels and a preset loss function, and outputting a standard regional prediction model according to the difference between the loss value and a preset loss threshold;
[0162] An image to be identified is obtained, and the image to be identified is input into the standard area prediction model to obtain a risk area of the image to be identified.
[0163] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.
[0164] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0165] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0166] Acquire precipitation-related data and accident-related data, and use the accident-related data to perform data matching on the precipitation-related data to obtain standard accident-related data;
[0167] Constructing a feature data set based on the precipitation-related data and the standard accident data;
[0168] Acquire a preset regional reference map, and fuse the feature data set with the regional reference map to obtain a standard reference map;
[0169] Performing regional prediction on the standard reference image using a preset regional prediction model to obtain a regional prediction image;
[0170] Counting the number of pixels in the regional prediction image, and calculating a loss value based on the number of pixels and a preset loss function, and outputting a standard regional prediction model according to the difference between the loss value and a preset loss threshold;
[0171] An image to be identified is obtained, and the image to be identified is input into the standard area prediction model to obtain a risk area of the image to be identified.
[0172] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0173] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0174] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0175] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0176] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0177] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0178] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0179] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for predicting a dangerous area, characterized in that: The method comprises: Acquire precipitation-related data and accident-related data, and use the accident-related data to perform data matching on the precipitation-related data to obtain standard accident-related data; Constructing a feature data set based on the precipitation-related data and the standard accident data; Acquire a preset regional reference map, and fuse the feature data set with the regional reference map to obtain a standard reference map; Performing regional prediction on the standard reference image using a preset regional prediction model to obtain a regional prediction image; Counting the number of pixels in the regional prediction image, and calculating a loss value based on the number of pixels and a preset loss function, and outputting a standard regional prediction model according to the difference between the loss value and a preset loss threshold; Acquire an image to be identified, input the image to be identified into the standard area prediction model, and obtain a risk area of the image to be identified; Among them, the use of a preset regional prediction model to perform regional prediction on the standard reference image to obtain a regional prediction image includes: performing convolution compression on the standard reference image based on a preset compression level to obtain a first compressed image, a second compressed image, a third compressed image and a fourth compressed image; inputting the first compressed image into a first semantic segmentation module in the regional prediction model to obtain a first semantic image; inputting the first semantic image and the second compressed image into a second semantic segmentation module in the regional prediction model to obtain a second semantic image; inputting the second semantic image and the third compressed image into a third semantic segmentation module in the regional prediction model to obtain a third semantic image; inputting the third semantic image and the fourth compressed image into a fourth semantic segmentation module in the regional prediction model to obtain a regional prediction image; The step of inputting the first semantic map and the second compressed map into the second semantic segmentation module in the regional prediction model to obtain the second semantic map comprises: using the residual convolution unit in the second semantic segmentation module to extract information from the first semantic map and the second compressed map respectively to obtain residual information corresponding to the first semantic map and the second compressed map; using a multi-resolution fusion unit to perform multi-resolution fusion on the residual information to obtain fused information; and performing pooling processing on the fused information based on the chained residual pooling unit in the second semantic segmentation module to obtain the second semantic map.
2. The method for predicting a dangerous area according to claim 1, wherein: The loss value is calculated based on the number of pixels and a preset loss function, include: in, is the loss value, The number of pixels in the image labeled as positive for the region prediction, is the number of predicted positive pixels, is the number of pixels that are labeled positive and predicted to be positive.
3. The method for predicting a dangerous area according to claim 1, wherein: Before fusing the feature data set with the regional reference map, the method further includes: Cutting the regional reference image into a plurality of regional sub-images of preset sizes; De-noising is performed on the plurality of region sub-images respectively to obtain de-noised sub-images.
4. The method for predicting a dangerous area according to claim 1, wherein: The constructing of a feature data set based on the precipitation-related data and the standard accident data includes: Performing time correction and discretization processing on the precipitation-related data to obtain a plurality of standard precipitation intervals; The frequencies of the standard accident data in the plurality of standard precipitation intervals are counted, and the plurality of standard precipitation intervals and the frequencies are summarized to obtain a feature data set.
5. The method for predicting a dangerous area according to any one of claims 1 to 4, characterized in that: The step of using the accident-related data to perform data matching on the precipitation-related data to obtain standard accident data includes: Extracting the accident location data and the accident time data corresponding to the accident location data from the accident related data, and performing time correction on the accident time to obtain a standard accident time; The precipitation-related data is matched with the accident location data based on a preset precipitation mapping table, and the accident time data is marked to obtain standard accident data.
6. A device for predicting a dangerous area, used to implement the method for predicting a dangerous area according to any one of claims 1 to 5, characterized in that: The device comprises: A data processing module, used to obtain precipitation-related data and accident-related data, use the accident-related data to perform data matching on the precipitation-related data to obtain standard accident data, and construct a feature data set based on the precipitation-related data and the standard accident data; A data fusion module is used to obtain a preset regional reference map, and fuse the feature data set with the regional reference map to obtain a standard reference map; A model training module, used to perform regional prediction on the standard reference image using a preset regional prediction model to obtain a regional prediction image, count the number of pixels in the regional prediction image, and calculate a loss value based on the number of pixels and a preset loss function, and output a standard regional prediction model according to the size between the loss value and a preset loss threshold; The area prediction module is used to obtain the image to be identified, input the image to be identified into the standard area prediction model, and obtain the risk area of the image to be identified.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the danger area prediction method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for predicting a dangerous area according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method and device for detecting target object in image, electronic equipment and storage medium
CN111932482A
Risk prediction method and device, electronic equipment and storage medium
CN112163964A
Short-time heavy rainfall prediction method based on deep learning
CN112949934A
Alerting Device for Meteorological Phenomena such as Rain or High Water of Rivers in a Geographical Region
EP1610156A1
