Method for detecting vehicles entering and exiting from virtual electronic fence

By setting the range of virtual electronic fences on the electronic map and using the ray method to determine the vehicle position, the problem of low detection efficiency of virtual electronic fences is solved, and more efficient and accurate vehicle supervision is achieved.

CN119207107AInactive Publication Date: 2024-12-27YIXUNTONG TECH CO LTD

Patent Information

Application Number
CN202411730572.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The vehicle inspection efficiency of virtual electronic fences is low, which affects regulatory efficiency and accuracy.

Method used

By setting the virtual electronic fence range, the fence external rectangle range and the fence internal rectangle range on the electronic map, combining the vehicle status information, the ray method is used to determine whether the vehicle is within the virtual electronic fence range, and quickly eliminate position points that are obviously beyond the range. Determine the uncertain position point to generate accurate driving in and out judgment results.

Benefits of technology

It improves the efficiency and accuracy of vehicle inspection of virtual electronic fences, reduces the requirements for server computing power, and enhances the real-time and accuracy of supervision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119207107A_ABST
    Figure CN119207107A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of official business vehicle supervision, and particularly provides a virtual electronic fence-based access vehicle detection method, which comprises the following steps of: determining a fence area on an electronic map in response to a fence setting instruction; obtaining vehicle state information sent by the vehicle-mounted terminal; preliminarily judging the current position of the vehicle according to the fence external rectangular range, the fence internal rectangular range and the vehicle state information; if the vehicle is in the fence external rectangular range and is not in the fence internal rectangular range, whether the vehicle is in the virtual electronic fence range or not is judged according to the virtual electronic fence range and the vehicle state information; if the vehicle is not in the virtual electronic fence range, whether the vehicle just drives out of the virtual electronic fence range or not is judged according to the vehicle state information received last time; and if the vehicle is in the virtual electronic fence range, judging whether the vehicle just enters the virtual electronic fence range or not according to the vehicle state information received last time, so as to solve the problem that the detection efficiency of the access vehicle of the virtual electronic fence is relatively low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of official vehicle supervision, and in particular to a method for detecting vehicles entering and exiting a virtual electronic fence. Background Art

[0002] In the process of using and managing official vehicles, some sensitive areas or prohibited areas are often subject to high supervision. When official vehicles enter or leave these areas, supervisors need to be reminded immediately so that they can take control measures in a timely manner. At the same time, supervision requires real-time calculation of which official vehicles are in a specified area.

[0003] In the related technology, electronic fences are usually used to achieve the above purpose, that is, a closed area is drawn on the electronic map, which is represented as a sensitive area and a prohibited area. Combined with the positioning terminal installed on the official vehicle, the current position of the official vehicle is judged according to the real-time position uploaded by the positioning terminal to determine whether it is within the drawn range, thereby identifying whether the vehicle enters or exits the electronic fence. Among them, it is necessary to send the fence range information to the device, bind it to the vehicle, and use edge computing to judge and identify it on the device side. However, in the face of some devices that do not have fence computing functions, they can only be judged by central computing on the server side. Since the virtual range includes administrative areas, circular ranges, rectangular ranges, and irregular polygonal ranges, the requirements for the server's CPU and computing power are relatively high, forcing the official vehicle information platform to have high requirements for the server's computing power, affecting the detection efficiency. Summary of the invention

[0004] The present application provides a method for detecting vehicles entering and exiting a virtual electronic fence, so as to solve the problem of low efficiency of detecting vehicles entering and exiting a virtual electronic fence.

[0005] The present application provides a method for detecting vehicles entering and exiting a virtual electronic fence, the method comprising: In response to a fence setting instruction, determining a fence area on an electronic map; the fence setting instruction is used to set a fence area; the fence area includes a virtual electronic fence range, a fence circumscribed rectangular range, and a fence inscribed rectangular range; Acquire vehicle status information sent by the vehicle-mounted terminal at a preset time frequency; the vehicle status information includes the position and speed of the vehicle; Preliminarily determining the current position of the vehicle according to the circumscribed rectangular range of the fence, the inscribed rectangular range of the fence and the vehicle status information; If the vehicle is within the rectangular range outside the fence and not within the rectangular range inside the fence, determining whether the vehicle is within the virtual electronic fence range according to the virtual electronic fence range and the vehicle status information; If the vehicle is not within the virtual electronic fence, determining whether the vehicle has just exited the virtual electronic fence according to the vehicle status information received last time, so as to generate an exit determination result; If the vehicle is within the virtual electronic fence, it is determined whether the vehicle has just entered the virtual electronic fence according to the vehicle status information received last time, so as to generate an entry determination result.

[0006] The current position of the vehicle is preliminarily determined by the fence circumscribed rectangular range and the fence inscribed rectangular range of the virtual electronic fence to quickly exclude most of the determined position points and leave a very small number of uncertain position points. The uncertain position points and the vehicle status information received last time are further judged to obtain accurate vehicle entry and exit judgment results, thereby solving the problem of low efficiency in detecting vehicles entering and leaving the virtual electronic fence.

