[go: up one dir, main page]

CN116975169A - Information acquisition method, device, equipment, medium and product - Google Patents

Information acquisition method, device, equipment, medium and product Download PDF

Info

Publication number
CN116975169A
CN116975169A CN202210435841.XA CN202210435841A CN116975169A CN 116975169 A CN116975169 A CN 116975169A CN 202210435841 A CN202210435841 A CN 202210435841A CN 116975169 A CN116975169 A CN 116975169A
Authority
CN
China
Prior art keywords
grid
real
geofence
time
feature data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210435841.XA
Other languages
Chinese (zh)
Inventor
姜继钢
方丹芳
刘宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Didi Infinity Technology and Development Co Ltd
Original Assignee
Beijing Qisheng Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qisheng Technology Co Ltd filed Critical Beijing Qisheng Technology Co Ltd
Priority to CN202210435841.XA priority Critical patent/CN116975169A/en
Publication of CN116975169A publication Critical patent/CN116975169A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2465Query processing support for facilitating data mining operations in structured databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Remote Sensing (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开实施例公开了一种信息获取方法、装置、设备、介质及产品,该方法包括:获取并存储各实时特征数据及其对应的实时位置;获取地理围栏中各网格的区域位置;确定实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据。该技术方案可以大大降低存储成本且扩展性强,而且支持新增地理围栏的实时特征数据查询。

Embodiments of the present disclosure disclose an information acquisition method, device, equipment, medium and product. The method includes: acquiring and storing each real-time feature data and its corresponding real-time location; acquiring the regional location of each grid in the geofence; determining The real-time feature data whose real-time location is within the regional location of the grid in the geo-fence is used as the real-time feature data of the geo-fence. This technical solution can greatly reduce storage costs and is highly scalable, and supports real-time feature data query for new geofences.

Description

信息获取方法、装置、设备、介质及产品Information acquisition methods, devices, equipment, media and products

技术领域Technical field

本公开实施例涉及互联网技术领域,具体涉及一种信息获取方法、装置、设备、介质及产品。The embodiments of the present disclosure relate to the field of Internet technology, and specifically relate to an information acquisition method, device, equipment, medium and product.

背景技术Background technique

地理围栏指的是用一个虚拟的栅栏围出的一个虚拟的地理边界,其形状可以是任意多边形,可以通过一组顺时针的经纬度数组来表示其区域范围,该地理围栏的实时特征数据指的是地理围栏内的实体的实时特征数据,如该地理围栏的车辆的实时特征数据、订单的实时特征数据等等。任意地理围栏的实时特征数据计算,对于业务的精细化运营具有非常重要的指导意义,可以通过地理围栏的实时特征数据分析该地理围栏内特定业务的实时特性,按照预设的管理策略,基于该特定业务的实时特性及时对该地理围栏内的特定业务进行调整管理;比如说,在两轮电动车运维换电场景下,可以通过地理围栏的实时特征数据分析确定该地理围栏的实时换电价值,按照预设的换电策略,基于该换电价值对该地理围栏内的两轮电动车进行换电,该换电策略可以是换电价值越高越优先换电的策略,如此,可以优先为换电价值高的地理围栏内的两轮电动车进行换电,为运维提供换电作业引导,提高换电作业质量,降低因低电导致的订单损失占比。因此,结合预设的策略算法,基于地理围栏的实时特征数据可以实时地、智能地驱动业务进行地理位置维度的精细化运营,发挥数据驱动的价值。A geofence refers to a virtual geographical boundary enclosed by a virtual fence. Its shape can be any polygon, and its regional scope can be represented by a set of clockwise longitude and latitude arrays. The real-time characteristic data of the geofence refers to It is the real-time characteristic data of the entities within the geo-fence, such as the real-time characteristic data of the vehicle in the geo-fence, the real-time characteristic data of the order, etc. The calculation of real-time characteristic data of any geofence has very important guiding significance for the refined operation of the business. The real-time characteristics of the specific business within the geofence can be analyzed through the real-time characteristic data of the geofence. According to the preset management strategy, based on the The real-time characteristics of specific services can be adjusted and managed in a timely manner for specific services within the geofence; for example, in a two-wheeled electric vehicle operation and maintenance power replacement scenario, the real-time power replacement of the geofence can be determined through real-time feature data analysis of the geofence. Value, according to the preset power exchange strategy, the two-wheeled electric vehicles in the geo-fence are exchanged based on the power exchange value. The power exchange strategy can be a strategy that the higher the power exchange value, the priority is given to the power exchange. In this way, it can Priority is given to battery swapping for two-wheeled electric vehicles within geo-fences with high battery swapping value, providing guidance on battery swapping operations for operation and maintenance, improving the quality of battery swapping operations, and reducing the proportion of order losses caused by low power. Therefore, combined with the preset policy algorithm, real-time feature data based on geofences can intelligently drive the business to conduct refined operations in the geographical dimension in real time, giving full play to the value of data drive.

目前,地理围栏的实时特征数据的获取方案主要是:在接收到实时特征数据时,预先根据该实时特征数据里的经纬度确定其所属的地理围栏,将该实时特征数据与其所属的地理围栏进行绑定存储后,对外提供地理围栏的实时特征数据的查询服务。但是,这种方式需要预先存储各地理围栏及其对应的实时特征数据,这样存储的成本随着围栏数量的增加呈线性增加;如果新增一个地理围栏,该地理围栏的实时特征数据必须在该地理围栏新增之后重新产生实时特征数据才能获取,不支持新增理围栏的实时特征数据获取。At present, the main solution for obtaining real-time feature data of geofences is: when receiving real-time feature data, determine the geofence to which it belongs based on the longitude and latitude in the real-time feature data, and bind the real-time feature data to the geofence to which it belongs. After storage is determined, query services for real-time feature data of geofences are provided to the outside world. However, this method needs to store each geofence and its corresponding real-time feature data in advance, so the storage cost increases linearly with the increase in the number of fences; if a new geofence is added, the real-time feature data of the geofence must be in that geofence. Real-time feature data can only be obtained after the geofence is added. Real-time feature data acquisition for new geofences is not supported.

发明内容Contents of the invention

本公开实施例提供一种信息获取方法、装置、设备、介质及产品。Embodiments of the present disclosure provide an information acquisition method, device, equipment, media and products.

第一方面,本公开实施例中提供了一种信息获取方法。In a first aspect, an embodiment of the present disclosure provides an information acquisition method.

具体的,所述信息获取方法,包括:Specifically, the information acquisition method includes:

获取并存储各实时特征数据及其对应的实时位置;Obtain and store each real-time feature data and its corresponding real-time location;

获取地理围栏中各网格的区域位置;Get the regional location of each grid in the geofence;

确定实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据。Real-time feature data whose real-time location is within the regional location of the grid in the geo-fence is determined as the real-time feature data of the geo-fence.

在一种可能的实现方式中,所述获取地理围栏中各网格对应的区域位置,包括:In a possible implementation, obtaining the regional location corresponding to each grid in the geofence includes:

获取所述地理围栏的区域位置;Obtain the regional location of the geofence;

基于所述地理围栏的区域位置,获取所述地理围栏中第一网格和第二网格的区域位置,所述第一网格包括被所述地理围栏完全覆盖的网格,所述第二网格包括被所述地理围栏部分覆盖的网格,所述第一网格和所述第二网格为预设的位置固定的网格。Based on the regional position of the geofence, the regional positions of the first grid and the second grid in the geofence are obtained, the first grid includes a grid completely covered by the geofence, and the second grid is The grid includes a grid partially covered by the geofence, and the first grid and the second grid are preset fixed-position grids.

在一种可能的实现方式中,所述确定所述实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据包括:In a possible implementation, determining the real-time feature data that the real-time location is within the regional location of the grid in the geo-fence, as the real-time feature data of the geo-fence, includes:

确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据;Determine the first real-time characteristic data in which the real-time position is located within the regional position of the first grid as the real-time characteristic data of the geofence;

所述方法还包括:The method also includes:

确定所述实时位置位于所述第二网格的区域位置内的第二实时特征数据;Determining that the real-time position is located in the second real-time feature data within the regional position of the second grid;

从所述第二实时特征数据中筛选实时位置位于所述地理围栏的区域位置内的第三实时特征数据,作为所述地理围栏的实时特征数据。Third real-time feature data whose real-time location is within the regional location of the geofence is selected from the second real-time feature data as the real-time feature data of the geofence.

在一种可能的实现方式中,所述从所述第二实时特征数据中筛选实时位置位于所述地理围栏的区域位置内的第三实时特征数据,包括:In a possible implementation, filtering the third real-time feature data whose real-time location is within the regional location of the geofence from the second real-time feature data includes:

以所述第二实时特征数据对应的实时位置处为起点确定一条射线;Determine a ray using the real-time position corresponding to the second real-time feature data as a starting point;

若所述射线与所述地理围栏的边界的交点个数为奇数,则确定所述第二实时特征数据为实时位置位于所述地理围栏的区域位置内的第三实时特征数据;If the number of intersections between the ray and the boundary of the geofence is an odd number, it is determined that the second real-time feature data is the third real-time feature data whose real-time position is within the regional position of the geofence;

若所述射线与所述地理围栏的边界的交点个数为偶数,则确定所述第二实时特征数据对应的实时位置位于所述地理围栏的区域位置之外。If the number of intersections between the ray and the boundary of the geofence is an even number, it is determined that the real-time position corresponding to the second real-time feature data is located outside the regional position of the geofence.

在一种可能的实现方式中,所述地理围栏中各网格包括GeoHash网格,所述基于所述地理围栏的区域位置,获取被所述地理围栏完全覆盖的第一网格以及被所述地理围栏部分覆盖的第二网格,包括:In a possible implementation, each grid in the geofence includes a GeoHash grid, and based on the regional location of the geofence, the first grid completely covered by the geofence and the first grid that is completely covered by the geofence are obtained. A second grid covered by the geofence section, including:

基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格;Based on the regional location of the geofence, the preset minimum level grid completely covered by the geofence is determined to be the first grid, and the preset minimum level grid partially covered by the geofence is determined to be the first layer part. Cover grid;

遍历所述第一层部分覆盖网格中的下一层级网格,确定所述第一层部分覆盖网格中被所述地理围栏全部覆盖的下一层级网格为第一网格,确定所述第一层部分覆盖网格中被所述地理围栏部分覆盖的下一层级网格为下一层部分覆盖网格,直至所述下一层部分覆盖网格的下一层级网格为预设的最大层级网格,则确定所述下一层部分覆盖网格中被所述地理围栏全部覆盖的最大层级网格为第一网格,确定被所述地理围栏所在区域部分覆盖的最大层级网格为第二网格;Traverse the next level grid in the first layer partially covered grid, determine the next level grid in the first layer partially covered grid that is fully covered by the geofence as the first grid, determine the The next level grid in the first layer of partially covered grids that is partially covered by the geofence is the next layer of partially covered grids, until the next level grid of the next layer of partially covered grids is the default the maximum level grid, then determine the maximum level grid that is fully covered by the geofence in the next layer of partially covered grids as the first grid, determine the maximum level grid that is partially covered by the area where the geofence is located Grid is the second grid;

其中,本层级网格的区域面积大于下一层级网格区域的面积。Among them, the area of the grid at this level is larger than the area of the grid at the next level.

在一种可能的实现方式中,所述基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格,包括:In a possible implementation, based on the regional position of the geofence, it is determined that the preset minimum level grid that is fully covered by the geofence is the first grid, and the preset minimum level grid that is partially covered by the geofence is determined. The default minimum level grid is the first layer partial coverage grid, including:

基于所述地理围栏的区域位置确定所述地理围栏的最小外接矩形;Determine the minimum circumscribed rectangle of the geofence based on the regional location of the geofence;

基于所述最小外接矩形的对角点的经纬度坐标,确定被所述最小外接矩形全部覆盖或部分覆盖的预设最小层级网格为第三网格;Based on the longitude and latitude coordinates of the diagonal points of the minimum circumscribed rectangle, determine the preset minimum level grid that is fully or partially covered by the minimum circumscribed rectangle as the third grid;

遍历所述第三网格,确定被所述地理围栏全部覆盖的第三网格为第一网格,确定被所述地理围栏部分覆盖的第三网格为第一层部分覆盖网格。The third grid is traversed, the third grid completely covered by the geofence is determined to be the first grid, and the third grid partially covered by the geofence is determined to be the first layer partially covered grid.

在一种可能的实现方式中,所述最大层级网格与最小层级网格之间包括预设的中间层级网格;In a possible implementation, a preset intermediate level grid is included between the maximum level grid and the minimum level grid;

其中,在所述最小层级网格与所述中间层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的M倍,在所述中间层级网格与最大层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的N倍,所述M大于N,所述M与N为大于等于0的整数。Wherein, in each level grid between the minimum level grid and the intermediate level grid, the area of the grid area at this level is M times the area of the grid area at the next level, and in the intermediate level grid In each level grid between the maximum level grid, the area of the grid area at this level is N times the area of the grid area at the next level, the M is greater than N, and the M and N are integers greater than or equal to 0.

在一种可能的实现方式中,所述实时位置包括实时经纬度信息,所述确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据,包括:In a possible implementation, the real-time location includes real-time latitude and longitude information, and the first real-time characteristic data that determines that the real-time location is located within the regional location of the first grid is used as the real-time location of the geofence. Characteristic data, including:

若所述实时经纬度信息中的经度均位于所述第一网格的对角点的经度之间且维度位于所述第一网格的对角点的纬度之间,则确定所述实时经纬度信息位于所述第一网格的区域位置内,确定所述实时经纬度信息对应的第一实时特征数据为所述地理围栏的实时特征数据。If the longitudes in the real-time latitude and longitude information are located between the longitudes of the diagonal points of the first grid and the dimensions are between the latitudes of the diagonal points of the first grid, then the real-time latitude and longitude information is determined Located within the regional location of the first grid, the first real-time feature data corresponding to the real-time longitude and latitude information is determined to be the real-time feature data of the geofence.

第二方面,本公开实施例中提供了一种信息获取装置。In a second aspect, an embodiment of the present disclosure provides an information acquisition device.

具体的,所述信息获取装置,包括:Specifically, the information acquisition device includes:

第一获取模块,被配置为获取并存储各实时特征数据及其对应的实时位置;The first acquisition module is configured to acquire and store each real-time feature data and its corresponding real-time location;

第二获取模块,被配置为获取地理围栏中各网格的区域位置;The second acquisition module is configured to acquire the regional location of each grid in the geofence;

第一确定模块,被配置为确定所述实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据。The first determination module is configured to determine the real-time characteristic data that the real-time location is located within the regional position of the grid in the geo-fence as the real-time characteristic data of the geo-fence.

在一种可能的实现方式中,所述第二获取模块被配置为:In a possible implementation, the second acquisition module is configured as:

获取所述地理围栏的区域位置;Obtain the regional location of the geofence;

基于所述地理围栏的区域位置,获取所述地理围栏中第一网格和第二网格的区域位置,所述第一网格包括被所述地理围栏完全覆盖的网格,所述第二网格包括被所述地理围栏部分覆盖的网格,所述第一网格和所述第二网格为预设的位置固定的网格。Based on the regional position of the geofence, the regional positions of the first grid and the second grid in the geofence are obtained, the first grid includes a grid completely covered by the geofence, and the second grid is The grid includes a grid partially covered by the geofence, and the first grid and the second grid are preset fixed-position grids.

在一种可能的实现方式中,所述第一确定模块被配置为:In a possible implementation, the first determination module is configured as:

确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据;Determine the first real-time characteristic data in which the real-time position is located within the regional position of the first grid as the real-time characteristic data of the geofence;

所述装置还包括:The device also includes:

第二确定模块,被配置为确定所述实时位置位于所述第二网格的区域位置内的第二实时特征数据;a second determination module configured to determine second real-time feature data where the real-time position is located within the regional position of the second grid;

筛选模块,被配置为从所述第二实时特征数据中筛选实时位置位于所述地理围栏的区域位置内的第三实时特征数据,作为所述地理围栏的实时特征数据。A filtering module configured to filter third real-time feature data whose real-time location is within the regional location of the geofence from the second real-time feature data as real-time feature data of the geofence.

在一种可能的实现方式中,所述筛选模块被配置为:In a possible implementation, the filtering module is configured as:

以所述第二实时特征数据对应的实时位置处为起点确定一条射线;Determine a ray using the real-time position corresponding to the second real-time feature data as a starting point;

若所述射线与所述地理围栏的边界的交点个数为奇数,则确定所述第二实时特征数据为实时位置位于所述地理围栏的区域位置内的第三实时特征数据;If the number of intersections between the ray and the boundary of the geofence is an odd number, it is determined that the second real-time feature data is the third real-time feature data whose real-time position is within the regional position of the geofence;

若所述射线与所述地理围栏的边界的交点个数为偶数,则确定所述第二实时特征数据对应的实时位置位于所述地理围栏的区域位置之外。If the number of intersections between the ray and the boundary of the geofence is an even number, it is determined that the real-time position corresponding to the second real-time feature data is located outside the regional position of the geofence.

在一种可能的实现方式中,所述地理围栏中各网格包括GeoHash网格,所述第二获取模块中基于所述地理围栏的区域位置,获取被所述地理围栏完全覆盖的第一网格以及被所述地理围栏部分覆盖的第二网格的部分被配置为:In a possible implementation, each grid in the geofence includes a GeoHash grid, and the second acquisition module obtains the first network completely covered by the geofence based on the regional location of the geofence. The grid and the portion of the second grid partially covered by the geofence is configured as:

基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格;Based on the regional location of the geofence, the preset minimum level grid completely covered by the geofence is determined to be the first grid, and the preset minimum level grid partially covered by the geofence is determined to be the first layer part. Cover grid;

遍历所述第一层部分覆盖网格中的下一层级网格,确定所述第一层部分覆盖网格中被所述地理围栏全部覆盖的下一层级网格为第一网格,确定所述第一层部分覆盖网格中被所述地理围栏部分覆盖的下一层级网格为下一层部分覆盖网格,直至所述下一层部分覆盖网格的下一层级网格为预设的最大层级网格,则确定所述下一层部分覆盖网格中被所述地理围栏全部覆盖的最大层级网格为第一网格,确定被所述地理围栏所在区域部分覆盖的最大层级网格为第二网格;Traverse the next level grid in the first layer partially covered grid, determine the next level grid in the first layer partially covered grid that is fully covered by the geofence as the first grid, determine the The next level grid in the first layer of partially covered grids that is partially covered by the geofence is the next layer of partially covered grids, until the next level grid of the next layer of partially covered grids is the default the maximum level grid, then determine the maximum level grid that is fully covered by the geofence in the next layer of partially covered grids as the first grid, determine the maximum level grid that is partially covered by the area where the geofence is located Grid is the second grid;

其中,本层级网格的区域面积大于下一层级网格区域的面积。Among them, the area of the grid at this level is larger than the area of the grid at the next level.

在一种可能的实现方式中,所述第二获取模块中基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格的部分被配置为:In a possible implementation, in the second acquisition module, based on the regional location of the geofence, it is determined that the preset minimum level grid completely covered by the geofence is the first grid, and it is determined that the grid is the first grid. The preset minimum level grid that is partially covered by the geofence is the first layer that partially covers the grid and is configured as:

基于所述地理围栏的区域位置确定所述地理围栏的最小外接矩形;Determine the minimum circumscribed rectangle of the geofence based on the regional location of the geofence;

基于所述最小外接矩形的对角点的经纬度坐标,确定被所述最小外接矩形全部覆盖或部分覆盖的预设最小层级网格为第三网格;Based on the longitude and latitude coordinates of the diagonal points of the minimum circumscribed rectangle, determine the preset minimum level grid that is fully or partially covered by the minimum circumscribed rectangle as the third grid;

遍历所述第三网格,确定被所述地理围栏全部覆盖的第三网格为第一网格,确定被所述地理围栏部分覆盖的第三网格为第一层部分覆盖网格。The third grid is traversed, the third grid completely covered by the geofence is determined to be the first grid, and the third grid partially covered by the geofence is determined to be the first layer partially covered grid.

在一种可能的实现方式中,所述最大层级网格与最小层级网格之间包括预设的中间层级网格;In a possible implementation, a preset intermediate level grid is included between the maximum level grid and the minimum level grid;

其中,在所述最小层级网格与所述中间层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的M倍,在所述中间层级网格与最大层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的N倍,所述M大于N,所述M与N为大于等于0的整数。Wherein, in each level grid between the minimum level grid and the intermediate level grid, the area of the grid area at this level is M times the area of the grid area at the next level, and in the intermediate level grid In each level grid between the maximum level grid, the area of the grid area at this level is N times the area of the grid area at the next level, the M is greater than N, and the M and N are integers greater than or equal to 0.

在一种可能的实现方式中,所述实时位置包括实时经纬度信息,所述第一确定模块中确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据的部分被配置为:In a possible implementation, the real-time location includes real-time latitude and longitude information, and the first real-time feature data that determines that the real-time location is located within the regional location of the first grid is used as the first real-time feature data. The section describing real-time feature data for geofences is configured as:

若所述实时经纬度信息中的经度均位于所述第一网格的对角点的经度之间且维度位于所述第一网格的对角点的纬度之间,则确定所述实时经纬度信息位于所述第一网格的区域位置内,确定所述实时经纬度信息对应的第一实时特征数据为所述地理围栏的实时特征数据。If the longitudes in the real-time latitude and longitude information are located between the longitudes of the diagonal points of the first grid and the dimensions are between the latitudes of the diagonal points of the first grid, then the real-time latitude and longitude information is determined Located within the regional location of the first grid, the first real-time feature data corresponding to the real-time longitude and latitude information is determined to be the real-time feature data of the geofence.

第三方面,本公开实施例提供了一种电子设备,包括存储器和处理器,所述存储器用于存储一条或多条支持信息获取装置执行上述信息获取方法的计算机指令,所述处理器被配置为用于执行所述存储器中存储的计算机指令。所述信息获取装置还可以包括通信接口,用于信息获取装置与其他设备或通信网络通信。In a third aspect, embodiments of the present disclosure provide an electronic device, including a memory and a processor. The memory is used to store one or more computer instructions that support an information acquisition device to perform the above information acquisition method. The processor is configured for executing computer instructions stored in the memory. The information acquisition device may also include a communication interface for the information acquisition device to communicate with other devices or communication networks.

第四方面,本公开实施例提供了一种计算机可读存储介质,用于存储信息获取装置所用的计算机指令,其包含用于执行上述信息获取方法为信息获取装置所涉及的计算机指令。In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium for storing computer instructions used by an information acquisition device, which includes computer instructions for executing the above information acquisition method for the information acquisition device.

第五方面,本公开实施例提供了一种计算机程序产品,包括计算机程序/指令,其中,该计算机程序/指令被处理器执行时实现上述信息获取方法中的步骤。In a fifth aspect, embodiments of the present disclosure provide a computer program product, including a computer program/instruction, wherein when the computer program/instruction is executed by a processor, the steps in the above information acquisition method are implemented.

本公开实施例提供的技术方案可包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

上述技术方案仅需要存储各实时特征数据及其对应的实时位置,在要查询地理围栏的实时特征数据时,仅需要基于该地理围栏中各网格的区域位置,就可以直接将查询到的实时位置位于所述地理围栏中网格的区域位置内的实时特征数据作为该地理围栏的实时特征数据;这样,不需要预先存储具体的地理围栏及其对应的实时特征数据,仅需要存储各实时特征数据及其对应的实时位置,大大降低存储成本且扩展性强,而且对于新增地理围栏,也可以采用上述方案实时查询获取。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 the geofence, it only needs to be based on the regional location of each grid in the geofence, and the queried real-time data can be directly retrieved. The real-time feature data located within the regional location of the grid in the geo-fence is used as the real-time feature data of the geo-fence; in this way, there is no need to store the specific geo-fence and its corresponding real-time feature data in advance, only each real-time feature needs to be stored The data and its corresponding real-time location greatly reduce storage costs and are highly scalable. For new geofences, the above solution can also be used to query and obtain them in real time.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开实施例。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the embodiments of the present disclosure.

附图说明Description of the drawings

结合附图,通过以下非限制性实施方式的详细描述,本公开实施例的其它特征、目的和优点将变得更加明显。在附图中:Other features, objects, and advantages of embodiments of the present disclosure will become more apparent from the following detailed description of the non-limiting embodiments in conjunction with the accompanying drawings. In the attached picture:

图1示出根据本公开一实施方式的信息获取方法的流程图;Figure 1 shows a flow chart of an information acquisition method according to an embodiment of the present disclosure;

图2示出根据本公开一实施方式的获取地理围栏中的网格的场景示意图;Figure 2 shows a schematic diagram of a scene for obtaining grids in a geofence according to an embodiment of the present disclosure;

图3示出根据本公开一实施方式的地理围栏内外的位置判定场景示意图;Figure 3 shows a schematic diagram of a location determination scenario inside and outside a geo-fence according to an embodiment of the present disclosure;

图4示出根据本公开一实施方式的获取地理围栏中的网格的场景示意图;Figure 4 shows a schematic diagram of a scene for obtaining grids in a geofence according to an embodiment of the present disclosure;

图5示出现有的获取地理围栏中的网格的场景示意图;Figure 5 shows a schematic diagram of the existing scenario for obtaining grids in geofences;

图6示出根据本公开一实施方式的获取地理围栏中的网格的场景示意图;Figure 6 shows a schematic diagram of a scene for obtaining grids in a geofence according to an embodiment of the present disclosure;

图7示出根据本公开一实施方式的用两种方式获取的地理围栏中的网格的比对场景示意图;Figure 7 shows a schematic diagram of a comparison scene of grids in a geofence obtained in two ways according to an embodiment of the present disclosure;

图8示出根据本公开一实施方式的网格内外的位置查询场景示意图;Figure 8 shows a schematic diagram of a location query scenario inside and outside the grid according to an embodiment of the present disclosure;

图9示出根据本公开一实施方式的信息获取装置的结构框图;Figure 9 shows a structural block diagram of an information acquisition device according to an embodiment of the present disclosure;

图10示出根据本公开一实施方式的电子设备的结构框图;Figure 10 shows a structural block diagram of an electronic device according to an embodiment of the present disclosure;

图11是适于用来实现根据本公开一实施方式的信息获取方法的计算机系统的结构示意图。FIG. 11 is a schematic structural diagram of a computer system suitable for implementing an information acquisition method according to an embodiment of the present disclosure.

具体实施方式Detailed ways

下文中,将参考附图详细描述本公开实施例的示例性实施方式,以使本领域技术人员可容易地实现它们。此外,为了清楚起见,在附图中省略了与描述示例性实施方式无关的部分。Hereinafter, exemplary implementations of embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. Furthermore, for the sake of clarity, parts irrelevant to describing the exemplary embodiments are omitted in the drawings.

在本公开实施例中,应理解,诸如“包括”或“具有”等的术语旨在指示本说明书中所公开的特征、数字、步骤、行为、部件、部分或其组合的存在,并且不欲排除一个或多个其他特征、数字、步骤、行为、部件、部分或其组合存在或被添加的可能性。In the embodiments of the present disclosure, it should be understood that terms such as "comprising" or "having" are intended to indicate the presence of features, numbers, steps, acts, components, portions, or combinations thereof disclosed in this specification, and are not intended to indicate Excludes the possibility that one or more other features, numbers, steps, acts, parts, portions or combinations thereof exist or are added.

另外还需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开实施例。In addition, it should be noted that the embodiments and features in the embodiments of the present disclosure can be combined with each other as long as there is no conflict. The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings and embodiments.

上文提及,目前,地理围栏的实时特征数据的获取方案主要是:在接收到实时特征数据时,预先根据该实时特征数据里的经纬度确定其所属的地理围栏,然后,将该实时特征数据存储至其所属的地理围栏,与其所属的地理围栏进行绑定,然后就可以对外提供地理围栏的实时特征数据的查询服务。但是,这种方式需要预先存储各地理围栏及其对应的实时特征数据,这样存储的成本随着围栏数量的增加呈线性增加;如果新增一个地理围栏,该地理围栏的实时特征数据必须在该地理围栏新增之后重新产生实时特征数据才能获取,不支持新增地理围栏的实时特征数据的及时获取;另外,由于需要存储地理围栏及其对应的实时特征数据,就需要强依赖地理围栏的管理和判定服务,而这两种服务涉及地理围栏的业务生命周期管理、围栏判定算法等,业务理解成本高且维护成本大。As mentioned above, at present, the main solution for obtaining real-time feature data of geofences is: when receiving real-time feature data, determine the geofence to which it belongs based on the longitude and latitude in the real-time feature data, and then, use the real-time feature data to Store it in the geofence to which it belongs, bind it to the geofence to which it belongs, and then provide query services for real-time characteristic data of the geofence to the outside world. However, this method needs to store each geofence and its corresponding real-time feature data in advance, so the storage cost increases linearly with the increase in the number of fences; if a new geofence is added, the real-time feature data of the geofence must be in that geofence. The real-time feature data can only be obtained after the geofence is added, and the real-time feature data of the newly added geofence is not supported. In addition, since the geofence and its corresponding real-time feature data need to be stored, it needs to rely heavily on the management of the geofence. and determination services. These two services involve business life cycle management of geofences, fence determination algorithms, etc., and the cost of business understanding and maintenance is high.

为了解决上述问题,本公开提供了一种信息获取方案,本方案仅需要存储各实时特征数据及其对应的实时位置,在要查询地理围栏的实时特征数据时,仅需要基于该地理围栏中各网格的区域位置,就可以直接将查询到的实时位置位于所述地理围栏中网格的区域位置内的实时特征数据作为该地理围栏的实时特征数据;这样,不需要预先存储具体的地理围栏及其对应的实时特征数据,仅需要存储各实时特征数据及其对应的实时位置,大大降低存储成本且扩展性强,而且对于新增地理围栏,也可以采用上述方案实时查询获取。In order to solve the above problems, the present disclosure provides an information acquisition solution. This 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 only needs to be based on each feature in the geofence. If the regional location of the grid is determined, the queried real-time feature data located within the regional location of the grid in the geofence can be directly used as the real-time feature data of the geofence; in this way, there is no need to store specific geofences in advance. and its corresponding real-time feature data. It only needs to store each real-time feature data and its corresponding real-time location, which greatly reduces storage costs and has strong scalability. Moreover, for new geofences, the above solution can also be used to query and obtain them in real time.

图1示出根据本公开一实施方式的信息获取方法的流程图,如图1所示,所述信息获取方法包括以下步骤S101-S103:Figure 1 shows a flow chart of an information acquisition method according to an embodiment of the present disclosure. As shown in Figure 1, the information acquisition method includes the following steps S101-S103:

在步骤S101中,获取并存储各实时特征数据及其对应的实时位置;In step S101, obtain and store each real-time feature data and its corresponding real-time location;

在步骤S102中,获取地理围栏中各网格的区域位置;In step S102, obtain the regional location of each grid in the geofence;

在步骤S103中,确定实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据。In step S103, real-time feature data whose real-time location is within the regional location of the grid in the geo-fence is determined as the real-time feature data of the geo-fence.

在本公开一实施方式中,所述信息获取方法可适用于可执行地理围栏的实时特征数据的获取的计算机、计算设备、电子设备、服务器、服务集群等。In an embodiment of the present disclosure, the information acquisition method may be applicable to computers, computing devices, electronic devices, servers, service clusters, etc. that can perform acquisition of real-time feature data of geofences.

在本公开一实施方式中,该实时特征数据指的是各种实体的实时流数据,如车辆的实时流数据、订单的实时流数据、工单的实时流数据等等,该实时位置指的是实时特征数据产生时的定位位置,该实时位置可以是经纬度位置。In an embodiment of the present disclosure, the real-time feature data refers to real-time streaming data of various entities, such as real-time streaming data of vehicles, real-time streaming data of orders, real-time streaming data of work orders, etc., and the real-time location refers to It is the positioning position when the real-time feature data is generated. The real-time position can be the longitude and latitude position.

在本公开一实施方式中,地理围栏指的是用一个虚拟的栅栏围出的一个虚拟的地理边界,其形状可以是任意多边形,示例的,图2示出根据本公开一实施方式的获取地理围栏中的网格的场景示意图,如图2所示,可以是该地理围栏201的形状。In one embodiment of the present disclosure, a geofence refers to a virtual geographical boundary surrounded by a virtual fence, and its shape can be any polygon. As an example, FIG. 2 shows a method of obtaining geographic information according to an embodiment of the present disclosure. The scene diagram of the grid in the fence, as shown in Figure 2, may be the shape of the geofence 201.

在本公开一实施方式中,将电子地图区域按照某种形状如三角形/四边形/六边形等切分成互不相交的网络状格子,这些格子就称为网格。该地理围栏覆盖有多个网格,这些网格的区域位置就属于地理围栏的区域位置,故本实施方式可以用地理围栏中各网格的区域位置来表示该地理围栏的区域范围。In one embodiment of the present disclosure, the electronic map area is divided into non-intersecting network grids according to a certain shape, such as triangles/quadrangles/hexagons, etc., and these grids are called grids. The geofence covers multiple grids, and the regional positions of these grids belong to the regional positions of the geofence. Therefore, in this embodiment, the regional position of each grid in the geofence can be used to represent the regional scope of the geofence.

本公开实施方式中,在需要查询某地理围栏(可以是已有地理围栏,也可以是新增地理围栏)的实时特征数据时,可以直接从存储的各实时特征数据对应的实时位置中,查询实时位置位于该地理围栏中网格的区域位置内的实时特征数据,将查询到的实时特征数据作为该地理围栏的实时特征数据;这样,不需要预先存储具体的地理围栏及其对应的实时特征数据,仅需要存储各实时特征数据及其对应的实时位置,大大降低存储成本且扩展性强,而且也支持新增地理围栏的实时特征数据的获取。另外,本方案不需要与地理围栏绑定存储,故也就不依赖围栏的管理和围栏的判定等服务组件来提供地理围栏,可以获取任意形状的地理围栏来查询其实时特征数据。In the embodiment of the present disclosure, when you need to query the real-time feature data of a certain geofence (it can be an existing geofence or a new geofence), you can directly query the real-time location corresponding to each stored real-time feature data. For real-time feature data whose real-time location is within the regional location of the grid in the geofence, the queried real-time feature data will be used as the real-time feature data of the geofence; in this way, there is no need to store specific geofences and their corresponding real-time features in advance. Data only needs to store each real-time feature data and its corresponding real-time location, which greatly reduces storage costs and has strong scalability. It also supports the acquisition of real-time feature data for new geofences. In addition, this solution does not need to be bound to geofence storage, so it does not rely on service components such as fence management and fence determination to provide geofences. Geofences of any shape can be obtained to query their real-time characteristic data.

在本公开一实施方式中,所述获取地理围栏中各网格对应的区域位置,包括:In an embodiment of the present disclosure, obtaining the regional location corresponding to each grid in the geofence includes:

获取所述地理围栏的区域位置;Obtain the regional location of the geofence;

基于所述地理围栏的区域位置,获取所述地理围栏中第一网格和第二网格的区域位置,所述第一网格包括被所述地理围栏完全覆盖的网格,所述第二网格包括被所述地理围栏部分覆盖的网格,所述第一网格和所述第二网格为预设的位置固定的网格。Based on the regional position of the geofence, the regional positions of the first grid and the second grid in the geofence are obtained, the first grid includes a grid completely covered by the geofence, and the second grid is The grid includes a grid partially covered by the geofence, and the first grid and the second grid are preset fixed-position grids.

在该实施方式中,该地理围栏的区域位置可以是该地理围栏的边界的经纬度信息,地图上的各网格是预先划分好的、位置固定的网格,可以基于该地理围栏的区域位置和各网格的区域位置,确定该地理围栏中的网格,进而得到该地理围栏中各网格的区域位置。In this embodiment, the regional location of the geofence can be the latitude and longitude information of the boundary of the geofence. Each grid on the map is a pre-divided grid with a fixed position. It can be based on the regional location of the geofence and The regional position of each grid is determined to determine the grid in the geofence, and then the regional position of each grid in the geofence is obtained.

在该实施方式中,该地理围栏可以是任意多边形,故在该地理围栏的边界处可能存在一些网格有一部分在地理围栏之内,另一部分在地理围栏之外,可以将这些部分被所述地理围栏覆盖的网格记为第二网格,而全部在地理围栏之内的网格可以记为第一网格。In this embodiment, the geofence can be an arbitrary polygon, so there may be some grids at the boundary of the geofence, with one part inside the geofence and the other part outside the geofence. These parts can be described as The grid covered by the geofence is recorded as the second grid, and the grids all within the geofence can be recorded as the first grid.

在本公开一实施方式中,所述确定所述实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据包括:In an embodiment of the present disclosure, determining the real-time feature data that the real-time location is within the regional location of the grid in the geo-fence, as the real-time feature data of the geo-fence, includes:

确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据;Determine the first real-time characteristic data in which the real-time position is located within the regional position of the first grid as the real-time characteristic data of the geofence;

所述方法还包括:The method also includes:

确定所述实时位置位于所述第二网格的区域位置内的第二实时特征数据;Determining that the real-time position is located in the second real-time feature data within the regional position of the second grid;

从所述第二实时特征数据中筛选实时位置位于所述地理围栏的区域位置内的第三实时特征数据,作为所述地理围栏的实时特征数据。Third real-time feature data whose real-time location is within the regional location of the geofence is selected from the second real-time feature data as the real-time feature data of the geofence.

在该实施方式中,由于第一网格完全被该地理围栏覆盖,故,该实时位置位于该第一网格区域内的第一实时特征数据就一定是该地理围栏内的实时特征数据。In this implementation, since the first grid is completely covered by the geofence, the first real-time feature data whose real-time location is located in the first grid area must be the real-time feature data within the geofence.

在该实施方式中,由于该第二网格是部分被地理围栏覆盖,故该实时位置位于该第一网格区域内的第二实时特征数据就可能是该地理围栏内的实时特征数据,也可能不是该地理围栏内的实时特征数据,如果直接将该第二实时特征数据作为该地理围栏的实时特征数据,则会导致该地理围栏内的实时特征数据不准确,后续计算的特定业务的实时特性也会出现误差,为了提高精度,在获取到第二实时特征数据后,可从所述第二实时特征数据中筛选出实时位置位于所述地理围栏的区域位置内的第三实时特征数据,将该第三实时特征数据作为所述地理围栏的实时特征数据。In this implementation, since the second grid is partially covered by a geofence, the second real-time feature data whose real-time location is within the first grid area may be the real-time feature data within the geofence, or It may not be the real-time feature data within the geo-fence. If the second real-time feature data is directly used as the real-time feature data of the geo-fence, it will cause the real-time feature data within the geo-fence to be inaccurate, and the subsequent calculation of the real-time feature data for the specific business will be inaccurate. Errors may also occur in characteristics. In order to improve accuracy, after obtaining the second real-time characteristic data, the third real-time characteristic data whose real-time location is within the regional location of the geofence can be filtered out from the second real-time characteristic data. The third real-time feature data is used as the real-time feature data of the geofence.

本实施方式可以对位于地理围栏边界的第二网格内的实时特征数据进行二次精确判定,可实现任意多边形地理围栏的实时特征数据的精确查询。This implementation can make a second accurate determination of the real-time feature data located in the second grid located at the boundary of the geofence, and can realize accurate query of the real-time feature data of any polygonal geofence.

在本公开一实施方式中,所述从所述第二实时特征数据中筛选实时位置位于所述地理围栏的区域位置内的第三实时特征数据,可以包括以下步骤:In an embodiment of the present disclosure, filtering the third real-time feature data whose real-time location is within the regional location of the geofence from the second real-time feature data may include the following steps:

以所述第二实时特征数据对应的实时位置处为起点确定一条射线;Determine a ray using the real-time position corresponding to the second real-time feature data as a starting point;

若所述射线与所述地理围栏的边界的交点个数为奇数,则确定所述第二实时特征数据为实时位置位于所述地理围栏的区域位置内的第三实时特征数据;If the number of intersections between the ray and the boundary of the geofence is an odd number, it is determined that the second real-time feature data is the third real-time feature data whose real-time position is within the regional position of the geofence;

若所述射线与所述地理围栏的边界的交点个数为偶数,则确定所述第二实时特征数据对应的实时位置位于所述地理围栏的区域位置之外。If the number of intersections between the ray and the boundary of the geofence is an even number, it is determined that the real-time position corresponding to the second real-time feature data is located outside the regional position of the geofence.

在该实施方式中,可以采用射线法从所述第二实时特征数据中筛选出第三实时特征数据。In this implementation manner, a ray method can be used to filter out the third real-time feature data from the second real-time feature data.

示例的,图3示出根据本公开一实施方式的地理围栏内外的位置判定场景示意图,如图3所示,地理围栏的边界301处存在多个第二网格302,这些第二网格302部分位于该地理围栏之内,部分位于该地理围栏之外,以各第二实时特征数据对应的第一实时位置303和第二实时位置304为例进行说明,分别以该第一实时位置303和第二实时位置304为起点选择任意一个方向制作第一射线和第二射线,该第一射线与所述地理围栏的边界的交点个数为1,属于奇数,则确定第一实时位置303对应的第二实时特征数据为第三实时特征数据;该第二射线与所述地理围栏的边界的交点个数为2,属于偶数,则确定第二实时位置304对应的第二实时特征数据不是第三实时特征数据。For example, Figure 3 shows a schematic diagram of a location determination scenario inside and outside a geofence according to an embodiment of the present disclosure. As shown in Figure 3, there are multiple second grids 302 at the boundary 301 of the geofence. These second grids 302 Part is located within the geo-fence, and part is located outside the geo-fence. The first real-time position 303 and the second real-time position 304 corresponding to each second real-time characteristic data are used as an example for illustration. Taking the first real-time position 303 and the second real-time position 304 respectively. For the second real-time position 304, select any direction as the starting point to create the first ray and the second ray. The number of intersections between the first ray and the boundary of the geofence is 1, which is an odd number. Then determine the first ray corresponding to the first real-time position 303. The second real-time feature data is the third real-time feature data; the number of intersections between the second ray and the boundary of the geofence is 2, which is an even number. Then 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. Real-time feature data.

从图3中可以明确看出该第一实时位置303位于该地理围栏内,第二实时位置304位于该地理围栏外,故采用射线法可以精准地从第二实时特征数据中筛选出第三实时特征数据,实现任意地理围栏的实时特征数据的精确查询。It can be clearly seen from Figure 3 that the first real-time position 303 is located within the geo-fence, and the second real-time position 304 is located outside the geo-fence. Therefore, the ray method can be used to accurately filter out the third real-time feature data from the second real-time feature data. Feature data enables accurate query of real-time feature data of any geofence.

在一种可能的实施方式中,上述信息获取方法中,所述地理围栏中各网格包括GeoHash网格,所述基于所述地理围栏的区域位置,获取被所述地理围栏完全覆盖的第一网格以及被所述地理围栏部分覆盖的第二网格,包括:In a possible implementation, in the above information acquisition method, each grid in the geofence includes a GeoHash grid, and based on the regional location of the geofence, the first grid completely covered by the geofence is obtained. A grid and a second grid partially covered by said geofence, including:

基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格;Based on the regional location of the geofence, the preset minimum level grid completely covered by the geofence is determined to be the first grid, and the preset minimum level grid partially covered by the geofence is determined to be the first layer part. Cover grid;

遍历所述第一层部分覆盖网格中的下一层级网格,确定所述第一层部分覆盖网格中被所述地理围栏全部覆盖的下一层级网格为第一网格,确定所述第一层部分覆盖网格中被所述地理围栏部分覆盖的下一层级网格为下一层部分覆盖网格,直至所述下一层部分覆盖网格的下一层级网格为预设的最大层级网格,则确定所述下一层部分覆盖网格中被所述地理围栏全部覆盖的最大层级网格为第一网格,确定被所述地理围栏所在区域部分覆盖的最大层级网格为第二网格;Traverse the next level grid in the first layer partially covered grid, determine the next level grid in the first layer partially covered grid that is fully covered by the geofence as the first grid, determine the The next level grid in the first layer of partially covered grids that is partially covered by the geofence is the next layer of partially covered grids, until the next level grid of the next layer of partially covered grids is the default the maximum level grid, then determine the maximum level grid that is fully covered by the geofence in the next layer of partially covered grids as the first grid, determine the maximum level grid that is partially covered by the area where the geofence is located Grid is the second grid;

其中,本层级网格的区域面积大于下一层级网格区域的面积。Among them, the area of the grid at this level is larger than the area of the grid at the next level.

在该实施方式中,GeoHash本质上是空间索引的一种方式,其基本原理是将地球理解为一个二维平面,将平面递归分解成更小的子块,每个子块在一定经纬度范围内拥有相同的编码。GeoHash将二维的经纬度转换成字符串,每一个字符串代表了一块矩形区域,在该矩形范围内的所有坐标都共用该字符串,字符串越长,代表着精度越高,对应的矩形范围越小。每块矩形区域为一个GeoHash网格。In this implementation, GeoHash is essentially a way of spatial indexing. 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 a certain range of longitude and latitude. Same encoding. GeoHash converts two-dimensional longitude and latitude into strings. Each string represents a rectangular area. All coordinates within the rectangular range share the string. The longer the string, the higher the accuracy. The corresponding rectangular range The smaller. Each rectangular area is a GeoHash grid.

示例的,定位位置通常会使用经纬度来进行表示,比如目标经纬度(39.923201,116.390705)表示一个位置,它表示的不是一个具体的点,而是泛指一片区域,区域的范围与经纬度的取值精度直接相关。该经纬度表示的区域可以通过GeoHash算法进行计算,得到一个可比较的字符串,具体计算过程如下:For example, the positioning position is usually represented by longitude and latitude. For example, the target longitude and latitude (39.923201, 116.390705) represents a location. It does not represent a specific point, but generally refers to an area. The range of the area is related to the value accuracy of the longitude and latitude. D. The area represented by the longitude and latitude can be calculated through the GeoHash algorithm to obtain a comparable string. The specific calculation process is as follows:

S1、将区间(纬度初始区间范围[-90,90]、经度初始区间范围[-180,180])对半划分为左右区间,计算目标经度和纬度分别落在左区间还是右区间,落在左区间则取0,右区间则取1,得到第一位二进制编码;S1. Divide the interval (latitude initial interval range [-90,90], longitude initial interval range [-180,180]) in half into left and right intervals, and calculate whether the target longitude and latitude fall in the left interval or the right interval, and whether they fall in the left interval Then it takes 0, and the right interval takes 1, and the first bit of binary code is obtained;

S2、接着将目标经纬度所在的区间对半划分更新左右区间范围,继续计算目标经度和纬度分别落在左区间还是右区间,落在左区间则取0,右区间则取1,得到下一位二进制编码。S2. Then divide the interval where the target longitude and latitude is located in half to update the left and right intervals, and continue to calculate whether the target longitude and latitude fall in the left interval or the right interval. If it falls in the left interval, it will be taken as 0, and if it falls in the right interval, it will be taken as 1, to get the next digit. Binary encoding.

S3、当编码长度达到业务的长度需求如20位后,得到经度39.923201的二进制表示为:10111000110001111001,纬度116.390705的二进制表示为:11010010110001000100。S3. When the encoding length reaches the length requirement of the business, such as 20 bits, the binary representation of longitude 39.923201 is: 10111000110001111001, and the binary representation of latitude 116.390705 is: 11010010110001000100.

S4、根据“偶数位放经度,奇数位放纬度”的规则,将得到的二进制编码穿插组合,得到一个新的二进制串:11100 11101 00100 01111 00000 01101 01011 00001。S4. According to the rule of "put longitude in even-numbered bits and latitude in odd-numbered bits", intersperse and combine the obtained binary codes to obtain a new binary string: 11100 11101 00100 01111 00000 01101 01011 00001.

S5、根据base32的对照表,将二进制串每5bit翻译成字符串,即得到目标经纬度(39.923201,116.390705)对应的目标GeoHash字符串45EPANLB,该字符串长度位8位,表明该GeoHash网格的层级为8层。S5. According to the comparison table of base32, translate every 5 bits of the binary string into a string to obtain the target GeoHash string 45EPANLB corresponding to the target longitude and latitude (39.923201, 116.390705). The length of the string is 8 bits, indicating the level of the GeoHash grid. It is 8 floors.

由上述可知,如果Geohash字符串中的每一个字符都是由5bits组成,这5bits可以有32中不同的组合(0~31),这样我们可以将整个地图区域分为32个区域,Geohash字符串每增长一位,Geohash字符串对应的GeoHash网格的层级增加一个层级,每层级网格的矩形大小为增加的下一层级网格的矩形大小的32倍。It can be seen from the above that if each character in the Geohash string is composed of 5 bits, these 5 bits can have 32 different combinations (0 ~ 31), so that we can divide the entire map area into 32 areas, Geohash string For each bit increase, the level of the GeoHash grid corresponding to the Geohash string increases by one level. The rectangular size of each level of grid is 32 times the rectangular size of the next level of grid.

示例的,图4示出根据本公开一实施方式的获取地理围栏中的网格的场景示意图,如图2和图4所示,预设的最小层级网格可以是第5层级网格,在获取到该地理围栏201的区域位置后,可以先确定被所述地理围栏201全部覆盖的预设最小层级网格为第一网格,如图2所示,不存在第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格即图2中的网格A、网格B、网格C、网格E、网格F、网格G、网格J、网格K和网格L。For example, Figure 4 shows a schematic diagram of a scene for obtaining grids in a geofence according to an embodiment of the present disclosure. As shown in Figures 2 and 4, the preset minimum level grid may be the 5th level grid. After obtaining the regional location of the geofence 201, it is possible to first determine that the preset minimum level grid covered by the geofence 201 is the first grid. As shown in Figure 2, there is no first grid, and it is determined that the grid is the first grid. The preset minimum level grids partially covered by the geofence are the first layer partially covered grids, namely Grid A, Grid B, Grid C, Grid E, Grid F, Grid G, in Figure 2. Grid J, Grid K and Grid L.

然后,可以遍历所述第一层部分覆盖网格中的下一层级网格即第6层级网格,以第一层部分覆盖网格中的网格F为例,如图4所示,可以遍历该网格F中的32个第6层级网格,将网格F中被所述地理围栏全部覆盖的第6层级网格确定为第一网格2021,将网格F中被所述地理围栏部分覆盖的第6层级网格确定为下一层部分覆盖网格2022,当然网格F中全部位于该地理围栏之外的第6层级网格抛弃。Then, the next level grid in the first layer partially covered grid, that is, the 6th level grid, can be traversed. Taking grid F in the first layer partially covered grid as an example, as shown in Figure 4, you can Traverse the 32 sixth-level grids in the grid F, determine the sixth-level grids in the grid F that are all covered by the geographical fence as the first grid 2021, and set the grid in the grid F that is covered by the geographical fence. The sixth-level grid partially covered by the fence is determined as the next partially covered grid 2022. Of course, all sixth-level grids in grid F located outside the geofence are discarded.

这样,对于下一层部分覆盖网格,可以将其划分为32等份的下一层级网格,继续向下一层级网格遍历。In this way, for the partial coverage grid of the next layer, it can be divided into 32 equal parts of the next-level grid, and the traversal to the next-level grid continues.

同时,设置最大层级网格,若所述下一层部分覆盖网格的下一层级网格为预设的最大层级网格如第8层级网格,则确定所述下一层部分覆盖网格中被所述地理围栏全部覆盖的第8层级网格为第一网格,确定被所述地理围栏所在区域部分覆盖的第8层级网格为第二网格,不再取下一层级网格。At the same time, the maximum level grid is set. If the next level grid of the next layer partially covered grid is the preset maximum level grid such as the 8th level grid, then the next layer partially covered grid is determined. The 8th-level grid that is fully covered by the geofence is the first grid. It is determined that the 8th-level grid that is partially covered by the area where the geofence is located is the second grid. No need to remove the next-level grid. .

如此,即可得到该地理围栏内的多个第一网格和第二网格,由上述可知,各第一网格有不同的网格层级,不同层级的第一网格的区域面积不同。In this way, multiple first grids and second grids within the geofence can be obtained. From the above, it can be seen that each first grid has a different grid level, and the area areas of the first grids at different levels are different.

在一种可能的实施方式中,所述基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格,包括:In a possible implementation, based on the regional position of the geofence, the preset minimum level grid that is fully covered by the geofence is determined to be the first grid, and the preset minimum level grid that is partially covered by the geofence is determined. The default minimum level grid is the first layer partial coverage grid, including:

基于所述地理围栏的区域位置确定所述地理围栏的边界的最小外接矩形;determining a minimum enclosing rectangle of the boundary of the geofence based on the regional location of the geofence;

基于所述最小外接矩形的对角点的经纬度坐标,确定被所述最小外接矩形全部覆盖或部分覆盖的预设最小层级网格为第三网格;Based on the longitude and latitude coordinates of the diagonal points of the minimum circumscribed rectangle, determine the preset minimum level grid that is fully or partially covered by the minimum circumscribed rectangle as the third grid;

遍历所述第三网格,确定被所述地理围栏全部覆盖的第三网格为第一网格,确定被所述地理围栏部分覆盖的第三网格为第一层部分覆盖网格。The third grid is traversed, the third grid completely covered by the geofence is determined to be the first grid, and the third grid partially covered by the geofence is determined to be the first layer partially covered grid.

在该实施方式中,在获取该地理围栏的区域位置后,可以得到该地理围栏的最小外接矩形,该最小外接矩形指的是以二维坐标(如经纬度坐标)表示的多边形的地理围栏的最大范围,即以给定的多边形地理围栏的各顶点中的最大横坐标、最小横坐标、最大纵坐标、最小纵坐标定下边界的矩形。示例的,如图2或图4所示,该矩形203为该地理围栏201的最小外接矩形。In this embodiment, after obtaining the regional location of the geofence, the minimum circumscribed rectangle of the geofence can be obtained. The minimum circumscribed rectangle refers to the maximum size of the polygonal geofence represented by two-dimensional coordinates (such as latitude and longitude coordinates). The range is the rectangle whose lower boundary is determined by the maximum abscissa, minimum abscissa, maximum ordinate, and minimum ordinate of each vertex of the given polygonal geofence. For example, as shown in FIG. 2 or FIG. 4 , the rectangle 203 is the smallest circumscribed rectangle of the geofence 201 .

在该实施方式中,基于所述最小外接矩形的对角点的经纬度坐标即上述的多边形地理围栏的各顶点中的最大横坐标、最小横坐标、最大纵坐标、最小纵坐标,可以从左下角至右上角开始计算该最小外接矩形全部覆盖或部分覆盖的预设最小层级网格即网格A-网格L为第三网格。In this embodiment, based on the longitude and latitude coordinates of the diagonal points of the minimum circumscribed rectangle, that is, the maximum abscissa, minimum abscissa, maximum ordinate, and minimum ordinate of each vertex of the above-mentioned polygonal geofence, it can be calculated from the lower left corner Go to the upper right corner and start to calculate the preset minimum level grid that is fully covered or partially covered by the minimum circumscribed rectangle, that is, grid A-grid L is the third grid.

在该实施方式中,遍历所述第三网格,确定被所述地理围栏全部覆盖的第三网格为第一网格(图2所示的场景中无第一网格),确定被所述地理围栏部分覆盖的第三网格即图2中的网格A、网格B、网格C、网格E、网格F、网格G、网格J、网格K和网格L为第一层部分覆盖网格。In this implementation, the third grid is traversed, and the third grid completely covered by the geofence is determined to be the first grid (there is no first grid in the scene shown in Figure 2), and it is determined that the third grid is covered by the geofence. The third grid partially covered by the geofence is grid A, grid B, grid C, grid E, grid F, grid G, grid J, grid K and grid L in Figure 2 Partially cover the mesh for the first layer.

在该实施方式中,可以计算该第三网格的四个角中有几个角位于该地理围栏内部,若四个角均位于该地理围栏内,则确定该第三网格被所述地理围栏全部覆盖,为第一网格;若只有一个、两个或三个角位于该地理围栏内,则确定该第三网格被所述地理围栏部分覆盖,为第一层部分覆盖网格,若四个角均不位于该地理围栏内,则抛弃该第三网格。In this implementation, it is possible to calculate how many of the four corners of the third grid are located inside the geographical fence. If all four corners are located within the geographical fence, it is determined that the third grid is located within the geographical fence. If the fence is completely covered, it is the first grid; if only one, two or three corners are located within the geofence, it is determined that the third grid is partially covered by the geofence, which is the first layer of partially covered grid. If none of the four corners are within the geofence, the third grid is discarded.

在一种可能的实施方式中,所述最大层级网格与最小层级网格之间包括预设的中间层级网格;In a possible implementation, a preset intermediate level grid is included between the maximum level grid and the minimum level grid;

其中,其中,在所述最小层级网格与所述中间层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的M倍,在所述中间层级网格与最大层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的N倍,所述M大于N,所述M与N为大于等于0的整数。Wherein, in each level grid between the minimum level grid and the intermediate level grid, the area of the grid area at this level is M times the area of the grid area at the next level, and at the intermediate level In each level grid between the grid and the maximum level grid, the area of the grid area at this level is N times the area of the grid area at the next level. The M is greater than N, and the M and N are greater than or equal to 0. integer.

在该实施方式中,在地理围栏边界的下一层部分覆盖网格上,则需要取其下一层级网格的矩形进行判断。而取下一层级网格意味着需要将当前下一层部分覆盖网格等分成32个下一层级网格,再进行判断。然而对于一些大部分面积都在地理围栏内部的格子而言,继续取下一层级网格,会产生大量的格子,但收益并不明显。图5示出现有的获取地理围栏中的网格的场景示意图,展示了上述情况,如图5所示,网格F内的下一层部分覆盖网格2022继续等分为32个下一层级网格后,产生了大量在地理围栏内部的格子,仅排除了两个不在地理围栏内部的格子,拟合的效率比较低。In this embodiment, on the next-level partial coverage grid of the geofence boundary, the rectangle of the next-level grid needs to be used for judgment. Removing the next-level grid means that the current partial coverage grid of the next level needs to be equally divided into 32 next-level grids before making a judgment. However, for some grids where most of the area is inside the geofence, continuing to remove the next level of grid will generate a large number of grids, but the benefits are not obvious. Figure 5 shows a schematic diagram of the existing scenario of obtaining a grid in a geofence, illustrating the above situation. As shown in Figure 5, the next layer in grid F partially covers the grid 2022 and continues to be divided into 32 next levels. After gridding, a large number of grids inside the geofence were generated, and only two grids that were not inside the geofence were excluded, so the fitting efficiency was relatively low.

故,本实施例可以混合使用5个bit和1个bit的长度作为分割,在预设长度如30bit长度(此处为业务经验值)后,使用每1bit进行一次编码,仍以上述二进制11100 1110100100 01111 00000 01101 0 1 0 1 1 0 0 0 0 1为例进行说明,前30bit使用5个bit进行编码,后10bit使用1个bit进行编码,得到字符串45EPANABABBAAAAB。若该预设长度为30bit,则该中间层级网格为第6层级网格,该字符串的前6位,仍以5个bit进行编码,则前6层级之间,本层级网格区域面积为下一层级网格区域面积的M=32倍,该字符串第6位之后,以1个bit进行编码,则第6层级之后的各层级网格之间,本层级网格区域面积为下一层级网格区域面积的N=2倍,示例的,图6示出根据本公开一实施方式的获取地理围栏中的网格的场景示意图,如图6所示,5个bit和1个bit混合编码后,1bit编码一次意味着如果当前格子在地理围栏边缘,取下一层级时只需则对半分成两个格子进行判定,而不需要如图5所示划分成32个格子进行判定。Therefore, this embodiment can use a mixture of 5-bit and 1-bit lengths as segmentation. After a preset length such as 30-bit length (here is the business experience value), every 1 bit is used for encoding, and the above binary 11100 1110100100 is used. 01111 00000 01101 0 1 0 1 1 0 0 0 0 1 is used as an example to illustrate. The first 30 bits are encoded with 5 bits, and the last 10 bits are encoded with 1 bit. The string 45EPANABABBAAAAB is obtained. If the default length is 30 bits, then the middle level grid is the 6th level grid. The first 6 bits of the string are still encoded with 5 bits. Then between the first 6 levels, the area of this level grid is It is M = 32 times the area of the grid area at the next level. After the 6th bit of the string, it is encoded with 1 bit. Then between the grids at each level after the 6th level, the area of the grid area at this level is N=2 times the area of the first-level grid area. For example, Figure 6 shows a schematic diagram of a scene for obtaining a grid in a geofence according to an embodiment of the present disclosure. As shown in Figure 6, 5 bits and 1 bit After mixed encoding, 1-bit encoding once means that if the current grid is at the edge of the geofence, when taking down the next level, it only needs to be divided into two grids for determination, instead of being divided into 32 grids for determination as shown in Figure 5.

示例的,图7示出根据本公开一实施方式的用两种方式获取的地理围栏中的网格的比对场景示意图,如图7中A图和B图所示,图7中A图展示了图5所示的GeoHash拟合多边形算法得到的该地理围栏701中的网格,图7中B图展示了图6所示的GeoHash混合编码拟合多边形算法得到的该地理围栏701中的网格,在同一地理围栏和同一拟合精度(经纬度合并后的二进制长度)下,图7中的A图中该地理围栏701中包含了4047个长方形,图7中B图中该地理围栏701中包含了1818个多边形,可以看出GeoHash混合编码拟合多边形算法确定出的地理围栏中的网格数量仅为原GeoHash算法的一半格子数的减少,可以提升后续查询实时特征数据的效率。By way of example, Figure 7 shows a schematic diagram of a comparison scene of grids in a geofence obtained in two ways according to an embodiment of the present disclosure, as shown in Figures A and B in Figure 7 , Figure A in Figure 7 shows The grid in the geofence 701 obtained by the GeoHash polygon fitting algorithm shown in Figure 5 is shown. Figure B in Figure 7 shows the grid in the geofence 701 obtained by the GeoHash hybrid coding polygon fitting algorithm shown in Figure 6. Grid, under the same geofence and the same fitting accuracy (binary length after merging longitude and latitude), the geofence 701 in Figure 7 A contains 4047 rectangles, and the geofence 701 in Figure B contains 4047 rectangles. Containing 1818 polygons, it can be seen that the number of grids in the geofence determined by the GeoHash hybrid coding polygon fitting algorithm is only half that of the original GeoHash algorithm, which can improve the efficiency of subsequent queries of real-time feature data.

本实施方式,基于优化的GeoHash混合编码的拟合算法,在保证拟合精度的情况下,可以有效提升查询实时特征数据的效率。In this implementation, the fitting algorithm based on optimized GeoHash hybrid coding can effectively improve the efficiency of querying real-time feature data while ensuring the fitting accuracy.

在一种可能的实施方式中,所述实时位置包括实时经纬度信息,所述确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据,包括:In a possible implementation, the real-time location includes real-time latitude and longitude information, and the first real-time characteristic data that determines that the real-time location is located within the regional location of the first grid is used as the real-time location of the geofence. Characteristic data, including:

若所述实时经纬度信息中的经度均位于所述第一网格的对角点的经度之间且维度位于所述第一网格的对角点的纬度之间,则确定所述实时经纬度信息位于所述第一网格的区域位置内,确定所述实时经纬度信息对应的第一实时特征数据为所述地理围栏的实时特征数据。If the longitudes in the real-time latitude and longitude information are located between the longitudes of the diagonal points of the first grid and the dimensions are between the latitudes of the diagonal points of the first grid, then the real-time latitude and longitude information is determined Located within the regional location of the first grid, the first real-time feature data corresponding to the real-time longitude and latitude information is determined to be the real-time feature data of the geofence.

在该实施方式中,该实时特征数据对应的实时位置包括实时经纬度信息,可以用该实时经纬度信息作为索引进行查询。In this embodiment, the real-time location corresponding to the real-time feature data includes real-time longitude and latitude information, and the real-time longitude and latitude information can be used as an index for query.

在该实施方式中,每个GeoHash网格都是一个矩形,图8示出根据本公开一实施方式的网格内外的位置查询场景示意图,如图8所示,该GeoHash网格801可以由该矩形的对角点的两个经纬度即第一角点8011(LatMin,LngMax),第二角点8012(LatMax,LngMin)所表示,在查询某实时特征数据的实时位置802(lat,lng)是否在该GeoHash网格的区域范围内时,具体的sql(Structured Query Language,结构化查询语言)查询模版可以为:In this embodiment, each GeoHash grid is a rectangle. Figure 8 shows a schematic diagram of a location query scenario inside and outside the grid according to an embodiment of the present disclosure. As shown in Figure 8, the GeoHash grid 801 can be composed of The two longitudes and latitudes of the diagonal points of the rectangle are represented by the first corner point 8011 (LatMin, LngMax) and the second corner point 8012 (LatMax, LngMin). When querying whether the real-time position 802 (lat, lng) of a certain real-time feature data Within the area of the GeoHash grid, the specific SQL (Structured Query Language) query template can be:

select*select*

from db.tablefrom db.table

where lng>LngMin and lng<LngMax and lat>LatMin and lat<LatMax。where lng>LngMin and lng<LngMax and lat>LatMin and lat<LatMax.

若所述实时经纬度信息中的经度均位于第一网格的LngMin与LngMax之间且维度位于第一网格的LatMin和LatMax之间,则确定所述实时经纬度信息位于所述第一网格的区域位置内,确定所述实时经纬度信息对应的第一实时特征数据为所述地理围栏的实时特征数据。If the longitudes in the real-time latitude and longitude information are located between LngMin and LngMax of the first grid and the dimensions are between LatMin and LatMax of the first grid, then it is determined that the real-time latitude and longitude information is located between LngMin and LngMax of the first grid. Within the regional location, it is determined that the first real-time feature data corresponding to the real-time latitude and longitude information is the real-time feature data of the geofence.

本实施方式可以通过经纬度信息快速查询得到实时位置位于该地理围栏的实时特征数据。This implementation can quickly query the latitude and longitude information to obtain real-time feature data whose real-time location is located in the geofence.

下述为本公开装置实施例,可以用于执行本公开方法实施例。The following are device embodiments of the present disclosure, which can be used to perform method embodiments of the present disclosure.

图9示出根据本公开一实施方式的信息获取装置的结构框图,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图9所示,所述信息获取装置包括:Figure 9 shows a structural block diagram of an information acquisition device according to an embodiment of the present disclosure. The device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. As shown in Figure 9, the information acquisition device includes:

第一获取模块901,被配置为获取并存储各实时特征数据及其对应的实时位置;The first acquisition module 901 is configured to acquire and store each real-time feature data and its corresponding real-time location;

第二获取模块902,被配置为获取地理围栏中各网格的区域位置;The second acquisition module 902 is configured to acquire the regional location of each grid in the geofence;

第一确定模块903,被配置为确定所述实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据。The first determination module 903 is configured to determine the real-time feature data that the real-time location is located within the regional location of the grid in the geo-fence as the real-time feature data of the geo-fence.

在一种可能的实现方式中,所述第二获取模块902被配置为:In a possible implementation, the second acquisition module 902 is configured as:

获取所述地理围栏的区域位置;Obtain the regional location of the geofence;

基于所述地理围栏的区域位置,获取所述地理围栏中第一网格和第二网格的区域位置,所述第一网格包括被所述地理围栏完全覆盖的网格,所述第二网格包括被所述地理围栏部分覆盖的网格,所述第一网格和所述第二网格为预设的位置固定的网格。Based on the regional position of the geofence, the regional positions of the first grid and the second grid in the geofence are obtained, the first grid includes a grid completely covered by the geofence, and the second grid is The grid includes a grid partially covered by the geofence, and the first grid and the second grid are preset fixed-position grids.

在一种可能的实现方式中,所述第一确定模块903被配置为:In a possible implementation, the first determination module 903 is configured as:

确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据;Determine the first real-time characteristic data in which the real-time position is located within the regional position of the first grid as the real-time characteristic data of the geofence;

所述装置还包括:The device also includes:

第二确定模块,被配置为确定所述实时位置位于所述第二网格的区域位置内的第二实时特征数据;a second determination module configured to determine second real-time feature data where the real-time position is located within the regional position of the second grid;

筛选模块,被配置为从所述第二实时特征数据中筛选实时位置位于所述地理围栏的区域位置内的第三实时特征数据,作为所述地理围栏的实时特征数据。A filtering module configured to filter third real-time feature data whose real-time location is within the regional location of the geofence from the second real-time feature data as real-time feature data of the geofence.

在一种可能的实现方式中,所述筛选模块被配置为:In a possible implementation, the filtering module is configured as:

以所述第二实时特征数据对应的实时位置处为起点确定一条射线;Determine a ray using the real-time position corresponding to the second real-time feature data as a starting point;

若所述射线与所述地理围栏的边界的交点个数为奇数,则确定所述第二实时特征数据为实时位置位于所述地理围栏的区域位置内的第三实时特征数据;If the number of intersections between the ray and the boundary of the geofence is an odd number, it is determined that the second real-time feature data is the third real-time feature data whose real-time position is within the regional position of the geofence;

若所述射线与所述地理围栏的边界的交点个数为偶数,则确定所述第二实时特征数据对应的实时位置位于所述地理围栏的区域位置之外。If the number of intersections between the ray and the boundary of the geofence is an even number, it is determined that the real-time position corresponding to the second real-time feature data is located outside the regional position of the geofence.

在一种可能的实现方式中,所述地理围栏中各网格包括GeoHash网格,所述第二获取模块902中基于所述地理围栏的区域位置,获取被所述地理围栏完全覆盖的第一网格以及被所述地理围栏部分覆盖的第二网格的部分被配置为:In a possible implementation, each grid in the geofence includes a GeoHash grid, and the second acquisition module 902 obtains the first grid completely covered by the geofence based on the regional location of the geofence. The grid and the portion of the second grid partially covered by the geofence are configured as:

基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格;Based on the regional location of the geofence, the preset minimum level grid completely covered by the geofence is determined to be the first grid, and the preset minimum level grid partially covered by the geofence is determined to be the first layer part. Cover grid;

遍历所述第一层部分覆盖网格中的下一层级网格,确定所述第一层部分覆盖网格中被所述地理围栏全部覆盖的下一层级网格为第一网格,确定所述第一层部分覆盖网格中被所述地理围栏部分覆盖的下一层级网格为下一层部分覆盖网格,直至所述下一层部分覆盖网格的下一层级网格为预设的最大层级网格,则确定所述下一层部分覆盖网格中被所述地理围栏全部覆盖的最大层级网格为第一网格,确定被所述地理围栏所在区域部分覆盖的最大层级网格为第二网格;Traverse the next level grid in the first layer partially covered grid, determine the next level grid in the first layer partially covered grid that is fully covered by the geofence as the first grid, determine the The next level grid in the first layer of partially covered grids that is partially covered by the geofence is the next layer of partially covered grids, until the next level grid of the next layer of partially covered grids is the default the maximum level grid, then determine the maximum level grid that is fully covered by the geofence in the next layer of partially covered grids as the first grid, determine the maximum level grid that is partially covered by the area where the geofence is located Grid is the second grid;

其中,本层级网格的区域面积大于下一层级网格区域的面积。Among them, the area of the grid at this level is larger than the area of the grid at the next level.

在一种可能的实现方式中,所述第二获取模块902中基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格的部分被配置为:In a possible implementation, the second acquisition module 902 determines, based on the regional location of the geofence, that the preset minimum level grid that is fully covered by the geofence is the first grid, and determines that the grid is the first grid. The preset minimum level grid partially covered by the geofence is configured as: The first layer partially covered grid is configured as:

基于所述地理围栏的区域位置确定所述地理围栏的最小外接矩形;Determine the minimum circumscribed rectangle of the geofence based on the regional location of the geofence;

基于所述最小外接矩形的对角点的经纬度坐标,确定被所述最小外接矩形全部覆盖或部分覆盖的预设最小层级网格为第三网格;Based on the longitude and latitude coordinates of the diagonal points of the minimum circumscribed rectangle, determine the preset minimum level grid that is fully or partially covered by the minimum circumscribed rectangle as the third grid;

遍历所述第三网格,确定被所述地理围栏全部覆盖的第三网格为第一网格,确定被所述地理围栏部分覆盖的第三网格为第一层部分覆盖网格。The third grid is traversed, the third grid completely covered by the geofence is determined to be the first grid, and the third grid partially covered by the geofence is determined to be the first layer partially covered grid.

在一种可能的实现方式中,所述最大层级网格与最小层级网格之间包括预设的中间层级网格;In a possible implementation, a preset intermediate level grid is included between the maximum level grid and the minimum level grid;

其中,在所述最小层级网格与所述中间层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的M倍,在所述中间层级网格与最大层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的N倍,所述M大于N,所述M与N为大于等于0的整数。Wherein, in each level grid between the minimum level grid and the intermediate level grid, the area of the grid area at this level is M times the area of the grid area at the next level, and in the intermediate level grid In each level grid between the maximum level grid, the area of the grid area at this level is N times the area of the grid area at the next level, the M is greater than N, and the M and N are integers greater than or equal to 0.

在一种可能的实现方式中,所述实时位置包括实时经纬度信息,所述第一确定模块903中确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据的部分被配置为:In a possible implementation, the real-time location includes real-time latitude and longitude information, and the first real-time feature data determined in the first determination module 903 that the real-time location is located within the regional location of the first grid is as The geofence real-time feature data portion is configured as:

若所述实时经纬度信息中的经度均位于所述第一网格的对角点的经度之间且维度位于所述第一网格的对角点的纬度之间,则确定所述实时经纬度信息位于所述第一网格的区域位置内,确定所述实时经纬度信息对应的第一实时特征数据为所述地理围栏的实时特征数据。If the longitudes in the real-time latitude and longitude information are located between the longitudes of the diagonal points of the first grid and the dimensions are between the latitudes of the diagonal points of the first grid, then the real-time latitude and longitude information is determined Located within the regional location of the first grid, the first real-time feature data corresponding to the real-time longitude and latitude information is determined to be the real-time feature data of the geofence.

本实施例中信息获取装置与上述信息获取方法对应一致,具体细节可以参见上述对信息获取方法的描述,在此不再赘述。In this embodiment, the information acquisition device corresponds to the above-mentioned information acquisition method. For specific details, please refer to the above description of the information acquisition method, which will not be described again here.

本公开还公开了一种电子设备,图10示出根据本公开一实施方式的电子设备的结构框图,如图10所示,所述电子设备1000包括存储器1001和处理器1002;其中,The present disclosure also discloses an electronic device. Figure 10 shows a structural block diagram of an electronic device according to an embodiment of the present disclosure. As shown in Figure 10, the electronic device 1000 includes a memory 1001 and a processor 1002; wherein,

所述存储器1001用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器1002执行以实现上述方法步骤。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.

图11是适于用来实现根据本公开一实施方式的信息获取方法的计算机系统的结构示意图。FIG. 11 is a schematic structural diagram of a computer system suitable for implementing an information acquisition method according to an embodiment of the present disclosure.

如图11所示,计算机系统1100包括处理单元1101,其可以根据存储在只读存储器(ROM)1102中的程序或者从存储部分1108加载到随机访问存储器(RAM)1103中的程序而执行上述实施方式中的各种处理。在RAM1103中,还存储有系统1100操作所需的各种程序和数据。处理单元1101、ROM1102以及RAM1103通过总线1104彼此相连。输入/输出(I/O)接口1105也连接至总线1104。As shown in Figure 11, the computer system 1100 includes a processing unit 1101, which can perform the above-described implementation according to a program stored in a read-only memory (ROM) 1102 or loaded from a storage portion 1108 into a random access memory (RAM) 1103. Various processing methods. In the RAM 1103, various programs and data required for the operation of the system 1100 are also stored. The processing unit 1101, ROM 1102 and RAM 1103 are connected to each other via a bus 1104. An input/output (I/O) interface 1105 is also connected to bus 1104.

以下部件连接至I/O接口1105:包括键盘、鼠标等的输入部分1106;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1107;包括硬盘等的存储部分1108;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1109。通信部分1109经由诸如因特网的网络执行通信处理。驱动器1110也根据需要连接至I/O接口1105。可拆卸介质1111,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1110上,以便于从其上读出的计算机程序根据需要被安装入存储部分1108。其中,所述处理单元1101可实现为CPU、GPU、TPU、FPGA、NPU等处理单元。The following components are connected to the I/O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., speakers, etc.; and a storage section 1108 including a hard disk, etc. ; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. Driver 1110 is also connected to I/O interface 1105 as needed. Removable media 1111, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage portion 1108 as needed. Wherein, the processing unit 1101 can be implemented as a processing unit such as CPU, GPU, TPU, FPGA, NPU, etc.

特别地,根据本公开的实施方式,上文描述的方法可以被实现为计算机软件程序。例如,本公开的实施方式包括一种计算机程序产品,其包括有形地包含在及其可读介质上的计算机程序,所述计算机程序包含用于执行所述信息获取方法的程序代码。在这样的实施方式中,该计算机程序可以通过通信部分1109从网络上被下载和安装,和/或从可拆卸介质1111被安装。In particular, according to embodiments of the present disclosure, the method described above may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a readable medium thereof, the computer program including program code for executing the information acquisition method. In such embodiments, the computer program may be downloaded and installed from the network via communications portion 1109 and/or installed from removable media 1111 .

附图中的流程图和框图,图示了按照本公开各种实施方式的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,路程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operations 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 roadmap or block diagram may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function. Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.

描述于本公开实施方式中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。The units or modules described in the embodiments of the present disclosure may be implemented in software or hardware. The described units or modules may also be provided in the processor, and the names of these units or modules do not constitute a limitation on the units or modules themselves under certain circumstances.

作为另一方面,本公开实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施方式中所述装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,所述程序被一个或者一个以上的处理器用来执行描述于本公开实施例的方法。As another aspect, embodiments of the present disclosure also provide a computer-readable storage medium. The computer-readable storage medium may be the computer-readable storage medium included in the device described in the above embodiments; it may also exist independently. , a computer-readable storage medium that is not installed in the device. The computer-readable storage medium stores one or more programs, which are used by one or more processors to execute the methods described in the embodiments of the present disclosure.

本申请实施例公开了TS1、一种信息获取方法,其特征在于,所述方法包括:The embodiment of the present application discloses TS1, an information acquisition method, which is characterized in that the method includes:

获取并存储各实时特征数据及其对应的实时位置;Obtain and store each real-time feature data and its corresponding real-time location;

获取地理围栏中各网格的区域位置;Get the regional location of each grid in the geofence;

确定实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据。Real-time feature data whose real-time location is within the regional location of the grid in the geo-fence is determined as the real-time feature data of the geo-fence.

TS2、如TS1所述的方法,其中,TS2. The method as described in TS1, wherein,

所述获取地理围栏中各网格对应的区域位置,包括:The method of obtaining the regional location corresponding to each grid in the geofence includes:

获取所述地理围栏的区域位置;Obtain the regional location of the geofence;

基于所述地理围栏的区域位置,获取所述地理围栏中第一网格和第二网格的区域位置,所述第一网格包括被所述地理围栏完全覆盖的网格,所述第二网格包括被所述地理围栏部分覆盖的网格,所述第一网格和所述第二网格为预设的位置固定的网格。Based on the regional position of the geofence, the regional positions of the first grid and the second grid in the geofence are obtained, the first grid includes a grid completely covered by the geofence, and the second grid is The grid includes a grid partially covered by the geofence, and the first grid and the second grid are preset fixed-position grids.

TS3、如TS2所述的方法,其中,所述确定所述实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据包括:TS3. The method as described in TS2, wherein determining the real-time feature data that the real-time location is located within the regional location of the grid in the geo-fence as the real-time feature data of the geo-fence includes:

确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据;Determine the first real-time characteristic data in which the real-time position is located within the regional position of the first grid as the real-time characteristic data of the geofence;

所述方法还包括:The method also includes:

确定所述实时位置位于所述第二网格的区域位置内的第二实时特征数据;Determining that the real-time position is located in the second real-time feature data within the regional position of the second grid;

从所述第二实时特征数据中筛选实时位置位于所述地理围栏的区域位置内的第三实时特征数据,作为所述地理围栏的实时特征数据。Third real-time feature data whose real-time location is within the regional location of the geofence is selected from the second real-time feature data as the real-time feature data of the geofence.

TS4、如TS3所述的方法,其中,所述从所述第二实时特征数据中筛选实时位置位于所述地理围栏的区域位置内的第三实时特征数据,包括:TS4. The method as described in TS3, wherein filtering the third real-time feature data whose real-time location is within the regional location of the geo-fence from the second real-time feature data includes:

以所述第二实时特征数据对应的实时位置处为起点确定一条射线;Determine a ray using the real-time position corresponding to the second real-time feature data as a starting point;

若所述射线与所述地理围栏的边界的交点个数为奇数,则确定所述第二实时特征数据为实时位置位于所述地理围栏的区域位置内的第三实时特征数据;If the number of intersections between the ray and the boundary of the geofence is an odd number, it is determined that the second real-time feature data is the third real-time feature data whose real-time position is within the regional position of the geofence;

若所述射线与所述地理围栏的边界的交点个数为偶数,则确定所述第二实时特征数据对应的实时位置位于所述地理围栏的区域位置之外。If the number of intersections between the ray and the boundary of the geofence is an even number, it is determined that the real-time position corresponding to the second real-time feature data is located outside the regional position of the geofence.

TS5、如TS2-TS4任一项所述的方法,其中,所述地理围栏中各网格包括GeoHash网格,所述基于所述地理围栏的区域位置,获取被所述地理围栏完全覆盖的第一网格以及被所述地理围栏部分覆盖的第二网格,包括:TS5. The method according to any one of TS2 to TS4, wherein each grid in the geofence includes a GeoHash grid, and based on the regional position of the geofence, the first grid completely covered by the geofence is obtained. A grid and a second grid partially covered by said geofence, including:

基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格;Based on the regional location of the geofence, the preset minimum level grid completely covered by the geofence is determined to be the first grid, and the preset minimum level grid partially covered by the geofence is determined to be the first layer part. Cover grid;

遍历所述第一层部分覆盖网格中的下一层级网格,确定所述第一层部分覆盖网格中被所述地理围栏全部覆盖的下一层级网格为第一网格,确定所述第一层部分覆盖网格中被所述地理围栏部分覆盖的下一层级网格为下一层部分覆盖网格,直至所述下一层部分覆盖网格的下一层级网格为预设的最大层级网格,则确定所述下一层部分覆盖网格中被所述地理围栏全部覆盖的最大层级网格为第一网格,确定被所述地理围栏所在区域部分覆盖的最大层级网格为第二网格;Traverse the next level grid in the first layer partially covered grid, determine the next level grid in the first layer partially covered grid that is fully covered by the geofence as the first grid, determine the The next level grid in the first layer of partially covered grids that is partially covered by the geofence is the next layer of partially covered grids, until the next level grid of the next layer of partially covered grids is the default the maximum level grid, then determine the maximum level grid that is fully covered by the geofence in the next layer of partially covered grids as the first grid, determine the maximum level grid that is partially covered by the area where the geofence is located Grid is the second grid;

其中,本层级网格的区域面积大于下一层级网格区域的面积。Among them, the area of the grid at this level is larger than the area of the grid at the next level.

TS6、如TS5所述的方法,其中,所述基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格,包括:TS6. The method as described in TS5, wherein based on the regional position of the geofence, it is determined that the preset minimum level grid completely covered by the geofence is the first grid, and the part covered by the geofence is determined The default minimum level grid covered is the first layer partial coverage grid, including:

基于所述地理围栏的区域位置确定所述地理围栏的最小外接矩形;Determine the minimum circumscribed rectangle of the geofence based on the regional location of the geofence;

基于所述最小外接矩形的对角点的经纬度坐标,确定被所述最小外接矩形全部覆盖或部分覆盖的预设最小层级网格为第三网格;Based on the longitude and latitude coordinates of the diagonal points of the minimum circumscribed rectangle, determine the preset minimum level grid that is fully or partially covered by the minimum circumscribed rectangle as the third grid;

遍历所述第三网格,确定被所述地理围栏全部覆盖的第三网格为第一网格,确定被所述地理围栏部分覆盖的第三网格为第一层部分覆盖网格。The third grid is traversed, the third grid completely covered by the geofence is determined to be the first grid, and the third grid partially covered by the geofence is determined to be the first layer partially covered grid.

TS7、如TS5所述的方法,其中,所述最大层级网格与最小层级网格之间包括预设的中间层级网格;TS7. The method as described in TS5, wherein a preset intermediate level grid is included between the maximum level grid and the minimum level grid;

其中,在所述最小层级网格与所述中间层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的M倍,在所述中间层级网格与最大层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的N倍,所述M大于N,所述M与N为大于等于0的整数。Wherein, in each level grid between the minimum level grid and the intermediate level grid, the area of the grid area at this level is M times the area of the grid area at the next level, and in the intermediate level grid In each level grid between the maximum level grid, the area of the grid area at this level is N times the area of the grid area at the next level, the M is greater than N, and the M and N are integers greater than or equal to 0.

TS8、如TS5所述的方法,其中,所述实时位置包括实时经纬度信息,所述确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据,包括:TS8. The method as described in TS5, wherein the real-time location includes real-time latitude and longitude information, and the first real-time feature data that determines that the real-time location is located within the regional location of the first grid is used as the geofence real-time feature data, including:

若所述实时经纬度信息中的经度均位于所述第一网格的对角点的经度之间且维度位于所述第一网格的对角点的纬度之间,则确定所述实时经纬度信息位于所述第一网格的区域位置内,确定所述实时经纬度信息对应的第一实时特征数据为所述地理围栏的实时特征数据。If the longitudes in the real-time latitude and longitude information are located between the longitudes of the diagonal points of the first grid and the dimensions are between the latitudes of the diagonal points of the first grid, then the real-time latitude and longitude information is determined Located within the regional location of the first grid, the first real-time feature data corresponding to the real-time longitude and latitude information is determined to be the real-time feature data of the geofence.

TS9、一种信息获取装置,其特征在于,所述设备包括:TS9. An information acquisition device, characterized in that the device includes:

第一获取模块,被配置为获取并存储各实时特征数据及其对应的实时位置;The first acquisition module is configured to acquire and store each real-time feature data and its corresponding real-time location;

第二获取模块,被配置为获取地理围栏中各网格的区域位置;The second acquisition module is configured to acquire the regional location of each grid in the geofence;

确定模块,被配置为确定所述实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据。The determining module is configured to determine the real-time feature data that the real-time location is located within the regional location of the grid in the geo-fence as the real-time feature data of the geo-fence.

TS10、一种电子设备,包括存储器和处理器;所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现TS1至TS8任一项所述的方法步骤。TS10. An electronic device, including 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 any one of TS1 to TS8 The method steps described.

TS11、一种计算机可读存储介质,其上存储有计算机指令,该计算机指令被处理器执行时实现TS1至TS8任一项所述的方法步骤。TS11. A computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, the method steps described in any one of TS1 to TS8 are implemented.

TS12、一种计算机程序产品,包括计算机程序/指令,其中,该计算机程序/指令被处理器执行时实现TS1至TS8任一项所述的方法步骤。TS12. A computer program product, including a computer program/instruction, wherein the computer program/instruction implements the method steps described in any one of TS1 to TS8 when executed by a processor.

以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开实施例中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a description of the preferred embodiments of the present disclosure and the technical principles applied. Persons skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to technical solutions composed of specific combinations of the above technical features, but should also cover the above-mentioned technical solutions without departing from the inventive concept. Other technical solutions formed by any combination of technical features or their equivalent features. For example, a technical solution is formed by replacing the above features with technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to).

