CN112770260B - Positioning method and device based on geofence, positioning terminal and storage medium - Google Patents

Positioning method and device based on geofence, positioning terminal and storage medium Download PDF

Info

Publication number
CN112770260B
CN112770260B CN201911062144.9A CN201911062144A CN112770260B CN 112770260 B CN112770260 B CN 112770260B CN 201911062144 A CN201911062144 A CN 201911062144A CN 112770260 B CN112770260 B CN 112770260B
Authority
CN
China
Prior art keywords
matching
target
cylinder
coordinates
geofence
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
CN201911062144.9A
Other languages
Chinese (zh)
Other versions
CN112770260A (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.)
Qianxun Spatial Intelligence Inc
Original Assignee
Qianxun Spatial Intelligence Inc
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 Qianxun Spatial Intelligence Inc filed Critical Qianxun Spatial Intelligence Inc
Priority to CN201911062144.9A priority Critical patent/CN112770260B/en
Publication of CN112770260A publication Critical patent/CN112770260A/en
Application granted granted Critical
Publication of CN112770260B publication Critical patent/CN112770260B/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
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/38Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
    • G01S19/39Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/42Determining position
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)

Abstract

Positioning method and device based on geofence, positioning terminal and storage medium, wherein the method comprises the following steps: acquiring an information table of a target geofence, wherein the geofence is formed by splicing a plurality of cylinders with consistent bottom radii, the information table comprises information of each cylinder, the information comprises coordinates of the bottom circle center of the corresponding cylinder and the corresponding radius, and the coordinates are three-dimensional coordinates; and matching the coordinates of the target to be positioned with the information table, and if the matching is successful, determining that the target to be positioned is in the geofence. In the embodiment of the invention, the geofence model with a cylindrical shape is adopted for positioning based on three-dimensional coordinates, so that the positioning accuracy can be improved.

Description