[0007] Optionally, in response to the fence setting instruction, the step of determining the fence area on the electronic map includes: In response to the fence setting instruction, drawing a virtual electronic fence range on the electronic map; Calculating the fence circumscribed rectangular range and the fence inscribed rectangular range of the virtual electronic fence range; The information of the virtual electronic fence range, the fence circumscribed rectangular range, and the fence inscribed rectangular range is saved.

[0008] Drawing a virtual electronic fence range on an electronic map according to the fence setting instruction and calculating the fence circumscribed rectangular range and the fence inscribed rectangular range not only improves management efficiency and accuracy, but also facilitates modification of the virtual electronic fence range.

[0009] Optionally, the step of preliminarily determining the current position of the vehicle according to the circumscribed rectangular range of the fence, the inscribed rectangular range of the fence and the vehicle status information includes: projecting the current position of the vehicle onto the electronic map; Determine whether the current position of the vehicle is within the circumscribed rectangle of the fence according to the diagonal coordinates of the circumscribed rectangle of the fence; If the current position of the vehicle is not within the circumscribed rectangular range of the fence, it is determined that the current position of the vehicle is not within the range of the virtual electronic fence; If the current position of the vehicle is within the circumscribed rectangular range of the fence, determine whether the current position of the vehicle is within the circumscribed rectangular range of the fence according to the diagonal coordinates of the circumscribed rectangular range of the fence; If the current position of the vehicle is within a rectangular range within the fence, then determining that the current position of the vehicle is within the virtual electronic fence range; By projecting the current position of the vehicle on the electronic map, the position of the vehicle can be displayed intuitively, which is convenient for subsequent judgment and analysis. First, judging whether the current position of the vehicle is outside the range of the fence based on the diagonal coordinates of the circumscribed rectangle of the fence can quickly exclude those situations that are obviously beyond the fence range, and then further judging whether the vehicle is within the inscribed rectangle range based on the diagonal coordinates of the inscribed rectangle range, it can quickly determine whether the vehicle is obviously within the virtual electronic fence range, so as to improve the judgment efficiency.

[0010] Optionally, the step of determining whether the vehicle is within the virtual electronic fence range according to the virtual electronic fence range and the vehicle status information includes: Determine whether the current position of the vehicle is within the range of the virtual electronic fence according to the ray method; If the current position of the vehicle is within the virtual electronic fence, determining that the current position of the vehicle is within the virtual electronic fence; If the current position of the vehicle is not within the range of the virtual electronic fence, it is determined that the current position of the vehicle is not within the range of the virtual electronic fence.

[0011] By judging whether the current position of the vehicle is within the range of the virtual electronic fence according to the ray method, the number and complexity of calculations can be effectively reduced, thereby reducing the requirements for computing power.

[0012] Optionally, the step of determining whether the vehicle has just exited the virtual electronic fence according to the vehicle status information received last time to generate an exit determination result includes: projecting the last position of the vehicle onto the electronic map; Determine whether the last position of the vehicle is within the range of the virtual electronic fence according to the ray method; If the last position of the vehicle is within the virtual electronic fence, it is determined that the vehicle has just driven out of the virtual electronic fence; If the last position of the vehicle is not within the range of the virtual electronic fence, it is determined that the vehicle has not entered the range of the virtual electronic fence.

[0013] By projecting the last position of the vehicle on the electronic map and using the ray method to determine whether the last position of the vehicle is within the virtual electronic fence, it is helpful to timely understand the driving situation of the vehicle. In addition, since the above steps are based on the last position of the vehicle, they have high real-time performance. Once the position of the vehicle changes, a new judgment can be made immediately, thereby updating the status information of the vehicle in a timely manner.

[0014] Optionally, the step of determining whether the vehicle has just entered the virtual electronic fence range according to the vehicle state information received last time to generate an entry determination result includes: projecting the last position of the vehicle onto the electronic map; Determine whether the last position of the vehicle is within the range of the virtual electronic fence according to the ray method; If the last location of the vehicle is within the virtual electronic fence, it is determined that the vehicle is still traveling within the virtual electronic fence; If the last position of the vehicle is not within the virtual electronic fence range, it is determined that the vehicle has just entered the virtual electronic fence range.

[0015] By projecting the last position of the vehicle on the electronic map and using the ray method to determine whether the last position of the vehicle is within the virtual electronic fence, it helps managers to understand the driving status of the vehicle in a timely manner. In addition, since the above steps are based on the last position of the vehicle, they have high real-time performance. Once the position of the vehicle changes, a new judgment can be made immediately, thereby updating the vehicle status information in a timely manner.

