CN117649737A - Method, device, equipment and storage medium for monitoring equipment in park - Google Patents

Method, device, equipment and storage medium for monitoring equipment in park Download PDF

Info

Publication number
CN117649737A
CN117649737A CN202410125026.2A CN202410125026A CN117649737A CN 117649737 A CN117649737 A CN 117649737A CN 202410125026 A CN202410125026 A CN 202410125026A CN 117649737 A CN117649737 A CN 117649737A
Authority
CN
China
Prior art keywords
equipment
bounding box
acquiring
early warning
projection
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.)
Granted
Application number
CN202410125026.2A
Other languages
Chinese (zh)
Other versions
CN117649737B (en
Inventor
吴智泉
陈克锐
陈秀梅
王振刚
丁秀梅
李广博
吴晓明
左家华
杨忠洪
贾启彤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yunnan Power Investment Green Energy Technology Co ltd
Original Assignee
Yunnan Power Investment Green Energy Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Yunnan Power Investment Green Energy Technology Co ltd filed Critical Yunnan Power Investment Green Energy Technology Co ltd
Priority to CN202410125026.2A priority Critical patent/CN117649737B/en
Publication of CN117649737A publication Critical patent/CN117649737A/en
Application granted granted Critical
Publication of CN117649737B publication Critical patent/CN117649737B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The application discloses a method, a device, equipment and a storage medium for monitoring equipment of a park, which relate to the technical field of electric digital data processing and are used for acquiring the three-dimensional layout of the park; respectively assigning a security level to each device according to a preset security level specification; acquiring a minimum bounding box of the current equipment and a grade number of the current equipment; defining a first proportionality constant and a second proportionality constant to obtain a warning distance and an early warning response time length; adding the warning distance to the minimum bounding box to form a warning bounding box; and the method comprises the steps of obtaining the intersecting duration of the target detection frame and the warning bounding box of the current device, and judging whether the duration is greater than or equal to the early warning response duration of the current device or not to perform early warning. The peripheral roads of the key equipment are not required to be closed to achieve the effect of redundancy protection, early warning can not be caused when a pedestrian normally passes through the key equipment, so that the traffic efficiency of a park is guaranteed, early warning can be performed only when a moving target stays in a warning area overtime, and the safety of the equipment is guaranteed.

Description

Method, device, equipment and storage medium for monitoring equipment in park
Technical Field
The present disclosure relates to the field of electronic digital data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for monitoring equipment in a campus.
Background
The park is a totally-enclosed or semi-enclosed area which is divided by administrative means, a plurality of production elements are gathered in the area, the area is subjected to certain layout and integration, and the park is a region which is defined with a certain range of land and is planned in advance so as to be specially used for the arrangement and use of industrial facilities. The setting of the campus is usually established to promote the economic development of the places. The park has quite a lot of purposes, and besides general industrial facilities such as factories, factories and the like, the park can also be used in high-tech industries, and even has research institutions and academic institutions at the premises. The park is usually developed into an industrial convergence after proper development.
The monitoring system of the existing park generally acquires real-time image data through a plurality of cameras respectively and gathers the real-time image data to a monitoring room, so that workers can know the security conditions of the whole park or the critical area of the park in the monitoring room. For critical devices (such as electrical devices, financial devices, security devices, etc. and buildings for placing the foregoing devices) in a park, the park usually adopts a way of preventing unauthorized people from approaching, such as forbidden traffic, to redundantly guarantee the security of the critical devices, thereby causing a certain obstruction to traffic passing through the park, such as the fact that the critical devices are adjacent to a shortest park exit path based on a certain building, the park needs to be bypassed, and as the number of people in park increases, the bypassing phenomenon is more obvious. The redundant protection of the park to the key equipment influences the normal traffic of pedestrians and vehicles.
Disclosure of Invention
The primary object of the present application is to provide a method, an apparatus, a device and a storage medium for monitoring a device in a park, so as to solve the problem that the redundant protection of critical devices in the park in the prior art affects the normal traffic of pedestrians and vehicles.
In order to achieve the above purpose, the present application provides the following technical solutions:
a method of equipment monitoring for a campus, the campus comprising at least two pieces of equipment, the method comprising:
acquiring a three-dimensional layout of the park, wherein the three-dimensional layout comprises all roads, all buildings and all entrances and exits positioned in the park;
respectively assigning a security level to each device according to a preset security level specification, wherein the security level is increased along with the increment of the level number;
acquiring a minimum bounding box of the current equipment and a grade number of the current equipment;
defining a first proportional constant, and obtaining the product of the first proportional constant and the grade number of the current equipment to obtain the warning distance of the current equipment;
defining a second proportionality constant, and obtaining the product of the second proportionality constant and the grade number of the current equipment to obtain the early warning response time of the current equipment;
Adding the warning distances to the length, the width and the height of the minimum bounding box respectively to form a warning bounding box;
responding to an entrance signal of the entrance and exit, and acquiring a detection frame matched with the entrance signal;
acquiring the duration of intersection of the detection frame and the warning bounding box of the current device, and judging whether the duration is greater than or equal to the early warning response duration of the current device;
if yes, generating an early warning signal and sending the early warning signal to an external decision terminal.
As a further improvement of the present application, obtaining the minimum bounding box of the current device and the class number of the current device includes:
sequentially defining the length direction, the width direction and the height direction of the current equipment as an x-axis direction, a y-axis direction and a z-axis direction, and establishing a three-dimensional coordinate system by taking any corner point of the bottom surface of the current equipment as an origin;
acquiring a first projection, a second projection and a third projection of the current equipment based on an x-y plane, an x-z plane and a y-z plane respectively;
defining each coordinate axis of the three-dimensional coordinate system as a rotation axis respectively;
rotating the current equipment according to each rotating shaft, and acquiring the minimum value of the total area of the first projection, the second projection and the third projection through a shortest path algorithm or a global optimizing algorithm;
Acquiring a current equipment-based rotated form corresponding to the minimum value;
and acquiring the bounding box of the rotated form, and defining the bounding box as the minimum bounding box.
As a further improvement of the present application, rotating the current device according to each rotation axis, and obtaining the minimum value of the total area of the first projection, the second projection, and the third projection through a shortest path algorithm or a global optimization algorithm includes:
defining a rotation step length for each rotation axis respectively;
traversing all rotation positions of each rotation shaft respectively, and acquiring a first real-time projection, a second real-time projection and a third real-time projection of the current equipment under each traversal;
traversing the real-time total area of each first real-time projection, each second real-time projection and each third real-time projection according to the triple cycle of the Floyd algorithm;
and acquiring the real-time total area with the minimum value in all the real-time total areas and marking the real-time total area as the minimum value.
As a further improvement of the present application, rotating the current device according to each rotation axis, and obtaining the minimum value of the total area of the first projection, the second projection, and the third projection through a shortest path algorithm or a global optimization algorithm includes:
Defining a plurality of random solutions for the minimum value according to the formula (1), and defining the optimizing result of all the random solutions as the minimum sum of the total areas of the first projection, the second projection and the third projection;
(1);
wherein,for the set of all random solutions, +.>For each random solution, respectively->Label for random solution->The number of all random solutions; />For the set of velocities for all the random solutions,the speed of each random solution;
initializing the position of each random solution, and respectively updating the current position and the current speed according to the formula (2) based on the same random solution:
(2);
wherein,is->The random solution is at->Speed of walking->Is->The random solution is at->Speed inertia of steps,/->Is an inertia coefficient>Is->Self-cognition characterization of the individual random solutions,is->Social cognitive characterization of individual random solutions; />And->Are all the learning factors of the human body,is a random number with a preset value range, +.>Is->Individual optimal solutions, which have been obtained for the individual random solutions, < >>Is->Global optimal solutions obtained by the random solutions;
iterating each random solution a preset number of times according to the formula (2) to update eachEach->
Respectively judge eachComparing whether the first difference value of the previous iteration is smaller than or equal to a first preset adaptation threshold value;
If all the first difference values are smaller than or equal to a first preset adaptation threshold value, respectively judging eachComparing whether the second difference value of the previous iteration is smaller than or equal to a second preset adaptation threshold value;
and if all the second difference values are smaller than or equal to a second preset adaptation threshold value, judging that the optimal solution with the minimum value is obtained.
As a further improvement of the present application, each random solution is iterated a preset number of times according to the formula (2) to update eachEach->Comprising:
linearly decrementing the inertia coefficient according to equation (3) once based on each iteration:
(3);
wherein,is->The random solution is at->Inertia coefficient after step optimization, ++>For initial inertia factor, +.>For the current iteration step +.>Is the maximum number of iterative steps.
As a further improvement of the present application, in response to an entrance signal of the doorway, acquiring a detection frame matched with the entrance signal includes:
responding to the entrance signal, and acquiring image data matched with the entrance signal through an external preset image acquisition end;
dividing the image data into grids with preset numbers on average;
predicting a plurality of boundary boxes for a moving target in the image data according to a target detection algorithm based on all grids;
Respectively acquiring the confidence coefficient of each boundary frame, and acquiring the boundary frame with the maximum confidence coefficient and marking the boundary frame as a first-order boundary frame;
calculating the intersection ratio of each other boundary frame and the first-order boundary frame respectively;
selecting a boundary box with the cross ratio being greater than or equal to a preset threshold value as a second-order boundary box;
and acquiring a second-order boundary box with highest confidence and defining the second-order boundary box as the detection box.
As a further improvement of the application, obtaining the duration of intersection of the detection frame and the warning bounding box of the current device, and judging whether the duration is greater than or equal to the early warning response duration of the current device, including:
mapping the detection frame into the three-dimensional coordinate system through a homography matrix to form a two-dimensional detection frame, wherein the two-dimensional detection frame is parallel to the vertical direction;
rotating the two-dimensional detection frame by 90 degrees based on one vertical edge of the two-dimensional detection frame, and reserving the two-dimensional detection frame before and after rotation;
acquiring all the two-dimensional detection frames after three rotations and defining the two-dimensional detection frames as three-dimensional detection frames;
acquiring Euclidean distance between the three-dimensional detection frame and the warning bounding box;
judging whether the Euclidean distance is smaller than or equal to zero;
if yes, judging that the three-dimensional detection frame is intersected with the warning bounding box of the current device, and beginning to record the intersection time length;
Judging whether the intersection time length is greater than or equal to the early warning response time length of the current equipment.
In order to achieve the above purpose, the present application further provides the following technical solutions:
a device monitoring apparatus of a campus, the device monitoring apparatus of a campus being applied to the device monitoring method of a campus as described above, the device monitoring apparatus of a campus comprising:
the three-dimensional layout acquisition module is used for acquiring the three-dimensional layout of the park, wherein the three-dimensional layout comprises all roads, all buildings and all entrances and exits positioned in the park;
the security level giving module is used for giving a security level to each device according to a preset security level specification, wherein the security level is increased along with the increment of the level number;
the minimum bounding box and grade number acquisition module is used for acquiring the minimum bounding box of the current equipment and the grade number of the current equipment;
the warning distance definition module is used for defining a first proportional constant, obtaining the product of the first proportional constant and the grade number of the current equipment, and obtaining the warning distance of the current equipment;
the early warning response time length definition module is used for defining a second proportionality constant, obtaining the product of the second proportionality constant and the grade number of the current equipment, and obtaining the early warning response time length of the current equipment;
The warning distance adding module is used for adding the warning distance to the length, the width and the height of the minimum bounding box respectively to form a warning bounding box;
the detection frame acquisition module is used for responding to the entrance signal of the entrance and exit to acquire a detection frame matched with the entrance signal;
the early warning response time length judging module is used for acquiring the time length of intersection of the detection frame and the warning bounding box of the current device and judging whether the time length is greater than or equal to the early warning response time length of the current device;
and the early warning signal generation and transmission module is used for generating an early warning signal and transmitting the early warning signal to an external decision terminal if the time length is greater than or equal to the early warning response time length of the current equipment.
In order to achieve the above purpose, the present application further provides the following technical solutions:
an electronic device comprising a processor, a memory coupled to the processor, the memory storing program instructions executable by the processor; the processor, when executing the program instructions stored in the memory, implements a method for monitoring equipment in a campus as described above.
In order to achieve the above purpose, the present application further provides the following technical solutions:
a storage medium having stored therein program instructions which when executed by a processor implement a device monitoring method capable of implementing a campus as described above.
The method comprises the steps that a three-dimensional layout of a park is obtained, wherein the three-dimensional layout comprises all roads, all buildings and all entrances and exits in the park; respectively assigning a security level to each device according to a preset security level specification, wherein the security level is increased along with the increment of the level number; acquiring a minimum bounding box of the current equipment and a grade number of the current equipment; defining a first proportional constant, and obtaining the product of the first proportional constant and the grade number of the current equipment to obtain the warning distance of the current equipment; defining a second proportionality constant, and obtaining the product of the second proportionality constant and the grade number of the current equipment to obtain the early warning response time of the current equipment; respectively adding the warning distances to the length, the width and the height of the minimum bounding box to form a warning bounding box; responding to an entrance signal of an entrance and exit, and acquiring a detection frame matched with the entrance signal; acquiring the intersecting time length of the detection frame and the warning bounding box of the current device, and judging whether the time length is greater than or equal to the early warning response time length of the current device; if yes, generating an early warning signal and sending the early warning signal to an external decision terminal. The method and the device assign corresponding warning areas and early warning response time durations based on the safety level of the key equipment, and the corresponding warning areas are larger and the early warning response time durations are shorter (but not smaller than the time duration that pedestrians walk through the warning areas at a slow speed) along with the higher safety level of the key equipment. According to the method and the system, the peripheral roads of the key equipment are not required to be closed to achieve the effect of redundancy protection, when a pedestrian normally passes through the key equipment (the passing time is smaller than the early warning response time), early warning is not caused, so that the traffic efficiency of a park is guaranteed, early warning can be carried out only when a moving target (pedestrian or vehicle) stays to the early warning response time in a warning area, and meanwhile the safety of the key equipment is guaranteed.
Drawings
FIG. 1 is a schematic diagram illustrating steps in a process of one embodiment of a method for monitoring equipment in a campus of the present application;
FIG. 2 is a schematic diagram of functional modules of one embodiment of an equipment monitoring device of the present application park;
FIG. 3 is a schematic structural diagram of one embodiment of an electronic device of the present application;
FIG. 4 is a schematic diagram illustrating the structure of one embodiment of a storage medium of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The terms "first," "second," "third," and the like in this application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "first," "second," and "third" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise. All directional indications (such as up, down, left, right, front, back … …) in the embodiments of the present application are merely used to explain the relative positional relationship, movement, etc. between the components in a particular gesture (as shown in the drawings), and if the particular gesture changes, the directional indication changes accordingly. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
As shown in fig. 1, the present embodiment provides one embodiment of a method for equipment monitoring of a campus, which in the present embodiment includes at least two pieces of equipment.
Preferably, the embodiment is mainly used for monitoring key equipment of a park, and can also be used for monitoring common equipment and buildings of the park. For example: the lighting device mainly comprises an LED lamp, a fluorescent lamp, a sodium lamp, a halogen lamp and the like. The distribution equipment mainly comprises a transformer substation, a distribution box, a circuit breaker and the like. The ventilation equipment mainly comprises an exhaust fan, a blower, an air quantity regulator and the like. The water supply and drainage equipment mainly comprises a water pump, a pipeline valve, a water pool and the like. And the building storing the device, or the building storing other devices and information, etc., can be monitored by the embodiment.
Specifically, the method for monitoring equipment in the campus of the embodiment includes the following steps:
and S1, acquiring the three-dimensional layout of the park.
Wherein the stereoscopic layout includes all roads, all buildings, all entrances and exits located in the campus.
Preferably, the three-dimensional layout can be directly obtained through one or more combination of digital model obtaining strategies such as remote sensing interpretation, field mapping measurement, unmanned aerial vehicle photogrammetry, three-dimensional laser scanning and the like, and meanwhile, a three-dimensional finite element model or a real-scene model can be generated for visual output.
And S2, respectively assigning a security level to each device according to a preset security level specification, wherein the security level is increased along with the increment of the level number.
Preferably, the security level specification may be defined and referenced from security specification files for each type of campus, or may be directly customizable.
Illustrating: the security level for electrical devices is generally classified into general purpose devices (class G), industrial purpose devices (class S), and special purpose devices (class P).
Among them, general-purpose devices (class G) are generally used for general people such as home appliances, office equipment, and the like. If the electrical equipment of the type malfunctions, personal safety can be affected, but the whole production process is not affected. The electric equipment of the type is required to meet national relevant laws and regulations and standards, and has good product quality and stability.
Among them, industrial use devices (S-type) are used for electrical devices of enterprises, such as machine devices, industrial control devices, and the like. This type of electrical equipment, if it malfunctions, may affect personal safety and may also cause interruption and stoppage of the production of the enterprise. On the basis of meeting the national relevant laws and regulations and standards, equipment is required to have certain safety protection and emergency measure settings besides better product quality and stability.
Among them, special-purpose devices (P-type) are used for dangerous environments or electrical devices in special occasions, such as mining devices, smelting devices, power generation devices, devices with explosive environments, and the like. This type of electrical equipment, if it malfunctions, may directly lead to personal injury or the occurrence of major accidents. In addition to meeting the basic requirements of national relevant laws and regulations, there is also a need for high reliability and stringent safety protection requirements, with more frequent detection and maintenance cycles.
Preferably, the security levels of the general purpose devices (class G), the industrial purpose devices (class S), and the special purpose devices (class P) are sequentially defined as level 1, level 2, and level 3, and the security levels are incremented with the increment of the level numbers.
And S3, acquiring a minimum bounding box of the current equipment and a grade number of the current equipment.
Preferably, the minimum bounding box may be set as an AABB box or an OBB box, and the OBB box is preferred in this embodiment to reduce the dead space of the current device.
And S4, defining a first proportional constant, and obtaining the product of the first proportional constant and the grade number of the current equipment to obtain the warning distance of the current equipment.
Preferably, the first proportional constant may be set to 0.5 and given a unit of "meter", i.e., the guard distance is 0.5x1=0.5 m if the security level of the current device is 1; if the security level of the current device is 2, the guard distance is 0.5×2=1.0m; if the security level of the current device is 3, the guard distance is 0.5×3=1.5m.
And S5, defining a second proportionality constant, and obtaining the product of the second proportionality constant and the grade number of the current equipment to obtain the early warning response time length of the current equipment.
Preferably, the second proportionality constant can be set to the-1 th power of the grade number and is given a unit of "minutes", namely if the safety grade of the current equipment is 1, the early warning response time is 1 -1 =1 min, i.e. one minute; if the security level of the current device is 2, the early warning response time is 2 -1 =0.5 min, i.e. 1/2 min, 30s; if the security level of the current device is 3, the early warning response time is 3 -1 =0.33 min, i.e. 1/3 min, 20s.
It should be noted that the above data are only for illustration and not for limiting the present embodiment, and the first proportionality constant and the second proportionality constant may be defined according to actual needs, such as road width, personnel flow, and slow walking time required for the personnel to pass through the guard area.
Preferably, if the alert area of the current device is too large, for example, the security level of the current device is 3, the early warning response time is 20s, and the pedestrian 20s cannot pass through the alert area of the device at a uniform speed, an additional proportion may be further added at the second proportionality constant, so as to prolong the early warning response time according to the additional proportion, for example, the added additional proportion is 2, and the early warning response time corresponding to the device is prolonged to 40s.
And S6, adding the warning distances to the length, the width and the height of the minimum bounding box respectively to form a warning bounding box.
Preferably, since the minimum bounding box is generally rectangular, the warning distance can be divided equally into two parts to be added to a set of opposing faces, respectively.
For example: the minimum bounding box of the current device is 4m×4m, the security level is 2, the guard distance is 1m, the guard distance is equal to two parts of 0.5m and added to two ends of each side length, and the size of the guard bounding box of the current device is (0.5 m+4m+0.5 m) × (0.5 m+4m+0.5 m), namely 5m×5m is obtained.
It will be appreciated that the design of the present embodiment to divide the warning distance equally into two aims at keeping the centers of the warning bounding box and the minimum bounding box coincident and unchanged.
And S7, responding to the entrance signal of the entrance and exit, and acquiring a detection frame matched with the entrance signal.
Preferably, the detection frame is obtained by a target detection algorithm (e.g., YOLO algorithm, etc.).
Step S8, acquiring the intersecting time length of the detection frame and the warning bounding box of the current device, judging whether the intersecting time length is greater than or equal to the early warning response time length of the current device, and executing step S9 if the intersecting time length of the detection frame and the warning bounding box of the current device is greater than or equal to the early warning response time length of the current device.
And S9, generating an early warning signal and sending the early warning signal to an external decision terminal.
Further, the step S3 specifically includes the following steps:
step S31, defining the length direction, the width direction and the height direction of the current equipment as an x-axis direction, a y-axis direction and a z-axis direction in sequence, and establishing a three-dimensional coordinate system by taking any corner point of the bottom surface of the current equipment as an origin.
Step S32, a first projection, a second projection and a third projection of the current device based on the x-y plane, the x-z plane and the y-z plane are obtained.
In step S33, each coordinate axis of the three-dimensional coordinate system is defined as a rotation axis.
Step S34, the current equipment is rotated according to each rotation shaft, and the minimum value of the total area of the first projection, the second projection and the third projection is obtained through a shortest path algorithm or a global optimizing algorithm.
Step S35, a post-rotation form based on the current device corresponding to the minimum value is acquired.
In step S36, a bounding box of the rotated form is acquired, and the bounding box is defined as the minimum bounding box.
Further, the shortest path algorithm in step S34 specifically includes the following steps:
step S341, defining a rotation step for each rotation axis.
Step S342, traversing all rotation positions of each rotation axis respectively, and acquiring a first real-time projection, a second real-time projection and a third real-time projection of the current device under each traversal.
Step S343, traversing the real-time total area of each first real-time projection, each second real-time projection, each third real-time projection according to the triple loop of the florid algorithm.
Preferably, the flory algorithm is one that finds the shortest path in a weighted graph with positive or negative edge weights (but no negative period). A single execution of the algorithm will find the length (weight) of the shortest path between all vertex pairs. Although it does not return details of the path itself, the path can be reconstructed by simple modification of the algorithm. Versions of the algorithm may also be used to find the transitive closure of the relationship R, or (associated with Schulze voting systems) the shortest path between all vertex pairs in the weighted graph. The florid algorithm starts by starting from any one single-sided path. The distance between all two points is the weight of an edge, and if there is no edge connection between the two points, the weight is infinity. For each pair of vertices u and v, a look is made to see if there is one vertex w such that the path from u to w to v is shorter than known. If so, then v is updated to w. The path diagram is represented by an adjacent matrix G, if a path is reachable from Vi to Vj, G [ i ] [ j ] =d, and d represents the length of the path; otherwise G [ i ] [ j ] =infinity. A matrix D is defined for recording the information of the inserted points, D [ i ] [ j ] represents the points that need to pass from Vi to Vj, and D [ i ] [ j ] =j is initialized. The distances between the vertices after the insertion point are compared with the original distances, GI j=min (GI j, GI k+Gk j), and if the value of GI j becomes smaller, DIj=k. G contains information of the shortest path between two points, and D contains information of the shortest path.
Preferably, two angle values between one rotation step length in this embodiment are two adjacent points, and the projection area corresponding to the two angle values is the weight.
In step S344, the real-time total area with the smallest value in all the real-time total areas is obtained and marked as the minimum value.
Further, the global optimization algorithm in step S34 specifically includes the following steps:
step S3401, defining a plurality of random solutions for the minimum value according to the formula (1), and defining the optimizing result of all the random solutions as the sum of the total areas of the first projection, the second projection and the third projection to be minimum.
(1)。
Wherein,for the set of all random solutions, +.>For each random solution, respectively->Label for random solution->The number of all random solutions; />For the set of velocities for all the random solutions,the velocity of each random solution is separate.
Step S3402, initializing the position of each random solution, and respectively updating the current position and the current speed according to formula (2) based on the same random solution:
(2)。
wherein,is->The random solution is at->Speed of walking->Is->The random solution is at->Speed inertia of steps,/->Is an inertia coefficient>Is->Self-cognition characterization of the individual random solutions,is- >Social cognitive characterization of individual random solutions; />And->Are all the learning factors of the human body,is a random number with a preset value range, +.>Is->Individual optimal solutions, which have been obtained for the individual random solutions, < >>Is->The global optimal solution obtained by the random solutions.
Preferably, the method comprises the steps of,is a preset value range of +.>,/>The value range of (2) is +.>Preferably->The value range of (2) is +.>Preferably->
Step S3403, iterating each random solution for a preset number of times according to equation (2) to update eachEach of which is
Step S3404, respectively judging eachCompared with the first difference value of the previous iteration is less than or equal to the first preset adaptive threshold, if all the first difference values are less than or equal to the first preset adaptive threshold, step S3405 is executed.
Step S3405, respectively judging eachAnd if the second difference value of the previous iteration is smaller than or equal to the second preset adaptive threshold, executing step S3406.
In step S3406, it is determined that the optimal solution for the minimum value has been obtained.
Further, the step S3403 specifically includes the following steps:
step S34031, linearly decrementing the inertia coefficient according to equation (3) once based on each iteration:
(3)。
wherein,is- >The random solution is at->Inertia coefficient after step optimization, ++>For initial inertia factor, +.>For the current iteration step +.>Is the maximum number of iterative steps.
Preferably, the initial inertia coefficient is generally set to 0.5, and the maximum iteration step number is generally set according to actual needs, and the present embodiment can be set to 100 times.
Further, the step S7 specifically includes the following steps:
in step S71, in response to the incoming signal, image data matched with the incoming signal is acquired through an external preset image acquisition terminal.
In step S72, the image data is divided into a predetermined number of grids.
Preferably, the original picture of the image data may be resized to 448×448, and the resized picture may be equally divided into s×s (e.g., 7×7) grids, each of which has a size of 64×64.
Preferably, each grid is used for predictionThe coordinates and width-height of each detection frame, and the confidence of each detection frame, i.e. each grid needs to be predicted +.>A value.
Step S73, predicting a plurality of bounding boxes for the moving target in the image data according to the target detection algorithm based on all grids.
Preferably, if the center of an object is located on a certain grid, the grid is responsible for predicting the bounding box of this object.
Step S74, the confidence coefficient of each boundary box is obtained, and the boundary box with the highest confidence coefficient is obtained and marked as a first-order boundary box.
In step S75, the intersection ratio of each other bounding box and the first-order bounding box is calculated.
Preferably, the intersection ratio is the intersection of the optimal detection frame with each bounding box, respectively, divided by the union of the optimal detection frame with each bounding box, respectively, to obtain the ratio.
Step S76, selecting a boundary box with the cross ratio being greater than or equal to a preset threshold as a second-order boundary box.
In step S77, a second-order bounding box with the highest confidence is obtained and defined as the detection box.
It will be appreciated that each grid requires predictionPersonal->The method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>For detecting the offset of the centre of the frame relative to the grid, < >>To detect the proportion of the frame relative to the resized picture,the confidence of the grid is 1 or 0.
Preferably, the confidence level is understood as the accuracy of whether or not there is a target within the current grid and the detection box.
Illustrating: setting a target in the picture after the size adjustment, and setting the width and the height of the picture after the size adjustment asThen:
dividing the picture into 7×7 grids on average, wherein there is one grid located at the center of the target, and the coordinates of the grid are Let the coordinates of the center of the target be +.>The offset can be calculated according to the following formula (1):
①。
preferably, in the actual detection, if the predicted detection frame and the actual bounding frame overlap perfectly, the value of the overlap ratio is 1. In the practical application process, the value of the first preset threshold may be generally set to 0.5 to determine whether the predicted bounding box is correct, and the more accurate the bounding box is in positive correlation with the cross-correlation ratio.
Preferably, the YOLO algorithm also requires training of the detection frame to improve the accuracy of target detection.
It should be noted that, the training model of the detection frame is generally directly implemented through codes, for example:
“class Yolo(object):
def __init__(self, weights_file, verbose=True):
self.verbose = verbose
# detection params
self.S = 7# cell size
self.B = 2# boxes_per_cell
self.classes = [*]
self.C = len(self.classes) # number of classes
# offset for box center (top left point of each cell)
self.x_offset= np.transpose(np.reshape(np.array([np.arange(self.S)]*self.S*self.B),
[self.B, self.S, self.S]), [1, 2, 0])
self.y_offset = np.transpose(self.x_offset, [1, 0, 2])
self.threshold = 0.2# confidence scores threhold
self.iou_threshold = 0.4
#the maximum number of boxes to be selected by non max suppression
self.max_output_size = 10”。
where "+" requires identification of the target category, here "person", "car" may be set to identify pedestrians and vehicles.
And training the training model through a preset pedestrian and vehicle training set, and iteratively adjusting the weight and bias of the training model through a back propagation algorithm for a first preset number of times so as to reduce the value of the loss function of the training model.
Preferably, the loss function is as shown in formula (2):
②。
wherein,is->+.>Whether the detection frames are responsible for the indication function of the target or not is judged to be 1 or 0; / >、/>、/>、/>Corresponds to->Personal->Predicted values.
It is understood that the loss function includes a deviation of coordinate values of the detection frame, a deviation of confidence, a deviation of prediction probability (or a class deviation).
Wherein,for the midpoint loss of the detection frame in the coordinate value deviation, < + >>For the loss of width and height of the detection frame in the coordinate value deviation, < >>In order to be a deviation of the confidence level,to predict deviations in probability (or class deviations).
It should be noted thatAs such, since each grid does not necessarily contain an object, if there is no object in the grid, this will result inThe value of (2) is 0, so that the gradient span in the subsequent back propagation algorithm is too large, so +.>To control the loss of predicted position of the detection frame and to introduce +.>There is no loss of targets within the control single grid.
Preferably, training a model to train a neural network typically requires providing a large amount of data, i.e., a data set; data sets are generally divided into three classes, namely training set (training set), validation set (validation set) and test set (test set).
One epoch is a process equal to one training time using all samples in the training set, and the training time refers to one forward propagation (forward pass) and one backward propagation (back pass); when the number of samples of one epoch (i.e., the training set) is too large, excessive time may be consumed for performing one training, and it is not necessary to use all data of the training set for each training, the whole training set needs to be divided into a plurality of small blocks, i.e., a plurality of latches for training; one epoch is made up of one or more latches, which are part of a training set, with only a portion of the data being used for each training process, i.e., one latch, and one latch being trained as an iteration.
Preferably, the neural network training specifically includes a Perceptron (Perceptron), the Perceptron is composed of two layers of neurons, an input layer receives an external input signal and transmits the external input signal to an output layer, the output layer is an M-P neuron, and if formula (3) is a step function, then:
③。
preferablyGiven a training data set, then the weights(/>=1, 2,..n), and training threshold +.>Can be obtained by learning->It can be understood that a weight corresponding to a fixed value with a fixed input of-1, 0 +.>
Preferably, the first preset number of times may be set to 200 times.
Preferably, the learning rate of 1 st to 100 th epochs may be set to 0.01, the learning rate of 101 st to 150 th epochs may be set to 0.001, and the learning rate of 151 st to 200 th epochs may be set to 0.0001.
Step S3000, updating the detection frame based on the training model after training to obtain a final detection frame.
Further, the step S8 specifically includes the following steps:
step S81, mapping the detection frame into a three-dimensional coordinate system through a homography matrix to form a two-dimensional detection frame, wherein the two-dimensional detection frame is parallel to the vertical direction.
Preferably, in practical application, radar data of the same scene needs to be added to ensure accuracy of detection frame mapping.
Preferably, the homography matrix is passableAnd (3) representing.
Wherein,and->For the location information of the current device, +.>And->For the pixel coordinate values of the current device in the image data, and (2)>Is homography matrix, and->The method comprises the steps of carrying out a first treatment on the surface of the And obtaining all radar points of which the pixel coordinate system is identical with the world coordinate system of the same external scene by solving the homography matrix.
And S82, rotating the two-dimensional detection frame by 90 degrees based on one vertical edge of the two-dimensional detection frame, and reserving the two-dimensional detection frame before and after rotation.
Step S83, acquiring all the two-dimensional detection frames after three rotations and defining the two-dimensional detection frames as three-dimensional detection frames.
It can be understood that the three-dimensional detection frame with four vertical edges connected in sequence is obtained after three times of rotation, the four two-dimensional detection frames form a cuboid, and the angular coordinate values of the cuboid are obtained and output to the three-dimensional layout to obtain the three-dimensional detection frame.
And S84, acquiring Euclidean distance between the three-dimensional detection frame and the warning bounding box.
Preferably, the euclidean distance is the absolute distance between the three-dimensional detection frame and the warning bounding box.
Step S85, judging whether the Euclidean distance is smaller than or equal to zero, if the Euclidean distance is smaller than or equal to zero, executing step S86.
And S86, judging that the three-dimensional detection frame intersects with the warning bounding box of the current device, and beginning to record the intersecting duration.
Preferably, the intersection includes an inclusion.
Step S87, judging whether the intersection time length is greater than or equal to the early warning response time length of the current equipment, and if the intersection time length is greater than or equal to the early warning response time length of the current equipment, executing step S9.
Preferably, the design intent of steps S81 to S82 is to convert the two-dimensional detection frame acquired by YOLO algorithm into a three-dimensional detection frame and set a world coordinate system, and radar is usually needed to assist, that is, fusion and mapping of image data and radar data, so as to ensure mapping accuracy.
Preferably, the existing two-dimensional detection model can also be used to locate the region of interest (ROI) on the RGB image, then a pixel mapping strategy is employed in the point cloud, and finally the original 2D bounding box is mapped to the 3D space.
In the embodiment, the three-dimensional layout of the park is obtained, wherein the three-dimensional layout comprises all roads, all buildings and all entrances and exits in the park; respectively assigning a security level to each device according to a preset security level specification, wherein the security level is increased along with the increment of the level number; acquiring a minimum bounding box of the current equipment and a grade number of the current equipment; defining a first proportional constant, and obtaining the product of the first proportional constant and the grade number of the current equipment to obtain the warning distance of the current equipment; defining a second proportionality constant, and obtaining the product of the second proportionality constant and the grade number of the current equipment to obtain the early warning response time of the current equipment; respectively adding the warning distances to the length, the width and the height of the minimum bounding box to form a warning bounding box; responding to an entrance signal of an entrance and exit, and acquiring a detection frame matched with the entrance signal; acquiring the intersecting time length of the detection frame and the warning bounding box of the current device, and judging whether the time length is greater than or equal to the early warning response time length of the current device; if yes, generating an early warning signal and sending the early warning signal to an external decision terminal. The embodiment gives corresponding warning areas and early warning response time durations based on the security level of the key equipment, and as the security level of the key equipment is higher, the corresponding warning areas are larger, and the early warning response time durations are shorter (but not smaller than the time duration that pedestrians walk through the warning areas at a slow speed). According to the method, the surrounding roads of the key equipment are not required to be closed to achieve the effect of redundancy protection, when a pedestrian normally passes through the key equipment (the passing time is smaller than the early warning response time), early warning is not caused, so that the traffic efficiency of a park is guaranteed, early warning is only carried out when a moving target (pedestrian or vehicle) stays in a warning area until the early warning response time, and meanwhile the safety of the key equipment is guaranteed.
As shown in fig. 2, this embodiment provides an embodiment of a monitoring apparatus for a device on a campus, where the apparatus is applied to the monitoring method in the foregoing embodiment, and the apparatus includes a three-dimensional layout obtaining module 1, a security level giving module 2, a minimum bounding box and level number obtaining module 3, a warning distance defining module 4, a warning response duration defining module 5, a warning distance summing module 6, a detecting frame obtaining module 7, a warning response duration judging module 8, and a warning signal generating and transmitting module 9 that are electrically connected in sequence.
The three-dimensional layout acquisition module 1 is used for acquiring three-dimensional layout of a park, wherein the three-dimensional layout comprises all roads, all buildings and all entrances and exits in the park; the security level giving module 2 is used for giving a security level to each device according to a preset security level specification, wherein the security level is increased along with the increment of the level number; the minimum bounding box and grade number acquisition module 3 is used for acquiring the minimum bounding box of the current equipment and the grade number of the current equipment; the guard distance definition module 4 is configured to define a first proportional constant, and obtain a product of the first proportional constant and a class number of the current device, so as to obtain a guard distance of the current device; the early warning response time length definition module 5 is used for defining a second proportionality constant, obtaining the product of the second proportionality constant and the grade number of the current equipment, and obtaining the early warning response time length of the current equipment; the warning distance adding module 6 is used for adding the warning distance to the length, the width and the height of the minimum bounding box respectively to form a warning bounding box; the detection frame acquisition module 7 is used for responding to the entrance signal of the entrance and exit to acquire a detection frame matched with the entrance signal; the early warning response time length judging module 8 is used for acquiring the time length of intersection of the detection frame and the warning bounding box of the current device and judging whether the time length is greater than or equal to the early warning response time length of the current device; the early warning signal generating and transmitting module 9 is configured to generate an early warning signal and transmit the early warning signal to an external decision terminal if the time length is greater than or equal to the early warning response time length of the current device.
Further, the minimum bounding box and grade number acquisition module comprises a first minimum bounding box and grade number acquisition sub-module, a second minimum bounding box and grade number acquisition sub-module, a third minimum bounding box and grade number acquisition sub-module, a fourth minimum bounding box and grade number acquisition sub-module, a fifth minimum bounding box and grade number acquisition sub-module, and a sixth minimum bounding box and grade number acquisition sub-module which are electrically connected in sequence; the first minimum bounding box and the grade number acquisition sub-module are electrically connected with the security grade giving module, and the sixth minimum bounding box and the grade number acquisition sub-module are electrically connected with the warning distance definition module.
The first minimum bounding box and grade number acquisition submodule is used for sequentially defining the length direction, the width direction and the height direction of the current equipment as an x-axis direction, a y-axis direction and a z-axis direction, and establishing a three-dimensional coordinate system by taking any corner point of the bottom surface of the current equipment as an origin; the second minimum bounding box and grade number acquisition sub-module is used for acquiring first projection, second projection and third projection of the current equipment based on the x-y plane, the x-z plane and the y-z plane respectively; the third minimum bounding box and grade number acquisition sub-module is used for defining each coordinate axis of the three-dimensional coordinate system as a rotation axis respectively; the fourth minimum bounding box and grade number acquisition sub-module is used for rotating the current equipment according to each rotating shaft respectively and acquiring the minimum value of the total area of the first projection, the second projection and the third projection through a shortest path algorithm or a global optimizing algorithm; the fifth minimum bounding box and grade number acquisition sub-module is used for acquiring a rotation state based on the current equipment, wherein the rotation state corresponds to the minimum value; the sixth minimum bounding box and grade number acquisition sub-module is used for acquiring a bounding box in a rotated form, and defining the bounding box as a minimum bounding box.
Further, the shortest path algorithm carried by the fourth minimum bounding box and the grade number obtaining sub-module is specifically realized by a first shortest path algorithm unit, a second shortest path algorithm unit, a third shortest path algorithm unit and a fourth shortest path algorithm unit which are electrically connected in sequence; the first shortest path algorithm unit is electrically connected with the third minimum bounding box and the grade number acquisition submodule, and the fourth shortest path algorithm unit is electrically connected with the fifth minimum bounding box and the grade number acquisition submodule.
The first shortest path algorithm unit is used for defining a rotation step length for each rotation shaft respectively; the second shortest path algorithm unit is used for traversing all rotation positions of each rotation shaft respectively and acquiring a first real-time projection, a second real-time projection and a third real-time projection of the current equipment under each traversal; the third shortest path algorithm unit is used for traversing the real-time total area of each first real-time projection, each second real-time projection and each third real-time projection according to the triple cycle of the Floride algorithm; the fourth shortest path algorithm unit is used for acquiring the real-time total area with the smallest value in all the real-time total areas and marking the real-time total area as the smallest value.
Further, the global optimizing algorithm carried by the fourth minimum bounding box and the grade number obtaining sub-module is specifically composed of a first global optimizing algorithm unit, a second global optimizing algorithm unit, a third global optimizing algorithm unit, a fourth global optimizing algorithm unit, a fifth global optimizing algorithm unit and a sixth global optimizing algorithm unit which are electrically connected in sequence; the first global optimizing algorithm unit is electrically connected with the third minimum bounding box and the grade number obtaining submodule, and the sixth global optimizing algorithm unit is electrically connected with the fifth minimum bounding box and the grade number obtaining submodule.
The first global optimizing algorithm unit is used for defining a plurality of random solutions for the minimum value according to the formula (1), and defining the optimizing result of all the random solutions as the sum of the total areas of the first projection, the second projection and the third projection to be minimum.
(1)。
Wherein,for the set of all random solutions, +.>For each random solution, respectively->Label for random solution->The number of all random solutions; />For the set of velocities for all the random solutions,the velocity of each random solution is separate.
The second global optimizing algorithm unit is used for initializing the position of each random solution and respectively updating the current position and the current speed according to the formula (2) based on the same random solution:
(2)。
Wherein,is->The random solution is at->Speed of walking->Is->The random solution is at->Speed inertia of steps,/->Is an inertia coefficient>Is->Self-cognition characterization of the individual random solutions,is->Social cognitive characterization of individual random solutions; />And->Are all the learning factors of the human body,is a random number with a preset value range, +.>Is->Individual optimal solutions, which have been obtained for the individual random solutions, < >>Is->The global optimal solution obtained by the random solutions.
The third global optimization algorithm unit is used for respectively iterating each random solution preset times according to the step (2) so as to update each random solutionEach->
Fourth global optimization algorithmThe unit is used for judging eachWhether the first difference value compared with the previous iteration is smaller than or equal to a first preset adaptation threshold value.
The fifth global optimization algorithm unit is configured to determine each of the first difference values if the first difference values are equal to or smaller than a first preset adaptation threshold valueWhether the second difference value compared with the previous iteration is smaller than or equal to a second preset adaptation threshold value.
And the sixth global optimization algorithm unit is used for judging that the optimal solution of the minimum value is obtained if all the second difference values are smaller than or equal to a second preset adaptation threshold value.
Further, the third global optimization algorithm unit is specifically configured to linearly decrease the inertia coefficient once according to equation (3) based on each iteration:
(3)。
Wherein,is->The random solution is at->Inertia coefficient after step optimization, ++>For initial inertia factor, +.>For the current iteration step +.>Is the maximum number of iterative steps.
Further, the detection frame acquisition module specifically comprises a first detection frame acquisition sub-module, a second detection frame acquisition sub-module, a third detection frame acquisition sub-module, a fourth detection frame acquisition sub-module, a fifth detection frame acquisition sub-module, a sixth detection frame acquisition sub-module and a seventh detection frame acquisition sub-module which are electrically connected in sequence; the first detection frame acquisition sub-module is electrically connected with the warning distance summation module, and the seventh detection frame acquisition sub-module is electrically connected with the early warning response time length judgment module.
The first detection frame acquisition submodule is used for responding to an entrance signal and acquiring image data matched with the entrance signal through an external preset image acquisition end; the second detection frame acquisition submodule is used for dividing the image data into grids with preset numbers on average; the third detection frame acquisition sub-module is used for predicting a plurality of boundary frames for a moving target in the image data according to a target detection algorithm based on all grids; the fourth detection frame acquisition sub-module is used for respectively acquiring the confidence coefficient of each boundary frame, acquiring the boundary frame with the maximum confidence coefficient and marking the boundary frame as a first-order boundary frame; the fifth detection frame acquisition submodule is used for calculating the intersection ratio of each other boundary frame and the first-order boundary frame respectively; the sixth detection frame acquisition submodule is used for selecting a boundary frame with the intersection ratio being greater than or equal to a preset threshold value as a second-order boundary frame; the seventh detection frame acquisition submodule is used for acquiring a second-order boundary frame with highest confidence and defining the second-order boundary frame as the detection frame.
Further, the early warning response time length judging module specifically comprises a first early warning response time length judging sub-module, a second early warning response time length judging sub-module, a third early warning response time length judging sub-module, a fourth early warning response time length judging sub-module, a fifth early warning response time length judging sub-module, a sixth early warning response time length judging sub-module and a seventh early warning response time length judging sub-module which are electrically connected in sequence; the first early warning response time length judging sub-module is electrically connected with the seventh detection frame obtaining sub-module, and the seventh early warning response time length judging sub-module is electrically connected with the early warning signal generating and transmitting module.
The first early warning response time length judging submodule is used for mapping the detection frame into a three-dimensional coordinate system through a homography matrix to form a two-dimensional detection frame, and the two-dimensional detection frame is parallel to the vertical direction; the second early warning response time length judging submodule is used for rotating the two-dimensional detection frame by 90 degrees based on one vertical side of the two-dimensional detection frame and reserving the two-dimensional detection frame before and after rotation; the third early warning response time length judging sub-module is used for acquiring all the two-dimensional detection frames after three rotations and defining the three-dimensional detection frames as three-dimensional detection frames; the fourth early warning response time length judging submodule is used for acquiring Euclidean distance between the three-dimensional detection frame and the warning bounding box; the fifth early warning response time length judging submodule is used for judging whether the Euclidean distance is smaller than or equal to zero; the sixth early warning response time length judging submodule is used for judging that the three-dimensional detection frame is intersected with the warning bounding box of the current equipment if the Euclidean distance is smaller than or equal to zero, and recording the intersection time length; the seventh early warning response time length judging submodule is used for judging whether the intersecting time length is greater than or equal to the early warning response time length of the current equipment, and if the intersecting time length is greater than or equal to the early warning response time length of the current equipment, the next processing is carried out through the early warning signal generating and sending module.
It should be noted that, the present embodiment is an apparatus embodiment based on the foregoing method embodiment, and additional contents such as optimization, expansion, limitation, and illustration of the present embodiment may be referred to the foregoing method embodiment, which is not repeated herein.
In the embodiment, the three-dimensional layout of the park is obtained, wherein the three-dimensional layout comprises all roads, all buildings and all entrances and exits in the park; respectively assigning a security level to each device according to a preset security level specification, wherein the security level is increased along with the increment of the level number; acquiring a minimum bounding box of the current equipment and a grade number of the current equipment; defining a first proportional constant, and obtaining the product of the first proportional constant and the grade number of the current equipment to obtain the warning distance of the current equipment; defining a second proportionality constant, and obtaining the product of the second proportionality constant and the grade number of the current equipment to obtain the early warning response time of the current equipment; respectively adding the warning distances to the length, the width and the height of the minimum bounding box to form a warning bounding box; responding to an entrance signal of an entrance and exit, and acquiring a detection frame matched with the entrance signal; acquiring the intersecting time length of the detection frame and the warning bounding box of the current device, and judging whether the time length is greater than or equal to the early warning response time length of the current device; if yes, generating an early warning signal and sending the early warning signal to an external decision terminal. The embodiment gives corresponding warning areas and early warning response time durations based on the security level of the key equipment, and as the security level of the key equipment is higher, the corresponding warning areas are larger, and the early warning response time durations are shorter (but not smaller than the time duration that pedestrians walk through the warning areas at a slow speed). According to the method, the surrounding roads of the key equipment are not required to be closed to achieve the effect of redundancy protection, when a pedestrian normally passes through the key equipment (the passing time is smaller than the early warning response time), early warning is not caused, so that the traffic efficiency of a park is guaranteed, early warning is only carried out when a moving target (pedestrian or vehicle) stays in a warning area until the early warning response time, and meanwhile the safety of the key equipment is guaranteed.
In the embodiment, the three-dimensional layout of the park is obtained, wherein the three-dimensional layout comprises all roads, all buildings and all entrances and exits in the park; respectively assigning a security level to each device according to a preset security level specification, wherein the security level is increased along with the increment of the level number; acquiring a minimum bounding box of the current equipment and a grade number of the current equipment; defining a first proportional constant, and obtaining the product of the first proportional constant and the grade number of the current equipment to obtain the warning distance of the current equipment; defining a second proportionality constant, and obtaining the product of the second proportionality constant and the grade number of the current equipment to obtain the early warning response time of the current equipment; respectively adding the warning distances to the length, the width and the height of the minimum bounding box to form a warning bounding box; responding to an entrance signal of an entrance and exit, and acquiring a detection frame matched with the entrance signal; acquiring the intersecting time length of the detection frame and the warning bounding box of the current device, and judging whether the time length is greater than or equal to the early warning response time length of the current device; if yes, generating an early warning signal and sending the early warning signal to an external decision terminal. The embodiment gives corresponding warning areas and early warning response time durations based on the security level of the key equipment, and as the security level of the key equipment is higher, the corresponding warning areas are larger, and the early warning response time durations are shorter (but not smaller than the time duration that pedestrians walk through the warning areas at a slow speed). According to the method, the surrounding roads of the key equipment are not required to be closed to achieve the effect of redundancy protection, when a pedestrian normally passes through the key equipment (the passing time is smaller than the early warning response time), early warning is not caused, so that the traffic efficiency of a park is guaranteed, early warning is only carried out when a moving target (pedestrian or vehicle) stays in a warning area until the early warning response time, and meanwhile the safety of the key equipment is guaranteed.
Fig. 3 illustrates one embodiment of the electronic device of the present application, and referring to fig. 3, the electronic device 10 includes a processor 101 and a memory 102 coupled to the processor 101.
The memory 102 stores program instructions for implementing the equipment monitoring method of the campus of any of the embodiments described above.
The processor 101 is configured to execute program instructions stored in the memory 102 for equipment monitoring of the campus.
The processor 101 may also be referred to as a CPU (Central Processing Unit ). The processor 101 may be an integrated circuit chip with signal processing capabilities. Processor 101 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Further, fig. 4 is a schematic structural diagram of a storage medium according to an embodiment of the present application, and referring to fig. 4, the storage medium 11 according to an embodiment of the present application stores a program instruction 111 capable of implementing all the methods described above, where the program instruction 111 may be stored in the storage medium in the form of a software product, and includes several instructions for making a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) execute all or part of the steps of the methods described in various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes, or a terminal device such as a computer, a server, a mobile phone, a tablet, or the like.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other forms.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units. The foregoing is only the embodiments of the present application, and is not intended to limit the scope of the patent application, and all equivalent structures or equivalent processes using the contents of the specification and drawings of the present application or directly or indirectly applied to other related technical fields are included in the scope of the patent protection of the present application.
The embodiments of the invention have been described in detail above, but they are merely examples, and the present application is not limited to the above-described embodiments. It will be apparent to those skilled in the art that any equivalent modifications or substitutions for this invention are within the scope of this application, and therefore, such equivalent changes and modifications, improvements, etc. are intended to be within the scope of this application without departing from the spirit and principles of this application.

Claims (10)

1. A method of monitoring equipment on a campus, the campus including at least two pieces of equipment, the method comprising:
acquiring a three-dimensional layout of the park, wherein the three-dimensional layout comprises all roads, all buildings and all entrances and exits positioned in the park;
respectively assigning a security level to each device according to a preset security level specification, wherein the security level is increased along with the increment of the level number;
acquiring a minimum bounding box of the current equipment and a grade number of the current equipment;
defining a first proportional constant, and obtaining the product of the first proportional constant and the grade number of the current equipment to obtain the warning distance of the current equipment;
Defining a second proportionality constant, and obtaining the product of the second proportionality constant and the grade number of the current equipment to obtain the early warning response time of the current equipment;
adding the warning distances to the length, the width and the height of the minimum bounding box respectively to form a warning bounding box;
responding to an entrance signal of the entrance and exit, and acquiring a detection frame matched with the entrance signal;
acquiring the duration of intersection of the detection frame and the warning bounding box of the current device, and judging whether the duration is greater than or equal to the early warning response duration of the current device;
if yes, generating an early warning signal and sending the early warning signal to an external decision terminal.
2. The method for monitoring equipment in a campus according to claim 1, wherein obtaining a minimum bounding box of a current equipment and a class number of the current equipment comprises:
sequentially defining the length direction, the width direction and the height direction of the current equipment as an x-axis direction, a y-axis direction and a z-axis direction, and establishing a three-dimensional coordinate system by taking any corner point of the bottom surface of the current equipment as an origin;
acquiring a first projection, a second projection and a third projection of the current equipment based on an x-y plane, an x-z plane and a y-z plane respectively;
defining each coordinate axis of the three-dimensional coordinate system as a rotation axis respectively;
Rotating the current equipment according to each rotating shaft, and acquiring the minimum value of the total area of the first projection, the second projection and the third projection through a shortest path algorithm or a global optimizing algorithm;
acquiring a current equipment-based rotated form corresponding to the minimum value;
and acquiring the bounding box of the rotated form, and defining the bounding box as the minimum bounding box.
3. The method of equipment monitoring for a campus of claim 2, wherein rotating the current equipment according to each rotation axis and obtaining the minimum value of the total area of the first projection, the second projection, and the third projection through a shortest path algorithm or a global optimization algorithm comprises:
defining a rotation step length for each rotation axis respectively;
traversing all rotation positions of each rotation shaft respectively, and acquiring a first real-time projection, a second real-time projection and a third real-time projection of the current equipment under each traversal;
traversing the real-time total area of each first real-time projection, each second real-time projection and each third real-time projection according to the triple cycle of the Floyd algorithm;
and acquiring the real-time total area with the minimum value in all the real-time total areas and marking the real-time total area as the minimum value.
4. The method of equipment monitoring for a campus of claim 2, wherein rotating the current equipment according to each rotation axis and obtaining the minimum value of the total area of the first projection, the second projection, and the third projection through a shortest path algorithm or a global optimization algorithm comprises:
defining a plurality of random solutions for the minimum value according to the formula (1), and defining the optimizing result of all the random solutions as the minimum sum of the total areas of the first projection, the second projection and the third projection;
(1);
wherein,for the set of all random solutions, +.>For each random solution, respectively->Label for random solution->The number of all random solutions; />For the set of velocities for all the random solutions,the speed of each random solution;
initializing the position of each random solution, and respectively updating the current position and the current speed according to the formula (2) based on the same random solution:
(2);
wherein,is->The random solution is at->Speed of walking->Is->The random solution is at->Speed inertia of steps,/->Is an inertia coefficient>Is->Self-cognition characterization of the individual random solutions,is->Social cognitive characterization of individual random solutions; />And->Are all the learning factors of the human body, Is a random number with a preset value range, +.>Is->Individual optimal solutions, which have been obtained for the individual random solutions, < >>Is->Global optimal solutions obtained by the random solutions;
iterating each random solution a preset number of times according to the formula (2) to update eachEach->
Respectively judge eachComparing whether the first difference value of the previous iteration is smaller than or equal to a first preset adaptation threshold value;
if all the first difference values are smaller than or equal to a first preset adaptation threshold value, respectively judging eachComparing whether the second difference value of the previous iteration is smaller than or equal to a second preset adaptation threshold value;
and if all the second difference values are smaller than or equal to a second preset adaptation threshold value, judging that the optimal solution with the minimum value is obtained.
5. The method of equipment monitoring for a campus of claim 4, wherein each random solution is iterated a preset number of times according to the formula (2) to update eachEach->Comprising:
linearly decrementing the inertia coefficient according to equation (3) once based on each iteration:
(3);
wherein,is->The random solution is at->Inertia coefficient after step optimization, ++>For initial inertia factor, +.>For the current iteration step +.>Is the maximum number of iterative steps.
6. The method of equipment monitoring for a campus of claim 1, wherein responsive to an entry signal for the doorway, acquiring a detection box that matches the entry signal comprises:
responding to the entrance signal, and acquiring image data matched with the entrance signal through an external preset image acquisition end;
dividing the image data into grids with preset numbers on average;
predicting a plurality of boundary boxes for a moving target in the image data according to a target detection algorithm based on all grids;
respectively acquiring the confidence coefficient of each boundary frame, and acquiring the boundary frame with the maximum confidence coefficient and marking the boundary frame as a first-order boundary frame;
calculating the intersection ratio of each other boundary frame and the first-order boundary frame respectively;
selecting a boundary box with the cross ratio being greater than or equal to a preset threshold value as a second-order boundary box;
and acquiring a second-order boundary box with highest confidence and defining the second-order boundary box as the detection box.
7. The method for monitoring equipment in a campus according to claim 2, wherein obtaining a duration of intersection of the detection frame and a warning bounding box of the current equipment, and determining whether the duration is greater than or equal to an early warning response duration of the current equipment, includes:
Mapping the detection frame into the three-dimensional coordinate system through a homography matrix to form a two-dimensional detection frame, wherein the two-dimensional detection frame is parallel to the vertical direction;
rotating the two-dimensional detection frame by 90 degrees based on one vertical edge of the two-dimensional detection frame, and reserving the two-dimensional detection frame before and after rotation;
acquiring all the two-dimensional detection frames after three rotations and defining the two-dimensional detection frames as three-dimensional detection frames;
acquiring Euclidean distance between the three-dimensional detection frame and the warning bounding box;
judging whether the Euclidean distance is smaller than or equal to zero;
if yes, judging that the three-dimensional detection frame is intersected with the warning bounding box of the current device, and beginning to record the intersection time length;
judging whether the intersection time length is greater than or equal to the early warning response time length of the current equipment.
8. A device monitoring apparatus of a campus, the device monitoring apparatus of a campus being applied to the device monitoring method of a campus as claimed in any one of claims 1 to 7, characterized in that the device monitoring apparatus of a campus comprises:
the three-dimensional layout acquisition module is used for acquiring the three-dimensional layout of the park, wherein the three-dimensional layout comprises all roads, all buildings and all entrances and exits positioned in the park;
The security level giving module is used for giving a security level to each device according to a preset security level specification, wherein the security level is increased along with the increment of the level number;
the minimum bounding box and grade number acquisition module is used for acquiring the minimum bounding box of the current equipment and the grade number of the current equipment;
the warning distance definition module is used for defining a first proportional constant, obtaining the product of the first proportional constant and the grade number of the current equipment, and obtaining the warning distance of the current equipment;
the early warning response time length definition module is used for defining a second proportionality constant, obtaining the product of the second proportionality constant and the grade number of the current equipment, and obtaining the early warning response time length of the current equipment;
the warning distance adding module is used for adding the warning distance to the length, the width and the height of the minimum bounding box respectively to form a warning bounding box;
the detection frame acquisition module is used for responding to the entrance signal of the entrance and exit to acquire a detection frame matched with the entrance signal;
the early warning response time length judging module is used for acquiring the time length of intersection of the detection frame and the warning bounding box of the current device and judging whether the time length is greater than or equal to the early warning response time length of the current device;
And the early warning signal generation and transmission module is used for generating an early warning signal and transmitting the early warning signal to an external decision terminal if the time length is greater than or equal to the early warning response time length of the current equipment.
9. An electronic device comprising a processor, and a memory coupled to the processor, the memory storing program instructions executable by the processor; the processor, when executing the program instructions stored by the memory, implements a method of equipment monitoring for a campus as claimed in any one of claims 1 to 7.
10. A storage medium having stored therein program instructions which when executed by a processor implement a device monitoring method capable of implementing a campus of any one of claims 1 to 7.
CN202410125026.2A 2024-01-30 2024-01-30 Method, device, equipment and storage medium for monitoring equipment in park Active CN117649737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410125026.2A CN117649737B (en) 2024-01-30 2024-01-30 Method, device, equipment and storage medium for monitoring equipment in park

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410125026.2A CN117649737B (en) 2024-01-30 2024-01-30 Method, device, equipment and storage medium for monitoring equipment in park

Publications (2)

Publication Number Publication Date
CN117649737A true CN117649737A (en) 2024-03-05
CN117649737B CN117649737B (en) 2024-04-30

Family

ID=90048168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410125026.2A Active CN117649737B (en) 2024-01-30 2024-01-30 Method, device, equipment and storage medium for monitoring equipment in park

Country Status (1)

Country Link
CN (1) CN117649737B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050104961A1 (en) * 2003-11-17 2005-05-19 Mei Han Video surveillance system in which trajectory hypothesis spawning allows for trajectory splitting and/or merging
US20120173831A1 (en) * 2010-12-29 2012-07-05 Teradata Us, Inc. Data aware storage system operations
FR3027432A1 (en) * 2014-10-16 2016-04-22 Valeo Schalter & Sensoren Gmbh DISTANCE ESTIMATION OF A PIETON BY AN IMAGING SYSTEM ON A MOTOR VEHICLE
US20200326179A1 (en) * 2018-04-27 2020-10-15 Shenzhen Sensetime Technology Co., Ltd. Distance Measurement Method, Intelligent Control Method, Electronic Device, and Storage Medium
CN112164015A (en) * 2020-11-30 2021-01-01 中国电力科学研究院有限公司 Monocular vision autonomous inspection image acquisition method and device and power inspection unmanned aerial vehicle
US11106919B1 (en) * 2020-06-02 2021-08-31 ULTINOUS Zrt. Processing of video streams
CN113370977A (en) * 2021-05-06 2021-09-10 上海大学 Intelligent vehicle forward collision early warning method and system based on vision
US20210357649A1 (en) * 2020-05-15 2021-11-18 Sensormatic Electronics, LLC Systems and methods of enforcing distancing rules
WO2022000862A1 (en) * 2020-06-29 2022-01-06 苏州科达科技股份有限公司 Method and apparatus for detecting object in fisheye image, and storage medium
KR102357236B1 (en) * 2021-06-25 2022-02-08 주식회사 빅스터 Availability index prediction system according to the floating population by region and the confirmed population of infectious diseases
US20220057519A1 (en) * 2020-08-18 2022-02-24 IntelliShot Holdings, Inc. Automated threat detection and deterrence apparatus
CN114359231A (en) * 2022-01-06 2022-04-15 腾讯科技(深圳)有限公司 Parking space detection method, device, equipment and storage medium
CN114677446A (en) * 2022-03-21 2022-06-28 华南理工大学 Vehicle detection method, device and medium based on roadside multi-sensor fusion
CN114821676A (en) * 2022-06-29 2022-07-29 珠海视熙科技有限公司 Passenger flow human body detection method and device, storage medium and passenger flow statistical camera
CN114898540A (en) * 2022-04-02 2022-08-12 大连九州创智科技有限公司 Anti-collision early warning method for bulk cargo yard equipment based on geometric component model
CN116962460A (en) * 2023-07-21 2023-10-27 佛山市新基建科技有限公司 Intelligent park operation management system and method
CN117350455A (en) * 2023-10-18 2024-01-05 上海应用技术大学 Monitoring and early warning method based on substation operation safety clear distance calculation model
CN117372900A (en) * 2023-09-28 2024-01-09 山东大学 Unmanned plane-based traffic intersection rotation multi-target tracking method and system

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050104961A1 (en) * 2003-11-17 2005-05-19 Mei Han Video surveillance system in which trajectory hypothesis spawning allows for trajectory splitting and/or merging
US20120173831A1 (en) * 2010-12-29 2012-07-05 Teradata Us, Inc. Data aware storage system operations
FR3027432A1 (en) * 2014-10-16 2016-04-22 Valeo Schalter & Sensoren Gmbh DISTANCE ESTIMATION OF A PIETON BY AN IMAGING SYSTEM ON A MOTOR VEHICLE
US20200326179A1 (en) * 2018-04-27 2020-10-15 Shenzhen Sensetime Technology Co., Ltd. Distance Measurement Method, Intelligent Control Method, Electronic Device, and Storage Medium
US20210357649A1 (en) * 2020-05-15 2021-11-18 Sensormatic Electronics, LLC Systems and methods of enforcing distancing rules
US11106919B1 (en) * 2020-06-02 2021-08-31 ULTINOUS Zrt. Processing of video streams
WO2022000862A1 (en) * 2020-06-29 2022-01-06 苏州科达科技股份有限公司 Method and apparatus for detecting object in fisheye image, and storage medium
US20220057519A1 (en) * 2020-08-18 2022-02-24 IntelliShot Holdings, Inc. Automated threat detection and deterrence apparatus
CN112164015A (en) * 2020-11-30 2021-01-01 中国电力科学研究院有限公司 Monocular vision autonomous inspection image acquisition method and device and power inspection unmanned aerial vehicle
CN113370977A (en) * 2021-05-06 2021-09-10 上海大学 Intelligent vehicle forward collision early warning method and system based on vision
KR102357236B1 (en) * 2021-06-25 2022-02-08 주식회사 빅스터 Availability index prediction system according to the floating population by region and the confirmed population of infectious diseases
CN114359231A (en) * 2022-01-06 2022-04-15 腾讯科技(深圳)有限公司 Parking space detection method, device, equipment and storage medium
CN114677446A (en) * 2022-03-21 2022-06-28 华南理工大学 Vehicle detection method, device and medium based on roadside multi-sensor fusion
CN114898540A (en) * 2022-04-02 2022-08-12 大连九州创智科技有限公司 Anti-collision early warning method for bulk cargo yard equipment based on geometric component model
CN114821676A (en) * 2022-06-29 2022-07-29 珠海视熙科技有限公司 Passenger flow human body detection method and device, storage medium and passenger flow statistical camera
CN116962460A (en) * 2023-07-21 2023-10-27 佛山市新基建科技有限公司 Intelligent park operation management system and method
CN117372900A (en) * 2023-09-28 2024-01-09 山东大学 Unmanned plane-based traffic intersection rotation multi-target tracking method and system
CN117350455A (en) * 2023-10-18 2024-01-05 上海应用技术大学 Monitoring and early warning method based on substation operation safety clear distance calculation model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
金翼: "《碰撞检测算法在变电站安全预警中的应用》", 《中国电业(技术版)》, no. 12, 31 December 2013 (2013-12-31), pages 35 - 37 *

Also Published As

Publication number Publication date
CN117649737B (en) 2024-04-30

Similar Documents

Publication Publication Date Title
Chen et al. AI-empowered speed extraction via port-like videos for vehicular trajectory analysis
Rebolj et al. Point cloud quality requirements for Scan-vs-BIM based automated construction progress monitoring
CN103268729B (en) Based on mobile robot&#39;s tandem type map creating method of composite character
KR102024695B1 (en) System and method for modeling surveillance camera layout
CN106504288B (en) A kind of domestic environment Xiamen localization method based on binocular vision target detection
Biswas et al. Corrective gradient refinement for mobile robot localization
Xiao et al. Monocular vehicle self-localization method based on compact semantic map
Vick et al. Road design layer detection in point cloud data for construction progress monitoring
Guo et al. Evaluation-oriented façade defects detection using rule-based deep learning method
CN113674416A (en) Three-dimensional map construction method and device, electronic equipment and storage medium
Wei Research on university laboratory management and maintenance framework based on computer aided technology
JP7282186B2 (en) situational awareness surveillance
Sumagayan et al. Detecting power lines using point instance network for distribution line inspection
CN117649737B (en) Method, device, equipment and storage medium for monitoring equipment in park
Yu et al. Unmanned aircraft path planning for construction safety inspections
CN111813882B (en) Robot map construction method, device and storage medium
Goswami et al. Efficient real-time localization in prior indoor maps using semantic SLAM
Wei et al. Augmenting progress monitoring in soil-foundation construction utilizing SOLOv2-based instance segmentation and visual BIM representation
Zhao et al. Optimal visual sensor planning
KR102089719B1 (en) Method and apparatus for controlling mechanical construction process
CN116976721A (en) Power distribution operation behavior normalization evaluation method, system and computing equipment
Siddiqui UWB RTLS for construction equipment localization: experimental performance analysis and fusion with video data
Osman et al. Indoor SLAM using a foot-mounted IMU and the local magnetic field
Becker et al. Automatic sensor placement in a 3D volume
US20220390256A1 (en) Crowd-driven mapping, localization and social-friendly navigation system

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
GR01 Patent grant
GR01 Patent grant