Geographic fence detection method, device and electronic device
Detection of polygonal geofences through vector method solves the huge computational problem in the existing technology and realizes efficient and low-power geofence detection.
Patent Information
- Application Number
- CN202210931542.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-04
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2042-08-04
AI Technical Summary
The existing geofence detection methods are computationally expensive, resulting in inefficiency and increased power consumption.
The vector method is used to detect polygonal geofences. By obtaining the current position point of the electronic device and the normal vector of the target geofence, the dot product of the position point and the normal vector is calculated to determine the position relationship between the position point and the geofence.
It effectively reduces the calculation complexity of fence detection, greatly reduces the calculation amount, improves detection efficiency, and reduces equipment power consumption.
Smart Images

Figure CN115209349B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a geographic fence detection method, device and electronic device. Background Art
[0002] Geofencing is a virtual fence that creates a virtual geographic boundary. When an electronic device enters or leaves a specific geographic area, or moves within the area, it can receive automatic notifications such as message reminders.
[0003] In actual application scenarios, the boundaries of real geographic points of interest (POI) are often closed irregular polygons composed of some discrete location points and their corresponding connecting lines. In the prior art, the crossing number method is usually used to determine whether a location point is inside a polygonal geographic fence. The principle is to count the number of times a ray starting from point P crosses the polygon boundary. If it is an odd number, point P is inside the polygon, and if it is an even number, it is outside the polygon.
[0004] However, this method involves determining whether a ray intersects a line segment, which involves the inversion of a matrix, and the amount of calculation required for this operation is relatively large. In addition, at least two rays starting from point P and all the boundaries of the polygon must be calculated one by one, which further increases the amount of calculation. It can be seen that the existing geo-fence detection method has the problem of huge amount of calculation. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a geo-fence detection method, device and electronic device that can solve the problem of huge computational complexity of existing geo-fence detection methods.
[0006] In a first aspect, an embodiment of the present application provides a geo-fence detection method, the method comprising:
[0007] Obtaining a first location point where the electronic device is currently located;
[0008] Determine respectively the normal vectors of the target geofence, wherein the target geofence is formed by connecting N boundary vertices in a preset order, the normal vector is perpendicular to the edge vector of the target geofence, the edge vector is a vector formed by connecting two adjacent boundary vertices of the target geofence, and N is an integer greater than 2;
[0009] The positional relationship between the first position point and the target geofence is determined based on the dot product of the vector formed by connecting the first position point and the target boundary vertex and the target normal vector, wherein the target boundary vertex is part or all of the boundary vertices in the target geofence, and the target normal vector is a normal vector perpendicular to the edge vector at the target boundary vertex.
[0010] In a second aspect, an embodiment of the present application provides a geo-fence detection device, including:
[0011] An acquisition module, used to acquire a first location point where the electronic device is currently located;
[0012] A first determination module is used to respectively determine each normal vector of a target geofence, wherein the target geofence is formed by connecting N boundary vertices in a preset order, the normal vector is perpendicular to an edge vector of the target geofence, the edge vector is a vector formed by connecting two adjacent boundary vertices of the target geofence, and N is an integer greater than 2;
[0013] The second determination module is used to determine the positional relationship between the first position point and the target geofence based on the dot product of the vector formed by connecting the first position point and the target boundary vertex and the target normal vector, wherein the target boundary vertex is part or all of the boundary vertices in the target geofence, and the target normal vector is a normal vector perpendicular to the edge vector at the target boundary vertex.
[0014] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the geo-fence detection method as described in the first aspect are implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the geo-fence detection method as described in the first aspect are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the geo-fence detection method as described in the first aspect.
[0017] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the geo-fence detection method as described in the first aspect.
[0018] In an embodiment of the present application, the first position point where the electronic device is currently located is obtained; each normal vector of the target geofence is determined respectively, wherein the target geofence is formed by connecting N boundary vertices in a preset order, the normal vector is perpendicular to the edge vector of the target geofence, the edge vector is a vector formed by connecting two adjacent boundary vertices of the target geofence, and N is an integer greater than 2; according to the dot product of the vector formed by connecting the first position point with the target boundary vertex and the target normal vector, the positional relationship between the first position point and the target geofence is determined, wherein the target boundary vertex is part or all of the boundary vertices in the target geofence, and the target normal vector is a normal vector perpendicular to the edge vector at the target boundary vertex. In this way, the geofence detection of the electronic device is performed by the vector method, which avoids the complex calculations involved in the traditional cross number method, and only uses simple four arithmetic operations, thereby effectively reducing the computational complexity of fence detection, greatly reducing the amount of calculation, and improving detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a schematic diagram of a polygonal geo-fence of a POI provided in an embodiment of the present application;
[0020] Figure 2 It is a schematic diagram of using the crossing number method for geo-fence detection in the prior art;
[0021] Figure 3 It is a schematic diagram of splitting a polygonal geo-fence into multiple circular fences in the prior art;
[0022] Figure 4 It is one of the flow charts of the geo-fence detection method provided in the embodiment of the present application;
[0023] Figure 5 is a schematic diagram of edge vectors and corresponding normal vectors of a polygonal geo-fence provided in an embodiment of the present application;
[0024] Figure 6 is a flow chart of an algorithm for polygonal geo-fence detection using a vector method provided in an embodiment of the present application;
[0025] Figure 7 This is the second flowchart of the geo-fence detection method provided in the embodiment of the present application;
[0026] Figure 8 It is a schematic diagram of dividing the fence area by the motion direction vector and the corresponding normal line in the polygonal geo-fence provided in an embodiment of the present application;
[0027] Fig. 9 It is a schematic diagram of the rotation of the motion direction vector and the normal coordinate provided in an embodiment of the present application;
[0028] Fig.10 This is the third flow chart of the geo-fence detection method provided in the embodiment of the present application;
[0029] Fig.11 It is a schematic diagram of the distances of a point in various directions within a polygonal geographic fence provided by an embodiment of the present application;
[0030] Fig.12 This is the fourth flow chart of the geo-fence detection method provided in the embodiment of the present application;
[0031] Fig.13 is a structural schematic diagram of a geo-fence detection device provided in an embodiment of the present application;
[0032] Fig.14 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0033] Fig.15 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0035] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0036] In order to make the embodiments of the present application clearer, the relevant technical knowledge involved in the present application is first introduced as follows:
[0037] Wireless Fidelity (WiFi) is a wireless LAN access technology and one of the ways for mobile phones and other electronic devices to connect to the network wirelessly;
[0038] Access Point (AP) is the core device of the wireless local area network built by WiFi. It is used to bridge the local area network and the Internet. All WiFi devices must be connected to AP devices to access the Internet. In daily life, wireless routers and gateways are common AP devices. Smartphones can also become AP devices by turning on WiFi hotspots.
[0039] The Global Positioning System (GPS) is a type of satellite positioning system. Currently, smartphones are generally integrated with GPS chip modules, which can receive and interpret the signals broadcast by GPS satellites to determine the location;
[0040] Point of Interest (POI), in geographic information system, a point of interest represents a geographical unit, such as a store, a house, a bus stop, etc.
[0041] Geographical fence detection is an important function integrated into the framework layer of intelligent electronic devices. It is a bridge that converts the underlying geographic location information into the user's space and context. It plays an important supporting role in user context perception, user profiling, important information reminders and other services.
[0042] At present, most geofences are designed as circular fences, that is, the boundary of the geofence is a circle, which consists of the center position coordinates plus the radius. The advantage of circular fences is simplicity, especially the fence detection algorithm, which only needs to determine whether the distance between the current positioning position and the center position of the fence is less than the fence radius to determine whether it has entered the fence. However, circular fences also have their inherent disadvantages. The main disadvantage is that they cannot coincide with the boundaries of real geographic POIs, resulting in frequent misjudgments or missed judgments in real application scenarios, affecting the accuracy of geofence detection. In actual application scenarios, the boundaries of real geographic POIs are often a closed irregular polygon composed of some discrete location points and their corresponding connecting lines. In order to improve the accuracy of geofence detection itself and better support related upper-layer businesses, the detection of polygonal geofences becomes very important.
[0043] A polygonal geofence consists of an array of location points {P n}, {P n}={P1,P2,…,P N}, where P1, P2…P N They all represent the vertices of the polygon boundary. They are arranged in a certain order (usually in a counterclockwise order). The first and last items of this sequence represent the same point, that is, P1 = P NIn this way, the series of discrete point sets forms a closed polygon, and the edge P formed by two adjacent points i P i+1 (i=1,2,…,N-1) represents an edge of a polygonal geo-fence. A polygonal geo-fence 10 of an actual supermarket POI can be as follows: Figure 1 shown.
[0044] At present, the main method for determining whether a point is inside a polygonal geofence is the Crossing Number method, also known as the parity check method. Figure 2 As shown, it determines the number of times the ray starting from point P crosses the polygonal geofence boundary. If it is an odd number, point P is determined to be inside the polygonal geofence; if it is an even number, point P is determined to be outside the polygonal geofence.
[0045] However, the technology of using the intersection number method to determine whether a point is inside a polygonal geo-fence has the following defects:
[0046] 1) Huge amount of calculation: The intersection number method involves determining whether a ray and a line segment intersect, and determining this problem involves the inversion of a matrix, which requires a large amount of calculation. In addition, at least two rays starting from point P and all boundaries of the polygonal geofence must be calculated one by one, which further increases the amount of calculation. For services such as geofences, due to privacy protection restrictions, fence detection is basically performed on the terminal side, which means that this calculation must also be performed on the terminal side, and the huge amount of calculation is bound to cause a large power consumption overhead for the terminal;
[0047] 2) Unstable calculation results: As mentioned above, the intersection number method involves the inversion of the matrix to determine whether the ray and the line segment intersect. Once the matrix is an ill-conditioned matrix with a large condition number, a small disturbance in the data will cause a huge fluctuation in the calculation results, leading to errors in the calculation results.
[0048] 3) Not applicable to some special cases: For example, if the ray starting from point P coincides with an edge of the polygon boundary, then the conclusion of the intersection number method will no longer apply. However, in real application scenarios, this special case cannot be completely avoided.
[0049] In view of this, the traditional intersection number method has limited application in actual polygonal geo-fence detection, and developers need to adopt optimized alternative algorithms for detection.
[0050] The improved replacement algorithm of the traditional intersection number method usually adopts the splitting approximation method to split a complete polygonal geofence into several simple geofences for approximate replacement, thereby reducing the computational complexity of the geofence detection algorithm. Figure 3 As shown, a complete polygonal geo-fence is generated into multiple circular geo-fences to cover the geographical area defined by the polygonal geo-fence, and the multiple circular geo-fences are monitored to detect the current location of the user device that enters the boundary of any of the circular geo-fences.
[0051] However, Figure 3 The technical solution shown also has its inherent defects, specifically the following points:
[0052] 1) Splitting a polygonal geofence into multiple circular fences also requires a large amount of calculation. The technical solution is to use internal interpolation to select the center point of the circular fence and calculate the corresponding radius, which also involves a relatively complex algorithm. In addition, the number of circular fences split out is proportional to the area of the polygonal fence. This increases the amount of calculation for polygonal geofences that occupy a large area but have simpler boundaries (or the number of vertices on the polygonal fence boundary is small), which makes it more costly than it is worth;
[0053] 2) Using a circular fence to simulate a polygonal geofence still cannot completely fit the accurate boundary of the polygonal geofence. Although the radius of the circular fence on the fence boundary is usually small, there is still a certain probability that it will run outside the boundary of the polygonal geofence, which will also affect the accuracy of the polygonal geofence to a certain extent.
[0054] In order to solve the technical problems existing in the above technical solutions, the present application designs a method for detecting polygonal geo-fences, specifically, a vector calculation method is used to determine whether point P is located inside the polygonal geo-fence. The vector method for detecting polygonal geo-fences avoids the complex calculations involved in the traditional intersection number method, and can effectively reduce the computational complexity of fence detection, improve the efficiency of detection, and reduce equipment power consumption. In addition, the vector method for polygonal fence detection is calculated and judged strictly according to the actual boundary of the polygon, thereby avoiding the problem of inconsistency between the fence boundary and the actual polygonal fence boundary in the process of approximate simulation using a circular fence or a rectangular fence in the split approximation method.
[0055] The following is a detailed description of the geo-fence detection method provided in the embodiment of the present application through specific embodiments and their application scenarios in combination with the accompanying drawings.
[0056] See also Figure 4 , Figure 4 A flowchart of a geo-fence detection method provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the method comprises the following steps:
[0057] Step 401: Obtain a first location point where the electronic device is currently located.
[0058] In an embodiment of the present application, when it is necessary to perform geo-fence detection on an electronic device to determine whether the user of the electronic device has entered the target geo-fence, the current location information of the electronic device can be obtained, such as by locating the position of the electronic device to obtain the location point of the electronic device at the current moment, that is, the first location point.
[0059] Step 402: determine each normal vector of the target geofence respectively, wherein the target geofence is formed by connecting N boundary vertices in a preset order, the normal vector is perpendicular to the edge vector of the target geofence, the edge vector is a vector formed by connecting two adjacent boundary vertices of the target geofence, and N is an integer greater than 2.
[0060] The target geofence may be a geofence of a certain POI, for example, a geofence of a certain POI near the electronic device. The target geofence may be a polygonal geofence, including N boundary vertices, which is a closed polygonal area formed by connecting the N boundary vertices in a certain order. For example, the N boundary vertices are P1, P2, P N , the N boundary vertices can be connected in positive order, that is, P1 is connected to P2, P2 is connected to P3, ... P N-1 With P N Connect, P N Alternatively, the N boundary vertices may be connected in reverse order, that is, P1 and P N Connect, P N With P N-1 Connect, …P3 is connected to P2, and P2 is connected to P1, thereby obtaining a closed polygonal geo-fence.
[0061] The edge vector of the target geofence may refer to a vector formed by connecting two adjacent boundary vertices of the target geofence, for example, Figure 5 As shown, two adjacent boundary vertices can be connected in a counterclockwise direction to form an edge vector: Of course, two adjacent boundary vertices can also be connected in a clockwise direction to form an edge vector
[0062] Each normal vector of the target geofence may refer to a vector perpendicular to each edge vector of the target geofence, and the direction of each normal vector may be obtained by rotating the direction of the corresponding edge vector counterclockwise or clockwise by 90°. Therefore, the above-mentioned determination of each normal vector of the target geofence may refer to determining each edge vector of the target geofence, and performing coordinate transformation on each edge vector according to a coordinate transformation formula, so as to obtain the corresponding normal vectors, wherein the coordinate transformation formula is determined based on the rotation angle, such as a rotation angle of 90° for a counterclockwise rotation of 90°, and a rotation angle of -90° for a clockwise rotation of 90°.
[0063] Step 403, determine the positional relationship between the first position point and the target geofence based on the dot product of the vector formed by connecting the first position point and the target boundary vertex and the target normal vector, wherein the target boundary vertex is part or all of the boundary vertices in the target geofence, and the target normal vector is a normal vector perpendicular to the edge vector at the target boundary vertex.
[0064] In an embodiment of the present application, the positional relationship between the first position point and the target geofence can be determined based on the angle between the target vector formed by connecting the first position point and any boundary vertex in the target geofence and the normal vector corresponding to the edge vector where the boundary vertex is located, that is, whether the first position point is located inside or outside the target geofence can be determined. For example, if the normal vector points to the inside of the target geofence, the target vector is the vector from the boundary vertex pointing to the first position point. Then, for the position point located inside the target geofence, the angle between the target vector and the normal vector is an acute angle, and for the position point located outside the target geofence, the angle between the target vector and the normal vector is an obtuse angle; or, if the normal vector points to the outside of the target geofence, the target vector is the vector from the boundary vertex pointing to the first position point. Then, for the position point located inside the target geofence, the angle between the target vector and the normal vector is an obtuse angle, and for the position point located outside the target geofence, the angle between the target vector and the normal vector is an acute angle. In order to determine whether the angle between two vectors is an acute angle, it can be determined based on whether the dot product of the two vectors is greater than 0. If the dot product is greater than 0, it can be determined that the angle between the two vectors is an acute angle, otherwise it is an obtuse angle.
[0065] Therefore, in an embodiment of the present application, based on the above principle, according to the dot product of the vector formed by the connection between the first position point and the target boundary vertex and the target normal vector, it can be determined whether the angle between the vector formed by the connection between the first position point and the target boundary vertex and the target normal vector is an acute angle, and then combined with the direction of the vector formed by the connection between the first position point and the target boundary vertex and the direction of the target normal vector, the positional relationship between the first position point and the target geographic fence can be determined, that is, whether the first position point is located inside or outside the target geographic fence.
[0066] Among them, the target boundary vertex may include all boundary vertices of the target geofence, or may only include some boundary vertices of the target geofence, that is, in one embodiment, the positional relationship between the first position point and the target geofence may be determined based on the dot product of the vector formed by connecting the first position point with each boundary vertex of the target geofence and the target normal vector. This embodiment is applicable to the first determination of whether the electronic device has entered the target geofence; in another embodiment, in order to save the amount of calculation, the positional relationship between the first position point and the target geofence may be determined based on the dot product of the vector formed by connecting the first position point with the target boundary vertex (such as the boundary vertex on the same side as the first position point) of the target geofence that meets specific conditions and the target normal vector. This embodiment is applicable to the case where the electronic device has entered the target geofence and subsequently determines whether the electronic device is still inside the target geofence based on real-time positioning. The edge vector at the target boundary vertex may refer to an edge vector starting from the target boundary vertex.
[0067] Optionally, the normal vector points to the interior of the target geo-fence;
[0068] The step 403 includes:
[0069] When the dot product of the first vector and the target normal vector is greater than 0, determining that the first location point is located inside the target geo-fence, wherein the first vector is a vector pointing from the target boundary vertex to the first location point;
[0070] When the dot product of the first vector and the target normal vector is less than 0, it is determined that the first location point is outside the target geo-fence.
[0071] In one embodiment, when determining the normal vectors corresponding to each edge vector of the target geofence, it can be ensured that each normal vector points to the inside of the target geofence. Specifically, when each edge vector of the target geofence is formed by connecting two adjacent boundary vertices in a counterclockwise direction, each edge vector can be rotated 90° counterclockwise to obtain the corresponding normal vectors, so that each normal vector points to the inside of the target geofence; or, when each edge vector of the target geofence is formed by connecting two adjacent boundary vertices in a clockwise direction, each edge vector can be rotated 90° clockwise to obtain the corresponding normal vectors, so that each normal vector points to the inside of the target geofence.
[0072] The vector formed by connecting the first position point and the target boundary vertex can be a first vector pointing from the target boundary vertex to the first position point. In this way, if the first position point is located inside the target geofence, the angle between the first vector and the target normal vector is an acute angle, that is, less than 90°. Correspondingly, the dot product of the first vector and the target normal vector is greater than 0. If the first position point is located outside the target geofence, the angle between the first vector and the target normal vector is an obtuse angle, that is, greater than 90°. Correspondingly, the dot product of the first vector and the target normal vector is less than 0.
[0073] Therefore, in this implementation, by calculating the dot product of the first vector and the target normal vector and comparing it with 0, it can be determined whether the first location point is located inside or outside the target geofence. Specifically, when the dot product of the first vector and the target normal vector is greater than 0, it can be determined that the first location point is located inside the target geofence. When the dot product of the first vector and the target normal vector is less than 0, it can be determined that the first location point is located outside the target geofence. In addition, it should be noted that in actual scenarios, the electronic device may be located at the boundary of the target geofence, that is, the angle between the first vector and the target normal vector is a right angle, that is, equal to 90°. Therefore, when the dot product of the first vector and the target normal vector is equal to 0, it can be determined that the first location point is located at the boundary of the target geofence.
[0074] Thus, in this implementation, when all normal vectors of the target geofence are pointed to the inside of the target geofence, the positional relationship between the current location of the electronic device and the target geofence can be quickly determined by comparing whether the dot product of the vector pointing from the target boundary vertex to the first location point and the target normal vector is greater than 0. This method requires little calculation and produces accurate calculation results.
[0075] The core invention of this application is to use the vector method to perform polygonal geographic fence detection. The algorithm principle of using the vector method to determine whether a point P is located inside a polygonal geographic fence is introduced in detail below.
[0076] The following prerequisites must be met to determine whether point P is inside the polygonal geofence using the vector method:
[0077] 1) The boundary vertex array of the polygonal geo-fence {P n}={P1,P2,…,P N} are arranged in a certain order. For the convenience of description, the technical solution of the present application may stipulate that the boundary vertex sequence of the polygonal geographic fence is arranged in a counterclockwise direction; if it is arranged in a clockwise direction, the same function can be achieved through equivalent transformation;
[0078] 2) The first and last entries of the boundary vertex sequence of the polygonal geofence are the same, that is, P1 = P N , which means that the shape of the polygonal geofence is closed.
[0079] In actual application scenarios, the geo-fence data of POIs basically meet the above two conditions. The coordinates of each item in the vertex sequence of the polygonal geo-fence boundary can be set as P i =(x i ,y i ), i = 1, 2, 3…, N, then the edge vector composed of two adjacent boundary vertices can be recorded as Edge Vector The corresponding normal vector can be written as Since the boundary vertices of the polygonal geofence are arranged in counterclockwise order, it can be considered that the normal vector It is obtained by rotating the coordinate system of the boundary vertex data by 90° counterclockwise. The coordinate transformation formula is:
[0080]
[0081] Among them, (x′, y′) is the coordinate value in the new coordinate system after the coordinate rotation, and θ is the rotation angle. Here, the rotation angle corresponding to the normal vector is θ=π / 2. Substituting into the above coordinate transformation formula, we can get the edge vector The corresponding normal vector for:
[0082]
[0083] The edge vectors and corresponding normal vectors of a polygonal geofence can be expressed as Figure 5 As shown, from Figure 5It can be seen that the normal vectors corresponding to all edge vectors of the polygonal geofence point to the inside of the polygonal geofence.
[0084] For any point P = (x, y), if point P is inside the polygonal geofence, then point P and any boundary vertex P i The edge vector formed by (i=1,2,…,N) With the boundary vertex P i The normal vector corresponding to the edge vector The angle between the edge vector and the point P is an acute angle, that is, less than 90°; conversely, if point P is outside the polygonal geofence, then the edge vector With the vertex P i The normal vector corresponding to the edge vector The angle between the two is an obtuse angle, that is, greater than 90°. If the angle is equal to 90°, then point P is considered to be on the boundary of the polygonal geofence. According to the dot product formula of the vector:
[0085]
[0086] It can be seen that when the edge vector With normal vector When the angle θ is acute, the dot product d>0; when the edge vector With normal vector When the angle θ between them is an obtuse angle, the dot product d<0. The expression and normal vector of The expression is:
[0087]
[0088] And the expression of vector dot product, we can get:
[0089]
[0090] Thus, by solving the edge vector With normal vector The dot product of can determine whether point P is inside the polygonal geofence. The whole process of vector method calculation only uses simple four arithmetic operations, without involving complex operation modes, which greatly reduces the amount of calculation and improves the performance of polygonal geofence detection.
[0091] In the embodiment of the present application, the calculation flow chart of using the vector method to determine whether point P is located inside the polygonal geographic fence can be as follows: Figure 6 shown.
[0092] Optionally, after step 401 and before step 403, the method further includes:
[0093] Determine a bounding rectangular area of the target geo-fence, wherein all boundary vertices of the target geo-fence are within the bounding rectangular area;
[0094] Determine a positional relationship between the first position point and the circumscribed rectangular area;
[0095] The step 403 includes:
[0096] When it is determined that the first location point is not outside the circumscribed rectangular area, the positional relationship between the first location point and the target geographic fence is determined based on the dot product of the line vector between the first location point and the target boundary vertex and the target normal vector.
[0097] In one implementation, considering that the polygonal geofence detection algorithm is relatively complex, if all positioning points are directly subjected to polygonal geofence detection using the aforementioned vector method, unnecessary computing power and power consumption will be consumed. Therefore, if the positioning point is far from the polygonal geofence, it is not necessary to directly use the polygonal geofence detection algorithm for detection. In this implementation, the polygonal geofence can be used for determination first. If the positioning point is outside the polygonal geofence, there is no need to perform polygonal geofence detection, and the positioning point can be directly determined to be outside the polygonal geofence.
[0098] Specifically, the circumscribed rectangular area of the target geo-fence can be first determined based on several outermost boundary vertices of the target geo-fence. For example, the maximum and minimum longitude and latitude of each location point in the boundary vertex series of the polygonal geo-fence can be calculated, and the maximum and minimum longitude and latitude can be taken. The boundary of the circumscribed rectangle is constructed based on these four points.
[0099] After obtaining the first position point where the electronic device is currently located, the positional relationship between the first position point and the circumscribed rectangular area can be determined first, that is, whether the first position point is located outside the circumscribed rectangular area. If the first position point is located outside the circumscribed rectangular area, it can be directly determined that the first position point is located outside the target geographic fence. If the first position point is not located outside the circumscribed rectangular area, such as the first position point is located inside the circumscribed rectangular area or at the boundary of the circumscribed rectangular area, the subsequent step 403 can be continued, that is, the positional relationship between the first position point and the target geographic fence is further determined based on the dot product of the line vector between the first position point and the target boundary vertex and the target normal vector.
[0100] For example, for the current location point P, we can first determine whether point P is outside the circumscribed rectangle of the polygonal geo-fence. If the longitude of point P exceeds the maximum or minimum value of the longitude of the circumscribed rectangle, or the latitude of point P exceeds the maximum or minimum value of the latitude of the circumscribed rectangle, then we can determine that point P is outside the polygonal geo-fence; otherwise, we can determine whether point P is outside the polygonal geo-fence based on the aforementioned vector method.
[0101] It should be noted that if the coordinate system used for the position coordinates of the boundary vertices of the polygonal geofence is a non-geod coordinate system such as GCJ02 or BD09, it is necessary to transform the coordinates of each boundary vertex of the polygonal geofence and convert it into the internationally adopted geocentric coordinate system (World Geodetic System-1984 Coordinate System, WGS84), because only the WGS84 coordinate system is a linear coordinate system and meets the prerequisite for polygonal geofence detection through the vector method. That is, before generating the circumscribed rectangle of the polygonal geofence, the step of transforming the coordinates of the boundary vertices of the polygonal geofence can be performed first. If the vertex coordinates of the polygonal geofence boundary use the WGS84 coordinate system, this step is not necessary. Among them, the conversion of the GCJ02 or BD09 coordinate system to the WGS84 coordinate system can be directly performed through an open source conversion plug-in.
[0102] The flowchart of this embodiment can be shown as Figure 7 As shown, the following steps are included:
[0103] Step 701: Transform the coordinates of the polygonal geo-fence boundary vertices.
[0104] If the vertex coordinates of the polygonal geofence boundary are in the WGS84 coordinate system, ignore this step.
[0105] Step 702: Generate a bounding rectangle of a polygonal geo-fence.
[0106] Step 703: Determine whether point P is outside the circumscribed rectangle.
[0107] If so, it is determined that point P is outside the polygonal geographic fence; otherwise, the process proceeds to step 704 for the next step of determination.
[0108] Step 704: Determine whether point P is outside the polygonal geographic fence based on the vector method.
[0109] For specific identification steps, please refer to Figure 6 .
[0110] In this way, in this implementation, by pre-using the circumscribed rectangular area of the target geographic fence to judge the positioning point, the algorithm for polygonal geographic fence detection can be simplified, the amount of calculation can be reduced, the detection efficiency can be improved, and the power consumption can be reduced.
[0111] Optionally, before step 401, the method further includes:
[0112] When the electronic device is located inside the target geo-fence at a first moment, storing a second location point of the electronic device at the first moment, the first moment being a moment before the current moment;
[0113] After step 401 and before step 403, the method further includes:
[0114] Determine a second vector and a first angle, wherein the second vector is a vector pointing from the second position point to the first position point, and the first angle is an angle between the second vector and the -y axis in a rectangular coordinate system;
[0115] According to the first angle, coordinate transformation is performed on the boundary vertices of the target geo-fence to obtain the ordinate values of the boundary vertices of the target geo-fence in a second coordinate system, wherein the second coordinate system is a coordinate system obtained by rotating the rectangular coordinate system counterclockwise by the first angle;
[0116] The target boundary vertex is determined based on the vertical coordinate value of the boundary vertex of the target geo-fence in the second coordinate system and the vertical coordinate value of the second position point in the second coordinate system, wherein the target boundary vertex is located on the first side of a first normal, the first normal is perpendicular to the second vector, and the first position point is located on the first side of the first normal.
[0117] from Figure 6 As shown in the algorithm flow chart for determining whether point P is inside a polygonal geofence based on the vector method, it can be seen that if point P is inside a polygonal geofence, it is necessary to traverse and calculate all edge vectors and corresponding normal vectors before a conclusion can be drawn. This is still a large amount of calculation for polygonal geofences with complex boundaries and many boundary vertices. Therefore, in one embodiment, Figure 6 On the basis of the illustrated embodiment, edge vectors and corresponding normal vectors that do not need to be calculated are identified, so that there is no need to traverse and calculate all edge vectors and corresponding normal vectors, thereby further reducing the amount of calculation.
[0118] Suppose that at time t0, the user of the electronic device has entered the interior of the polygonal geographical fence, and the position is denoted as P(t0). The next positioning time is set as t1 (t0 < t1), and the positioning position at this time is denoted as P(t1). Now, it is necessary to detect whether the position P(t1) is inside the polygonal geographical fence.
[0119] Denote the vector formed by the positioning positions at the two consecutive times as This vector represents the movement direction of the user from time t0 to time t1, and can be called the movement direction vector. As Figure 8 shown, a straight line L perpendicular to the movement direction vector can be drawn through the point P(t0), which is called the normal line of the movement direction vector. Since the point P(t0) is inside the polygonal geographical fence, this normal line L will divide the entire polygonal geographical fence into two parts. Correspondingly, the vertices on the boundary of the polygonal geographical fence will also be divided into two parts by this normal line; taking the normal line L as the dividing line, some vertices are on the same side of the point P(t1), called the same-side vertices; some vertices are on different sides of the point P(t1), called the different-side vertices (such as the vertices marked with "×" in Figure 8 ).
[0120] As Figure 8 shown, for the different-side vertices, since the point P(t0) is already inside the polygonal geographical fence, it means that the point P(t0) is on the inner side of the polygonal geographical fence compared with these different-side vertices, and the point P(t1) is farther away from the different-side vertices relative to the point P(t0). From the perspective of these different-side vertices, the point P(t1) is more likely to be on the inner side of the polygonal geographical fence. Therefore, in the problem of judging whether the point P(t1) is inside the polygonal geographical fence, these different-side vertices cannot play a judging role. Thus, when using the vector method for detecting the polygonal geographical fence, these different-side vertices and the corresponding edge vectors can be ignored to achieve the purpose of simplifying the calculation.
[0121] Next, discuss how to identify different-side vertices and same-side vertices. Figure 8 What is shown is an intuitive judgment of different-side and same-side vertices from a geometric perspective, rather than the algorithm language for computer recognition. Therefore, in the specific implementation, the method of coordinate transformation can be considered for identification. As Fig. 9 shown, let the included angle between the movement direction vector and the negative half-axis of the y-axis of the plane rectangular coordinate system be It can be known that the included angle between the normal line L corresponding to the movement direction vector and the positive half-axis of the x-axis of the plane rectangular coordinate system is also If the normal line L is used as the x * axis in the new coordinate system after coordinate transformation, it is equivalent to the rotation angle between the old and new coordinate systems being Coordinate system rotation Fig. 9 shown.
[0122] Therefore, the coordinate rotation transformation formula can be used:
[0123]
[0124] Calculate the point P(t0) and all boundary vertices P1 to P 10 The ordinate value (y* axis) in the new coordinate system, record point P(t0) in the new coordinate system y * The coordinate value in the y-axis direction t0 , if P1 to P 10 The ordinate value of a vertex in the new coordinate system is greater than y t0 , it can be judged as a vertex on the opposite side; otherwise, it is judged as a vertex on the same side.
[0125] Based on this, the flowchart of this embodiment can be as follows: Fig.10 As shown, the following steps are included:
[0126] Step 1001: Cache the location point P(t0) inside the polygonal geographic fence.
[0127] Step 1002: The electronic device initiates positioning at time t1 and obtains the positioning position P(t1) at that time.
[0128] The positioning method can be determined according to the specific environment of the target geographic fence. For example, if the geographic fence is outdoors, GPS can be used for positioning; if it is an indoor environment, network positioning can be initiated and positioning can be performed through WiFi or base station signals.
[0129] Step 1003: Calculate the motion direction vector and the corresponding angle.
[0130] Let the motion direction vector be The angle between the motion direction vector and the negative half axis of the y-axis of the rectangular coordinate system can be calculated as:
[0131]
[0132] Step 1004: According to the coordinate conversion formula and the angle Perform coordinate transformation on all vertices of the polygonal geo-fence boundary and calculate the ordinate value y′ under the new coordinates.
[0133] Step 1005: Calculate the ordinate value y of point P(t0) at the new coordinates t0 . Compare y′ with y t0 If y′>y t0 , then the corresponding vertices are determined to be opposite-side vertices; otherwise, the corresponding vertices are determined to be same-side vertices.
[0134] Step 1006: Use the same-side vertex vector method to determine whether point P(t1) is inside the polygonal geo-fence.
[0135] In this way, through this implementation, it is possible to avoid traversing all edge vectors to perform polygonal geo-fence detection, further reducing the amount of calculation.
[0136] Further, the origin of the second coordinate system is the second position point, and the ordinate value of the second position point in the second coordinate system is 0;
[0137] The step 401 includes:
[0138] When the ordinate value of the first boundary vertex in the second coordinate system is less than or equal to 0, determining the first boundary vertex as the target boundary vertex, wherein the first boundary vertex is any boundary vertex in the target geo-fence;
[0139] When the ordinate value of the first boundary vertex in the second coordinate system is greater than 0, it is determined that the first boundary vertex is not the target boundary vertex.
[0140] In one implementation, the second position point at the previous moment can be used as the origin of the rectangular coordinate system, and the rectangular coordinate system is rotated counterclockwise to obtain the transformed second coordinate system, so that the origin of the second coordinate system is the second position point, and the ordinate value of the second position point in the second coordinate system is 0. For example, the position point P(t0) at time t0 can be used as the origin of the new coordinate system after the transformation, so that the ordinate value of P(t0) in the new coordinate system is 0.
[0141] In this way, when judging whether each boundary vertex is a target boundary vertex (i.e., whether it is a same-side vertex) based on the vertical coordinate value of each boundary vertex of the target geographic fence in the second coordinate system and the vertical coordinate value of the second position point in the second coordinate system, it is only necessary to compare the vertical coordinate value of each boundary vertex in the second coordinate system with 0. Specifically, if the vertical coordinate value of a boundary vertex in the second coordinate system is greater than 0, it can be determined that the boundary vertex is a different-side vertex, that is, it is not the target boundary vertex. Conversely, if the vertical coordinate value of a boundary vertex in the second coordinate system is less than or equal to 0, it can be determined that the boundary vertex is a same-side vertex, that is, it is the target boundary vertex.
[0142] Thus, in this implementation, when the second position point is taken as the origin of the second coordinate system and the vertical coordinate value of the second position point in the second coordinate system is 0, it is only necessary to compare whether the vertical coordinate values of each boundary vertex of the target geographic fence in the second coordinate system are greater than 0, so as to quickly determine whether each boundary vertex is the target boundary vertex.
[0143] Optionally, before step 401, the method further includes:
[0144] When the electronic device is located inside the target geo-fence at a second moment, storing a third location point of the electronic device at the second moment, the second moment being a moment before the current moment;
[0145] Generate a spatial environment table according to the distances of the third position point from the boundary of the target geo-fence along the preset M directions, wherein the spatial environment table stores a correspondence between directions and distances, and a preset angle is set between two adjacent directions in the M directions, where M is equal to 360 degrees divided by the preset angle;
[0146] After step 401 and before step 403, the method further includes:
[0147] Determine a first distance and a first direction of the first position point relative to the third position point;
[0148] Querying a second distance corresponding to the first direction from the spatial environment table;
[0149] The step 403 includes:
[0150] When the first distance is greater than the second distance, the positional relationship between the first position point and the target geo-fence is determined based on the dot product of the line vector between the first position point and the target boundary vertex and the target normal vector.
[0151] In actual application scenarios, after a user enters a geo-fence, he or she will usually stay there for a while and will not leave the fence immediately. For example, a user is shopping in a mall. During the shopping period, the user is always inside the polygonal geo-fence corresponding to the mall. If each positioning is performed using the polygonal geo-fence detection algorithm, each detection will require a large amount of computation. If the user calls applications such as indoor navigation while shopping, the frequency of positioning will increase, and the amount of computation and power consumption will become larger. Therefore, in this implementation, a simpler algorithm is proposed to cover this scenario.
[0152] The method designed in this implementation is a method of exchanging space for time. Specifically, the spatial environment of the polygonal geofence is constructed when the user enters the polygonal geofence for the first time, so that each time positioning only requires a simple calculation to determine whether the current position is still inside the polygonal geofence. Therefore, the core of this implementation is how to construct the spatial environment of the polygonal geofence.
[0153] Suppose that at time t0, the user has entered the interior of the polygon geofence, and their position is denoted as P(t0). The next positioning time is set as t1 (t0 < t1), and the positioning position at this time is denoted as P(t1). When constructing the spatial environment of the polygon geofence, specifically, starting from point P(t0), equally spaced points can be marked along the specified direction vector. These points form a point sequence on the specified direction vector, denoted as The interval between two adjacent points in this point sequence is equal. Then there must be a point that is located outside the polygon geofence. After that, all the points on this sequence will be located outside the polygon geofence. Then this point is the switching point, and the point before it is the last point located inside the polygon geofence. Since the distance between points is equally spaced, the distance from point P(t0) to the boundary of the polygon geofence in the direction vector ω can be calculated. By this method, the distances from point P(t0) to the boundary of the polygon geofence in all direction vectors can be calculated. Specifically, it can be as Fig.11 shown.
[0154] In this way, a spatial environment table of the polygon geofence can be generated, and the distances of the current point in all direction vectors are recorded in the table. Specifically, according to actual needs, the angle between two adjacent direction vectors can be set. For example, the angle between two adjacent direction vectors can be set to 15°. Then the entire spatial environment of the polygon geofence can be divided into 24 direction vectors. The spatial environment table of this geofence can be shown in Table 1 below.
[0155] Table 1 Spatial environment table of polygon geofence
[0156] Direction vector number Direction range Distance(m) 1 0-15° 220 2 15°-30° 210 3 30°-45° 180 4 45°-60° 190 5 60°-75° 150 … … …
[0157] In this way, after obtaining the positioning position P(t1) at the next moment, only the angle and distance of the movement direction vector need to be calculated, and then it can be determined whether point P(t1) is located inside the polygon geofence by querying in the spatial environment table. If the modulus value (representing the distance) of the movement direction vector is less than the distance in this direction vector in the spatial environment table, it can be determined that point P(t1) is inside the polygon geofence; otherwise, the vector method can be restarted for further determination.
[0158] In this way, in this embodiment, by pre - establishing the spatial environment table of the target geofence, it is possible to determine whether the user is still inside the geofence by looking up the table according to the real - time positioning position, which can further reduce the amount of calculation in the scenario where the user stays in a certain geofence for a long time.
[0159] Furthermore, in the case of determining that the first position point is located inside the target geofence, the method further includes:
[0160] Determine the angles between a third vector and each of the M directions, wherein the third vector is a vector pointing from the third position point to the first position point;
[0161] Determine a distance change value of each of the M directions according to the angles respectively included between the third vector and each of the M directions and the modulus value of the third vector;
[0162] The spatial environment table is updated according to the distance change value in each of the M directions.
[0163] In the previous implementation, after the positioning position is updated, if it is determined that the electronic device user is still located inside the target geographic fence, the spatial environment table can be updated so that subsequent positioning positions can be more accurately determined based on the updated spatial environment table.
[0164] The specific method of updating can be: calculating the motion direction vector The angle α with each direction vector in the space environment table; calculate the motion direction vector The modulus d′; calculate the distance change value Δd=d′×cosα on each direction vector; subtract Δd from the distance value corresponding to the direction vector number of each row in the spatial environment table, and the update is completed.
[0165] The flowchart of this embodiment can be shown as Fig.12 As shown, the following steps are included:
[0166] Step 1201: Generate a spatial environment table.
[0167] Step 1202: Obtain the positioning position and calculate the modulus and direction of the user's motion direction vector.
[0168] Step 1203: query the vector interval number of the direction of the motion direction vector from the spatial environment table.
[0169] Step 1204: Query the distance corresponding to the vector interval number.
[0170] Step 1205 , determine whether the modulus of the motion direction vector is less than the distance queried in the spatial environment table. If so, directly determine that the point is inside the polygonal geographic fence; otherwise, proceed to step 1206 .
[0171] Step 1206: Start the vector method to perform polygonal geo-fence detection.
[0172] Step 1207: Update the space environment table.
[0173] The geo-fence detection method in the embodiment of the present application obtains the first position point where the electronic device is currently located; determines each normal vector of the target geo-fence respectively, wherein the target geo-fence is formed by connecting N boundary vertices in a preset order, the normal vector is perpendicular to the edge vector of the target geo-fence, the edge vector is a vector formed by connecting two adjacent boundary vertices of the target geo-fence, and N is an integer greater than 2; according to the dot product of the vector formed by connecting the first position point with the target boundary vertex and the target normal vector, determines the positional relationship between the first position point and the target geo-fence, wherein the target boundary vertex is part or all of the boundary vertices in the target geo-fence, and the target normal vector is a normal vector perpendicular to the edge vector at the target boundary vertex. In this way, the geo-fence detection of the electronic device is performed by the vector method, avoiding the complex calculations involved in the traditional cross number method, and only using simple four arithmetic operations, thereby effectively reducing the computational complexity of fence detection, greatly reducing the amount of calculation, and improving detection efficiency.
[0174] The geo-fence detection method provided in the embodiment of the present application can be executed by a geo-fence detection device. In the embodiment of the present application, the geo-fence detection device performing the geo-fence detection method is taken as an example to illustrate the geo-fence detection device provided in the embodiment of the present application.
[0175] See also Fig.13 , Fig.13 A schematic diagram of the structure of a geo-fence detection device provided in an embodiment of the present application is shown in FIG. Fig.13 As shown, the geo-fence detection device 1300 includes:
[0176] An acquisition module 1301 is used to acquire a first location point where the electronic device is currently located;
[0177] A first determination module 1302 is used to respectively determine each normal vector of a target geofence, wherein the target geofence is formed by connecting N boundary vertices in a preset order, the normal vector is perpendicular to an edge vector of the target geofence, the edge vector is a vector formed by connecting two adjacent boundary vertices of the target geofence, and N is an integer greater than 2;
[0178] The second determination module 1303 is used to determine the positional relationship between the first position point and the target geofence based on the dot product of the vector formed by connecting the first position point and the target boundary vertex and the target normal vector, wherein the target boundary vertex is part or all of the boundary vertices in the target geofence, and the target normal vector is a normal vector perpendicular to the edge vector at the target boundary vertex.
[0179] Optionally, the geo-fence detection device 1300 further includes:
[0180] A third determination module is used to determine a bounding rectangular area of the target geo-fence, wherein all boundary vertices of the target geo-fence are located within the bounding rectangular area;
[0181] A fourth determination module, used to determine a positional relationship between the first position point and the circumscribed rectangular area;
[0182] The second determination module is used to determine the positional relationship between the first position point and the target geographic fence based on the dot product of the line vector connecting the first position point and the target boundary vertex and the target normal vector when it is determined that the first position point is not outside the circumscribed rectangular area.
[0183] Optionally, the normal vector points to the interior of the target geo-fence;
[0184] The second determining module 1303 includes:
[0185] A first determining unit, configured to determine that the first location point is located inside the target geo-fence when a dot product of a first vector and the target normal vector is greater than 0, wherein the first vector is a vector pointing from the target boundary vertex to the first location point;
[0186] The second determining unit is used to determine that the first position point is outside the target geographic fence when the dot product of the first vector and the target normal vector is less than 0.
[0187] Optionally, the geo-fence detection device 1300 further includes:
[0188] A first storage module is used to store a second location point of the electronic device at a first moment when the electronic device is located inside the target geo-fence at the first moment, the first moment being a moment before the current moment;
[0189] a fifth determining module, configured to determine a second vector and a first angle, wherein the second vector is a vector pointing from the second position point to the first position point, and the first angle is an angle between the second vector and a -y axis in a rectangular coordinate system;
[0190] a coordinate conversion module, configured to perform coordinate conversion on the boundary vertices of the target geo-fence according to the first angle, to obtain the ordinate values of the boundary vertices of the target geo-fence in a second coordinate system, wherein the second coordinate system is the coordinate system obtained by rotating the rectangular coordinate system counterclockwise by the first angle;
[0191] The sixth determination module is used to determine the target boundary vertex based on the vertical coordinate value of the boundary vertex of the target geo-fence in the second coordinate system and the vertical coordinate value of the second position point in the second coordinate system, wherein the target boundary vertex is located on the first side of the first normal, the first normal is perpendicular to the second vector, and the first position point is located on the first side of the first normal.
[0192] Optionally, the origin of the second coordinate system is the second position point, and the ordinate value of the second position point in the second coordinate system is 0;
[0193] The sixth determination module comprises:
[0194] A third determining unit, configured to determine, when a ordinate value of the first boundary vertex in the second coordinate system is less than or equal to 0, that the first boundary vertex is the target boundary vertex, wherein the first boundary vertex is any boundary vertex in the target geo-fence;
[0195] The fourth determining unit is configured to determine that the first boundary vertex is not the target boundary vertex when the ordinate value of the first boundary vertex in the second coordinate system is greater than 0.
[0196] Optionally, the geo-fence detection device 1300 further includes:
[0197] A second storage module is used to store a third location point of the electronic device at a second moment when the electronic device is located inside the target geo-fence at the second moment, the second moment being a moment before the current moment;
[0198] A generation module is used to generate a spatial environment table according to the distance between the third position point and the boundary of the target geographic fence along the preset M directions, wherein the spatial environment table stores the correspondence between direction and distance, and the interval between two adjacent directions in the M directions is a preset angle, and M is equal to 360 degrees divided by the preset angle.
[0199] a seventh determining module, configured to determine a first distance and a first direction of the first position point relative to the third position point;
[0200] A query module, configured to query a second distance corresponding to the first direction from the spatial environment table;
[0201] The second determination module 1303 is used to determine the positional relationship between the first position point and the target geo-fence according to the dot product of the line vector between the first position point and the target boundary vertex and the target normal vector when the first distance is greater than the second distance.
[0202] Optionally, the geo-fence detection device 1300 further includes:
[0203] an eighth determination module, configured to determine, when it is determined that the first location point is located inside the target geo-fence, an angle between a third vector and each of the M directions, wherein the third vector is a vector pointing from the third location point to the first location point;
[0204] a ninth determination module, configured to determine a distance change value of each of the M directions according to an angle between the third vector and each of the M directions and a modulus value of the third vector;
[0205] An updating module is used to update the spatial environment table according to the distance change value in each direction of the M directions.
[0206] The geo-fence detection device 1300 in the embodiment of the present application obtains the first position point where the electronic device is currently located; determines each normal vector of the target geo-fence respectively, wherein the target geo-fence is formed by connecting N boundary vertices in a preset order, the normal vector is perpendicular to the edge vector of the target geo-fence, the edge vector is a vector formed by connecting two adjacent boundary vertices of the target geo-fence, and N is an integer greater than 2; determines the positional relationship between the first position point and the target geo-fence according to the dot product of the vector formed by connecting the first position point and the target boundary vertex and the target normal vector, wherein the target boundary vertex is part or all of the boundary vertices in the target geo-fence, and the target normal vector is a normal vector perpendicular to the edge vector at the target boundary vertex. In this way, the geo-fence detection of the electronic device is performed by the vector method, avoiding the complex calculations involved in the traditional cross number method, and only using simple four arithmetic operations, thereby effectively reducing the computational complexity of fence detection, greatly reducing the amount of calculation, and improving detection efficiency.
[0207] The geo-fence detection device in the embodiment of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (Augmented Reality, AR) / virtual reality (Virtual Reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), a television (Television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0208] The geo-fence detection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0209] The geo-fence detection device provided in the embodiment of the present application can achieve Figures 4 to 12 To avoid repetition, the various processes implemented in the embodiments are not described here.
[0210] Alternatively, if Fig.14 As shown, an embodiment of the present application also provides an electronic device 1400, including a processor 1401 and a memory 1402, wherein the memory 1402 stores programs or instructions that can be executed on the processor 1401, and when the program or instructions are executed by the processor 1401, the various steps of the above-mentioned geo-fence detection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0211] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0212] Fig.15 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0213] The electronic device 1500 includes but is not limited to: a radio frequency unit 1501, a network module 1502, an audio output unit 1503, an input unit 1504, a sensor 1505, a display unit 1506, a user input unit 1507, an interface unit 1508, a memory 1509, and a processor 1510 and other components.
[0214] Those skilled in the art will appreciate that the electronic device 1500 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.15 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0215] The processor 1510 is configured to:
[0216] Obtaining a first location point where the electronic device is currently located;
[0217] Determine each normal vector of the target geofence, wherein the target geofence is formed by connecting N boundary vertices in a preset order, the normal vector is perpendicular to an edge vector of the target geofence, the edge vector is a vector formed by connecting two adjacent boundary vertices of the target geofence, and N is an integer greater than 2;
[0218] The positional relationship between the first position point and the target geofence is determined based on the dot product of the vector formed by connecting the first position point and the target boundary vertex and the target normal vector, wherein the target boundary vertex is part or all of the boundary vertices in the target geofence, and the target normal vector is a normal vector perpendicular to the edge vector at the target boundary vertex.
[0219] Optionally, the processor 1510 is further configured to:
[0220] Determine a bounding rectangular area of the target geo-fence, wherein all boundary vertices of the target geo-fence are within the bounding rectangular area;
[0221] Determine a positional relationship between the first position point and the circumscribed rectangular area;
[0222] When it is determined that the first location point is not outside the circumscribed rectangular area, the positional relationship between the first location point and the target geographic fence is determined based on the dot product of the line vector between the first location point and the target boundary vertex and the target normal vector.
[0223] Optionally, the normal vector points to the interior of the target geo-fence;
[0224] The processor 1510 is further configured to:
[0225] When the dot product of the first vector and the target normal vector is greater than 0, determining that the first location point is located inside the target geo-fence, wherein the first vector is a vector pointing from the target boundary vertex to the first location point;
[0226] When the dot product of the first vector and the target normal vector is less than 0, it is determined that the first location point is outside the target geo-fence.
[0227] Optionally, the processor 1510 is further configured to:
[0228] When the electronic device is located inside the target geo-fence at a first moment, storing a second location point of the electronic device at the first moment, the first moment being a moment before the current moment;
[0229] Determine a second vector and a first angle, wherein the second vector is a vector pointing from the second position point to the first position point, and the first angle is an angle between the second vector and the -y axis in a rectangular coordinate system;
[0230] According to the first angle, coordinate transformation is performed on the boundary vertices of the target geo-fence to obtain the ordinate values of the boundary vertices of the target geo-fence in a second coordinate system, wherein the second coordinate system is a coordinate system obtained by rotating the rectangular coordinate system counterclockwise by the first angle;
[0231] The target boundary vertex is determined based on the vertical coordinate value of the boundary vertex of the target geo-fence in the second coordinate system and the vertical coordinate value of the second position point in the second coordinate system, wherein the target boundary vertex is located on the first side of a first normal, the first normal is perpendicular to the second vector, and the first position point is located on the first side of the first normal.
[0232] Optionally, the origin of the second coordinate system is the second position point, and the ordinate value of the second position point in the second coordinate system is 0;
[0233] The processor 1510 is further configured to:
[0234] When the ordinate value of the first boundary vertex in the second coordinate system is less than or equal to 0, determining the first boundary vertex as the target boundary vertex, wherein the first boundary vertex is any boundary vertex in the target geo-fence;
[0235] When the ordinate value of the first boundary vertex in the second coordinate system is greater than 0, it is determined that the first boundary vertex is not the target boundary vertex.
[0236] Optionally, the processor 1510 is further configured to:
[0237] When the electronic device is located inside the target geo-fence at a second moment, storing a third location point of the electronic device at the second moment, the second moment being a moment before the current moment;
[0238] Generate a spatial environment table according to the distances of the third position point from the boundary of the target geo-fence along the preset M directions, wherein the spatial environment table stores a correspondence between directions and distances, and a preset angle is set between two adjacent directions in the M directions, where M is equal to 360 degrees divided by the preset angle;
[0239] Determine a first distance and a first direction of the first position point relative to the third position point;
[0240] Querying a second distance corresponding to the first direction from the spatial environment table;
[0241] When the first distance is greater than the second distance, the positional relationship between the first position point and the target geo-fence is determined based on the dot product of the line vector between the first position point and the target boundary vertex and the target normal vector.
[0242] Optionally, the processor 1510 is further configured to:
[0243] Determine the angles between a third vector and each of the M directions, wherein the third vector is a vector pointing from the third position point to the first position point;
[0244] Determine a distance change value of each of the M directions according to the angles respectively included between the third vector and each of the M directions and the modulus value of the third vector;
[0245] The spatial environment table is updated according to the distance change value in each of the M directions.
[0246] The electronic device in the embodiment of the present application obtains the first position point where the electronic device is currently located; determines each normal vector of the target geofence respectively, wherein the target geofence is formed by connecting N boundary vertices in a preset order, the normal vector is perpendicular to the edge vector of the target geofence, the edge vector is a vector formed by connecting two adjacent boundary vertices of the target geofence, and N is an integer greater than 2; according to the dot product of the vector formed by connecting the first position point with the target boundary vertex and the target normal vector, determines the positional relationship between the first position point and the target geofence, wherein the target boundary vertex is part or all of the boundary vertices in the target geofence, and the target normal vector is a normal vector perpendicular to the edge vector at the target boundary vertex. In this way, the geofence detection of the electronic device is performed by the vector method, avoiding the complex calculations involved in the traditional cross number method, and only using simple four arithmetic operations, thereby effectively reducing the computational complexity of fence detection, greatly reducing the amount of calculation, and improving detection efficiency.
[0247] It should be understood that in the embodiment of the present application, the input unit 1504 may include a graphics processor (Graphics Processing Unit, GPU) 15041 and a microphone 15042, and the graphics processor 15041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1506 may include a display panel 15061, and the display panel 15061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1507 includes a touch panel 15071 and at least one of other input devices 15072. The touch panel 15071 is also called a touch screen. The touch panel 15071 may include two parts: a touch detection device and a touch controller. Other input devices 15072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0248] The memory 1509 can be used to store software programs and various data. The memory 1509 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1509 may include a volatile memory or a non-volatile memory, or the memory 1509 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0249] The processor 1510 may include one or more processing units; optionally, the processor 1510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1510.
[0250] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned geo-fence detection method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0251] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0252] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned geo-fence detection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0253] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0254] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned geo-fence detection method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0255] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0256] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0257] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A geographic fence detection method, characterized in that: include: Obtaining a first location point where the electronic device is currently located; Determine each normal vector of the target geofence, wherein the target geofence is formed by connecting N boundary vertices in a preset order, the normal vector is perpendicular to an edge vector of the target geofence, the edge vector is a vector formed by connecting two adjacent boundary vertices of the target geofence, and N is an integer greater than 2; Determine the positional relationship between the first position point and the target geofence according to the dot product of a vector formed by connecting the first position point and the target boundary vertex and a target normal vector, wherein the target boundary vertex is part or all of the boundary vertices in the target geofence, and the target normal vector is a normal vector perpendicular to the edge vector at the target boundary vertex; The determining the positional relationship between the first position point and the target geo-fence according to the dot product of the line vector between the first position point and the target boundary vertex and the target normal vector includes: Based on whether the dot product is greater than 0, determine whether the angle between the vector formed by connecting the first position point with the target boundary vertex and the target normal vector is an acute angle, and determine the positional relationship between the first position point and the target geographic fence in combination with the direction of the vector formed by connecting the first position point with the target boundary vertex and the direction of the target normal vector.
2. The method according to claim 1, characterized in that After acquiring the first location point where the electronic device is currently located, and before determining the positional relationship between the first location point and the target geo-fence according to the dot product of the line vector connecting the first location point and the target boundary vertex and the target normal vector, the method further includes: Determine a bounding rectangular area of the target geo-fence, wherein all boundary vertices of the target geo-fence are within the bounding rectangular area; Determine a positional relationship between the first position point and the circumscribed rectangular area; The determining the positional relationship between the first position point and the target geo-fence according to the dot product of the line vector between the first position point and the target boundary vertex and the target normal vector includes: When it is determined that the first location point is not outside the circumscribed rectangular area, the positional relationship between the first location point and the target geographic fence is determined based on the dot product of the line vector between the first location point and the target boundary vertex and the target normal vector.
3. The method according to claim 1, characterized in that The normal vector points to the interior of the target geo-fence; The determining the positional relationship between the first position point and the target geo-fence according to the dot product of the line vector between the first position point and the target boundary vertex and the target normal vector includes: When the dot product of the first vector and the target normal vector is greater than 0, determining that the first location point is located inside the target geo-fence, wherein the first vector is a vector pointing from the target boundary vertex to the first location point; When the dot product of the first vector and the target normal vector is less than 0, it is determined that the first location point is outside the target geo-fence.
4. The method according to any one of claims 1 to 3, characterized in that Before obtaining the first location point where the electronic device is currently located, the method further includes: When the electronic device is located inside the target geo-fence at a first moment, storing a second location point of the electronic device at the first moment, the first moment being a moment before the current moment; After acquiring the first location point where the electronic device is currently located, and before determining the positional relationship between the first location point and the target geo-fence according to the dot product of the line vector connecting the first location point and the target boundary vertex and the target normal vector, the method further includes: Determine a second vector and a first angle, wherein the second vector is a vector pointing from the second position point to the first position point, and the first angle is an angle between the second vector and the -y axis in a rectangular coordinate system; According to the first angle, coordinate transformation is performed on the boundary vertices of the target geo-fence to obtain the ordinate values of the boundary vertices of the target geo-fence in a second coordinate system, wherein the second coordinate system is a coordinate system obtained by rotating the rectangular coordinate system counterclockwise by the first angle; The target boundary vertex is determined based on the vertical coordinate value of the boundary vertex of the target geo-fence in the second coordinate system and the vertical coordinate value of the second position point in the second coordinate system, wherein the target boundary vertex is located on the first side of a first normal, the first normal is perpendicular to the second vector, and the first position point is located on the first side of the first normal.
5. The method according to claim 4, characterized in that The origin of the second coordinate system is the second position point, and the ordinate value of the second position point in the second coordinate system is 0; The determining the target boundary vertex according to the ordinate value of the boundary vertex of the target geo-fence in the second coordinate system and the ordinate value of the second position point in the second coordinate system includes: When the ordinate value of the first boundary vertex in the second coordinate system is less than or equal to 0, determining the first boundary vertex as the target boundary vertex, wherein the first boundary vertex is any boundary vertex in the target geo-fence; When the ordinate value of the first boundary vertex in the second coordinate system is greater than 0, it is determined that the first boundary vertex is not the target boundary vertex.
6. The method according to any one of claims 1 to 3, characterized in that Before obtaining the first location point where the electronic device is currently located, the method further includes: When the electronic device is located inside the target geo-fence at a second moment, storing a third location point of the electronic device at the second moment, the second moment being a moment before the current moment; Generate a spatial environment table according to the distances of the third position point from the boundary of the target geo-fence along the preset M directions, wherein the spatial environment table stores a correspondence between directions and distances, and a preset angle is set between two adjacent directions in the M directions, where M is equal to 360 degrees divided by the preset angle; After acquiring the first location point where the electronic device is currently located, and before determining the positional relationship between the first location point and the target geo-fence according to the dot product of the line vector connecting the first location point and the target boundary vertex and the target normal vector, the method further includes: Determine a first distance and a first direction of the first position point relative to the third position point; Querying a second distance corresponding to the first direction from the spatial environment table; The determining the positional relationship between the first position point and the target geo-fence according to the dot product of the line vector between the first position point and the target boundary vertex and the target normal vector includes: When the first distance is greater than the second distance, the positional relationship between the first position point and the target geo-fence is determined based on the dot product of the line vector between the first position point and the target boundary vertex and the target normal vector.
7. The method according to claim 6, characterized in that In the case where it is determined that the first location point is located inside the target geo-fence, the method further includes: Determine the angles between a third vector and each of the M directions, wherein the third vector is a vector pointing from the third position point to the first position point; Determine a distance change value of each of the M directions according to the angles respectively included between the third vector and each of the M directions and the modulus value of the third vector; The spatial environment table is updated according to the distance change value in each of the M directions.
8. A geographic fence detection device, characterized in that: include: An acquisition module, used to acquire a first location point where the electronic device is currently located; A first determination module is used to respectively determine each normal vector of a target geofence, wherein the target geofence is formed by connecting N boundary vertices in a preset order, the normal vector is perpendicular to an edge vector of the target geofence, the edge vector is a vector formed by connecting two adjacent boundary vertices of the target geofence, and N is an integer greater than 2; a second determination module, configured to determine a positional relationship between the first position point and the target geofence according to a dot product of a vector formed by connecting the first position point and a target boundary vertex and a target normal vector, wherein the target boundary vertex is part or all of the boundary vertices in the target geofence, and the target normal vector is a normal vector perpendicular to an edge vector at the target boundary vertex; The second determination module is specifically used to: determine whether the angle between the vector formed by connecting the first position point with the target boundary vertex and the target normal vector is an acute angle based on whether the dot product is greater than 0, and determine the positional relationship between the first position point and the target geographic fence in combination with the direction of the vector formed by connecting the first position point with the target boundary vertex and the direction of the target normal vector.
9. The geographic fence detection device according to claim 8, characterized in that: The geo-fence detection device also includes: A third determination module is used to determine a bounding rectangular area of the target geo-fence, wherein all boundary vertices of the target geo-fence are located within the bounding rectangular area; A fourth determination module, used to determine a positional relationship between the first position point and the circumscribed rectangular area; The second determination module is used to determine the positional relationship between the first position point and the target geographic fence based on the dot product of the line vector connecting the first position point and the target boundary vertex and the target normal vector when it is determined that the first position point is not outside the circumscribed rectangular area.
10. The geographic fence detection device according to claim 8, characterized in that: The normal vector points to the interior of the target geo-fence; The second determining module comprises: A first determining unit, configured to determine that the first location point is located inside the target geo-fence when a dot product of a first vector and the target normal vector is greater than 0, wherein the first vector is a vector pointing from the target boundary vertex to the first location point; The second determining unit is used to determine that the first position point is outside the target geographic fence when the dot product of the first vector and the target normal vector is less than 0.
11. The geo-fence detection device according to any one of claims 8 to 10, characterized in that: The geo-fence detection device also includes: A first storage module is used to store a second location point of the electronic device at a first moment when the electronic device is located inside the target geo-fence at the first moment, the first moment being a moment before the current moment; a fifth determining module, configured to determine a second vector and a first angle, wherein the second vector is a vector pointing from the second position point to the first position point, and the first angle is an angle between the second vector and a -y axis in a rectangular coordinate system; a coordinate conversion module, configured to perform coordinate conversion on the boundary vertices of the target geo-fence according to the first angle, to obtain the ordinate values of the boundary vertices of the target geo-fence in a second coordinate system, wherein the second coordinate system is the coordinate system obtained by rotating the rectangular coordinate system counterclockwise by the first angle; The sixth determination module is used to determine the target boundary vertex based on the vertical coordinate value of the boundary vertex of the target geo-fence in the second coordinate system and the vertical coordinate value of the second position point in the second coordinate system, wherein the target boundary vertex is located on the first side of the first normal, the first normal is perpendicular to the second vector, and the first position point is located on the first side of the first normal.
12. The geographic fence detection device according to claim 11, characterized in that: The origin of the second coordinate system is the second position point, and the ordinate value of the second position point in the second coordinate system is 0; The sixth determination module comprises: A third determining unit, configured to determine, when a ordinate value of the first boundary vertex in the second coordinate system is less than or equal to 0, that the first boundary vertex is the target boundary vertex, wherein the first boundary vertex is any boundary vertex in the target geo-fence; The fourth determining unit is configured to determine that the first boundary vertex is not the target boundary vertex when the ordinate value of the first boundary vertex in the second coordinate system is greater than 0.
13. The geo-fence detection device according to any one of claims 8 to 10, characterized in that: The geo-fence detection device also includes: A second storage module is used to store a third location point of the electronic device at a second moment when the electronic device is located inside the target geo-fence at the second moment, the second moment being a moment before the current moment; A generating module, configured to generate a spatial environment table according to the distances between the third position point and the boundary of the target geo-fence respectively along the preset M directions, wherein the spatial environment table stores a correspondence between directions and distances, and a preset angle is spaced between two adjacent directions in the M directions, where M is equal to 360 degrees divided by the preset angle; a seventh determining module, configured to determine a first distance and a first direction of the first position point relative to the third position point; A query module, configured to query a second distance corresponding to the first direction from the spatial environment table; The second determination module is used to determine the positional relationship between the first position point and the target geo-fence according to the dot product of the line vector between the first position point and the target boundary vertex and the target normal vector when the first distance is greater than the second distance.
14. The geographic fence detection device according to claim 13, characterized in that: The geo-fence detection device also includes: an eighth determination module, configured to determine, when it is determined that the first location point is located inside the target geo-fence, an angle between a third vector and each of the M directions, wherein the third vector is a vector pointing from the third location point to the first location point; a ninth determination module, configured to determine a distance change value of each of the M directions according to an angle between the third vector and each of the M directions and a modulus value of the third vector; An updating module is used to update the spatial environment table according to the distance change value in each direction of the M directions.
15. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the geo-fence detection method as described in any one of claims 1-7 are implemented.
16. A readable storage medium, characterized in that: The readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the geo-fence detection method as described in any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Method for determining a moving object entering a specific geographic zone, and recording medium having software programs for executing the same
TWI273442B