CN109613577B - Position determination method, device, terminal equipment and storage medium - Google Patents

Position determination method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN109613577B
CN109613577B CN201811592511.1A CN201811592511A CN109613577B CN 109613577 B CN109613577 B CN 109613577B CN 201811592511 A CN201811592511 A CN 201811592511A CN 109613577 B CN109613577 B CN 109613577B
Authority
CN
China
Prior art keywords
client
latitude
longitude
boundary points
target area
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
CN201811592511.1A
Other languages
Chinese (zh)
Other versions
CN109613577A (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.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN201811592511.1A priority Critical patent/CN109613577B/en
Publication of CN109613577A publication Critical patent/CN109613577A/en
Application granted granted Critical
Publication of CN109613577B publication Critical patent/CN109613577B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Navigation (AREA)

Abstract

The invention discloses a position determining method, a position determining device, terminal equipment and a storage medium. The method comprises the following steps: acquiring current position information of a client, wherein the current position information comprises longitude and latitude of the client; if the longitude of the client is between the pre-stored longitudes of two adjacent boundary points of the target area, acquiring the latitude of an actual boundary point between the two adjacent boundary points; and determining whether the client is in the target area according to the number of the actual boundary points with the latitudes larger than that of the client, so that the position of the client can be quickly and accurately determined.

Description

Position determination method, device, terminal equipment and storage medium
Technical Field
Embodiments of the present invention relate to a location determination technology, and in particular, to a location determination method, an apparatus, a terminal device, and a storage medium.
Background
With the rapid development of Beidou satellites and the Internet, the high-precision positioning of the client position becomes particularly critical.
Currently, when Positioning a client position, a Global Positioning System (GPS) Positioning System is generally used to perform position Positioning. However, the positioning accuracy of the GPS is about ten meters, and the location of the client can be determined only by means of the network and by means of the GPS, and the location of the client can be determined only by acquiring all longitude and latitude information on the map, so that in the process of determining the location, there is an error in the positioning due to network problems, and the data calculation amount is too large due to the need to compare and analyze all the longitude and latitude information on the map, thereby reducing the positioning effect and affecting the use experience of the user.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for determining a location, a terminal device, and a storage medium, so as to achieve a fast and accurate determination of a location of a client.
In a first aspect, an embodiment of the present invention provides a position determining method, including:
acquiring current position information of a client, wherein the current position information comprises longitude and latitude of the client;
if the longitude of the client is between the pre-stored longitudes of two adjacent boundary points of the target area, acquiring the latitude of an actual boundary point between the two adjacent boundary points;
and determining whether the client is in the target area or not according to the number of the actual boundary points with the latitudes larger than that of the client.
Further, obtaining the latitude of the actual boundary point between the two adjacent boundary points includes:
and determining the latitude of the actual boundary intersection point according to the longitude of the client and the longitude and latitude of the two adjacent boundary points.
Further, the method further comprises:
comparing the longitude and latitude of the client with the longitude and latitude of all boundary points on a pre-stored target area;
and the longitude and latitude of the client side are the same as the longitude and latitude of a boundary point on a pre-stored target area, and the client side is determined to be on the boundary of the target area.
Further, determining whether the client is in the target area according to the number of actual boundary points with the latitudes larger than the latitude of the client includes:
if the number of the actual boundary points with the latitudes larger than that of the client is an odd number, the client is in the target area;
and if the number of the actual boundary points with the latitudes larger than that of the client is an even number, the client is outside the target area.
Further, before obtaining the current location information of the client, the method further includes:
acquiring longitude and latitude of all boundary points of all areas on a preset map;
and storing the longitude and latitude of all the boundary points into a preset database.
Further, the method further comprises:
and displaying the current position information of the client on a preset map.
In a second aspect, an embodiment of the present invention further provides a position determining apparatus, including:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring current position information of a client, and the current position information comprises the longitude and latitude of the client;
the second acquisition module is used for acquiring the latitude of an actual boundary point between two adjacent boundary points of a pre-stored target area if the longitude of the client is between the longitudes of the two adjacent boundary points;
a first determining module, configured to determine whether the client is in the target area according to the number of the actual boundary points whose latitudes are greater than the latitude of the client.
Further, the latitude of the actual boundary point between the two adjacent boundary points is obtained, and is specifically used for:
and determining the latitude of the actual boundary intersection point according to the longitude of the client and the longitude and latitude of the two adjacent boundary points.
Further, the apparatus further includes:
the comparison module is used for comparing the longitude and latitude of the client with the longitude and latitude of all boundary points on a pre-stored target area;
and the second determining module is used for determining that the longitude and latitude of the client is the same as the longitude and latitude of a boundary point on a pre-stored target area and determining that the client is on the boundary of the target area.
Further, the first determining module includes:
a first determination unit, configured to determine that the client is in the target area if the number of the actual boundary points with latitudes greater than the latitude of the client is an odd number;
a second determination determining unit, configured to determine that the client is outside the target area if the number of the actual boundary points with latitudes greater than the latitude of the client is an even number.
Further, the apparatus further includes:
the third acquisition module is used for acquiring the longitude and latitude of all boundary points of all areas on a preset map before acquiring the current position information of the client;
and the storage module is used for storing the longitude and latitude of all the boundary points into a preset database.
Further, the apparatus further includes:
and the display module is used for displaying the current position information of the client on a preset map.
In a third aspect, an embodiment of the present invention further provides a terminal device, including: a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the position determination method of the first aspect.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the position determination method according to the first aspect.
The method comprises the steps of acquiring current position information containing the longitude and the latitude of a client, and acquiring the latitude of an actual boundary point between two adjacent boundary points if the longitude of the client is between the pre-stored longitudes of the two adjacent boundary points in a target area; and determining whether the client is in the target area or not according to the number of the actual boundary points with the latitudes larger than that of the client. According to the embodiment of the invention, whether the client is in the target area can be determined only by acquiring the pre-stored longitude and latitude of all boundary points of the target area and then comparing and analyzing the longitude and latitude of the client and the latitudes of two adjacent boundary points, so that all the longitude and latitude in the target area do not need to be acquired, and the rapid and accurate determination of the position of the client can be ensured without an external network.
Drawings
Fig. 1 is a flowchart of a position determination method according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of a display for position determination provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a preset database according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a display of current location information of a client according to an embodiment of the present invention;
FIG. 5 is a flow chart of another position determination method provided by embodiments of the present invention;
FIG. 6 is a display diagram of another position determination provided by an embodiment of the present invention;
fig. 7 is a block diagram of a position determining apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a flowchart of a location determining method according to an embodiment of the present invention, where the location determining method provided in this embodiment may be executed by a terminal device, the terminal device may be implemented in a software and/or hardware manner, and the terminal device may be formed by two or more physical entities or may be formed by one physical entity. In this embodiment, the terminal device is a server.
Referring to fig. 1, the position determination method specifically includes the following steps:
and S110, acquiring the current position information of the client.
The current position information comprises the longitude and latitude of the client.
In an embodiment, the current location information of the client may be understood as the location information of the current address where the user of the client is located. The current location information may be a longitude and latitude of the client, or a specific address, which is not limited herein. Specifically, the current location information of the client may be obtained by positioning through a GPS system in the prior art, and then the current location information of the client is sent to a server with a communication connection established, so that the server processes and analyzes the current location information of the client.
And S120, if the longitude of the client is between the pre-stored longitudes of two adjacent boundary points of the target area, acquiring the latitude of an actual boundary point between the two adjacent boundary points.
It should be noted that each region or each city on the preset map may be referred to as a region, for example, a province, a city, or a county may be referred to as a region. In an embodiment, the pre-stored target area may be an area randomly acquired from a preset database. All boundary points of all areas on the preset map are stored in the preset database.
Specifically, after acquiring the longitude and latitude of the client, one area is randomly selected from a preset database to serve as a target area, two adjacent boundary points are selected from all boundary points in the target area, then the longitude of the client and the longitudes of the two adjacent boundary points are compared and analyzed, and if the longitude of the client is between the longitudes of the two adjacent boundary points, the latitude of an actual boundary point between the two adjacent boundary points is acquired. The actual boundary point may be understood as an intersection point of the longitude of the client and the boundary of the target area, the longitude of the intersection point is the same as the longitude of the client, and the longitude of the intersection point is between two adjacent boundary points.
The obtaining of the latitude of the actual boundary point between two adjacent boundary points may specifically be: and determining the latitude of the actual boundary intersection point according to the longitude of the client and the latitude and longitude of the two adjacent boundary points. Fig. 2 is a schematic display diagram of a position determination according to an embodiment of the present invention. As shown in FIG. 2, the target area is an elliptical area, and A,B. And C and P, where the point C is current location information of the client, the points a and B are two adjacent boundary points on the target area, and the latitude and longitude of the point C are x0 and y0, respectively, the latitude and longitude of the point a are x1 and y1, respectively, and the latitude and longitude of the point B are x2 and y2, respectively, and the point P is an actual boundary point and the latitude and longitude thereof are x and y0, respectively. Specifically, y0 of the point C is compared with y1 and y2 of the points a and B, respectively, so that the point C can be determined to be between the points a and B from the longitude perspective, and then the latitude of the point P is calculated by using an equal proportion formula for the longitude of the point C and the longitude and latitude of the points a and B. Specifically, the formula can be calculated: (x2-x1)/(x-x1) — (y2-y1)/(y0-y1), and the latitude at point P is calculated:
Figure GDA0002647480060000071
it should be noted that, two adjacent boundary points in the target area may be understood that the longitude and latitude of the two boundary points in the target area are the closest, and the intersection point of the longitude of the client and the connection line of the two adjacent boundary points is the intersection point of the longitude and latitude of the client and the boundary of the target area. Of course, the longitude and latitude of the boundary intersection point is the intersection point between the longitude and latitude of two adjacent boundary points.
It should be noted that, in the actual operation process, the longitude and latitude and the x and y coordinate values need to be converted according to the existing method. In this embodiment, in order to describe the relationship between the client, two adjacent boundary points, and the actual boundary point, the latitude and longitude and the x and y coordinate values are not converted, but the position determination of the client is not affected. Of course, in the actual operation of position determination, the longitude and latitude and the x and y coordinate values need to be converted to each other.
S130, determining whether the client is in the target area or not according to the number of the actual boundary points with the latitudes larger than that of the client.
Generally, the boundary of each region is a closed region. It is understood that the target areas in this embodiment are all one closed area, and the closed area may be symmetrical or asymmetrical. In order to accurately determine whether the client is in the target area, in the scheme, only the target area is considered to be a symmetric area, and the asymmetric area needs to be considered separately.
In an embodiment, after the latitude of the actual boundary point is obtained through calculation, whether the client is in the target area may be determined according to the number of the actual boundary points of which the latitude is greater than that of the client. Specifically, the target areas are symmetrical, and it is only necessary to determine the number of actual boundary points whose latitudes are greater than the latitude of the client, so as to determine whether the client is in the target area, which can be specifically divided into two cases: if the number of the actual boundary points with the latitudes larger than that of the client is an odd number, the client is in the target area; and if the number of the actual boundary points with the latitudes larger than that of the client is an even number, the client is outside the target area. For example, as shown in fig. 2, the number of the latitudes of the actual boundary point P that is greater than the latitude of the client C is only one, which indicates that the client C is in the target area.
According to the technical scheme of the embodiment, by acquiring the current position information containing the longitude and latitude of the client, if the longitude of the client is between the pre-stored longitudes of two adjacent boundary points of the target area, the latitude of an actual boundary point between the two adjacent boundary points is acquired; and determining whether the client is in the target area according to the number of the actual boundary points with the latitudes larger than that of the client, so that all the latitudes in the target area do not need to be acquired, and the accurate determination of the client position can be ensured without an external network.
On the basis of the above embodiment, in order to acquire the latitude and longitude of the boundary point of the pre-stored target area, before step S110, steps S140 to S150 are further included:
and S140, acquiring the longitude and latitude of all boundary points of all areas on the preset map.
The preset map may be a map of any area. In an embodiment, in order to ensure that the longitude and latitude of the client can be found on the preset map, the preset map is a national map. And then acquiring the longitude and latitude of all boundary points of all areas from a national map. All the regions are regions in the country, for example, the longitude and latitude of all boundary points of each province, each city and each county. It should be noted that, in order to make the longitude and latitude of the boundary points have regularity, when the longitude and latitude of all the boundary points on all the areas are obtained, the longitude and latitude of all the boundary points may be obtained at certain intervals. Of course, the acquisition may be performed according to other rules, which are not limited.
S150, storing the longitude and latitude of all the boundary points into a preset database.
The preset database is used for storing the space of the longitude and latitude of all boundary points of all areas. In an embodiment, in order to distinguish the boundary points of different areas, the longitude and latitude of the boundary points may be stored through the area identification. Fig. 3 is a schematic diagram illustrating a preset database according to an embodiment of the present invention. As shown in fig. 3, the preset database is divided into N sub-databases each representing one area in units of areas, and then all boundary points in each area are stored in the corresponding area. In practical operation, the longitude and latitude of all boundary points of all cities and counties in a province can be stored in a region identifier. For example, the area in Tianjin City is identified as area 1, the area in Hebei province is identified as area 2, and so on. Of course, the setting of the area identifier for each province may be set according to actual conditions. Then, the longitude and latitude of the boundary point of each district in Tianjin city and the longitude and latitude of the boundary point of each city and each county in Hebei province are obtained, the longitude and latitude of the boundary points of all the districts in Tianjin city are stored in the storage space of the region 1, the longitude and latitude of the boundary points of Shijiazhuang city, Chengtai city and other cities in Hebei province, even the boundary points of the counties such as the Wen county of the Chengtai city and the like are stored in the storage space of the region 2, and therefore the province, the city and the county corresponding to the target region where the client is located can be directly determined according to the region identification. Of course, each sub-database may be divided again in units of provinces and cities or counties, and the division rule may be the same as that in units of provinces.
Of course, in the actual operation of position determination, there may be a case where the client is on the boundary of the target area. In order to determine whether the client is on the boundary of the target area, on the basis of the above embodiment, the method for determining the position further includes steps S160-S170:
and S160, comparing the longitude and latitude of the client with the longitude and latitude of all boundary points on the pre-stored target area.
In the embodiment, after the longitude and latitude of the client are obtained, the longitude and latitude of the client and the longitude and latitude of all boundary points on all areas are compared and analyzed.
S170, the longitude and latitude of the client side are the same as the longitude and latitude of a boundary point on a pre-stored target area, and the client side is determined to be on the boundary of the target area.
In an embodiment, if the longitude and latitude of the client is the same as the prestored longitude and latitude of a boundary point on the target area, it may be determined that the client is on the boundary of the target area.
On the basis of the above embodiment, after the location of the client is determined, the location of the client may be displayed on a preset map. Therefore, the position determining method further includes step S180:
and S180, displaying the current position information of the client on a preset map.
Fig. 4 is a schematic diagram of displaying current location information of a client according to an embodiment of the present invention. As shown in fig. 4, four different areas are included on the preset map, and the shape of each area is also different. Assuming that the current position of the client is the position of the point D, and according to the position determination method in the above embodiment, it is determined that the client is in a heptagonal area, the point D of the client is displayed on a preset map to prompt the user that the client is at a specific position. In fig. 4, the position of the D point is shown by a solid dot, and of course, when the position of the D point is displayed on the preset map, information in a certain range where the D point is located may be displayed on the preset map. Of course, in order to make it easier for the user to observe the position of the D point, the position of the D point may be displayed in a flashing manner on the preset map.
Fig. 5 is a flowchart of another position determination method according to an embodiment of the present invention. The present embodiment specifically describes a position determination method as a preferred embodiment on the basis of the above-described embodiments. Referring to fig. 5, the position determining method specifically includes the following steps:
s210, obtaining the current position information of the client.
The current position information comprises the longitude and latitude of the client.
S220, comparing the longitude and latitude of the client with the longitude and latitude of all boundary points on the pre-stored target area.
S230, whether the longitude and latitude of the client side are the same as the longitude and latitude of a boundary point on a pre-stored target area or not is judged, if yes, the step S240 is executed; if not, go to step S250.
And S240, determining that the client is on the boundary of the target area.
And S250, acquiring two adjacent boundary points on the pre-stored target area.
It should be noted that, the longitude and latitude of all the boundary points of the plurality of areas are stored in the preset database, and when two adjacent boundary points on the pre-stored target area are obtained, the adjacent boundary points are obtained by taking the area as a unit. Assuming that the longitude and latitude of all the boundary points of 10 areas are stored in the preset database, the area identifiers are area 1, area 2, and area 3 … …, respectively, and area 10. When two adjacent boundary points on a pre-stored target area are obtained from a preset database for the first time, the two adjacent boundary points on one area can be randomly obtained, for example, the obtained area identifier is any two adjacent boundary points on the area 2, then the subsequent steps are sequentially executed, if the positions of the client are not determined after the obtaining of the latitudes and longitudes of all the boundary points in the area identifier 2 is completed, the two adjacent boundary points on other areas except the area 2 are randomly obtained from the preset database, and the like, and the latitudes and latitudes of all the boundary points on all the areas are obtained by taking the areas as units until the positions of the client are determined.
S260, judging whether the longitude of the client is between the pre-stored longitudes of two adjacent boundary points of the target area, if so, executing a step S270; if not, go to step S250.
S270, acquiring the latitude of the actual boundary point between two adjacent boundary points.
S280, judging whether the number of the actual boundary points with the latitudes larger than that of the client is an odd number or not, if so, executing a step S290; if not, go to step S2100.
And S290, determining that the client is in the target area.
S2100, determining that the client is outside the target area. Of course, in actual operation, there are cases where the client is outside the target area. Fig. 6 is a display diagram of another position determination provided by an embodiment of the invention. Fig. 6 is a diagram illustrating that the location of the client is moved on the basis of fig. 2, and the meanings of the point a, the point B, and the point P are explained in detail in the above embodiment, and are not repeated here. As shown in fig. 6, the total number of the intersection points between the point C and the boundary of the target area, i.e., the point P, is two, and the number of the actual boundary points having latitudes greater than the latitude of the client is an even number, then the point C is outside the target area, i.e., the client is outside the target area.
It should be noted that, in the process of determining the location of the client, it is first determined whether the client is in the province, and if the client is in the province, it is determined whether the client is in a specific city in the province by using a location determination method, and then it is determined that the client is in the specific county in the city, and then it is determined that the client is at the specific location.
According to the technical scheme of the embodiment, on the basis of the scheme, by acquiring the current position information containing the longitude and latitude of the client, if the longitude of the client is between the pre-stored longitudes of two adjacent boundary points of the target area, the latitude of an actual boundary point between the two adjacent boundary points is acquired; according to the number of the actual boundary points with the latitudes larger than that of the client, whether the client is in the target area or not is determined, the fact that the client is in the provincial range is determined, then all cities in the province are traversed, the fact that the client is in the city range is determined, then all counties in the city are traversed, the fact that the client is in the county range is determined, the fact that the specific position of the client is determined finally is achieved, the fact that all longitudes and latitudes in the target area do not need to be obtained, and the fact that the position of the client can be accurately determined without an external network is guaranteed.
Fig. 7 is a block diagram of a position determination apparatus according to an embodiment of the present invention. The position determining apparatus of the present embodiment may be configured in a server, and referring to fig. 7, the position determining apparatus includes: a first acquisition module 310, a second acquisition module 320, and a first determination module 330.
The first obtaining module 310 is configured to obtain current location information of a client, where the current location information includes a longitude and latitude of the client;
a second obtaining module 320, configured to obtain a latitude of an actual boundary point between two adjacent boundary points if the longitude of the client is between the pre-stored longitudes of two adjacent boundary points of the target area;
the first determining module 330 is configured to determine whether the client is in the target area according to the number of actual boundary points whose latitudes are greater than the latitude of the client.
According to the technical scheme provided by the embodiment, by acquiring the current position information containing the longitude and latitude of the client, if the longitude of the client is between the pre-stored longitudes of two adjacent boundary points of the target area, the latitude of an actual boundary point between the two adjacent boundary points is acquired; and determining whether the client is in the target area according to the number of the actual boundary points with the latitudes larger than that of the client, so that all the latitudes in the target area do not need to be acquired, and the accurate determination of the client position can be ensured without an external network.
On the basis of the above embodiment, the latitude of the actual boundary point between two adjacent boundary points is obtained, and is specifically used for:
and determining the latitude of the actual boundary intersection point according to the longitude of the client and the latitude and longitude of the two adjacent boundary points.
On the basis of the above embodiment, the apparatus further includes:
the comparison module is used for comparing the longitude and latitude of the client with the longitude and latitude of all boundary points on a pre-stored target area;
and the second determining module is used for determining that the longitude and latitude of the client is the same as the longitude and latitude of a boundary point on a pre-stored target area and determining that the client is on the boundary of the target area.
On the basis of the foregoing embodiment, the first determining module includes:
the first judgment and determination unit is used for determining that the client is in the target area if the number of the actual boundary points with the latitudes larger than that of the client is an odd number;
and the second judgment and determination unit is used for determining that the client is outside the target area if the number of the actual boundary points with the latitudes larger than the latitude of the client is an even number.
On the basis of the above embodiment, the apparatus further includes:
the third acquisition module is used for acquiring the longitude and latitude of all boundary points of all areas on a preset map before acquiring the current position information of the client;
and the storage module is used for storing the longitude and latitude of all the boundary points into a preset database.
On the basis of the above embodiment, the apparatus further includes:
and the display module is used for displaying the current position information of the client on a preset map.
The position determining device can execute the position determining method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the executing method.
Fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. Referring to fig. 8, the terminal device includes: a processor 410, a memory 420, an input device 430, and an output device 440. The number of the processors 410 in the terminal device may be one or more, and one processor 410 is taken as an example in fig. 8. The number of the memory 420 in the terminal device may be one or more, and one memory 420 is taken as an example in fig. 8. The processor 410, the memory 420, the input device 430 and the output device 440 of the terminal device may be connected by a bus or other means, and fig. 8 illustrates the connection by a bus as an example. In an embodiment, the terminal device is a server.
The memory 420 serves as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the terminal device according to any embodiment of the present invention (e.g., the first obtaining module 310, the second obtaining module 320, and the first determining module 330 in the position determining apparatus). The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 420 may further include memory located remotely from processor 410, which may be connected to devices through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the apparatus, and may also be a camera for acquiring images and a sound pickup apparatus for acquiring audio data. The output device 440 may include an audio device such as a speaker. It should be noted that the specific composition of the input device 430 and the output device 440 can be set according to actual situations.
The processor 410 executes various functional applications of the device and data processing by executing software programs, instructions and modules stored in the memory 420, that is, implements the position determination method described above.
The terminal device provided above can be used to execute the position determining method provided in any of the above embodiments, and has corresponding functions and advantages.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for position determination, comprising:
acquiring current position information of a client, wherein the current position information comprises longitude and latitude of the client;
if the longitude of the client is between the pre-stored longitudes of two adjacent boundary points of the target area, acquiring the latitude of an actual boundary point between the two adjacent boundary points;
and determining whether the client is in the target area or not according to the number of the actual boundary points with the latitudes larger than that of the client.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the position determination method described above, and may also perform related operations in the position determination method provided by any embodiment of the present invention, and have corresponding functions and advantages.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a robot, a personal computer, a server, or a network device) to execute the position determining method according to any embodiment of the present invention.
It should be noted that, in the above position determining apparatus, the included units and modules are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (6)

