Method and device for quickly calculating the area of a fenced-in region

By acquiring auxiliary network information from historical fence data, using the Geohash algorithm to divide the grid, and combining it with topology retrieval services, the grid identifiers of overlapping fence areas can be quickly identified and updated. This solves the problem of low efficiency in calculating the area of ​​fence coverage in existing technologies, and enables fast and accurate calculation of the area of ​​fence coverage.

CN116383282BActive Publication Date: 2026-02-10SHANGHAI ZHONGTONGJI NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310410520.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2026-02-10
Estimated Expiration
2043-04-17

AI Technical Summary

Technical Problem

Existing technologies cannot quickly eliminate overlapping areas of fences with minimal loss of accuracy, resulting in low efficiency in calculating the area covered by fences.

Method used

By acquiring auxiliary network information from historical fence data, using the Geohash algorithm to divide the grid and using grid identifiers, and combining topology relationship retrieval services, the grid identifiers of overlapping fence areas can be quickly identified and updated, enabling rapid statistics on fence coverage areas.

Benefits of technology

With minimal loss of precision, overlapping areas of fences are quickly removed, enabling accurate statistics of the area covered by fences, avoiding redundant calculations, and improving statistical efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116383282B_ABST
    Figure CN116383282B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of geographic information, in particular to a method and device for quickly calculating the area of a fence coverage region, which comprises the following steps: obtaining historical fence data and fence operation information; when the fence operation information is deleting a first target electronic fence, determining a grid covering the internal region of the first target electronic fence as a first grid, and modifying the grid identification of the first grid to 0; determining the repeated region of the first target electronic fence and other electronic fences, determining a grid covering the repeated region as a second grid, and modifying the grid identification of the second grid to 1; and calculating the area of the grid with the grid identification of 1 to obtain the area of the electronic fence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of geographic information technology, and specifically to a method and apparatus for rapidly calculating the area of ​​a fenced-covered region. Background Technology

[0002] Geographic Information Science (GIS) is a computer-based tool that analyzes and processes spatial information. Systems that use GIS can draw and store a large number of geometric figures, often used to identify various business objects, such as using a closed figure to identify an electronic fence.

[0003] In GIS systems, a large number of geometric figures are drawn and stored, often used to identify various business objects, such as using a closed figure to identify an electronic fence. A scenario exists where it is necessary to calculate the total coverage and area of ​​all electronic fences.

[0004] Existing technologies commonly involve merging fences sequentially and removing duplicate statistics for overlapping areas. This approach suffers from significant memory consumption and computation time as the number of fences and nodes increases. Furthermore, regardless of whether the merged fence is stored in WKT or GeoJSON format, its size becomes very large due to the complexity of the graph, hindering parsing and reuse. Existing technical solutions include the following two:

[0005] 1) Merge all fences based on overlay calculation.

[0006] This solution can be implemented using PostGIS (a plugin for PostgreSQL specifically designed for handling multidimensional data). Data needs to be stored in a dedicated PostGIS index table and merged using the ST_UNION function. It has certain hardware dependencies and poor support for some older systems. When the number of fence nodes reaches a certain level, issues such as slow response and high memory consumption still exist.

[0007] 2) Calculate the overlapping area based on topological relationships

[0008] This solution can be implemented using Elasticsearch (a distributed, highly scalable, and real-time search and data analysis engine) or Tair (Alibaba Enterprise Edition distributed Redis). Taking Elasticsearch as an example, fence data is stored in Elasticsearch in GeoJSON or WKT format. By setting up indexes and templates according to Elasticsearch GIS requirements, data can be retrieved based on topological relationships. This allows finding overlapping fences and separately calculating the area Sn of each fence and the area An of the overlapping portion. Finally, ∑Si-1 / 2∑Ai is obtained. However, this solution still suffers from hardware dependencies, and the calculated results are not reusable; the entire process needs to be repeated if the data template changes.