Positioning method and device based on geofence, positioning terminal and storage medium
Technical Field
The present invention relates to the field of internet of things, and in particular, to a positioning method and apparatus based on a geofence, a positioning terminal and a storage medium.
Background
With the rapid development of intelligent terminals, the geofence technology based on intelligent terminals is in the field of view of people. Geofencing (Geo-fencing) is an application based on location services (LBS); a virtual fence is adopted to enclose a virtual geographic boundary, and when a terminal enters the virtual geographic boundary, pop-up notification or alarm information is applied; geofences are used in shopping, personal assistant, personnel location, smart home, and other fields because of the concepts and modes of aggregated information services they possess.
Most of the prior geofence systems are limited to two-dimensional space, and few fence models in three-dimensional space are constructed, so that the positioning accuracy and efficiency are low.
Therefore, a new technical solution is needed to solve the above technical problems.
Disclosure of Invention
In view of the above, the embodiment of the invention provides a positioning method and device based on a geofence, a positioning terminal and a storage medium, which solve the problem of low positioning accuracy by using the geofence in the prior art.
A first aspect of an embodiment of the present invention provides a positioning method based on a geofence, including:
acquiring an information table of a target geofence, wherein the geofence is formed by splicing a plurality of cylinders with consistent bottom radii, the information table comprises information of each cylinder, the information comprises coordinates of the bottom circle center of the corresponding cylinder and the corresponding radius, and the coordinates are three-dimensional coordinates;
and matching the coordinates of the target to be positioned with the information table, and if the matching is successful, determining that the target to be positioned is in the geofence.
A second aspect of embodiments of the present invention provides a geofence-based positioning device for performing a geofence-based positioning method as mentioned in the first aspect above.
A third aspect of an embodiment of the present invention also provides a positioning terminal, including a memory, a processor and a computer program stored on the memory and executable on the processor, where the processor implements the method mentioned in the first aspect when executing the computer program.
A fourth aspect of an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of the first aspect.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: and the geofence model with a cylindrical shape is adopted for positioning based on three-dimensional coordinates, so that the positioning accuracy can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a positioning method based on a geofence according to a first embodiment of the present invention;
FIG. 2 is a schematic view of a portion of a geofence according to a positioning method according to a first embodiment of the present invention;
FIG. 3 is a flowchart showing a step S2 of a preferred embodiment of a positioning method based on a geofence according to a first embodiment of the present invention;
FIG. 4 is a flowchart of step S2 of another preferred embodiment of a geofence-based positioning method according to the first embodiment of the present invention;
FIG. 5 is a block diagram of a positioning device based on a geofence according to a second embodiment of the present invention;
fig. 6 is a schematic structural diagram of a positioning terminal according to a third embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
It should be understood that, the sequence number of each step in this embodiment does not mean the execution sequence, and the execution sequence of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiment of the present invention in any way.
It should be noted that, the descriptions of "first" and "second" in this embodiment are used to distinguish different areas, modules, and the like, and do not represent the sequence, and are not limited to the "first" and "second" being different types.
In order to illustrate the technical solution of the present invention, the following description is given by way of specific examples.
Example 1
Fig. 1 is a schematic flow chart of a positioning method based on geofencing according to a first embodiment of the present invention, wherein the method may comprise the following steps:
step S1, obtaining information of a target geofence;
specifically, if positioning is required based on a certain target geofence, firstly, an information table of the target geofence needs to be acquired, the geofence is formed by splicing a plurality of cylinders with consistent bottom radii (see fig. 2), and each cylinder is marked with 1, 2, 3, and K (K is a natural number greater than 1), namely, one bottom surface of the mth cylinder is overlapped with one bottom surface of the mth-1 cylinder, the other bottom surface of the mth cylinder is overlapped with one bottom surface of the mth+1th cylinder, and the overlapped bottom surfaces have the same circle center, wherein m is a natural number and greater than 2.
Further, the information table of the geofence comprises information of each cylinder, including the circle center of the bottom surface of the corresponding cylinder and the corresponding radius. The coordinates of the bottom surface are three-dimensional coordinates as shown in table 1, and the contents of the information table are shown in table 2:
TABLE 1
Attribute field Data type Value example Remarks
x Double 120 Longitude in degrees
y Double 30 Latitude in degrees
z Double 500 Elevation in meters
TABLE 2
Attribute field Data type Value example Remarks
centers List<Point> [[120,30,500],[121,31,600],[122,32,700]] Circle center of bottom surface of discrete cylinder
radius Double 10 Radius of cylinder in meters
Step S2, matching the coordinates of the target to be positioned with an information table, and if the matching is successful, determining that the target to be positioned is in the geofence;
specifically, the coordinate of the target to be positioned is matched with the information table of the geofence, if the matching is successful, the target to be positioned is determined to be in the geofence, and the coordinate of the target to be positioned at present can be obtained according to the GPS.
In the embodiment, the geofence model with a cylindrical shape is adopted for positioning based on three-dimensional coordinates, so that positioning accuracy can be improved.
In one embodiment, the step S2 is specifically: and matching the coordinates of the positioning target with the information of each cylinder, and stopping matching if the matching is successful, so as to determine that the target to be positioned is in the geofence.
In an embodiment, the step S1 may further include:
constructing a geofence;
specifically, a geofence is constructed in a preset area according to actual requirements to locate a target to be located entering the preset area, for example, the number and the radius of cylinders are determined according to the area or the range of the preset area, and then the cylinders forming the geofence are marked and form an information table for subsequent use. It should be noted that the number of the cylinders of the radius and the geofence may be set according to actual requirements, and is not limited herein.
In an embodiment, the step S2 may further include:
sending out a positioning prompt;
specifically, a geofence is typically used to locate and prompt a target to be located that enters a geofence area, and thus when it is determined that the locating target enters the geofence, the locating target is prompted, for example: "give you a voice or SMS prompt to get into XX".
In a preferred implementation of this embodiment, the geofence includes K cylinders, as shown in fig. 3, and the step S2 specifically includes:
step S21, matching the coordinates of the positioning target with the information of the 1 st cylinder;
Specifically, firstly, matching the coordinates of the positioning target with the information of the 1 st cylinder, if the matching is unsuccessful, turning to step S22, otherwise turning to step S23; for example, information of the 1 st cylinder is obtained from table 2, and then matched with coordinates of the positioning target.
And S22, matching the coordinates of the positioning target with the information of the 2 nd cylinder, if the matching is unsuccessful, continuously matching the coordinates of the positioning target with the information of the next cylinder until the matching is successful, otherwise, continuously matching the coordinates of the positioning target with the information of the i < th > cylinder until the coordinates of the positioning target are matched with the information of the K < th > cylinder, and if the matching is unsuccessful, determining that the positioning target is not in the geofence.
Specifically, if the information of the first cylinder is not matched with the information of the second cylinder, the information of the second cylinder is obtained from the table 2, the matching is continued, if the matching is successful, the step S23 is shifted to, otherwise, the information of the third cylinder is obtained from the table 2, the matching is continued until the matching is successful, the step S23 is shifted to, otherwise, the matching is continued, the coordinates of the positioning target and the information of the ith cylinder are matched until the coordinates of the positioning target and the information of the kth cylinder are matched, and if the matching is unsuccessful, the step S24 is shifted to, and the i is more than 2 and less than or equal to K;
Step S23, determining that the positioning target is in the geofence.
Step S24, determining that the positioning target is not within the geofence.
In a preferred scheme of this embodiment, the ith cylinder includes an ith bottom center and an (i+1) th bottom center, and the matching of the coordinates of the positioning target with the information of the ith cylinder includes:
comparing whether the distance between the connecting line from the positioning target to the ith bottom surface circle center and the (i+1) th bottom surface circle center is larger than the radius;
specifically, calculating the distance between the positioning target and the connecting line between the ith bottom surface center and the (i+1) th bottom surface center, for example, calculating the distance between the positioning target and the connecting line between the ith bottom surface center and the (i+1) th bottom surface center according to the coordinates of the positioning target, the coordinates of the ith bottom surface center and the coordinates of the (i+1) th bottom surface center, namely, calculating the distance between the positioning target and the straight line (i.e. the central line) where the (i+1) th bottom surface center and the (i+1) th bottom surface center are located, and comparing the distance with the radius of the cylinder;
if the distance is not greater than the radius, continuing to judge whether the projection of the connecting line of the positioning target to the ith bottom surface center and the (i+1) th bottom surface center is on a line segment formed by connecting the ith bottom surface center and the (i+1) th bottom surface center, namely if the distance from the positioning target to the central line of the cylinder is not greater than the radius, further judging whether the projection of the positioning target to the central line is on the line segment formed by connecting the ith bottom surface center and the (i+1) th bottom surface center (namely, on the line segment between the ith bottom surface center and the (i+1) th bottom surface center), if the matching is determined to be successful, if the matching is not on the line segment, the matching is not successful, the matching is successful, namely, on the corresponding cylinder (namely, on the geographical fence), and if the matching is unsuccessful, the matching is not on the corresponding cylinder, the matching is needed in the next cylinder;
If the calculated distance is larger than the radius, or if the distance is not larger than the radius, and the projection of the connecting line of the i-th bottom surface circle center and the i+1th bottom surface circle center is not on the line segment formed by connecting the i-th bottom surface circle center and the i+1th bottom surface circle center, determining that the matching is unsuccessful.
It should be noted that the above manner is adopted for each cylinder, and is not described here in detail.
In another embodiment of the present invention, as shown in fig. 4, the step S2 specifically includes:
step S41, calculating the distance between the target to be positioned and each cylinder;
specifically, the distance from the target to be positioned to each cylinder is calculated, the distance from the target to be positioned to each cylinder refers to the distance from the coordinate of the target to be positioned to the center point of the cylinder, the center point coordinate of the cylinder can be obtained according to table 2 (or the center point coordinate of the cylinder can be obtained according to the center coordinates of the two bottom surfaces of the cylinder), and the distance from the target to be positioned to each cylinder is calculated.
Step S42, selecting N cylinders with the smallest distance from the acquired distances as target cylinders;
specifically, N cylinders with the smallest distance are selected from the acquired distances as target cylinders, and because the distances between the target to be positioned and each cylinder may not be consistent, the calculated distances need to be ordered, for example, the distances arranged in the front N bits are selected from the order from small to large, and the cylinder corresponding to the distance is acquired as the target cylinder, wherein N is 2.ltoreq.20. Preferably, N is 2 and the target to be positioned is located between the two target cylinders. It should be noted that the value of N may be set according to practical situations, and this is not limited herein, and N is smaller than the number of cylinders of the geofence.
Step S43, matching the coordinates of the positioning target with the information of the target cylinder;
specifically, matching the coordinates of the positioning target with the information of the target cylinder, if the matching is successful, turning to step S44, otherwise turning to step S45;
step S44, determining that the target to be positioned is in the geofence;
step S45, determining that the target to be located is not within the geofence.
In a preferred implementation of this embodiment, the step S421 specifically includes:
comparing whether the distance between the connecting line of the target to be positioned and the center of the two bottom surfaces of one target cylinder is larger than the radius or not;
if the distance is not greater than the radius, comparing whether the projection of the connecting line of the target to be positioned to the center of the two bottom surfaces of the target cylinder is on the line segment formed by connecting the centers of the two bottom surfaces, if so, determining that the matching is successful, otherwise, determining that the matching is unsuccessful;
if the distance between the connecting lines of the target to be positioned and the centers of the two bottom surfaces of one target cylinder is larger than the radius, determining that the matching is unsuccessful.
Specifically, the distance between the object to be positioned and the straight line where the two bottom surface circle centers are located is calculated based on the coordinates of the object to be positioned and the coordinates of the two bottom surface circle centers of the object cylinder, whether the distance is larger than the corresponding radius is judged, if so, the matching is determined to be failed, if not, the projection of the object to be positioned to the straight line where the two bottom surface circle centers are located is further judged to be on the line segment where the two bottom surface circle centers are located (namely, the connecting line of the two bottom surface circle centers, the starting point is the two bottom surface circle centers), if yes, the matching is determined to be successful, and if not, the matching is determined to be failed.
In the embodiment, the geofence model with a cylindrical shape is adopted for positioning based on three-dimensional coordinates, so that positioning accuracy can be improved.
Example two
Fig. 5 is a block diagram of a positioning device based on a geofence according to a second embodiment of the present invention, where the positioning device may include the following steps: an acquisition unit 1, a matching unit 2 connected with the acquisition unit 1, wherein:
an acquisition unit 1 for acquiring information of a target geofence;
specifically, if positioning is required based on a certain target geofence, firstly, an information table of the target geofence needs to be acquired, the geofence is formed by splicing a plurality of cylinders with consistent bottom radii (see fig. 2), and each cylinder is marked with 1, 2, 3, and K (K is a natural number greater than 1), namely, one bottom surface of the mth cylinder is overlapped with one bottom surface of the mth-1 cylinder, the other bottom surface of the mth cylinder is overlapped with one bottom surface of the mth+1th cylinder, and the overlapped bottom surfaces have the same circle center, wherein m is a natural number and greater than 2.
Further, the information table of the geofence comprises information of each cylinder, including the circle center of the bottom surface of the corresponding cylinder and the corresponding radius. The coordinates of the bottom surface are three-dimensional coordinates as shown in table 1, and the contents of the information table are shown in table 2.
The matching unit 2 is used for matching the coordinates of the target to be positioned with the information table, and if the matching is successful, the target to be positioned is determined to be in the geofence;
specifically, the coordinate of the target to be positioned is matched with the information table of the geofence, if the matching is successful, the target to be positioned is determined to be in the geofence, and the coordinate of the target to be positioned at present can be obtained according to the GPS.
In the embodiment, the geofence model with a cylindrical shape is adopted for positioning based on three-dimensional coordinates, so that positioning accuracy can be improved.
In an embodiment, the matching unit 2 is specifically configured to: and matching the coordinates of the positioning target with the information of each cylinder, and stopping matching if the matching is successful, so as to determine that the target to be positioned is in the geofence.
In one embodiment, the apparatus may further comprise: a construction unit connected to the acquisition unit 1, wherein:
a construction unit for constructing a geofence;
specifically, a geofence is constructed in a preset area according to actual requirements to locate a target to be located entering the preset area, for example, the number and the radius of cylinders are determined according to the area or the range of the preset area, and then the cylinders forming the geofence are marked and form an information table for subsequent use. It should be noted that the number of the cylinders of the radius and the geofence may be set according to actual requirements, and is not limited herein.
In one embodiment, the apparatus may further comprise: a prompting unit connected with the matching unit 2, wherein:
the prompting unit is used for sending out a positioning prompt;
specifically, a geofence is typically used to locate and prompt a target to be located that enters a geofence area, and thus when it is determined that the locating target enters the geofence, the locating target is prompted, for example: "give you a voice or SMS prompt to get into XX".
In a preferred version of this embodiment, the geofence comprises K cylinders, and the matching unit 2 specifically comprises: a matching subunit and a determining subunit connected thereto, wherein:
the matching subunit is used for matching the coordinates of the positioning target with the information of the 1 st cylinder;
specifically, firstly, matching the coordinates of the positioning target with the information of the 1 st cylinder, if the matching is unsuccessful, matching the coordinates of the positioning target with the information of the 2 nd cylinder, if the matching is unsuccessful, continuously matching the coordinates of the positioning target with the information of the next cylinder until the matching is successful, otherwise, continuously matching the coordinates of the positioning target with the information of the i th cylinder until the coordinates of the positioning target are matched with the information of the K th cylinder, and if both the matching is unsuccessful, or feeding back to the determination subunit if the matching is successful.
A determining subunit configured to determine that a positioning target is within the geofence when the matching is successful; and is further configured to determine that the positioning target is not within the geofence when the matching is unsuccessful.
Specifically, if the information of the second cylinder is not matched with the information of the first cylinder, the information of the second cylinder is obtained from the table 2, the matching is continued, if the matching is successful, the information of the third cylinder is fed back to the determining subunit, otherwise, the information of the third cylinder is obtained from the table 2, the matching is continued until the matching is successful, otherwise, the matching is continued, the coordinates of the positioning target and the information of the ith cylinder are matched until the coordinates of the positioning target and the information of the kth cylinder are matched, and if the matching is unsuccessful, the information of the positioning target and the information of the kth cylinder are fed back to the determining subunit, wherein i is more than 2 and less than or equal to K.
In a preferred aspect of this embodiment, the matching subunit is specifically configured to: comparing whether the distance between the connecting line from the positioning target to the ith bottom surface circle center and the (i+1) th bottom surface circle center is larger than the radius;
specifically, calculating the distance between the positioning target and the connecting line between the ith bottom surface center and the (i+1) th bottom surface center, for example, calculating the distance between the positioning target and the connecting line between the ith bottom surface center and the (i+1) th bottom surface center according to the coordinates of the positioning target, the coordinates of the ith bottom surface center and the coordinates of the (i+1) th bottom surface center, namely, calculating the distance between the positioning target and the straight line (i.e. the central line) where the (i+1) th bottom surface center and the (i+1) th bottom surface center are located, and comparing the distance with the radius of the cylinder;
If the distance is not greater than the radius, continuing to judge whether the projection of the connecting line of the positioning target to the ith bottom surface center and the (i+1) th bottom surface center is on a line segment formed by connecting the ith bottom surface center and the (i+1) th bottom surface center, namely if the distance from the positioning target to the central line of the cylinder is not greater than the radius, further judging whether the projection of the positioning target to the central line is on the line segment formed by connecting the ith bottom surface center and the (i+1) th bottom surface center (namely, on the line segment between the ith bottom surface center and the (i+1) th bottom surface center), if the matching is determined to be successful, if the matching is not on the line segment, the matching is not successful, the matching is successful, namely, on the corresponding cylinder (namely, on the geographical fence), and if the matching is unsuccessful, the matching is not on the corresponding cylinder, the matching is needed in the next cylinder;
if the calculated distance is larger than the radius, or if the distance is not larger than the radius, and the projection of the connecting line of the i-th bottom surface circle center and the i+1th bottom surface circle center is not on the line segment formed by connecting the i-th bottom surface circle center and the i+1th bottom surface circle center, determining that the matching is unsuccessful.
It should be noted that the above manner is adopted for each cylinder, and is not described here in detail.
In another embodiment of the present invention, the matching unit 2 specifically includes: the device comprises a computing subunit, a selecting subunit connected with the computing subunit, a matching subunit connected with the selecting subunit, and a determining subunit connected with the matching subunit, wherein:
a calculating subunit for calculating a distance from the target to be positioned to each cylinder;
specifically, the distance from the target to be positioned to each cylinder is calculated, the distance from the target to be positioned to each cylinder refers to the distance from the coordinate of the target to be positioned to the center point of the cylinder, the center point coordinate of the cylinder can be obtained according to table 2 (or the center point coordinate of the cylinder can be obtained according to the center coordinates of the two bottom surfaces of the cylinder), and the distance from the target to be positioned to each cylinder is calculated.
A selecting subunit, configured to select, from the acquired distances, N cylinders with the smallest distances as target cylinders;
specifically, N cylinders with the smallest distance are selected from the acquired distances as target cylinders, and because the distances between the target to be positioned and each cylinder may not be consistent, the calculated distances need to be ordered, for example, the distances arranged in the front N bits are selected from the order from small to large, and the cylinder corresponding to the distance is acquired as the target cylinder, wherein N is 2.ltoreq.20. Preferably, N is 2 and the target to be positioned is located between the two target cylinders.
The matching subunit is used for matching the coordinates of the positioning target with the information of the target cylinder;
specifically, the coordinates of the positioning target are matched with the information of the target cylinder, and the matching result is fed back to the determining subunit.
And the determining subunit is used for determining that the target to be positioned is in the geofence when the matching is successful and determining that the target to be positioned is not in the geofence when the matching is unsuccessful.
In a preferred aspect of this embodiment, the matching subunit is specifically configured to:
comparing whether the distance between the connecting line of the target to be positioned and the center of the two bottom surfaces of one target cylinder is larger than the radius or not;
if the distance is not greater than the radius, comparing whether the projection of the connecting line of the target to be positioned to the center of the two bottom surfaces of the target cylinder is on the line segment formed by connecting the centers of the two bottom surfaces, if so, determining that the matching is successful, otherwise, determining that the matching is unsuccessful;
if the distance between the connecting lines of the target to be positioned and the centers of the two bottom surfaces of one target cylinder is larger than the radius, determining that the matching is unsuccessful.
Specifically, the distance between the object to be positioned and the straight line where the two bottom surface circle centers are located is calculated based on the coordinates of the object to be positioned and the coordinates of the two bottom surface circle centers of the object cylinder, whether the distance is larger than the corresponding radius is judged, if so, the matching is determined to be failed, if not, the projection of the object to be positioned to the straight line where the two bottom surface circle centers are located is further judged to be on the line segment where the two bottom surface circle centers are located (namely, the connecting line of the two bottom surface circle centers, the starting point is the two bottom surface circle centers), if yes, the matching is determined to be successful, and if not, the matching is determined to be failed.
In the embodiment, the geofence model with a cylindrical shape is adopted for positioning based on three-dimensional coordinates, so that positioning accuracy can be improved.
Example III
Fig. 6 is a schematic structural diagram of a positioning terminal according to a third embodiment of the present invention. As shown in fig. 6, the positioning terminal 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62 stored in said memory 61 and executable on said processor 60. The steps of the first embodiment of the method described above are implemented by the processor 60 when executing the computer program 62.
The computer program 62 is specifically for causing the processor 60 to:
acquiring an information table of a target geofence, wherein the geofence is formed by splicing a plurality of cylinders with consistent bottom radii, the information table comprises information of each cylinder, the information comprises coordinates of the bottom circle center of the corresponding cylinder and the corresponding radius, and the coordinates are three-dimensional coordinates;
and matching the coordinates of the target to be positioned with the information table, and if the matching is successful, determining that the target to be positioned is in the geofence.
In an alternative, computer program 62 is specifically operative to cause processor 60 to perform the following operations:
And matching the coordinates of the positioning target with the information of each cylinder, and stopping matching if the matching is successful, so as to determine that the target to be positioned is in the geofence.
In an alternative, computer program 62 is specifically operative to cause processor 60 to perform the following operations:
matching the coordinates of the positioning target with the information of the 1 st cylinder;
if the matching is unsuccessful, matching the coordinates of the positioning target with the information of the 2 nd cylinder, if the matching is unsuccessful, continuously matching the coordinates of the positioning target with the information of the next cylinder until the matching is successful, otherwise, continuously matching the coordinates of the positioning target with the information of the i th cylinder until the coordinates of the positioning target are matched with the information of the K th cylinder, and if the matching is unsuccessful, determining that the positioning target is not in the geofence, wherein i is more than 2 and less than or equal to K;
if the matching is successful, determining that the positioning target is in the geofence.
In an alternative, computer program 62 is specifically operative to cause processor 60 to perform the following operations:
comparing whether the distance between the locating target and the connecting line between the ith bottom surface circle center and the (i+1) th bottom surface circle center is larger than the radius;
If the distance is not greater than the radius, judging whether the projection of the connecting line of the positioning target to the ith bottom surface circle center and the (i+1) th bottom surface circle center is on a line segment formed by connecting the ith bottom surface circle center and the (i+1) th bottom surface circle center, and if so, determining that the matching is successful;
if the distance is larger than the radius, or if the distance is not larger than the radius, and the projection of the connecting line of the ith bottom surface circle center and the (i+1) th bottom surface circle center of the positioning target is not on the line segment formed by connecting the ith bottom surface circle center and the (i+1) th bottom surface circle center, determining that the matching is unsuccessful.
In an alternative, computer program 62 is specifically operative to cause processor 60 to perform the following operations:
calculating the distance between the target to be positioned and each cylinder;
selecting N cylinders with the smallest distance from the calculated distances as target cylinders, wherein N is more than or equal to 2 and less than or equal to 20;
matching the coordinates of the positioning target with the information of the target cylinder;
if the matching is successful, determining that the target to be positioned is in the geofence;
if the matching is unsuccessful, determining that the target to be positioned is not within the geofence.
In an alternative, computer program 62 is specifically operative to cause processor 60 to perform the following operations:
matching the coordinates of the positioning target with the information of one target cylinder in the N cylinders;
if the matching is successful, stopping the matching;
if the matching is unsuccessful, matching the coordinates of the positioning target with the information of the next cylinder in the N cylinders, if the matching is successful, stopping the matching, otherwise, continuing to match the coordinates of the positioning target with the information of the next cylinder in the N cylinders until the matching is successful, and if the matching is not successful, continuing to match until the N cylinders are matched.
In an alternative, computer program 62 is specifically operative to cause processor 60 to perform the following operations:
comparing whether the distance between the connecting line of the target to be positioned and the center of the two bottom surfaces of the target cylinder is larger than the radius;
if the distance is not greater than the radius, comparing whether the projection of the connecting line of the target to be positioned to the center of the two bottom surfaces of the target cylinder is on a line segment formed by connecting the centers of the two bottom surfaces, if so, determining that the matching is successful, otherwise, determining that the matching is unsuccessful;
And if the distance between the connecting line of the target to be positioned and the circle centers of the two bottom surfaces of the target cylinder is larger than the radius, determining that the matching is unsuccessful.
In an alternative, computer program 62 is specifically operative to cause processor 60 to perform the following operations:
a geofence is constructed.
Example IV
A fourth embodiment of the present invention provides a computer-readable storage medium comprising a computer program stored on the computer storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the geofence-based positioning method of the first embodiment described above.
The executable instructions may be particularly useful for causing a processor to:
acquiring an information table of a target geofence, wherein the geofence is formed by splicing a plurality of cylinders with consistent bottom radii, the information table comprises information of each cylinder, the information comprises coordinates of the bottom circle center of the corresponding cylinder and the corresponding radius, and the coordinates are three-dimensional coordinates;
and matching the coordinates of the target to be positioned with the information table, and if the matching is successful, determining that the target to be positioned is in the geofence.
In one alternative, the executable instructions may be specifically operable to cause a processor to:
and matching the coordinates of the positioning target with the information of each cylinder, and stopping matching if the matching is successful, so as to determine that the target to be positioned is in the geofence.
In one alternative, the executable instructions may be specifically operable to cause a processor to:
matching the coordinates of the positioning target with the information of the 1 st cylinder;
if the matching is unsuccessful, matching the coordinates of the positioning target with the information of the 2 nd cylinder, if the matching is unsuccessful, continuously matching the coordinates of the positioning target with the information of the next cylinder until the matching is successful, otherwise, continuously matching the coordinates of the positioning target with the information of the i th cylinder until the coordinates of the positioning target are matched with the information of the K th cylinder, and if the matching is unsuccessful, determining that the positioning target is not in the geofence, wherein i is more than 2 and less than or equal to K;
if the matching is successful, determining that the positioning target is in the geofence.
In one alternative, the executable instructions may be specifically operable to cause a processor to:
Comparing whether the distance between the locating target and the connecting line between the ith bottom surface circle center and the (i+1) th bottom surface circle center is larger than the radius;
if the distance is not greater than the radius, judging whether the projection of the connecting line of the positioning target to the ith bottom surface circle center and the (i+1) th bottom surface circle center is on a line segment formed by connecting the ith bottom surface circle center and the (i+1) th bottom surface circle center, and if so, determining that the matching is successful;
if the distance is larger than the radius, or if the distance is not larger than the radius, and the projection of the connecting line of the ith bottom surface circle center and the (i+1) th bottom surface circle center of the positioning target is not on the line segment formed by connecting the ith bottom surface circle center and the (i+1) th bottom surface circle center, determining that the matching is unsuccessful.
In one alternative, the executable instructions may be specifically operable to cause a processor to:
calculating the distance between the target to be positioned and each cylinder;
selecting N cylinders with the smallest distance from the calculated distances as target cylinders, wherein N is more than or equal to 2 and less than or equal to 20;
matching the coordinates of the positioning target with the information of the target cylinder;
if the matching is successful, determining that the target to be positioned is in the geofence;
If the matching is unsuccessful, determining that the target to be positioned is not within the geofence.
In one alternative, the executable instructions may be specifically operable to cause a processor to:
matching the coordinates of the positioning target with the information of one target cylinder in the N cylinders;
if the matching is successful, stopping the matching;
if the matching is unsuccessful, matching the coordinates of the positioning target with the information of the next cylinder in the N cylinders, if the matching is successful, stopping the matching, otherwise, continuing to match the coordinates of the positioning target with the information of the next cylinder in the N cylinders until the matching is successful, and if the matching is not successful, continuing to match until the N cylinders are matched.
In one alternative, the executable instructions may be specifically operable to cause a processor to:
comparing whether the distance between the connecting line of the target to be positioned and the center of the two bottom surfaces of the target cylinder is larger than the radius;
if the distance is not greater than the radius, comparing whether the projection of the connecting line of the target to be positioned to the center of the two bottom surfaces of the target cylinder is on a line segment formed by connecting the centers of the two bottom surfaces, if so, determining that the matching is successful, otherwise, determining that the matching is unsuccessful;
And if the distance between the connecting line of the target to be positioned and the circle centers of the two bottom surfaces of the target cylinder is larger than the radius, determining that the matching is unsuccessful.
In one alternative, the executable instructions may be specifically operable to cause a processor to:
a geofence is constructed.
In the invention, a geofence model with a cylindrical shape is adopted to position based on three-dimensional coordinates, so that the positioning accuracy can be improved.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units 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 form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention 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 integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium may include content that is subject to appropriate increases and decreases as required by jurisdictions and by jurisdictions in which such content is subject to jurisdiction and patent practice, such as in certain jurisdictions in which such content is subject to jurisdiction and patent practice, such computer readable medium does not include electrical carrier signals or telecommunications signals.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some of the technical features can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (11)

