Information acquisition method, apparatus, device, medium, and product
By storing real-time feature data and its location, and determining real-time feature data based on the location of geofence grid areas, the problems of high storage cost and poor scalability in existing technologies are solved, and real-time feature data acquisition with low cost and strong scalability is achieved.
Patent Information
- Application Number
- CN202210435841.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-24
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-04-24
AI Technical Summary
Existing technologies require pre-storing each geofence and its corresponding real-time feature data when acquiring real-time feature data of geofences, which leads to increased storage costs as the number of geofences increases, and does not support the timely acquisition of real-time feature data of newly added geofences.
By storing each real-time feature data and its corresponding real-time location, and determining the feature data of the real-time location within the geofence based on the regional location of each grid in the geofence, the data can be directly used as the real-time feature data of the geofence, thus avoiding the need to pre-store the specific geofence and its corresponding real-time feature data.
It significantly reduces storage costs, has strong scalability, supports real-time feature data querying of newly added geofences, and does not rely on fence management and judgment services, enabling accurate querying of geofences of any shape.
Smart Images

Figure CN116975169B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the technical field of Internet, in particular to an information acquisition method, device, equipment, medium and product. BACKGROUND
[0002] A geographic fence refers to a virtual geographic boundary enclosed by a virtual fence, which can be an arbitrary polygon and can be represented by a set of clockwise longitude and latitude arrays. Real-time feature data of the geographic fence refers to real-time feature data of entities within the geographic fence, such as real-time feature data of vehicles in the geographic fence, real-time feature data of orders, and the like. Real-time feature data calculation of any geographic fence has very important guiding significance for fine operation of a business. The real-time characteristics of a specific business within the geographic fence can be analyzed based on the real-time feature data of the geographic fence, and the specific business within the geographic fence can be adjusted and managed in a timely manner according to a preset management strategy based on the real-time characteristics of the specific business. For example, in the two-wheeled electric vehicle operation and battery replacement scene, the real-time battery replacement value of the geographic fence can be determined by analyzing the real-time feature data of the geographic fence, and the two-wheeled electric vehicle within the geographic fence can be replaced according to a preset battery replacement strategy based on the battery replacement value. The battery replacement strategy can be a strategy of prioritizing battery replacement for a higher battery replacement value. In this way, the two-wheeled electric vehicle within the geographic fence with a high battery replacement value can be prioritized for battery replacement, providing guidance for operation and maintenance, improving battery replacement operation quality, and reducing the proportion of order loss caused by low battery. Therefore, based on the real-time feature data of the geographic fence, the business can be driven in real time and intelligently for fine operation in the geographic location dimension in combination with a preset strategy algorithm, thereby realizing the value of data-driven.
[0003] Currently, the main scheme for acquiring real-time feature data of a geographic fence is as follows: when real-time feature data is received, the geographic fence to which the real-time feature data belongs is determined in advance according to the longitude and latitude in the real-time feature data, the real-time feature data is stored in combination with the geographic fence to which it belongs, and then a query service for real-time feature data of the geographic fence is provided. However, this method requires pre-storing each geographic fence and its corresponding real-time feature data, and the storage cost increases linearly with the increase in the number of fences. If a new geographic fence is added, the real-time feature data of the new geographic fence must be generated after the new geographic fence is added, and the real-time feature data of the new geographic fence cannot be acquired. SUMMARY
[0004] Embodiments of the present disclosure provide an information acquisition method, device, equipment, medium and product.
[0005] In a first aspect, an information acquisition method is provided in embodiments of the present disclosure.
[0006] Specifically, the information acquisition method comprises:
[0007] acquiring and storing each real-time feature data and a corresponding real-time position thereof;
[0008] acquiring an area position of each grid in a geofence;
[0009] determining real-time feature data of which a real-time position is located within the area position of a grid in the geofence as real-time feature data of the geofence.
[0010] In a possible implementation, the acquiring of the area position of each grid in the geofence comprises:
[0011] acquiring an area position of the geofence;
[0012] acquiring an area position of a first grid and a second grid in the geofence based on the area position of the geofence, the first grid comprising a grid completely covered by the geofence, the second grid comprising a grid partially covered by the geofence, and the first grid and the second grid being preset position-fixed grids.
[0013] In a possible implementation, the determining of the real-time feature data of which the real-time position is located within the area position of the grid in the geofence as the real-time feature data of the geofence comprises:
[0014] determining first real-time feature data of which the real-time position is located within the area position of the first grid as the real-time feature data of the geofence;
[0015] The method further comprises:
[0016] determining second real-time feature data of which the real-time position is located within the area position of the second grid;
[0017] screening third real-time feature data of which the real-time position is located within the area position of the geofence from the second real-time feature data as the real-time feature data of the geofence.
[0018] In a possible implementation, the screening of the third real-time feature data of which the real-time position is located within the area position of the geofence from the second real-time feature data comprises:
[0019] determining a ray with the real-time position corresponding to the second real-time feature data as a starting point;
[0020] if the number of intersection points of the ray and the boundary of the geofence is odd, determining that the second real-time feature data is the third real-time feature data of which the real-time position is located within the area position of the geofence;
[0021] If the number of intersection points of the ray and the boundary of the geofence is even, it is determined that the real-time position corresponding to the second real-time feature data is located outside the area position of the geofence.
[0022] In a possible implementation, the grids in the geofence include GeoHash grids, and the acquiring, based on the area position of the geofence, of the first grid completely covered by the geofence and the second grid partially covered by the geofence includes:
[0023] The preset minimum level grid completely covered by the geofence is determined as the first grid, and the preset minimum level grid partially covered by the geofence is determined as the first layer partial coverage grid based on the area position of the geofence.
[0024] The next level grid in the first layer partial coverage grid is traversed, the next level grid in the first layer partial coverage grid completely covered by the geofence is determined as the first grid, and the next level grid in the first layer partial coverage grid partially covered by the geofence is determined as the next layer partial coverage grid, until the next level grid of the next layer partial coverage grid is the preset maximum level grid, the maximum level grid in the next layer partial coverage grid completely covered by the geofence is determined as the first grid, and the maximum level grid partially covered by the area of the geofence is determined as the second grid.
[0025] The area of the current level grid is greater than the area of the next level grid.
[0026] In a possible implementation, the preset minimum level grid completely covered by the geofence is determined as the first grid, and the preset minimum level grid partially covered by the geofence is determined as the first layer partial coverage grid based on the area position of the geofence.
[0027] The minimum circumscribed rectangle of the geofence is determined based on the area position of the geofence.
[0028] The preset minimum level grid completely covered or partially covered by the minimum circumscribed rectangle is determined as the third grid based on the longitude and latitude coordinates of the diagonal points of the minimum circumscribed rectangle.
[0029] The third grid completely covered by the geofence is determined as the first grid, and the third grid partially covered by the geofence is determined as the first layer partial coverage grid by traversing the third grid.
[0030] In a possible implementation, the maximum level grid and the minimum level grid include preset intermediate level grids.
[0031] wherein in each level grid between the minimum level grid and the intermediate level grid, the area of the current level grid is M times of the area of the next level grid, and in each level grid between the intermediate level grid and the maximum level grid, the area of the current level grid is N times of the area of the next level grid, the M is greater than the N, and the M and the N are integers greater than or equal to 0.
[0032] In a possible implementation, the real-time position includes real-time latitude and longitude information, and the first real-time feature data determined that the real-time position is located in the area position of the first grid is taken as the real-time feature data of the geofence, including:
[0033] If the longitude in the real-time latitude and longitude information is located between the longitudes of the opposite corners of the first grid and the latitude is located between the latitudes of the opposite corners of the first grid, it is determined that the real-time latitude and longitude information is located in the area position of the first grid, and the first real-time feature data corresponding to the real-time latitude and longitude information is determined as the real-time feature data of the geofence.
[0034] In a second aspect, the embodiments of the present disclosure provide an information acquisition device.
[0035] Specifically, the information acquisition device comprises:
[0036] A first acquisition module configured to acquire and store each real-time feature data and the real-time position corresponding thereto;
[0037] A second acquisition module configured to acquire the area position of each grid in the geofence;
[0038] A first determination module configured to determine the real-time feature data whose real-time position is located in the area position of the grid in the geofence as the real-time feature data of the geofence.
[0039] In a possible implementation, the second acquisition module is configured to:
[0040] acquire the area position of the geofence;
[0041] acquire the area position of the first grid and the second grid in the geofence based on the area position of the geofence, the first grid comprising a grid completely covered by the geofence, the second grid comprising a grid partially covered by the geofence, and the first grid and the second grid being preset position-fixed grids.
[0042] In a possible implementation, the first determination module is configured to:
[0043] determine first real-time feature data of the real-time position being located in the area position of the first grid as the real-time feature data of the geofence;
[0044] The apparatus further includes:
[0045] A second determining module, configured to determine second real-time feature data of the real-time position being located in the area position of the second grid;
[0046] A screening module, configured to screen third real-time feature data of the real-time position being located in the area position of the geofence from the second real-time feature data as the real-time feature data of the geofence.
[0047] In a possible implementation, the screening module is configured to:
[0048] determine a ray with the real-time position corresponding to the second real-time feature data as a starting point;
[0049] if the number of intersection points of the ray and the boundary of the geofence is odd, determine that the second real-time feature data is the third real-time feature data of the real-time position being located in the area position of the geofence;
[0050] if the number of intersection points of the ray and the boundary of the geofence is even, determine that the real-time position corresponding to the second real-time feature data is located outside the area position of the geofence.
[0051] In a possible implementation, each grid in the geofence includes a GeoHash grid, and the second obtaining module is configured to, based on the area position of the geofence, obtain the first grid completely covered by the geofence and the second grid partially covered by the geofence as follows:
[0052] based on the area position of the geofence, determine a preset minimum level grid completely covered by the geofence as the first grid, and determine a preset minimum level grid partially covered by the geofence as a first layer partially covered grid;
[0053] traverse a next level grid in the first layer partially covered grid, determine a next level grid in the first layer partially covered grid completely covered by the geofence as the first grid, and determine a next level grid in the first layer partially covered grid partially covered by the geofence as a next layer partially covered grid, until a next level grid of the next layer partially covered grid is a preset maximum level grid, then determine a maximum level grid in the next layer partially covered grid completely covered by the geofence as the first grid, and determine a maximum level grid partially covered by the area of the geofence as the second grid;
[0054] wherein, the area of the region of the current hierarchical grid is greater than the area of the region of the next hierarchical grid.
[0055] In a possible implementation, the second obtaining module is configured to determine, based on the region position of the geographic fence, a preset minimum hierarchical grid that is entirely covered by the geographic fence as a first grid, and determine a preset minimum hierarchical grid that is partially covered by the geographic fence as a first layer partially covered grid.
[0056] determine a minimum circumscribed rectangle of the geographic fence based on the region position of the geographic fence;
[0057] determine, based on the longitude and latitude coordinates of the diagonal points of the minimum circumscribed rectangle, a preset minimum hierarchical grid that is entirely or partially covered by the minimum circumscribed rectangle as a third grid;
[0058] traverse the third grid, and determine a third grid that is entirely covered by the geographic fence as a first grid, and determine a third grid that is partially covered by the geographic fence as a first layer partially covered grid.
[0059] In a possible implementation, the maximum hierarchical grid and the minimum hierarchical grid include preset intermediate hierarchical grids therebetween;
[0060] wherein, in each hierarchical grid between the minimum hierarchical grid and the intermediate hierarchical grid, the area of the region of the current hierarchical grid is M times the area of the region of the next hierarchical grid, and in each hierarchical grid between the intermediate hierarchical grid and the maximum hierarchical grid, the area of the region of the current hierarchical grid is N times the area of the region of the next hierarchical grid, the M is greater than the N, and the M and the N are integers greater than or equal to 0.
[0061] In a possible implementation, the real-time position includes real-time longitude and latitude information, and the first determining module is configured to determine, as part of the real-time feature data of the geographic fence, first real-time feature data of the real-time position located in the region position of the first grid.
[0062] if the longitude in the real-time longitude and latitude information is located between the longitudes of the diagonal points of the first grid and the latitude is located between the latitudes of the diagonal points of the first grid, it is determined that the real-time longitude and latitude information is located in the region position of the first grid, and it is determined that the first real-time feature data corresponding to the real-time longitude and latitude information is the real-time feature data of the geographic fence.
[0063] Thirdly, embodiments of this disclosure provide an electronic device, including a memory and a processor. The memory stores one or more computer instructions that support an information acquisition device in executing the aforementioned information acquisition method. The processor is configured to execute the computer instructions stored in the memory. The information acquisition device may further include a communication interface for communicating with other devices or communication networks.
[0064] Fourthly, embodiments of this disclosure provide a computer-readable storage medium for storing computer instructions used by an information acquisition device, including computer instructions for executing the aforementioned information acquisition method as per the information acquisition device.
[0065] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program / instructions, wherein the computer program / instructions, when executed by a processor, implement the steps in the above-described information acquisition method.
[0066] The technical solutions provided in this disclosure may have the following beneficial effects:
[0067] The above technical solution only needs to store each real-time feature data and its corresponding real-time location. When querying the real-time feature data of a geofence, it is only necessary to use the real-time feature data whose real-time location is located within the grid area of the geofence as the real-time feature data of the geofence, based on the regional location of each grid in the geofence. In this way, it is not necessary to pre-store the specific geofence and its corresponding real-time feature data, but only to store each real-time feature data and its corresponding real-time location, which greatly reduces the storage cost and has strong scalability. Moreover, for newly added geofences, the above solution can also be used to query and obtain them in real time.
[0068] 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 embodiments of this disclosure. Attached Figure Description
[0069] Other features, objects, and advantages of embodiments of this disclosure will become more apparent from the following detailed description of non-limiting implementations, taken in conjunction with the accompanying drawings. In the drawings:
[0070] Figure 1 A flowchart illustrating an information acquisition method according to an embodiment of the present disclosure is shown;
[0071] Figure 2 A schematic diagram illustrating a scenario for obtaining a grid in a geofence according to an embodiment of the present disclosure is shown.
[0072] Figure 3 A schematic diagram of a location determination scenario inside and outside a geofence according to an embodiment of the present disclosure is shown.
[0073] Figure 4 A schematic diagram of a scenario of acquiring a grid in a geo-fence is shown according to an embodiment of the present disclosure;
[0074] Figure 5 A schematic diagram of a scenario of acquiring a grid in a geo-fence is shown according to an embodiment of the present disclosure;
[0075] Figure 6 A schematic diagram of a scenario of acquiring a grid in a geo-fence is shown according to an embodiment of the present disclosure;
[0076] Figure 7 A schematic diagram of a scenario of comparing grids acquired in a geo-fence in two ways is shown according to an embodiment of the present disclosure;
[0077] Figure 8 A schematic diagram of a scenario of position query inside and outside a grid is shown according to an embodiment of the present disclosure;
[0078] Figure 9 A schematic diagram of a structure of an information acquisition apparatus is shown according to an embodiment of the present disclosure;
[0079] Figure 10 A schematic diagram of a structure of an electronic device is shown according to an embodiment of the present disclosure;
[0080] Figure 11 A schematic diagram of a structure of a computer system suitable for implementing an information acquisition method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0081] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so as to be easily carried out by one of ordinary skill in the art. Also, portions irrelevant to the description of the exemplary embodiments are omitted in the accompanying drawings.
[0082] In the embodiments of the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate that there are features, numbers, steps, actions, components, parts or combinations thereof disclosed in the specification, and do not exclude the possibility that one or more other features, numbers, steps, actions, components, parts or combinations thereof exist or are added.
[0083] It should also be further noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict. The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0084] As mentioned above, at present, the acquisition scheme of real-time feature data of a geographic fence mainly includes the following steps: when receiving real-time feature data, determining the geographic fence to which the real-time feature data belongs according to the longitude and latitude in the real-time feature data in advance, then storing the real-time feature data in the geographic fence to which the real-time feature data belongs, and binding the real-time feature data with the geographic fence to which the real-time feature data belongs, and then providing a query service of real-time feature data of the geographic fence. However, this method needs to store each geographic fence and its corresponding real-time feature data in advance, so the storage cost increases linearly with the increase of the number of fences; if a new geographic fence is added, the real-time feature data of the new geographic fence must be generated after the new geographic fence is added, and the real-time feature data of the new geographic fence cannot be acquired in time; in addition, since the geographic fence and its corresponding real-time feature data need to be stored, it is strongly dependent on the management and determination services of the geographic fence, and these two services involve the business lifecycle management of the geographic fence and the fence determination algorithm, which has high business understanding cost and high maintenance cost.
[0085] To solve the above problems, the present disclosure provides an information acquisition scheme, which only needs to store each real-time feature data and its corresponding real-time position, and when the real-time feature data of a geographic fence is queried, only needs to determine the real-time feature data whose real-time position is located in the area position of the grid in the geographic fence as the real-time feature data of the geographic fence based on the area position of each grid in the geographic fence. In this way, it is not necessary to store specific geographic fences and their corresponding real-time feature data in advance, but only to store each real-time feature data and its corresponding real-time position, which greatly reduces the storage cost and has strong scalability, and for a new geographic fence, the above scheme can also be used to acquire real-time feature data.
[0086] Figure 1 A flowchart of an information acquisition method according to an embodiment of the present disclosure is shown in FIG. 1. Figure 1 As shown in FIG. 1, the information acquisition method includes the following steps S101-S103:
[0087] In step S101, each real-time feature data and its corresponding real-time position are acquired and stored.
[0088] In step S102, the area position of each grid in the geographic fence is acquired.
[0089] In step S103, the real-time feature data whose real-time position is located in the area position of the grid in the geographic fence is determined as the real-time feature data of the geographic fence.
[0090] In an embodiment of the present disclosure, the information acquisition method can be applied to a computer, a computing device, an electronic device, a server, a service cluster, etc. that can acquire real-time feature data of a geographic fence.
[0091] In an embodiment of the present disclosure, the real-time feature data refers to real-time stream data of various entities, such as real-time stream data of vehicles, real-time stream data of orders, real-time stream data of work orders, and the like, and the real-time location refers to a positioning location at the time when the real-time feature data is generated, which can be a latitude and longitude location.
[0092] In an embodiment of the present disclosure, a geofence refers to a virtual geographical boundary enclosed by a virtual fence, which can be any polygonal shape, for example, Figure 2 A schematic diagram of a scenario of acquiring grids in a geofence according to an embodiment of the present disclosure is shown in FIG. 2, which shows a geofence 201. Figure 2 As shown, the geofence 201 can be in the shape of a triangle.
[0093] In an embodiment of the present disclosure, an electronic map area is divided into a network of non-intersecting grids in a certain shape, such as a triangle, a quadrilateral, a hexagon, and the like, and these grids are referred to as grids. The geofence covers a plurality of grids, and the area locations of these grids belong to the area locations of the geofence, so the embodiment can use the area locations of the grids in the geofence to represent the area range of the geofence.
[0094] In an embodiment of the present disclosure, when real-time feature data of a certain geofence (which can be an existing geofence or a newly added geofence) needs to be queried, the real-time feature data of the real-time location located in the area locations of the grids in the geofence can be directly queried from the stored real-time feature data corresponding to the real-time locations, and the queried real-time feature data is taken as the real-time feature data of the geofence. In this way, the specific geofence and the corresponding real-time feature data do not need to be stored in advance, only the real-time feature data and the corresponding real-time locations need to be stored, which greatly reduces the storage cost and has strong scalability, and also supports the acquisition of real-time feature data of newly added geofences. In addition, the present solution does not need to be stored in association with the geofence, so it does not rely on the management and determination of the geofence and other service components to provide the geofence, and can acquire real-time feature data of any shape of geofence.
[0095] In an embodiment of the present disclosure, the acquiring of the area locations corresponding to the grids in the geofence comprises:
[0096] Acquiring the area locations of the geofence;
[0097] Based on the area locations of the geofence, acquiring the area locations of a first grid and a second grid in the geofence, the first grid comprising a grid completely covered by the geofence, and the second grid comprising a grid partially covered by the geofence, the first grid and the second grid being preset position-fixed grids.
[0098] In this embodiment, the area position of the geofence can be the longitude and latitude information of the boundary of the geofence, and each grid on the map is a pre-divided fixed-position grid. The grid in the geofence can be determined based on the area position of the geofence and the area position of each grid, and then the area position of each grid in the geofence is obtained.
[0099] In this embodiment, the geofence can be any polygon, and thus some grids can have a part inside the geofence and another part outside the geofence at the boundary of the geofence. These grids partially covered by the geofence can be recorded as second grids, and the grids entirely inside the geofence can be recorded as first grids.
[0100] In an embodiment of the present disclosure, the real-time feature data of the real-time position located in the area position of the grid in the geofence is determined as the real-time feature data of the geofence.
[0101] The first real-time feature data of the real-time position located in the area position of the first grid is determined as the real-time feature data of the geofence.
[0102] The method further comprises:
[0103] The second real-time feature data of the real-time position located in the area position of the second grid is determined.
[0104] The third real-time feature data of the real-time position located in the area position of the geofence is filtered from the second real-time feature data as the real-time feature data of the geofence.
[0105] In this embodiment, since the first grid is entirely covered by the geofence, the first real-time feature data of the real-time position located in the area of the first grid is certainly the real-time feature data in the geofence.
[0106] In this embodiment, since the second grid is partially covered by the geofence, the second real-time feature data of the real-time position located in the area of the first grid can or can not be the real-time feature data in the geofence. If the second real-time feature data is directly used as the real-time feature data of the geofence, the real-time feature data in the geofence will be inaccurate, and the real-time characteristics of the specific business calculated subsequently will also be inaccurate. In order to improve the accuracy, after the second real-time feature data is obtained, the third real-time feature data of the real-time position located in the area position of the geofence is filtered from the second real-time feature data as the real-time feature data of the geofence.
[0107] The embodiment can make a secondary accurate determination on the real-time feature data located in the second grid at the boundary of the geographic fence, and can realize accurate query of the real-time feature data of the arbitrary polygon geographic fence.
[0108] In an embodiment of the present disclosure, the step of screening the third real-time feature data with the real-time position located in the area position of the geographic fence from the second real-time feature data can include the following steps:
[0109] determining a ray with the real-time position corresponding to the second real-time feature data as a starting point;
[0110] if the number of intersection points of the ray and the boundary of the geographic fence is odd, determining that the second real-time feature data is the third real-time feature data with the real-time position located in the area position of the geographic fence;
[0111] if the number of intersection points of the ray and the boundary of the geographic fence is even, determining that the real-time position corresponding to the second real-time feature data is located outside the area position of the geographic fence.
[0112] In this embodiment, the ray method can be used to screen the third real-time feature data from the second real-time feature data.
[0113] Examples, Figure 3 Fig. 1 shows a schematic diagram of position determination in and out of a geographic fence according to an embodiment of the present disclosure, as Figure 3 As shown in Fig. 1, there are a plurality of second grids 302 at the boundary 301 of the geographic fence, and these second grids 302 are partially located in the geographic fence and partially located outside the geographic fence. Taking the first real-time position 303 and the second real-time position 304 corresponding to each second real-time feature data as an example, a first ray and a second ray are selected in an arbitrary direction with the first real-time position 303 and the second real-time position 304 as starting points. The number of intersection points of the first ray and the boundary of the geographic fence is 1, which is odd, so it is determined that the second real-time feature data corresponding to the first real-time position 303 is the third real-time feature data. The number of intersection points of the second ray and the boundary of the geographic fence is 2, which is even, so it is determined that the second real-time feature data corresponding to the second real-time position 304 is not the third real-time feature data.
[0114] As can be clearly seen from Figure 3 Fig. 1, the first real-time position 303 is located in the geographic fence, and the second real-time position 304 is located outside the geographic fence, so the ray method can accurately screen the third real-time feature data from the second real-time feature data, and realize accurate query of the real-time feature data of the arbitrary geographic fence.
[0115] In one possible implementation, in the above information acquisition method, each grid in the geofence includes a GeoHash grid, and the step of acquiring a first grid completely covered by the geofence and a second grid partially covered by the geofence based on the regional location of the geofence includes:
[0116] Based on the geographic location of the geofence, a preset minimum level grid that is completely covered by the geofence is determined as the first grid, and a preset minimum level grid that is partially covered by the geofence is determined as the first partially covered grid.
[0117] Traverse the next level grid in the first partially covered grid, determine the next level grid in the first partially covered grid that is completely covered by the geofence as the first grid, determine the next level grid in the first partially covered grid that is partially covered by the geofence as the next level partially covered grid, until the next level grid in the next level partially covered grid is the preset maximum level grid, then determine the maximum level grid in the next level partially covered grid that is completely covered by the geofence as the first grid, and determine the maximum level grid that is partially covered by the geofence area as the second grid;
[0118] In this case, the area of the grid at this level is larger than the area of the grid at the next lower level.
[0119] In this implementation, GeoHash is essentially a spatial indexing method. Its basic principle is to understand the Earth as a two-dimensional plane and recursively decompose the plane into smaller sub-blocks. Each sub-block has the same code within a certain latitude and longitude range. GeoHash converts the two-dimensional latitude and longitude into strings, each string representing a rectangular area. All coordinates within this rectangle share the same string. The longer the string, the higher the precision, and the smaller the corresponding rectangular area. Each rectangular area is a GeoHash grid.
[0120] For example, location information is typically represented using latitude and longitude. A target latitude and longitude of (39.923201, 116.390705) represents a location, not a specific point, but rather a general area. The extent of this area is directly related to the precision of the latitude and longitude values. This area represented by the latitude and longitude can be calculated using the GeoHash algorithm to obtain a comparable string. The specific calculation process is as follows:
[0121] S1. Divide the interval (initial latitude interval range [-90, 90], initial longitude interval range [-180, 180]) into left and right intervals, calculate whether the target longitude and latitude fall in the left interval or the right interval respectively. If it falls in the left interval, take 0, and if it falls in the right interval, take 1, to obtain the first binary code.
[0122] S2, then the target latitude and longitude interval is divided into two halves to update the left and right interval range, continue to calculate whether the target longitude and latitude fall into the left interval or the right interval, fall into the left interval, take 0, fall into the right interval, take 1, get the next bit binary code.
[0123] S3, when the encoding length reaches the length requirement of the service, such as 20 bits, the binary representation of the longitude 39.923201 is obtained as: 10111000110001111001, and the binary representation of the latitude 116.390705 is obtained as: 11010010110001000100.
[0124] S4, according to the rule of "even bits put longitude, odd bits put latitude", the obtained binary code is interleaved and combined to obtain a new binary string: 11100 11101 00100 01111 00000 01101 01011 00001.
[0125] S5, according to the base32 conversion table, the binary string is translated into a string every 5 bits, that is, the target GeoHash string 45EPANLB corresponding to the target longitude and latitude (39.923201, 116.390705) is obtained, the length of the string is 8 bits, indicating that the level of the GeoHash grid is 8 levels.
[0126] As can be seen from the above, if each character in the Geohash string is composed of 5 bits, the 5 bits can have 32 different combinations (0-31), so we can divide the entire map area into 32 areas, and the level of the GeoHash grid corresponding to the Geohash string increases by one level every time the Geohash string increases by one bit, and the size of each level grid is 32 times the size of the next level grid.
[0127] Examples, Figure 4 The scene diagram for obtaining the grid in the geographic fence according to an embodiment of the present disclosure is shown, as shown in Figure 2 and Figure 4 As shown, the preset minimum level grid can be the 5th level grid, after obtaining the area position of the geographic fence 201, the preset minimum level grid completely covered by the geographic fence 201 can be determined as the first grid, as shown in Figure 2 As shown, there is no first grid, and the preset minimum level grid partially covered by the geographic fence is determined as the first partially covered grid, that is Figure 2 the grid A, grid B, grid C, grid E, grid F, grid G, grid J, grid K and grid L in
[0128] Then, the next level grid in the first layer partial coverage grid, i.e., the 6th level grid, can be traversed, taking the grid F in the first layer partial coverage grid as an example, as shown in FIG. 8, the 32 6th level grids in the grid F can be traversed, the 6th level grid in the grid F that is entirely covered by the geographic fence is determined as the first grid 2021, the 6th level grid in the grid F that is partially covered by the geographic fence is determined as the next layer partial coverage grid 2022, and of course the 6th level grid in the grid F that is entirely outside the geographic fence is discarded. Figure 4
[0129] In this way, for the next layer partial coverage grid, it can be divided into 32 equal next level grids, and the next level grids are continuously traversed.
[0130] Meanwhile, the maximum level grid is set, if the next level grid of the next layer partial coverage grid is the preset maximum level grid, such as the 8th level grid, the 8th level grid in the next layer partial coverage grid that is entirely covered by the geographic fence is determined as the first grid, and the 8th level grid in the next layer partial coverage grid that is partially covered by the geographic fence is determined as the second grid, and no next level grid is taken.
[0131] In this way, the multiple first grids and second grids in the geographic fence can be obtained, as known from the above, each first grid has a different grid level, and the area of the first grid with different levels is different.
[0132] In a possible implementation, the determining, based on the area position of the geographic fence, of the preset minimum level grid that is entirely covered by the geographic fence as the first grid and the preset minimum level grid that is partially covered by the geographic fence as the first layer partial coverage grid, comprises:
[0133] determining the minimum circumscribed rectangle of the boundary of the geographic fence based on the area position of the geographic fence;
[0134] determining the preset minimum level grid that is entirely covered or partially covered by the minimum circumscribed rectangle as a third grid based on the longitude and latitude coordinates of the diagonal points of the minimum circumscribed rectangle;
[0135] traversing the third grid to determine the third grid that is entirely covered by the geographic fence as the first grid and the third grid that is partially covered by the geographic fence as the first layer partial coverage grid.
[0136] In this embodiment, after obtaining the area position of the geofence, the minimum circumscribed rectangle of the geofence can be obtained, which refers to the maximum range of the geofence of the polygon represented by two-dimensional coordinates (such as latitude and longitude coordinates), that is, the rectangle with the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate in the vertices of the given polygon geofence as the boundary. For example, as shown in Figure 2 or Figure 4 The rectangle 203 is the minimum circumscribed rectangle of the geofence 201.
[0137] In this embodiment, based on the latitude and longitude coordinates of the diagonal points of the minimum circumscribed rectangle, that is, the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate in the vertices of the polygon geofence, the preset minimum level grid, that is, the grid A-grid L, which is fully or partially covered by the minimum circumscribed rectangle, can be calculated from the lower left corner to the upper right corner.
[0138] In this embodiment, the third grid is traversed to determine that the third grid fully covered by the geofence is the first grid Figure 2 There is no first grid in the scenario shown in Figure 2 The grid A, grid B, grid C, grid E, grid F, grid G, grid J, grid K, and grid L in
[0139] In this embodiment, it can be calculated that how many of the four corners of the third grid are located inside the geofence. If all the four corners are located inside the geofence, it is determined that the third grid is fully covered by the geofence, which is the first grid. If only one, two, or three corners are located inside the geofence, it is determined that the third grid is partially covered by the geofence, which is the first layer partially covered grid. If none of the four corners is located inside the geofence, the third grid is discarded.
[0140] In a possible embodiment, the maximum level grid and the minimum level grid include preset intermediate level grids therebetween;
[0141] Among the level grids between the minimum level grid and the intermediate level grid, the area of the current level grid is M times the area of the next level grid, and among the level grids between the intermediate level grid and the maximum level grid, the area of the current level grid is N times the area of the next level grid, M is greater than N, and M and N are integers greater than or equal to 0.
[0142] In this implementation, when the next layer of the geofence boundary partially covers the grid, it is necessary to take the rectangle of the next-level grid for judgment. Taking the next level grid means dividing the current next-level partially covered grid into 32 equal next-level grids before judgment. However, for some grids where most of the area is inside the geofence, continuing to take the next level grid will generate a large number of grids, but the benefit is not significant. Figure 5 The diagram illustrates an existing scenario for acquiring grids within a geofence, demonstrating the aforementioned situation. Figure 5 As shown, after the next layer of grid F is divided into 32 next-level grids, a large number of grids are generated inside the geofence. Only two grids outside the geofence are excluded, resulting in relatively low fitting efficiency.
[0143] Therefore, this embodiment can use a combination of 5-bit and 1-bit lengths as the segment. After setting a preset length, such as 30-bit (which is a business experience value), each bit is used for encoding. Taking the above binary 11100 1110100100 01111 00000 01101 0 1 0 1 1 0 0 0 0 1 as an example, the first 30 bits are encoded using 5 bits, and the last 10 bits are encoded using 1 bit, resulting in the string 45EPANABABBAAAAB. If the preset length is 30 bits, then the intermediate level grid is the 6th level grid. The first 6 characters of the string are still encoded with 5 bits. Therefore, between the first 6 levels, the area of the current level grid region is M = 32 times the area of the next level grid region. After the 6th character, the string is encoded with 1 bit. Therefore, between the 6th level and subsequent levels, the area of the current level grid region is N = 2 times the area of the next level grid region. (Example) Figure 6 This diagram illustrates a scenario for acquiring a grid within a geofence according to an embodiment of the present disclosure, such as... Figure 6 As shown, after mixing 5 bits and 1 bit encoding, encoding with 1 bit once means that if the current cell is on the edge of the geofence, when removing the next level, it is only necessary to divide it into two cells for judgment, instead of needing to do so as before. Figure 5 The grid is divided into 32 sections for judgment.
[0144] Example, Figure 7 This diagram illustrates a comparison scenario of grids in a geofence obtained in two ways according to an embodiment of the present disclosure, as shown below. Figure 7 As shown in Figures A and B, Figure 7 Figure A shows Figure 5 The GeoHash fitting polygon algorithm shown is used to obtain the grid in this geofence 701. Figure 7 Figure B showsFigure 6 The GeoHash hybrid encoding fitting polygon algorithm shown above, when used to obtain the grid in geofence 701, under the same geofence and the same fitting accuracy (binary length after latitude and longitude merging), Figure 7 In Figure A, the geofence 701 contains 4047 rectangles. Figure 7 In Figure B, the geofence 701 contains 1818 polygons. It can be seen that the number of grids in the geofence determined by the GeoHash hybrid coding fitting polygon algorithm is only half that of the original GeoHash algorithm. This reduction in the number of grids can improve the efficiency of subsequent queries of real-time feature data.
[0145] This implementation method, based on an optimized GeoHash hybrid encoding fitting algorithm, can effectively improve the efficiency of querying real-time feature data while ensuring fitting accuracy.
[0146] In one possible implementation, the real-time location includes real-time latitude and longitude information, and the first real-time feature data determining that the real-time location is within the area of the first grid, as the real-time feature data of the geofence, includes:
[0147] If the longitudes in the real-time latitude and longitude information are all located between the longitudes of the diagonal points of the first grid and the latitudes are all located between the latitudes of the diagonal points of the first grid, then the real-time latitude and longitude information is determined to be located within the area of the first grid, and the first real-time feature data corresponding to the real-time latitude and longitude information is determined to be the real-time feature data of the geofence.
[0148] In this embodiment, the real-time location corresponding to the real-time feature data includes real-time latitude and longitude information, which can be used as an index for querying.
[0149] In this implementation, each GeoHash grid is a rectangle. Figure 8 This diagram illustrates a location query scenario inside and outside a grid according to an embodiment of the present disclosure, such as... Figure 8 As shown, the GeoHash grid 801 can be represented by the two latitude and longitude coordinates of the diagonal points of the rectangle, namely the first corner point 8011 (LatMin, LngMax) and the second corner point 8012 (LatMax, LngMin). When querying whether the real-time location 802 (lat, lng) of a certain real-time feature data is within the area of this GeoHash grid, the specific SQL (Structured Query Language) query template can be:
[0150] select*
[0151] from db.table
[0152] where lng>LngMin and lng<LngMax and lat>LatMin and lat<LatMax.
[0153] If the longitudes in the real-time longitude and latitude information are all located between LngMin and LngMax of a first grid and the latitudes are located between LatMin and LatMax of the first grid, it is determined that the real-time longitude and latitude information is located in the area position of the first grid, and it is determined that the first real-time feature data corresponding to the real-time longitude and latitude information is the real-time feature data of the geographic fence.
[0154] The embodiment can quickly query the real-time feature data of the real-time position located in the geographic fence through the longitude and latitude information.
[0155] The following is an apparatus embodiment of the present disclosure, which can be used to perform the method embodiment of the present disclosure.
[0156] Figure 9 A structural block diagram of an information acquisition apparatus according to an embodiment of the present disclosure is shown, which can be realized by software, hardware or a combination of both as part of or all of an electronic device. As shown in the figure, the information acquisition apparatus includes: Figure 9
[0157] The first acquisition module 901 is configured to acquire and store each real-time feature data and the real-time position corresponding thereto;
[0158] The second acquisition module 902 is configured to acquire the area position of each grid in the geographic fence.
[0159] The first determination module 903 is configured to determine the real-time feature data of which the real-time position is located in the area position of the grid in the geographic fence as the real-time feature data of the geographic fence.
[0160] In a possible implementation, the second acquisition module 902 is configured to:
[0161] acquire the area position of the geographic fence;
[0162] acquire the area position of the first grid and the second grid in the geographic fence based on the area position of the geographic fence, the first grid including a grid completely covered by the geographic fence, the second grid including a grid partially covered by the geographic fence, and the first grid and the second grid being preset position-fixed grids.
[0163] In a possible implementation, the first determination module 903 is configured to:
[0164] determining first real-time feature data that the real-time position is located within the area position of the first grid as the real-time feature data of the geofence;
[0165] The apparatus further includes:
[0166] a second determining module configured to determine second real-time feature data that the real-time position is located within the area position of the second grid;
[0167] a screening module configured to screen, from the second real-time feature data, third real-time feature data that the real-time position is located within the area position of the geofence as the real-time feature data of the geofence.
[0168] In a possible implementation, the screening module is configured to:
[0169] determine a ray with the real-time position corresponding to the second real-time feature data as a starting point;
[0170] if the number of intersection points of the ray and the boundary of the geofence is odd, determine that the second real-time feature data is the third real-time feature data that the real-time position is located within the area position of the geofence;
[0171] if the number of intersection points of the ray and the boundary of the geofence is even, determine that the real-time position corresponding to the second real-time feature data is located outside the area position of the geofence.
[0172] In a possible implementation, each grid in the geofence includes a GeoHash grid, and the second obtaining module 902 is configured to, based on the area position of the geofence, obtain a first grid completely covered by the geofence and a second grid partially covered by the geofence.
[0173] based on the area position of the geofence, determine a preset minimum level grid completely covered by the geofence as the first grid, and determine a preset minimum level grid partially covered by the geofence as a first layer partially covered grid;
[0174] traverse a next level grid in the first layer partially covered grid, determine a next level grid in the first layer partially covered grid completely covered by the geofence as the first grid, and determine a next level grid in the first layer partially covered grid partially covered by the geofence as a next layer partially covered grid, until a next level grid of the next layer partially covered grid is a preset maximum level grid, then determine a maximum level grid in the next layer partially covered grid completely covered by the geofence as the first grid, and determine a maximum level grid partially covered by the area of the geofence as the second grid.
[0175] wherein, the area of the region of the current level grid is greater than the area of the region of the next level grid.
[0176] In a possible implementation, the second obtaining module 902 is configured to determine, based on the region position of the geographic fence, a preset minimum level grid that is entirely covered by the geographic fence as a first grid, and determine a preset minimum level grid that is partially covered by the geographic fence as a first layer partially covered grid.
[0177] determine a minimum circumscribed rectangle of the geographic fence based on the region position of the geographic fence;
[0178] determine, based on the longitude and latitude coordinates of the diagonal points of the minimum circumscribed rectangle, a preset minimum level grid that is entirely or partially covered by the minimum circumscribed rectangle as a third grid;
[0179] traverse the third grid, and determine a third grid that is entirely covered by the geographic fence as a first grid, and determine a third grid that is partially covered by the geographic fence as a first layer partially covered grid.
[0180] In a possible implementation, the maximum level grid and the minimum level grid include preset intermediate level grids therebetween;
[0181] wherein, in each level grid between the minimum level grid and the intermediate level grid, the area of the region of the current level grid is M times the area of the region of the next level grid, and in each level grid between the intermediate level grid and the maximum level grid, the area of the region of the current level grid is N times the area of the region of the next level grid, the M is greater than the N, and the M and the N are integers greater than or equal to 0.
[0182] In a possible implementation, the real-time position includes real-time longitude and latitude information, and the first determining module 903 is configured to determine, as part of the real-time feature data of the geographic fence, first real-time feature data of the real-time position located in the region position of the first grid.
[0183] if the longitude in the real-time longitude and latitude information is between the longitude of the diagonal points of the first grid and the latitude is between the latitude of the diagonal points of the first grid, it is determined that the real-time longitude and latitude information is located in the region position of the first grid, and it is determined that the first real-time feature data corresponding to the real-time longitude and latitude information is the real-time feature data of the geographic fence.
[0184] The information acquisition apparatus in this embodiment corresponds to the information acquisition method described above, and specific details can be referred to the description of the information acquisition method above, which will not be repeated here.
[0185] This disclosure also discloses an electronic device. Figure 10 This diagram illustrates a structural block diagram of an electronic device according to an embodiment of the present disclosure, such as... Figure 10 As shown, the electronic device 1000 includes a memory 1001 and a processor 1002; wherein,
[0186] The memory 1001 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 1002 to implement the above method steps.
[0187] Figure 11 This is a schematic diagram of the structure of a computer system suitable for implementing an information acquisition method according to an embodiment of the present disclosure.
[0188] like Figure 11 As shown, the computer system 1100 includes a processing unit 1101, which can execute various processes described above based on a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage section 1108 into a random access memory (RAM) 1103. The RAM 1103 also stores various programs and data required for the operation of the system 1100. The processing unit 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0189] The following components are connected to I / O interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to I / O interface 1105 as needed. A removable medium 1111, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 1110 as needed so that computer programs read from it can be installed into storage section 1108 as needed. The processing unit 1101 can be implemented as a CPU, GPU, TPU, FPGA, NPU, etc.
[0190] In particular, according to embodiments of the present disclosure, the method described above can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a non-transitory computer readable medium, the computer program containing program code for executing the information acquisition method. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 1109, and / or installed from the detachable medium 1111.
[0191] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts and block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks noted in succession can in fact be executed substantially concurrently or can sometimes be executed in reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0192] The units or modules described in the embodiments of the present disclosure can be implemented by software, or by hardware. The described units or modules can also be provided in a processor, and the names of the units or modules do not constitute a limitation on the units or modules themselves in some cases.
[0193] As another aspect, the embodiments of the present disclosure also provide a computer readable storage medium, which can be the computer readable storage medium included in the apparatus described in the above embodiments, or can exist separately from the apparatus and not be assembled into the apparatus. The computer readable storage medium stores one or more programs for execution by one or more processors to perform the methods described in the embodiments of the present disclosure.
[0194] The embodiments of the present disclosure disclose a TS1, an information acquisition method, characterized in that the method comprises:
[0195] Acquire and store each real-time feature data and its corresponding real-time location;
[0196] Acquire the area position of each grid in the geofence;
[0197] determine real-time feature data of the real-time position located in the area position of the grid in the geofence as real-time feature data of the geofence.
[0198] TS2, the method according to TS1, wherein,
[0199] the area position corresponding to each grid in the geofence comprises:
[0200] acquire the area position of the geofence;
[0201] based on the area position of the geofence, acquire the area position of the first grid and the second grid in the geofence, the first grid comprises a grid completely covered by the geofence, the second grid comprises a grid partially covered by the geofence, and the first grid and the second grid are preset position-fixed grids.
[0202] TS3, the method according to TS2, wherein the determination of the real-time feature data of the real-time position located in the area position of the grid in the geofence as the real-time feature data of the geofence comprises:
[0203] determine the first real-time feature data of the real-time position located in the area position of the first grid as the real-time feature data of the geofence;
[0204] the method further comprises:
[0205] determine the second real-time feature data of the real-time position located in the area position of the second grid;
[0206] screen the third real-time feature data of the real-time position located in the area position of the geofence from the second real-time feature data as the real-time feature data of the geofence.
[0207] TS4, the method according to TS3, wherein the screening of the third real-time feature data of the real-time position located in the area position of the geofence from the second real-time feature data comprises:
[0208] determine a ray with the real-time position corresponding to the second real-time feature data as the starting point;
[0209] if the number of intersection points of the ray and the boundary of the geofence is odd, determine that the second real-time feature data is the third real-time feature data of the real-time position located in the area position of the geofence;
[0210] if the number of intersection points of the ray and the boundary of the geofence is even, determine that the real-time position corresponding to the second real-time feature data is located outside the area position of the geofence.
[0211] TS5. The method of any of TS2-TS4, wherein each grid in the geo-fence comprises a GeoHash grid, and wherein the obtaining, based on the area position of the geo-fence, a first grid that is completely covered by the geo-fence and a second grid that is partially covered by the geo-fence comprises:
[0212] determining, based on the area position of the geo-fence, a preset minimum level grid that is completely covered by the geo-fence as the first grid and a preset minimum level grid that is partially covered by the geo-fence as the first layer partially covered grid;
[0213] traversing a next level grid in the first layer partially covered grid, determining a next level grid in the first layer partially covered grid that is completely covered by the geo-fence as the first grid and a next level grid in the first layer partially covered grid that is partially covered by the geo-fence as a next layer partially covered grid, until a next level grid of the next layer partially covered grid is a preset maximum level grid, then determining a maximum level grid in the next layer partially covered grid that is completely covered by the geo-fence as the first grid and a maximum level grid that is partially covered by the area where the geo-fence is located as the second grid;
[0214] wherein an area of a current level grid is greater than an area of a next level grid.
[0215] TS6. The method of TS5, wherein the determining, based on the area position of the geo-fence, a preset minimum level grid that is completely covered by the geo-fence as the first grid and a preset minimum level grid that is partially covered by the geo-fence as the first layer partially covered grid comprises:
[0216] determining a minimum bounding rectangle of the geo-fence based on the area position of the geo-fence;
[0217] determining, based on longitude and latitude coordinates of a diagonal point of the minimum bounding rectangle, a preset minimum level grid that is completely covered or partially covered by the minimum bounding rectangle as a third grid;
[0218] traversing the third grid, determining a third grid that is completely covered by the geo-fence as the first grid and a third grid that is partially covered by the geo-fence as the first layer partially covered grid.
[0219] TS7. The method of TS5, wherein the maximum level grid and the minimum level grid comprise a preset intermediate level grid therebetween.
[0220] In each of the hierarchical grids between the minimum hierarchical grid and the intermediate hierarchical grid, the area of the current hierarchical grid is M times the area of the next hierarchical grid, and in each of the hierarchical grids between the intermediate hierarchical grid and the maximum hierarchical grid, the area of the current hierarchical grid is N times the area of the next hierarchical grid, the M is greater than the N, and the M and the N are integers greater than or equal to 0.
[0221] TS8, the method of TS5, wherein the real-time location comprises real-time longitude and latitude information, and the first real-time feature data determined that the real-time location is located in the area location of the first grid is taken as the real-time feature data of the geofence, comprising:
[0222] If the longitude in the real-time longitude and latitude information is located between the longitudes of the opposite corners of the first grid and the latitude is located between the latitudes of the opposite corners of the first grid, it is determined that the real-time longitude and latitude information is located in the area location of the first grid, and the first real-time feature data corresponding to the real-time longitude and latitude information is determined as the real-time feature data of the geofence.
[0223] TS9, an information acquisition device, characterized in that the device comprises:
[0224] a first acquisition module configured to acquire and store each real-time feature data and the real-time location corresponding thereto;
[0225] a second acquisition module configured to acquire the area location of each grid in the geofence;
[0226] a determination module configured to determine the real-time feature data whose real-time location is located in the area location of the grid in the geofence as the real-time feature data of the geofence.
[0227] TS10, an electronic device comprising a memory and a processor; the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps of any one of TS1 to TS8.
[0228] TS11, a computer readable storage medium having computer instructions stored thereon, the computer instructions being executed by a processor to implement the method steps of any one of TS1 to TS8.
[0229] TS12, a computer program product comprising computer program / instructions, wherein the computer program / instructions are executed by a processor to implement the method steps of any one of TS1 to TS8.
[0230] The above description is merely the preferred embodiments of the present disclosure and the explanation of the technical principles. It should be understood by those skilled in the art that the inventive scope of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by the combinations of the above technical features or their equivalent features without departing from the inventive concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features with similar functions disclosed in the present disclosure (but not limited to) form the technical solutions.
Claims
1. An information acquisition method characterized by comprising: The method comprises: acquiring and storing real-time feature data and corresponding real-time positions, the real-time feature data being real-time flow data of various entities, and the real-time positions being positioning positions at the time when the real-time feature data is generated; acquiring area positions of each grid in a geofence, the grids comprising first grids and second grids, the first grids comprising grids completely covered by the geofence, and the second grids comprising grids partially covered by the geofence; determining real-time feature data whose real-time position is located within the area position of a grid in the geofence as real-time feature data of the geofence. The method further comprises: starting from a preset minimum level, recursively subdividing the partially covered grids of the geofence layer by layer, and marking the completely covered grids as first grids and the partially covered grids at the boundary as second grids.
2. The method of claim 1, wherein, The acquiring of the area positions of each grid in the geofence comprises: acquiring an area position of the geofence; based on the area position of the geofence, acquiring area positions of the first grids and the second grids in the geofence, the first grids and the second grids being preset position-fixed grids.
3. The method of claim 2, wherein, The determining of the real-time feature data whose real-time position is located within the area position of a grid in the geofence as real-time feature data of the geofence comprises: determining first real-time feature data whose real-time position is located within the area position of the first grid as real-time feature data of the geofence. The method further comprises: determining second real-time feature data whose real-time position is located within the area position of the second grid; screening third real-time feature data whose real-time position is located within the area position of the geofence from the second real-time feature data as real-time feature data of the geofence.
4. The method of claim 3, wherein, The screening of the third real-time feature data whose real-time position is located within the area position of the geofence from the second real-time feature data comprises: determining a ray with the real-time position corresponding to the second real-time feature data as a starting point; if the number of intersection points of the ray and the boundary of the geofence is odd, determining that the second real-time feature data is the third real-time feature data whose real-time position is located within the area position of the geofence; if the number of intersection points of the ray and the boundary of the geofence is even, determining that the real-time position corresponding to the second real-time feature data is located outside the area position of the geofence.
5. The method according to any one of claims 2-4, characterized in that, The grids in the geofence comprise GeoHash grids, and the acquiring of the first grids completely covered by the geofence and the second grids partially covered by the geofence based on the area position of the geofence comprises: based on the area position of the geofence, determining preset minimum level grids completely covered by the geofence as the first grids and determining preset minimum level grids partially covered by the geofence as first layer partially covered grids. determining a next level grid in the first layer partial coverage grid as a first grid if the next level grid in the first layer partial coverage grid is completely covered by the geographic fence, and determining a next layer partial coverage grid if the next level grid in the first layer partial coverage grid is partially covered by the geographic fence, until a next level grid in the next layer partial coverage grid is a preset maximum level grid, then determining the maximum level grid in the next layer partial coverage grid as the first grid if the maximum level grid in the next layer partial coverage grid is completely covered by the geographic fence, and determining a maximum level grid partially covered by the geographic fence as the second grid; wherein an area of the current level grid is greater than an area of a next level grid.
6. The method of claim 5, wherein, The determining of the preset minimum level grid completely covered by the geographic fence as the first grid and the preset minimum level grid partially covered by the geographic fence as the first layer partial coverage grid based on the area position of the geographic fence comprises: determining a minimum circumscribed rectangle of the geographic fence based on the area position of the geographic fence; determining a preset minimum level grid completely covered or partially covered by the minimum circumscribed rectangle as a third grid based on longitude and latitude coordinates of a diagonal point of the minimum circumscribed rectangle; traversing the third grid to determine the third grid completely covered by the geographic fence as the first grid, and to determine the third grid partially covered by the geographic fence as the first layer partial coverage grid.
7. The method of claim 5, wherein, The maximum level grid and the minimum level grid comprise preset intermediate level grids therebetween; wherein in each level grid between the minimum level grid and the intermediate level grid, an area of the current level grid is M times of an area of a next level grid, and in each level grid between the intermediate level grid and the maximum level grid, an area of the current level grid is N times of an area of a next level grid, the M is greater than the N, and the M and the N are integers greater than or equal to 0.
8. The method of claim 5, wherein, The real-time position comprises real-time longitude and latitude information, the first real-time feature data of the real-time position located in the area position of the first grid is determined as the real-time feature data of the geographic fence, comprising: if the longitude in the real-time longitude and latitude information is located between the longitude of the diagonal point of the first grid and the latitude is located between the latitude of the diagonal point of the first grid, then it is determined that the real-time longitude and latitude information is located in the area position of the first grid, and the first real-time feature data corresponding to the real-time longitude and latitude information is determined as the real-time feature data of the geographic fence.
9. An information acquisition apparatus characterized by comprising: comprising: a first acquisition module configured to acquire and store each real-time feature data and its corresponding real-time position, the real-time feature data being real-time flow data of various entities, and the real-time position being a positioning position when the real-time feature data is generated; a second acquisition module configured to acquire an area position of each grid in a geographic fence, the grid comprising a first grid and a second grid, the first grid comprising a grid completely covered by the geographic fence, and the second grid comprising a grid partially covered by the geographic fence; The determining module is configured to determine real-time feature data of the real-time position located within a region position of the grid in the geofence as real-time feature data of the geofence; The information acquisition device is further configured to recursively subdivide the partially covered grid of the geofence layer by layer starting from a preset minimum layer, and mark the completely covered grid as a first grid and finally mark the partially covered grid at the boundary as a second grid.
10. An electronic device comprising a memory and a processor; characterized in that, The memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps of any one of claims 1 to 8.
11. A computer readable storage medium characterized by, A computer program / instruction is stored thereon, and the computer program / instruction is executed by a processor to implement the method steps of any one of claims 1 to 8.
12. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instruction is executed by a processor to implement the method steps of any one of claims 1 to 8.
Citation Information
Patent Citations
A method and device for indexing geo-fences
CN110209748A
Dynamic geohash-based geofencing
US20150264523A1