[0009] Therefore, existing technologies cannot quickly eliminate duplicates in overlapping fence areas and thus calculate the area covered by the fence with relatively low precision loss. Summary of the Invention

[0010] In view of this, the purpose of the present invention is to provide a method and apparatus for quickly calculating the area covered by a fence, so as to solve the problem that the existing technology cannot achieve low-precision loss, and can quickly remove duplicates in the overlapping areas of the fence, and then calculate the area covered by the fence.

[0011] According to a first aspect of the present invention, a method for rapidly calculating the area of ​​a fenced-covered region is characterized by comprising:

[0012] Obtain historical fence data and fence operation information;

[0013] The historical fence data includes: location information of multiple electronic fences and information of auxiliary nets covering the electronic fences; the auxiliary nets consist of multiple closely arranged grids;

[0014] The auxiliary net information covering the electronic fence includes the grid identifier of each grid of the auxiliary net, wherein the grid identifier is 0 or 1;

[0015] When the fence operation information is to delete the first target electronic fence, the grid covering the internal area of ​​the first target electronic fence is identified as the first grid, and its grid identifier is changed to 0.

[0016] Identify the overlapping area between the first target electronic fence and other electronic fences, identify the grid covering the overlapping area as the second grid, and modify the grid identifier of the second grid to 1;

[0017] The area of ​​the electronic fence is obtained by counting the area of ​​the grid with the grid identifier of 1.

[0018] Furthermore, when the fence operation information is to update the second target electronic fence, the grid covering the area inside the second target electronic fence before the update is identified as the third grid, and the grid identifier of the third grid is modified to 0;

[0019] Identify the overlapping areas of the second target electronic fence and other electronic fences before the update, identify the grid covering the overlapping area as the fourth grid, and modify the grid identifier of the fourth grid to 1;

[0020] The grid inside the second target electronic fence after the coverage update is identified as the fifth grid, and the grid identifier of the fifth grid is changed to 1.

[0021] Furthermore, determining the overlapping areas between the second target electronic fence and other electronic fences before the update includes:

[0022] By using services that support topology retrieval, other electronic fences that intersect with the second target electronic fence are queried to determine the overlapping areas between the target electronic fence and other electronic fences before the update.

[0023] Furthermore, when the fence operation information is to add a third target electronic fence, the grid covering the internal area of ​​the third target electronic fence is identified as the sixth grid, and the grid identifier of the sixth grid is marked as 1.

[0024] Furthermore, the grid is divided according to the Geohash algorithm to obtain auxiliary grids; the auxiliary grids are marked with different Geohash codes.

[0025] Furthermore, the Geohash encoding of each grid is mapped onto a bitmap, and the grid identifier is generated based on the correspondence between each grid and the internal range of the electronic fence.

[0026] According to a second aspect of the present invention, an apparatus for rapidly calculating the area of ​​a fenced-covered region includes:

[0027] The acquisition module is used to acquire historical fence data and fence operation information; the historical fence data includes: location information of multiple electronic fences and auxiliary net information covering the electronic fences; the auxiliary net is composed of multiple closely arranged grids; wherein, the auxiliary net information covering the electronic fence includes the grid identifier of each grid of the auxiliary net, and the grid identifier is 0 or 1;

[0028] The judgment module is used to determine, when the fence operation information is to delete the first target electronic fence, the grid covering the internal area of ​​the first target electronic fence, as the first grid, and modify the grid identifier of the first grid to 0.

[0029] The investigation module is used to determine the overlapping areas of the first target electronic fence and other electronic fences, identify the grid covering the overlapping area as the second grid, and modify the grid identifier of the second grid to 1;

[0030] The statistics module is used to calculate the area of ​​the grid with grid identifier 1 to obtain the area of ​​the electronic fence.