Claims (12)

1.一种信息获取方法,其特征在于,包括:1. An information acquisition method, characterized by including: 获取并存储各实时特征数据及其对应的实时位置;Obtain and store each real-time feature data and its corresponding real-time location; 获取地理围栏中各网格的区域位置;Get the regional location of each grid in the geofence; 确定实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据。Real-time feature data whose real-time location is within the regional location of the grid in the geo-fence is determined as the real-time feature data of the geo-fence. 2.根据权利要求1所述的方法,其特征在于,所述获取地理围栏中各网格对应的区域位置,包括:2. The method according to claim 1, characterized in that obtaining the regional location corresponding to each grid in the geofence includes: 获取所述地理围栏的区域位置;Obtain the regional location of the geofence; 基于所述地理围栏的区域位置,获取所述地理围栏中第一网格和第二网格的区域位置,所述第一网格包括被所述地理围栏完全覆盖的网格,所述第二网格包括被所述地理围栏部分覆盖的网格,所述第一网格和所述第二网格为预设的位置固定的网格。Based on the regional position of the geofence, the regional positions of the first grid and the second grid in the geofence are obtained, the first grid includes a grid completely covered by the geofence, and the second grid is The grid includes a grid partially covered by the geofence, and the first grid and the second grid are preset fixed-position grids. 3.根据权利要求2所述的方法,其特征在于,所述确定所述实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据包括:3. The method according to claim 2, wherein determining the real-time feature data that the real-time location is located within the regional location of the grid in the geo-fence as the real-time feature data of the geo-fence includes: 确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据;Determine the first real-time characteristic data in which the real-time position is located within the regional position of the first grid as the real-time characteristic data of the geofence; 所述方法还包括:The method also includes: 确定所述实时位置位于所述第二网格的区域位置内的第二实时特征数据;Determining that the real-time position is located in the second real-time feature data within the regional position of the second grid; 从所述第二实时特征数据中筛选实时位置位于所述地理围栏的区域位置内的第三实时特征数据,作为所述地理围栏的实时特征数据。Third real-time feature data whose real-time location is within the regional location of the geofence is selected from the second real-time feature data as the real-time feature data of the geofence. 4.根据权利要求3所述的方法,其特征在于,所述从所述第二实时特征数据中筛选实时位置位于所述地理围栏的区域位置内的第三实时特征数据,包括:4. The method according to claim 3, wherein filtering the third real-time feature data whose real-time location is within the regional location of the geo-fence from the second real-time feature data includes: 以所述第二实时特征数据对应的实时位置处为起点确定一条射线;Determine a ray using the real-time position corresponding to the second real-time feature data as a starting point; 若所述射线与所述地理围栏的边界的交点个数为奇数,则确定所述第二实时特征数据为实时位置位于所述地理围栏的区域位置内的第三实时特征数据;If the number of intersections between the ray and the boundary of the geofence is an odd number, it is determined that the second real-time feature data is the third real-time feature data whose real-time position is within the regional position of the geofence; 若所述射线与所述地理围栏的边界的交点个数为偶数,则确定所述第二实时特征数据对应的实时位置位于所述地理围栏的区域位置之外。If the number of intersections between the ray and the boundary of the geofence is an even number, it is determined that the real-time position corresponding to the second real-time feature data is located outside the regional position of the geofence. 5.根据权利要求2-4任一项所述的方法,其特征在于,所述地理围栏中各网格包括地理哈希GeoHash网格,所述基于所述地理围栏的区域位置,获取被所述地理围栏完全覆盖的第一网格以及被所述地理围栏部分覆盖的第二网格,包括:5. The method according to any one of claims 2 to 4, characterized in that each grid in the geofence includes a GeoHash grid, and the region location based on the geofence is obtained. The first grid completely covered by the geofence and the second grid partially covered by the geofence include: 基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格;Based on the regional location of the geofence, the preset minimum level grid completely covered by the geofence is determined to be the first grid, and the preset minimum level grid partially covered by the geofence is determined to be the first layer part. Cover grid; 遍历所述第一层部分覆盖网格中的下一层级网格,确定所述第一层部分覆盖网格中被所述地理围栏全部覆盖的下一层级网格为第一网格,确定所述第一层部分覆盖网格中被所述地理围栏部分覆盖的下一层级网格为下一层部分覆盖网格,直至所述下一层部分覆盖网格的下一层级网格为预设的最大层级网格,则确定所述下一层部分覆盖网格中被所述地理围栏全部覆盖的最大层级网格为第一网格,确定被所述地理围栏所在区域部分覆盖的最大层级网格为第二网格;Traverse the next level grid in the first layer partially covered grid, determine the next level grid in the first layer partially covered grid that is fully covered by the geofence as the first grid, determine the The next level grid in the first layer of partially covered grids that is partially covered by the geofence is the next layer of partially covered grids, until the next level grid of the next layer of partially covered grids is the default the maximum level grid, then determine the maximum level grid that is fully covered by the geofence in the next layer of partially covered grids as the first grid, determine the maximum level grid that is partially covered by the area where the geofence is located Grid is the second grid; 其中,本层级网格的区域面积大于下一层级网格区域的面积。Among them, the area of the grid at this level is larger than the area of the grid at the next level. 6.根据权利要求5所述的方法,其特征在于,所述基于所述地理围栏的区域位置,确定被所述地理围栏全部覆盖的预设最小层级网格为第一网格,确定被所述地理围栏部分覆盖的预设最小层级网格为第一层部分覆盖网格,包括:6. The method according to claim 5, characterized in that, based on the regional position of the geofence, it is determined that the preset minimum level grid completely covered by the geofence is the first grid, and it is determined that the grid is the first grid. The default minimum level grid for partial coverage of the above geofence is the first layer partial coverage grid, including: 基于所述地理围栏的区域位置确定所述地理围栏的最小外接矩形;Determine the minimum circumscribed rectangle of the geofence based on the regional location of the geofence; 基于所述最小外接矩形的对角点的经纬度坐标,确定被所述最小外接矩形全部覆盖或部分覆盖的预设最小层级网格为第三网格;Based on the longitude and latitude coordinates of the diagonal points of the minimum circumscribed rectangle, determine the preset minimum level grid that is fully or partially covered by the minimum circumscribed rectangle as the third grid; 遍历所述第三网格,确定被所述地理围栏全部覆盖的第三网格为第一网格,确定被所述地理围栏部分覆盖的第三网格为第一层部分覆盖网格。The third grid is traversed, the third grid completely covered by the geofence is determined to be the first grid, and the third grid partially covered by the geofence is determined to be the first layer partially covered grid. 7.根据权利要求5所述的方法,其特征在于,所述最大层级网格与最小层级网格之间包括预设的中间层级网格;7. The method according to claim 5, wherein a preset intermediate level grid is included between the maximum level grid and the minimum level grid; 其中,在所述最小层级网格与所述中间层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的M倍,在所述中间层级网格与最大层级网格之间的各层级网格中,本层级网格区域面积为下一层级网格区域面积的N倍,所述M大于N,所述M与N为大于等于0的整数。Wherein, in each level grid between the minimum level grid and the intermediate level grid, the area of the grid area at this level is M times the area of the grid area at the next level, and in the intermediate level grid In each level grid between the maximum level grid, the area of the grid area at this level is N times the area of the grid area at the next level, the M is greater than N, and the M and N are integers greater than or equal to 0. 8.根据权利要求5所述的方法,其特征在于,所述实时位置包括实时经纬度信息,所述确定所述实时位置位于所述第一网格的区域位置内的第一实时特征数据,作为所述地理围栏的实时特征数据,包括:8. The method according to claim 5, wherein 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 located within the regional location of the first grid is as The real-time characteristic data of the geofence includes: 若所述实时经纬度信息中的经度均位于所述第一网格的对角点的经度之间且维度位于所述第一网格的对角点的纬度之间,则确定所述实时经纬度信息位于所述第一网格的区域位置内,确定所述实时经纬度信息对应的第一实时特征数据为所述地理围栏的实时特征数据。If the longitudes in the real-time latitude and longitude information are located between the longitudes of the diagonal points of the first grid and the dimensions are between the latitudes of the diagonal points of the first grid, then the real-time latitude and longitude information is determined Located within the regional location of the first grid, the first real-time feature data corresponding to the real-time longitude and latitude information is determined to be the real-time feature data of the geofence. 9.一种信息获取装置,其特征在于,包括:9. An information acquisition device, characterized in that it includes: 第一获取模块,被配置为获取并存储各实时特征数据及其对应的实时位置;The first acquisition module is configured to acquire and store each real-time feature data and its corresponding real-time location; 第二获取模块,被配置为获取地理围栏中各网格的区域位置;The second acquisition module is configured to acquire the regional location of each grid in the geofence; 确定模块,被配置为确定所述实时位置位于所述地理围栏中网格的区域位置内的实时特征数据,作为所述地理围栏的实时特征数据。The determining module is configured to determine the real-time feature data that the real-time location is located within the regional location of the grid in the geo-fence as the real-time feature data of the geo-fence. 10.一种电子设备,包括存储器和处理器;其特征在于,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现权利要求1至8任一项所述的方法步骤。10. An electronic device, including a memory and a processor; characterized in that 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 claims The method steps described in any one of 1 to 8. 11.一种计算机可读存储介质,其特征在于,其上存储有计算机指令,该计算机指令被处理器执行时实现权利要求1-8任一项所述的方法步骤。11. A computer-readable storage medium, characterized in that computer instructions are stored thereon, and when the computer instructions are executed by a processor, the method steps of any one of claims 1-8 are implemented. 12.一种计算机程序产品,包括计算机程序/指令,其特征在于,该计算机程序/指令被处理器执行时实现权利要求1-8任一项所述的方法步骤。12. A computer program product, comprising a computer program/instruction, characterized in that, when executed by a processor, the computer program/instruction implements the method steps of any one of claims 1-8.
CN202210435841.XA 2022-04-24 2022-04-24 Information acquisition method, device, equipment, medium and product Pending CN116975169A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210435841.XA CN116975169A (en) 2022-04-24 2022-04-24 Information acquisition method, device, equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210435841.XA CN116975169A (en) 2022-04-24 2022-04-24 Information acquisition method, device, equipment, medium and product

