Method, device and equipment for determining electronic fence, and storage medium
By acquiring the orientation data of the target spatial entity and a preset grid map, the target grid is automatically selected to calibrate the electronic fence, which solves the problems of low efficiency and low accuracy of manual calibration of unknown building surfaces and achieves efficient and accurate automatic calibration.
Patent Information
- Application Number
- CN202310822227.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-05
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2043-07-05
AI Technical Summary
In existing technologies, when the basic geographic data of the building surface is unknown, manually marking electronic fences is inefficient and has low accuracy.
By acquiring the orientation data of the target spatial entity relative to the surrounding spatial entities, candidate grids are determined using a preset grid map, and the target grid is selected based on orientation consistency, and the electronic fence is automatically calibrated.
It improves the calibration efficiency and accuracy of electronic fences for unknown building surfaces and reduces the impact of human interference.
Smart Images

Figure CN117093659B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer technology, and particularly relate to a method, apparatus, device and storage medium for determining an electronic fence. BACKGROUND
[0002] With the development of electronic informationization in the geographic surveying and mapping industry, a large amount of basic geographic data (such as basic geographic data of spatial entities such as points of interest, roads, and building surfaces) is generated, and rich upper-layer applications are derived therefrom. For example, in order to visually display the area in which a building surface is located in an electronic map, an electronic fence of the building surface can be demarcated in the electronic map based on the basic geographic data of the building surface, and the area corresponding to the demarcated electronic fence is the area in which the building surface is located.
[0003] However, in the process of implementing the present application, it is found that at least the following problem exists in the prior art: when demarcating an electronic fence of a building surface, if the basic geographic data of the building surface is unknown (for example, the basic geographic data of the building surface is not stored in a geographic information database), the electronic fence of the building surface needs to be manually demarcated in an electronic map by surveying personnel based on the basic geographic data of other spatial entities around the building surface. This way of manually demarcating an electronic fence by surveying personnel not only has low demarcation efficiency, but also has low accuracy of the demarcated result. SUMMARY
[0004] Embodiments of the present application provide a method, apparatus, device and storage medium for determining an electronic fence, which can improve the efficiency of determining an electronic fence and the accuracy of the determined electronic fence.
[0005] In a first aspect, embodiments of the present application provide a method for determining an electronic fence, which can include: obtaining at least two position data sets of a target spatial entity; wherein each position data set is used to represent a target spatial position of the target spatial entity relative to a different surrounding spatial entity; determining at least one candidate grid from a preset grid map based on position information of each surrounding spatial entity; determining a calculation spatial position of each candidate grid relative to each surrounding spatial entity, and determining at least one target grid from each candidate grid according to the calculation spatial position of each candidate grid and each target spatial position; and determining an electronic fence of the target spatial entity based on each target grid.
[0006] In a second aspect, embodiments of the present application also provide a device for determining an electronic fence, which can include: an obtaining module and a determining module.
[0007] Specifically, the acquisition module is configured to acquire at least two orientation data sets of the target spatial entity, wherein each orientation data set is configured to represent a target spatial orientation of the target spatial entity relative to a different surrounding spatial entity; the determination module is configured to determine at least one candidate grid from a preset grid map based on position information of each surrounding spatial entity; the determination module is further configured to determine a calculated spatial orientation of each candidate grid relative to each surrounding spatial entity, and determine at least one target grid from each candidate grid according to the calculated spatial orientation of each candidate grid and each target spatial orientation; and the determination module is further configured to determine an electronic fence of the target spatial entity based on each target grid.
[0008] In a third aspect, an embodiment of the present application provides an electronic fence determination device, which comprises:
[0009] one or more processors; a memory configured to store one or more programs;
[0010] when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the electronic fence determination method provided by any embodiment of the present application.
[0011] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the electronic fence determination method provided by any embodiment of the present application.
[0012] The embodiments of the above application have the following advantages or beneficial effects:
[0013]
[0014] In the technical solution provided by the embodiment of the present application, the electronic map can be divided into grids in advance to obtain a preset grid map. When an electronic fence of a target space entity needs to be calibrated, if the geographic information database does not store basic geographic data (such as position information) of the target space entity, several surrounding space entities with known position information of the target space entity can be determined first, and target space orientations of the target space entity relative to each surrounding space entity (that is, each orientation data set) can be obtained. Then, each candidate grid can be determined from the preset grid map based on the position information of each surrounding space entity, and each target grid can be further screened from each candidate grid based on each orientation data set. Specifically, when the calculated space orientations of a certain candidate grid relative to each surrounding space entity are consistent with the target space orientations, it indicates that the candidate grid belongs to the region where the target space entity is located. Based on this, the embodiment of the present application can screen each target grid belonging to the region where the target space entity is located from each candidate grid according to the consistency of the calculated space orientations of each candidate grid and the target space orientations. Then, the electronic fence of the target space entity can be calibrated according to each target grid in the preset grid map. As can be seen, in the embodiment of the present application, when the electronic fence of a target space entity with unknown position information needs to be calibrated, each target grid belonging to the region where the target space entity is located can be automatically screened from the preset grid map based on the position information of several surrounding space entities of the target space entity and the target space orientations of the target space entity relative to each surrounding space entity, and the electronic fence of the target space entity can be automatically calibrated based on each target grid. Compared with the manual calibration of the electronic fence, this way of automatically calibrating the electronic fence can improve the calibration efficiency. Moreover, since the calibration result is not affected by human factors, the accuracy of the obtained calibration result can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 FIG. 1 is a flow diagram of a method for determining an electronic fence according to an embodiment of the present application;
[0016] Figure 2 FIG. 2 is a schematic diagram of the position relationship between a target space entity and surrounding space entities according to an embodiment of the present application;
[0017] Figure 3 FIG. 3 is a partial schematic diagram of an electronic map according to an embodiment of the present application;
[0018] Figure 4 FIG. 4 is a partial schematic diagram of three different preset grid maps according to an embodiment of the present application;
[0019] Figure 5 FIG. 5 is a schematic diagram of three electronic fences according to an embodiment of the present application;
[0020] Figure 6 is a flowchart of another method for determining an electronic fence according to an embodiment of the present application;
[0021] Figure 7 is a schematic diagram of a minimum bounding rectangle according to an embodiment of the present application;
[0022] Figure 8 is a schematic diagram of determining the orientation vector of a current candidate grid relative to different types of surrounding space entities according to an embodiment of the present application;
[0023] Figure 9 is a schematic diagram of dividing a two-dimensional space according to an embodiment of the present application;
[0024] Figure 10 is a flowchart of another method for determining an electronic fence according to an embodiment of the present application;
[0025] Figure 11 is a flowchart of a method for determining each target grid according to an embodiment of the present application;
[0026] Figure 12 is a structural schematic diagram of a determination device of an electronic fence according to an embodiment of the present application;
[0027] Figure 13 is a structural schematic diagram of a determination device of an electronic fence according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] The present application will be further described below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings, but not all the structures.
[0029] The term "and / or" herein is only used to describe the associated relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone.
[0030] In addition, the terms "include" and "have" and any variations thereof mentioned in the description of the embodiments of the present application are intended to cover the inclusions without exclusivity. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include other steps or units not listed or can optionally include other steps or units inherent to the process, method, product or device.
[0031] It should be noted that the terms "exemplary" or "for example" are used herein to mean "an example of" rather than "an ideal". Any implementation described herein as "exemplary" or "for example" is not necessarily to be construed as preferred or advantageous over other implementations. Rather, the term "exemplary" or "for example" is simply intended to present concepts in a concrete manner.
[0032] In the description of the embodiments of the present application, the meaning of "a plurality of" or "each" is two or more, unless otherwise specified.
[0033] Figure 1 A flowchart of a method for determining an electronic fence according to an embodiment of the present application is provided. The method can be applied to the application scenario of electronic fence calibration for a building surface (i.e., a target space entity in the present application) without basic geographic data. The method can be executed by a device for determining an electronic fence according to an embodiment of the present application. The device can be implemented in software and / or hardware, and integrated into a device for determining an electronic fence.
[0034] As shown in Figure 1 The method for determining an electronic fence according to an embodiment of the present application specifically includes the following steps:
[0035] S110, acquiring at least two position data sets of a target space entity.
[0036] The target space entity can be a building surface without basic geographic data (e.g., location information) added in a geographic information database. For example, the target space entity can be a building surface such as an industrial park or a residential area, or a building in an industrial park or a residential area. Alternatively, the target space entity can be an administrative region. Alternatively, the target space entity can be a building surface with a business attribute (e.g., a building surface corresponding to the jurisdiction of a community residents' committee). Of course, the target space entity can also be other building surfaces, which are not limited in the present application.
[0037] In an embodiment of the present application, the device for determining an electronic fence can include a display screen. When a user has a demand for determining an electronic fence of a target space entity, the user can input each position data set of the target space entity in the display screen. The device for determining an electronic fence can automatically determine the electronic fence of the target space entity according to the inputted position data sets.
[0038] Each position data set is used to represent the target space position of the target space entity relative to different surrounding space entities.
[0039] In the embodiment of the present application, only one open buffer surface can be circled in the preset grid map according to the single orientation data set, and a limited area cannot be obtained. Therefore, in the embodiment of the present application, the obtained orientation data set is at least two.
[0040] The surrounding space entity can be a space entity with known position information located around the target space entity. Specifically, the surrounding space entity can be a point of interest (i.e., a space point in the embodiment of the present application), a road (i.e., a space line in the embodiment of the present application), or a building surface (i.e., a space surface in the embodiment of the present application).
[0041] It should be noted that the space entity (including the surrounding space entity and the target space entity) is essentially a building surface. However, when constructing an electronic map, the space entity is generally divided into a space point, a space line, and a space surface due to the limitation of surveying and mapping accuracy or for the convenience of visual display of the space entity. For example, for a square, if the area boundary of the square is clearly marked in the electronic map, a large amount of time is needed, so the position of the square can be roughly marked in the form of a space point in the electronic map. For example, a road is marked in the form of a space line in the electronic map, which is more convenient for visual display of the road network.
[0042] The target space orientation is the actual space orientation of the target space entity relative to the surrounding space entity. In the embodiment of the present application, in order to realize automatic calibration of the electronic fence of the target space entity, several surrounding space entities with known position information of the target space entity can be determined, and the target space orientation of the target space entity relative to each surrounding space entity (i.e., each orientation data set) can be obtained.
[0043] Referring to Figure 2 , a schematic diagram of the position relationship between the target space entity and each surrounding space entity is provided. As shown in Figure 2 , the target space entity can be a building f (corresponding to the shaded area in Figure 2 ) in an industrial park. The building f is a recently completed building, and the basic geographic data of the building f is not stored in the geographic information database. If it is necessary to determine the electronic fence of the building f, several surrounding space entities with known position information of the building f can be determined. For example, the surrounding space entities of the building f can include a road s1 on the north side of the building f, a road s2 on the south side of the building f, a building s3 on the east side of the building f, and a square s4 on the west side of the building f. Based on this information, each orientation data set of the building f can be determined.
[0044] For example, in the embodiment of the present application, E, W, S and N can be used to represent the four spatial orientations of east, west, south and north respectively (the representation method is used in the following description), and the target spatial orientation can be an enumeration value of the four spatial orientations of E, W, S and N. If p1 is used to represent the orientation data set corresponding to the road s1, then p1=(s1, S), indicating that the building f is on the south side of the road s1, that is, the target spatial orientation of the building f relative to the road s1 is south. Similarly, p2, p3 and p4 corresponding to the road s2, the building s3 and the square s4 can be determined respectively. Specifically, p2=(s2, N), indicating that the building f is on the north side of the road s2, that is, the target spatial orientation of the building f relative to the road s2 is north; p3=(s3, W), indicating that the building f is on the west side of the building s3, that is, the target spatial orientation of the building f relative to the building s3 is west; and p4=(s4, E), indicating that the building f is on the east side of the square s4, that is, the target spatial orientation of the building f relative to the square s4 is east. If P is used to represent the four orientation data sets of the building f, then P={p1, p2, p3, p4}.
[0045] In the embodiment of the present application, the target spatial orientation of the target spatial entity relative to different surrounding spatial entities can be represented in the form of an orientation data set. In this way, by converting the orientation description language into a computer language that is easier for a computer to operate and process, human intervention in the operation and processing process can be reduced, and the operation and processing of the electronic fence determination device can be automated, thereby realizing automatic calibration of the electronic fence.
[0046] It should be noted that, in the embodiment of the present application, in order to facilitate the description of the relative position relationship between the building f and the surrounding spatial entities, the area in which the building f is located is labeled in Figure 2 . It can be understood that Figure 2 the area in which the building f and the surrounding spatial entities are located is an electronic map of the building f and the surrounding spatial entities. When the electronic fence of the building f is not calibrated, the electronic map of the area in which the building f and the surrounding spatial entities are located is a partial electronic map as shown in Figure 3 .
[0047] In S120, at least one candidate grid is determined from the preset grid map based on the position information of each surrounding spatial entity.
[0048] The preset grid map can be a map obtained by grid dividing the electronic map in advance. For example, in a possible implementation, a two-dimensional rectangular coordinate system can be established with a coordinate origin (e.g., a coordinate origin of the divided longitude and latitude) of the electronic map as a coordinate origin of the divided grid, a horizontal line passing through the coordinate origin as a horizontal axis, and a vertical line passing through the coordinate origin as a vertical axis. Then, the grid dividing can be performed in the two-dimensional rectangular coordinate system with a preset dividing granularity to obtain the preset grid map.
[0049] It can be understood that, in actual applications, the preset grid map can also be obtained by other manners, which are not limited in the embodiments of the present application. For example, the electronic map can be divided into grids by using a GeoHash (a geographic coding system) technology to obtain the preset grid map. For example, the electronic map can be divided into grids with different sizes by using a GeoHash grid with a short string length of 10, wherein the length and width of the longitude and latitude directions can be 1.19 meters (m) and 0.596 m respectively.
[0050] The preset dividing granularity can be a dividing granularity determined in advance. For example, if η represents the preset dividing granularity, the electronic map can be divided into grids with the same size of η in length and width. For example, η can be 4 m, 2 m or 1 m.
[0051] Referring to Figure 4 The embodiments of the present application provide three different partial schematic diagrams of the preset grid map, which are obtained by dividing the electronic map into grids with three different preset dividing granularities. For example, Figure 4 (a) of FIG. 1 shows a partial schematic diagram of the preset grid map obtained when η = 4 m; Figure 4 (b) of FIG. 1 shows a partial schematic diagram of the preset grid map obtained when η = 2 m; Figure 4 (c) of FIG. 1 shows a partial schematic diagram of the preset grid map obtained when η = 1 m.
[0052] Since the coverage area of the electronic map is very wide, the preset grid map obtained by dividing the electronic map into grids will include a large number of grids. In the embodiments of the present application, if each target grid of the target spatial entity is directly screened from the large number of grids of the preset grid map, the calculation amount will be particularly large. Therefore, in order to save the calculation resources and improve the screening speed, the embodiments of the present application can first determine each candidate grid from the preset grid map based on the position information of each surrounding spatial entity, and then further screen each target grid from each candidate grid.
[0053] S130, respectively determine the calculation space orientation of each candidate grid relative to each surrounding space entity, and determine at least one target grid from each candidate grid according to the calculation space orientation of each candidate grid and each target space orientation.
[0054] When the calculation space orientation of a certain candidate grid relative to each surrounding space entity corresponds to the target space orientation, it indicates that the candidate grid belongs to the region where the target space entity is located. Based on this, in the embodiment of the application, for each candidate grid, the calculation space orientation of the current candidate grid can be compared with the target space orientation respectively, and according to the comparison result, each target grid belonging to the region where the target space entity is located can be screened from each candidate grid.
[0055] For example, still taking the position relationship diagram shown in the figure as an example, Figure 2 The four orientation data groups of the building f are P={p1=(s1, S), p2=(s2, N), p3=(s3, W), p4=(s4, E)}. If the calculation space orientation of a certain candidate grid relative to s1 is S, which is consistent with the target space orientation S of the building f relative to s1; and the calculation space orientation of the candidate grid relative to s2 is N, which is consistent with the target space orientation N of the building f relative to s2; and the calculation space orientation of the candidate grid relative to s3 is W, which is consistent with the target space orientation W of the building f relative to s3; in addition, the calculation space orientation of the candidate grid relative to s4 is E, which is consistent with the target space orientation E of the building f relative to s4. Then, the candidate grid can be determined as a target grid.
[0056] S140, determine the electronic fence of the target space entity based on each target grid.
[0057] In the embodiment of the application, each target grid is a grid belonging to the region where the target space entity is located, which is screened from the preset grid map, so that the electronic fence of the target space entity can be determined based on each target grid.
[0058] Optionally, determining the electronic fence of the target space entity based on each target grid can include: determining the connected region surrounded by each target grid as the electronic fence of the target space entity.
[0059] For example, in this embodiment of the invention, a central grid can be selected from each target grid. Then, all other grids in each target grid except the central grid are traversed to determine all other grids connected to the central grid. Afterward, the connected area covered by the central grid and all other grids connected to the central grid can be defined as the electronic fence of the target spatial entity. The method for determining whether two grids are connected in this embodiment is similar to existing methods for determining connectivity. Specifically, if two grids are adjacent, they are determined to be connected. Furthermore, grid connectivity is transitive; for example, if grid A is connected to grid B and grid A is connected to grid C, then grid B and grid C are also determined to be connected.
[0060] Reference Figure 5 The diagram illustrates three types of electronic fences provided in embodiments of the present invention. These three types of electronic fences are obtained from preset grid maps with three different preset granularity levels. Figure 5 As shown in (a), the shaded area represents the electronic fence obtained in the preset grid map with η = 4m; as Figure 5 As shown in (b), the shaded area represents the electronic fence obtained in the preset grid map of η = 2m; as Figure 5 As shown in (c), the shaded area is a schematic diagram of the electronic fence obtained in the preset grid map with η = 1m.
[0061] from Figure 5 As can be seen, the smaller the preset granularity of the grid map, the higher the accuracy of the resulting electronic fence, meaning a higher accuracy rate for the identified electronic fence. However, a smaller preset granularity also results in a larger number of grids in the map, leading to a slower rate of selecting target grids. Therefore, in practical applications, users can choose the most suitable preset granularity to divide the grid map according to their actual needs. For example, if a user only wants to determine the approximate range of the electronic fence, they can choose a larger preset granularity; if they want to determine the specific range of the electronic fence, they can choose a smaller preset granularity.
[0062] Furthermore, after marking the corresponding area of the electronic fence in the preset grid map, the location information of the electronic fence can be determined based on the location information of the outermost ring of target grids. Based on the location information of the electronic fence, the location of the target spatial entity can be marked on the original electronic map, and the location information of the electronic fence can be added to a geographic information database for subsequent use in other map service software.
[0063] The method for determining the electronic fence provided in the embodiments of the present application can pre-divide a grid on an electronic map to obtain a preset grid map. When the electronic fence of a target space entity needs to be calibrated, if the basic geographic data (for example, position information) of the target space entity is not stored in the geographic information database, several surrounding space entities of which the position information of the target space entity is known can be determined first, and the target space orientation of the target space entity relative to each surrounding space entity (that is, each orientation data set) can be obtained. Then, each candidate grid can be determined from the preset grid map based on the position information of each surrounding space entity, and each target grid can be further screened from each candidate grid based on each orientation data set. Specifically, when the calculated space orientation of a certain candidate grid relative to each surrounding space entity is consistent with the target space orientation, it indicates that the candidate grid belongs to the region where the target space entity is located. Based on this, each target grid belonging to the region where the target space entity is located can be screened from each candidate grid according to the consistency of the calculated space orientation of each candidate grid and the target space orientation. Then, the electronic fence of the target space entity can be calibrated according to each target grid in the preset grid map. As can be seen, in the embodiments of the present application, when the electronic fence of a target space entity of which the position information is unknown needs to be calibrated, each target grid belonging to the region where the target space entity is located can be automatically screened from the preset grid map based on the position information of several surrounding space entities of the target space entity and the target space orientation of the target space entity relative to each surrounding space entity, and the electronic fence of the target space entity can be automatically calibrated based on each target grid. Compared with the manual calibration of the electronic fence, this way of automatically calibrating the electronic fence can improve the calibration efficiency. Moreover, since the calibration result is not affected by human factors, the accuracy of the obtained calibration result can be improved.
[0064] Referring to Figure 6 The flowchart of another method for determining the electronic fence provided in the embodiments of the present application is shown. The method in the embodiments can be combined with each optional scheme in the method for determining the electronic fence provided in the foregoing embodiments to further optimize the method for determining the electronic fence provided in the foregoing embodiments. As shown in the figure, the method specifically includes the following steps: Figure 6
[0065] S610, obtaining at least two orientation data sets of the target space entity.
[0066] S620, determining at least one candidate grid from the preset grid map based on the position information of each surrounding space entity.
[0067] Optionally, determining the at least one candidate grid from the preset grid map based on the position information of the surrounding space entities can include: determining position information of a minimum bounding rectangle corresponding to each surrounding space entity based on the position information of the surrounding space entities; and searching for grids in the preset grid map that intersect with the minimum bounding rectangle based on the position information of the minimum bounding rectangle, and determining each grid in the preset grid map that intersects with the minimum bounding rectangle as a candidate grid.
[0068] In a possible implementation, the four boundary points can be determined based on the position information of the surrounding space entities. Specifically, four points on each surrounding space entity that are the northernmost, southernmost, westernmost, and easternmost points can be determined as the four boundary points. Then, the position information of the minimum bounding rectangle corresponding to each surrounding space entity can be determined according to the position information of the four boundary points.
[0069] For example, as shown in FIG. 1, the four boundary points of each surrounding space entity can be determined as follows: the northernmost point of each surrounding space entity is s1, the rightmost point of each surrounding space entity is s2, the southernmost point of each surrounding space entity is s3, and the leftmost point of each surrounding space entity is s4. Figure 3 Figure 7 As shown in FIG. 1, the four boundary points can be used to determine the minimum bounding rectangle M p .
[0070] Generally, the area corresponding to the minimum bounding rectangle corresponding to each surrounding space entity can cover the area where the target space entity is located. Therefore, in the embodiment of the present application, before the target grids are screened from the preset grid map, the candidate grids that intersect with the area corresponding to the minimum bounding rectangle corresponding to each surrounding space entity can be first screened from the preset grid map, and then the target grids are screened from the candidate grids. In this way, a large number of invalid grids in the preset grid map can be first screened out through one-step screening operation, and the screening process of the candidate grids does not need to be performed on each grid in the preset grid map, thereby further saving computing resources and improving the screening efficiency.
[0071] Optionally, searching for grids in the preset grid map that intersect with the minimum bounding rectangle based on the position information of the minimum bounding rectangle, and determining each grid in the preset grid map that intersects with the minimum bounding rectangle as a candidate grid can include: determining a screenable area from the preset grid map based on index information of the preset grid map and the position information of the minimum bounding rectangle; and searching for grids in the screenable area that intersect with the minimum bounding rectangle based on the position information of the minimum bounding rectangle, and determining each grid in the screenable area that intersects with the minimum bounding rectangle as a candidate grid.
[0072] In the embodiment of the present application, when the preset grid map is determined, the index information of the R-tree (a tree-shaped data structure) corresponding to the preset grid map can be created. For example, if the preset grid map is obtained from an electronic map of a city, the grids in the preset grid map can be divided into different first regions according to the administrative division of the city. Then, for each grid in each administrative region, the first region corresponding to the administrative region can be further divided into different second regions according to the street division of the administrative region. The index information of the R-tree of the preset grid map can record which grids are included in each first region corresponding to each administrative region and which grids are included in each second region. Of course, in actual applications, the grids in the preset grid map can be divided into regions in other ways, which is not limited in the embodiment of the present application.
[0073] For example, after the position information of the minimum bounding rectangle is determined, the administrative region to which the target spatial entity belongs can be determined based on the position information of the minimum bounding rectangle, and the street to which the target spatial entity belongs in the administrative region can be determined. Then, the first region corresponding to the administrative region can be found based on the index information of the R-tree of the preset grid map, and then the second region corresponding to the street can be found from the second regions corresponding to the first region. The second region found is the filterable region in the embodiment of the present application. Then, the grid intersecting with the minimum bounding rectangle can be found from the grids included in the filterable region, and each candidate grid intersecting with the minimum bounding rectangle in the filterable region is determined as a candidate grid.
[0074] In the embodiment of the present application, before the candidate grids intersecting with the minimum bounding rectangle are filtered from the preset grid map, the approximate region corresponding to the minimum bounding rectangle, i.e., the filterable region in the embodiment of the present application, can be located in the preset grid map based on the position information of the minimum bounding rectangle and the index information of the preset grid map. Then, the candidate grids are filtered from the filterable region. In this way, the efficiency of filtering the candidate grids from the preset grid map can be further improved, and the computing resources can be further saved.
[0075] S630, for each candidate grid, the orientation vector of the current candidate grid relative to each surrounding spatial entity is determined, and the target subspace pointed by each orientation vector is determined from each candidate subspace, and the candidate spatial orientation corresponding to each target subspace is determined as each calculated spatial orientation of the current candidate grid.
[0076] In one possible implementation, the orientation vector of the current candidate grid relative to each surrounding spatial entity can be determined based on the position information of the current candidate grid and the position information of each surrounding spatial entity. For example, let v be the orientation vector of the current candidate grid g relative to the surrounding spatial entity s. sg For example, a point pt can be determined on the current candidate grid g based on a pre-defined point selection rule. g (i.e., the first reference point in the embodiments of the present invention), and a point pt can be determined on the surrounding spatial entity s based on a predetermined point selection rule. s (i.e., the second reference point in this embodiment of the invention). If pt g =(x g y g ), and pt s =(x s y s ), then v sg =(x g -x s y g -y s ), where x g pt g In the preset grid map, the x-coordinate, y g pt g The vertical coordinate in the preset grid map; x s Indicates the preset grid map and pt s The x-coordinate of the corresponding point, y s Indicates the preset grid map and pt s The ordinate of the corresponding point.
[0077] Optionally, determining the orientation vectors of the current candidate grid relative to each surrounding spatial entity may include: determining the position information of the second reference point on each surrounding spatial entity that is closest to the first reference point based on the position information of the first reference point of the current candidate grid and the position information of each surrounding spatial entity; and determining each orientation vector of the current candidate grid relative to each surrounding spatial entity based on the position information of the first reference point and the position information of each second reference point.
[0078] In one possible implementation, the centroid of the current candidate mesh can be determined as the first reference point of the current candidate mesh. In this way, the determined current candidate mesh is more accurate in terms of its orientation vectors relative to the surrounding spatial entities, and correspondingly, the selected target mesh is also more accurate.
[0079] Reference Figure 8 This is a schematic diagram illustrating the determination of the orientation vector of the current candidate mesh relative to different types of surrounding spatial entities, provided by an embodiment of the present invention. Figure 8As shown, the centroid of the current candidate mesh can be determined as the first reference point pt. g .like Figure 8 As shown in (a), when the surrounding spatial entities are spatial points, the spatial point itself can be determined as the second reference point pt of the spatial point. s And can be based on pt g Location information and pt s The location information determines the orientation vector v of the current candidate grid relative to the spatial point. sg .like Figure 8 As shown in (b), when the surrounding spatial entities are spatial lines, the distance pt on the spatial line can be... g The most recent pt s The second reference point pt was determined as the space line. s And can be based on pt g Location information and pt s The location information determines the orientation vector v of the current candidate grid relative to the space line. sg .like Figure 8 As shown in (c), when the surrounding spatial entity is a spatial surface, the distance pt on the spatial surface can be... g A recent point s The second reference point pt of the space plane is determined. s And can be based on pt g Location information and pt s The location information determines the orientation vector v of the current candidate grid relative to the spatial plane. sg .
[0080] Since the length of a spatial line is finite, and the coverage area of a spatial surface is also finite, in this embodiment of the invention, when determining the orientation vectors of the current candidate mesh relative to each surrounding spatial entity, the point on each surrounding spatial entity closest to the first reference point can be determined as the second reference point of each surrounding spatial entity. Thus, the orientation vectors determined based on the second reference points and the first reference points of each surrounding spatial entity can more accurately represent the spatial orientation of the current candidate mesh relative to each surrounding spatial entity, meaning the accuracy of the determined computational spatial orientations is higher.
[0081] Taking the surrounding spatial entities as spatial lines as an example, such as Figure 8 As shown in (b), the first reference point pt g The orthocenter to the spatial line is pt. v However, the length of the space line is finite, pt v It is not a point on a spatial line. It can be seen that... Figure 8 In (b) of the above, pt is selected. g The closest point on the space line (pt)s As the second reference point to determine the orientation vector of the current candidate grid relative to the space line, it is more reasonable than selecting pt v Therefore, the method for determining the orientation vector provided by the embodiment of the present application has higher accuracy than other methods.
[0082] Each candidate subspace is obtained by dividing the two-dimensional space based on a preset division rule; and each candidate subspace corresponds to a different candidate space orientation. The preset division rule can be a division rule determined in advance. For example, the preset division rule can include the number of division lines, the direction of each division line, and the number of candidate subspaces obtained by division.
[0083] Optionally, the division of the two-dimensional space based on the preset division rule can include: taking a straight line with a preset included angle with a horizontal line as a first division line, and taking a straight line with a preset included angle with a vertical line as a second division line, to divide the two-dimensional space into four candidate subspaces.
[0084] The preset included angle can be a predetermined angle. For example, the preset included angle can be 45 degrees.
[0085] Referring to Figure 9 FIG. 1 is a schematic diagram of dividing a two-dimensional space according to an embodiment of the present application. As shown in Figure 9 , a straight line with a 45-degree included angle with a horizontal line can be taken as a first division line, and a straight line with a 45-degree included angle with a vertical line can be taken as a second division line, to divide the two-dimensional space into four candidate subspaces, i.e., an upper candidate subspace, a lower candidate subspace, a left candidate subspace, and a right candidate subspace. The candidate space orientation corresponding to the upper candidate subspace is N, the candidate space orientation corresponding to the lower candidate subspace is S, the candidate space orientation corresponding to the left candidate subspace is W, and the candidate space orientation corresponding to the right candidate subspace is E.
[0086] For example, if the orientation of the orientation vector v sg of the current candidate grid g relative to the surrounding space entity s is as shown in Figure 9 , it can be seen from Figure 9 that the target subspace pointed to by the orientation vector v sg is the right candidate subspace, and it can be determined that the calculated space orientation of the current candidate grid g relative to the surrounding space entity s is E.
[0087] In addition, in the embodiment of the present application, if the first reference point pt g of the current candidate grid g coincides with the second reference point pt s of the surrounding space entity s, the orientation vector v sgis a zero vector. At this time, the current candidate grid is not determined as the target grid, so as to more accurately determine the electronic fence of the target space entity. Therefore, in the embodiment of the present application, the zero vector is determined not to belong to any candidate subspace, and the orientation vector v of the current candidate grid g relative to the surrounding space entity s sg In the case of the zero vector, it is defaulted that the calculated spatial orientation of the current candidate grid g relative to the surrounding space entity s is not equal to any target spatial orientation.
[0088] In addition, if the orientation vector v of the current candidate grid g relative to the surrounding space entity s sg falls on the first or second split line, it can be determined that the orientation vector v sg falls into two candidate subspaces. At this time, two calculated spatial orientations of the current candidate grid g relative to the surrounding space entity s can be obtained simultaneously. If the target spatial orientation of the target space entity relative to the surrounding space entity s is consistent with any one of the two calculated spatial orientations, it can be determined that the calculated spatial orientation of the current candidate grid g relative to the surrounding space entity s is consistent with the target spatial orientation of the target space entity relative to the surrounding space entity s.
[0089] The east, south, west, and north directions in geography are determined based on the principle of "up north down south left west right east", so, in the embodiment of the present application, in order to more accurately screen the target grid, when dividing the candidate subspaces, the two-dimensional space can also be divided into four candidate subspaces along the two inclined split lines based on the principle of "up north down south left west right east", and the correspondence between the four candidate subspaces and the east, south, west, and north candidate spatial orientations can be created based on the principle of "up north down south left west right east".
[0090] It can be understood that in actual application, the two-dimensional space can also be divided based on other preset division rules. For example, the two-dimensional space can be divided into eight candidate subspaces based on the first split line, the second split line, the horizontal line, and the vertical line, and the eight candidate subspaces correspond to the eight candidate spatial orientations of southeast, northeast, southwest, northwest, south, north, west, and east respectively. Correspondingly, when determining the target spatial orientation of the target space entity relative to each surrounding space entity, the target spatial orientation also needs to be determined from the eight candidate spatial orientations.
[0091] S640, according to the calculated spatial orientations of each candidate grid and the target spatial orientations, at least one target grid is determined from each candidate grid.
[0092] Optionally, determining at least one target grid from each candidate grid based on each computational space orientation and each target space orientation of each candidate grid may include: determining whether the current computational space orientation is consistent with the target space orientation corresponding to the current computational space orientation for each computational space orientation of the current candidate grid; and determining the current candidate grid as the target grid if the number of consistent computational space orientations of the current candidate grid with the corresponding target space orientations meets a preset condition.
[0093] Among them, the target spatial orientation corresponding to the current computational spatial orientation is the target spatial orientation of the surrounding spatial entity corresponding to the current computational spatial orientation.
[0094] The preset conditions can be predetermined. For example, a preset condition could be that the number of computational space orientations of the current candidate grid that match the corresponding target space orientations is greater than half the total number of orientation data groups.
[0095] For example, taking the four orientation data groups P = {p1 = (s1, S), p2 = (s2, N), p3 = (s3, W), p4 = (s4, E)} of the target space entity as an example, after determining the computational space orientations a1, a2, a3, and a4 of the current candidate grid relative to s1, s2, s3, and s4 respectively, the four computational space orientations a1, a2, a3, and a4 can be compared with the four target space orientations S, N, W, and E respectively. If three or four are consistent, the current candidate grid can be determined as the target grid.
[0096] In practical applications, if candidate grids whose orientations in each computational space match the corresponding orientations in each target space are selected as target grids, the constraints of such selection criteria are too stringent, resulting in target grids with too small a coverage area, which affects the accuracy of the determined electronic fence. Therefore, in this embodiment of the invention, the selection criteria for target grids from candidate grids can be reduced. This results in target grids with coverage areas that are closer to the actual coverage areas of the target spatial entities, thereby improving the accuracy of the determined electronic fence.
[0097] For example, with Figure 5 Candidate grid g in (c) m For example, g m Relative to the computational space orientations of s1, s2, s3, and s4, which are S, N, W, and N respectively, these four computational space orientations can be compared with the four target space orientations S, N, W, and E in the four orientation data sets of the target spatial entity. It is found that g... m The computational space orientation relative to s4 is inconsistent with the target space orientation of the target entity relative to s4. However, fromFigure 5 (c) in the above formula (1) can be seen that g m The target grid is determined, and the coverage of the finally determined electronic fence is closer to the actual coverage of the target space entity. Therefore, in the embodiment of the application, the screening condition for screening the target grid is reduced, and the accuracy of the determined electronic fence can be improved.
[0098] S650, determining the electronic fence of the target space entity based on each target grid.
[0099] In the embodiment of the application, on the basis of the foregoing embodiment, the two-dimensional space can be divided into candidate subspaces corresponding to each candidate space orientation in advance, and when determining the calculation space orientation of each candidate grid relative to each surrounding space entity, the calculation space orientation can be determined based on the candidate subspaces into which the orientation vector of the current candidate grid relative to each surrounding space entity falls. In this way, by determining the calculation space orientation through judging the candidate subspaces into which the direction vector falls, the accuracy of each determined calculation space orientation can be ensured, so that the accuracy of the screened target grid can be improved, and the accuracy of the determined electronic fence can be further improved.
[0100] It should be noted that the method for determining the electronic fence in the embodiment of the application and the method for determining the electronic fence in the foregoing embodiments belong to the same inventive concept, and the technical details not described in detail in the embodiment can be referred to the foregoing embodiments, and the beneficial effects of the foregoing embodiments are also applicable to the embodiment.
[0101] Referring to Figure 10 A flowchart of another method for determining an electronic fence is provided in the embodiment of the application. The method in the embodiment can be combined with each optional scheme in the method for determining an electronic fence provided in the foregoing embodiments, and the method for determining an electronic fence provided in the foregoing embodiments is further optimized. As shown in Figure 10 The method specifically includes the following steps:
[0102] S1010, acquiring at least two orientation data sets of a target space entity.
[0103] S1020, determining the position information of the minimum bounding rectangle corresponding to each surrounding space entity based on the position information of each surrounding space entity.
[0104] Specifically, the way of determining the position information of the minimum bounding rectangle can refer to the way of determining the position information of the minimum bounding rectangle in the process of screening the candidate grid, which will not be described herein again. In the actual application, the position information of the minimum bounding rectangle can be determined first, and then the orientation data sets are verified based on the position information of the minimum bounding rectangle. After the verification is passed, the position information of the minimum bounding rectangle can be reused for screening the candidate grid.
[0105] S1030, determine the position information of the check point of the minimum bounding rectangle based on the position information of the minimum bounding rectangle.
[0106] As shown in the example of FIG. 6, the center of the minimum bounding rectangle can be determined as the check point of the minimum bounding rectangle, and the position information of the check point can be determined based on the position information of the four vertices of the minimum bounding rectangle. Figure 7
[0107] S1040, check each orientation data set respectively based on the position information of the check point and the position information of each surrounding spatial entity.
[0108] Optionally, checking each orientation data set respectively based on the position information of the check point and the position information of each surrounding spatial entity can include: determining a check orientation of the check point relative to each surrounding spatial entity based on the position information of the check point and the position information of each surrounding spatial entity; comparing whether each check orientation is consistent with a target spatial orientation corresponding to the corresponding surrounding spatial entity; and determining that the check result is a check pass in a case where each check orientation is consistent with the target spatial orientation corresponding to the corresponding surrounding spatial entity.
[0109] The manner of determining the check orientation in the embodiment of the application is similar to the manner of determining the calculated spatial orientation. As shown in the example of FIG. 6, the check orientation of the check point pt Figure 7 relative to the spatial point s4 can be determined based on the horizontal coordinate and the vertical coordinate of s4 in the preset grid map and the horizontal coordinate and the vertical coordinate of the check point pt m . m The candidate subspace in which the orientation vector falls is east, and then it can be determined that the check orientation of the check point pt m relative to s4 is east, which is consistent with the target spatial orientation of the target spatial entity relative to s4, and then it can be determined that the orientation data set corresponding to s4 input by the user is a correct orientation data set. Similarly, the orientation data sets corresponding to s1, s2 and s3 can be checked respectively, and if it is determined that the orientation data sets corresponding to s1, s2 and s3 are also correct orientation data sets, then it can be determined that the check result of each orientation data set is a check pass.
[0110] S1050, in a case where the check result of each orientation data set is a check pass, determine each candidate grid from the preset grid map based on the position information of each surrounding spatial entity.
[0111] S1060, respectively determine the calculated spatial orientations of each candidate grid relative to each surrounding spatial entity, and determine at least one target grid from each candidate grid according to the calculated spatial orientations of each candidate grid and each target spatial orientation.
[0112] S1070, determine the electronic fence of the target spatial entity based on each target grid.
[0113] In the embodiment of the present application, on the basis of the foregoing embodiment, before screening the target grid, the obtained orientation data sets can be checked based on the position information of the check points of the minimum bounding rectangle, and in the case that the check result is a check pass, the target grid is screened again. In this way, it can be avoided that the user mistakenly inputs a certain orientation data set, resulting in an inaccurate electronic fence finally determined. Moreover, in the case of a check failure, the user can be reminded to re-input the orientation data sets, so that the electronic fence can be determined again according to the re-input orientation data sets of the user, and the waste of computing resources can be avoided.
[0114] It should be noted that the method for determining the electronic fence proposed in the embodiment of the present application and the foregoing embodiments belongs to the same inventive concept, and the technical details not described in detail in the present embodiment can be referred to the foregoing embodiments, and the beneficial effects possessed by the foregoing embodiments are also applicable in the present embodiment.
[0115] In order to more clearly describe the technical scheme of the embodiment of the present application, the process of determining each target grid in the embodiment of the present application will be described below with a complete embodiment. Referring to Figure 11 , a flowchart of a method for determining each target grid provided by the embodiment of the present application is shown. As shown in the figure, the method for determining each target grid specifically includes the following steps: Figure 11
[0116] S1110, obtain n orientation data sets of the target spatial entity.
[0117] S1120, based on the position information of each surrounding spatial entity, screen each candidate grid intersecting with the minimum bounding rectangle from the preset grid map, to obtain a candidate grid set.
[0118] If G m represents the candidate grid set, then G m ={g1,..., g k}. Wherein, g i represents the i-th candidate grid in the candidate grid set G m , 1≤i≤k, k represents the total number of candidate grids in the candidate grid set G m .
[0119] S1130, let the target grid set G c Empty set, and let i = 1, start traversing G m .
[0120] S1140, determine whether i is greater than k.
[0121] In the case of determining that i is less than or equal to k, step S1150 is executed; in the case of determining that i is greater than k, step S11140 is executed.
[0122] S1150, let j = 1, and let the counter count = 0.
[0123] S1160, determine whether j is greater than n.
[0124] In the case of determining that j is less than or equal to n, step S1170 is executed; in the case of determining that j is greater than n, step S11110 is executed.
[0125] S1170, determine the candidate grid g i relative to p j 's calculation space orientation o ji .
[0126] Wherein, p j represents the surrounding space entity corresponding to the jth orientation data group in the n orientation data groups.
[0127] S1180, determine whether o ji is equal to p j .o.
[0128] Wherein, p j .o represents the target space orientation represented by the jth orientation data group in the n orientation data groups.
[0129] In the case of determining that o ji is equal to p j .o, step S1190 is executed; in the case of determining that o ji is not equal to p j .o, step S11100 is executed.
[0130] S1190, let count = count + 1.
[0131] S11100, let j = j + 1.
[0132] After step S11100, return to step S1160.
[0133] S11110, determine whether count is greater than [|n| / 2].
[0134] Wherein, [|n| / 2] represents the integer operation on |n| / 2, and |n| represents the absolute value of n.
[0135] If it is determined that count is greater than [|n| / 2], step S11120 is performed; if it is determined that count is less than or equal to [|n| / 2], step S11130 is performed.
[0136] S11120, adding candidate grid g i to target grid set G c .
[0137] S11130, setting i=i+1.
[0138] After step S11130, step S1140 is performed.
[0139] S11140, obtaining the latest target grid set G c .
[0140] wherein each grid in the finally obtained latest target grid set G c is each target grid screened out in the embodiment of the application.
[0141] The method for determining each target grid provided by the embodiment of the application and the method for determining each target grid involved in the method for determining the electronic fence of each of the foregoing embodiments belong to the same inventive concept, and details not described in the embodiment can be referred to the embodiment of the method for determining the electronic fence.
[0142] Figure 12 The structure diagram of the determination device of the electronic fence provided by the embodiment of the application, which can include an obtaining module 1210 and a determination module 1220.
[0143] For example, the obtaining module 1210 can perform S110 in the method embodiment, and the determination module 1220 can perform S120, S130 and S140 in the method embodiment.
[0144] Specifically, the obtaining module 1210 is configured to obtain at least two orientation data sets of a target space entity; wherein each orientation data set is configured to represent a target space orientation of the target space entity relative to a different surrounding space entity; the determination module 1220 is configured to determine at least one candidate grid from a preset grid map based on position information of each surrounding space entity; the determination module 1220 is further configured to determine a calculation space orientation of each candidate grid relative to each surrounding space entity, and determine at least one target grid from each candidate grid according to the calculation space orientation of each candidate grid and each target space orientation; the determination module 1220 is further configured to determine an electronic fence of the target space entity based on each target grid.
[0145] Optionally, in a possible implementation, the determining module 1220 is specifically configured to:
[0146] For each calculation space orientation of the current candidate grid, determine whether the current calculation space orientation is consistent with a target space orientation corresponding to the current calculation space orientation, wherein the target space orientation corresponding to the current calculation orientation is a target space orientation corresponding to a surrounding space entity corresponding to the current calculation space orientation among the target space orientations; and in a case where a number of the current calculation space orientations consistent with the corresponding target space orientations of the current candidate grid satisfies a preset condition, determine the current candidate grid as the target grid.
[0147] Optionally, in another possible implementation, the determining module 1220 is further specifically configured to:
[0148] For the current candidate grid, respectively determine a position vector of the current candidate grid relative to each surrounding space entity; respectively determine a target sub-space pointed by each position vector from each candidate sub-space, and determine a candidate space orientation corresponding to each target sub-space as each calculation space orientation of the current candidate grid; wherein each candidate sub-space is obtained by dividing a two-dimensional space based on a preset division rule; and each candidate sub-space corresponds to a different candidate space orientation.
[0149] Optionally, in another possible implementation, each candidate sub-space is four candidate sub-spaces obtained by dividing the two-dimensional space by a straight line at a preset angle with a horizontal line as a first division line, and a straight line at a preset angle with a vertical line as a second division line.
[0150] Optionally, in another possible implementation, the determining module 1220 is further specifically configured to:
[0151] Based on the position information of the first reference point of the current candidate grid and the position information of each surrounding space entity, respectively determine position information of a second reference point closest to the first reference point on each surrounding space entity; and based on the position information of the first reference point and the position information of each second reference point, respectively determine each position vector of the current candidate grid relative to each surrounding space entity.
[0152] Optionally, in another possible implementation, the determining module 1220 is specifically configured to:
[0153] Based on the position information of each surrounding space entity, determine position information of a minimum bounding rectangle corresponding to each surrounding space entity; and based on the position information of the minimum bounding rectangle, find a grid intersecting with the minimum bounding rectangle in a preset grid map, and determine each grid intersecting with the minimum bounding rectangle in the preset grid map as each candidate grid.
[0154] Optionally, in another possible implementation, the determining module 1220 is specifically configured to:
[0155] The index information of the preset grid map and the position information of the minimum bounding rectangle are used to determine the filterable area from the preset grid map; and the position information of the minimum bounding rectangle is used to find the grids intersecting with the minimum bounding rectangle in the filterable area, and each grid intersecting with the minimum bounding rectangle in the filterable area is determined as each candidate grid.
[0156] Optionally, in another possible implementation, the determining module 1220 is specifically configured to:
[0157] The position information of the minimum bounding rectangle corresponding to each surrounding space entity is determined based on the position information of each surrounding space entity; the position information of the check point of the minimum bounding rectangle is determined based on the position information of the minimum bounding rectangle; each orientation data group is checked based on the position information of the check point and the position information of each surrounding space entity; and each candidate grid is determined from the preset grid map based on the position information of each surrounding space entity, when the check result of each orientation data group is passed.
[0158] Optionally, in another possible implementation, the determining module 1220 is specifically configured to:
[0159] The check orientation of the check point relative to each surrounding space entity is determined based on the position information of the check point and the position information of each surrounding space entity; whether each check orientation is consistent with the target space orientation corresponding to the corresponding surrounding space entity is compared; and the check result is determined as passed when each check orientation is consistent with the target space orientation corresponding to the corresponding surrounding space entity.
[0160] Optionally, in another possible implementation, the determining module 1220 is specifically configured to: determine the connected region surrounded by each target grid as the electronic fence of the target space entity.
[0161] The electronic fence determination apparatus provided by the embodiments of the present application and the electronic fence determination method provided by the foregoing embodiments belong to the same inventive concept, and the details not described in the embodiments of the electronic fence determination apparatus can be referred to the related content of the foregoing method embodiments, and the corresponding beneficial effects can also be analyzed with reference to the beneficial effects of the foregoing method embodiments.
[0162] Figure 13 FIG. 1 shows a structural schematic diagram of an electronic fence determination device provided by an embodiment of the present application. Figure 13 FIG. 1 shows a structural schematic diagram of an electronic fence determination device provided by an embodiment of the present application. Figure 13The electronic fence determination device 12 shown is merely one example and should not be taken as limiting the scope of functionality or use of embodiments of the application.
[0163] As shown, the electronic fence determination device 12 is in the form of a general- purpose computing device. The components of the electronic fence determination device 12 can include, but are not limited to, one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 to the processing unit 16. Figure 13 The bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration bus, a processor or local bus using any of a variety of bus architectures. By way of example, these architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0164] The electronic fence determination device 12 typically includes a variety of computer system readable media. Such media can be any available media that is locally and / or remotely accessible by the electronic fence determination device 12, and includes both volatile and non-volatile media, removable and non-removable media.
[0165] The system memory 28 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory (referred to as
[0166] The electronic fence determination device 12 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 34 can be provided for reading from and writing to non-removable, non-volatile magnetic media (e.g., a "hard drive"). Figure 13 Although not shown, a magnetic disk drive can also be used to read from and write to a removable, non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive can be used to read from and write to a removable, non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, etc.). In such instances, each drive can be connected to the bus 18 by one or more data media interfaces. The system memory 28 can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application. Figure 13 Figure 13 The system memory 28 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory (referred to as
[0167] Program / utility 40 having a set of program modules 42 can be stored in system memory 28 by way of example, such program modules 42 include an operating system, one or more application programs, other program modules, and program data, each or some combination thereof, which can include implementations of the network environment as described herein. Program modules 42 generally carry out the functions and / or methodologies of embodiments of the application as described herein.
[0168] Determination device 12 of the electronic fence can also communicate with one or more external devices 14 such as a keyboard, a pointing device, a display 24, etc. which enable a user to interact with determination device 12 of the electronic fence, and / or with any devices (e.g., a network card, a modem, etc.) that enable determination device 12 of the electronic fence to communicate with one or more other computing devices. Such communication can occur via input / output (I / O) interface 22. Still yet, determination device 12 of the electronic fence can communicate with one or more networks such as a local area network (LAN), a wide area network (WAN), and / or the Internet through network adapter 20. As Figure 13 illustrated, network adapter 20 communicates with the other components of determination device 12 of the electronic fence via bus 18. It should be appreciated that although not shown, other hardware and / or software modules could be used in conjunction with determination device 12 of the electronic fence. Examples, include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0169] Processing unit 16 executes various function applications and data processing by running programs stored in system memory 28, such as implementing the steps of the method for determining the electronic fence provided by embodiments of the present application, which includes: obtaining at least two position data sets of a target space entity; wherein each position data set is used to represent a target space position of the target space entity relative to different surrounding space entities; determining at least one candidate grid from a preset grid map based on position information of each surrounding space entity; determining a calculation space position of each candidate grid relative to each surrounding space entity, and determining at least one target grid from each candidate grid according to the calculation space position of each candidate grid and each target space position; and determining the electronic fence of the target space entity based on each target grid.
[0170] Of course, those skilled in the art can understand that the processor can also implement the technical solutions of the method for determining the electronic fence provided by any embodiment of the present application.
[0171] The embodiment provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement steps of a method for determining an electronic fence provided by the foregoing embodiment of the application. The method comprises the following steps: obtaining at least two position data sets of a target space entity; wherein each position data set is used for representing a target space position of the target space entity relative to different surrounding space entities; determining at least one candidate grid from a preset grid map based on position information of each surrounding space entity; determining a calculation space position of each candidate grid relative to each surrounding space entity respectively, and determining at least one target grid from each candidate grid according to the calculation space position of each candidate grid and each target space position; and determining the electronic fence of the target space entity based on each target grid.
[0172] The computer storage medium of the embodiment of the application can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, but is not limited to, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, device or component.
[0173] The computer readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, in which a computer readable program code is borne. Such a propagated data signal can take multiple forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can transmit, propagate or transport a program for use by or in connection with an instruction execution system, device or component.
[0174] The program code contained in the computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination thereof.
[0175] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0176] Those skilled in the art will appreciate that the modules or steps of the application described above can be implemented in a general purpose computer, and can be centralized in a single computer or distributed over a network of multiple computers, and optionally, they can be implemented in program code executable by a computer, and thus can be stored in a storage device and executed by a computer, or they can be made into individual integrated circuit modules, or a plurality of modules or steps can be made into a single integrated circuit module. Thus, the present application is not limited to any particular combination of hardware and software.
[0177] Note that the above are only the preferred embodiments of the present application and the principles of the applied technology. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, reconfigurations and substitutions can be made by those skilled in the art without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A method of determining an electronic fence, characterized in that, The method comprises: obtaining at least two position data sets of a target space entity; wherein each of the position data sets is used to represent a target space position of the target space entity relative to a different surrounding space entity; determining at least one candidate grid from a preset grid map based on position information of each of the surrounding space entities; determining a calculated space position of each of the candidate grids relative to each of the surrounding space entities, and determining at least one target grid from each of the candidate grids based on the calculated space position of each of the candidate grids and each of the target space positions; determining an electronic fence of the target space entity based on each of the target grids.
2. The method of claim 1, wherein, The method comprises: for the calculated space position of the current candidate grid, determining whether the current calculated space position is consistent with the target space position corresponding to the current calculated space position; wherein the target space position corresponding to the current calculated space position is the target space position corresponding to the surrounding space entity corresponding to the current calculated space position among the target space positions; in a case where the number of the calculated space positions of the current candidate grid that are consistent with the corresponding target space positions satisfies a preset condition, determining the current candidate grid as the target grid.
3. The method of claim 1, wherein, The method comprises: for the current candidate grid, determining a position vector of the current candidate grid relative to each of the surrounding space entities; determining a target sub-space pointed to by each of the position vectors from each of the candidate sub-spaces, and determining a candidate space position corresponding to each of the target sub-spaces as the calculated space position of the current candidate grid; wherein the candidate sub-spaces are obtained by dividing a two-dimensional space based on a preset division rule; and the candidate sub-spaces correspond to different candidate space positions.
4. The method of claim 3, wherein, The method comprises: dividing the two-dimensional space into four candidate sub-spaces by using a straight line with a preset included angle with a horizontal line as a first division line, and using a straight line with the preset included angle with a vertical line as a second division line.
5. The method of claim 3, wherein the electronic fence is determined based on a location of the electronic device. The method comprises: based on the position information of the first reference point of the current candidate grid and the position information of each of the surrounding space entities, determining position information of a second reference point closest to the first reference point on each of the surrounding space entities; based on the position information of the first reference point and the position information of each of the second reference points, determining the position vector of the current candidate grid relative to each of the surrounding space entities.
6. The method of claim 1, wherein, The method comprises: based on the position information of each of the surrounding space entities, determining position information of a minimum bounding rectangle corresponding to each of the surrounding space entities; and determining at least one candidate grid from the preset grid map based on the position information of each of the surrounding space entities. The position information of the minimum bounding rectangle is used to search for grids intersecting with the minimum bounding rectangle in the preset grid map, and each grid intersecting with the minimum bounding rectangle in the preset grid map is determined as a candidate grid.
7. The method of claim 6, wherein the electronic fence is determined based on a location of the electronic device. The position information of the minimum bounding rectangle is used to search for grids intersecting with the minimum bounding rectangle in the preset grid map, and each grid intersecting with the minimum bounding rectangle in the preset grid map is determined as a candidate grid. Index information of the preset grid map and the position information of the minimum bounding rectangle are used to determine a filterable area from the preset grid map. The position information of the minimum bounding rectangle is used to search for grids intersecting with the minimum bounding rectangle in the filterable area, and each grid intersecting with the minimum bounding rectangle in the filterable area is determined as a candidate grid.
8. The method of claim 1, wherein, The position information of each surrounding space entity is used to determine the position information of a minimum bounding rectangle corresponding to each surrounding space entity. The position information of each surrounding space entity is used to determine the position information of a minimum bounding rectangle corresponding to each surrounding space entity. The position information of the minimum bounding rectangle is used to determine the position information of a check point of the minimum bounding rectangle. The position information of the check point and the position information of each surrounding space entity are used to check each orientation data group respectively. In a case where the check result of each orientation data group is a check pass, the position information of each surrounding space entity is used to determine each candidate grid from the preset grid map.
9. The method of claim 8, wherein, The position information of the check point and the position information of each surrounding space entity are used to check each orientation data group respectively. The position information of the check point and the position information of each surrounding space entity are used to determine a check orientation of the check point relative to each surrounding space entity respectively. Each check orientation is compared with a target space orientation corresponding to a corresponding surrounding space entity. In a case where each check orientation is consistent with a target space orientation corresponding to a corresponding surrounding space entity, the check result is determined as a check pass.
10. The method of claim 1-9, wherein, Each target grid is used to determine an electronic fence of the target space entity. A connected region surrounded by each target grid is determined as the electronic fence of the target space entity.
11. A determination device of an electronic fence, characterized by, The method comprises the following steps: The at least two orientation data groups of the target space entity are obtained. The position information of each surrounding space entity is used to determine at least one candidate grid from a preset grid map. The position information of each candidate grid relative to each surrounding space entity is determined respectively, and at least one target grid is determined from each candidate grid according to each calculation space orientation of each candidate grid and each target space orientation. The position information of each candidate grid relative to each surrounding space entity is determined respectively, and at least one target grid is determined from each candidate grid according to each calculation space orientation of each candidate grid and each target space orientation. The determining module is further configured to determine the electronic fence of the target space entity based on the target grids.
12. A determination device of an electronic fence, characterized by, The electronic fence determining device comprises: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the electronic fence determining method according to any one of claims 1-10.
13. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the electronic fence determining method according to any one of claims 1-10. The program is executed by the processor to implement the electronic fence determining method according to any one of claims 1-10.
Citation Information
Patent Citations
Electronic fence method and device
CN108388621A
Localization using tessellated grids
US20220205808A1