[0016] Optionally, the step of judging whether the current position of the vehicle is within the circumscribed rectangular range of the fence according to the diagonal coordinates of the circumscribed rectangular range of the fence comprises: Determine the coordinates of the vertices of the four sides of the circumscribed rectangle of the fence and the coordinates of the current position of the vehicle; Calculate the diagonal coordinates of the circumscribed rectangle of the fence according to the coordinates of the four side vertices; Calculate the boundary of the minimum fence circumscribed rectangle according to the diagonal coordinates; Determining whether the coordinates of the current position of the vehicle are all within the boundaries of the minimum fence circumscribed rectangle; If the coordinates of the current position of the vehicle are not within the boundary of the minimum fence circumscribed rectangle, then the current position of the vehicle is not within the fence circumscribed rectangle; If the coordinates of the current position of the vehicle are all within the boundary of the minimum fence circumscribed rectangular range, then the current position of the vehicle is within the fence circumscribed rectangular range.

[0017] By determining the coordinates of the four vertices of the fence circumscribed rectangle and the current position coordinates of the vehicle, and calculating the diagonal coordinates based on the coordinates of the four vertices of the fence circumscribed rectangle, it helps to simplify the subsequent boundary calculation process. By calculating the boundary of the minimum fence circumscribed rectangle and judging whether the current position coordinates of the vehicle are all within the boundary, it is possible to effectively judge whether the vehicle is within the fence circumscribed rectangle, ensuring the accuracy and reliability of the judgment and improving efficiency.

[0018] Optionally, the step of judging whether the current position of the vehicle is within the rectangular range inscribed in the fence according to the diagonal coordinates of the rectangular range inscribed in the fence comprises: Determine the coordinates of the vertices of the four sides of the rectangular range inscribed in the fence and the coordinates of the current position of the vehicle; Calculate the diagonal coordinates of the rectangular range inscribed in the fence according to the coordinates of the four side vertices; Calculate the boundary of the minimum inscribed rectangle of the fence according to the diagonal coordinates; Determine whether the coordinates of the current position of the vehicle are all within the boundaries of the rectangular range inscribed in the minimum fence; If the coordinates of the current position of the vehicle are not within the boundary of the rectangular range inscribed in the minimum fence, then the current position of the vehicle is not within the rectangular range inscribed in the fence; If the coordinates of the current position of the vehicle are all within the boundary of the rectangular range inscribed in the minimum fence, then the current position of the vehicle is within the rectangular range inscribed in the fence.

[0019] By determining the coordinates of the four vertices of the inscribed rectangle of the fence and the current position of the vehicle, and calculating the diagonal coordinates based on the coordinates of the four vertices of the inscribed rectangle of the fence, it helps to simplify the subsequent boundary calculation process. By calculating the boundary of the minimum inscribed rectangle of the fence and judging whether the current position of the vehicle is within the boundary, it is possible to effectively judge whether the vehicle is within the inscribed rectangle of the fence, ensuring the accuracy and reliability of the judgment and improving efficiency.

[0020] Optionally, the step of determining whether the current position of the vehicle is within the range of the virtual electronic fence according to the ray method includes: Determine the coordinates of the boundary information of the virtual electronic fence range and the coordinates of the current position of the vehicle; Constructing a ray with the coordinates of the current position of the vehicle as a starting point; Traversing each edge of the virtual electronic fence range, and calculating the number of intersections between the ray and each edge; If the number of intersections is an odd number, the current position of the vehicle is within the range of the virtual electronic fence; If the number of intersections is an even number, the current position of the vehicle is not within the range of the virtual electronic fence.

[0021] By determining the coordinates of the boundary information of the virtual electronic fence range and the coordinates of the vehicle's current position, and using the ray method to determine whether the vehicle's current position is within the virtual electronic fence range, it is possible to effectively determine whether the point is inside the polygon, thereby achieving accurate judgment of whether the vehicle's current position is within the virtual electronic fence range, and improving the accuracy and efficiency of monitoring and management.

[0022] Optionally, the vehicle-mounted terminal is provided with an alarm device; the method further comprises: According to preset business rules, the exit determination result and the entry determination result are pushed to the system platform; and a determination result warning instruction is generated according to the exit determination result and the entry determination result; Sending the result warning instruction to the vehicle terminal; The vehicle-mounted terminal controls the alarm device to send a determination result alarm according to the alarm instruction to alert the driver of the vehicle.

[0023] Based on preset business rules, the exit judgment results and the entry judgment results are pushed to the system platform, and a judgment result warning instruction is generated and sent to the vehicle terminal, which can ensure real-time monitoring and timely feedback of the vehicle status; the vehicle terminal controls the alarm device to send the judgment result warning according to the warning instruction, which can warn the driver in time and reduce the probability of accidents.

