Disclosure of Invention
The invention aims to provide a campus student behavior risk early warning method and a campus student behavior risk early warning system, which are used for solving the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme:
a campus student behavioral risk early warning method, the method comprising:
acquiring a campus map, and determining a public area and a private area in the campus map; the campus maps are top views of campus scenes with different heights;
establishing a connection relation between the public area and the private area, and numbering the public area and the private area based on the connection relation;
determining the arrangement parameters of the cameras based on the public area, and receiving video information acquired by the cameras in real time;
identifying the video information, positioning and counting abnormal areas, and sending the abnormal areas to a management terminal;
wherein the content identifying the video information comprises calculating an anomaly probability for a private region connected to the public region.
As a further scheme of the invention: the step of establishing a connection relationship between the public area and the private area, and numbering the public area and the private area based on the connection relationship, includes:
marking a public area and a private area in the campus map according to different color values;
numbering the public areas according to a preset sequence;
reading private areas connected with the public areas in sequence based on the color values, and numbering the private areas based on the numbers of the public areas;
the step of sequentially querying the private areas connected with the public areas based on the color values comprises the steps of receiving adjustment information input by a user in real time and adjusting the reading result based on the adjustment information.
As a further scheme of the invention: the step of determining the arrangement parameters of the cameras based on the public areas and receiving the video information acquired by the cameras in real time comprises the following steps:
reading a scale of the campus map, and determining a monitoring range of a camera in the campus map according to the scale;
segmenting the public area according to the monitoring range; the union of all monitoring ranges is larger than the public area;
determining the number of cameras and the installation positions of the cameras according to the segmentation result;
and receiving video information acquired by the camera in real time.
As a further scheme of the invention: the step of receiving the video information acquired by the camera in real time comprises the following steps:
acquiring audio information in real time, periodically analyzing the audio information, and determining an adjusting curve of the definition of the camera according to a periodic analysis result;
converting the audio information into text information, and extracting sensitive words in the text information based on a preset sensitive word bank;
and counting the extracted sensitive words, and inputting the trained definition adjusting model to obtain a definition adjusting instruction with the priority higher than that of an adjusting curve.
As a further scheme of the invention: the steps of identifying the video information, positioning and counting abnormal areas and sending the abnormal areas to a management terminal comprise:
converting the video information into an image sequence, sequentially calculating the contact ratio of adjacent images, and combining the images according to the contact ratio to obtain an image group corresponding to the video information;
sequentially identifying the images, and positioning the profiles of the students and the profile centers of the profiles;
calculating the motion parameters of each student according to the time interval and the outline center of the adjacent images; the motion parameters comprise motion speed and motion acceleration;
positioning a target area in the image according to the motion parameters, and calculating the number and the distance of the centers of all the contours in the target area;
marking the target area as an abnormal area according to the number and the distance;
and counting the marked abnormal regions and sending the abnormal regions to a management end.
As a further scheme of the invention: the step of calculating the abnormal probability of the private area connected with the public area comprises the following steps:
reading the image group and an image group identification result; the image group identification result comprises student outlines, outline centers and motion parameters in all the images;
determining and calculating a personnel number curve in each private area according to the motion parameters; the independent variable of the personnel number curve is time, and the dependent variable is the number of the personnel;
inquiring a standard people number curve according to the number of the private area, and comparing the standard people number curve with the people number curve;
determining the abnormal probability of the private area according to the comparison result;
the standard people number curve is a dynamic curve and is determined in real time by a historical people number curve.
The technical scheme of the invention also provides a campus student behavior risk early warning system, which comprises:
the system comprises an area classification module, a public area and a private area, wherein the area classification module is used for acquiring a campus map and determining the public area and the private area in the campus map; the campus maps are top views of campus scenes with different heights;
the region numbering module is used for establishing a connection relation between the public region and the private region and numbering the public region and the private region based on the connection relation;
the video receiving module is used for determining the arrangement parameters of the cameras based on the public area and receiving the video information acquired by the cameras in real time;
the abnormal positioning module is used for identifying the video information, positioning and counting abnormal areas and sending the abnormal areas to a management terminal;
wherein the content identifying the video information comprises calculating an anomaly probability of a private region connected to the public region.
As a further scheme of the invention: the region numbering module comprises:
the area marking unit is used for marking a public area and a private area in the campus map according to different color values;
the first numbering unit is used for numbering the public areas according to a preset sequence;
the second numbering unit is used for sequentially reading the private areas connected with the public area based on the color values and numbering the private areas based on the number of the public area;
the sequentially querying the contents of the private areas connected with the public areas based on the color values comprises receiving adjustment information input by a user in real time and adjusting reading results based on the adjustment information.
As a further scheme of the invention: the video receiving module includes:
the range determining unit is used for reading the scale of the campus map and determining the monitoring range of the camera in the campus map according to the scale;
the region segmentation unit is used for segmenting the public region according to the monitoring range; the union of all monitoring ranges is larger than the public area;
the parameter determining unit is used for determining the number of the cameras and the installation positions of the cameras according to the segmentation result;
and the information transmission unit is used for receiving the video information acquired by the camera in real time.
As a further scheme of the invention: the anomaly locating module comprises:
the image merging unit is used for converting the video information into an image sequence, sequentially calculating the coincidence degree of adjacent images, and merging the images according to the coincidence degree to obtain an image group corresponding to the video information;
the image identification unit is used for sequentially identifying the images and positioning the student outlines and outline centers thereof;
the first calculating unit is used for calculating the motion parameters of each student according to the time interval and the outline center of the adjacent images; the motion parameters comprise motion speed and motion acceleration;
the second calculation unit is used for positioning a target area in the image according to the motion parameters and calculating the number and the distance of the centers of all the contours in the target area;
the marking unit is used for marking the target area as an abnormal area according to the number and the distance;
and the statistical unit is used for counting the marked abnormal areas and sending the abnormal areas to the management terminal.
Compared with the prior art, the invention has the beneficial effects that: according to the method, the areas are segmented based on the map, the public areas and the private areas are determined, the cameras are further installed in the public areas, the public areas are supervised according to videos of the public areas, meanwhile, the abnormal probability of the private areas is judged and reflected to a manager, and the supervision globality is greatly improved on the premise that the privacy of students is respected.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more clearly apparent, the present invention is further described in 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 invention and are not intended to limit the invention.
Example 1
Fig. 1 is a flow chart of a campus student behavior risk early warning method, in an embodiment of the present invention, the campus student behavior risk early warning method includes:
step S100: acquiring a campus map, and determining a public area and a private area in the campus map; the campus maps are top views of campus scenes with different heights;
the map is mostly a top view, and all areas in the campus can be easily and conveniently classified based on the top view; as for the height parameter, a plurality of top views are used for representation; for example, the top views of the same building at different heights reflect the situations of different floors.
Furthermore, the division of the public area and the private area is specifically judged by school managers according to actual conditions, for a teaching building, a corridor is a public area, a toilet is a private area, but whether a classroom is the public area is difficult to define, cameras can be installed in some schools, and for the school, the classroom is considered as the public area; as for dormitory buildings, corridors are public areas and the inside of bedrooms are private areas.
Step S200: establishing a connection relation between the public area and the private area, and numbering the public area and the private area based on the connection relation;
the connection relation refers to a positional relation, and if the public area is a corridor, the private area is a toilet, a classroom or a bedroom connected with the public area; the numbering rule may comprise a first part and a second part, the first part being the number of the public area and the second part being the number of the private area, the private areas being connected to the same public area, the first part of the number being the same.
Step S300: determining the arrangement parameters of the cameras based on the public area, and receiving video information acquired by the cameras in real time;
the cameras are installed in a public area, and the installation number and the installation positions of the cameras are determined by the range of the public area.
Step S400: identifying the video information, positioning and counting abnormal areas, and sending the abnormal areas to a management terminal;
video information is identified, abnormal areas can be located, and the abnormality which can be directly located is generally obvious abnormal information, for example, two students make an alarm in a corridor.
Wherein the content identifying the video information comprises calculating an anomaly probability of a private area connected to the public area;
in the process of positioning the abnormal area, the condition of the private area is also judged, and the judgment process can only determine a rough abnormal probability because the private area is connected with the public area; the method has the core idea that the video information of the public area is identified, the number of people in the private area is further determined, and the abnormal probability is judged according to the number of people in the private area.
Fig. 2 is a block diagram of a first sub-flow of a campus student behavior risk early warning method, where the step of establishing a connection relationship between a public area and a private area, and numbering the public area and the private area based on the connection relationship includes:
step S201: marking a public area and a private area in the campus map according to different color values;
the public area and the private area are marked by different color values, so that the visual property is improved while the distinguishing function is ensured.
Step S202: numbering the public areas according to a preset sequence;
step S203: reading private areas connected with the public areas in sequence based on the color values, and numbering the private areas based on the numbers of the public areas;
the numbering process is divided into a first step and a second step, the public areas are numbered, and then the private areas are numbered based on the numbering result of the public areas.
The step of sequentially inquiring the private areas connected with the public areas based on the color values comprises the steps of receiving adjustment information input by a user in real time and adjusting reading results based on the adjustment information;
the method for distinguishing the public areas from the private areas according to the color values is extremely high in intuitiveness, and based on the intuitiveness, the connection condition can be adjusted by a worker, so that the process mainly faces the problem that sometimes one private area is possibly corresponding to a plurality of public areas, and the connection relationship is determined, so that the operation process of the worker needs to be introduced; on one hand, the region segmentation condition can be better known by the working personnel, and on the other hand, the connection relation can be corrected.
Fig. 3 is a second sub-flow block diagram of the campus student behavior risk early warning method, where the step of determining arrangement parameters of cameras based on the public area and receiving video information acquired by the cameras in real time includes:
step S301: reading a scale of the campus map, and determining a monitoring range of a camera in the campus map according to the scale;
step S302: segmenting the public area according to the monitoring range; the union of all monitoring ranges is larger than the public area;
step S303: determining the number of cameras and the installation positions of the cameras according to the segmentation result;
step S304: and receiving video information acquired by the camera in real time.
The installation process of the cameras is limited, the installation process is simple, firstly, the monitoring range of the cameras needs to be determined in a campus map, and then the public area is segmented by the monitoring range, so that the number of the cameras and the installation positions of the cameras can be determined.
It is worth mentioning that the monitoring ranges of the cameras with different models and different performances are different.
As a preferred embodiment of the technical solution of the present invention, the step of receiving video information acquired by a camera in real time includes:
acquiring audio information in real time, periodically analyzing the audio information, and determining an adjusting curve of the definition of the camera according to a periodic analysis result;
converting the audio information into text information, and extracting sensitive words in the text information based on a preset sensitive word bank;
and counting the extracted sensitive words, and inputting the trained definition adjusting model to obtain a definition adjusting instruction with the priority higher than that of an adjusting curve.
In one example of the technical scheme of the invention, the camera has an audio acquisition and recognition function, and most of the existing cameras have the audio acquisition and recognition function; the audio information is acquired based on the camera, and the audio information is periodically analyzed, so that the definition of the camera in which time periods needs to be higher and which time periods needs to be lower can be determined; to the student in campus, student's the process of going to class is very regular, and audio information's periodicity is very obvious, and is popular, the time of leaving a class, and the definition of camera is high, and the time of going to class, the definition of camera can be some lowly, and resource utilization can greatly be improved to this kind of mode.
It is worth mentioning that the audio information is identified, whether sensitive words exist can be judged, and if the sensitive words exist, the definition of the camera is required to be increased.
Fig. 4 is a third sub-flow block diagram of the campus student behavior risk early warning method, where the steps of identifying the video information, locating and counting abnormal areas, and sending the video information to a management terminal include:
step S401: converting the video information into an image sequence, sequentially calculating the contact ratio of adjacent images, and combining the images according to the contact ratio to obtain an image group corresponding to the video information;
the video information is composed of a plurality of images, and the process of converting the video information into an image sequence according to the time information is not difficult; after converting the video information into a sequence of images, the degree of coincidence of adjacent images is calculated, and the images can be merged, i.e. one image replaces all the images in a time period.
Step S402: sequentially identifying the images, and positioning the outlines of the students and the outline centers of the students;
the contour recognition technology can be used for the reference of the existing recognition technology, and has similar functions in a plurality of image recognition software.
Step S403: calculating the motion parameters of each student according to the time interval and the outline center of the adjacent images; the motion parameters comprise motion speed and motion acceleration;
the image group has time information, the image can reflect position information, and the position information and the time information can calculate motion parameters;
step S404: positioning a target area in the image according to the motion parameters, and calculating the number and the distance of the centers of all the contours in the target area;
the judgment process of the motion parameters is determined by a worker, and the judgment process is determined by two parameters of speed and acceleration; for example, when the speed is too high or the acceleration is too high, the target area is determined by taking the corresponding student outline as the center; the target area and the abnormal area cannot be marked with equal signs, and whether the target area is the abnormal area needs to be considered together with the number and the distance of the contour centers.
Step S405: marking the target area as an abnormal area according to the number and the distance;
when the number of the contour centers in the target area is large and the distance between the adjacent contour centers is short, the situation that corresponding students may twist together is indicated, and at the moment, the target area is marked as an abnormal area.
Step S406: counting the marked abnormal area and sending the abnormal area to a management end;
and extracting the images containing the marks within a period of time, and sending the images to a management terminal.
As a preferred embodiment of the technical solution of the present invention, the step of calculating the abnormal probability of the private area connected to the public area includes:
reading the image group and an image group identification result; the image group identification result comprises student outlines, outline centers and motion parameters in each image;
determining and calculating a personnel number curve in each private area according to the motion parameters; the independent variable of the personnel number curve is time, and the dependent variable is the number of the personnel;
inquiring a standard people number curve according to the number of the private area, and comparing the standard people number curve with a people number curve;
determining the abnormal probability of the private area according to the comparison result;
the standard people number curve is a dynamic curve and is determined by a historical people number curve in real time.
The number of people in the private area connected with the public area can be easily judged according to the image group identification result, the regularity of the number of people in the private area is extremely high, for example, the number of people in a classroom and a bedroom is fixed, and more people or less people are abnormal; as for the toilet, the number of people who enter and exit is regular, and in a specified time (class), the number of people who enter is more than the number of people who come out, and if the number of people who enter is less than the number of people, the abnormal probability exists in the toilet.
Example 2
Fig. 5 is a block diagram of a composition structure of a campus student behavior risk early warning system, in an embodiment of the present invention, thesystem 10 includes:
thearea classification module 11 is configured to acquire a campus map, and determine a public area and a private area in the campus map; the campus maps are top views of campus scenes with different heights;
theregion numbering module 12 is used for establishing a connection relationship between the public region and the private region, and numbering the public region and the private region based on the connection relationship;
thevideo receiving module 13 is configured to determine arrangement parameters of the cameras based on the common area, and receive video information acquired by the cameras in real time;
ananomaly positioning module 14, configured to identify the video information, position and count an anomaly region, and send the anomaly region to a management end;
wherein the content identifying the video information comprises calculating an anomaly probability of a private region connected to the public region.
Thearea numbering module 12 comprises:
the area marking unit is used for marking a public area and a private area in the campus map according to different color values;
the first numbering unit is used for numbering the public areas according to a preset sequence;
the second numbering unit is used for sequentially reading the private areas connected with the public area based on the color values and numbering the private areas based on the number of the public area;
the sequentially querying the contents of the private areas connected with the public areas based on the color values comprises receiving adjustment information input by a user in real time and adjusting reading results based on the adjustment information.
Thevideo receiving module 13 includes:
the range determining unit is used for reading the scale of the campus map and determining the monitoring range of the camera in the campus map according to the scale;
the region segmentation unit is used for segmenting the public region according to the monitoring range; the union of all monitoring ranges is larger than the public area;
the parameter determining unit is used for determining the number of the cameras and the installation positions of the cameras according to the segmentation result;
and the information transmission unit is used for receiving the video information acquired by the camera in real time.
Theanomaly locating module 14 includes:
the image merging unit is used for converting the video information into an image sequence, sequentially calculating the coincidence degree of adjacent images, merging the images according to the coincidence degree, and obtaining an image group corresponding to the video information;
the image identification unit is used for sequentially identifying the images and positioning the student outlines and outline centers thereof;
the first calculating unit is used for calculating the motion parameters of students according to the time intervals and the outline centers of the adjacent images; the motion parameters comprise motion speed and motion acceleration;
the second calculation unit is used for positioning a target area in the image according to the motion parameters and calculating the number and the distance of the centers of all the contours in the target area;
the marking unit is used for marking the target area as an abnormal area according to the number and the distance;
and the statistical unit is used for counting the marked abnormal areas and sending the marked abnormal areas to the management terminal.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.