Method, device, storage medium and terminal for generating electronic fence boundary
By generating multiple propagable grid sets that meet coverage based on batch vehicle historical trajectory data, and determining the optimal propagable grid set to generate the electronic fence boundary, the problem of cumbersome setup process in the existing technology is solved, and more efficient and accurate electronic fence boundary generation is achieved.
Patent Information
- Application Number
- CN202211673947.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-12-26
AI Technical Summary
In the prior art, the process of setting up electronic fence boundaries is cumbersome and time-consuming, resulting in low efficiency.
The process is implemented by generating multiple propagable grid sets that meet the coverage rate based on batch vehicle historical trajectory data, and determining the optimal propagable grid set to generate the electronic fence boundary. The process is implemented using a computer program.
Improved the accuracy and efficiency of geo-fence boundary generation, making geo-fence setup more efficient.
Smart Images

Figure CN116233743B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, storage medium and terminal for generating an electronic fence boundary. Background Art
[0002] To monitor vehicles entering and leaving a factory, companies can specify an area boundary on a map. This boundary's coordinate sequence forms a geo-fence. Users create a geo-fence by customizing the boundaries of their area of interest. Combined with the driving trajectories reported by trucks, this geo-fence can be tracked to track vehicle ingress and egress. Currently, users can draw the coordinate range on a map based on experience, but this process is cumbersome, time-consuming, and inefficient. Summary of the Invention
[0003] The embodiments of the present application provide a method, apparatus, storage medium, and terminal for generating electronic fence boundaries. To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is provided below. This summary is not intended to be a comprehensive review, identify key or important components, or delineate the scope of protection of these embodiments. Its sole purpose is to present some concepts in a simplified form, serving as a prelude to the detailed description that follows.
[0004] In a first aspect, an embodiment of the present application provides a method for generating an electronic fence boundary, the method comprising:
[0005] Construct a target grid set based on the vehicle's historical trajectory data;
[0006] Traverse and search for the propagable grid set of each initial grid to obtain multiple propagable grid sets; wherein the initial grid is any grid in the target grid set;
[0007] An optimal propagable grid set is determined from a plurality of propagable grid sets, and an electronic fence boundary is generated based on all grids in the optimal propagable grid set.
[0008] Optionally, a target grid set is constructed based on the vehicle's historical trajectory data, including:
[0009] Obtain historical trajectory data of all vehicles within a preset range of a preset location point within a preset period;
[0010] Performing map gridding processing on a preset range of preset location points based on the historical vehicle trajectory data to obtain a regional grid map;
[0011] Generate a target grid set based on the regional grid map.
[0012] Optionally, generate a target grid set based on the regional grid map, including:
[0013] Determine one by one whether there is a vehicle track point in each grid in the regional grid map, and extract the grids where the vehicle track points exist;
[0014] The grids with vehicle trajectory points are stored in a preset first empty set to obtain a final grid set.
[0015] Optionally, traverse and search for the propagable grid set of each initial grid to obtain multiple propagable grid sets, including:
[0016] Add each initial grid to the preset second empty set to obtain the second set corresponding to each initial grid;
[0017] Get the first adjacent grid adjacent to each initial grid;
[0018] Determine whether the first adjacent grid adjacent to each initial grid meets the propagation condition;
[0019] If the propagation condition is met, the first adjacent grid adjacent to each initial grid is added to the corresponding second set;
[0020] Obtain a second adjacent grid adjacent to the first adjacent grid;
[0021] Determine whether a second adjacent grid adjacent to the first adjacent grid meets a propagation condition;
[0022] If the propagation condition is not met, the step of obtaining the first adjacent grid adjacent to each initial grid is continued until the first adjacent grid adjacent to each initial grid does not meet the propagation condition, and the final multiple second sets are determined as multiple propagation grid sets.
[0023] Optionally, determining whether the first adjacent grid adjacent to each initial grid meets the propagation condition includes:
[0024] Calculate the number of vehicles with trajectories in the second set corresponding to each initial grid;
[0025] The ratio of the number of vehicles with trajectories in the second set to the total number of input vehicles is determined as the target coverage rate;
[0026] When the target coverage rate does not reach the preset electronic fence touch coverage rate, determining that the first adjacent grid adjacent to each initial grid meets the propagation condition;
[0027] or,
[0028] When the target coverage reaches the preset electronic fence touch coverage, it is determined that the first adjacent grid adjacent to each initial grid does not meet the propagation condition.
[0029] Optionally, determining an optimal propagable grid set from multiple propagable grid sets includes:
[0030] Calculate the area of each grid in each propagable grid set to obtain the area of each propagable grid set;
[0031] Calculate the straight-line distance between the center point of the area composed of each grid in each propagable grid set and the preset position point to obtain the straight-line distance of each propagable network;
[0032] Calculate the weight value of each propagable grid set according to the area and straight-line distance of each propagable grid set;
[0033] The propagable grid set with the largest weight value is determined as the optimal propagable grid set.
[0034] Optionally, generate geo-fence boundaries based on all grids in the optimal propagable grid set, including:
[0035] Convert all grids of the optimal propagable grid set into the target graph;
[0036] The outer contour of the target graphic is determined as the boundary of the electronic fence.
[0037] In a second aspect, an embodiment of the present application provides a device for generating an electronic fence boundary, the device comprising:
[0038] A target grid set construction module is used to construct a target grid set based on the vehicle's historical trajectory data;
[0039] A propagable grid set generation module is used to traverse and search for the propagable grid set of each initial grid to obtain multiple propagable grid sets; wherein the initial grid is any grid in the target grid set;
[0040] The electronic fence boundary generation module is used to determine the optimal propagable grid set from multiple propagable grid sets, and generate the electronic fence boundary based on all grids in the optimal propagable grid set.
[0041] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions suitable for being loaded by a processor and executing the above-mentioned method steps.
[0042] In a fourth aspect, an embodiment of the present application provides a terminal, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0043] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:
[0044] In an embodiment of the present application, an electronic fence boundary generation device first constructs a target grid set based on the vehicle historical trajectory data, then traverses and searches for the propagable grid set of each initial grid to obtain multiple propagable grid sets; wherein the initial grid is any grid in the target grid set, and finally determines the optimal propagable grid set from the multiple propagable grid sets, and generates an electronic fence boundary based on all grids in the optimal propagable grid set. Because the present application generates multiple propagable grid sets that meet the coverage rate based on batch vehicle historical trajectory data, and determines the optimal propagable grid set from them to generate the electronic fence boundary, the batch vehicle historical trajectory data and the optimal propagable grid set can improve the accuracy of the electronic fence boundary and improve the efficiency of electronic fence generation.
[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0047] Figure 1 This is a flow chart of a method for generating an electronic fence boundary provided by an embodiment of the present application;
[0048] Figure 2 This is a grid selection diagram provided in an embodiment of the present application;
[0049] Figure 3 This is a schematic block diagram of a process for generating an electronic fence boundary provided by an embodiment of the present application;
[0050] Figure 4 This is a schematic diagram of a grid corresponding area provided in an embodiment of the present application;
[0051] Figure 5 This is a schematic diagram of an electronic fence boundary range provided in an embodiment of the present application;
[0052] Figure 6 This is a schematic diagram of the structure of an electronic fence boundary generation device provided in an embodiment of the present application;
[0053] Figure 7 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them.
[0055] It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative work are within the scope of protection of the present invention.
[0056] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with certain aspects of the present invention, as detailed in the appended claims.
[0057] In the description of the present invention, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances. In addition, in the description of the present invention, unless otherwise specified, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.
[0058] The present application provides a method, device, storage medium, and terminal for generating an electronic fence boundary to solve the problems existing in the above-mentioned related technical problems. In the technical solution provided by the present application, since the present application generates multiple propagable grid sets that meet the coverage rate based on batch vehicle historical trajectory data, and determines the optimal propagable grid set from them to generate the electronic fence boundary, the batch vehicle historical trajectory data and the optimal propagable grid set can improve the accuracy of the electronic fence boundary and improve the efficiency of electronic fence generation. The following exemplary embodiments are used to explain in detail.
[0059] The following will be combined with the Figure 1 -Attached Figure 5 This article details the method for generating electronic fence boundaries provided in an embodiment of the present application. This method can be implemented using a computer program and run on an electronic fence boundary generation device based on the von Neumann architecture. This computer program can be integrated into an application or run as a standalone tool application.
[0060] See Figure 1 , which is a flow chart of a method for generating an electronic fence boundary according to an embodiment of the present application. Figure 1 As shown, the method of the embodiment of the present application may include the following steps:
[0061] S101, constructing a target grid set based on vehicle historical trajectory data;
[0062] The vehicle historical trajectory data is the location data reported by the positioning device installed on the truck, and the location data is stored in the data center.
[0063] Typically, historical vehicle trajectory data includes all truck location data within a preset range of a preset location point within a preset period. The preset location point is a central location coordinate, representing the center of the geo-fence. The preset period can be one week or one month, depending on the specific application scenario. The preset range can be a circular area covered by a certain distance from the center of the geo-fence.
[0064] In an embodiment of the present application, when constructing a target grid set based on vehicle historical trajectory data, first, all vehicle historical trajectory data within a preset range of a preset position point within a preset period is obtained, and then a map grid processing is performed on the preset range of the preset position point based on the vehicle historical trajectory data to obtain a regional grid map, and finally, a target grid set is generated based on the regional grid map.
[0065] Specifically, when generating a target grid set based on the regional grid map, first determine one by one whether there is a vehicle trajectory point in each grid in the regional grid map, extract the grids with vehicle trajectory points, and then store the grids with vehicle trajectory points in a preset first empty set to obtain the final grid set.
[0066] In one possible implementation, based on the specific coordinates of a preset location point p, vehicles with historical trajectories within a preset range near p within a preset period Δt can be found, and the historical trajectory data of the vehicle can be extracted from the data center to obtain the vehicle historical trajectory data. The preset range near p can be gridded using the vehicle historical trajectory data. If there is a vehicle trajectory in each grid, the grid is placed in the grid set, such as Figure 2 As shown, only the grids a, b, c, d, e, f, g, and h containing vehicle trajectories are added to the grid set M to obtain the target grid set M.
[0067] It should be noted that the unit grid size can be set based on the frequency of trajectory reporting, and the unit grid side length must be greater than the average distance between two trajectory points. The initial area is the minimum circumscribed rectangle of a circle with a preset default radius.
[0068] S102, traversing and searching for a propagable grid set of each initial grid to obtain multiple propagable grid sets;
[0069] Among them, the initial grid is any grid in the target grid set;
[0070] In an embodiment of the present application, when traversing and searching for the propagable grid set of each initial grid to obtain multiple propagable grid sets, each initial grid is first added to a preset second empty set to obtain a second set corresponding to each initial grid, and then the first adjacent grid adjacent to each initial grid is obtained, and then it is determined whether the first adjacent grid adjacent to each initial grid meets the propagation condition; if it meets the propagation condition, the obtained first adjacent grid adjacent to each initial grid is added to the corresponding second set, and then the second adjacent grid adjacent to the first adjacent grid is obtained, and then it is determined whether the second adjacent grid adjacent to the first adjacent grid meets the propagation condition; if it does not meet the propagation condition, the step of obtaining the first adjacent grid adjacent to each initial grid is continued until the first adjacent grid adjacent to each initial grid does not meet the propagation condition, and the final multiple second sets are determined as multiple propagable grid sets.
[0071] Specifically, when judging whether the first adjacent grid adjacent to each initial grid meets the propagation condition, first calculate the number of vehicles with tracks in the second set corresponding to each initial grid, and then determine the ratio of the number of vehicles with tracks in the second set to the total number of input vehicles as the target coverage rate. Finally, when the target coverage rate does not reach the preset electronic fence touch coverage rate, it is determined that the first adjacent grid adjacent to each initial grid meets the propagation condition; or, when the target coverage rate reaches the preset electronic fence touch coverage rate, it is determined that the first adjacent grid adjacent to each initial grid does not meet the propagation condition.
[0072] In one possible implementation, each grid g in the target grid set M is used as the initial grid. The grids adjacent to g are determined to be propagable. If so, each grid is added to the set. The process then recursively determines whether the grids adjacent to the newly added grid are propagable. If so, the adjacent grids are added to the set. If none of the adjacent grids are propagable, the current traversal ends, resulting in a grid set corresponding to each initial grid, which is recorded as the propagable grid set. Propagation is determined by the following criteria: if grid g' satisfies the requirement of being adjacent to g, and after adding g' to the set, the grid set coverage u does not reach the preset electronic fence contact coverage r, then g' is propagable; otherwise, it is not propagable. The grid set coverage u = the number of vehicles with tracks in the current grid set / the total number of input vehicles.
[0073] Furthermore, if the current propagable set already includes M, the value of the preset radius is increased and M is reset. M is traversed again until the preset geo-fence touch coverage rate r is met.
[0074] S103 : determining an optimal propagable grid set from a plurality of propagable grid sets, and generating an electronic fence boundary based on all grids in the optimal propagable grid set.
[0075] In an embodiment of the present application, when determining the optimal transmissible grid set from multiple transmissible grid sets, the area of the region composed of each grid in each transmissible grid set is first calculated to obtain the area of each transmissible grid set, and then the straight-line distance between the center point of the region composed of each grid in each transmissible grid set and the preset position point is calculated to obtain the straight-line distance of each transmissible network. Secondly, based on the area and straight-line distance of each transmissible grid set, the weight value of each transmissible grid set is calculated, and finally the transmissible grid set with the largest weight value is determined as the optimal transmissible grid set.
[0076] In an embodiment of the present application, when generating an electronic fence boundary based on all grids of the optimal propagable grid set, all grids of the optimal propagable grid set are first converted into a target graphic, and then the graphic outline of the target graphic is determined as the electronic fence boundary.
[0077] For example Figure 3 As shown, Figure 3 This is a schematic diagram of the process of generating an electronic fence boundary provided by this application. First, the coordinates of the location point p (such as a company, factory, logistics park, or any other location of interest to the user) and the coverage rate r of the fence touch are input. Then, the historical vehicle trajectory data near p is found to generate a grid set M, such as Figure 4 As shown. Then traverse M again, taking each grid in M as the initial grid, determine the propagable grid of each initial grid, and obtain n propagable sets, recorded as candidate set C (C includes propagable set 1, propagable set 2, propagable set 3, ...). The number of elements in C = the number of elements in M. Traverse C and select one of the elements as the optimal result according to the optimal condition. Based on the grid of the optimal result, generate the electronic fence boundary, as shown Figure 5 shown.
[0078] Furthermore, after the fence boundary is determined, the vehicle can be monitored based on the electronic fence boundary.
[0079] In an embodiment of the present application, an electronic fence boundary generation device first constructs a target grid set based on the vehicle historical trajectory data, then traverses and searches for the propagable grid set of each initial grid to obtain multiple propagable grid sets; wherein the initial grid is any grid in the target grid set, and finally determines the optimal propagable grid set from the multiple propagable grid sets, and generates an electronic fence boundary based on all grids in the optimal propagable grid set. Because the present application generates multiple propagable grid sets that meet the coverage rate based on batch vehicle historical trajectory data, and determines the optimal propagable grid set from them to generate the electronic fence boundary, the batch vehicle historical trajectory data and the optimal propagable grid set can improve the accuracy of the electronic fence boundary and improve the efficiency of electronic fence generation.
[0080] The following are embodiments of the apparatus of the present invention, which can be used to implement the method embodiments of the present invention. For details not disclosed in the apparatus embodiments of the present invention, please refer to the method embodiments of the present invention.
[0081] See Figure 6 , which shows a schematic diagram of the structure of an electronic fence boundary generation device provided by an exemplary embodiment of the present invention. This electronic fence boundary generation device can be implemented as part or all of a terminal through software, hardware, or a combination of both. The device 1 includes a target grid set construction module 10, a propagable grid set generation module 20, and an electronic fence boundary generation module 30.
[0082] A target grid set construction module 10 is used to construct a target grid set based on the vehicle historical trajectory data;
[0083] The propagable grid set generation module 20 is used to traverse and search for the propagable grid set of each initial grid to obtain multiple propagable grid sets; wherein the initial grid is any grid in the target grid set;
[0084] The electronic fence boundary generation module 30 is configured to determine an optimal propagable grid set from a plurality of propagable grid sets, and generate an electronic fence boundary based on all grids in the optimal propagable grid set.
[0085] It should be noted that the electronic fence boundary generation device provided in the above embodiment, when executing the electronic fence boundary generation method, only uses the division of the above-mentioned functional modules as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the electronic fence boundary generation device provided in the above embodiment and the electronic fence boundary generation method embodiment are based on the same concept. The implementation process is detailed in the method embodiment and will not be repeated here.
[0086] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0087] In an embodiment of the present application, an electronic fence boundary generation device first constructs a target grid set based on the vehicle historical trajectory data, then traverses and searches for the propagable grid set of each initial grid to obtain multiple propagable grid sets; wherein the initial grid is any grid in the target grid set, and finally determines the optimal propagable grid set from the multiple propagable grid sets, and generates an electronic fence boundary based on all grids in the optimal propagable grid set. Because the present application generates multiple propagable grid sets that meet the coverage rate based on batch vehicle historical trajectory data, and determines the optimal propagable grid set from them to generate the electronic fence boundary, the batch vehicle historical trajectory data and the optimal propagable grid set can improve the accuracy of the electronic fence boundary and improve the efficiency of electronic fence generation.
[0088] The present invention also provides a computer-readable medium having program instructions stored thereon, which, when executed by a processor, implement the electronic fence boundary generation method provided by the above-mentioned various method embodiments.
[0089] The present invention also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the electronic fence boundary generation method of each of the above method embodiments.
[0090] See Figure 7 , provides a schematic diagram of the structure of a terminal according to an embodiment of the present application. Figure 7 As shown, the terminal 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .
[0091] The communication bus 1002 is used to implement the connection and communication between these components.
[0092] The user interface 1003 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0093] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0094] The processor 1001 may include one or more processing cores. The processor 1001 utilizes various interfaces and circuits to connect the various components within the entire electronic device 1000. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and calling data stored in the memory 1005, the processor 1001 performs various functions of the electronic device 1000 and processes data. Optionally, the processor 1001 may be implemented in the form of at least one hardware component selected from the group consisting of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 1001 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display; and the modem is responsible for handling wireless communications. It is understood that the modem may not be integrated into the processor 1001 and may be implemented separately on a single chip.
[0095] Among them, the memory 1005 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. As Figure 7 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an electronic fence boundary generation application.
[0096] exist Figure 7In the terminal 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 1001 can be used to call the electronic fence boundary generation application stored in the memory 1005 and specifically perform the following operations:
[0097] Construct a target grid set based on the vehicle's historical trajectory data;
[0098] Traverse and search for the propagable grid set of each initial grid to obtain multiple propagable grid sets; wherein the initial grid is any grid in the target grid set;
[0099] An optimal propagable grid set is determined from a plurality of propagable grid sets, and an electronic fence boundary is generated based on all grids in the optimal propagable grid set.
[0100] In one embodiment, when the processor 1001 constructs a target grid set based on the vehicle historical trajectory data, it specifically performs the following operations:
[0101] Obtain historical trajectory data of all vehicles within a preset range of a preset location point within a preset period;
[0102] Performing map gridding processing on a preset range of preset location points based on the historical vehicle trajectory data to obtain a regional grid map;
[0103] Generate a target grid set based on the regional grid map.
[0104] In one embodiment, when the processor 1001 generates a target grid set according to the regional grid map, it specifically performs the following operations:
[0105] Determine one by one whether there is a vehicle track point in each grid in the regional grid map, and extract the grids where the vehicle track points exist;
[0106] The grids with vehicle trajectory points are stored in a preset first empty set to obtain a final grid set.
[0107] In one embodiment, when the processor 1001 performs traversal to search for a propagable grid set of each initial grid and obtains multiple propagable grid sets, the processor 1001 specifically performs the following operations:
[0108] Add each initial grid to the preset second empty set to obtain the second set corresponding to each initial grid;
[0109] Get the first adjacent grid adjacent to each initial grid;
[0110] Determine whether the first adjacent grid adjacent to each initial grid meets the propagation condition;
[0111] If the propagation condition is met, the first adjacent grid adjacent to each initial grid is added to the corresponding second set;
[0112] Obtain a second adjacent grid adjacent to the first adjacent grid;
[0113] Determine whether a second adjacent grid adjacent to the first adjacent grid meets a propagation condition;
[0114] If the propagation condition is not met, the step of obtaining the first adjacent grid adjacent to each initial grid is continued until the first adjacent grid adjacent to each initial grid does not meet the propagation condition, and the final multiple second sets are determined as multiple propagation grid sets.
[0115] In one embodiment, when determining whether the first adjacent grid adjacent to each initial grid meets the propagation condition, the processor 1001 specifically performs the following operations:
[0116] Calculate the number of vehicles with trajectories in the second set corresponding to each initial grid;
[0117] The ratio of the number of vehicles with trajectories in the second set to the total number of input vehicles is determined as the target coverage rate;
[0118] When the target coverage rate does not reach the preset electronic fence touch coverage rate, determining that the first adjacent grid adjacent to each initial grid meets the propagation condition;
[0119] or,
[0120] When the target coverage reaches the preset electronic fence touch coverage, it is determined that the first adjacent grid adjacent to each initial grid does not meet the propagation condition.
[0121] In one embodiment, when determining the optimal propagable grid set from multiple propagable grid sets, the processor 1001 specifically performs the following operations:
[0122] Calculate the area of each grid in each propagable grid set to obtain the area of each propagable grid set;
[0123] Calculate the straight-line distance between the center point of the area composed of each grid in each propagable grid set and the preset position point to obtain the straight-line distance of each propagable network;
[0124] Calculate the weight value of each propagable grid set according to the area and straight-line distance of each propagable grid set;
[0125] The propagable grid set with the largest weight value is determined as the optimal propagable grid set.
[0126] In one embodiment, when the processor 1001 generates the geo-fence boundary based on all grids in the optimal propagable grid set, the processor 1001 specifically performs the following operations:
[0127] Convert all grids of the optimal propagable grid set into the target graph;
[0128] The outer contour of the target graphic is determined as the boundary of the electronic fence.
[0129] In an embodiment of the present application, an electronic fence boundary generation device first constructs a target grid set based on the vehicle historical trajectory data, then traverses and searches for the propagable grid set of each initial grid to obtain multiple propagable grid sets; wherein the initial grid is any grid in the target grid set, and finally determines the optimal propagable grid set from the multiple propagable grid sets, and generates an electronic fence boundary based on all grids in the optimal propagable grid set. Because the present application generates multiple propagable grid sets that meet the coverage rate based on batch vehicle historical trajectory data, and determines the optimal propagable grid set from them to generate the electronic fence boundary, the batch vehicle historical trajectory data and the optimal propagable grid set can improve the accuracy of the electronic fence boundary and improve the efficiency of electronic fence generation.
[0130] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program for generating the electronic fence boundary can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The storage medium for the program for generating the electronic fence boundary can be a magnetic disk, an optical disk, a read-only memory, or a random access memory.
[0131] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A method for generating an electronic fence boundary, characterized in that: The method comprises: Construct a target grid set based on the historical vehicle trajectory data; the grid is the grid where the vehicle trajectory points exist; Traversing and searching for a propagable grid set of each initial grid to obtain a plurality of propagable grid sets; wherein the initial grid is any grid in the target grid set; traversing and searching for a propagable grid set of each initial grid to obtain a plurality of propagable grid sets, including: Add each initial grid to the preset second empty set to obtain the second set corresponding to each initial grid; Get the first adjacent grid adjacent to each initial grid; Determine whether the first adjacent grid adjacent to each initial grid meets the propagation condition; If the propagation condition is met, the first adjacent grid adjacent to each initial grid is added to the corresponding second set; Acquire a second adjacent grid adjacent to the first adjacent grid; Determining whether a second adjacent grid adjacent to the first adjacent grid meets a propagation condition; If the propagation condition is not met, the step of obtaining the first adjacent grid adjacent to each initial grid is continued until the first adjacent grid adjacent to each initial grid does not meet the propagation condition, and the final plurality of second sets are determined as a plurality of propagation grid sets; The determining whether the first adjacent grid adjacent to each initial grid meets the propagation condition includes: Calculate the number of vehicles with trajectories in the second set corresponding to each initial grid; The ratio of the number of vehicles with trajectories in the second set to the total number of input vehicles is determined as the target coverage rate; When the target coverage rate does not reach the preset electronic fence touch coverage rate, determining that a first adjacent grid adjacent to each initial grid meets the propagation condition; An optimal propagable grid set is determined from the multiple propagable grid sets, and an electronic fence boundary is generated based on all grids in the optimal propagable grid set.
2. The method according to claim 1, characterized in that The step of constructing a target grid set based on the vehicle historical trajectory data includes: Obtain historical trajectory data of all vehicles within a preset range of a preset location point within a preset period; Performing map gridding processing on a preset range of preset location points based on the vehicle historical trajectory data to obtain a regional grid map; A target grid set is generated according to the regional grid map.
3. The method according to claim 2, characterized in that Generating a target grid set according to the regional grid map includes: Determine one by one whether there is a vehicle track point in each grid in the regional grid map, and extract the grids where the vehicle track point exists; The grids with vehicle trajectory points are stored in a preset first empty set to obtain a final grid set.
4. The method according to claim 1, wherein The determination of whether the first adjacent grid adjacent to each initial grid meets the propagation condition may also be: When the target coverage reaches the preset electronic fence touch coverage, it is determined that the first adjacent grid adjacent to each initial grid does not meet the propagation condition.
5. The method according to claim 1, wherein The determining of the optimal propagable grid set from the plurality of propagable grid sets includes: Calculate the area of each grid in each propagable grid set to obtain the area of each propagable grid set; Calculate the straight-line distance between the center point of the area composed of each grid in each propagable grid set and the preset position point to obtain the straight-line distance of each propagable network; Calculate the weight value of each propagable grid set according to the area and straight-line distance of each propagable grid set; The propagable grid set with the largest weight value is determined as the optimal propagable grid set.
6. The method according to claim 1, characterized in that The step of generating an electronic fence boundary based on all grids of the optimal propagable grid set includes: Converting all grids of the optimal propagable grid set into a target graph; The graphic outline of the target graphic is determined as the electronic fence boundary.
7. An electronic fence boundary generation device implemented using the method according to any one of claims 1 to 6, characterized in that: The device comprises: A target grid set construction module is used to construct a target grid set based on the vehicle's historical trajectory data; a propagable grid set generation module, configured to traverse and search for the propagable grid set of each initial grid to obtain a plurality of propagable grid sets; wherein the initial grid is any grid in the target grid set; The electronic fence boundary generation module is used to determine the optimal propagable grid set from the multiple propagable grid sets, and generate the electronic fence boundary based on all grids in the optimal propagable grid set.
8. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 6.
9. A terminal, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Systems and methods for identifying grids of geographical region in map
CN110785797A
Vehicle checking method and device based on fence and storage medium
CN114138862A