[0031] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0032] By acquiring auxiliary network information of the electronic fence from historical fence data, the auxiliary network information includes the grid identifier of each network. Based on the grid identifier and the fence operation information, when the fence operation information is to delete the first target electronic fence, the grid covering the internal area of ​​the first target electronic fence is identified as the first grid. The first grid represents the area not covered by the electronic fence. The grid identifier of the first grid is modified to 0, and the first grid is deleted. Since the area of ​​the first grid does not belong to the electronic fence, the first target electronic fence is deleted, and no final electronic fence area statistics are performed. Furthermore, for overlapping areas between the first target electronic fence and other electronic fences, the grid covering the overlapping area is identified as the second grid, and its grid identifier is modified to 1. In other words, when the grid covering the overlapping area is determined to be deleted from the first target electronic fence, since the deleted second grid is within the coverage area of ​​the electronic fence, it is necessary to calculate the area of ​​the second grid. At this time, the grid identifier of the second grid is modified to 1, and the area of ​​the grid with grid identifier 1 is calculated to obtain the area of ​​the electronic fence. In this way, the area of ​​the overlapping area of ​​the fence is quickly deduplicated, thereby avoiding duplicate counting of the fence coverage area. Finally, through the auxiliary grid, the area of ​​the overlapping area of ​​the fence can be identified with low accuracy loss, and the area of ​​the fence coverage area can be quickly and accurately calculated.

[0033] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0034] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0035] Figure 1 This is a flowchart illustrating a method for rapidly calculating the area of ​​a fenced-covered region according to an exemplary embodiment;

[0036] Figure 2 This is a schematic block diagram illustrating an apparatus for rapidly calculating the area of ​​a fenced-covered region according to an exemplary embodiment;

[0037] Figure 3 This is a flowchart illustrating a method for rapidly calculating the area of ​​a fenced-covered region according to another exemplary embodiment. Detailed Implementation

[0038] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0039] Example 1

[0040] Figure 1 This is a flowchart illustrating a method for rapidly calculating the area covered by a fence, according to an exemplary embodiment. Figure 1 As shown, it includes:

[0041] Step S11: Obtain historical fence data and fence operation information;

[0042] The historical fence data includes: location information of multiple electronic fences and information of auxiliary nets covering the electronic fences; the auxiliary nets consist of multiple closely arranged grids;

[0043] The auxiliary net information covering the electronic fence includes the grid identifier of each grid of the auxiliary net, wherein the grid identifier is 0 or 1;

[0044] Step S12: When the fence operation information is to delete the first target electronic fence, determine the grid covering the internal area of ​​the first target electronic fence as the first grid, and modify the grid identifier of the first grid to 0.

[0045] Step S13: Determine the overlapping area between the first target electronic fence and other electronic fences, determine the grid covering the overlapping area as the second grid, and modify the grid identifier of the second grid to 1;

[0046] Step S14: Calculate the area of ​​the grid with grid identifier 1 to obtain the area of ​​the electronic fence.

[0047] It's worth noting that historical fence data is typically input as text in Wkt or Geojson format. The Geohash algorithm is used to spatially partition the fence, resulting in an auxiliary network covering the fence. The smaller and more numerous the auxiliary network grids, the higher the accuracy of the electronic fence area calculation. Therefore, this method has some inherent error, but it can quickly remove duplicates from overlapping fence areas and calculate the area of ​​the closed shape covered by the electronic fence, even with a slight loss of accuracy.

[0048] It's worth noting that the range of the auxiliary network is always larger than the coverage area of ​​multiple electronic fences. To avoid double counting of overlapping areas, it's necessary to delete electronic fences. Deletion involves two scenarios: First, if the area covered by the auxiliary network is outside the coverage area of ​​multiple electronic fences (i.e., the redundant portion), these grids are marked as 0 and directly deleted, not included in the final fence coverage area calculation. Second, if multiple electronic fences overlap, the grids in the overlapping areas are marked as 0 and deleted. This is to prevent the overlapping area from being double-counted because historical fence data might have already marked it with a network identifier of 1. After deletion, the overlapping areas are re-marked with a grid identifier of 1. Finally, all grids marked as 1 represent the fence coverage area.

[0049] It is understandable that by obtaining the auxiliary network information of the electronic fence in the historical fence data, the auxiliary network information includes the grid identifier of each network. Based on the grid identifier and the fence operation information, when the fence operation information is to delete the first target electronic fence, the grid covering the internal area of ​​the first target electronic fence is identified as the first grid. The first grid represents the area not covered by the electronic fence. The grid identifier of the first grid is modified to 0, and the first grid is deleted. The area of ​​the first grid does not belong to the electronic fence, so the first target electronic fence is deleted, and no final electronic fence area statistics are made. Furthermore, for overlapping areas between the first target electronic fence and other electronic fences, the grid covering the overlapping area is identified as the second grid, and its grid identifier is modified to 1. In other words, when the grid covering the overlapping area is determined to be deleted from the first target electronic fence, since the deleted second grid is within the coverage area of ​​the electronic fence, it is necessary to calculate the area of ​​the second grid. At this time, the grid identifier of the second grid is modified to 1, and the area of ​​the grid with grid identifier 1 is calculated to obtain the area of ​​the electronic fence. In this way, the area of ​​the overlapping area of ​​the fence is quickly deduplicated, thereby avoiding duplicate counting of the fence coverage area. Finally, through the auxiliary grid, the area of ​​the overlapping area of ​​the fence can be identified with low accuracy loss, and the area of ​​the fence coverage area can be quickly and accurately calculated.

[0050] Preferably, when the fence operation information is to update the second target electronic fence, the grid covering the area inside the second target electronic fence before the update is determined to be the third grid, and the grid identifier of the third grid is modified to 0;

[0051] Identify the overlapping areas of the second target electronic fence and other electronic fences before the update, identify the grid covering the overlapping area as the fourth grid, and modify the grid identifier of the fourth grid to 1;

[0052] The grid inside the second target electronic fence after the coverage update is identified as the fifth grid, and the grid identifier of the fifth grid is changed to 1.

[0053] Understandably, updating a fence involves first determining the scope of the fence to be updated. For example, if the second target fence is identified as the third grid, before the update, the area of ​​the third grid is changed to grid identifier 0. After the change, the overlapping area between the third grid and other fences is identified as the fourth grid. The fourth grid is found because it was previously marked as 1 in historical fence data, but was later changed to 0. Now that the fourth grid belongs to the second target fence, its area needs to be calculated, and the identifier 0 needs to be updated to 1. This quickly completes the deduplication of overlapping areas between fences, avoiding duplicate area calculations.

[0054] Preferably, determining the overlapping areas between the second target electronic fence and other electronic fences before the update includes:

[0055] By using services that support topology retrieval, other electronic fences that intersect with the second target electronic fence are queried to determine the overlapping areas between the target electronic fence and other electronic fences before the update.

[0056] It is worth noting that topological retrieval is an important method for extracting spatial relationship information from basic map information. Unlike conventional retrieval, topological retrieval is no longer based on the attributes or characteristics of the objects themselves, but on the topological relationship between two sets of object categories.

[0057] Preferably, when the fence operation information is to add a third target electronic fence, the grid covering the internal area of ​​the third target electronic fence is identified as the sixth grid, and the grid identifier of the sixth grid is marked as 1.

[0058] It is worth noting that the newly added fence indicates that the sixth grid has no overlapping area with other electronic fences, so the area of ​​the sixth grid is added, the grid identifier is recorded as 1, and the area is calculated.

[0059] Preferably, the grid is divided according to the Geohash algorithm to obtain an auxiliary grid; the auxiliary grid is marked with different Geohash codes.