Publications (1)

Publication Number Publication Date
CN116975169A true CN116975169A (en) 2023-10-31

Family

ID=88483715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210435841.XA Pending CN116975169A (en) 2022-04-24 2022-04-24 Information acquisition method, device, equipment, medium and product

Country Status (1)

Country Link
CN (1) CN116975169A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150264523A1 (en) * 2014-03-14 2015-09-17 Twitter, Inc. Dynamic geohash-based geofencing
CN108345628A (en) * 2017-12-20 2018-07-31 北京都在哪网讯科技有限公司 Position display method, device, processor and the terminal of multi-layer grid map
CN110209748A (en) * 2018-02-13 2019-09-06 北京京东尚科信息技术有限公司 The method and apparatus for indexing geography fence
CN111859187A (en) * 2020-06-30 2020-10-30 杭州欧若数网科技有限公司 POI query method, device, equipment and medium based on distributed graph database

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150264523A1 (en) * 2014-03-14 2015-09-17 Twitter, Inc. Dynamic geohash-based geofencing
CN108345628A (en) * 2017-12-20 2018-07-31 北京都在哪网讯科技有限公司 Position display method, device, processor and the terminal of multi-layer grid map
CN110209748A (en) * 2018-02-13 2019-09-06 北京京东尚科信息技术有限公司 The method and apparatus for indexing geography fence
CN111859187A (en) * 2020-06-30 2020-10-30 杭州欧若数网科技有限公司 POI query method, device, equipment and medium based on distributed graph database

Similar Documents

Publication Publication Date Title
CN109313820B (en) Three-dimensional data encoding method, decoding method, encoding device, and decoding device
CN114238384B (en) Area positioning method, device, equipment and storage medium
CN110633262B (en) Spark-based map intersection area calculation method and system
US10262392B2 (en) Distributed and parallelized visualization framework
CN109992640B (en) Method and device, device and storage medium for determining location grid
CN111090712A (en) Data processing method, device and equipment and computer storage medium
CN111598359B (en) Logistics station site selection method and system
EP3937125B1 (en) Method, apparatus for superimposing laser point clouds and high-precision map and electronic device
CN110765331A (en) Retrieval method and system of spatio-temporal data
CN110989886A (en) Three-dimensional space grid selection method and device based on space map
CN116755627A (en) Spatial data storage method, spatial data storage device, computer equipment and storage medium
CN114332322B (en) A big data rendering method for a single model in a three-dimensional scene
US12061784B2 (en) Generating aggregate data geospatial grid cells for encoding in vector tiles
CN115687499A (en) A Design and Realization System of Global Spectrum Mapping
CN116975169A (en) Information acquisition method, device, equipment, medium and product
CN107451847A (en) A kind of service area partitioning method and device
CN117581549A (en) Intra-frame prediction, coding and decoding methods and devices, codecs, equipment, media
CN117171288B (en) Grid map analysis method, device, equipment and medium
CN116737392B (en) Non-vector data processing method and device and computing equipment
CN118279122A (en) Point cloud data processing method, device, equipment and medium
CN116720480A (en) Method and device for establishing unified identifier of city management element
CN114329058A (en) Image gathering method and device and electronic equipment
WO2024145904A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2022247704A1 (en) Predictive coding/decoding method and device for point cloud depth information
CN112015929B (en) Raster data access method and device, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20250603

Address after: 303, 3rd Floor, Building A, Building 1, Courtyard 6, Tangjialing North Ring Road, Haidian District, Beijing, 100094

Applicant after: BEIJING DIDI INFINITY TECHNOLOGY AND DEVELOPMENT Co.,Ltd.

Country or region after: China

Address before: Room 203, 2 / F, building 34, yard 8, Dongbei Wangxi Road, Haidian District, Beijing 100193

Applicant before: Beijing Qisheng Technology Co.,Ltd.

Country or region before: China