[0024] As can be seen from the above technical solutions, the present application provides a method for detecting vehicles entering and exiting a virtual electronic fence, the method comprising: determining a fence area on an electronic map in response to a fence setting instruction; the fence setting instruction is used to set a fence area; the fence area includes a virtual electronic fence range, a fence circumscribed rectangular range, and a fence inscribed rectangular range; obtaining vehicle status information sent by a vehicle-mounted terminal at a preset time frequency; the vehicle status information includes the position and speed of the vehicle; preliminarily determining the current position of the vehicle according to the fence circumscribed rectangular range, the fence inscribed rectangular range, and the vehicle status information; if the vehicle is within the fence circumscribed rectangular range and not within the fence inscribed rectangular range, determining whether the vehicle is within the virtual electronic fence range according to the virtual electronic fence range and the vehicle status information; if the vehicle is not within the virtual electronic fence range, determining whether the vehicle has just exited the virtual electronic fence range according to the vehicle status information received last time, so as to generate an exit determination result; if the vehicle is within the virtual electronic fence range, determining whether the vehicle has just entered the virtual electronic fence range according to the vehicle status information received last time, so as to generate an entry determination result. Solve the problem of low efficiency in detecting vehicles entering and leaving the virtual electronic fence. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 A schematic diagram of a flow chart of a method for detecting vehicles entering and exiting a virtual electronic fence according to an embodiment of the present application; Figure 2 A schematic diagram of the structure of the fence area in the method for detecting vehicles entering and exiting a virtual electronic fence according to an embodiment of the present application; Figure 3 A schematic diagram of a flow chart of generating an exit determination result in a method for detecting vehicles entering and exiting a virtual electronic fence according to an embodiment of the present application; Figure 4 A schematic diagram of a process for generating an entry determination result in a method for detecting vehicles entering and exiting a virtual electronic fence as described in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The embodiments will be described in detail below, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation methods described in the following embodiments do not represent all implementation methods consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application.

[0028] To solve the problem of low efficiency of vehicle detection in and out of virtual electronic fences, see Figure 1-Figure 2 , an embodiment of the present application provides a method for detecting vehicles entering and exiting a virtual electronic fence, the method comprising: S100: In response to a fence setting instruction, determining a fence area on an electronic map.

[0029] The fence setting instruction is used to set a fence area; the fence area includes a virtual electronic fence range, a fence circumscribed rectangular range, and a fence inscribed rectangular range.

[0030] S200: Acquire vehicle status information sent by the vehicle terminal at a preset time frequency.

[0031] The vehicle status information includes the position and speed of the vehicle.

[0032] S300: Preliminarily determine the current position of the vehicle according to the circumscribed rectangular range of the fence, the inscribed rectangular range of the fence and the vehicle status information.

[0033] S310: If the vehicle is not within the circumscribed rectangular range of the fence, then the vehicle is not within the virtual electronic fence range.

[0034] S320: If the vehicle is within a rectangular range within the fence, the vehicle is within the virtual electronic fence range.

[0035] S330: If the vehicle is within the rectangular range outside the fence and not within the rectangular range inside the fence, determine whether the vehicle is within the virtual electronic fence range according to the virtual electronic fence range and the vehicle status information.

[0036] S410: If the vehicle is not within the virtual electronic fence, determine whether the vehicle has just exited the virtual electronic fence based on the vehicle status information received last time, so as to generate an exit determination result.

[0037] S420: If the vehicle is within the virtual electronic fence, determine whether the vehicle has just entered the virtual electronic fence based on the vehicle status information received last time, so as to generate an entry determination result.

[0038] It should be understood that the preset time frequency can be predetermined according to the position and speed of the vehicle. For example, in a speed limit area, the preset time frequency can be set to send vehicle status information once every 6-10 seconds according to the vehicle speed; in a high-speed area, the preset time frequency can be set to send vehicle status information once every 1-3 seconds according to the vehicle speed.

[0039] The current position of the vehicle is preliminarily determined by the fence circumscribed rectangular range and the fence inscribed rectangular range of the virtual electronic fence to quickly exclude most of the determined position points and leave a very small number of uncertain position points. The uncertain position points and the vehicle status information received last time are further judged to obtain accurate vehicle entry and exit judgment results, thereby solving the problem of low efficiency in detecting vehicles entering and leaving the virtual electronic fence.

[0040] In some embodiments, in response to the fence setting instruction, the step of determining the fence area on the electronic map includes: In response to the fence setting instruction, a virtual electronic fence range is drawn on the electronic map.

[0041] The outer bounding rectangle range of the virtual electronic fence and the inner bounding rectangle range of the virtual electronic fence are calculated.

[0042] The information of the virtual electronic fence range, the fence circumscribed rectangular range, and the fence inscribed rectangular range is saved.

[0043] It should be understood that the fence setting instruction is specifically set according to the sensitive areas and prohibited areas in the use and management of official vehicles. The fence circumscribed rectangle range and fence inscribed rectangle range of the virtual electronic fence range can be quickly calculated by built-in geographic information system software.

[0044] Drawing a virtual electronic fence range on an electronic map according to the fence setting instruction and calculating the fence circumscribed rectangular range and the fence inscribed rectangular range not only improves management efficiency and accuracy, but also facilitates modification of the virtual electronic fence range.

[0045] In some embodiments, the step of preliminarily determining the current position of the vehicle according to the circumscribed rectangular range of the fence, the inscribed rectangular range of the fence and the vehicle status information includes: The current position of the vehicle is projected onto the electronic map.

[0046] It is determined whether the current position of the vehicle is within the circumscribed rectangular range of the fence according to the diagonal coordinates of the circumscribed rectangular range of the fence.

