CN112949561A - Community early warning method and device, computer equipment and storage medium - Google Patents
Community early warning method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN112949561A CN112949561A CN202110316561.2A CN202110316561A CN112949561A CN 112949561 A CN112949561 A CN 112949561A CN 202110316561 A CN202110316561 A CN 202110316561A CN 112949561 A CN112949561 A CN 112949561A
- Authority
- CN
- China
- Prior art keywords
- early warning
- coefficient
- scene
- sample
- scene image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000012549 training Methods 0.000 claims abstract description 42
- 238000012360 testing method Methods 0.000 claims description 74
- 238000004590 computer program Methods 0.000 claims description 25
- 238000004364 calculation method Methods 0.000 claims description 14
- 238000003062 neural network model Methods 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 244000025254 Cannabis sativa Species 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 239000000779 smoke Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/217—Validation; Performance evaluation; Active pattern learning techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B17/00—Fire alarms; Alarms responsive to explosion
- G08B17/12—Actuation by presence of radiation or particles, e.g. of infrared radiation or of ions
- G08B17/125—Actuation by presence of radiation or particles, e.g. of infrared radiation or of ions by using a video camera to detect fire or smoke
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Multimedia (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Business, Economics & Management (AREA)
- Emergency Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application relates to a community early warning method, a community early warning device, computer equipment and a storage medium. The method comprises the following steps: acquiring the accuracy of a preset community early warning model; the community early warning model is obtained after training based on a sample scene image, a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image; acquiring a target scene image, and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model; and early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image. By adopting the method, the early warning accuracy rate of risks in different scenes can be improved.
Description
Technical Field
The present application relates to the field of community early warning technologies, and in particular, to a community early warning method, apparatus, computer device, and storage medium.
Background
With the development of pattern recognition and artificial intelligence technology, image acquisition is carried out on an area to be monitored through an image acquisition device, the acquired image characteristics are analyzed, and the area to be monitored is monitored, so that the identification of risks in the area to be monitored is widely applied in life.
In the conventional technology, an image of a region to be monitored needs to be acquired, required image features in the image of the region to be monitored are acquired, and the acquired image features are compared with data in a background database, so that early warning of the region to be monitored is achieved.
However, in the conventional method, the problem that the regions to be monitored of different scenes in the community cannot be identified in a targeted manner exists in the method for directly comparing the acquired image features with the image features in the database, and the defect that the risk early warning accuracy rate of different scenes is low is caused.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a storage medium for improving risk early warning accuracy in different scenarios.
A community early warning method, the method comprising:
acquiring the accuracy of a preset community early warning model; the community early warning model is obtained after training based on a sample scene image, a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image;
acquiring a target scene image, and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model;
and early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
In one embodiment, the community early warning model is obtained by:
collecting a plurality of sample scene images;
setting a scene coefficient of a sample scene image and an early warning coefficient of the sample scene image for each sample scene image; the scene coefficient of the sample scene image is a parameter which is manually configured and used for representing the importance degree of the sample scene; the early warning coefficient of the sample scene image is a parameter which is manually configured and used for representing the risk degree of the sample scene;
dividing the plurality of sample scene images, the scene coefficients corresponding to the plurality of sample scene images and the early warning coefficients corresponding to the plurality of sample scene images into a sample training set and a sample testing set according to a preset proportion;
and training a neural network model according to the sample training set to obtain the community early warning model.
In one embodiment, the obtaining the accuracy of the preset community early warning model includes:
and testing the community early warning model according to the sample test set to obtain the accuracy of the community early warning model.
In one embodiment, the testing the community early warning model according to the sample test set, and the obtaining the accuracy of the community early warning model includes:
inputting the sample scene images in the sample test set into the community early warning model to obtain a sample test result;
and evaluating the sample test result according to the scene coefficient corresponding to the sample scene image in the sample test set and the early warning coefficient corresponding to the sample scene image in the sample test set, so as to obtain the accuracy of the community early warning model.
In one embodiment, the obtaining the scene coefficient of the target scene image and the early warning coefficient of the target scene image by using the community early warning model includes:
and inputting the target scene image into the community early warning model, and acquiring a scene coefficient corresponding to the target scene image and an early warning coefficient corresponding to the target scene image.
In one embodiment, the pre-warning of the target scene based on the accuracy of the community pre-warning model, the scene coefficient of the target scene image, and the pre-warning coefficient of the target scene image includes:
acquiring an overall risk coefficient of a target scene according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image;
and early warning the target scene according to the overall risk coefficient of the target scene.
In one embodiment, the obtaining the overall risk coefficient of the target scene according to the accuracy of the community early warning model, the scene coefficient of the target scene image, and the early warning coefficient of the target scene image includes:
substituting the accuracy of the community early warning model and the scene coefficient of the target scene image into a preset overall risk coefficient calculation formula to obtain the overall risk coefficient of the target scene;
the overall risk coefficient calculation formula is as follows:
wherein f iskIs the overall risk factor; z is a radical ofkIs the scene coefficient of the target scene image; skIs the accuracy of the community early warning model.
A community early warning apparatus, the apparatus comprising:
the first acquisition module is used for acquiring the accuracy of a preset community early warning model; the community early warning model is obtained after training based on a sample scene image, a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image;
the second acquisition module is used for acquiring a target scene image and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model;
and the early warning module is used for early warning a target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring the accuracy of a preset community early warning model; the community early warning model is obtained after training based on a sample scene image, a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image;
acquiring a target scene image, and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model;
and early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring the accuracy of a preset community early warning model; the community early warning model is obtained after training based on a sample scene image, a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image;
acquiring a target scene image, and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model;
and early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
According to the community early warning method, the community early warning device, the computer equipment and the storage medium, the accuracy of the preset community early warning model is obtained; and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model. And finally, early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image. By introducing the scene coefficient and the early warning coefficient, the areas of different scenes in the community are identified in a targeted manner, and the early warning accuracy rate of risks of different scenes is improved.
Drawings
FIG. 1 is a diagram of an exemplary embodiment of a community early warning method;
FIG. 2 is a flow diagram illustrating a method for community early warning in one embodiment;
FIG. 3 is a flowchart illustrating steps of obtaining a community early warning model in one embodiment;
FIG. 4 is a block diagram of a community warning device in one embodiment;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The community early warning method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 and the server 104 may be independently used to execute the community early warning method provided by the present application. The terminal 102 and the server 104 may also be used to cooperatively perform the community early warning method provided by the present application. For example, the server 104 is configured to obtain the accuracy of a preset community early warning model; the community early warning model is obtained after training based on the sample scene image, the scene coefficient corresponding to the sample scene image and the early warning coefficient corresponding to the sample scene image; the server 104 also acquires a target scene image from the terminal 102, and acquires a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model; and early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
The terminal 102 may be, but not limited to, a camera including an image capturing device, a smart phone, a tablet computer, and a portable wearable device, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In an embodiment, as shown in fig. 2, a community early warning method is provided, which is described by taking an example that the method is applied to a computer device (the computer device may be specifically the terminal or the server in fig. 1), and includes the following steps:
202, acquiring the accuracy of a preset community early warning model; the community early warning model is obtained after training based on a sample scene image, a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image.
The accuracy of the community early warning model is a parameter used for representing the accuracy of the community early warning model in predicting the scene coefficient and the early warning coefficient, and the higher the accuracy of the community early warning model is, the more accurate the scene coefficient and the early warning coefficient output by the community early warning model are. The sample scene images are pre-acquired images used for training the community early warning model and comprise images of different scene areas in the community; the scene coefficient of the sample scene image is a parameter which is manually configured and used for representing the importance degree of the sample scene; the higher the scene coefficient of the sample scene image is, the more important the sample scene is, and the higher the protection degree is; the early warning coefficient of the sample scene image is a parameter which is manually configured and used for representing the risk degree of the sample scene, and the higher the early warning coefficient of the sample scene image is, the higher the risk of the sample scene is.
Specifically, the community early warning model is obtained after training based on the sample scene image, the scene coefficient corresponding to the sample scene image and the early warning coefficient corresponding to the sample scene image; when the community early warning model is trained, the input data is a sample scene image, and the output data is a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image; the specific model used by the community early warning model is not limited, and may be a multi-output neural network model, for example.
Further, the accuracy of the community early warning model needs to be evaluated, and the accuracy of the community early warning model is obtained. The method and the index for evaluating the accuracy of the community early warning model can be selected according to specific conditions, for example, the difference value between the test data corresponding to the sample scene image obtained by the community early warning model and the real data corresponding to the preset sample scene image is obtained; the data types of the test data and the real data comprise scene coefficients corresponding to the sample scene images and early warning coefficients corresponding to the sample scene images. And calculating the ratio of the difference value to the real data as an error rate, wherein the higher the error rate is, the lower the accuracy of the community early warning model is.
And 204, acquiring a target scene image, and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model.
The target scene image is an image of a scene to be early-warned; the target scene image is acquired by an image acquisition device arranged near the area to be early-warned, for example, by a camera near the area to be early-warned.
Specifically, the obtained target scene image is identified through the trained community early warning model, and a scene coefficient of the target scene image and an early warning coefficient of the target scene image are generated, so that early warning can be further performed on the target scene according to the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
And step 206, early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
Specifically, the early warning of the target scene according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image is to quantitatively evaluate the target scene according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image; for example, a parameter capable of comprehensively evaluating the early warning emergency degree of the target scene is obtained through a preset calculation method according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image, and corresponding early warning is performed on the target scene according to the difference of the parameter.
In the community early warning method, the accuracy of the community early warning model is obtained; and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model. And finally, early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image. By introducing the scene coefficient and the early warning coefficient, the areas of different scenes in the community are identified in a targeted manner, and the early warning accuracy rate of risks of different scenes is improved.
In one embodiment, as shown in fig. 3, the step of obtaining the community early warning model includes:
step 302, collecting a plurality of sample scene images.
Specifically, the sample scene image is an image which is acquired in advance and used for training a community early warning model; in the process of acquiring a plurality of sample scene images, the plurality of sample scene images refers to the number of the acquired sample scene images, and different numbers of sample scene images can be acquired according to needs for training. In general, the greater the number of collected sample scene images, the higher the accuracy of the community early warning model obtained by training; for example, 1 million images of a sample scene are acquired. The device for acquiring the sample scene image may be any device having an image acquisition function, and is not limited herein.
Step 304, setting a scene coefficient of a sample scene image and an early warning coefficient of the sample scene image for each sample scene image; the scene coefficient of the sample scene image is a parameter which is manually configured and used for representing the importance degree of the sample scene; the early warning coefficient of the sample scene image is a parameter which is manually configured and used for representing the risk degree of the sample scene.
Specifically, the scene coefficient of the sample scene image is a parameter which is configured manually and used for representing the importance degree of the sample scene; in general, different scene coefficients are artificially set for different scenes, and a scene coefficient of a scene is higher, which represents that the scene is more important, or vice versa; for example, the scene coefficient set for the fire passage is 1; the scene coefficient set for the elevator is 0.8; the scene factor set for open grass is 0.1.
The early warning coefficient of the sample scene image is a parameter which is manually configured and used for representing the risk degree of the sample scene; in general, different early warning coefficients are set for a scene according to an emergency occurring in the scene; generally, the higher the early warning coefficient of a scene is, the higher the risk in the scene is, or vice versa; for example, when a scene has a fire, the early warning coefficient of the scene is 1; when a scene has a small fire, the early warning coefficient of the scene is 0.8; when a scene begins to smoke, the early warning coefficient set for the scene is 0.5.
Step 306, dividing the multiple sample scene images, the scene coefficients corresponding to the multiple sample scene images, and the early warning coefficients corresponding to the multiple sample scene images into a sample training set and a sample testing set according to a preset proportion.
Specifically, the multiple sample scene images, the scene coefficients corresponding to the multiple sample scene images, and the early warning coefficients corresponding to the multiple sample scene images are divided into a sample training set and a sample testing set according to a preset proportion. For example, 1 ten thousand sample scene images, scene coefficients corresponding to 1 ten thousand sample scene images, and early warning coefficients corresponding to 1 ten thousand sample scene images are obtained; and dividing the sample scene image, the corresponding scene coefficient and the early warning coefficient into a sample training set and a sample testing set according to the proportion of 7: 3. The sample training set comprises 7 thousand sample scene images, scene coefficients corresponding to the 7 thousand sample scene images and early warning coefficients corresponding to the 7 thousand sample scene images; the sample test set comprises 3 thousand sample scene images, scene coefficients corresponding to the 3 thousand sample scene images and early warning coefficients corresponding to the 3 thousand sample scene images.
And 308, training a neural network model according to the sample training set to obtain the community early warning model.
Specifically, a sample scene image in the sample training set, a scene coefficient corresponding to the sample scene image, and an early warning coefficient corresponding to the sample scene image are input into a neural network model determined as required for training, so as to obtain a community early warning model. For example, 7 thousand sample scene images in the sample training set, scene coefficients corresponding to the 7 thousand sample scene images, and early warning coefficients corresponding to the 7 thousand sample scene images are input to the multi-output neural network for training, so as to obtain a community early warning model.
In this embodiment, a scene coefficient corresponding to the target scene image and an early warning coefficient corresponding to the target scene image can be generated for the target scene image by establishing the community early warning model. The target scene can be further warned based on the accuracy of the community warning model, the scene coefficient of the target scene image and the warning coefficient of the target scene image, so that the regions of different scenes in the community can be identified in a targeted manner, and the warning accuracy rate of risks of different scenes is improved.
In one embodiment, the obtaining the accuracy of the community early warning model includes:
and testing the community early warning model according to the sample test set to obtain the accuracy of the community early warning model.
Specifically, the sample test set is used for testing the community early warning model, the sample scene images in the sample test set are input into the community early warning model, the scene coefficient and the early warning coefficient of the sample scene images in the sample test set generated through the community early warning model are obtained, and the accuracy of the community early warning model is obtained by comparing and evaluating the scene coefficient of the sample scene images in the sample test set generated through the community early warning model and the early warning coefficient generated through the community early warning model with the scene coefficient manually set before the sample scene images in the sample test set and the early warning coefficient manually set. For example, if the error between the scene coefficient generated by the community early warning model and the early warning coefficient generated by the community early warning model of the sample scene image in the sample test set and the scene coefficient manually set before the sample scene image in the sample test set and the early warning coefficient manually set before the sample scene image in the sample test set is 5%, the accuracy of the community early warning model is 95%.
In the embodiment, the community early warning model is tested through the sample test set, the accuracy of the community early warning model is obtained, the accuracy of the community early warning model is used as an element for early warning a target scene, and the early warning accuracy rate of risks in different scenes is improved.
In an embodiment, the testing the community early warning model according to the sample test set, and the obtaining the accuracy of the community early warning model includes:
inputting the sample scene images in the sample test set into the community early warning model to obtain a sample test result;
and evaluating the sample test result according to the scene coefficient corresponding to the sample scene image in the sample test set and the early warning coefficient corresponding to the sample scene image in the sample test set, so as to obtain the accuracy of the community early warning model.
Specifically, the sample test result refers to a scene coefficient and an early warning coefficient generated by a community early warning model of a sample scene image in a sample test set; the purpose of testing the community early warning model is to obtain a scene coefficient generated by the community early warning model for a sample scene image concentrated in sample testing and an error between an early warning coefficient generated by the community early warning model and a real value, namely a previous artificial set value, and further obtain the accuracy of the community early warning model.
In the embodiment, the community early warning model is tested through the sample test set, the accuracy of the community early warning model is obtained, the accuracy of the community early warning model is used as an element for early warning a target scene, and the early warning accuracy rate of risks in different scenes is improved.
In one embodiment, the obtaining the scene coefficient of the target scene image and the early warning coefficient of the target scene image by using the community early warning model includes:
and inputting the target scene image into the community early warning model, and acquiring a scene coefficient corresponding to the target scene image and an early warning coefficient corresponding to the target scene image.
Specifically, the target scene image is input into the community early warning model, image features in the target scene image are processed through the community early warning model, and a scene coefficient corresponding to the target scene image and an early warning coefficient corresponding to the target scene image are output.
In the embodiment, the image features in the target scene image are processed through the community early warning model, the scene coefficient corresponding to the target scene image and the early warning coefficient corresponding to the target scene image are output, and the scene coefficient corresponding to the target scene image and the early warning coefficient corresponding to the target scene image are used as elements for early warning the target scene, so that the regions of different scenes in the community are identified in a targeted manner, and the early warning accuracy rate of risks of different scenes is improved.
In one embodiment, the pre-warning of the target scene based on the accuracy of the community pre-warning model, the scene coefficient of the target scene image, and the pre-warning coefficient of the target scene image includes:
acquiring an overall risk coefficient of a target scene according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image;
and early warning the target scene according to the overall risk coefficient of the target scene.
Specifically, the overall risk coefficient of the target scene is obtained according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image, and the elements for obtaining the overall risk coefficient comprise the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
Early warning is carried out on the target scene according to the overall risk coefficient, for example, when the overall risk coefficient is in a preset first interval, the target scene is early warned in a first early warning mode, for example, early warning is carried out in an alarm mode; and when the overall risk coefficient is in a preset second interval, early warning the target scene by adopting a second early warning mode, such as sending a short message or a voice mode. The manner of the warning is not particularly limited.
In the embodiment, the overall risk coefficient of the target scene is obtained according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image, early warning is further performed according to the overall risk coefficient, regions of different scenes in the community are identified in a targeted manner, and early warning accuracy of risks of different scenes is improved.
In one embodiment, the obtaining the overall risk coefficient of the target scene according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image includes:
substituting the accuracy of the community early warning model and the scene coefficient of the target scene image into a preset overall risk coefficient calculation formula to obtain the overall risk coefficient of the target scene;
the overall risk coefficient calculation formula is as follows:
wherein f iskIs the overall risk factor; z is a radical ofkIs the scene coefficient of the target scene image; skIs the accuracy of the community early warning model.
In the embodiment, the accuracy of the community early warning model and the scene coefficient of the target scene image are substituted into a preset overall risk coefficient calculation formula to obtain the overall risk coefficient of the target scene, so that early warning can be further performed according to the overall risk coefficient, regions of different scenes in the community are identified in a targeted manner, and early warning accuracy of risks of different scenes is improved.
It should be understood that although the various steps in the flow charts of fig. 2-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-3 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 4, there is provided a community early warning apparatus 400, including: a first obtaining module 401, a second obtaining module 402 and an early warning module 403, wherein:
a first obtaining module 401, configured to obtain accuracy of a preset community early warning model; the community early warning model is obtained after training based on a sample scene image, a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image.
A second obtaining module 402, configured to obtain a target scene image, and obtain a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model.
And an early warning module 403, configured to perform early warning on a target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image, and the early warning coefficient of the target scene image.
In one embodiment, the first obtaining module 401 is further configured to acquire a plurality of sample scene images; setting a scene coefficient of a sample scene image and an early warning coefficient of the sample scene image for each sample scene image; the scene coefficient of the sample scene image is a parameter which is manually configured and used for representing the importance degree of the sample scene; the early warning coefficient of the sample scene image is a parameter which is manually configured and used for representing the risk degree of the sample scene; dividing the plurality of sample scene images, the scene coefficients corresponding to the plurality of sample scene images and the early warning coefficients corresponding to the plurality of sample scene images into a sample training set and a sample testing set according to a preset proportion; and training a neural network model according to the sample training set to obtain the community early warning model.
In one embodiment, the first obtaining module 401 is further configured to test the community early warning model according to the sample test set, so as to obtain the accuracy of the community early warning model.
In one embodiment, the first obtaining module 401 is further configured to input the sample scene image in the sample testing set to the community early warning model, and obtain a sample testing result; and evaluating the sample test result according to the scene coefficient corresponding to the sample scene image in the sample test set and the early warning coefficient corresponding to the sample scene image in the sample test set, so as to obtain the accuracy of the community early warning model.
In one embodiment, the second obtaining module 402 is further configured to input the target scene image into the community early warning model, and obtain a scene coefficient corresponding to the target scene image and an early warning coefficient corresponding to the target scene image.
In one embodiment, the early warning module 403 is further configured to obtain an overall risk coefficient of the target scene according to the accuracy of the community early warning model, a scene coefficient of the target scene image, and an early warning coefficient of the target scene image; and early warning the target scene according to the overall risk coefficient of the target scene.
In one embodiment, the early warning module 403 is further configured to substitute the accuracy of the community early warning model and the scene coefficient of the target scene image into a preset overall risk coefficient calculation formula to obtain an overall risk coefficient of the target scene;
the overall risk coefficient calculation formula is as follows:
wherein f iskIs the overall risk factor; z is a radical ofkScene system being an image of a target sceneCounting; skIs the accuracy of the community early warning model.
The community early warning device acquires the accuracy of a preset community early warning model; and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model. And finally, early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image. By introducing the scene coefficient and the early warning coefficient, the areas of different scenes in the community are identified in a targeted manner, and the early warning accuracy rate of risks of different scenes is improved.
For specific limitations of the community early warning apparatus, reference may be made to the above limitations of the community early warning method, and details are not described herein. All or part of the modules in the community early warning device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a community alerting method.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: acquiring the accuracy of a preset community early warning model; the community early warning model is obtained after training based on a sample scene image, a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image; acquiring a target scene image, and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model; and early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
In one embodiment, the processor, when executing the computer program, further performs the steps of: collecting a plurality of sample scene images; setting a scene coefficient of a sample scene image and an early warning coefficient of the sample scene image for each sample scene image; the scene coefficient of the sample scene image is a parameter which is manually configured and used for representing the importance degree of the sample scene; the early warning coefficient of the sample scene image is a parameter which is manually configured and used for representing the risk degree of the sample scene; dividing the plurality of sample scene images, the scene coefficients corresponding to the plurality of sample scene images and the early warning coefficients corresponding to the plurality of sample scene images into a sample training set and a sample testing set according to a preset proportion; and training a neural network model according to the sample training set to obtain the community early warning model.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and testing the community early warning model according to the sample test set to obtain the accuracy of the community early warning model.
In one embodiment, the processor, when executing the computer program, further performs the steps of: inputting the sample scene images in the sample test set into the community early warning model to obtain a sample test result; and evaluating the sample test result according to the scene coefficient corresponding to the sample scene image in the sample test set and the early warning coefficient corresponding to the sample scene image in the sample test set, so as to obtain the accuracy of the community early warning model.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and inputting the target scene image into the community early warning model, and acquiring a scene coefficient corresponding to the target scene image and an early warning coefficient corresponding to the target scene image.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring an overall risk coefficient of a target scene according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image; and early warning the target scene according to the overall risk coefficient of the target scene.
In one embodiment, the processor, when executing the computer program, further performs the steps of: substituting the accuracy of the community early warning model and the scene coefficient of the target scene image into a preset overall risk coefficient calculation formula to obtain the overall risk coefficient of the target scene;
the overall risk coefficient calculation formula is as follows:
wherein f iskIs the overall risk factor; z is a radical ofkIs the scene coefficient of the target scene image; skIs the accuracy of the community early warning model.
The computer equipment acquires the accuracy of a preset community early warning model; and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model. And finally, early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image. By introducing the scene coefficient and the early warning coefficient, the areas of different scenes in the community are identified in a targeted manner, and the early warning accuracy rate of risks of different scenes is improved.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring the accuracy of a preset community early warning model; the community early warning model is obtained after training based on a sample scene image, a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image; acquiring a target scene image, and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model; and early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
In one embodiment, the computer program when executed by the processor further performs the steps of: collecting a plurality of sample scene images; setting a scene coefficient of a sample scene image and an early warning coefficient of the sample scene image for each sample scene image; the scene coefficient of the sample scene image is a parameter which is manually configured and used for representing the importance degree of the sample scene; the early warning coefficient of the sample scene image is a parameter which is manually configured and used for representing the risk degree of the sample scene; dividing the plurality of sample scene images, the scene coefficients corresponding to the plurality of sample scene images and the early warning coefficients corresponding to the plurality of sample scene images into a sample training set and a sample testing set according to a preset proportion; and training a neural network model according to the sample training set to obtain the community early warning model.
In one embodiment, the computer program when executed by the processor further performs the steps of: and testing the community early warning model according to the sample test set to obtain the accuracy of the community early warning model.
In one embodiment, the computer program when executed by the processor further performs the steps of: inputting the sample scene images in the sample test set into the community early warning model to obtain a sample test result; and evaluating the sample test result according to the scene coefficient corresponding to the sample scene image in the sample test set and the early warning coefficient corresponding to the sample scene image in the sample test set, so as to obtain the accuracy of the community early warning model.
In one embodiment, the computer program when executed by the processor further performs the steps of: and inputting the target scene image into the community early warning model, and acquiring a scene coefficient corresponding to the target scene image and an early warning coefficient corresponding to the target scene image.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring an overall risk coefficient of a target scene according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image; and early warning the target scene according to the overall risk coefficient of the target scene.
In one embodiment, the computer program when executed by the processor further performs the steps of: substituting the accuracy of the community early warning model and the scene coefficient of the target scene image into a preset overall risk coefficient calculation formula to obtain the overall risk coefficient of the target scene;
the overall risk coefficient calculation formula is as follows:
wherein f iskIs the overall risk factor; z is a radical ofkIs the scene coefficient of the target scene image; skIs the accuracy of the community early warning model.
The storage medium acquires the accuracy of a preset community early warning model; and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model. And finally, early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image. By introducing the scene coefficient and the early warning coefficient, the areas of different scenes in the community are identified in a targeted manner, and the early warning accuracy rate of risks of different scenes is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A community early warning method is characterized by comprising the following steps:
acquiring the accuracy of a preset community early warning model; the community early warning model is obtained after training based on a sample scene image, a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image;
acquiring a target scene image, and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model;
and early warning is carried out on the target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
2. The method of claim 1, wherein the community early warning model is obtained by:
collecting a plurality of sample scene images;
setting a scene coefficient of a sample scene image and an early warning coefficient of the sample scene image for each sample scene image; the scene coefficient of the sample scene image is a parameter which is manually configured and used for representing the importance degree of the sample scene; the early warning coefficient of the sample scene image is a parameter which is manually configured and used for representing the risk degree of the sample scene;
dividing the plurality of sample scene images, the scene coefficients corresponding to the plurality of sample scene images and the early warning coefficients corresponding to the plurality of sample scene images into a sample training set and a sample testing set according to a preset proportion;
and training a neural network model according to the sample training set to obtain the community early warning model.
3. The method of claim 2, wherein obtaining the accuracy of the preset community warning model comprises:
and testing the community early warning model according to the sample test set to obtain the accuracy of the community early warning model.
4. The method of claim 3, wherein the testing the community early warning model according to the sample test set, and obtaining the accuracy of the community early warning model comprises:
inputting the sample scene images in the sample test set into the community early warning model to obtain a sample test result;
and evaluating the sample test result according to the scene coefficient corresponding to the sample scene image in the sample test set and the early warning coefficient corresponding to the sample scene image in the sample test set, so as to obtain the accuracy of the community early warning model.
5. The method of claim 1, wherein the obtaining the scene coefficients of the target scene image and the early warning coefficients of the target scene image by using the community early warning model comprises:
and inputting the target scene image into the community early warning model, and acquiring a scene coefficient corresponding to the target scene image and an early warning coefficient corresponding to the target scene image.
6. The method of claim 1, wherein the pre-warning of the target scene based on the accuracy of the community pre-warning model, the scene coefficient of the target scene image, and the pre-warning coefficient of the target scene image comprises:
acquiring an overall risk coefficient of a target scene according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image;
and early warning the target scene according to the overall risk coefficient of the target scene.
7. The method of claim 6, wherein obtaining the overall risk coefficient of the target scene according to the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image comprises:
substituting the accuracy of the community early warning model and the scene coefficient of the target scene image into a preset overall risk coefficient calculation formula to obtain the overall risk coefficient of the target scene;
the overall risk coefficient calculation formula is as follows:
wherein f iskIs the overall risk factor; z is a radical ofkIs the scene coefficient of the target scene image; skIs the accuracy of the community early warning model.
8. A community early warning device, the device comprising:
the first acquisition module is used for acquiring the accuracy of a preset community early warning model; the community early warning model is obtained after training based on a sample scene image, a scene coefficient corresponding to the sample scene image and an early warning coefficient corresponding to the sample scene image;
the second acquisition module is used for acquiring a target scene image and acquiring a scene coefficient of the target scene image and an early warning coefficient of the target scene image by using the community early warning model;
and the early warning module is used for early warning a target scene based on the accuracy of the community early warning model, the scene coefficient of the target scene image and the early warning coefficient of the target scene image.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110316561.2A CN112949561A (en) | 2021-03-25 | 2021-03-25 | Community early warning method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110316561.2A CN112949561A (en) | 2021-03-25 | 2021-03-25 | Community early warning method and device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112949561A true CN112949561A (en) | 2021-06-11 |
Family
ID=76228083
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110316561.2A Pending CN112949561A (en) | 2021-03-25 | 2021-03-25 | Community early warning method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112949561A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019183751A1 (en) * | 2018-03-26 | 2019-10-03 | 深圳市锐明技术股份有限公司 | Detection and warning method for snow and ice in front of vehicle, storage medium, and server |
CN110569913A (en) * | 2019-09-11 | 2019-12-13 | 北京云迹科技有限公司 | Scene classifier training method and device, scene recognition method and robot |
CN111401161A (en) * | 2020-03-04 | 2020-07-10 | 青岛海信网络科技股份有限公司 | Intelligent building management and control system for realizing behavior recognition based on intelligent video analysis algorithm |
US10733457B1 (en) * | 2019-03-11 | 2020-08-04 | Wipro Limited | Method and system for predicting in real-time one or more potential threats in video surveillance |
CN111563471A (en) * | 2020-05-14 | 2020-08-21 | 杭州海康威视系统技术有限公司 | Factory building risk assessment method and device |
CN112052776A (en) * | 2020-09-01 | 2020-12-08 | 中国人民解放军国防科技大学 | Unmanned vehicle autonomous driving behavior optimization method and device and computer equipment |
-
2021
- 2021-03-25 CN CN202110316561.2A patent/CN112949561A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019183751A1 (en) * | 2018-03-26 | 2019-10-03 | 深圳市锐明技术股份有限公司 | Detection and warning method for snow and ice in front of vehicle, storage medium, and server |
US10733457B1 (en) * | 2019-03-11 | 2020-08-04 | Wipro Limited | Method and system for predicting in real-time one or more potential threats in video surveillance |
CN110569913A (en) * | 2019-09-11 | 2019-12-13 | 北京云迹科技有限公司 | Scene classifier training method and device, scene recognition method and robot |
CN111401161A (en) * | 2020-03-04 | 2020-07-10 | 青岛海信网络科技股份有限公司 | Intelligent building management and control system for realizing behavior recognition based on intelligent video analysis algorithm |
CN111563471A (en) * | 2020-05-14 | 2020-08-21 | 杭州海康威视系统技术有限公司 | Factory building risk assessment method and device |
CN112052776A (en) * | 2020-09-01 | 2020-12-08 | 中国人民解放军国防科技大学 | Unmanned vehicle autonomous driving behavior optimization method and device and computer equipment |
Non-Patent Citations (1)
Title |
---|
刘占;: "深度学习技术在火灾图像识别中的应用", 福建电脑, no. 05 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101967089B1 (en) | Convergence Neural Network based complete reference image quality evaluation | |
WO2019214309A1 (en) | Model test method and device | |
CN110941555B (en) | Test case recommendation method and device, computer equipment and storage medium | |
WO2019200735A1 (en) | Livestock feature vector acquisition method, apparatus, computer device and storage medium | |
CN111476191B (en) | Artificial intelligent image processing method based on intelligent traffic and big data cloud server | |
CN108121961A (en) | Inspection Activity recognition method, apparatus, computer equipment and storage medium | |
CN112132278A (en) | Model compression method and device, computer equipment and storage medium | |
CN114693192A (en) | Wind control decision method and device, computer equipment and storage medium | |
CN113218537A (en) | Training method, device, equipment and storage medium of temperature anomaly detection model | |
CN113269149A (en) | Living body face image detection method and device, computer equipment and storage medium | |
CN112508137B (en) | Transformer abnormality detection method and device, computer equipment and storage medium | |
CN109145743A (en) | A kind of image-recognizing method and device based on deep learning | |
CN113288131A (en) | Non-invasive blood glucose detection method, processor and device based on graph convolution network | |
CN114898273A (en) | Video monitoring abnormity detection method, device and equipment | |
CN114549849A (en) | Image recognition method and device, computer equipment and storage medium | |
CN115795920A (en) | Product reliability evaluation method and device based on multi-stress coupling acceleration model | |
CN111522859A (en) | Alarm analysis method and device, computer equipment and storage medium | |
CN113283388B (en) | Training method, device, equipment and storage medium of living body face detection model | |
WO2024124957A1 (en) | Test method and system for intelligent sensing system, and electronic device | |
CN112949561A (en) | Community early warning method and device, computer equipment and storage medium | |
CN113127804B (en) | Method and device for determining number of vehicle faults, computer equipment and storage medium | |
CN111242951B (en) | Vehicle detection method, device, computer equipment and storage medium | |
CN114119531A (en) | Fire detection method and device applied to campus smart platform and computer equipment | |
CN111078984A (en) | Network model publishing method and device, computer equipment and storage medium | |
CN111339952A (en) | Image classification method and device based on artificial intelligence and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |