CN110446166B - Monitoring method and device for proximity of positioning equipment to geographic fence - Google Patents

Monitoring method and device for proximity of positioning equipment to geographic fence Download PDF

Info

Publication number
CN110446166B
CN110446166B CN201910741709.XA CN201910741709A CN110446166B CN 110446166 B CN110446166 B CN 110446166B CN 201910741709 A CN201910741709 A CN 201910741709A CN 110446166 B CN110446166 B CN 110446166B
Authority
CN
China
Prior art keywords
boundary
geofence
sub
fence
geo
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.)
Active
Application number
CN201910741709.XA
Other languages
Chinese (zh)
Other versions
CN110446166A (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.)
Guangzhou Xiaopeng Motors Technology Co Ltd
Original Assignee
Guangzhou Xiaopeng Motors 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 Guangzhou Xiaopeng Motors Technology Co Ltd filed Critical Guangzhou Xiaopeng Motors Technology Co Ltd
Priority to CN201910741709.XA priority Critical patent/CN110446166B/en
Publication of CN110446166A publication Critical patent/CN110446166A/en
Application granted granted Critical
Publication of CN110446166B publication Critical patent/CN110446166B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/021Services related to particular areas, e.g. point of interest [POI] services, venue services or geofences

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)

Abstract

The invention relates to a method and a device for monitoring the proximity of a positioning device to a geo-fence, a computer-readable storage medium and a computer device. The monitoring method for the proximity of the positioning equipment to the geo-fence comprises the steps of pre-estimating a sub-area outside the geo-fence boundary where the positioning equipment is located according to positioning information of the positioning equipment outside the geo-fence boundary; calculating the distance from the positioning equipment to the sub-boundary of the geographic fence corresponding to the pre-estimated sub-area; and comparing the calculated distance with a preset distance threshold value, and judging whether the positioning equipment is close to the geo-fence or not. According to the embodiment of the invention, the approaching condition of the positioning equipment outside the geo-fence to the geo-fence can be rapidly judged, so that the access amount of the geo-fence can be effectively controlled, and the throughput of real-time online calculation of the geo-fence is improved.

Description

Monitoring method and device for proximity of positioning equipment to geographic fence
Technical Field
The invention belongs to the technical field of geographic positioning, and particularly relates to a method and a device for monitoring proximity of positioning equipment to a geographic fence, a computer-readable storage medium and computer equipment.
Background
The geo-fencing technology is an application of basic location services, a virtual fence is used for enclosing a virtual geographic boundary, and when a signal device enters, leaves and stays in a specific geographic area defined by the virtual geographic boundary, a cloud server automatically discovers the signal device and identifies the behavior of the signal device. The geo-fencing technology is widely applied to vehicle behavior monitoring of the internet of vehicles at present, and along with continuous expansion of vehicle monitoring business, higher requirements are also put forward on the geo-fencing technology, low delay and high throughput are required to be performed on performance, multi-index and multi-scene monitoring is required to be performed on business, namely, the simple actions of vehicle entering, exiting and stopping are monitored, and other indexes of the vehicle are combined for monitoring, for example, the vehicle stops for 1 hour in a specific geographic area, and the electric quantity of the vehicle is less than 30% for warning. It follows that the self-calculation of geofences increases due to the increase in traffic classes.
And, the geo-fence is a real-time calculation with state, if the state of the GPS point and the designated geo-fence is to be judged, the state information of the GPS point about the geo-fence needs to be marked in the memory in real time, and the monitoring task can be accurately finished. With the increase of GPS devices, huge storage space is required to record the state information of GPS points about the geofence, and corresponding computing resources are also required to make subsequent logic decisions.
Therefore, if real-time online computing throughput is to be improved without adding additional computing resources, the amount of geofence computation must be controlled, reducing unnecessary state storage and computation of the GPS device.
Generally, a scheme for effectively controlling the calculation amount of the geo-fences is to simplify the shape of the fence, replace an irregular polygonal fence with a regular fence of a circumscribed rectangle, then judge the distance from a GPS point to the rectangle, and compare the distance with a set threshold value to judge whether the fence is about to enter or not, as shown in fig. 1, thereby reducing the number of requests for entering the fence calculation. Although the scheme is easy to implement, since the geofence is generally called an irregular polygon shape, a large blank area is left between the circumscribed rectangle and the geofence, the control granularity is coarse, the method is only used for scenes with few GPS devices as shown in fig. 1, and highly dense scenes of the GPS devices, such as a busy business circle, cannot be covered. In a highly intensive scene of the GPS device, the GPS device may be fully distributed around the geofence and the GPS device has frequent activities, and by adopting the scheme of the external rectangular fence, the access amount to the geofence cannot be effectively controlled.
Disclosure of Invention
In order to solve the technical problems of large blank area, large calculation amount and low calculation efficiency of the geofence, the invention provides a monitoring method and device for a positioning device to approach the geofence, a computer-readable storage medium and a computer device.
The method for monitoring the proximity of the positioning device to the geo-fence comprises the following steps: according to positioning information of positioning equipment outside a geo-fence boundary, pre-estimating a sub-area outside the geo-fence boundary where the positioning equipment is located; calculating the distance from the positioning equipment to the sub-boundary of the geographic fence corresponding to the pre-estimated sub-area; and comparing the calculated distance with a preset distance threshold value, and judging whether the positioning equipment is close to the geo-fence or not.
The monitoring method can quickly judge the approaching condition of the positioning equipment outside the geo-fence to the geo-fence, so that the access amount of the geo-fence can be effectively controlled, and the real-time online calculation throughput of the geo-fence is improved.
Further, the method further comprises presetting the geo-fence, comprising the steps of: constructing a geofence boundary in an irregular polygon shape that encompasses a geofence area, the geofence boundary comprising a plurality of boundary vertices; dividing the constructed geofence boundary into multiple segments of geofence sub-boundaries, and based on the divided segments of geofence sub-boundaries, dividing the outside of a geofence boundary into multiple sub-regions, the geofence sub-boundary comprising one or more boundary vertices; setting a preset distance threshold for a positioning device outside a geofence boundary to be in a proximity state.
By presetting the geofence, blank areas between the geofence boundary and the geofence area can be effectively reduced, the geofence calculation process is optimized, and the calculation efficiency is improved.
Further, each segment of geofence sub-boundary includes more than three boundary vertices, with the boundary vertices as endpoints of the geofence sub-boundary.
Further, extreme points in four directions of upper, lower, left and right in a two-dimensional plane are selected from a plurality of boundary vertexes on the geofence boundary to serve as endpoints of each geofence sub-boundary, and the geofence boundary is divided into four sections of geofence sub-boundaries.
Further, the geofence sub-boundary comprises a plurality of boundary vertices, and in the step of calculating the distance from the positioning device to the geofence sub-boundary corresponding to the pre-estimated sub-region, the boundary vertices at both ends of the geofence sub-boundary corresponding to the sub-region where the positioning device is located are determined; correspondingly comparing the coordinate value of the X axis or the Y axis of the positioning equipment with the coordinate value of the X axis or the Y axis of the boundary vertex at the two determined ends respectively, and determining one end of the boundary vertex with a smaller difference value as a near end; traversing a plurality of boundary vertices of the sub-boundary of the geofence near one side of the proximity end, and taking the minimum distance from the positioning device as the distance from the positioning device to the sub-boundary of the geofence corresponding to the pre-estimated sub-region.
By selectively traversing a plurality of boundary vertexes of the sub-boundary of the geo-fence close to one side of the near end, the number of boundary vertexes to be traversed is further reduced, the calculation amount is reduced, and the calculation efficiency is improved.
Further, in the step of correspondingly comparing the X-axis or Y-axis coordinate values of the positioning device with the X-axis or Y-axis coordinate values of the boundary vertices of the two determined ends, respectively, a first difference between the X-axis coordinate values of the boundary vertices of the two determined ends and a second difference between the Y-axis coordinate values of the boundary vertices of the two determined ends are calculated, and if the first difference is greater than the second difference, the X-axis coordinate values of the positioning device are correspondingly compared with the X-axis coordinate values of the boundary vertices of the two determined ends, respectively; and if the second difference is larger than the first difference, correspondingly comparing the Y-axis coordinate value of the positioning equipment with the Y-axis coordinate values of the boundary vertexes at the two determined ends respectively.
And comparing coordinate values by comparing the first difference value with the second difference value and selecting coordinate axes with larger difference values to ensure that the dispersion degree of the boundary vertexes on the selected coordinate axes is wider, thereby being beneficial to accurately determining the distance from the positioning equipment to the estimated sub-boundary of the geographic fence corresponding to the sub-region.
The monitoring device for the positioning equipment to approach the geo-fence comprises a sub-region pre-estimating unit, a distance calculating unit and an approach judging unit, wherein the sub-region pre-estimating unit estimates a sub-region outside the geo-fence boundary where the positioning equipment is located according to positioning information of the positioning equipment outside the geo-fence boundary; the distance calculation unit calculates the distance from the positioning equipment to the geofence sub-boundary corresponding to the sub-region outside the pre-estimated geofence boundary; and the approach judgment unit compares the calculated distance with a preset distance threshold value and judges whether the positioning equipment approaches to the geo-fence or not.
Further, the monitoring device further comprises a geofence preset unit comprising a geofence boundary construction component, the geofence outside zoning component, and a threshold setting component, wherein the geofence boundary construction component constructs a geofence boundary in an irregular polygon shape surrounding a geofence area, the geofence boundary comprising a plurality of boundary vertices; the geofence outside partition component dividing the constructed geofence boundary into segments of geofence sub-boundaries and dividing the geofence boundary outside into sub-regions based on the divided segments of geofence sub-boundaries, the geofence sub-boundaries comprising one or more boundary vertices; the threshold setting component sets a preset distance threshold for the positioning device outside the geofence boundary to be in a proximate state.
The computer readable storage medium of an embodiment of the invention has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method as described above.
The computer device of the embodiment of the present invention includes a memory, a processor and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the method as described above when executing the program.
The invention has the beneficial effects that: according to the monitoring method and device for the proximity of the positioning device to the geofence, the computer readable storage medium and the computer device provided by the embodiment of the invention, the geofence boundary surrounding the geofence area and in an irregular polygonal shape is constructed and segmented, and the proximity state of the positioning device to the geofence is judged according to the segmented geofence sub-boundary, so that the geofence access amount is effectively reduced, the geofence calculation process is optimized, the calculation efficiency is improved, and the real-time calculation throughput of the geofence is improved.
Drawings
FIG. 1 is a schematic diagram of a prior art geofence setup;
FIG. 2 is a flow chart of a method for monitoring proximity of a locating device to a geofence as set forth in an embodiment of the present invention;
fig. 3 is a flowchart of presetting a geofence in the monitoring method for a positioning device approaching the geofence according to the embodiment of the present invention;
FIG. 4 is a schematic diagram of the determination of geofence boundaries set forth by embodiments of the present invention;
FIG. 5 is a schematic illustration of the geofence sub-boundary partitioning of the geofence boundary of the preferred embodiment of the present invention;
FIG. 6 is a schematic diagram of the setting of control access areas outside of a geofence boundary set forth in an embodiment of the present invention;
fig. 7 is a schematic diagram of calculating a distance from a positioning device to a sub-boundary of a geofence by using a triangle calculation method in the monitoring method for proximity of the positioning device to the geofence according to the embodiment of the present invention;
FIG. 8 is a block diagram of a monitoring device for locating a device in proximity to a geofence, as set forth in embodiments of the present invention;
fig. 9 is a block diagram of a geofence provisioning unit of a monitoring device in which a locating device is proximate to a geofence, as set forth in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings. Those skilled in the art will appreciate that the present invention is not limited to the drawings and the following examples.
On one hand, the embodiment of the invention provides a monitoring method for the proximity of a positioning device to a geo-fence, and the method can be used for rapidly judging the proximity condition of the positioning device outside the geo-fence to the geo-fence, so that the access amount of the geo-fence can be effectively controlled, and the real-time online calculation throughput of the geo-fence is improved. The positioning device can be a mobile phone, a computer or a PDA, and the like, and can be used for positioning through a network or a GPS.
As shown in fig. 2, the method for monitoring the proximity of a positioning device to a geofence includes the following steps:
in the sub-area estimation step S10, a sub-area outside the geofence boundary where the positioning device is located is estimated according to the positioning information of the positioning device outside the geofence boundary.
Specifically, a plurality of sub-areas are divided along the circumference of the geo-fence outside the boundary of the geo-fence, and a specific positioning device outside the geo-fence is estimated to be in the divided sub-areas. Therefore, during subsequent monitoring, calculation and judgment are only needed to be carried out on the sub-area by aiming at the positioning equipment, and the range needing to be traversed subsequently is reduced, so that the calculation amount is reduced, and the calculation efficiency is improved. The method for estimating the sub-area outside the geofence boundary where the positioning device is located may be multiple, for example, a positioning information reference point set of each sub-area is pre-established corresponding to each sub-area outside the geofence boundary, and the sub-area outside the geofence boundary where the positioning device is located is estimated by comparing and judging the acquired positioning information of the positioning device with the positioning information reference point set of each sub-area.
Further, in a preferred embodiment of the present invention, the geofence needs to be preset, as shown in fig. 3, comprising the following steps:
in a geofence boundary construction step S101, a geofence boundary in the shape of an irregular polygon surrounding a geofence area is constructed, the geofence boundary comprising a plurality of boundary vertices.
Specifically, as shown in fig. 4, the inner side of the diagram is an administrative map of a place, i.e., an area to be geofenced, and the geofenced area has irregular edges. A geofence boundary is formed outside the geofenced area encompassing the geofenced area, which in this embodiment includes a plurality of boundary vertices P0, P1, P2, P3, … …, P13. It should be noted that the embodiments of the present invention are all concerned with and designed on a two-dimensional plane of a geofenced area.
Preferably, a plurality of boundary vertices are selected from a plurality of boundary points of an edge of the geo-fenced area, and a geo-fenced boundary enclosing the geo-fenced area is determined based on the selected plurality of boundary vertices, i.e., in the present embodiment, a plurality of boundary vertices P0, P1, P2, P3, … …, P13 enclose an irregular polygon shaped geo-fenced boundary on the edge of the geo-fenced area by line segments P0P1, P1P2, P2P3, P3P4, … …, P12P13, and P13P 0.
The embodiment of the invention forms the geo-fence boundary which surrounds the geo-fence area and is in an irregular polygon shape through the appropriately selected boundary vertex (the outermost boundary point) on the premise of approaching the shape of the geo-fence area as much as possible, thereby reducing the blank area between the geo-fence boundary and the geo-fence area.
Based on the above considerations, a convex hull algorithm can be employed to determine a geofence boundary in the shape of an irregular polygon that encompasses a geofence area. A convex hull is a concept in computational geometry, comprising, on a given two-dimensional plane, a set of points of a plurality of reference points, the convex hull being a smallest convex polygon formed by connecting the outermost points of the set of points, any reference point in the set of points being at the edge of the convex polygon or within the convex polygon. The convex hull algorithm is an algorithm for determining the minimum convex polygon according to the position of each point in the point set in the two-dimensional plane. Common convex hull algorithms include exhaustive (brute force), divide and conquer, Jarvis marching, Graham scanning, and Melkman algorithms, among others.
In the specific application, the Melkman algorithm is adopted for convex hull calculation, the Melkman algorithm can quickly acquire the boundary vertexes of the convex hull, the acquired boundary vertexes have certain sequence, and the points are smoothly arranged according to the anticlockwise direction according to the calculation principle, so that the subsequent calculation is facilitated. Through experiments, an administrative map comprising 2702 boundary points is calculated by adopting a Melkman algorithm, and boundary vertices (convex hull boundary vertices) of a geo-fence boundary surrounding a geo-fence area, which are obtained outside the geo-fence area, can be reduced to 43, so that the number of the boundary vertices is greatly reduced, the calculation amount of the geo-fence is effectively controlled, and unnecessary state storage and calculation of positioning equipment are reduced.
In geofence outside zoning step S102, the constructed geofence boundary is divided into multiple segments of geofence sub-boundaries, and based on the divided segments of geofence sub-boundaries, the outside of geofence boundary is divided into multiple sub-regions, the geofence sub-boundaries comprising one or more boundary vertices.
The constructed geofence boundary encompassing the geofenced area is divided into segments of geofence sub-boundaries according to certain rules. The rule may be to divide the geofence boundary equidistantly, to distribute the geofence boundary substantially evenly by the number of boundary vertices, or to divide the geofence boundary equally around a point in the geofence region to form a multi-segment geofence sub-boundary, e.g., when the geofence boundary is divided at 60 degrees, to divide the geofence boundary into six segments.
Outside the geofence boundary, the plurality of sub-regions is derived, for example, based on a proportional magnification of the partitioned multi-segment geofence sub-boundaries.
Preferably, each segment of the geofence sub-boundary includes more than three boundary vertices, and the boundary vertices are end points of the geofence sub-boundary. Thus, the endpoints of each segment of the geofence sub-boundary are boundary vertices, and each segment of the geofence sub-boundary includes more than three boundary vertices. Specifically, with reference to the preferred embodiment of the present invention, the foregoing convex hull/geofence boundary determined using the Melkman algorithm is divided into four geofence sub-boundaries in a counterclockwise order. As shown in fig. 5, extreme points in four directions in a two-dimensional plane, namely, a lowest point M1(x, ymin)/P9, a rightmost point M2(xmax, y)/P13, a highest point M3(x, ymax)/P2, and a leftmost point M4(xmin, y)/P4, are selected from a plurality of boundary vertices on the convex hull/geofence boundary, and when there are a plurality of extreme points in one direction, one of the extreme points may be randomly selected. Thus, the geofence boundary between nadir M1(x, ymin)/P9 and rightmost point M2(xmax, y)/P13 is the lower right geofence sub-boundary M1M2, including five boundary vertices P9, P10, P11, P12, P13; the geofence boundary between rightmost point M2(xmax, y)/P13 and highest point M3(x, ymax)/P2 is an upper right geofence sub-boundary M2M3, including four boundary vertices P13, P0, P1, P2; the geofence boundary between apex M3(x, ymax)/P2 and leftmost point M4(xmin, y)/P4 is the lower left geofence sub-boundary M3M4, comprising three boundary vertices P2, P3, P4; the geofence boundary between leftmost point M4(xmin, y)/P4 and nadir M1(x, ymin)/P9 is the lower left geofence sub-boundary M4M1, including six boundary vertices P4, P5, P6, P7, P8, P9. Outside the geofence boundary, the plurality of sub-regions in reverse timeline ordering, e.g., lower right sub-region, upper left sub-region, and lower left sub-region, are derived based on the scaled-up of the divided four geofence sub-boundaries M1M2, M2M3, M3M4, and M4M 1.
In the threshold setting step S103, a preset distance threshold is set at which the positioning device outside the geofence boundary is in a close state.
By setting a preset distance threshold at which a positioning device outside a geofence boundary is in proximity, a control access area of the positioning device can be defined. Only when the positioning device outside the geofence boundary enters the control access area, that is, the distance from the positioning device to the geofence boundary is smaller than the preset distance threshold, it is considered that the positioning device is about to enter/approach the geofence, and it is necessary to record the status information of the positioning device about the geofence in the memory in real time for accurate monitoring. And if the distance from the positioning device to the boundary of the geo-fence is greater than a preset distance threshold value, the positioning device is not considered to be close to/far away from the geo-fence, and the state information of the positioning device about the geo-fence does not need to be recorded in a memory.
As shown in fig. 6, by setting a preset distance threshold value at which the positioning device is in a close state, the range of the control access area of the positioning device is defined outside the geofence boundary, and a plurality of control access sub-areas of the plurality of sub-areas outside the geofence boundary can be further determined, i.e., a plurality of control access sub-areas of a lower right sub-area, an upper left sub-area, and a lower left sub-area, which are formed outside the geofence boundary in a counterclockwise order — a lower right control access sub-area, an upper left control access sub-area, and a lower left control access sub-area.
It should be noted that, according to different application scenarios, the preset distance thresholds of the proximity state of the positioning devices in the sub-areas outside the geofence boundary may be the same or different.
In the distance calculating step S20, the distance from the positioning device to the geofence sub-boundary corresponding to the sub-region outside the pre-estimated geofence boundary is calculated.
There are various methods for calculating the distance from the positioning device to the geofence sub-boundary corresponding to the sub-region outside the estimated geofence boundary, for example, calculating the distance from the positioning device to each boundary vertex on the geofence sub-boundary, and taking the average value or the minimum value as the distance from the positioning device to the geofence sub-boundary corresponding to the sub-region outside the estimated geofence boundary.
In another preferred embodiment of the present invention, when the sub-boundary of the geofence corresponding to the sub-region where the positioning apparatus is located includes a plurality of boundary vertices, to further reduce the calculation amount, the distance from the positioning apparatus to the sub-boundary of the geofence corresponding to the pre-estimated sub-region is calculated by the following steps:
s201, determining boundary vertexes at two ends of a geofence sub-boundary corresponding to a sub-region where the positioning equipment is located;
boundary vertices at two ends of the geofence sub-boundary specifically refer to a leftmost point, a rightmost point, a highest point and a lowest point of the geofence sub-boundary on a two-dimensional plane. As shown with particular reference to fig. 5.
S202, correspondingly comparing the coordinate values of the X axis or the Y axis of the positioning equipment with the coordinate values of the X axis or the Y axis of the boundary vertexes at the two determined ends respectively, and determining one end of the boundary vertex with a smaller difference value as a near end;
and comparing the coordinate values of the X axis or the Y axis of the positioning equipment with the coordinate values of the X axis and the Y axis of the leftmost point, the rightmost point, the highest point and the lowest point one by one to determine a vertex closest to the positioning equipment, and taking the vertex as a proximity end.
Preferably, the correspondingly comparing the coordinate value of the X axis or the Y axis of the positioning device with the coordinate value of the X axis or the Y axis of the boundary vertex of the two determined ends respectively comprises the following steps:
step 1, calculating a first difference value between the X-axis coordinate values of the boundary vertexes of the two determined ends, and calculating a second difference value between the Y-axis coordinate values of the boundary vertexes of the two determined ends,
step 2, if the first difference is larger than the second difference, the X-axis coordinate value of the positioning equipment is respectively and correspondingly compared with the X-axis coordinate value of the boundary vertex of the two determined ends;
and 3, if the second difference is larger than the first difference, correspondingly comparing the Y-axis coordinate value of the positioning equipment with the Y-axis coordinate value of the boundary vertex at the two determined ends respectively.
S203, traversing a plurality of boundary vertexes of the sub-boundary of the geo-fence, which are close to the near end side, and taking the minimum distance from the positioning device as the distance from the positioning device to the sub-boundary of the geo-fence corresponding to the estimated sub-region.
To further illustrate the above method, the present invention provides a specific embodiment for further explanation. If the coordinates of the positioning device are G (123,456), the coordinates of the boundary vertices at the two ends of the sub-boundary of the geofence corresponding to the sub-region where the positioning device is located are Pb (225,180) and Pe (36,295), respectively, and then the coordinates G of the positioning device and the coordinates Pb and Pe of the boundary vertices at the two ends can be arbitrarily selected and compared. Or, in a preferred embodiment, a first difference between the X-axis coordinate values of the determined boundary vertex coordinates Pb and Pe at the two ends is calculated, and a second difference between the Y-axis coordinate values of the determined boundary vertex coordinates Pb and Pe at the two ends is calculated, wherein the first difference between the X-axis coordinate values of the coordinates Pb and Pe at the two ends is 225-36 ═ 189, the second difference between the Y-axis coordinate values is 295-180 ═ 115, and the first difference is greater than the second difference, then the X-axis coordinate value 123 of the positioning device is correspondingly compared with the X-axis coordinate values 225 and 36 of the determined boundary vertex coordinates Pb and Pe at the two ends, respectively; and if the second difference is larger than the first difference, correspondingly comparing the Y-axis coordinate value of the positioning equipment with the Y-axis coordinate values of the boundary vertexes at the two determined ends respectively.
Subsequently, the X-axis coordinate value 123 of the coordinate G of the positioning device is correspondingly compared with the X-axis coordinate values 225 and 36 of the determined boundary vertices Pb and Pe, respectively, the difference between the X-axis coordinate value 123 of the coordinate G of the positioning device and the X-axis coordinate value 225 of the coordinate Pb of the boundary vertex at the first end is 225 and 123-102, the difference between the X-axis coordinate value 123 of the coordinate G of the positioning device and the X-axis coordinate value 36 of the coordinate Pe of the boundary vertex at the second end is 123-36 and 87, since difference 87 is less than difference 102, one end of the second end boundary vertex is determined to be the proximate end, thereby traversing a plurality of boundary vertices of the geofence sub-boundary on a side proximate the proximate end, and taking the minimum distance from the positioning device as the distance from the positioning device to the sub-boundary of the geographic fence corresponding to the pre-estimated sub-area. And the number of the boundary vertices selected for traversal is about half of the number of the boundary vertices on the sub-boundary of the geofence corresponding to the sub-region where the positioning device is located. For example, when the number n of boundary vertices on the sub-boundary of the geofence corresponding to the sub-region where the positioning device is located is an even number, the number of boundary vertices selected for traversal is n/2; and when the number n of boundary vertices on the sub-boundary of the geofence corresponding to the sub-region where the positioning device is located is odd, the number of the boundary vertices selected for traversal is (n +/-1)/2. In the above calculation, the number of boundary vertices on the geofence sub-boundary corresponding to the sub-region where the positioning device is located can be reduced by simply comparing the coordinate size in the X-axis or Y-axis direction, and the calculation is simple and fast.
In calculating the distance from the positioning device to the pre-estimated geofence sub-boundary corresponding to the sub-region outside the geofence boundary according to the selected boundary vertex for traversal, a triangle calculation method is preferably adopted. As shown in fig. 7, the distance from the coordinate point of the pointing device to its corresponding side is determined by constructing a triangle of a line segment on the sub-boundary of the geofence corresponding to the coordinate point of the pointing device and the sub-region in which it is located. If the constructed triangle is an acute triangle, the distance is the perpendicular distance of the coordinate point of the pointing device to its corresponding side, and if the constructed triangle is an obtuse or right triangle, the distance is the distance of the coordinate point of the pointing device to the nearest boundary vertex on its opposite side.
In the approach judgment step S30, the calculated distance is compared with a preset distance threshold to judge whether the positioning device approaches the geo-fence.
When the calculated distance is smaller than a preset distance threshold value of a control access area, the positioning device approaches the geo-fence, and the state information of the positioning device about the geo-fence needs to be recorded in a memory in real time to perform accurate monitoring; when the calculated distance is greater than a preset distance threshold of the control access area, the positioning device is far away from the geo-fence, and at the moment, the state information of the positioning device about the geo-fence does not need to be recorded in a memory in real time.
According to the method provided by the embodiment of the invention, the access to the geo-fence is judged according to the sub-boundary of the segmented geo-fence by constructing and segmenting the boundary of the geo-fence which surrounds the geo-fence area and is in an irregular polygon shape, so that the occurrence of blank areas is effectively reduced, the access amount of the geo-fence is effectively reduced, the calculation process of the geo-fence is optimized, the calculation efficiency is improved, and the throughput of real-time calculation of the geo-fence is improved.
On the other hand, as shown in fig. 8, an embodiment of the present invention further provides a monitoring apparatus for a positioning device approaching a geo-fence, which can quickly determine an approaching condition of the positioning device outside the geo-fence to the geo-fence, so as to effectively control an access amount of the geo-fence, and improve a throughput of real-time online calculation of the geo-fence. The positioning device can be a mobile phone, a computer or a PDA, and the like, and can be used for positioning through a network or a GPS.
The monitoring device for the positioning equipment to approach the geo-fence comprises a sub-area pre-estimating unit, a distance calculating unit and an approach judging unit.
And the sub-region pre-estimating unit is used for estimating the sub-region outside the geofence boundary where the positioning equipment is located according to the positioning information of the positioning equipment outside the geofence boundary.
The distance calculation unit calculates the distance from the positioning device to the geofence sub-boundary corresponding to the sub-region outside the pre-estimated geofence boundary.
And the approach judgment unit compares the calculated distance with a preset distance threshold value and judges whether the positioning equipment approaches to the geo-fence or not.
In a preferred embodiment of the present invention, the monitoring apparatus for the proximity of the positioning device to the geofence further comprises a geofence preset unit, as shown in fig. 9, the geofence preset unit comprises a geofence boundary constructing unit, the geofence outside zoning unit and a threshold setting unit.
The geofence boundary construction component constructs a geofence boundary of an irregular polygonal shape encompassing a geofence area, the geofence boundary comprising a plurality of boundary vertices.
The geofence outside partition component divides the constructed geofence boundary into multiple segments of geofence sub-boundaries, and divides the geofence boundary outside into multiple sub-regions based on the divided segments of geofence sub-boundaries, the geofence sub-boundaries comprising one or more boundary vertices.
The threshold setting component sets a preset distance threshold for the positioning device outside the geofence boundary to be in a proximate state.
According to the method provided by the embodiment of the invention, the access to the geo-fence is judged according to the sub-boundary of the segmented geo-fence by constructing and segmenting the boundary of the geo-fence which surrounds the geo-fence area and is in an irregular polygon shape, so that the occurrence of blank areas is effectively reduced, the access amount of the geo-fence is effectively reduced, the calculation process of the geo-fence is optimized, the calculation efficiency is improved, and the throughput of real-time calculation of the geo-fence is improved.
In yet another aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the above method.
In still another aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method when executing the program.
Those of skill in the art will understand that the logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be viewed as implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The embodiments of the present invention have been described above. However, the present invention is not limited to the above embodiment. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for monitoring proximity of a locating device to a geofence, comprising the steps of:
according to positioning information of positioning equipment outside a geo-fence boundary, pre-estimating a sub-region outside the geo-fence boundary where the positioning equipment is located, wherein the geo-fence boundary surrounds the geo-fence region and comprises a plurality of sections of geo-fence sub-boundaries, and the geo-fence sub-boundaries correspond to the sub-region outside the geo-fence boundary;
calculating the distance from the positioning equipment to the sub-boundary of the geographic fence corresponding to the pre-estimated sub-area;
and comparing the calculated distance with a preset distance threshold value, and judging whether the positioning equipment is close to the geo-fence or not.
2. The monitoring method of claim 1, the method further comprising pre-configuring the geo-fence, comprising the steps of:
constructing a geofence boundary in an irregular polygon shape that encompasses a geofence area, the geofence boundary comprising a plurality of boundary vertices;
dividing the constructed geofence boundary into multiple segments of geofence sub-boundaries, and based on the divided segments of geofence sub-boundaries, dividing the outside of a geofence boundary into multiple sub-regions, the geofence sub-boundary comprising one or more boundary vertices;
setting a preset distance threshold for a positioning device outside a geofence boundary to be in a proximity state.
3. A method of monitoring as recited in claim 2, wherein each geofence sub-boundary comprises more than three boundary vertices, boundary vertices being endpoints of the geofence sub-boundary.
4. A method for monitoring as recited in claim 3, wherein the geofence boundary is divided into four geofence sub-boundaries by selecting extreme points in four directions, up, down, left, and right, in a two-dimensional plane from a plurality of boundary vertices on the geofence boundary as endpoints of each geofence sub-boundary.
5. The method for monitoring the proximity of a positioning device to a geofence of claim 2, wherein the geofence sub-boundary comprises a plurality of boundary vertices, wherein in the step of calculating the distance of the positioning device to the geofence sub-boundary corresponding to the pre-estimated sub-region,
determining boundary vertexes at two ends of a sub-boundary of a geographic fence corresponding to a sub-region where the positioning equipment is located;
correspondingly comparing the coordinate value of the X axis or the Y axis of the positioning equipment with the coordinate value of the X axis or the Y axis of the boundary vertex at the two determined ends respectively, and determining one end of the boundary vertex with a smaller difference value as a near end;
traversing a plurality of boundary vertices of the sub-boundary of the geofence near one side of the proximity end, and taking the minimum distance from the positioning device as the distance from the positioning device to the sub-boundary of the geofence corresponding to the pre-estimated sub-region.
6. The method for monitoring the proximity of a pointing device to a geofence of claim 5, wherein in the step of correspondingly comparing the X-axis or Y-axis coordinate values of the pointing device with the X-axis or Y-axis coordinate values of the determined boundary vertices at both ends,
calculating a first difference value between the X-axis coordinate values of the boundary vertices of the determined both ends, and calculating a second difference value between the Y-axis coordinate values of the boundary vertices of the determined both ends,
if the first difference is larger than the second difference, respectively carrying out corresponding comparison on the X-axis coordinate value of the positioning equipment and the X-axis coordinate value of the boundary vertex of the two determined ends;
and if the second difference is larger than the first difference, correspondingly comparing the Y-axis coordinate value of the positioning equipment with the Y-axis coordinate values of the boundary vertexes at the two determined ends respectively.
7. A monitoring device for a positioning apparatus approaching a geo-fence, the monitoring device comprising a sub-area pre-estimating unit, a distance calculating unit and an approach judging unit, wherein,
the sub-region pre-estimating unit estimates a sub-region outside a geo-fence boundary where a positioning device is located according to positioning information of the positioning device outside the geo-fence boundary, wherein the geo-fence boundary surrounds the geo-fence region and comprises a plurality of sections of geo-fence sub-boundaries, and the geo-fence sub-boundaries correspond to the sub-region outside the geo-fence boundary;
the distance calculation unit calculates the distance from the positioning equipment to the geofence sub-boundary corresponding to the sub-region outside the pre-estimated geofence boundary;
and the approach judgment unit compares the calculated distance with a preset distance threshold value and judges whether the positioning equipment approaches to the geo-fence or not.
8. The monitoring apparatus of claim 7, further comprising a geofence preset unit comprising a geofence boundary construction component, the geofence outside zoning component, and a threshold setting component, wherein,
the geofence boundary construction component constructing a geofence boundary in an irregular polygonal shape that encompasses a geofence area, the geofence boundary comprising a plurality of boundary vertices;
the geofence outside partition component dividing the constructed geofence boundary into segments of geofence sub-boundaries and dividing the geofence boundary outside into sub-regions based on the divided segments of geofence sub-boundaries, the geofence sub-boundaries comprising one or more boundary vertices;
the threshold setting component sets a preset distance threshold for the positioning device outside the geofence boundary to be in a proximate state.
9. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method according to one of the claims 1 to 6.
10. Computer arrangement, characterized in that the computer arrangement comprises a memory, a processor and a computer program stored on the memory and executable on the processor, which when executing the program performs the steps of the method according to one of claims 1 to 6.
CN201910741709.XA 2019-08-12 2019-08-12 Monitoring method and device for proximity of positioning equipment to geographic fence Active CN110446166B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910741709.XA CN110446166B (en) 2019-08-12 2019-08-12 Monitoring method and device for proximity of positioning equipment to geographic fence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910741709.XA CN110446166B (en) 2019-08-12 2019-08-12 Monitoring method and device for proximity of positioning equipment to geographic fence

Publications (2)

Publication Number Publication Date
CN110446166A CN110446166A (en) 2019-11-12
CN110446166B true CN110446166B (en) 2021-02-19

Family

ID=68434795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910741709.XA Active CN110446166B (en) 2019-08-12 2019-08-12 Monitoring method and device for proximity of positioning equipment to geographic fence

Country Status (1)

Country Link
CN (1) CN110446166B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112543412B (en) * 2020-01-17 2023-03-21 北京融信数联科技有限公司 Crowd classification method based on mobile phone signaling track point convex hull
CN111784439A (en) * 2020-05-28 2020-10-16 宁波小遛共享信息科技有限公司 Method, system and device for returning vehicle detection
CN112001965B (en) * 2020-08-14 2021-08-27 广州掌淘网络科技有限公司 Method, device and equipment for boundary delineation of target building ring
WO2022067759A1 (en) * 2020-09-30 2022-04-07 深圳市大疆创新科技有限公司 Flight control method, aircraft, control terminal, and readable storage medium
CN112395495B (en) * 2020-10-22 2021-12-17 腾讯科技(深圳)有限公司 Information recommendation method, device and equipment based on interest points and storage medium
CN115050185B (en) * 2022-06-14 2023-08-25 北京车网科技发展有限公司 Method, system and storage medium for judging compliance of vehicle operation range
CN115334452B (en) * 2022-10-11 2022-12-27 邹城美安系统集成有限公司 Centralized building intelligent alarm method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533501B (en) * 2013-10-15 2018-12-18 厦门雅迅网络股份有限公司 A kind of geography fence generation method
CN105094126A (en) * 2014-05-22 2015-11-25 苏州宝时得电动工具有限公司 Outdoor self-walking robot system
WO2016130994A1 (en) * 2015-02-13 2016-08-18 Unmanned Innovation, Inc. Unmanned aerial vehicle remote flight planning system
CN107390243A (en) * 2017-06-09 2017-11-24 北斗导航位置服务(北京)有限公司 A kind of GNSS location datas and geography fence critical point thresholding method
US10129694B1 (en) * 2017-08-07 2018-11-13 Amazon Technologies, Inc. High density location-based service zone management for a geographic region
CN109068099B (en) * 2018-09-05 2020-12-01 济南大学 Virtual electronic fence monitoring method and system based on video monitoring
CN110072088B (en) * 2019-05-20 2020-10-20 湖南工程学院 Method for monitoring field camp