[0060] It's worth noting that Geohash is an address encoding that converts two-dimensional latitude and longitude into a one-dimensional string. Geohash is often used as a unique identifier. In databases, Geohash can represent a point or a grid. The common prefix property of Geohash can be used for fast neighbor searches or grid lookups. This algorithm treats the three-dimensional Earth surface as a tiled two-dimensional plane and then maps it onto a continuous one-dimensional line.

[0061] Understandably, the smaller and more numerous the auxiliary mesh, the higher the accuracy of the area calculation results for the electronic fence. Therefore, this method has a certain degree of error, but it can quickly remove duplicates from overlapping fence areas and calculate the area of ​​the closed shape covered by the electronic fence, even with a relatively small loss of accuracy.

[0062] Preferably, the Geohash encoding of each grid is mapped onto a bitmap, and the grid identifier is generated according to the correspondence between each grid and the internal range of the electronic fence.

[0063] It's worth noting that a Bitmap, a collection of bits, is a data structure used to record a large number of 0-1 states. It's used in many places, such as the Linux kernel (e.g., inodes, disk blocks) and the Bloom filter algorithm. Its advantage is that it can store a large number of 0-1 states with very high space utilization. The basic principle is to use one bit to store a certain state, suitable for large-scale data where the number of data states is not large. It's typically used to determine whether certain data exists.

[0064] It is understandable that the geohash encoding of the covering grid is mapped to a bitmap, and the corresponding bitmap position, that is, the inner range of the electronic fence, is marked as 1, indicating that the grid has been covered, which is used for the final statistics of the electronic fence surface.

[0065] Reference Figure 2 , Figure 2 This is a schematic block diagram illustrating an apparatus for rapidly calculating the area of ​​a fenced-covered region according to an exemplary embodiment, comprising:

[0066] The acquisition module 1 is used to acquire historical fence data and fence operation information; the historical fence data includes: location information of multiple electronic fences and auxiliary net information covering the electronic fences; the auxiliary net is composed of multiple closely arranged grids; wherein, the auxiliary net information covering the electronic fence includes the grid identifier of each grid of the auxiliary net, and the grid identifier is 0 or 1;

[0067] The judgment module 2 is used to determine, when the fence operation information is to delete the first target electronic fence, the grid covering the internal area of ​​the first target electronic fence, as the first grid, and modify the grid identifier of the first grid to 0.

[0068] The investigation module 3 is used to determine the overlapping area between the first target electronic fence and other electronic fences, determine the grid covering the overlapping area as the second grid, and modify the grid identifier of the second grid to 1;

[0069] The statistics module 4 is used to calculate the area of ​​the grid with grid identifier 1 to obtain the area of ​​the electronic fence.

[0070] Specifically, the specific implementation method of a device for quickly calculating the area covered by a fence can refer to the specific implementation method of a method for quickly calculating the area covered by a fence described in any of the above embodiments, and will not be repeated here.

[0071] It is understood that the technical solutions provided by the embodiments of the present invention may include the following beneficial effects: by obtaining auxiliary network information of electronic fences in historical fence data, the auxiliary network information includes the grid identifier of each network; based on the grid identifier and the fence operation information, when the fence operation information is to delete the first target electronic fence, the grid covering the internal area of ​​the first target electronic fence is determined as the first grid, the first grid represents the area not covered by the electronic fence, the grid identifier of the first grid is modified to 0, the first grid is deleted, the area of ​​the first grid does not belong to the electronic fence, therefore the first target electronic fence is deleted, and no final electronic fence area statistics are performed. Furthermore, for overlapping areas between the first target electronic fence and other electronic fences, the grid covering the overlapping area is identified as the second grid, and its grid identifier is modified to 1. In other words, when the grid covering the overlapping area is determined to be deleted from the first target electronic fence, since the deleted second grid is within the coverage area of ​​the electronic fence, it is necessary to calculate the area of ​​the second grid. At this time, the grid identifier of the second grid is modified to 1, and the area of ​​the grid with grid identifier 1 is calculated to obtain the area of ​​the electronic fence. In this way, the area of ​​the overlapping area of ​​the fence is quickly deduplicated, thereby avoiding duplicate counting of the fence coverage area. Finally, through the auxiliary grid, the area of ​​the overlapping area of ​​the fence can be identified with low accuracy loss, and the area of ​​the fence coverage area can be quickly and accurately calculated.