1. A method of position determination, comprising:
acquiring current position information of a client, wherein the current position information comprises longitude and latitude of the client;
if the longitude of the client is between the pre-stored longitudes of two adjacent boundary points of the target area, acquiring the latitude of an actual boundary point between the two adjacent boundary points;
determining whether the client is in the target area or not according to the number of the actual boundary points with the latitudes larger than that of the client;
the actual boundary point is an intersection point of the longitude of the client and a connecting line of the two adjacent boundary points on the boundary of the target area;
wherein, obtaining the latitude of the actual boundary point between the two adjacent boundary points comprises:
determining the latitude of the actual boundary intersection point according to the longitude of the client and the longitude and latitude of the two adjacent boundary points;
wherein, still include:
comparing the longitude and latitude of the client with the longitude and latitude of all boundary points on a pre-stored target area;
the longitude and latitude of the client side are the same as the longitude and latitude of a boundary point on a pre-stored target area, and the client side is determined to be on the boundary of the target area;
before obtaining the current location information of the client, the method further comprises the following steps:
acquiring longitude and latitude of all boundary points of all areas on a preset map;
storing the longitude and latitude of all the boundary points into a preset database;
the longitude and latitude of the boundary points are regular, and when the longitude and latitude of all the boundary points in all the areas are obtained, the longitude and latitude of all the boundary points are obtained according to preset intervals.
2. The method of claim 1, wherein determining whether the client is within the target area according to the number of the actual boundary points having a latitude greater than the latitude of the client comprises:
if the number of the actual boundary points with the latitudes larger than that of the client is an odd number, the client is in the target area;
and if the number of the actual boundary points with the latitudes larger than that of the client is an even number, the client is outside the target area.
3. The position determination method according to claim 1, characterized by further comprising:
and displaying the current position information of the client on a preset map.
4. A position determining apparatus, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring current position information of a client, and the current position information comprises the longitude and latitude of the client;
the second acquisition module is used for acquiring the latitude of an actual boundary point between two adjacent boundary points of a pre-stored target area if the longitude of the client is between the longitudes of the two adjacent boundary points;
a first determining module, configured to determine whether the client is in the target area according to the number of the actual boundary points whose latitudes are greater than the latitude of the client;
the actual boundary point is an intersection point of the longitude of the client and a connecting line of the two adjacent boundary points on the boundary of the target area;
wherein, still include:
the comparison module is used for comparing the longitude and latitude of the client with the longitude and latitude of all boundary points on a pre-stored target area;
the second determining module is used for determining that the longitude and latitude of the client is the same as the longitude and latitude of a boundary point on a pre-stored target area and determining that the client is on the boundary of the target area;
the latitude of the actual boundary point between two adjacent boundary points is obtained, and the latitude is specifically used for:
determining the latitude of the actual boundary intersection point according to the longitude of the client and the longitudes and latitudes of two adjacent boundary points;
wherein, the device still includes:
the third acquisition module is used for acquiring the longitude and latitude of all boundary points of all areas on a preset map before acquiring the current position information of the client;
the storage module is used for storing the longitude and latitude of all the boundary points into a preset database;
the longitude and latitude of the boundary points are regular, and when the longitude and latitude of all the boundary points in all the areas are obtained, the longitude and latitude of all the boundary points are obtained according to preset intervals.
5. A terminal device, comprising: a memory and one or more processors;
the memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the position determination method of any of claims 1-3.
6. A storage medium containing computer-executable instructions for performing the position determination method of any of claims 1-3 when executed by a computer processor.
CN201811592511.1A 2018-12-25 2018-12-25 Position determination method, device, terminal equipment and storage medium Active CN109613577B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811592511.1A CN109613577B (en) 2018-12-25 2018-12-25 Position determination method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811592511.1A CN109613577B (en) 2018-12-25 2018-12-25 Position determination method, device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109613577A CN109613577A (en) 2019-04-12
CN109613577B true CN109613577B (en) 2021-07-09