1. A geofence-based positioning method, comprising:
acquiring an information table of a target geofence, wherein the geofence is formed by splicing a plurality of cylinders with consistent bottom radii, the information table comprises information of each cylinder, the information comprises coordinates of the bottom circle center of the corresponding cylinder and the corresponding radius, and the coordinates are three-dimensional coordinates; the first directions of any two adjacent cylinders are inconsistent, and the first direction is the extending direction of a connecting line of the centers of two bottom surfaces in the cylinders;
and matching the coordinates of the positioning target with the information table, and if the matching is successful, determining that the positioning target is in the geofence.
2. The method of claim 1, wherein matching the coordinates of the positioning target with the information table, and if the matching is successful, determining that the positioning target is within the geofence comprises:
and matching the coordinates of the positioning target with the information of each cylinder, and stopping matching if the matching is successful, so as to determine that the positioning target is in the geofence.
3. The method of claim 2, wherein the geofence comprises K cylinders, the matching the coordinates of the positioning target with the information of each cylinder, stopping the matching if the matching is successful, and determining that the positioning target is within the geofence comprises:
matching the coordinates of the positioning target with the information of the 1 st cylinder;
if the matching is unsuccessful, matching the coordinates of the positioning target with the information of the 2 nd cylinder, if the matching is unsuccessful, continuously matching the coordinates of the positioning target with the information of the next cylinder until the matching is successful, otherwise, continuously matching the coordinates of the positioning target with the information of the i th cylinder until the coordinates of the positioning target are matched with the information of the K th cylinder, and if the matching is unsuccessful, determining that the positioning target is not in the geofence, wherein i is more than 2 and less than or equal to K;
If the matching is successful, determining that the positioning target is in the geofence.
4. A method according to claim 3, wherein the ith cylinder includes an ith bottom center and an (i+1) th bottom center, and said matching the coordinates of the positioning target with the information of the ith cylinder includes:
comparing whether the distance between the locating target and the connecting line between the ith bottom surface circle center and the (i+1) th bottom surface circle center is larger than the radius;
if the distance is not greater than the radius, judging whether the projection of the connecting line of the positioning target to the ith bottom surface circle center and the (i+1) th bottom surface circle center is on a line segment formed by connecting the ith bottom surface circle center and the (i+1) th bottom surface circle center, and if so, determining that the matching is successful;
if the distance is larger than the radius, or if the distance is not larger than the radius, and the projection of the connecting line of the ith bottom surface circle center and the (i+1) th bottom surface circle center of the positioning target is not on the line segment formed by connecting the ith bottom surface circle center and the (i+1) th bottom surface circle center, determining that the matching is unsuccessful.
5. The method of claim 2, wherein said matching the coordinates of the positioning object with the information of each of the cylinders and stopping the matching if the matching is successful, determining that the positioning object is within the geofence, comprises:
Calculating the distance between the positioning target and each cylinder;
selecting N cylinders with the smallest distance from the calculated distances as target cylinders, wherein N is more than or equal to 2 and less than or equal to 20;
matching the coordinates of the positioning target with the information of the target cylinder;
if the matching is successful, determining that the positioning target is in the geofence;
if the matching is unsuccessful, determining that the positioning target is not within the geofence.
6. The method of claim 5, wherein said matching the coordinates of the positioning object with the information of the object cylinder comprises:
matching the coordinates of the positioning target with the information of one target cylinder in the N cylinders;
if the matching is successful, stopping the matching;
if the matching is unsuccessful, matching the coordinates of the positioning target with the information of the next cylinder in the N cylinders, if the matching is successful, stopping the matching, otherwise, continuing to match the coordinates of the positioning target with the information of the next cylinder in the N cylinders until the matching is successful, and if the matching is not successful, continuing to match until the N cylinders are matched.
7. The method of claim 6, wherein said matching the coordinates of the positioning object with the information of the object cylinder comprises:
comparing whether the distance between the connecting line of the positioning target and the center of the two bottom surfaces of the target cylinder is larger than the radius;
if the distance is not greater than the radius, comparing whether the projection of the connecting line of the positioning target to the center of the two bottom surfaces of the target cylinder is on a line segment formed by connecting the centers of the two bottom surfaces, if so, determining that the matching is successful, otherwise, determining that the matching is unsuccessful;
and if the distance between the positioning target and the connecting line of the centers of the two bottom surfaces of the target cylinder is larger than the radius, determining that the matching is unsuccessful.
8. The method of any of claims 1 to 7, wherein prior to obtaining information of the target geofence further comprises:
a geofence is constructed.
9. A geofence based positioning device for performing the method of any one of claims 1 to 8.
10. A positioning terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 8 when the computer program is executed.
11. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 8.
CN201911062144.9A 2019-11-01 2019-11-01 Positioning method and device based on geofence, positioning terminal and storage medium Active CN112770260B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911062144.9A CN112770260B (en) 2019-11-01 2019-11-01 Positioning method and device based on geofence, positioning terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911062144.9A CN112770260B (en) 2019-11-01 2019-11-01 Positioning method and device based on geofence, positioning terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112770260A CN112770260A (en) 2021-05-07
CN112770260B true CN112770260B (en) 2023-06-02