[0047] If the current position of the vehicle is not within the circumscribed rectangular range of the fence, it is determined that the current position of the vehicle is not within the virtual electronic fence range.

[0048] If the current position of the vehicle is within the circumscribed rectangular range of the fence, it is determined whether the current position of the vehicle is within the circumscribed rectangular range of the fence according to the diagonal coordinates of the circumscribed rectangular range of the fence.

[0049] If the current position of the vehicle is within a rectangular range within the fence, it is determined that the current position of the vehicle is within the virtual electronic fence range.

[0050] By projecting the current position of the vehicle on the electronic map, the position of the vehicle can be displayed intuitively, which is convenient for subsequent judgment and analysis. First, judging whether the current position of the vehicle is outside the range of the fence based on the diagonal coordinates of the circumscribed rectangle of the fence can quickly exclude those situations that are obviously beyond the fence range, and then further judging whether the vehicle is within the inscribed rectangle range based on the diagonal coordinates of the inscribed rectangle range, it can quickly determine whether the vehicle is obviously within the virtual electronic fence range, so as to improve the judgment efficiency.

[0051] In some embodiments, the step of determining whether the vehicle is within the virtual electronic fence range according to the virtual electronic fence range and the vehicle status information includes: It is determined whether the current position of the vehicle is within the range of the virtual electronic fence according to the ray method.

[0052] If the current position of the vehicle is within the virtual electronic fence range, it is determined that the current position of the vehicle is within the virtual electronic fence range.

[0053] If the current position of the vehicle is not within the range of the virtual electronic fence, it is determined that the current position of the vehicle is not within the range of the virtual electronic fence.

[0054] By judging whether the current position of the vehicle is within the range of the virtual electronic fence according to the ray method, the number and complexity of calculations can be effectively reduced, thereby reducing the requirements for computing power.

[0055] In some embodiments, see Figure 3The step of determining whether the vehicle has just exited the virtual electronic fence range according to the vehicle status information received last time to generate an exit determination result includes: S411: Projecting the last position of the vehicle onto the electronic map.

[0056] S412: Determine whether the last position of the vehicle is within the range of the virtual electronic fence according to the ray method.

[0057] S413: If the last location of the vehicle is within the virtual electronic fence, it is determined that the vehicle has just exited the virtual electronic fence.

[0058] S414: If the last position of the vehicle is not within the virtual electronic fence, it is determined that the vehicle has not entered the virtual electronic fence.

[0059] It should be understood that the exit determination result includes that the vehicle has just exited the virtual electronic fence range and that the vehicle has not entered the virtual electronic fence range.

[0060] By projecting the last position of the vehicle on the electronic map and using the ray method to determine whether the last position of the vehicle is within the virtual electronic fence, it is helpful to timely understand the driving situation of the vehicle. In addition, since the above steps are based on the last position of the vehicle, they have high real-time performance. Once the position of the vehicle changes, a new judgment can be made immediately, thereby updating the status information of the vehicle in a timely manner.

[0061] In some embodiments, see Figure 4 The step of determining whether the vehicle has just entered the virtual electronic fence range according to the vehicle status information received last time to generate an entry determination result includes: S421: Projecting the last position of the vehicle onto the electronic map.

[0062] S422: Determine whether the last position of the vehicle is within the range of the virtual electronic fence according to the ray method.

[0063] S423: If the last location of the vehicle is within the virtual electronic fence, determine that the vehicle is still within the virtual electronic fence.

[0064] S424: If the last position of the vehicle is not within the virtual electronic fence, it is determined that the vehicle has just entered the virtual electronic fence.

[0065] It should be understood that the entry determination result includes that the vehicle is still driving in the virtual electronic fence range and the vehicle has just entered the virtual electronic fence range.

[0066] By projecting the last position of the vehicle on the electronic map and using the ray method to determine whether the last position of the vehicle is within the virtual electronic fence, it helps managers to understand the driving status of the vehicle in a timely manner. In addition, since the above steps are based on the last position of the vehicle, they have high real-time performance. Once the position of the vehicle changes, a new judgment can be made immediately, thereby updating the vehicle status information in a timely manner.

[0067] In some embodiments, the step of determining whether the current position of the vehicle is within the circumscribed rectangular range of the fence according to the diagonal coordinates of the circumscribed rectangular range of the fence comprises: The coordinates of the vertices of the four sides of the circumscribed rectangle of the fence and the coordinates of the current position of the vehicle are determined.

[0068] The diagonal coordinates of the circumscribed rectangular range of the fence are calculated according to the coordinates of the four side vertices.

[0069] The boundary of the minimum fence circumscribed rectangle is calculated according to the diagonal coordinates.

[0070] It is determined whether the coordinates of the current position of the vehicle are all within the boundary of the minimum fence circumscribed rectangle.

[0071] If the coordinates of the current position of the vehicle are not within the boundary of the minimum fence circumscribed rectangle, then the current position of the vehicle is not within the fence circumscribed rectangle.

