CN117319932A - Fence determination method, apparatus, computer device, storage medium, and program product - Google Patents

Fence determination method, apparatus, computer device, storage medium, and program product Download PDF

Info

Publication number
CN117319932A
CN117319932A CN202311264399.XA CN202311264399A CN117319932A CN 117319932 A CN117319932 A CN 117319932A CN 202311264399 A CN202311264399 A CN 202311264399A CN 117319932 A CN117319932 A CN 117319932A
Authority
CN
China
Prior art keywords
fence
target
information
position information
fences
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
Application number
CN202311264399.XA
Other languages
Chinese (zh)
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.)
Lanzhou Lezhi Education Technology Co ltd
Original Assignee
Lanzhou Lezhi Education 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 Lanzhou Lezhi Education Technology Co ltd filed Critical Lanzhou Lezhi Education Technology Co ltd
Priority to CN202311264399.XA priority Critical patent/CN117319932A/en
Publication of CN117319932A publication Critical patent/CN117319932A/en
Pending legal-status Critical Current

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • H04W64/006Locating users or terminals or network equipment for network management purposes, e.g. mobility management with additional information processing, e.g. for direction or speed determination

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)

Abstract

The application relates to a fence determination method, apparatus, computer device, storage medium, and program product. The method comprises the following steps: receiving position information and a target fence code sent by positioning equipment; determining a target fence from a plurality of fences according to the target fence code; and judging whether the positioning equipment is in the area of the target fence according to the position information. By adopting the method, the resource consumption can be reduced.

Description