Family

ID=66011580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811592511.1A Active CN109613577B (en) 2018-12-25 2018-12-25 Position determination method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109613577B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110389994A (en) * 2019-07-17 2019-10-29 拉扎斯网络科技(上海)有限公司 Data processing method, device, localization method, storage medium and electronic equipment
CN110569546B (en) * 2019-08-06 2022-07-01 苏州科达科技股份有限公司 Traffic cell division method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11144041A (en) * 1997-11-13 1999-05-28 Canon Inc Method for deciding inside/outside of area
CN101882154A (en) * 2010-06-11 2010-11-10 北京高森明晨信息科技有限公司 Positioning method and system
CN105989024A (en) * 2015-01-30 2016-10-05 北京陌陌信息技术有限公司 Method and device for determining position regions of users
CN106097402A (en) * 2016-06-20 2016-11-09 深圳市麦谷科技有限公司 A kind of method and system judging whether impact point is positioned at presumptive area
CN106932805A (en) * 2017-01-20 2017-07-07 广东侨兴宇航科技有限公司 It is a kind of to be suitable to the swift electron fence method of mobile device application

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6429979A (en) * 1987-07-24 1989-01-31 Mitsubishi Electric Corp Device for deciding inside and outside of graphic frame
JPH06150004A (en) * 1992-11-12 1994-05-31 Fujitsu Ltd Direction deciding ytem for apex line of polygon
CN105868826A (en) * 2015-01-23 2016-08-17 中兴通讯股份有限公司 Method and device for determination of position relation
CN108268821A (en) * 2016-12-30 2018-07-10 中国移动通信集团黑龙江有限公司 A kind of indoor and outdoor scene recognition method and device
CN107635284A (en) * 2017-11-14 2018-01-26 北京锐安科技有限公司 A kind of wireless location method, device, equipment and storage medium
CN108763345A (en) * 2018-05-14 2018-11-06 平安好房(上海)电子商务有限公司 Method of calibration, user equipment, storage medium and the device of cell longitude and latitude

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11144041A (en) * 1997-11-13 1999-05-28 Canon Inc Method for deciding inside/outside of area
CN101882154A (en) * 2010-06-11 2010-11-10 北京高森明晨信息科技有限公司 Positioning method and system
CN105989024A (en) * 2015-01-30 2016-10-05 北京陌陌信息技术有限公司 Method and device for determining position regions of users
CN106097402A (en) * 2016-06-20 2016-11-09 深圳市麦谷科技有限公司 A kind of method and system judging whether impact point is positioned at presumptive area
CN106932805A (en) * 2017-01-20 2017-07-07 广东侨兴宇航科技有限公司 It is a kind of to be suitable to the swift electron fence method of mobile device application

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
关于点与简单多边形位置关系的一种算法;方剑英等;《新疆师范大学学报(自然科学版)》;20021231;第21卷(第4期);全文 *
判定点是否在多边形内部的算法;周培德;《北京理工大学学报》;19951130;第15卷(第4期);全文 *
判断点与简单多边形位置关系的新算法;董秀山等;《计算机工程与应用》;20091231;第45卷(第2期);全文 *