[0072] Example 2

[0073] Figure 3 This is a flowchart illustrating a method for rapidly calculating the area of ​​a fenced-covered region according to another exemplary embodiment, such as... Figure 3 As shown, it includes:

[0074] First, historical fence data is input. Fence data is typically input as text in Wkt or Geojson format. The Geohash algorithm is used to spatially partition the fence, resulting in the auxiliary network covered by the fence.

[0075] It is worth noting that the smaller the grid size and the greater the number of auxiliary grids, the higher the accuracy of the area calculation results for the electronic fence. Therefore, this method has a certain degree of error, but it can quickly remove duplicates from overlapping fence areas and calculate the area of ​​the closed shape covered by the electronic fence, even with a relatively small loss of accuracy.

[0076] Determine the fence operation information of multiple electronic fences:

[0077] The fence deletion operation, in essence, involves first clearing the grid markers of the historically covered areas to zero (marked as 0), then finding and deleting overlapping areas with other fences. It's worth noting that the method for finding overlapping areas supports topological relationship retrieval. Duplicate areas, i.e., the grid markers at the corresponding bitmap positions, are marked as 1. The bitmap is traversed to find the grids marked as 1 that are already covered, and the area of ​​these covered grids is calculated, which is the total fence coverage area. This quickly completes the deduplication of overlapping areas between fences, avoiding duplicate area calculations.

[0078] Updating the fence involves first clearing the grid markers of the historically covered areas to zero (marked as 0). Then, the fence to be updated is modified by setting the grid markers at the corresponding bitmap locations (covered areas) to 1. The bitmap is then traversed to find the grids marked as 1, and the area of ​​these covered grids is calculated to represent the total fence coverage area. This process quickly removes duplicates from overlapping areas between fences, avoiding double-counting of areas.

[0079] Add fence operation: This part represents the direct addition of a new fence to an area that is not covered by the historical electronic fence: Map the geohash code of the covered grid to the bitmap, set the corresponding bit position to 1 to indicate that the grid is covered, traverse the bitmap to get the covered grids, and count the area of ​​the covered grids, which is the total fence coverage area.

[0080] By acquiring auxiliary network information of the electronic fence from historical fence data, the auxiliary network information includes the grid identifier of each network. Based on the grid identifier and the fence operation information, when the fence operation information is to delete the first target electronic fence, the grid covering the internal area of ​​the first target electronic fence is identified as the first grid. The first grid represents the area not covered by the electronic fence. The grid identifier of the first grid is modified to 0, and the first grid is deleted. Since the area of ​​the first grid does not belong to the electronic fence, the first target electronic fence is deleted, and no final electronic fence area statistics are performed. Furthermore, for overlapping areas between the first target electronic fence and other electronic fences, the grid covering the overlapping area is identified as the second grid, and its grid identifier is modified to 1. In other words, when the grid covering the overlapping area is determined to be deleted from the first target electronic fence, since the deleted second grid is within the coverage area of ​​the electronic fence, it is necessary to calculate the area of ​​the second grid. At this time, the grid identifier of the second grid is modified to 1, and the area of ​​the grid with grid identifier 1 is calculated to obtain the area of ​​the electronic fence. In this way, the area of ​​the overlapping area of ​​the fence is quickly deduplicated, thereby avoiding duplicate counting of the fence coverage area. Finally, through the auxiliary grid, the area of ​​the overlapping area of ​​the fence can be identified with low accuracy loss, and the area of ​​the fence coverage area can be quickly and accurately calculated.

[0081] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0082] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.

[0083] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0084] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0085] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it includes one or a combination of the steps of the method embodiments.