Also Published As

Publication number Publication date
CN110446166A (en) 2019-11-12

Similar Documents

Publication Publication Date Title
CN110446166B (en) Monitoring method and device for proximity of positioning equipment to geographic fence
Rosu et al. Latticenet: Fast point cloud segmentation using permutohedral lattices
CN111210429B (en) Point cloud data partitioning method and device and obstacle detection method and device
CN116129376A (en) Road edge detection method and device
CN112767551B (en) Three-dimensional model construction method and device, electronic equipment and storage medium
CN111445566B (en) Information processing method and device and computer readable storage medium
CN109583799B (en) Region division method and device and electronic equipment
CN110689492B (en) Image edge smoothing method and device
CN113628343B (en) Three-dimensional grid combination processing method and device and storage medium
JP5973572B2 (en) Video segmentation method
CN111080792B (en) Model simplification processing method and device, electronic equipment and storage medium
CN115662267A (en) Map simplifying method, map simplifying device, storage medium and equipment
CN113867371A (en) Path planning method and electronic equipment
CN113848947A (en) Path planning method and device, computer equipment and storage medium
CN112560150A (en) Road surface elevation calculation method and device, computer equipment and storage medium
Deng et al. Expansion-based algorithms for finding single pair shortest path on surface
CN117826843B (en) Unmanned aerial vehicle intelligent obstacle avoidance method and system based on three-dimensional point cloud
CN117115391B (en) Model updating method, device, computer equipment and computer readable storage medium
KR102061835B1 (en) How to implement LOD in non-square Grid data with NaN
CN116091365B (en) Triangular surface-based three-dimensional model notch repairing method, triangular surface-based three-dimensional model notch repairing device, triangular surface-based three-dimensional model notch repairing equipment and medium
CN117315197A (en) Model processing method, device, computing equipment and machine-readable storage medium
US11443446B2 (en) Method and system for determining dynamism in a scene by processing depth image
CN110414758B (en) Region determination method and device and electronic equipment
CN110415360B (en) Graphic processing method and system for ground area in home decoration design
KR101938271B1 (en) RegionPartitioning-based Routing Method for traffic distribution in Network-on-Chip

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