CN111209358A - Method and device for counting equipment number in scenic spot area - Google Patents
Method and device for counting equipment number in scenic spot area Download PDFInfo
- Publication number
- CN111209358A CN111209358A CN201911351712.7A CN201911351712A CN111209358A CN 111209358 A CN111209358 A CN 111209358A CN 201911351712 A CN201911351712 A CN 201911351712A CN 111209358 A CN111209358 A CN 111209358A
- Authority
- CN
- China
- Prior art keywords
- equipment
- coordinate information
- fence
- scenic spot
- counting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 230000009191 jumping Effects 0.000 claims description 5
- 230000008569 process Effects 0.000 claims description 5
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2462—Approximate or statistical queries
Abstract
The invention relates to a method and a device for counting the number of devices in a scenic spot, which comprises the steps of firstly, acquiring a set of coordinate information of each endpoint of a polygonal area for representing the scenic spot in a map and GPS (global positioning system) coordinate information of the devices; then, drawing a regional fence according to the coordinate information of each endpoint of the polygonal region, and judging whether the equipment is positioned in the polygonal region according to the relation between the GPS coordinate information of the equipment and the regional fence; and finally, counting the number of the devices in the scenic spot according to the judgment result. Through the technical scheme, the number of public devices in the scenic spot can be effectively counted in real time.
Description
Technical Field
The invention relates to the technical field of Internet of things, in particular to a method and a device for counting the number of devices in a scenic spot.
Background
With the development of the internet of things technology, a plurality of public devices with functions of positioning, communication and the like of the internet of things appear in a plurality of tourist attractions. When managing these devices, the devices are generally divided into areas, and an administrator is configured for each area. In actual management, the management area of each administrator may be changed as needed to expand or contract, or part of the public devices may be transportation vehicles, which may cause the number of the public devices in the management area to change. There is therefore a need for a timely statistical demarcation of the number of common devices in a management area when both of the above situations occur.
Disclosure of Invention
The invention provides a method and a device for counting the number of devices in a scenic region, aiming at the technical problems in the prior art, and the method and the device can effectively count the number of public devices in the scenic region in real time.
The technical scheme for solving the technical problems is as follows:
in a first aspect, the present invention provides a method for counting the number of devices in a scenic region, including the following steps:
acquiring a set of terminal point coordinate information of a polygonal area used for representing a parcel in a map and GPS coordinate information of equipment;
drawing a regional fence according to the coordinate information of each endpoint of the polygonal region, and judging whether the equipment is positioned in the polygonal region according to the relation between the GPS coordinate information of the equipment and the regional fence;
and counting the number of the devices in the scenic spot according to the judgment result.
Further, the determining whether the device is located in the polygonal area according to the relationship between the GPS coordinate information of the device and the area fence includes:
s101, taking a longitudinal axis coordinate y of the current equipment as a starting point, and making a ray y which is point.y along the X axis in the forward direction;
s102, sequentially selecting boundary lines p1p2 of the regional fence;
s103, if ((y > (P1. y) & (y < P2.y)) | ((y < (P1. y) & (y > P2.y)) then it is proved that the ray y ═ point.y intersects the boundary line P1P2, defining the intersection point as X (X0, y 0);
s104, calculating an abscissa X0 of the intersection point X; if x0> x, the number n of intersection points is n +1, and the initial value of n is 0;
s105, judging whether the current regional fence is the last fence or not, if so, executing the step S106, otherwise, jumping to the step S102;
and S106, judging whether n is an odd number, if so, proving that the equipment is in the polygonal area, adding 1 to the equipment number statistic, and exiting the current equipment judgment process.
In a second aspect, the present invention further provides a device for counting the number of devices in a scenic spot, including:
the coordinate information acquisition module is used for acquiring each endpoint coordinate information set of a polygonal area used for representing a parcel in a map and GPS (global positioning system) coordinate information of equipment;
the position judgment module is used for drawing a regional fence according to the coordinate information of each endpoint of the polygonal region and judging whether the equipment is positioned in the polygonal region according to the relation between the GPS coordinate information of the equipment and the regional fence;
and the counting module is used for counting the number of the devices in the scenic spot according to the judgment result.
Further, the determining whether the device is located in the polygonal area according to the relationship between the GPS coordinate information of the device and the area fence includes:
s101, taking a longitudinal axis coordinate y of the current equipment as a starting point, and making a ray y which is point.y along the X axis in the forward direction;
s102, sequentially selecting boundary lines p1p2 of the regional fence;
s103, if ((y > (P1. y) & (y < P2.y)) | ((y < (P1. y) & (y > P2.y)) then it is proved that the ray y ═ point.y intersects the boundary line P1P2, defining the intersection point as X (X0, y 0);
s104, calculating an abscissa X0 of the intersection point X; if x0> x, the number n of intersection points is n +1, and the initial value of n is 0;
s105, judging whether the current regional fence is the last fence or not, if so, executing the step S106, otherwise, jumping to the step S102;
and S106, judging whether n is an odd number, if so, proving that the equipment is in the polygonal area, adding 1 to the equipment number statistic, and exiting the current equipment judgment process.
In a third aspect, the present invention further provides a device for counting the number of devices in a scenic spot, including:
a memory for storing a computer software program;
a processor, configured to read and execute the computer software program stored in the memory, and is configured to implement the method for counting the number of devices in the scenic region according to the first aspect of the present invention.
In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium, in which a computer software program for implementing the method for counting the number of devices in a scenic spot according to the first aspect of the present invention is stored.
Drawings
Fig. 1 is a flowchart of a method for counting the number of devices in a scenic region according to an embodiment of the present invention;
fig. 2 is a flowchart of a statistical structure of the number of devices in a scenic spot according to an embodiment of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
Examples
The embodiment of the invention provides a method and a device for counting the number of devices in a scenic spot area to solve the technical problems in the background art.
Specifically, as shown in fig. 2, the device for counting the number of devices in a scenic spot includes:
the coordinate information acquisition module is used for acquiring each endpoint coordinate information set of a polygonal area used for representing a parcel in a map and GPS (global positioning system) coordinate information of equipment;
the position judgment module is used for drawing a regional fence according to the coordinate information of each endpoint of the polygonal region and judging whether the equipment is positioned in the polygonal region according to the relation between the GPS coordinate information of the equipment and the regional fence;
and the counting module is used for counting the number of the devices in the scenic spot according to the judgment result.
Through the device, the method for counting the number of the devices in the scenic spot is realized, and as shown in fig. 1, the method comprises the following steps:
s1, acquiring coordinate information sets of each endpoint of a polygonal area used for representing the parcel in the map and GPS coordinate information of the equipment;
s2, drawing a region fence according to the coordinate information of each endpoint of the polygonal region, and judging whether the equipment is positioned in the polygonal region according to the relation between the GPS coordinate information of the equipment and the region fence;
and S3, counting the number of the devices in the scenic spot according to the judgment result.
Further, the determining whether the device is located in the polygonal area according to the relationship between the GPS coordinate information of the device and the area fence includes:
s101, taking a longitudinal axis coordinate y of the current equipment as a starting point, and making a ray y which is point.y along the X axis in the forward direction;
s102, sequentially selecting boundary lines p1p2 of the regional fence;
s103, if ((y > (P1. y) & (y < P2.y)) | ((y < (P1. y) & (y > P2.y)) then it is proved that the ray y ═ point.y intersects the boundary line P1P2, defining the intersection point as X (X0, y 0);
s104, calculating an abscissa X0 of the intersection point X; if x0> x, the number n of intersection points is n +1, and the initial value of n is 0;
s105, judging whether the current regional fence is the last fence or not, if so, executing the step S106, otherwise, jumping to the step S102;
and S106, judging whether n is an odd number, if so, proving that the equipment is in the polygonal area, adding 1 to the equipment number statistic, and exiting the current equipment judgment process.
It should be noted that the foregoing method may be implemented by a computer software program, and based on this, an embodiment of the present invention further provides an apparatus for counting the number of devices in a scenic spot, including:
a memory for storing a computer software program;
and the processor is used for reading and executing the computer software program stored in the memory and is used for realizing the method for counting the number of the devices in the scenic spot area.
It should also be noted that the logic instructions in the computer software program can be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (6)
1. A method for counting the number of devices in a scenic spot is characterized by comprising the following steps:
acquiring a set of terminal point coordinate information of a polygonal area used for representing a parcel in a map and GPS coordinate information of equipment;
drawing a regional fence according to the coordinate information of each endpoint of the polygonal region, and judging whether the equipment is positioned in the polygonal region according to the relation between the GPS coordinate information of the equipment and the regional fence;
and counting the number of the devices in the scenic spot according to the judgment result.
2. The method of claim 1, wherein determining whether the device is located in the polygonal area according to the relationship between the GPS coordinate information of the device and the area fence comprises:
s101, taking a longitudinal axis coordinate y of the current equipment as a starting point, and making a ray y which is point.y along the X axis in the forward direction;
s102, sequentially selecting boundary lines p1p2 of the regional fence;
s103, if ((y > (P1. y) & (y < P2.y)) | ((y < (P1. y) & (y > P2.y)) then it is proved that the ray y ═ point.y intersects the boundary line P1P2, defining the intersection point as X (X0, y 0);
s104, calculating an abscissa X0 of the intersection point X; if x0> x, the number n of intersection points is n +1, and the initial value of n is 0;
s105, judging whether the current regional fence is the last fence or not, if so, executing the step S106, otherwise, jumping to the step S102;
and S106, judging whether n is an odd number, if so, proving that the equipment is in the polygonal area, adding 1 to the equipment number statistic, and exiting the current equipment judgment process.
3. A device quantity statistics device in scenic spot is distinguished, its characterized in that includes:
the coordinate information acquisition module is used for acquiring each endpoint coordinate information set of a polygonal area used for representing a parcel in a map and GPS (global positioning system) coordinate information of equipment;
the position judgment module is used for drawing a regional fence according to the coordinate information of each endpoint of the polygonal region and judging whether the equipment is positioned in the polygonal region according to the relation between the GPS coordinate information of the equipment and the regional fence;
and the counting module is used for counting the number of the devices in the scenic spot according to the judgment result.
4. The apparatus of claim 3, wherein said determining whether the device is located in the polygonal area according to the relationship between the device GPS coordinate information and the area fence comprises:
s101, taking a longitudinal axis coordinate y of the current equipment as a starting point, and making a ray y which is point.y along the X axis in the forward direction;
s102, sequentially selecting boundary lines p1p2 of the regional fence;
s103, if ((y > (P1. y) & (y < P2.y)) | ((y < (P1. y) & (y > P2.y)) then it is proved that the ray y ═ point.y intersects the boundary line P1P2, defining the intersection point as X (X0, y 0);
s104, calculating an abscissa X0 of the intersection point X; if x0> x, the number n of intersection points is n +1, and the initial value of n is 0;
s105, judging whether the current regional fence is the last fence or not, if so, executing the step S106, otherwise, jumping to the step S102;
and S106, judging whether n is an odd number, if so, proving that the equipment is in the polygonal area, adding 1 to the equipment number statistic, and exiting the current equipment judgment process.
5. A device quantity statistics device in scenic spot is distinguished, its characterized in that includes:
a memory for storing a computer software program;
a processor for reading and executing the computer software program stored in the memory, and implementing a method for counting the number of devices in a scenic region as claimed in any one of claims 1-2.
6. A non-transitory computer-readable storage medium, wherein the storage medium stores a computer software program for implementing a method for counting devices in a scenic spot according to any one of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911351712.7A CN111209358A (en) | 2019-12-24 | 2019-12-24 | Method and device for counting equipment number in scenic spot area |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911351712.7A CN111209358A (en) | 2019-12-24 | 2019-12-24 | Method and device for counting equipment number in scenic spot area |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111209358A true CN111209358A (en) | 2020-05-29 |
Family
ID=70786306
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911351712.7A Pending CN111209358A (en) | 2019-12-24 | 2019-12-24 | Method and device for counting equipment number in scenic spot area |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111209358A (en) |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104636482A (en) * | 2015-02-16 | 2015-05-20 | 百度在线网络技术(北京)有限公司 | Target address determining method and device |
US20150319568A1 (en) * | 2013-09-10 | 2015-11-05 | Life360, Inc. | Apparatus and method for generating, displaying and implementing a geo-fence using location determination of mobile devices within a location-based group |
US20150324824A1 (en) * | 2014-05-06 | 2015-11-12 | At&T Mobility Ii Llc | Facilitating demographic assessment of information using targeted location oversampling |
CN105635960A (en) * | 2014-11-19 | 2016-06-01 | 中兴通讯股份有限公司 | Terminal management method, terminal management apparatus and terminal management system |
CN105868826A (en) * | 2015-01-23 | 2016-08-17 | 中兴通讯股份有限公司 | Method and device for determination of position relation |
CN106535129A (en) * | 2016-11-22 | 2017-03-22 | 腾云天宇科技(北京)有限公司 | Method and apparatus for counting mobile devices, and calculation device |
CN107154133A (en) * | 2017-06-22 | 2017-09-12 | 南京邮电大学 | A kind of regional early warning method based on defined position |
CN107705332A (en) * | 2017-09-30 | 2018-02-16 | 新奥(中国)燃气投资有限公司 | The method and device of number of devices in a kind of statistical regions |
CN108271115A (en) * | 2016-12-30 | 2018-07-10 | 中国移动通信集团内蒙古有限公司 | A kind of method of estimation and device of regional population's density |
CN108287841A (en) * | 2017-01-09 | 2018-07-17 | 北京四维图新科技股份有限公司 | Scene data acquires and update method and system, the visitor's terminal device and assistant director of a film or play swim equipment |
CN108470058A (en) * | 2018-03-22 | 2018-08-31 | 浙江科澜信息技术有限公司 | Querying method, device, equipment and the computer readable storage medium of objective |
CN108846882A (en) * | 2018-06-25 | 2018-11-20 | 北京嘀嘀无限科技发展有限公司 | A kind of method, apparatus and electronic equipment of determining point and fence relationship |
CN109117811A (en) * | 2018-08-24 | 2019-01-01 | 颜俊君 | A kind of system and method based on low-altitude remote sensing measuring technique estimation urban vegetation coverage rate |
WO2019075120A1 (en) * | 2017-10-10 | 2019-04-18 | Groundtruth, Inc. | Systems and methods for using geo-blocks and geo-fences to discover lookalike mobile devices |
US20190340288A1 (en) * | 2018-05-04 | 2019-11-07 | Sap Se | Determining data structures for spatial data based on spatial data statistics |
CN110427506A (en) * | 2019-07-10 | 2019-11-08 | 中国人民解放军战略支援部队信息工程大学 | Spatial data boundary processing method, device, computer equipment and storage medium |
-
2019
- 2019-12-24 CN CN201911351712.7A patent/CN111209358A/en active Pending
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150319568A1 (en) * | 2013-09-10 | 2015-11-05 | Life360, Inc. | Apparatus and method for generating, displaying and implementing a geo-fence using location determination of mobile devices within a location-based group |
US20150324824A1 (en) * | 2014-05-06 | 2015-11-12 | At&T Mobility Ii Llc | Facilitating demographic assessment of information using targeted location oversampling |
CN105635960A (en) * | 2014-11-19 | 2016-06-01 | 中兴通讯股份有限公司 | Terminal management method, terminal management apparatus and terminal management system |
CN105868826A (en) * | 2015-01-23 | 2016-08-17 | 中兴通讯股份有限公司 | Method and device for determination of position relation |
CN104636482A (en) * | 2015-02-16 | 2015-05-20 | 百度在线网络技术(北京)有限公司 | Target address determining method and device |
CN106535129A (en) * | 2016-11-22 | 2017-03-22 | 腾云天宇科技(北京)有限公司 | Method and apparatus for counting mobile devices, and calculation device |
CN108271115A (en) * | 2016-12-30 | 2018-07-10 | 中国移动通信集团内蒙古有限公司 | A kind of method of estimation and device of regional population's density |
CN108287841A (en) * | 2017-01-09 | 2018-07-17 | 北京四维图新科技股份有限公司 | Scene data acquires and update method and system, the visitor's terminal device and assistant director of a film or play swim equipment |
CN107154133A (en) * | 2017-06-22 | 2017-09-12 | 南京邮电大学 | A kind of regional early warning method based on defined position |
CN107705332A (en) * | 2017-09-30 | 2018-02-16 | 新奥(中国)燃气投资有限公司 | The method and device of number of devices in a kind of statistical regions |
WO2019075120A1 (en) * | 2017-10-10 | 2019-04-18 | Groundtruth, Inc. | Systems and methods for using geo-blocks and geo-fences to discover lookalike mobile devices |
CN108470058A (en) * | 2018-03-22 | 2018-08-31 | 浙江科澜信息技术有限公司 | Querying method, device, equipment and the computer readable storage medium of objective |
US20190340288A1 (en) * | 2018-05-04 | 2019-11-07 | Sap Se | Determining data structures for spatial data based on spatial data statistics |
CN108846882A (en) * | 2018-06-25 | 2018-11-20 | 北京嘀嘀无限科技发展有限公司 | A kind of method, apparatus and electronic equipment of determining point and fence relationship |
CN109117811A (en) * | 2018-08-24 | 2019-01-01 | 颜俊君 | A kind of system and method based on low-altitude remote sensing measuring technique estimation urban vegetation coverage rate |
CN110427506A (en) * | 2019-07-10 | 2019-11-08 | 中国人民解放军战略支援部队信息工程大学 | Spatial data boundary processing method, device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112885099B (en) | Method, device and equipment for determining key points of vehicle track | |
CN110300123A (en) | Abnormal flow recognition methods, device, electronic equipment and storage medium | |
CN110743169B (en) | Anti-cheating method and system based on block chain | |
CN111881243A (en) | Taxi track hotspot area analysis method and system | |
EP3624397A1 (en) | Node processing | |
CN114780556A (en) | Method and device for determining update frequency of map | |
CN111209358A (en) | Method and device for counting equipment number in scenic spot area | |
CN111428197B (en) | Data processing method, device and equipment | |
CN110222135B (en) | Bus route station data accuracy determination method and device | |
CN108960536B (en) | Scenic spot guideboard configuration method and system | |
CN109764890B (en) | Method and device for adjusting navigation map display | |
CN111309576A (en) | Pressure testing method and device | |
CN110659190A (en) | Quality report generation method, quality report generation device, quality report generation equipment and computer readable storage medium | |
CN106993309B (en) | User value evaluation method and device | |
CN111461779B (en) | Map information processing method and device, readable storage medium and electronic equipment | |
CN107798020B (en) | Bus route matching judgment method and device | |
CN110008291B (en) | Data early warning method and device, storage medium and electronic equipment | |
CN113590943A (en) | Gas station recommendation method, system, electronic device and medium | |
CN113076451B (en) | Abnormal behavior identification and risk model library establishment method and device and electronic equipment | |
CN110455295B (en) | Automatic planning method for river channel shipping route | |
CN109299765B (en) | Anti-collision method and device for radio frequency identification equipment of multiple internet of things and storage medium | |
CN110703289A (en) | Track data reporting method and moving track restoring method | |
CN109829025B (en) | Line correction method and device, electronic device and storage medium | |
CN112004234A (en) | Method and device for determining position of base station to be built, control equipment and storage medium | |
CN113923602B (en) | Method and device for filtering signaling drift data |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200529 |