[0072] If the coordinates of the current position of the vehicle are all within the boundary of the minimum fence circumscribed rectangular range, then the current position of the vehicle is within the fence circumscribed rectangular range.

[0073] Specifically, assume that the coordinates of the four vertices of the fence circumscribed rectangle are (x1, y1), (x2, y1), (x2, y2), (x1, y2), x1 is less than x2 and y1 is less than y2; the coordinates of the current position of the vehicle are (xc, yc); then the diagonal coordinates of the fence circumscribed rectangle are (x1, y1) and (x2, y2); since the boundary of the minimum fence circumscribed rectangle is defined by its diagonal, that is, from (x1, y1) to (x2, y2), the lower left corner of this rectangle is (x1, y1) and the upper right corner is (x2, y2); when x1≤xc≤x2 and y1≤yc≤y2, the current position of the vehicle is within the fence circumscribed rectangle, otherwise the current position of the vehicle is not within the fence circumscribed rectangle. The specific steps for determining whether the current position of the vehicle is within the fence circumscribed rectangle are similar to the above and are not described here.

[0074] By determining the coordinates of the four vertices of the fence circumscribed rectangle and the current position coordinates of the vehicle, and calculating the diagonal coordinates based on the coordinates of the four vertices of the fence circumscribed rectangle, it helps to simplify the subsequent boundary calculation process. By calculating the boundary of the minimum fence circumscribed rectangle and judging whether the current position coordinates of the vehicle are all within the boundary, it is possible to effectively judge whether the vehicle is within the fence circumscribed rectangle, ensuring the accuracy and reliability of the judgment and improving efficiency.

[0075] In some embodiments, the step of determining whether the current position of the vehicle is within the rectangular range inscribed in the fence according to the diagonal coordinates of the rectangular range inscribed in the fence comprises: The coordinates of the vertices of the four sides of the rectangular range inscribed in the fence and the coordinates of the current position of the vehicle are determined.

[0076] The diagonal coordinates of the rectangular range inscribed in the fence are calculated according to the coordinates of the four side vertices.

[0077] The boundary of the minimum fence inscribed rectangle is calculated according to the diagonal coordinates.

[0078] It is determined whether the coordinates of the current position of the vehicle are all within the boundary of the rectangular range inscribed in the minimum fence.

[0079] If the coordinates of the current position of the vehicle are not within the boundary of the minimum fence-enclosed rectangular range, then the current position of the vehicle is not within the fence-enclosed rectangular range.

[0080] If the coordinates of the current position of the vehicle are all within the boundary of the rectangular range inscribed in the minimum fence, then the current position of the vehicle is within the rectangular range inscribed in the fence.

[0081] By determining the coordinates of the four vertices of the inscribed rectangle of the fence and the current position of the vehicle, and calculating the diagonal coordinates based on the coordinates of the four vertices of the inscribed rectangle of the fence, it helps to simplify the subsequent boundary calculation process. By calculating the boundary of the minimum inscribed rectangle of the fence and judging whether the current position of the vehicle is within the boundary, it is possible to effectively judge whether the vehicle is within the inscribed rectangle of the fence, ensuring the accuracy and reliability of the judgment and improving efficiency.

[0082] In some embodiments, the step of determining whether the current position of the vehicle is within the range of the virtual electronic fence according to the ray method includes: The coordinates of the boundary information of the virtual electronic fence range and the coordinates of the current position of the vehicle are determined.

[0083] A ray is constructed starting from the coordinates of the current position of the vehicle.

[0084] Each edge of the virtual electronic fence range is traversed, and the number of intersections between the ray and each edge is calculated.

[0085] If the number of intersections is an odd number, the current position of the vehicle is within the range of the virtual electronic fence.

[0086] If the number of intersections is an even number, the current position of the vehicle is not within the range of the virtual electronic fence.

[0087] It should be understood that the virtual electronic fence range can be considered to be composed of polygons. By determining the coordinates of the boundary information of the virtual electronic fence range and the coordinates of the current position of the vehicle, and using the ray method to determine whether the current position of the vehicle is within the virtual electronic fence range, it is possible to effectively determine whether the point is inside the polygon, and achieve accurate judgment of whether the current position of the vehicle is within the virtual electronic fence range, thereby improving the accuracy and efficiency of monitoring and management.

[0088] In some embodiments, the vehicle-mounted terminal is provided with an alarm device. The method further includes: According to preset business rules, the exit determination result and the entry determination result are pushed to the system platform. And a determination result warning instruction is generated according to the exit determination result and the entry determination result; Sending the result warning instruction to the vehicle terminal; The vehicle-mounted terminal controls the alarm device to send a determination result alarm according to the alarm instruction to alert the driver of the vehicle.

[0089] It should be understood that the preset business rules are formulated based on multiple aspects such as security, compliance, and efficiency, and can be implemented through a rule engine, which can decouple the preset business rules from the application code and use specific semantics to write the preset business rules so as to make corresponding business decisions based on the preset business rules for the received external facts. If it is determined that the vehicle has not entered the range of the virtual electronic fence, there is no need to generate a judgment result warning instruction.