[0086] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0087] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0088] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0089] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for rapidly calculating the area covered by a fence, characterized in that, include: Obtain historical fence data and fence operation information; The historical fence data includes: location information of multiple electronic fences and information of auxiliary nets covering the electronic fences; the auxiliary nets consist of multiple closely arranged grids; The auxiliary net information covering the electronic fence includes the grid identifier of each grid of the auxiliary net, wherein the grid identifier is 0 or 1; When the fence operation information is to delete the first target electronic fence, the grid covering the internal area of ​​the first target electronic fence is identified as the first grid, and the grid identifier of the first grid is modified to 0; Identify the overlapping area between the first target electronic fence and other electronic fences, identify the grid covering the overlapping area as the second grid, and modify the grid identifier of the second grid to 1; When the fence operation information is to update the second target electronic fence, the grid covering the area inside the second target electronic fence before the update is identified as the third grid, and the grid identifier of the third grid is modified to 0; Identify the overlapping areas of the second target electronic fence and other electronic fences before the update, identify the grid covering the overlapping area as the fourth grid, and modify the grid identifier of the fourth grid to 1; The grid inside the second target electronic fence after the coverage update is identified as the fifth grid, and the grid identifier of the fifth grid is changed to 1; The area of ​​the electronic fence is obtained by counting the area of ​​the grid with the grid identifier of 1.

2. The method according to claim 1, characterized in that, The areas where the second target electronic fence and other electronic fences overlapped before the update included: By using services that support topology retrieval, other electronic fences that intersect with the second target electronic fence are queried to determine the overlapping areas between the target electronic fence and other electronic fences before the update.

3. The method according to claim 1, characterized in that, include: When the fence operation information is to add a third target electronic fence, the grid covering the internal area of ​​the third target electronic fence is identified as the sixth grid, and the grid identifier of the sixth grid is marked as 1.

4. The method according to claim 1, characterized in that, Also includes: The grid is divided according to the Geohash algorithm to obtain auxiliary grids; the auxiliary grids are marked with different Geohash codes.

5. The method according to claim 4, characterized in that, Also includes: The Geohash encoding of each grid is mapped onto a bitmap, and the grid identifier is generated according to the correspondence between each grid and the internal range of the electronic fence.

6. A device for rapidly calculating the area covered by a fence, characterized in that, include: The acquisition module is used to acquire historical fence data and fence operation information; The historical fence data includes: location information of multiple electronic fences and information of auxiliary nets covering the electronic fences; the auxiliary nets are composed of multiple closely arranged grids; wherein, the information of the auxiliary nets covering the electronic fences includes the grid identifier of each grid of the auxiliary nets, and the grid identifier is 0 or 1; The judgment module is used to determine the grid covering the internal area of ​​the first target electronic fence as the first grid when the fence operation information is to delete the first target electronic fence, and modify the grid identifier of the first grid to 0. The investigation module is used to determine overlapping areas between the first target electronic fence and other electronic fences, identify the grid covering the overlapping area as the second grid, and modify the grid identifier of the second grid to 1; when the fence operation information is to update the second target electronic fence, identify the grid covering the internal area of ​​the second target electronic fence before the update as the third grid, and modify the grid identifier of the third grid to 0; identify overlapping areas between the second target electronic fence before the update and other electronic fences, identify the grid covering the overlapping area as the fourth grid, and modify the grid identifier of the fourth grid to 1; identify the grid covering the internal area of ​​the second target electronic fence after the update as the fifth grid, and modify the grid identifier of the fifth grid to 1; The statistics module is used to calculate the area of ​​the grid with grid identifier 1 to obtain the area of ​​the electronic fence.

Citation Information

Patent Citations

  • Method and device for deleting fence points on electronic fence and computer equipment

    CN110650437A

  • Semantic mining method and device for vehicle stop points, storage medium and terminal

    CN113268678A