Fence determination method, apparatus, computer device, storage medium, and program product
Technical Field
The present application relates to the field of positioning technologies, and in particular, to a fence determination method, apparatus, computer device, storage medium, and program product.
Background
The electronic fence refers to a virtual geographic boundary surrounded by a virtual fence, and the virtual geographic boundary is used for judging whether the wearable intelligent positioning device is in an electronic fence area or not so as to determine whether a user wearing the wearable intelligent positioning device is in a safe activity range or not.
In the prior art, a plurality of electronic fences are added to the drowning prevention platform, after coordinate points sent by the wearable intelligent positioning equipment are received, the coordinate points and each electronic fence are respectively judged, and whether the coordinate points are in the electronic fence areas is determined.
However, each wearable intelligent positioning device reports a coordinate point once every 10 minutes, and a problem of high resource consumption exists by using a traditional judging method.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a fence determination method, apparatus, computer device, storage medium, and program product that can reduce resource consumption.
In a first aspect, the present application provides a fence determination method, the method comprising: receiving position information and a target fence code sent by positioning equipment; determining a target fence from a plurality of fences according to the target fence code; and judging whether the positioning equipment is in the area of the target fence according to the position information.
In one embodiment, the method further comprises: encoding each fence to obtain fence codes of each fence; acquiring fence information of each fence; and storing each fence code and each fence information into a fence information database in a one-to-one correspondence manner.
In one embodiment, obtaining fence information for each fence includes: acquiring point location information of a plurality of fences of each fence; for each fence, acquiring a minimum circumscribed matrix of a polygon corresponding to the fence, and acquiring vertex information of the fence according to the minimum circumscribed matrix; and taking the point position information of a plurality of fences and the vertex information of each fence as fence information of each fence.
In one embodiment, determining a target fence from a plurality of fences based on a target fence code comprises: inquiring a fence information database according to the target fence codes to obtain target vertex information and a plurality of target fence point position information so as to determine the target fence.
In one embodiment, determining whether the positioning device is within the area of the target fence based on the location information includes: judging whether the positioning equipment is in a judging area or not according to the position information and the target vertex information; if so, determining whether the positioning equipment is in the area of the target fence or not through a ray passing algorithm according to the position information and the point position information of the plurality of target fences.
In one embodiment, the position information includes coordinate points, and determining whether the positioning device is in the area of the target fence by using a ray passing algorithm according to the position information and the point position information of the plurality of target fences includes: a ray is led out from the coordinate point to any direction intersecting with a polygon formed by a plurality of target fence point position information; and judging whether the positioning equipment is in the area of the target fence or not according to the intersection number of the rays and the polygon formed by the point position information of the plurality of target fences.
In a second aspect, the present application further provides a fence determining apparatus, the apparatus comprising: the receiving module is used for receiving the position information and the target fence code sent by the positioning equipment; a determining module for determining a target fence from a plurality of fences according to a target fence code; and the judging module is used for judging whether the positioning equipment is in the area of the target fence according to the position information.
In one embodiment, the device further comprises a coding module, an acquisition module and a storage module, wherein the coding module is used for coding each fence to obtain a fence code of each fence; the acquisition module is used for acquiring fence information of each fence; and the storage module is used for storing each fence code and each fence information into the fence information database in a one-to-one correspondence manner.
In one embodiment, the acquiring module is specifically configured to acquire a plurality of rail point location information of each rail; for each fence, acquiring a minimum circumscribed matrix of a polygon corresponding to the fence, and acquiring vertex information of the fence according to the minimum circumscribed matrix; and taking the point position information of a plurality of fences and the vertex information of each fence as fence information of each fence.
In one embodiment, the determining module is specifically configured to query a fence information database according to a target fence code to obtain target vertex information and a plurality of target fence point location information, so as to determine a target fence.
In one embodiment, the determining module is specifically configured to determine whether the positioning device is in a determinable region according to the location information and the target vertex information; if so, determining whether the positioning equipment is in the area of the target fence or not through a ray passing algorithm according to the position information and the point position information of the plurality of target fences.
In one embodiment, the position information includes a coordinate point, and the determining module is specifically configured to draw a ray from the coordinate point to a direction that arbitrarily intersects a polygon formed by a plurality of pieces of target fence point location information; and judging whether the positioning equipment is in the area of the target fence or not according to the intersection number of the rays and the polygon formed by the point position information of the plurality of target fences.
In a third aspect, the present application also provides a computer device comprising a memory storing a computer program and a processor implementing the steps of any one of the first methods described above when the computer program is executed by the processor.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of the first methods described above.
In a fifth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any of the first methods described above.
According to the rail judging method, the device, the computer equipment, the storage medium and the program product, the position information and the target rail codes sent by the positioning equipment are received, then the target rail is determined from the plurality of rails according to the target rail codes, and then whether the positioning equipment is in the area of the target rail is judged according to the position information, so that the target rail is determined according to the target rail codes, and the mode of directly judging whether the positioning equipment is in the area of the target rail is adopted, the judging times are reduced, and the resource consumption is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
FIG. 1 is a diagram of an application environment for a fence determination method in one embodiment;
FIG. 2 is a flow chart of a fence determination method according to one embodiment;
FIG. 3 is a flow chart of a method for encoding and acquiring fence information in one embodiment;
FIG. 4 is a schematic view of a pen in one embodiment;
FIG. 5 is a schematic diagram of obtaining vertex information for a pen, in one embodiment;
FIG. 6 is a schematic diagram of another example of obtaining vertex information for a pen;
FIG. 7 is a schematic diagram of one embodiment for determining whether a pointing device is within a determinable region;
FIG. 8 is a schematic diagram of one embodiment for determining whether a positioning device is within the area of a target fence by a ray-passing algorithm;
FIG. 9 is a block diagram showing a construction of a fence determining apparatus in one embodiment;
FIG. 10 is an internal block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Prevent drowned platform, according to the business need, prevent adding 20 ten thousand rail (hereinafter referred to as rail) at drowned platform, every rail comprises an irregular polygon region by more than 200 longitude and latitude coordinate points. The drowning prevention platform is provided with 20 ten thousand wearable intelligent positioning devices (hereinafter referred to as positioning devices), and each positioning device reports a longitude and latitude coordinate point to the drowning prevention platform every 10 minutes. It is now necessary to determine in real time whether the position reported each time for each positioning device is in 20 ten thousand pens set up on the anti-drowning platform.
In the prior art, the fences are stored in a relational database, and key information of the fences is not extracted and specially processed. When judging the fences, all the fences need to be queried, then, the calculation of a ray traversing method is carried out on each fence, and whether each point reported by the positioning equipment is in the fence is judged.
Every 10 minutes, each device reports a point location, and the point location needs to be compared with 20 ten thousand positioning devices of a platform, so that 20 ten thousand devices can be compared with 20 ten thousand fences every 10 minutes, and a large amount of system resources can be consumed. The total judgment complexity of the drowning prevention platform is as follows: 200000 x 200000/(10 x 60) =6667 ten thousand times per second.
The position of each positioning device is only associated with 3 to 6 fences, and only needs to be compared with a part of the fences, so that the problem of high resource consumption exists in the judging method, and an effective technical means is necessary to solve the problem. The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
The fence determination method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the positioning device 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The server 104 receives the location information and the target fence code transmitted by the positioning device 102, and then the server 104 determines a target fence from a plurality of fences based on the target fence code, and determines whether the positioning device 102 is within the area of the target fence based on the location information. The positioning device 102 may be, but not limited to, various notebook computers, smart phones, tablet computers, and portable wearable devices, which may be smart watches, smart bracelets, headsets, etc. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In an exemplary embodiment, as shown in fig. 2, a fence determination method is provided, which is described by taking an example that the method is applied to the server in fig. 1, and includes the following steps:
step 201, receiving location information and a target fence code sent by a positioning device.
The position information may be a coordinate point, and the coordinate point may be a latitude and longitude coordinate point. The fence code may be a string of characters capable of uniquely identifying the fence for indicating the geographical area to which the positioning device currently belongs, such as 620101 or XP210.
Optionally, the positioning device reports the position information and the target fence code of the positioning device once every 10 minutes, so that the position information and the target fence code sent by the positioning device can be received.
Step 202, determining a target fence from a plurality of fences according to a target fence code.
Optionally, inquiring a fence information database according to the target fence code, wherein a plurality of groups of corresponding relations between the fence code and the fence information are stored in the fence information database; and determining the target fence according to the query result.
Step 203, determining whether the positioning device is in the area of the target fence according to the position information.
Optionally, in step 202, target vertex information of the target fence is obtained, where the target vertex information is four vertices of a minimum circumscribed matrix of the target fence, and whether the positioning device is in the minimum circumscribed matrix can be determined according to the position information and the target vertex information, and if not, the positioning device can be directly determined to be in an area of no target fence any more; if yes, further judging whether the positioning equipment is in the area of the target fence or not by using a ray passing algorithm.
According to the rail judging method, the position information and the target rail codes sent by the positioning equipment are received, then the target rail is determined from the plurality of rails according to the target rail codes, and then whether the positioning equipment is in the area of the target rail is judged according to the position information, so that whether the positioning equipment is in the area of the target rail is directly judged according to the target rail codes, the judging times are reduced, and the resource consumption is reduced.
In one embodiment, as shown in fig. 3, there is provided a method for encoding a fence and acquiring fence information, the method comprising:
step 301, coding each fence to obtain a fence code of each fence.
Optionally, a circle and/or an irregular polygon are drawn on the map to obtain a plurality of fences, and then each fence is uniquely coded to obtain a fence code of each fence. In drawing, a region (county) is drawn in units of a district, that is, a region where one district is a fence, as shown in fig. 4, and a schematic diagram of one fence is provided.
In addition, the encoding method may employ a hash algorithm.
Step 302, obtaining fence information of each fence.
Optionally, acquiring a plurality of fence point location information of each fence; for each fence, acquiring a minimum circumscribed matrix of a polygon corresponding to the fence, and acquiring vertex information of the fence according to the minimum circumscribed matrix; and taking the point position information of a plurality of fences and the vertex information of each fence as fence information of each fence.
Wherein, the fence point location information and the vertex information can be coordinate points. The vertex information may be four vertex coordinates of the minimum circumscribed matrix, or may be two vertex coordinates on any diagonal of the minimum circumscribed matrix.
As shown in fig. 5, a schematic diagram of obtaining vertex information for a fence is provided. The region of the fence is similar to "C", and four vertex coordinates of the fence, namely A (x, y), B (x, y), C (x, y), D (x, y), are obtained by traversing a plurality of fence point location information by using a bubbling sequencing method. The four vertex coordinates form a minimum circumscribed matrix, and then the four vertex coordinates of the minimum circumscribed matrix are obtained. As shown in fig. 6, another schematic diagram for acquiring vertex information of the fence is provided, and two vertex coordinates on any diagonal of the minimum circumscribing matrix, that is, (Dx, cy) and (Bx, ay) are acquired.
And step 303, storing each fence code and each fence information into a fence information database in a one-to-one correspondence manner.
Optionally, each fence code and each fence information are stored in a mapping table manner in a fence information database or a search engine.
In one embodiment, determining a target fence from a plurality of fences based on a target fence code comprises: inquiring a fence information database according to the target fence codes to obtain target vertex information and a plurality of target fence point position information so as to determine the target fence.
Optionally, as known from steps 301 to 303, the correspondence between each fence code and each fence information is stored in the fence information database, where the fence information includes a plurality of fence point position information and vertex information of the fence. Therefore, the vertex information of the target fence and the plurality of fence point position information of the target fence, that is, the target vertex information and the plurality of target fence point position information, can be queried from the fence information database according to the target fence code.
In one embodiment, there is provided determining whether a positioning device is within an area of a target fence based on location information, comprising: judging whether the positioning equipment is in a judging area or not according to the position information and the target vertex information; if so, determining whether the positioning equipment is in the area of the target fence or not through a ray passing algorithm according to the position information and the point position information of the plurality of target fences.
Alternatively, as shown in fig. 7, a schematic diagram for determining whether the positioning device is within a determinable region is provided. If the position information is outside the matrix formed by the target vertex information, that is, dx < = x < = Bx is not satisfied, and Cy < = y < = Ay, the positioning device is not in the determinable region, and the positioning device can be directly determined not to be in the region of the target fence. Such as points M1 through M8 in fig. 7.
If the position information is inside the matrix formed by the target vertex information, that is, satisfies Dx < = x < = Bx, and Cy < = y < = Ay, the positioning device is in the determinable region, for example, such as points N1 to N3 in fig. 7, and it is necessary to further determine whether the positioning device is in the region of the target fence through the ray passing algorithm according to the position information and the plurality of target fence point position information.
As shown in fig. 8, a schematic diagram is provided for determining whether a positioning device is within the area of a target pen by a ray-passing algorithm. The position information comprises coordinate points, and according to the position information and the point position information of a plurality of target fences, whether the positioning equipment is in the area of the target fence or not is determined through a ray passing algorithm, and the method comprises the following steps: a ray is led out from the coordinate point to any direction intersecting with a polygon formed by a plurality of target fence point position information; and judging whether the positioning equipment is in the area of the target fence or not according to the intersection number of the rays and the polygon formed by the point position information of the plurality of target fences.
If the number of intersections is an odd number, positioning equipment is positioned in the area of the target fence; if the number of intersections is even, the positioning device is not within the area of the target fence.
As shown in fig. 8, the area of the target fence is similar to "C", and the number of intersections of the ray and the polygon made from N1 and N3, respectively, is 2, so that neither N1 nor N3 is within the area of the target fence; the number of intersections of the ray from N2 and the polygon is 1, so the N2 point is within the area of the target fence.
In another embodiment, the present application provides another fence determination method comprising the steps of implementing the fence determination in the most detail:
and step 1, encoding each fence to obtain fence codes of each fence.
Step 2, obtaining point location information of a plurality of fences of each fence; for each fence, acquiring a minimum circumscribed matrix of a polygon corresponding to the fence, and acquiring vertex information of the fence according to the minimum circumscribed matrix; and taking the point position information of a plurality of fences and the vertex information of each fence as fence information of each fence.
And 3, storing each fence code and each fence information into a fence information database in a one-to-one correspondence manner.
And step 4, receiving the position information and the target fence code sent by the positioning equipment.
And 5, inquiring a fence information database according to the target fence codes to obtain target vertex information and point position information of a plurality of target fences so as to determine the target fences.
And 6, judging whether the positioning equipment is in the judging area according to the position information and the target vertex information.
Step 7, if yes, a ray is led out from the coordinate point corresponding to the position information to any direction intersected with the polygon formed by the point location information of the plurality of target fences; and judging whether the positioning equipment is in the area of the target fence or not according to the intersection number of the rays and the polygon formed by the point position information of the plurality of target fences.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiments of the present application also provide a fence determination device for implementing the above-mentioned fence determination method. The implementation of the solution provided by the device is similar to that described in the above method, so the specific limitation in the embodiments of the fence determination device or devices provided below may be referred to the limitation of the fence determination method hereinabove, and will not be repeated here.
In one exemplary embodiment, as shown in fig. 9, there is provided a fence determining apparatus, the fence determining apparatus 900 including: a receiving module 901, a determining module 902 and a deciding module 903, wherein:
and the receiving module 901 is used for receiving the position information and the target fence code sent by the positioning equipment.
A determining module 902 is configured to determine a target fence from a plurality of fences according to a target fence code.
A determining module 903, configured to determine whether the positioning device is in the area of the target fence according to the location information.
In one embodiment, the device further comprises a coding module, an acquisition module and a storage module, wherein the coding module is used for coding each fence to obtain a fence code of each fence; the acquisition module is used for acquiring fence information of each fence; and the storage module is used for storing each fence code and each fence information into the fence information database in a one-to-one correspondence manner.
In one embodiment, the acquiring module is specifically configured to acquire a plurality of rail point location information of each rail; for each fence, acquiring a minimum circumscribed matrix of a polygon corresponding to the fence, and acquiring vertex information of the fence according to the minimum circumscribed matrix; and taking the point position information of a plurality of fences and the vertex information of each fence as fence information of each fence.
In one embodiment, the determining module 902 is specifically configured to query a fence information database according to the target fence code, to obtain the target vertex information and the plurality of target fence point location information, so as to determine the target fence.
In one embodiment, the determining module 903 is specifically configured to determine whether the positioning device is in the determinable region according to the location information and the target vertex information; if so, determining whether the positioning equipment is in the area of the target fence or not through a ray passing algorithm according to the position information and the point position information of the plurality of target fences.
In one embodiment, the position information includes a coordinate point, and the determining module 903 is specifically configured to draw a ray from the coordinate point to any direction intersecting a polygon formed by a plurality of pieces of target fence point location information; and judging whether the positioning equipment is in the area of the target fence or not according to the intersection number of the rays and the polygon formed by the point position information of the plurality of target fences.
Each of the modules in the above fence determination device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, and the internal structure thereof may be as shown in fig. 10. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data such as fence codes, fence information and the like. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a fence determination method.
It will be appreciated by those skilled in the art that the structure shown in fig. 10 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one exemplary embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
and receiving the position information and the target fence code sent by the positioning equipment.
A target fence is determined from the plurality of fences based on the target fence code.
And judging whether the positioning equipment is in the area of the target fence according to the position information.
In one embodiment, the processor when executing the computer program further performs the steps of: encoding each fence to obtain fence codes of each fence; acquiring fence information of each fence; and storing each fence code and each fence information into a fence information database in a one-to-one correspondence manner.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring point location information of a plurality of fences of each fence; for each fence, acquiring a minimum circumscribed matrix of a polygon corresponding to the fence, and acquiring vertex information of the fence according to the minimum circumscribed matrix; and taking the point position information of a plurality of fences and the vertex information of each fence as fence information of each fence.
In one embodiment, the processor when executing the computer program further performs the steps of: inquiring a fence information database according to the target fence codes to obtain target vertex information and a plurality of target fence point position information so as to determine the target fence.
In one embodiment, the processor when executing the computer program further performs the steps of: judging whether the positioning equipment is in a judging area or not according to the position information and the target vertex information; if so, determining whether the positioning equipment is in the area of the target fence or not through a ray passing algorithm according to the position information and the point position information of the plurality of target fences.
In one embodiment, the location information includes coordinate points, and the processor when executing the computer program further performs the steps of: a ray is led out from the coordinate point to any direction intersecting with a polygon formed by a plurality of target fence point position information; and judging whether the positioning equipment is in the area of the target fence or not according to the intersection number of the rays and the polygon formed by the point position information of the plurality of target fences.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
and receiving the position information and the target fence code sent by the positioning equipment.
A target fence is determined from the plurality of fences based on the target fence code.
And judging whether the positioning equipment is in the area of the target fence according to the position information.
In one embodiment, the computer program when executed by the processor further performs the steps of: encoding each fence to obtain fence codes of each fence; acquiring fence information of each fence; and storing each fence code and each fence information into a fence information database in a one-to-one correspondence manner.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring point location information of a plurality of fences of each fence; for each fence, acquiring a minimum circumscribed matrix of a polygon corresponding to the fence, and acquiring vertex information of the fence according to the minimum circumscribed matrix; and taking the point position information of a plurality of fences and the vertex information of each fence as fence information of each fence.
In one embodiment, the computer program when executed by the processor further performs the steps of: inquiring a fence information database according to the target fence codes to obtain target vertex information and a plurality of target fence point position information so as to determine the target fence.
In one embodiment, the computer program when executed by the processor further performs the steps of: judging whether the positioning equipment is in a judging area or not according to the position information and the target vertex information; if so, determining whether the positioning equipment is in the area of the target fence or not through a ray passing algorithm according to the position information and the point position information of the plurality of target fences.
In one embodiment, the location information includes coordinate points, and the computer program when executed by the processor further performs the steps of: a ray is led out from the coordinate point to any direction intersecting with a polygon formed by a plurality of target fence point position information; and judging whether the positioning equipment is in the area of the target fence or not according to the intersection number of the rays and the polygon formed by the point position information of the plurality of target fences.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
and receiving the position information and the target fence code sent by the positioning equipment.
A target fence is determined from the plurality of fences based on the target fence code.
And judging whether the positioning equipment is in the area of the target fence according to the position information.
In one embodiment, the computer program when executed by the processor further performs the steps of: encoding each fence to obtain fence codes of each fence; acquiring fence information of each fence; and storing each fence code and each fence information into a fence information database in a one-to-one correspondence manner.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring point location information of a plurality of fences of each fence; for each fence, acquiring a minimum circumscribed matrix of a polygon corresponding to the fence, and acquiring vertex information of the fence according to the minimum circumscribed matrix; and taking the point position information of a plurality of fences and the vertex information of each fence as fence information of each fence.
In one embodiment, the computer program when executed by the processor further performs the steps of: inquiring a fence information database according to the target fence codes to obtain target vertex information and a plurality of target fence point position information so as to determine the target fence.
In one embodiment, the computer program when executed by the processor further performs the steps of: judging whether the positioning equipment is in a judging area or not according to the position information and the target vertex information; if so, determining whether the positioning equipment is in the area of the target fence or not through a ray passing algorithm according to the position information and the point position information of the plurality of target fences.
In one embodiment, the location information includes coordinate points, and the computer program when executed by the processor further performs the steps of: a ray is led out from the coordinate point to any direction intersecting with a polygon formed by a plurality of target fence point position information; and judging whether the positioning equipment is in the area of the target fence or not according to the intersection number of the rays and the polygon formed by the point position information of the plurality of target fences.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A fence determination method, the method comprising:
receiving position information and a target fence code sent by positioning equipment;
determining a target fence from a plurality of fences according to the target fence code;
and judging whether the positioning equipment is in the area of the target fence according to the position information.
2. The method according to claim 1, wherein the method further comprises:
encoding each fence to obtain fence codes of each fence;
acquiring fence information of each fence;
and storing each fence code and each fence information into a fence information database in a one-to-one correspondence manner.
3. The method of claim 2, wherein said obtaining fence information for each of said fences comprises:
acquiring a plurality of fence point location information of each fence;
for each fence, acquiring a minimum circumscribed matrix of a polygon corresponding to the fence, and acquiring vertex information of the fence according to the minimum circumscribed matrix;
and taking the point position information of a plurality of fences and the vertex information of each fence as fence information of each fence.
4. The method of claim 3, wherein said determining a target fence from a plurality of fences based on said target fence code comprises:
inquiring the fence information database according to the target fence codes to obtain target vertex information and a plurality of target fence point position information so as to determine the target fence.
5. The method of claim 4, wherein said determining from said location information whether said positioning device is within an area of said target pen comprises:
judging whether the positioning equipment is in a judging area or not according to the position information and the target vertex information;
if yes, determining whether the positioning equipment is in the area of the target fence or not through a ray passing algorithm according to the position information and the point position information of the plurality of target fences.
6. The method of claim 5, wherein the location information includes coordinate points, and wherein determining whether the positioning device is within the area of the target fence by a ray-passing algorithm based on the location information, the plurality of target fence point location information, comprises:
a ray is led out from the coordinate point to any direction intersecting with a polygon formed by the point location information of the plurality of target fences;
and judging whether the positioning equipment is in the area of the target fence or not according to the number of intersection points of the ray and the polygon formed by the point location information of the plurality of target fences.
7. A pen decision device, the device comprising:
the receiving module is used for receiving the position information and the target fence code sent by the positioning equipment;
a determining module for determining a target fence from a plurality of fences according to the target fence code;
and the judging module is used for judging whether the positioning equipment is in the area of the target fence according to the position information.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311264399.XA 2023-09-27 2023-09-27 Fence determination method, apparatus, computer device, storage medium, and program product Pending CN117319932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311264399.XA CN117319932A (en) 2023-09-27 2023-09-27 Fence determination method, apparatus, computer device, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311264399.XA CN117319932A (en) 2023-09-27 2023-09-27 Fence determination method, apparatus, computer device, storage medium, and program product