[0090] Based on preset business rules, the exit judgment results and the entry judgment results are pushed to the system platform, and a judgment result warning instruction is generated and sent to the vehicle terminal, which can ensure real-time monitoring and timely feedback of the vehicle status; the vehicle terminal controls the alarm device to send the judgment result warning according to the warning instruction, which can warn the driver in time and reduce the probability of accidents.

[0091] It can be seen from the above technical solutions that an embodiment of the present application provides a method for detecting vehicles entering and exiting a virtual electronic fence, the method comprising: determining a fence area on an electronic map in response to a fence setting instruction; the fence setting instruction is used to set a fence area; the fence area includes a virtual electronic fence range, a fence circumscribed rectangular range, and a fence inscribed rectangular range; obtaining vehicle status information sent by a vehicle-mounted terminal at a preset time frequency; the vehicle status information includes the position and speed of the vehicle; preliminarily determining the current position of the vehicle according to the fence circumscribed rectangular range, the fence inscribed rectangular range, and the vehicle status information; if the vehicle is within the fence circumscribed rectangular range and not within the fence inscribed rectangular range, determining whether the vehicle is within the virtual electronic fence range according to the virtual electronic fence range and the vehicle status information; if the vehicle is not within the virtual electronic fence range, determining whether the vehicle has just exited the virtual electronic fence range according to the vehicle status information received last time, so as to generate an exit determination result; if the vehicle is within the virtual electronic fence range, determining whether the vehicle has just entered the virtual electronic fence range according to the vehicle status information received last time, so as to generate an entry determination result. Solve the problem of low efficiency in detecting vehicles entering and leaving the virtual electronic fence.

[0092] Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the general concept of this application and do not constitute a limitation on the protection scope of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without creative work belong to the protection scope of this application.

Claims

1. A method for detecting vehicles entering and leaving a virtual electronic fence, characterized in that: The method comprises: In response to a fence setting instruction, determining a fence area on an electronic map; the fence setting instruction is used to set a fence area; the fence area includes a virtual electronic fence range, a fence circumscribed rectangular range, and a fence inscribed rectangular range; Acquire vehicle status information sent by the vehicle-mounted terminal at a preset time frequency; the vehicle status information includes the position and speed of the vehicle; Preliminarily determining the current position of the vehicle according to the circumscribed rectangular range of the fence, the inscribed rectangular range of the fence and the vehicle status information; If the vehicle is within the rectangular range outside the fence and not within the rectangular range inside the fence, determining whether the vehicle is within the virtual electronic fence range according to the virtual electronic fence range and the vehicle status information; If the vehicle is not within the virtual electronic fence, determining whether the vehicle has just exited the virtual electronic fence according to the vehicle status information received last time, so as to generate an exit determination result; If the vehicle is within the virtual electronic fence, it is determined whether the vehicle has just entered the virtual electronic fence according to the vehicle status information received last time, so as to generate an entry determination result.

2. The method for detecting vehicles entering and leaving a virtual electronic fence according to claim 1, characterized in that: In response to the fence setting instruction, the step of determining the fence area on the electronic map includes: In response to the fence setting instruction, drawing a virtual electronic fence range on the electronic map; Calculating the fence circumscribed rectangular range and the fence inscribed rectangular range of the virtual electronic fence range; The information of the virtual electronic fence range, the fence circumscribed rectangular range, and the fence inscribed rectangular range is saved.

3. The method for detecting vehicles entering and exiting a virtual electronic fence according to claim 1, characterized in that: The step of preliminarily determining the current position of the vehicle according to the circumscribed rectangular range of the fence, the inscribed rectangular range of the fence and the vehicle status information comprises: projecting the current position of the vehicle onto the electronic map; Determine whether the current position of the vehicle is within the circumscribed rectangle of the fence according to the diagonal coordinates of the circumscribed rectangle of the fence; If the current position of the vehicle is not within the circumscribed rectangular range of the fence, it is determined that the current position of the vehicle is not within the range of the virtual electronic fence; If the current position of the vehicle is within the circumscribed rectangular range of the fence, determine whether the current position of the vehicle is within the circumscribed rectangular range of the fence according to the diagonal coordinates of the circumscribed rectangular range of the fence; If the current position of the vehicle is within a rectangular range within the fence, it is determined that the current position of the vehicle is within the virtual electronic fence range.

4. The method for detecting vehicles entering and exiting a virtual electronic fence according to claim 1, characterized in that: The step of judging whether the vehicle is within the virtual electronic fence range according to the virtual electronic fence range and the vehicle status information comprises: Determine whether the current position of the vehicle is within the range of the virtual electronic fence according to the ray method; If the current position of the vehicle is within the virtual electronic fence, determining that the current position of the vehicle is within the virtual electronic fence; If the current position of the vehicle is not within the range of the virtual electronic fence, it is determined that the current position of the vehicle is not within the range of the virtual electronic fence.