Family

ID=75692218

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911062144.9A Active CN112770260B (en) 2019-11-01 2019-11-01 Positioning method and device based on geofence, positioning terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112770260B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106297417A (en) * 2016-09-27 2017-01-04 南京航空航天大学 A kind of unmanned plane during flying service and supervisory systems and method
CN106461396A (en) * 2014-04-17 2017-02-22 深圳市大疆创新科技有限公司 Flight control for flight-restricted regions
CN107305394A (en) * 2016-04-21 2017-10-31 北京臻迪机器人有限公司 Control method, flight controller, terminal and the control system of unmanned vehicle
WO2018017412A1 (en) * 2016-07-18 2018-01-25 GeoFrenzy, Inc. Systems and methods for defining and implementing rules for three dimensional geofences
CN109814598A (en) * 2019-02-25 2019-05-28 中国科学院地理科学与资源研究所 The public airway net design method in unmanned plane low latitude

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9986378B2 (en) * 2014-07-29 2018-05-29 GeoFrenzy, Inc. Systems and methods for defining and implementing rules for three dimensional geofences

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106461396A (en) * 2014-04-17 2017-02-22 深圳市大疆创新科技有限公司 Flight control for flight-restricted regions
CN107305394A (en) * 2016-04-21 2017-10-31 北京臻迪机器人有限公司 Control method, flight controller, terminal and the control system of unmanned vehicle
WO2018017412A1 (en) * 2016-07-18 2018-01-25 GeoFrenzy, Inc. Systems and methods for defining and implementing rules for three dimensional geofences
CN106297417A (en) * 2016-09-27 2017-01-04 南京航空航天大学 A kind of unmanned plane during flying service and supervisory systems and method
CN109814598A (en) * 2019-02-25 2019-05-28 中国科学院地理科学与资源研究所 The public airway net design method in unmanned plane low latitude