Publications (1)

Publication Number Publication Date
CN117319932A true CN117319932A (en) 2023-12-29

Family

ID=89249413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311264399.XA Pending CN117319932A (en) 2023-09-27 2023-09-27 Fence determination method, apparatus, computer device, storage medium, and program product

Country Status (1)

Country Link
CN (1) CN117319932A (en)

Similar Documents

Publication Publication Date Title
CN110633262B (en) Spark-based map intersection area calculation method and system
US10893379B2 (en) System and method for determining whether an object belongs to a target geo-fence
CN108229740B (en) Method and device for determining business circle boundary, server and storage medium
Liu et al. Fast computation of Tukey trimmed regions and median in dimension p> 2
US10810235B1 (en) Efficient region identification using hierarchical geocoded information
CN110909093A (en) Method and device for constructing intelligent landmark control network
CN111104457A (en) Massive space-time data management method based on distributed database
CN114022648A (en) Space analysis method and system based on Beidou grid code and three-dimensional engine
CN114637912B (en) Friend recommendation method and device based on high-coverage community discovery in location social network
Teng et al. IDEAL: a vector-raster hybrid model for efficient spatial queries over complex polygons
Zhou et al. Parallel identification and filling of depressions in raster digital elevation models
Wang et al. Dynamic skylines considering range queries
Liu A faster algorithm for the constrained minimum covering circle problem to expedite solving p‐center problems in an irregularly shaped area with holes
CN117319932A (en) Fence determination method, apparatus, computer device, storage medium, and program product
CN117056626A (en) Map preview method and device
CN114116948B (en) Geographical vector data space buffer area analysis method, device, equipment and medium
CN116401238A (en) Deviation monitoring method, apparatus, device, storage medium and program product
CN116304251A (en) Label processing method, device, computer equipment and storage medium
CN111506576B (en) Land block coding method and device based on regional quadtree
CN107894992A (en) A kind of GIS dot buffer zones analysis method and system
Ningsheng et al. An address regional tessellation method for spatial subdivision and geocoding in digital earth system
CN113360586A (en) Address aggregation degree query method, device and equipment and computer readable storage medium
Li et al. Spatial Data Science
CN117312471B (en) Sea-land attribute judging method and device for massive position points
Yang et al. Workload-based ordering of multi-dimensional 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