5. The method for detecting vehicles entering and leaving a virtual electronic fence according to claim 4, characterized in that: The step of determining whether the vehicle has just exited the virtual electronic fence range according to the vehicle status information received last time to generate an exit determination result includes: projecting the last position of the vehicle onto the electronic map; Determine whether the last position of the vehicle is within the range of the virtual electronic fence according to the ray method; If the last position of the vehicle is within the virtual electronic fence, it is determined that the vehicle has just driven out of the virtual electronic fence; If the last position of the vehicle is not within the virtual electronic fence range, it is determined that the vehicle has not entered the virtual electronic fence range.

6. The method for detecting vehicles entering and exiting a virtual electronic fence according to claim 4, characterized in that: The step of determining whether the vehicle has just entered the virtual electronic fence range according to the vehicle status information received last time to generate an entry determination result includes: projecting the last position of the vehicle onto the electronic map; Determine whether the last position of the vehicle is within the range of the virtual electronic fence according to the ray method; If the last location of the vehicle is within the virtual electronic fence, it is determined that the vehicle is still traveling within the virtual electronic fence; If the last position of the vehicle is not within the virtual electronic fence range, it is determined that the vehicle has just entered the virtual electronic fence range.

7. The method for detecting vehicles entering and exiting a virtual electronic fence according to claim 3, characterized in that: The step of judging whether the current position of the vehicle is within the circumscribed rectangular range of the fence according to the diagonal coordinates of the circumscribed rectangular range of the fence comprises: Determine the coordinates of the vertices of the four sides of the circumscribed rectangle of the fence and the coordinates of the current position of the vehicle; Calculate the diagonal coordinates of the circumscribed rectangle of the fence according to the coordinates of the four side vertices; Calculate the boundary of the minimum fence circumscribed rectangle according to the diagonal coordinates; Determining whether the coordinates of the current position of the vehicle are all within the boundaries of the minimum fence circumscribed rectangle; If the coordinates of the current position of the vehicle are not within the boundary of the minimum fence circumscribed rectangle, then the current position of the vehicle is not within the fence circumscribed rectangle; If the coordinates of the current position of the vehicle are all within the boundary of the minimum fence circumscribed rectangle, then the current position of the vehicle is within the fence circumscribed rectangle.

8. The method for detecting vehicles entering and exiting a virtual electronic fence according to claim 3, characterized in that: The step of judging whether the current position of the vehicle is within the rectangular range inscribed in the fence according to the diagonal coordinates of the rectangular range inscribed in the fence comprises: Determine the coordinates of the vertices of the four sides of the rectangular range inscribed in the fence and the coordinates of the current position of the vehicle; Calculate the diagonal coordinates of the rectangular range inscribed in the fence according to the coordinates of the four side vertices; Calculate the boundary of the minimum inscribed rectangle of the fence according to the diagonal coordinates; Determine whether the coordinates of the current position of the vehicle are all within the boundaries of the rectangular range inscribed in the minimum fence; If the coordinates of the current position of the vehicle are not within the boundary of the rectangular range inscribed in the minimum fence, then the current position of the vehicle is not within the rectangular range inscribed in the fence; If the coordinates of the current position of the vehicle are all within the boundary of the rectangular range inscribed in the minimum fence, then the current position of the vehicle is within the rectangular range inscribed in the fence.

9. The method for detecting vehicles entering and exiting a virtual electronic fence according to claim 4, characterized in that: The step of determining whether the current position of the vehicle is within the range of the virtual electronic fence according to the ray method includes: Determine the coordinates of the boundary information of the virtual electronic fence range and the coordinates of the current position of the vehicle; Constructing a ray with the coordinates of the current position of the vehicle as a starting point; Traversing each edge of the virtual electronic fence range, and calculating the number of intersections between the ray and each edge; If the number of intersections is an odd number, the current position of the vehicle is within the range of the virtual electronic fence; If the number of intersections is an even number, the current position of the vehicle is not within the range of the virtual electronic fence.

10. The method for detecting vehicles entering and exiting a virtual electronic fence according to claim 1, characterized in that: The vehicle-mounted terminal is provided with an alarm device; the method further comprises: According to preset business rules, the exit determination result and the entry determination result are pushed to the system platform; and a determination result warning instruction is generated according to the exit determination result and the entry determination result; Sending the result warning instruction to the vehicle terminal; The vehicle-mounted terminal controls the alarm device to send a determination result alarm according to the alarm instruction to alert the driver of the vehicle.

Citation Information

Patent Citations

  • Bus signal priority triggering determination method based on virtual electronic fence

    CN107025793A

  • Large mechanical equipment and heavy vehicle safety management and control system

    CN107393293A

  • Monitoring method and monitoring system based on electronic fence, medium and server

    CN113382360A

  • Danger warning method and device and storage medium

    CN114004566A

  • Vehicle operation range compliance discrimination method and system, and storage medium

    CN115050185A

Cited By

  • Vehicle driving road detection method and device

    CN121075119A

  • Vehicle travel road detection method and device

    CN121075119B