Also Published As

Publication number Publication date
CN112770260A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
US10669130B2 (en) System and method for automated analysis comparing a wireless device location with another geographic location
US10917498B2 (en) Service processing method and apparatus, and service server
CN102656871B (en) Method, apparatus and computer program to perform location specific information retrieval using a gesture-controlled handheld mobile device
AU2007349233A1 (en) System and method for automated analysis comparing a wireless device location with another geographic location
WO2009152262A1 (en) Method for geofencing
CN106991185A (en) The hotel&#39;s latitude and longitude information maintaining method and system of OTA websites
CN104144493A (en) Positioning method, positioning system and a base station positioning platform
US10659916B2 (en) Retrospective path analysis
CN108416514B (en) Neighbor cell planning method and device based on geographic information system
CN110210564B (en) Similar house type detection method and device
US20210127225A1 (en) Complex geofence definition
CN112770260B (en) Positioning method and device based on geofence, positioning terminal and storage medium
CN103714632A (en) Method, device and system for monitoring tax-control terminal and tax-control terminal
CN110099411B (en) Interference source positioning method and device
CN115209349A (en) Geofence detection method and device and electronic equipment
CN108810803A (en) Find the method and system of lost contact user
CN111182455B (en) Indoor positioning method and device, computer equipment and storage medium
CN103813446A (en) Method and device for estimating coverage of staying area
CN113825228A (en) Positioning method based on field intensity conversion of longitude and latitude
CN109831737B (en) Bluetooth positioning method, device, equipment and system based on confidence degree
CN111626609A (en) Telecommunication service handling method, device and storage medium
CN108919315A (en) Multimode rake receiver system layer geometric dilution of precision minimum calculation method
CN107920327B (en) Positioning method, device and system, positioning signal determination method and terminal
CN112699319B (en) Space clutter signal calibration method and device
CN114519609A (en) Information processing method, information display method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant