Custom electronic fence-based positioning method and device, and storage medium
By building a custom electronic fence, using boundary point information and GPS positioning, the problem of instability of electronic fence signals under complex terrain in the existing technology is solved, and the accurate position judgment and relative position determination of the moving target are achieved, improving the accuracy and practicality of positioning.
Patent Information
- Application Number
- CN202510794099.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-06-13
AI Technical Summary
The existing electronic fences have unstable signals in complex terrain, making it difficult to accurately determine the location of the moving target. In particular, GPS wireless fences and signal transmitter receiver fences are susceptible to external environments under complex terrain, resulting in inaccurate position analysis.
By obtaining the dot information of multiple boundary points, a custom electronic fence is built, and the boundary point position information is used to determine the boundary distance between the moving target and the fence, and the internal and external positions are judged according to the preset algorithm to determine the relative position of the moving target.
In complex terrain, the special-shaped wireless fence can be customized to accurately and efficiently determine the relative position of the moving target, which improves the accuracy and practicality of positioning, and can provide corresponding reminders based on the location or prompt the moving target to return to the fence.
Smart Images

Figure CN120416769A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of electronic fences, and particularly to a positioning method, device and storage medium based on a custom electronic fence. Background Art
[0002] The earliest fences used physical materials such as wood and iron to enclose areas and restrict the movement range of moving targets. With the development of technology, there have emerged GPS wireless fences, wireless fences that transmit wireless signals through signal transmitters and receivers, wireless fences that bury coils underground for signal transmission, and so on. However, the GPS wireless fence is a circular area centered on a set point, which is difficult to achieve complete coverage of signals in complex terrains. The wireless fence with signal transmitters and receivers requires a large number of transmitters and receivers to be set up, and is easily affected by external environmental factors, resulting in unstable signals. The wireless fence with coils buried underground is easily affected by physical obstacles and the same-frequency wireless networks of other electronic devices, resulting in unstable signals. Unstable signals lead to inaccurate analysis of the position of the moving target relative to the wireless fence. Especially in the scenario of complex terrains, the accuracy and practicability need to be improved. Summary of the Invention
[0003] In view of the above problems, the embodiments of the present invention provide a positioning method, device and storage medium based on a custom electronic fence to solve the problems existing in the prior art.
[0004] According to one aspect of the embodiments of the present invention, a positioning method based on a custom electronic fence is provided, which is applied to a positioning device, and the method includes:
[0005] Obtain the dotting information of multiple boundary points, wherein the positioning device is worn on a moving target, and the dotting information includes position information;
[0006] Construct a closed electronic fence according to the dotting information of the multiple boundary points;
[0007] Obtain the GPS positioning information of the moving target, and determine the boundary distances from the moving target to each boundary of the electronic fence according to the positioning information and the position information of the multiple boundary points. Determine the minimum boundary distance from all the boundary distances, wherein the boundary is a line segment determined by two adjacent boundary points;
[0008] Determine whether the moving target is inside or outside the electronic fence according to the positioning information, the position information of the multiple boundary points and a preset inside / outside boundary algorithm;
[0009] Determine the relative position of the moving target with respect to the electronic fence according to the minimum boundary distance and the inside / outside position.
[0010] In an alternative manner, obtaining the GPS positioning information of the moving target, determining the boundary distances from the moving target to each boundary of the electronic fence according to the positioning information and the position information of multiple boundary points, and determining the minimum boundary distance from all the boundary distances includes:
[0011] Establish a plane rectangular coordinate system, and respectively convert the positioning point where the moving target is located and multiple boundary points to the plane rectangular coordinate system according to the positioning information and the position information of multiple boundary points to obtain a fence coordinate map;
[0012] Based on the fence coordinate map and a preset boundary distance algorithm, determine the boundary distances from the positioning point to each boundary in the fence coordinate map, and determine the minimum boundary distance from all the boundary distances.
[0013] In an alternative manner, the determining the boundary distances from the positioning point to each boundary in the fence coordinate map based on the fence coordinate map and a preset boundary distance algorithm, and determining the minimum boundary distance from all the boundary distances includes:
[0014] For each boundary in the fence coordinate map, determine the perpendicular line from the positioning point to the straight line where the boundary is located, and determine the first intersection point of the perpendicular line and the straight line where the boundary is located;
[0015] Determine whether the abscissa values of the two boundary points of the boundary are equal;
[0016] If the abscissa values of the two boundary points of the boundary are equal, determine whether the ordinate value of the first intersection point is respectively greater than the ordinate values of the two boundary points of the boundary, or whether the ordinate value of the first intersection point is respectively less than the ordinate values of the two boundary points of the boundary;
[0017] If the ordinate value of the first intersection point is respectively greater than the ordinate values of the two boundary points of the boundary, or the ordinate value of the first intersection point is respectively less than the ordinate values of the two boundary points of the boundary, obtain the first minimum distance value from the positioning point to the two boundary points of the boundary, and use the first minimum distance value as the boundary distance; if the ordinate value of the first intersection point is between the ordinate values of the two boundary points of the boundary, or the ordinate value of the first intersection point is equal to the ordinate value of any one of the two boundary points of the boundary, use the distance from the positioning point to the first intersection point as the boundary distance;
[0018] If the abscissa values of the two boundary points of the boundary are not equal, determine whether the abscissa value of the first intersection point is greater than the abscissa values of the two boundary points of the boundary respectively, or whether the abscissa value of the first intersection point is less than the abscissa values of the two boundary points of the boundary respectively;
[0019] If the abscissa value of the first intersection point is greater than the abscissa values of the two boundary points of the boundary respectively, or the abscissa value of the first intersection point is less than the abscissa values of the two boundary points of the boundary respectively, obtain the second minimum distance from the positioning point to the two boundary points of the boundary respectively, and use the second minimum distance as the boundary distance; if the abscissa value of the first intersection point is between the abscissa values of the two boundary points of the boundary, or the abscissa value of the first intersection point is equal to the abscissa value of any one of the two boundary points of the boundary, use the distance from the positioning point to the first intersection point as the boundary distance;
[0020] Determine the minimum boundary distance from all the boundary distances.
[0021] In an optional manner, the dotting information further includes a dotting sequence. Determining the internal and external positions of the moving target with respect to the electronic fence according to the positioning information, the position information of multiple boundary points, and a preset boundary internal and external algorithm includes:
[0022] For each boundary in the fence coordinate graph, determine whether the abscissa value of the positioning point is between the abscissa values of the two boundary points of the boundary, or equal to the abscissa value of the first boundary point of the two boundary points, where the boundary with the earlier dotting sequence is the first boundary point, and the boundary with the later dotting sequence is the second boundary point;
[0023] If the abscissa value of the positioning point is between the abscissa values of the two boundary points of the boundary, or equal to the abscissa value of the first boundary point of the two boundary points, determine a vertical line passing through the positioning point and perpendicular to the horizontal axis of the fence coordinate graph, and determine the second intersection point of the vertical line and the boundary;
[0024] If the ordinate value of the second intersection point is greater than the ordinate value of the fixed point, determine whether the abscissa value of the positioning point is equal to the abscissa value of the first boundary point of the boundary;
[0025] If the abscissa value of the positioning point is not equal to the abscissa value of the first boundary point of the boundary, output the analysis result of the positioning point corresponding to the boundary;
[0026] If the abscissa value of the positioning point is equal to the abscissa value of the first boundary point of the boundary, determine whether the abscissa value of the first boundary point is between the abscissa value of the previous boundary point of the first boundary point and the abscissa value of the second boundary point;
[0027] If the abscissa value of the first boundary point is between the abscissa value of the previous boundary point of the first boundary point and the abscissa value of the second boundary point, output the analysis result of the positioning point corresponding to the boundary;
[0028] Determine the internal and external positions of the moving target in the electronic fence according to the total number of analysis results of all boundaries.
[0029] In an alternative way, the analysis result is 1, and determining the internal and external positions of the moving target in the electronic fence according to the total number of analysis results of all boundaries includes:
[0030] If the sum of the analysis results of all boundaries is odd, the moving target is inside the electronic fence; if the sum of the analysis results of all boundaries is even, the moving target is outside the electronic fence.
[0031] In an alternative way, the method further includes:
[0032] Perform corresponding-level reminders on the moving target according to the relative position and a preset reminder mechanism.
[0033] In an alternative way, performing corresponding-level reminders on the moving target according to the relative position and a preset reminder mechanism includes:
[0034] When the moving target is inside the electronic fence, the minimum boundary distance is greater than a first preset value and the minimum boundary distance is continuously increasing, or when the moving target is outside the electronic fence, the minimum boundary distance is less than a second preset value and the minimum boundary distance is continuously increasing, perform a linear reminder on the moving target. Among them, when the moving target moves from the inside of the electronic fence to the boundary, the minimum boundary distance corresponding to the boundary is negative and gradually increases; when the moving target is at the boundary, the minimum boundary distance corresponding to the boundary is zero; when the moving target moves from the boundary to the outside of the electronic fence, the minimum boundary distance corresponding to the boundary is positive and gradually increases;
[0035] When the moving target is outside the electronic fence and the minimum boundary distance is greater than or equal to the second preset value, perform the strongest reminder on the moving target;
[0036] When the moving target is located outside the electronic fence, and the duration during which the minimum boundary distance is greater than or equal to the second preset value is greater than the preset time, a reminder with the minimum intensity is given to the moving target.
[0037] In an alternative manner, the method further includes:
[0038] Receiving the dotting information of a plurality of boundary points marked on the GPS map interface of the positioning device, and storing the dotting information locally.
[0039] According to another aspect of the embodiments of the present invention, there is provided a computer device, including: a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface complete mutual communication through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the method as described above.
[0040] According to another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, in which at least one executable instruction is stored. When the executable instruction runs on a computer device, it causes the computer device to execute the method as described above.
[0041] The positioning device according to the embodiments of the present invention first obtains the dotting information of a plurality of boundary points, realizes a wireless fence with a custom shape according to the dotting information, the positioning device performs GPS positioning on the moving target, determines the minimum boundary distance from the moving target to each boundary of the electronic fence according to the GPS positioning information and the position information of the boundary points of the electronic fence, and determines the internal and external positions of the moving target relative to the electronic fence according to the positioning information, the position information of the boundary points of the electronic fence, and the preset internal and external boundary algorithm. According to the minimum boundary distance and the internal and external positions, the relative position of the moving target with respect to the electronic fence is determined. It can custom-build a special-shaped wireless fence in complex terrains and accurately and efficiently determine the relative position of the moving target with respect to the custom electronic fence, with high practicability, and can provide favorable conditions for subsequent taking corresponding measures to remind or prompt the moving target to return to the electronic fence.
[0042] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to be able to understand the technical means of the embodiments of the present invention more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features, and advantages of the embodiments of the present invention more obvious and understandable, the following specifically describes the embodiments of the present invention. Description of the Drawings
[0043] The drawings are only used to illustrate the embodiments and are not considered as a limitation of the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0044] Figure 1 The figure shows a schematic structural diagram of a positioning device in the positioning method based on a custom electronic fence provided by an embodiment of the present invention;
[0045] Figure 2 The figure shows a schematic flowchart of the positioning method based on a custom electronic fence provided by an embodiment of the present invention;
[0046] Figure 3 The figure shows a schematic diagram of a fence coordinate map and a positioning point in the positioning method based on a custom electronic fence provided by an embodiment of the present invention;
[0047] Figure 4 The figure shows a schematic structural diagram of a computer device provided by an embodiment of the present invention. Detailed implementation manners
[0048] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein.
[0049] Figure 1 The figure shows a schematic structural diagram of a positioning device provided by an embodiment of the present invention. As Figure 1 shown, the positioning device includes a GPS device and a processing device. The positioning device may further include a reminder device. The GPS device is used to locate a moving target. The processing device is used to obtain the dotting information of multiple boundary points, construct a custom electronic fence according to the dotting information, and judge the real-time position according to the positioning information of the electronic fence and the moving target. The processing device can also send a signal to the reminder device according to the judgment result, so that the reminder device responds in the form of at least one reminder method and corresponding reminder intensity, thereby reminding the moving target.
[0050] Figure 2 The figure shows a schematic flowchart of the positioning method based on a custom electronic fence provided by an embodiment of the present invention. The method includes:
[0051] S10. Obtain the dotting information of multiple boundary points. The positioning device is worn on a moving target, and the dotting information includes position information.
[0052] The moving target may be a pet or other self-movable target, such as livestock. The dotting information for constructing the electronic fence can be sent to the positioning device by an external device or directly input into the positioning device, or obtained by dotting on the GPS map interface of the GPS device. The dotting information includes position information, and the position information is longitude and latitude. The dotting information also includes the dotting order, that is, the sequence of the boundary points being dotted.
[0053] Preferably, the method further includes: receiving the dotting information of a plurality of boundary points marked on the GPS map interface of the positioning device, and storing the dotting information locally. The GPS device includes a GPS map interface, and dotting can be performed on the GPS map interface as needed to obtain dotting information, and the dotting information is stored locally for constructing a custom electronic fence. Preferably, when dotting, to avoid the coincidence of the boundaries of the electronic fence or difficulty in determining the internal and external positions of the electronic fence in the future, in this embodiment, it is ensured that the abscissa values corresponding to each marked boundary point have unique values when dotting. The abscissa of the boundary points marked this time is compared with the abscissa values of the boundary points that have been marked. If there are boundary points with the same abscissa value, the abscissa value of the boundary points marked this time is adjusted, for example, reduced by 10 cm, so that the abscissa values corresponding to each boundary point are different. Among them, after the first boundary point is marked, a coordinate axis can be established with the first boundary point as the origin, which is convenient for analyzing that the abscissa values corresponding to each marked boundary point have unique values.
[0054] The positioning device in this embodiment can perform dotting locally and obtain dotting information locally, realizing offline work, without the need to connect to the network, nor to install an APP on an external terminal such as a mobile phone and provide relevant user information.
[0055] S20. Construct a closed electronic fence according to the dotting information of the plurality of boundary points.
[0056] In this embodiment, a plurality of boundary points can construct a closed electronic fence. Users can perform dotting according to actual needs or preferences. By dotting, the electronic fence is no longer a fixed-shaped area, and a custom, fixed-shaped or non-fixed-shaped electronic fence can be obtained, which can meet the fence setting for complex terrains and can also meet the requirements of users for special-shaped wireless fences to the greatest extent.
[0057] Optionally, when constructing a closed electronic fence according to the dotting information, each boundary point can be linearly connected in sequence according to the dotting order, and the end boundary point and the start boundary point among the boundary points can be linearly connected to obtain the electronic fence.
[0058] Among them, the boundary points are linearly connected in sequence according to the dotting order. For example, the boundary point ranked first in the dotting order is linearly connected to the boundary point ranked second in the dotting order, the boundary point ranked second in the dotting order is linearly connected to the boundary point ranked third in the dotting order, and so on. Finally, the boundary point ranked first in the dotting order can be linearly connected to the boundary point ranked last in the dotting order through a predetermined trigger operation, that is, the start boundary point and the end boundary point are linearly connected. The predetermined trigger operation can be an operation of double-clicking a predetermined button or long-pressing a predetermined button.
[0059] S30. Obtain the GPS positioning information of the moving target, and determine the boundary distances from the moving target to each boundary of the electronic fence according to the positioning information and the position information of multiple boundary points. Determine the minimum boundary distance from all the boundary distances, where the boundary is a line segment determined by two adjacent boundary points.
[0060] The positioning device in this embodiment can obtain the positioning information of the moving target through real-time positioning. Among them, the positioning information obtained by the GPS device is longitude and latitude, and the position information of the boundary points is also longitude and latitude. Through the positioning information of the moving target and the position information of the boundary points, the boundary distance from the moving target to each boundary can be calculated. Among them, the boundary distance from the moving target to each boundary is the distance from a point to a line segment, and this boundary distance may be the perpendicular distance from the point to the line segment or the distance from the point to the endpoint of the boundary. After determining the boundary distances from the moving target to each boundary, it is necessary to further determine the minimum boundary distance. The distance at which the moving target moves to the boundary with the shortest path is the minimum boundary distance, so this minimum boundary distance is used as the distance between the moving target and the boundary of the electronic fence.
[0061] In an embodiment, obtaining the GPS positioning information of the moving target, determining the boundary distances from the moving target to each boundary of the electronic fence according to the positioning information and the position information of multiple boundary points, and determining the minimum boundary distance from all the boundary distances includes:
[0062] Establish a plane rectangular coordinate system, and respectively convert the positioning point where the moving target is located and multiple boundary points to the plane rectangular coordinate system according to the positioning information and the position information of multiple boundary points to obtain a fence coordinate map;
[0063] Based on the fence coordinate map and a preset boundary distance algorithm, determine the boundary distances from the positioning point to each boundary in the fence coordinate map, and determine the minimum boundary distance from all the boundary distances.
[0064] In this embodiment, the boundary distance is calculated by establishing a plane rectangular coordinate system. Among them, after establishing the plane rectangular coordinate system, the positioning point where the moving target is located and the boundary points can be converted to the plane rectangular coordinate system to obtain a fence coordinate map. The fence coordinate map includes a vertically intersecting X-axis, a Y-axis, a fence formed by connecting each boundary point, and a positioning point. Preferably, in order to calculate the boundary distance conveniently, in this embodiment, the starting boundary point with the first dotting order is converted to the origin of the plane rectangular coordinate system, and then other boundary points and the positioning point are also converted to the plane rectangular coordinate system according to the position information of the boundary points and the positioning information of the positioning point. Of course, it is also possible not to use the above method of establishing a plane rectangular coordinate system to calculate the boundary distance. Other suitable coordinate systems can be established and similar methods can be used to calculate the boundary distance, which is not limited here.
[0065] Further, based on the fence coordinate map and a preset boundary distance algorithm, determine the boundary distances from the positioning point to each boundary in the fence coordinate map, and determine the minimum boundary distance from all the boundary distances, including:
[0066] For each boundary in the fence coordinate map, determine the perpendicular line from the positioning point to the line where the boundary is located, and determine the first intersection point of the perpendicular line and the line where the boundary is located;
[0067] Determine whether the abscissa values of the two boundary points of the boundary are equal;
[0068] If the abscissa values of the two boundary points of the boundary are equal, determine whether the ordinate value of the first intersection point is respectively greater than the ordinate values of the two boundary points, or whether the ordinate value of the first intersection point is respectively less than the ordinate values of the two boundary points;
[0069] If the ordinate value of the first intersection point is respectively greater than the ordinate values of the two boundary points, or the ordinate value of the first intersection point is respectively less than the ordinate values of the two boundary points, obtain the first minimum distance value from the positioning point to the two boundary points of the boundary, and use the first minimum distance value as the boundary distance; if the ordinate value of the first intersection point is between the ordinate values of the two boundary points, or the ordinate value of the first intersection point is equal to the ordinate value of any one of the two boundary points, use the distance from the positioning point to the first intersection point as the boundary distance;
[0070] If the abscissa values of the two boundary points of the boundary are not equal, determine whether the abscissa value of the first intersection point is respectively greater than the abscissa values of the two boundary points, or whether the abscissa value of the first intersection point is respectively less than the abscissa values of the two boundary points;
[0071] If the abscissa value of the first intersection point is respectively greater than the abscissa values of the two boundary points, or the abscissa value of the first intersection point is respectively less than the abscissa values of the two boundary points, obtain the second minimum distance value from the positioning point to the two boundary points of the boundary, and use the second minimum distance value as the boundary distance; if the abscissa value of the first intersection point is between the abscissa values of the two boundary points, or the abscissa value of the first intersection point is equal to the abscissa value of any one of the two boundary points, use the distance from the positioning point to the first intersection point as the boundary distance;
[0072] Determine the minimum boundary distance from all the boundary distances.
[0073] In this embodiment, since the moving target may be constantly moving, the positioning device can calculate the boundary distances from the positioning point to each boundary at regular intervals, and determine the minimum boundary distance from all the boundary distances. For example, the predetermined time is 5 seconds or 10 seconds. In this embodiment, the perpendicular line from the positioning point to the straight line where the boundary is located is first determined, and it is judged whether the perpendicular line intersects the line segment where the boundary is located or the straight line other than the line segment. If it intersects the line segment where the boundary is located, the distance from the positioning point to the line segment is the minimum boundary distance; otherwise, the minimum of the distance values from the positioning point to the two boundary points of the boundary is the minimum boundary distance. Through the fence coordinate map and the preset boundary distance algorithm, this embodiment can efficiently and accurately calculate the boundary distance, thereby determining the minimum boundary distance and realizing the accurate judgment of the distance of the moving target relative to the electronic fence.
[0074] S40. Determine the internal or external position of the moving target relative to the electronic fence according to the positioning information, the position information of multiple boundary points, and the preset inside / outside boundary algorithm.
[0075] In this embodiment, after determining the minimum boundary distance, it is impossible to determine whether the moving target is inside or outside the electronic fence. If it is inside the electronic fence, the security risk is relatively low; if it is outside the electronic fence, the security risk is relatively high. In view of this, it can be further determined whether the moving target is inside or outside the electronic fence. In this process, it is necessary to analyze the relative position relationship between the moving target and each boundary in the fence coordinate map, and further determine whether the moving target is inside or outside the electronic fence according to the relative position relationship between the moving target and all boundaries.
[0076] Further, determining the internal or external position of the moving target relative to the electronic fence according to the positioning information, the position information of multiple boundary points, and the preset inside / outside boundary algorithm includes:
[0077] For each boundary in the fence coordinate map, determine whether the abscissa value of the positioning point is between the abscissa values of the two boundary points of the boundary, or equal to the abscissa value of the first boundary point among the two boundary points of the boundary, where the boundary point with the earlier marking order is the first boundary point, and the boundary point with the later marking order is the second boundary point;
[0078] If the abscissa value of the positioning point is between the abscissa values of the two boundary points of the boundary, or equal to the abscissa value of the first boundary point among the two boundary points of the boundary, determine the perpendicular line passing through the positioning point and perpendicular to the horizontal axis of the fence coordinate map, and determine the second intersection point of the perpendicular line and the boundary;
[0079] If the ordinate value of the second intersection point is greater than the ordinate value of the positioning point, determine whether the abscissa value of the positioning point is equal to the abscissa value of the first boundary point of the boundary;
[0080] If the abscissa value of the positioning point is not equal to the abscissa value of the first boundary point of the boundary, output the analysis result of the positioning point corresponding to the boundary;
[0081] If the abscissa value of the positioning point is equal to the abscissa value of the first boundary point of the boundary, determine whether the abscissa value of the first boundary point is between the abscissa value of the previous boundary point of the first boundary point and the abscissa value of the second boundary point;
[0082] If the abscissa value of the first boundary point is between the abscissa value of the previous boundary point of the first boundary point and the abscissa value of the second boundary point, output the analysis result of the positioning point corresponding to the boundary;
[0083] Determine the internal and external positions of the moving target in the electronic fence according to the total number of analysis results of all boundaries.
[0084] Exemplarily, as Figure 3 shown, it is a fence coordinate map obtained for a custom irregular-shaped electronic fence. In this fence coordinate map, the fence is ABCDEFGHIJK. For positioning point 1 (the ray passing through positioning point 1 passes through the boundary point. After the ray passes out of the electronic fence from the inside to the outside and then passes into the inside from the outside and passes out again), the boundaries that satisfy the abscissa value of positioning point 1 being between the abscissa values of two boundary points of the boundary or equal to the abscissa value of the first boundary point of the two boundary points of the boundary include JK, BC, CD, GH. The vertical line passing through positioning point 1 and perpendicular to the X-axis of the fence coordinate map has corresponding second intersections with the boundaries JK, BC, CD, GH. Among them, the boundaries that satisfy the ordinate value of the second intersection being greater than the ordinate value of fixed point 1 are BC, CD, GH. The boundaries where the abscissa value of positioning point 1 is not equal to the abscissa value of the first boundary point of the boundary are CD, GH. Output the analysis result of positioning point 1 corresponding to boundary CD and the analysis result of positioning point 1 corresponding to boundary GH; the boundary where the abscissa value of positioning point 1 is equal to the abscissa value of the first boundary point of the boundary is BC. The abscissa value of the first boundary point B of boundary BC is between the abscissa value of the previous boundary point A of the first boundary point B and the abscissa value of the second boundary point C. Then output the analysis result of positioning point 1 corresponding to boundary BC, and a total of 3 analysis results are output. Among them, if the total number of analysis results is odd, the moving target is inside the electronic fence; if the total number of analysis results is even, the moving target is outside the electronic fence. A total of 3 analysis results are output for positioning point 1. Therefore, it is determined that positioning point 1 is inside the electronic fence.
[0085] Similarly, for positioning point 2 (the ray passing through positioning point 2 passes through a boundary point, and the ray penetrates from the outside of the electronic fence into the inside and then out), the boundaries where the ordinate value of the second intersection point is greater than the ordinate value of positioning point 2 include CD, FG, and GH. The boundaries JK and AB do not meet this condition. The boundaries where the abscissa value of positioning point 2 is not equal to the abscissa value of the first boundary point of the boundary are CD and GH. The analysis results corresponding to boundary CD of positioning point 2 and the analysis results corresponding to boundary GH of positioning point 2 are output. For boundary FG, the abscissa value of its first boundary point F is not between the abscissa value of the previous boundary point E of the first boundary point F and the abscissa value of the second boundary point G. Therefore, the corresponding analysis results will not be output. Therefore, a total of 2 analysis results are output. Since the total number of analysis results is even, it is determined that the moving target is outside the electronic fence. For positioning point 3, the boundaries where the ordinate value of the second intersection point is greater than the ordinate value of positioning point 3 include AB, CD, EF, and GH. Finally, the analysis results corresponding to boundaries AB, CD, and EF will be output respectively. However, for boundary GH, the abscissa value of its first boundary point G is not between the abscissa value of the previous boundary point F of the first boundary point G and the abscissa value of the second boundary point H. Therefore, the corresponding analysis results will not be output. Therefore, a total of 3 analysis results are output. Since the total number of analysis results is odd, it is determined that the moving target is inside the electronic fence. For positioning point 4, the boundaries where the ordinate value of the second intersection point is greater than the ordinate value of positioning point 4 include AB and EF. The analysis result corresponding to boundary AB will be output, but boundary EF does not meet the condition. Therefore, a total of 1 analysis result is output. Since the total number of analysis results is odd, it is determined that the moving target is inside the electronic fence.
[0086] For a custom irregular-shaped electronic fence, it is quite difficult to determine whether the positioning point is inside or outside the electronic fence. For the above positioning points 1, 2, 3, and 4, they cannot be accurately judged by existing methods. In this embodiment, through the fence coordinate map and the boundary inside-out algorithm, the inside and outside positions of the moving target in the custom electronic fence can be efficiently and accurately judged.
[0087] Furthermore, when the above analysis result is 1, determining the inside and outside position of the moving target in the electronic fence according to the total number of analysis results of all boundaries includes: if the sum of the analysis results of all boundaries is odd, then the moving target is inside the electronic fence; if the sum of the analysis results of all boundaries is even, then the moving target is outside the electronic fence.
[0088] Based on the principle that "for a closed figure, starting from a certain point and making a ray in any direction, if the number of intersections between the ray and the sides of the closed figure is odd, then the point is inside the closed figure; if the number of intersections is even, then the point is outside the closed figure", this embodiment determines whether the positioning points are inside or outside the electronic fence. For the above positioning points 1, 2, 3, and 4, if the conditions are met, the analysis result 1 is output; if the conditions are not met, 0 can be output. Then, the output data is added up to obtain the total. If the total is odd, the moving target is inside the electronic fence; if the total is even, the moving target is outside the electronic fence.
[0089] S50. Determine the relative position of the moving target with respect to the electronic fence according to the minimum boundary distance and the internal and external positions.
[0090] The relative position in this embodiment includes the minimum boundary distance and the internal and external positions of the moving target with respect to the electronic fence. After determining the relative position of the moving target, the current position of the moving target can be accurately monitored and the possible movement trend of the moving target can be predicted.
[0091] The positioning device according to the embodiment of the present invention first obtains the marking information of multiple boundary points, realizes a wireless fence with a custom shape according to the marking information, performs GPS positioning on the moving target, determines the minimum boundary distance from the moving target to each boundary of the electronic fence according to the GPS positioning information and the position information of the boundary points of the electronic fence, and determines the internal and external positions of the moving target with respect to the electronic fence according to the positioning information, the position information of the boundary points of the electronic fence, and a preset boundary internal and external algorithm. By determining the relative position of the moving target with respect to the electronic fence according to the minimum boundary distance and the internal and external positions, a special-shaped wireless fence can be custom-built in complex terrains, and the relative position of the moving target with respect to the custom electronic fence can be accurately and efficiently determined, with high practicability, which provides favorable conditions for subsequent taking corresponding measures to remind or prompt the moving target to return to the electronic fence.
[0092] In one embodiment, based on the above embodiment, the method further includes: performing a corresponding-level reminder on the moving target according to the relative position and a preset reminder mechanism.
[0093] In this embodiment, corresponding-level reminders are given based on the minimum boundary distance between the moving target and the boundary and its internal or external position within the electronic fence. If the moving target is inside the electronic fence and far from the boundary, no reminder may be given. If the moving target is inside the electronic fence and close to the boundary, a reminder is given with a relatively weak intensity. If the moving target is outside the electronic fence, a reminder can be given with a relatively strong intensity. This embodiment gives corresponding-level targeted reminders to the moving target according to the relative position and the preset reminder mechanism, can accurately remind based on the position of the moving target, and has a strong effect of prompting the moving target to return to the electronic fence.
[0094] Preferably, giving corresponding-level reminders to the moving target according to the relative position and the preset reminder mechanism includes:
[0095] When the moving target is inside the electronic fence, the minimum boundary distance is greater than a first preset value and the minimum boundary distance is constantly increasing, or when the moving target is outside the electronic fence, the minimum boundary distance is less than a second preset value and the minimum boundary distance is constantly increasing, a linear reminder is given to the moving target. Among them, when the moving target moves from the inside of the electronic fence to the boundary, the minimum boundary distance corresponding to the boundary is negative and gradually increases. When the moving target is at the boundary, the minimum boundary distance corresponding to the boundary is zero. When the moving target moves from the boundary to the outside of the electronic fence, the minimum boundary distance corresponding to the boundary is positive and gradually increases;
[0096] When the moving target is outside the electronic fence and the minimum boundary distance is greater than or equal to the second preset value, a reminder with the maximum intensity is given to the moving target;
[0097] When the moving target is outside the electronic fence, the minimum boundary distance is greater than or equal to the second preset value and the duration for which this state persists is greater than a preset time, a reminder with the minimum intensity is given to the moving target.
[0098] In this embodiment, when the moving target is inside the electronic fence, the boundary distance is negative; when the moving target is at the boundary, the boundary distance is zero; when the moving target is outside the electronic fence, the boundary distance is positive. Exemplarily, the first preset value is -3m and the second preset value is 10m. When the minimum boundary distance of the moving target is less than or equal to -3m, no reminder is required. When the minimum boundary distance of the moving target is between -3m and 10m, a linear reminder is given to remind the moving target to return to the electronic fence or enter the area where no reminder is required in the electronic fence. The linear reminder means that the intensity of the reminder increases as the minimum boundary distance becomes larger. Among them, the reminder device can use one or more of beeping, vibration motors, and electric shocks for reminder, and the intensity value of the reminder can be described by the decibel value of the beeping, the rotation speed of the vibration motor, and the voltage or current value of the electric shock.
[0099] In addition, when the moving target is outside the electronic fence and the minimum boundary distance is greater than or equal to the second preset value, the moving target is far from the electronic fence, and the maximum-intensity reminder is given to the moving target to remind it to return to the electronic fence. When the moving target is outside the electronic fence and the duration for which the minimum boundary distance is greater than or equal to the second preset value is greater than the preset time (for example, 1 minute), the protection mode is entered, and the minimum-intensity reminder is given to the moving target to avoid other accidents due to excessive reminder intensity.
[0100] In other embodiments, if the minimum boundary distance corresponding to the moving target gradually decreases from being greater than or equal to the second preset value and is less than the second preset value, a linear reminder is still given to the moving target, and the reminder intensity weakens as the minimum boundary distance decreases. When the minimum boundary distance corresponding to the moving target is less than or equal to the first preset value, the reminder ends. This embodiment gives corresponding-level targeted reminders to the moving target according to the minimum boundary distance, the internal and external positions of the moving target in the electronic fence, and the preset reminder mechanism, with strong guidance and a strong effect of prompting the moving target to return to the electronic fence.
[0101] Figure 4 The structural schematic diagram of the computer device embodiment of the present invention is shown. The specific implementation of the computer device in the specific embodiment of the present invention is not limited.
[0102] As Figure 4 shown, the computer device may include: a processor 402, a communications interface 404, a memory 406, and a communication bus 408.
[0103] Wherein: the processor 402, the communication interface 404, and the memory 406 communicate with each other through the communication bus 408. The communication interface 404 is used to communicate with network elements of other computer devices such as clients or other servers. The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in the above embodiments for computer devices.
[0104] Specifically, the program 410 may include program code, and the program code includes computer-executable instructions.
[0105] The processor 402 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. One or more processors included in the computer device may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.
[0106] The memory 406 is used to store the program 410. The memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
[0107] The program 410 can specifically be called by the processor 402 to cause the computer device to perform the following operations:
[0108] Obtain the marking information of multiple boundary points, wherein the positioning device is worn on the moving target, and the marking information includes position information;
[0109] Construct a closed electronic fence according to the marking information of the multiple boundary points;
[0110] Obtain the GPS positioning information of the moving target, and according to the positioning information and the position information of the multiple boundary points, determine the boundary distances from the moving target to each boundary of the electronic fence, and determine the minimum boundary distance from all the boundary distances, wherein the boundary is a line segment determined by two adjacent boundary points;
[0111] According to the positioning information, the position information of the multiple boundary points, and a preset inside / outside boundary algorithm, determine whether the moving target is inside or outside the electronic fence;
[0112] Determine the relative position of the moving target with respect to the electronic fence according to the minimum boundary distance and the inside / outside position.
[0113] In an alternative manner, the method for obtaining the GPS positioning information of the moving target, determining the boundary distances from the moving target to each boundary of the electronic fence according to the positioning information and the position information of multiple boundary points, and determining the minimum boundary distance from all the boundary distances includes:
[0114] Establish a plane rectangular coordinate system, and respectively convert the positioning point where the moving target is located and multiple boundary points to the plane rectangular coordinate system according to the positioning information and the position information of multiple boundary points, so as to obtain a fence coordinate map;
[0115] Based on the fence coordinate map and a preset boundary distance algorithm, determine the boundary distances from the positioning point to each boundary in the fence coordinate map, and determine the minimum boundary distance from all the boundary distances.
[0116] In an alternative manner, the method for determining the boundary distances from the positioning point to each boundary in the fence coordinate map based on the fence coordinate map and a preset boundary distance algorithm, and determining the minimum boundary distance from all the boundary distances includes:
[0117] For each boundary in the fence coordinate map, determine the perpendicular line from the positioning point to the straight line where the boundary is located, and determine the first intersection point of the perpendicular line and the straight line where the boundary is located;
[0118] Determine whether the abscissa values of the two boundary points of the boundary are equal;
[0119] If the abscissa values of the two boundary points of the boundary are equal, determine whether the ordinate value of the first intersection point is respectively greater than the ordinate values of the two boundary points of the boundary, or whether the ordinate value of the first intersection point is respectively less than the ordinate values of the two boundary points of the boundary;
[0120] If the ordinate value of the first intersection point is respectively greater than the ordinate values of the two boundary points of the boundary, or the ordinate value of the first intersection point is respectively less than the ordinate values of the two boundary points of the boundary, obtain the minimum value of the first distances from the positioning point to the two boundary points of the boundary, and use the minimum value of the first distances as the boundary distance; if the ordinate value of the first intersection point is between the ordinate values of the two boundary points of the boundary, or the ordinate value of the first intersection point is equal to the ordinate value of any one of the two boundary points of the boundary, use the distance from the positioning point to the first intersection point as the boundary distance;
[0121] If the abscissa values of the two boundary points of the boundary are not equal, determine whether the abscissa value of the first intersection point is respectively greater than the abscissa values of the two boundary points of the boundary, or whether the abscissa value of the first intersection point is respectively less than the abscissa values of the two boundary points of the boundary;
[0122] If the abscissa values of the first intersection point are respectively greater than the abscissa values of the two boundary points of the boundary, or the abscissa values of the first intersection point are respectively less than the abscissa values of the two boundary points of the boundary, then obtain the second minimum distance from the positioning point to the two boundary points of the boundary, and use the second minimum distance as the boundary distance; if the abscissa value of the first intersection point is between the abscissa values of the two boundary points of the boundary, or the abscissa value of the first intersection point is equal to the abscissa value of any one of the two boundary points of the boundary, then use the distance from the positioning point to the first intersection point as the boundary distance;
[0123] Determine the minimum boundary distance from all the boundary distances.
[0124] In an optional manner, the dotting information further includes a dotting order. The determining of the internal and external positions of the moving target with respect to the electronic fence according to the positioning information, the position information of a plurality of boundary points, and a preset boundary internal and external algorithm includes:
[0125] For each boundary in the fence coordinate diagram, determine whether the abscissa value of the positioning point is between the abscissa values of the two boundary points of the boundary, or equal to the abscissa value of the first boundary point of the two boundary points, where the boundary point with the earlier dotting order is the first boundary point, and the boundary point with the later dotting order is the second boundary point;
[0126] If the abscissa value of the positioning point is between the abscissa values of the two boundary points of the boundary, or equal to the abscissa value of the first boundary point of the two boundary points, then determine a vertical line passing through the positioning point and perpendicular to the horizontal axis of the fence coordinate diagram, and determine a second intersection point of the vertical line and the boundary;
[0127] If the ordinate value of the second intersection point is greater than the ordinate value of the fixed point, then determine whether the abscissa value of the positioning point is equal to the abscissa value of the first boundary point of the boundary;
[0128] If the abscissa value of the positioning point is not equal to the abscissa value of the first boundary point of the boundary, then output the analysis result of the positioning point corresponding to the boundary;
[0129] If the abscissa value of the positioning point is equal to the abscissa value of the first boundary point of the boundary, then determine whether the abscissa value of the first boundary point is between the abscissa value of the previous boundary point of the first boundary point and the abscissa value of the second boundary point;
[0130] If the abscissa value of the first boundary point is between the abscissa value of the previous boundary point of the first boundary point and the abscissa value of the second boundary point, output the analysis result of the positioning point corresponding to the boundary;
[0131] Determine the internal or external position of the moving target within the electronic fence according to the total number of analysis results of all boundaries.
[0132] In an alternative way, the analysis result is 1, and determining the internal or external position of the moving target within the electronic fence according to the total number of analysis results of all boundaries includes:
[0133] If the sum of the analysis results of all boundaries is odd, the moving target is inside the electronic fence; if the sum of the analysis results of all boundaries is even, the moving target is outside the electronic fence.
[0134] In an alternative way, the method further includes:
[0135] Perform corresponding-level reminders on the moving target according to the relative position and a preset reminder mechanism.
[0136] In an alternative way, performing corresponding-level reminders on the moving target according to the relative position and a preset reminder mechanism includes:
[0137] When the moving target is inside the electronic fence, the minimum boundary distance is greater than a first preset value and the minimum boundary distance is continuously increasing, or when the moving target is outside the electronic fence, the minimum boundary distance is less than a second preset value and the minimum boundary distance is continuously increasing, perform a linear reminder on the moving target. Among them, when the moving target moves from inside the electronic fence to the boundary, the minimum boundary distance corresponding to the boundary is negative and gradually increases; when the moving target is at the boundary, the minimum boundary distance corresponding to the boundary is zero; when the moving target moves from the boundary to outside the electronic fence, the minimum boundary distance corresponding to the boundary is positive and gradually increases;
[0138] When the moving target is outside the electronic fence and the minimum boundary distance is greater than or equal to the second preset value, perform the strongest reminder on the moving target;
[0139] When the moving target is outside the electronic fence and the duration for which the minimum boundary distance is greater than or equal to the second preset value is greater than a preset time, perform the weakest reminder on the moving target.
[0140] In an alternative way, the method further includes:
[0141] Receive the marking information of multiple boundary points marked on the GPS map interface of the positioning device, and store the marking information locally.
[0142] An embodiment of the present invention provides a computer-readable storage medium storing at least one executable instruction, which, when running on a computer device, causes the computer device to execute any of the above method embodiments.
[0143] An embodiment of the present invention provides a computer program, which can be called by a processor to cause a computer device to execute any of the above method embodiments.
[0144] An embodiment of the present invention provides a computer program product. The computer program product includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, which, when running on a computer, cause the computer to execute any of the above method embodiments.
[0145] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings based herein. The structure required to construct such systems will be apparent from the above description. In addition, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the present invention described herein can be implemented using various programming languages, and the description of a particular language above is for the purpose of disclosing the best mode of the present invention.
[0146] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0147] Similarly, it should be understood that, in order to streamline the present invention and assist in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting the intention that the claimed invention requires more features than are expressly recited in each claim.
[0148] Those skilled in the art can understand that the modules in the computer device in the embodiments can be adaptively changed and set in one or more computer devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or computer device so disclosed. Unless otherwise explicitly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.
[0149] It should be noted that the above embodiments illustrate the present invention rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims listing several devices, several of these devices can be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A positioning method based on a custom electronic fence, applied to a positioning device, characterized in that The method includes: Obtaining the dotting information of multiple boundary points, where the positioning device is worn on a moving target, and the dotting information includes position information; Constructing a closed electronic fence according to the dotting information of multiple boundary points; Obtaining the GPS positioning information of the moving target, and determining the boundary distances from the moving target to each boundary of the electronic fence according to the positioning information and the position information of multiple boundary points, and determining the minimum boundary distance from all the boundary distances, where the boundary is a line segment determined by two adjacent boundary points; Determining the internal and external positions of the moving target relative to the electronic fence according to the positioning information, the position information of multiple boundary points, and a preset internal and external boundary algorithm; Determining the relative position of the moving target with respect to the electronic fence according to the minimum boundary distance and the internal and external positions.
2. The method according to claim 1, wherein The step of obtaining the GPS positioning information of the moving target, and determining the boundary distances from the moving target to each boundary of the electronic fence according to the positioning information and the position information of multiple boundary points, and determining the minimum boundary distance from all the boundary distances includes: Establishing a plane rectangular coordinate system, and respectively converting the positioning point where the moving target is located and multiple boundary points to the plane rectangular coordinate system according to the positioning information and the position information of multiple boundary points to obtain a fence coordinate map; Based on the fence coordinate map and a preset boundary distance algorithm, determining the boundary distances from the positioning point to each boundary in the fence coordinate map, and determining the minimum boundary distance from all the boundary distances.
3. The method according to claim 2, wherein The step of based on the fence coordinate map and a preset boundary distance algorithm, determining the boundary distances from the positioning point to each boundary in the fence coordinate map, and determining the minimum boundary distance from all the boundary distances includes: For each boundary in the fence coordinate map, determining the perpendicular line from the positioning point to the straight line where the boundary is located, and determining the first intersection point of the perpendicular line and the straight line where the boundary is located; Determining whether the abscissa values of the two boundary points of the boundary are equal; If the abscissa values of the two boundary points of the boundary are equal, determining whether the ordinate value of the first intersection point is respectively greater than the ordinate values of the two boundary points of the boundary, or whether the ordinate value of the first intersection point is respectively less than the ordinate values of the two boundary points of the boundary; If the ordinate value of the first intersection point is respectively greater than the ordinate values of the two boundary points of the boundary, or the ordinate value of the first intersection point is respectively less than the ordinate values of the two boundary points of the boundary, obtaining the first minimum distance value from the positioning point to the two boundary points of the boundary, and using the first minimum distance value as the boundary distance; if the ordinate value of the first intersection point is between the ordinate values of the two boundary points of the boundary, or the ordinate value of the first intersection point is equal to the ordinate value of any one of the two boundary points of the boundary, using the distance from the positioning point to the first intersection point as the boundary distance; If the abscissa values of the two boundary points of the boundary are not equal, determine whether the abscissa value of the first intersection point is greater than the abscissa values of the two boundary points of the boundary respectively, or whether the abscissa value of the first intersection point is less than the abscissa values of the two boundary points of the boundary respectively; If the abscissa value of the first intersection point is greater than the abscissa values of the two boundary points of the boundary respectively, or the abscissa value of the first intersection point is less than the abscissa values of the two boundary points of the boundary respectively, obtain the second minimum distance from the positioning point to the two boundary points of the boundary respectively, and use the second minimum distance as the boundary distance; if the abscissa value of the first intersection point is between the abscissa values of the two boundary points of the boundary, or the abscissa value of the first intersection point is equal to the abscissa value of any one of the two boundary points of the boundary, use the distance from the positioning point to the first intersection point as the boundary distance; Determine the minimum boundary distance from all the boundary distances.
4. The method according to claim 2 or 3, characterized in that, The dotting information further includes a dotting sequence. Determining whether the moving target is inside or outside the electronic fence according to the positioning information, the position information of multiple boundary points, and a preset inside / outside boundary algorithm includes: For each boundary in the fence coordinate map, determine whether the abscissa value of the positioning point is between the abscissa values of the two boundary points of the boundary, or equal to the abscissa value of the first boundary point among the two boundary points of the boundary, where the boundary with a prior dotting sequence is the first boundary point, and the boundary with a subsequent dotting sequence is the second boundary point; If the abscissa value of the positioning point is between the abscissa values of the two boundary points of the boundary, or equal to the abscissa value of the first boundary point among the two boundary points of the boundary, determine a vertical line passing through the positioning point and perpendicular to the horizontal axis of the fence coordinate map, and determine the second intersection point of the vertical line and the boundary; If the ordinate value of the second intersection point is greater than the ordinate value of the fixed point, determine whether the abscissa value of the positioning point is equal to the abscissa value of the first boundary point of the boundary; If the abscissa value of the positioning point is not equal to the abscissa value of the first boundary point of the boundary, output the analysis result corresponding to the positioning point for the boundary; If the abscissa value of the positioning point is equal to the abscissa value of the first boundary point of the boundary, determine whether the abscissa value of the first boundary point is between the abscissa value of the previous boundary point of the first boundary point and the abscissa value of the second boundary point; If the abscissa value of the first boundary point is between the abscissa value of the previous boundary point of the first boundary point and the abscissa value of the second boundary point, output the analysis result corresponding to the positioning point for the boundary; Determine the inside / outside position of the moving target in the electronic fence according to the total number of analysis results of all boundaries.
5. The method according to claim 4, wherein The analysis result is 1. Determining the inside / outside position of the moving target in the electronic fence according to the total number of analysis results of all boundaries includes: If the sum of the analysis results of all boundaries is odd, the moving target is inside the electronic fence; if the sum of the analysis results of all boundaries is even, the moving target is outside the electronic fence.
6. The method according to claim 4, characterized in that, The method further includes: Performing a corresponding level of reminder on the moving target according to the relative position and a preset reminder mechanism.
7. The method according to claim 6, characterized in that, The performing a corresponding level of reminder on the moving target according to the relative position and a preset reminder mechanism includes: When the moving target is inside the electronic fence, the minimum boundary distance is greater than a first preset value and the minimum boundary distance is continuously increasing, or when the moving target is outside the electronic fence, the minimum boundary distance is less than a second preset value and the minimum boundary distance is continuously increasing, performing a linear reminder on the moving target. Wherein, when the moving target moves from inside the electronic fence to the boundary, the minimum boundary distance corresponding to the boundary is negative and gradually increases; when the moving target is at the boundary, the minimum boundary distance corresponding to the boundary is zero; when the moving target moves from the boundary to outside the electronic fence, the minimum boundary distance corresponding to the boundary is positive and gradually increases; When the moving target is outside the electronic fence and the minimum boundary distance is greater than or equal to the second preset value, performing the strongest reminder on the moving target; When the moving target is outside the electronic fence, the minimum boundary distance is greater than or equal to the second preset value and the duration for which this state persists is greater than a preset time, performing the weakest reminder on the moving target.
8. The method according to claim 1, characterized in that The method further includes: Receiving the dotting information of multiple boundary points marked on the GPS map interface of the positioning device and storing the dotting information locally.
9. A computer device, characterized in that, including: A processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface complete communication with each other through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, At least one executable instruction is stored in the storage medium, and when the executable instruction runs on a computer device, it causes the computer device to execute the method according to any one of claims 1-8.
Citation Information
Patent Citations
Electronic fence detection method and electronic equipment
CN110599717A
Positioning method and device
CN114814802A
Effective activity duration statistical method and device, equipment and storage medium
CN118075688A
Electronic geo-fence detection method and system, and embedded device
CN119450355A