Also Published As

Publication number Publication date
CN109613577A (en) 2019-04-12

Similar Documents

Publication Publication Date Title
JP7344389B2 (en) Cooperative positioning methods, devices, equipment and storage media
CN106919567B (en) Method and device for processing POI (Point of interest) address
CN112233240B (en) Three-dimensional vector data slicing method and device of three-dimensional vector map and electronic equipment
CN109613577B (en) Position determination method, device, terminal equipment and storage medium
US10473476B2 (en) Vehicle routing guidance to an authoritative location for a point of interest
CN110457413B (en) Method, device and equipment for determining driving direction and storage medium
CN112086010A (en) Map generation method, map generation device, map generation equipment and storage medium
CN111505740B (en) Weather prediction method, weather prediction device, computer equipment and storage medium
CN115616937B (en) Automatic driving simulation test method, device, equipment and computer readable medium
US20200116500A1 (en) Matching algorithm for data with different scales based on global road network features
CN111080682A (en) Point cloud data registration method and device
CN111884207B (en) Power grid topological structure visualization method, system and medium based on electrical distance
CN105426387B (en) Map aggregation method based on K-means algorithm
CN109871419B (en) Map display method and device
CN113961780A (en) Resident cell acquisition method and device, electronic equipment and storage medium
CN113935402A (en) Training method and device for time difference positioning model and electronic equipment
WO2021226779A1 (en) Method, device, and equipment for image navigation, and readable storage medium
CN105354326A (en) Spatial position indexing method and system
CN108055638A (en) Obtain method, apparatus, computer-readable medium and the equipment of target location
CN114064829A (en) Method and device for carrying out aggregation display on positioning points and electronic equipment
CN111159318A (en) Method, apparatus, device and medium for aggregating points of interest
CN110909097A (en) Polygonal electronic fence generation method and device, computer equipment and storage medium
CN111102990A (en) Position determination method, device and equipment
CN108304525B (en) Condition data determination method and device
CN113568997A (en) Point cloud map updating method and device, electronic equipment and computer readable medium

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