Geographic information query method and device, electronic equipment and storage medium

By obtaining the rectangular area identification and target grid area of ​​the fence area in the geographical information query, the object information in the fence is filtered out, which solves the problem of low query efficiency for irregularly shaped fences and achieves efficient and accurate query results.

CN118643228APending Publication Date: 2024-09-13TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310282583.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-13
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

When the existing technology handles fences with irregular shapes and complex shapes, the geographical information query efficiency is low and the calculation is difficult, which affects the query effect.

Method used

By obtaining the rectangular area identification of the geo-fence area, the target grid area is determined, and the object information in the fence area is filtered out from the target grid area. The regular shape of the target grid area is used to reduce calculation difficulty and improve query efficiency.

Benefits of technology

It realizes accurate and efficient query of irregularly shaped and complex fences, reduces the consumption of computing resources, and improves the accuracy and efficiency of query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643228A
    Figure CN118643228A
Patent Text Reader

Abstract

The invention relates to a geographic information query method and device, electronic equipment and a storage medium. The method comprises the steps of obtaining a first geographic information query request; determining a rectangular area corresponding to the geo-fencing area, and determining a first identifier indicating the rectangular area; determining a target grid region matched with the rectangular region based on the first identifier, and obtaining object information in the target grid region; and screening out the object information in the geofence area from the object information in the target grid area to obtain a first query result corresponding to the first geographic information query request. According to the method and the device, the accuracy and the efficiency of geographic information query can be considered, and the method and the device have relatively high adaptability to query requests related to irregular and complicated fences. The embodiment of the invention can be applied to various scenes such as maps, cloud technologies, artificial intelligence, intelligent transportation, intelligent entertainment and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet communication technology, and in particular to a geographic information query method, device, electronic device and storage medium. Background Art

[0002] With the development of Internet communication technology, various Internet products emerge in an endless stream. Internet products can provide users with relevant functional experiences, such as the experience of querying geographic information and obtaining query results. In related technologies, for fence-type query requests, when obtaining object information in the fence, it is necessary to recall object information based on the shape of the fence. However, fences have different shapes, and there are fences with irregular and complex shapes, which brings computational difficulty to the recall of object information and affects the effect of geographic information query. Therefore, it is necessary to provide an accurate and efficient geographic information query solution. Summary of the invention

[0003] In order to solve at least one of the above-mentioned technical problems, the present application provides a geographic information query method, device, electronic device and storage medium:

[0004] According to a first aspect of the present application, a geographic information query method is provided, the method comprising:

[0005] Obtaining a first geographic information query request, the first geographic information query request carrying a geographic fence area, the first geographic information query request being used to request querying object information in the geographic fence area;

[0006] Determine a rectangular area corresponding to the geo-fenced area, and determine a first identifier indicating the rectangular area, the rectangular area matches a circumscribed rectangle of the geo-fenced area, the rectangular area is located on a preset map, and the preset map is divided into a plurality of unit grids;

[0007] Determine a target grid area matching the rectangular area based on the first identifier, and obtain object information in the target grid area, wherein the second identifier corresponding to the target grid area matches the first identifier, and the target grid area is composed of at least one unit grid;

[0008] The object information in the geographic fence area is filtered out from the object information in the target grid area to obtain a first query result corresponding to the first geographic information query request.

[0009] According to a second aspect of the present application, a geographic information query device is provided, the device comprising:

[0010] An acquisition module: used to acquire a first geographic information query request, wherein the first geographic information query request carries a geographic fence area, and the first geographic information query request is used to request to query information of objects in the geographic fence area;

[0011] A rectangular area determination module: used to determine a rectangular area corresponding to the geo-fenced area and a first identifier indicating the rectangular area, the rectangular area matches a circumscribed rectangle of the geo-fenced area, the rectangular area is located on a preset map, and the preset map is divided into a plurality of unit grids;

[0012] A grid area determination module: used to determine a target grid area matching the rectangular area based on the first identifier, and to obtain object information in the target grid area, wherein the second identifier corresponding to the target grid area matches the first identifier, and the target grid area is composed of at least one unit grid;

[0013] Result acquisition module: used for filtering object information in the geographic fence area from object information in the target grid area, and obtaining a first query result corresponding to the first geographic information query request.

[0014] According to the third aspect of the present application, an electronic device is provided, comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the at least one processor to implement the geographic information query method as described in the first aspect.

[0015] According to the fourth aspect of the present application, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the geographic information query method as described in the first aspect.

[0016] According to the fifth aspect of the present application, a computer program product is provided, which includes at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement the geographic information query method as described in the first aspect.

[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.

[0018] Implementing this application has the following beneficial effects:

[0019] For a fence type query request, the present application determines a rectangular area corresponding to a geo-fence area, and determines a first identifier indicating a rectangular area; then, based on the first identifier, determines a target grid area matching the rectangular area, and obtains object information in the target grid area; finally, filters object information in the geo-fence area from object information in the target grid area to obtain a query result. The present application uses the target grid area to recall candidate object information, and then filters the candidate object information to obtain object information in the geo-fence area, thereby obtaining a query result. Considering that there may be irregular and complex fences, the shape of the target grid area is regular, and the number of vertices and edges is fixed, using the target grid area to recall candidate objects can reduce the difficulty of calculation, reduce the consumption of computing resources, and improve the calculation speed. At the same time, using the target grid area to recall candidate object information provides a smaller screening range for obtaining query results, and then obtains accurate and reliable query results by comparing with the geo-fence area. In this way, the accuracy and efficiency of geographic information query can be taken into account, and it has high adaptability to query requests involving irregular and complex fences.

[0020] Other features and aspects of the present application will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 A schematic diagram of an application environment according to an embodiment of the present application is shown;

[0023] Figure 2 A schematic diagram showing a flow chart of a geographic information query method according to an embodiment of the present application;

[0024] Figure 3 A schematic diagram showing a process of determining a first identifier indicating a rectangular area according to an embodiment of the present application;

[0025] Figure 4 A schematic diagram of a process of a geographic information query method according to an embodiment of the present application is also shown;

[0026] Figure 5 A schematic diagram showing the architecture of a geographic information query method according to an embodiment of the present application;

[0027] Figure 6A schematic diagram showing an interactive interface for a region search request according to an embodiment of the present application;

[0028] Figure 7 A schematic diagram showing conversion of a circular fence area into other areas according to an embodiment of the present application;

[0029] Figure 8 A schematic diagram showing conversion of a polygonal fence area into other areas according to an embodiment of the present application;

[0030] Fig. 9 A device block diagram according to an embodiment of the present application is shown;

[0031] Fig.10 A schematic diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0035] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0036] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0037] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.

[0038] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0039] Point of Interest (POI): It is the coordinates of a point in a geographic information system, used to mark the commercial institutions, historical sites, transportation facilities, etc. represented by the place.

[0040] Redis (Remote Dictionary Server): remote dictionary service.

[0041] Ray method: Its algorithm idea is to use the measured point Q as the endpoint, draw a ray in any direction (generally draw a ray horizontally to the right), and count the number of intersections between the ray and the polygon. If it is an odd number, the measured point Q is inside the polygon; if it is an even number, the measured point Q is outside the polygon.

[0042] Corner method: Its algorithm idea is to draw lines from the measured point Q to the vertex Vi in the counterclockwise order of the polygon vertices. Among them, αi is the angle between Vi and Vi+1, and the α angle is positive counterclockwise and negative clockwise. If the sum of the angles between all the lines connected to the vertex is (winding number)°, the measured point Q is outside the polygon, otherwise it is inside the polygon.

[0043] See also Figure 1 , Figure 1A schematic diagram of an application environment according to an embodiment of the present application is shown, and the application environment may include a client 10 and a server 20. The client 10 and the server 20 may be directly or indirectly connected via wired or wireless communication. The relevant user may send a first geographic information query request to the server 20 via the client 10. The server 20 receives the first geographic information query request, the first geographic information query request carries a geographic fence area, and the first geographic information query request is used to request a query for object information in the geographic fence area; then, a rectangular area corresponding to the geographic fence area is determined, and a first identifier indicating the rectangular area is determined, the rectangular area matches the circumscribed rectangle of the geographic fence area, the rectangular area is located on a preset map, and the preset map is divided into multiple unit grids; further, a target grid area matching the rectangular area is determined based on the first identifier, and object information in the target grid area is obtained, the second identifier corresponding to the target grid area matches the first identifier, and the target grid area is composed of at least one unit grid; finally, the object information in the geographic fence area is filtered out from the object information in the target grid area, and the first query result corresponding to the first geographic information query request is obtained. It should be noted that Figure 1 Just an example.

[0044] The client 10 may be a physical device such as a smart phone, a computer (such as a desktop computer, a tablet computer, a laptop computer), an augmented reality (AR) / virtual reality (VR) device, a digital assistant, an intelligent voice interaction device (such as an intelligent speaker), an intelligent wearable device, an intelligent home appliance, a vehicle-mounted terminal, etc., or may be software running in a physical device, such as a computer program. The operating system corresponding to the client 10 may be an Android system (Android system), an iOS system (a mobile operating system developed by Apple), a Linux system (an operating system), a Microsoft Windows system (Microsoft Windows operating system), etc.

[0045] The server end 20 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server can include a network communication unit, a processor, a memory, etc. The server end 20 can provide background services for the corresponding client.

[0046] In practical applications, the geographic information query solution provided in the embodiment of the present application can be applied to the Intelligent Traffic System (ITS). The Intelligent Transportation System, also known as the Intelligent Transportation System, is an effective and comprehensive application of advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) to transportation, service control and vehicle manufacturing, strengthening the connection between vehicles, roads and users, thereby forming a comprehensive transportation system that ensures safety, improves efficiency, improves the environment and saves energy. The geographic information query solution provided in the embodiment of the present application can be applied to map scenarios. Users can experience the electronic map function provided by the target application through the terminal, and the interactive interface of the target application displays the electronic map. Using the geographic information query solution provided in the embodiment of the present application, users can obtain information about objects in the geographic fence area from the electronic map.

[0047] It should be noted that for the first geographic information query request, the first geographic information query request, the first query result, the second query result, etc. that are associated with user information, when the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0048] Figure 2 A schematic diagram showing a flow chart of a geographic information query method according to an embodiment of the present application is shown as follows: Figure 2 As shown, the method includes:

[0049] S201: Acquire a first geographic information query request, where the first geographic information query request carries a geographic fence area, and the first geographic information query request is used to request information of an object in the geographic fence area;

[0050] In an embodiment of the present application, the server obtains a first geographic information query request. The first geographic information query request carries a geographic fence area, the first geographic information query request is a fence type query request, and the first geographic information query request is used to request information about objects in the geographic fence area. The geographic fence area includes the area boundary and the interior of the area. Whether an object is in the geographic fence area can be determined by the area boundary to determine whether the object location meets the requirements. The shape of the geographic fence area can be a circle, a rectangle, other polygons, and the like. The shape of the geographic fence area can be an irregular shape, and the shape of the geographic fence area can be more complex. For example, the geo-fence area can have more vertices, the geo-fence area can have more edges, and the edges of the geo-fence area can be curves, and the like.

[0051] The object information may be information of an object of a specified object type, and the specified object type may be at least one preset object type specified from a plurality of preset object types. The object information may also be information of an object of a default object type, and the default object type may be determined based on a historical geographic information query request, and the default object type may also include all of the plurality of preset object types. The plurality of preset object types may be building types, traffic facility types (such as parking lot types, traffic light types, etc.), user types, etc. According to the function of the building, the building type may also include a building type for selling food, a building type for providing rest space, a building type for providing travel services, etc. The object information indicates at least one object that satisfies both the type condition and the location condition. The object information may include basic information of each object in at least one object, may include a quantitative statistical result for at least one object, and may include an information analysis result for each basic information of at least one object. The object information is the query result that the geographic information query request expects to obtain.

[0052] Exemplarily, geographic information query request i is used to request to query the fast food restaurant information in area A. Area A is the geographic fence area here, and the fast food restaurant type is the object type here. If the fast food restaurants whose locations all fall into area A are fast food restaurants 1-5, then the object information may include the basic information of the five fast food restaurants (such as the store name, store rating, store location, etc. of each of the five fast food restaurants); the object information may also indicate 5, indicating that there are five fast food restaurants in area A; the object information may also be the average store rating of the five fast food restaurants.

[0053] The geographic information query request is a fence type query request, and other types of query requests can be converted to obtain a geographic information query request. Specifically, the acquisition of the first geographic information query request may include the following steps: first, receiving a surrounding search request, the surrounding search request carries an anchor point location, a preset distance, and an object of interest type; then, determining the geographic fence area with the anchor point location as the search center and the preset distance as the search radius; and further, obtaining the first geographic information query request based on the geographic fence area and the object of interest type. The surrounding search request provides the conditions for constructing a geographic fence area: the anchor point location and the preset distance. Based on the conditions, the construction of the geographic fence area is completed, and then the geographic information query request is obtained based on the geographic fence area and the object of interest type. For example, the surrounding search request j is used to request the fast food restaurant information within 500 meters near the location point B. The location point B is the anchor point location here, 500 meters is the preset distance here, and the fast food restaurant type is the object of interest type here. The location point B is the search center and 500 meters is the search radius to determine the C area, which is the geographic fence area. A geographic information query request k is obtained based on the geographic fence area and the type of the object of interest, and the geographic information query request k is used to request information of fast food restaurants in area C.

[0054] The geographic information query request may be an original request or may be obtained by converting other original requests. The processing of the geographic information query request in the embodiment of the present application may not limit the original request type of the geographic information query request obtained through conversion, which may improve the adaptability of the processing solution for the geographic information query request provided by the embodiment of the present application.

[0055] In addition, for the case where the geographic information query request is an original request, a relevant front-end display information example is provided here. Specifically, the acquisition of the first geographic information query request may include the following steps: first, receiving a region search request, the region search request is generated by the target object through the target application trigger, the region search request is used to request to query the object information in the anchor area, the anchor area indicates the map area currently displayed on the interactive interface of the target application; then, determining that the region search request is the first geographic information query request and the anchor area is the geo-fenced area.

[0056] It can be understood that the user as the target object can use the functional services provided by the target application through the terminal, and the anchor area can indicate the entire map area currently displayed on the interactive interface of the target application (see Figure 6 ) or part of the map area (see Figure 6). All map areas can be all map areas presented after the user opens the target application, or all map areas presented after the user searches for a location point through the target application. For example, if user D searches for company E, the interactive interface of the target application will present the map area where company E is located, and the map area near company E. The map area where company E is located and the map area near company E together constitute all the map areas here. Part of the map area can be the map area where a location point is located that is presented after the user searches for a location point through the target application, such as the map area where the above-mentioned company E is located. It should be noted that the shape of the map area where the location point is located is not necessarily a rectangle or a circle, but is generally other polygons.

[0057] The display items of the interactive interface may also include interactive operation controls, and the user may trigger the interactive operation controls to generate a region search request. Of course, the user may also trigger the generation of a region search request through voice, gesture, expression, etc. based on a preset trigger logic.

[0058] In actual applications, the area search request may be a rectangular search request (in map applications, it is often used for searching within the field of view because the area where the map is displayed is a rectangle).

[0059] S202: Determine a rectangular area corresponding to the geo-fenced area and a first identifier indicating the rectangular area, the rectangular area matches a circumscribed rectangle of the geo-fenced area, the rectangular area is located on a preset map, and the preset map is divided into a plurality of unit grids;

[0060] In an embodiment of the present application, the server determines a rectangular area corresponding to the geo-fenced area, and determines a first identifier indicating the rectangular area. Based on the longitude and latitude information carried by the geo-fenced area, the rectangular area covered by the circumscribed rectangle of the geo-fenced area can be determined on a preset map. In a geographic coordinate system, the geo-fenced area can be determined on a preset map by the longitude and latitude information carried by the geo-fenced area. The preset map is obtained by dividing the reference map into unit grids. The shape of the geo-fenced area can be a circle, a rectangle, other polygons, etc. The shape of the geo-fenced area can be an irregular shape, and the shape of the geo-fenced area can be more complex. In order to improve the standardization and convenience of data processing, when converting the geo-fenced area into a rectangular area, the circumscribed rectangle of the geo-fenced area is used, that is, the rectangular area where the circumscribed rectangle of the geo-fenced area is located is determined on the preset map. The circumscribed rectangle is connected to at least one vertex of the geo-fenced area, and the circumscribed rectangle contains the geo-fenced area. The circumscribed rectangle can be determined by matching the geo-fenced area with a preset rectangular template, and the preset rectangular template can have multiple scales. The preset rectangular template is matched with the geo-fenced area. The preset rectangular template needs to contain the geo-fenced area, and the similarity between the preset rectangular template and the geo-fenced area is greater than the lower threshold and less than the upper threshold. The bounding rectangle can be the minimum bounding rectangle of the geo-fenced area. The longitude and latitude information carried by the geo-fenced area can provide a two-dimensional shape. The minimum bounding rectangle of the geo-fenced area is a rectangle whose lower boundary is determined by the maximum horizontal coordinate, the minimum horizontal coordinate, the maximum vertical coordinate, and the minimum vertical coordinate of each vertex of the two-dimensional shape. It should be noted that due to the difference between east longitude and west longitude, and the difference between south latitude and north latitude, the determination of the extreme horizontal and vertical coordinates depends on the specific two-dimensional coordinate system. For example, the horizontal axis of the two-dimensional coordinate system points to the east and the vertical axis points to the north. If the geo-fenced area is in the northern hemisphere and the eastern hemisphere, the maximum horizontal coordinate corresponds to the maximum longitude value, the minimum horizontal coordinate corresponds to the minimum longitude value, the maximum vertical coordinate corresponds to the maximum latitude value, and the minimum vertical coordinate corresponds to the minimum latitude value. If the geo-fenced area is in the northern hemisphere or the eastern and western hemispheres, the maximum horizontal coordinate corresponds to the east longitude value with the largest absolute value, the minimum horizontal coordinate corresponds to the west longitude value with the largest absolute value, the maximum vertical coordinate corresponds to the maximum latitude value, and the minimum vertical coordinate corresponds to the minimum latitude value.

[0061] The following will introduce the determination of the minimum bounding rectangle of the geo-fence area in combination with the shape of the geo-fence area:

[0062] 1) When the geo-fenced area is circular in shape, the minimum circumscribed rectangle of the geo-fenced area can be determined by the center and radius of the circle.

[0063] 2) When the shape of the geo-fenced area is a rectangle or other polygon, all coordinates involved in the geo-fenced area (or the coordinates of the area boundary) can be traversed, and then the extreme points of longitude and latitude are determined, and then the minimum enclosing rectangle of the geo-fenced area is determined.

[0064] The rectangular area where the bounding rectangle of the geo-fenced area determined on the preset map is located. The preset map includes multiple unit grids, and the grids involved in the rectangular area can be fully covered unit grids or partially covered unit grids. For example, the rectangular area can be composed of unit grids 1-10, and these 10 grids all participate in the construction of the rectangular area globally. The rectangular area can also include unit grids 1-5, part of unit grid 6, and part of unit grid 7.

[0065] In one embodiment, Figure 3 As shown, the determining of the first identifier indicating the rectangular area includes:

[0066] S301: Determine a first vertex and a second vertex of the rectangular area, where the first vertex and the second vertex are located on the same diagonal line;

[0067] S302: Obtain the first identifier based on the longitude and latitude information of each of the first vertex and the second vertex and the longitude and latitude information of the unit grid, where the longitude and latitude information of the unit grid is used to characterize the correspondence between the side length of the unit grid and the preset longitude and latitude values.

[0068] The longitude and latitude information of each of the first vertex and the second vertex represent a set of extreme longitude and latitude points of the circumscribed rectangle of the geo-fenced area. The longitude and latitude information of the unit grid is used to characterize the correspondence between the side length of the unit grid and the preset longitude and latitude values. The identification of the rectangular area is determined based on a set of extreme longitude and latitude points and the correspondence between the side length and the longitude and latitude values, and the identification is endowed with information of the longitude and latitude dimensions and the unit grid dimensions, which is conducive to improving the expression effect of the geographic semantic information of the identification, and is conducive to determining the geographic similarity of the areas corresponding to the two identifications based on the similarity of the two identifications, thereby providing support for the subsequent use of identifications to locate cached data.

[0069] Because if the extreme longitude and latitude points are directly used to determine the logo, the geographic semantic information expression effect of the logo determined in this way is poor. For example, the longitude and latitude of the lower left corner and the upper right corner are used to determine the logo of a rectangular area, and the logo 39.905444_116.319157_39.921244_116.337696 is obtained.

[0070] The values ​​in the identifier indicate the latitude value of the lower left corner, the longitude value of the lower left corner, the latitude value of the upper right corner, and the longitude value of the upper right corner, respectively. However, when using such an identifier, the geographical similarity of the areas corresponding to the two identifiers cannot be effectively determined based on the similarity of the two identifiers, because two coordinates that are close in geographical distance do not have similarity in text. For example, the coordinates (39.905999, 116.319999) and the coordinates (39.906000, 116.320000) have 9 different digits, but the distance between the two points is only 0.1 meters. However, the distance between two coordinates with text similarity is very far, such as the coordinates (39.905999, 116.319999) and the coordinates (38.905999, 116.319999) have only 1 different digit, but the distance between the two points exceeds 100,000 meters. Accordingly, such an identifier cannot provide support for the subsequent use of the identifier to locate cache data.

[0071] The shape of a rectangular area is a rectangle. The first vertex and the second vertex are located on the same diagonal line of the rectangle. Figure 7 , 8 As shown, the first vertex and the second vertex can be the lower left corner and the upper right corner of the rectangle, and the first vertex and the second vertex can also be the upper left corner and the lower right corner of the rectangle. In actual applications, the selection of the first vertex and the second vertex can refer to the query range to which the geo-fenced area belongs.

[0072] Further, the longitude and latitude information of the first vertex includes a first longitude value and a first latitude value, and the longitude and latitude information of the second vertex includes a second longitude value and a second latitude value. The first identifier is obtained based on the longitude and latitude information of each of the first vertex and the second vertex and the longitude and latitude information of the unit grid, and may include the following steps: first, determine the query range to which the geographic fence area belongs, and the baseline longitude value and baseline latitude value of the query range; then, obtain a first longitude representation value based on the first longitude value, the baseline longitude value and the preset longitude value corresponding to the side length, and obtain a first latitude representation value based on the first latitude value, the baseline latitude value and the preset latitude value corresponding to the side length; further, obtain a second longitude representation value based on the second longitude value, the baseline longitude value and the preset longitude value, and obtain a second latitude representation value based on the second latitude value, the baseline latitude value and the preset latitude value; then, obtain the first identifier based on the first longitude representation value, the first latitude representation value, the second longitude representation value and the second latitude representation value.

[0073] Introducing the reference longitude and latitude values ​​and the preset longitude and latitude values ​​to participate in the identification determination can improve the security of identification determination and improve the efficiency of subsequent identification matching. Taking the rectangular area in the northern hemisphere and the eastern hemisphere as an example, the query range can indicate the northern hemisphere and the eastern hemisphere, the reference longitude value can be 0, and the reference latitude value can be 0. If the first longitude value is the minimum longitude value of the rectangular area: 116.306159; the first latitude value is the minimum latitude value of the rectangular area: 39.982566; the second longitude value is the maximum longitude value of the rectangular area: 116.309023; the second latitude value is the maximum latitude value of the rectangular area: 39.984900. The preset longitude (latitude) value is the longitude (latitude) range corresponding to the side length of the unit grid. In practical applications, the unit grid often uses an equally divided longitude and latitude grid. The corresponding longitude (latitude) value when the side length is 100 meters is 0.001.

[0074] The first longitude characterization value and the second longitude characterization value can be calculated by the following formula 1:

[0075] grid_x=floor((longitude-lng_min) / delta_lng) formula 1

[0076] Among them, longitudinal can represent the first longitude value or the second longitude value, lng_min represents the reference longitude value, delta_lng represents the preset longitude value, and floor represents the rounding down operation. Therefore, the first longitude representation value is 116306, which is derived from floor((116.306159-0) / 0.001). The second longitude representation value is 116309, which is derived from floor((116.309023-0) / 0.001). Compared with 116.306159 and 116.309023, the first longitude representation value and the second longitude representation value expose less actual longitude information and are safer; at the same time, the first longitude representation value and the second longitude representation value with fewer digits can also increase the speed of subsequent identification matching.

[0077] The first latitude characterization value and the second latitude characterization value can be calculated by the following formula 2:

[0078] gird_y=floor((latitude-lat_min) / dalta_lat) formula 2

[0079] Among them, latitude can represent the first latitude value or the second latitude value, lat_min represents the reference latitude value, dalta_lat represents the preset latitude value, and floor represents the rounding down operation. Therefore, the first latitude representation value is 39982, which is derived from floor((39.982566-0) / 0.001). The second latitude representation value is 39984, which is derived from floor((39.984900-0) / 0.001). Compared with 39.982566 and 39.984900, the first latitude representation value and the second latitude representation value expose less actual latitude information and are safer; at the same time, the first latitude representation value and the second latitude representation value with fewer digits can also increase the speed of subsequent identification matching. At this time, the rectangular area can be the splicing result of the first longitude representation value, the first latitude representation value, the second longitude representation value, and the second latitude representation value. For example, the identification of the rectangular area is 116306_39982#116309_39984.

[0080] The query range can also indicate a more precise area in the northern hemisphere and the eastern hemisphere: the eastern hemisphere area in the northern hemisphere east of 60 degrees east longitude and north of 2 degrees north latitude. Correspondingly, the base longitude value is 60 and the base latitude value is 2. Then, through the above formulas 1 and 2, we can get: the first longitude representation value is 56306, derived from floor((116.306159-60) / 0.001); the second longitude representation value is 56309, derived from floor((116.309023-60) / 0.001); the first latitude representation value is 37982, derived from floor((39.982566-2) / 0.001); the second latitude representation value is 37984, derived from floor((39.984900-2) / 0.001). It should be noted that due to the difference between east longitude and west longitude, and between south latitude and north latitude, a set of extreme longitude and latitude points involved in identification can refer to the base longitude value and base latitude value of the query range.

[0081] In practical applications, the first identifier of the rectangular area may include not only the first longitude representation value, the first latitude representation value, the second longitude representation value, and the second latitude representation value, but also the object type involved in the first geographic information query request. For example, the first identifier of the rectangular area is the fast food restaurant type #116306_39982#116309_39984. Of course, the first identifier of the rectangular area may also include other keywords.

[0082] S203: determining a target grid area matching the rectangular area based on the first identifier, and acquiring object information in the target grid area, wherein a second identifier corresponding to the target grid area matches the first identifier, and the target grid area is composed of at least one unit grid;

[0083] In an embodiment of the present application, the server side determines a target grid area that matches the rectangular area based on the first identifier, and obtains object information in the target grid area. Taking the case where the first identifier is identifier l and the second identifier is identifier m, identifier l matches identifier m, indicating that the similarity of the two identifiers is higher than the similarity threshold. The calculation of the similarity can be achieved by comparing the data of the same position item in the identifier. The object information in the target grid area can be obtained from the underlying data source. Compared with irregular and complex geographic fence areas, it is more convenient and efficient to determine the object information in the target grid area from the underlying data source. When judging whether the position of the object provided by the underlying data source is in the target grid area, the ray method, the corner method, etc. can be used.

[0084] In one embodiment, Figure 4 As shown, the server can obtain object information in the target grid area from the cache, including:

[0085] S401: Determine from a cache a second identifier that matches the first identifier, and determine that a grid area indicated by the second identifier is the target grid area;

[0086] S402: Acquire target object information associated with the second identifier from the cache, wherein the target object information is used to represent object information in the target grid area, and the cache stores multiple identifiers and object information associated with each identifier.

[0087] By applying the caching mechanism, the computing resources for processing geographic information query requests are saved, and the query efficiency of geographic information is improved. The cached data here can be used to obtain subsequent query results, which is conducive to improving the query speed. The location of cached data uses regional identifiers. In addition, the area involved in the cache is a grid area rather than a rectangular area (of course, in some cases a rectangular area can also be a grid area). The maintenance of cached data in the grid area dimension is conducive to improving the adaptability of related cached data to geographic fence areas of different shapes.

[0088] The cache stores multiple grid area identifiers, multiple geographic information query results, and multiple associations, each of which indicates a grid area identifier and a corresponding geographic information query result. These data can be stored in the cache in the form of a key-value pair, with the grid area identifier as the key and the geographic information query result as the value. For the grid area corresponding to the target identifier, the grids involved in the grid area are all fully covered unit grids, and can refer to the grid fence area in step S501 described later. The grid area identifier and geographic information query result involved in a key-value pair can be obtained by processing a historical geographic information query request, or by processing a test geographic information query request.

[0089] S204: Filtering object information in the geographic fence area from object information in the target grid area to obtain a first query result corresponding to the first geographic information query request.

[0090] In an embodiment of the present application, the server side filters out the object information in the geo-fence area from the object information in the target grid area, and obtains a first query result corresponding to the first geographic information query request. Taking into account the possible differences between the first identifier and the second identifier, and the possible differences between the target grid area and the geo-fence area, the object information in the target grid area is filtered, and then the object information that meets the location conditions is filtered out. The object information in the target grid area can be regarded as candidate object information. When determining whether the location of the object provided by the candidate object information is in the geo-fence area, the ray method, the angle method, etc. can be used. The first query result is the actual response result of the first geographic information query request. For the first geographic information query request sent by the relevant user to the server side through the client, after obtaining the first query result, the server side sends the first query result to the client.

[0091] like Figure 7As shown, if the first geographic information query request is used to request the total number of user type objects in the F area, the shape of the F area is a circle. The rectangular area indicates the minimum circumscribed rectangle of the F area, and the identifier of the rectangular area is the identifier q. The target identifier that matches the identifier q is the identifier p, and the shape of the grid area (such as the G area) corresponding to the identifier p is a rectangle. The grid area (such as the G area) has geographical similarity with the rectangular area, but there are still differences between the grid area (such as the G area) and the F area. Even if the grid area (such as the G area) is completely consistent with the rectangular area, due to the relationship between the circle and its minimum circumscribed rectangle, there are also differences between the grid area (such as the G area) and the F area. For example, there are Q user type objects in the G area, but P of the user type objects are not in the F area. The positions of the Q user type objects can be compared with the F area to determine whether the position falls into the F area, so as to filter out the user type objects in the F area, and then determine the total number of these user type objects. The screening process can use relevant geometric algorithms to determine the relationship between points and surfaces.

[0092] The following describes the situation where a target identifier that matches the identifier of the rectangular area is not found in the cache:

[0093] like Figure 4 , 5 As shown, after determining the target grid area matching the rectangular area based on the first identifier and acquiring the object information in the target grid area, the method further includes:

[0094] S501: when a target grid area matching the rectangular area is not determined in the cache based on the first identifier, and the rectangular area includes at least one first-type local grid, constructing a second geographic information query request indicating a grid fence area, the second geographic information query request is used to request to query object information in the grid fence area, the grid fence area is obtained based on the rectangular area and at least one second-type local grid, the first-type local grid and the second-type local grid constitute one unit grid;

[0095] S502: Processing the second geographic information query request by using a query engine and an underlying data source to obtain a second query result corresponding to the second geographic information query request;

[0096] S503: Filter out object information in the geographic fence area from the second query result to obtain a first query result corresponding to the first geographic information query request.

[0097] It can be understood that the target grid area matching the rectangular area is not found in the cache, which means that the cache data cannot be used to determine the query result. Combined with the relevant records in the aforementioned step S202, the grid involved in the rectangular area can be a fully covered unit grid or a partially covered unit grid. If the rectangular area is a partially covered unit grid, the rectangular area can be enlarged based on this to obtain a grid fence area. If the rectangular area includes unit grids 1-5, part of unit grid 6, and part of unit grid 7, then the grid fence area includes unit grids 1-7. The cache maintains object information in the grid area dimension, which means that the cache does not store object information in the grid fence area. Accordingly, a second geographic information query request is formed based on the grid fence area, and the request is intended to query object information in the grid fence area. The object information requested by the second geographic information query request and the object information requested by the first geographic information query request both indicate the same object type.

[0098] For the processing of the second geographic information query request, the query engine and the underlying data source are used instead of the cache, so that the second query result can be effectively obtained. Taking into account the difference between the grid fence area and the geographic fence area, the second query result is filtered to filter out the object information that meets the location conditions. The first query result is the actual response result of the first geographic information query request. This method can effectively obtain the first query result, and the second query result can also be used to cache the object information in the grid fence area in the future, so as to enrich the cached data and improve the efficiency of obtaining query results using cached data.

[0099] For the first geographic information query request sent by the relevant user to the server through the client, after obtaining the first query result, the server sends the first query result to the client. The filtering of the second query result here can refer to the filtering of the object information in the target grid area, which will not be repeated.

[0100] Furthermore, after using the query engine to process the second geographic information query request and obtaining the second query result corresponding to the second geographic information query request, the method may also include the following steps: first, establishing an association relationship between the first identifier and the second query result; and then, associating the first identifier and the second query result and storing them in the cache.

[0101] By continuing to use the first identifier of the rectangular area determined above and not redetermining the corresponding identifier for the grid fence area, it is possible to improve the identifier utilization rate, improve the writing efficiency of the cached data, and thus improve the speed of obtaining query results using the cached data in the future. Taking the first identifier as identifier q as an example, an association relationship between identifier q and the second query result is established. The identifier q, the second query result, and the association relationship are then written into the cache. The identifier q, the second query result, and the association relationship written into the cache can be stored in the cache in the form of a key-value pair, where the identifier q is the key and the second query result is the value. The cache maintains object information of the grid area dimension. For the same geographic fence area, the grid area is not smaller than the rectangular area. Such cached data contains more object information and can adapt to geographic information query requests indicating more geographic fence areas of different shapes.

[0102] In addition, the first identifier is obtained by the method in the aforementioned step S202 (using the aforementioned formulas 1-2), and the grid fence area includes a third vertex and a fourth vertex located on the same diagonal line. The method also includes determining the grid fence area: first, the longitude value of the third vertex is obtained based on the first longitude representation value, the reference longitude value and the preset longitude value, and the latitude value of the third vertex is obtained based on the first latitude representation value, the reference latitude value and the preset latitude value; then, the longitude value of the fourth vertex is obtained based on the second longitude representation value, the reference longitude value and the preset longitude value, and the latitude value of the fourth vertex is obtained based on the second latitude representation value, the reference latitude value and the preset latitude value; further, the grid fence area is obtained based on the longitude value and latitude value of the third vertex and the longitude value and latitude value of the fourth vertex.

[0103] The grid fence area includes all unit grids involved in the rectangular area. Here, a method of determining the grid fence area using the latitude and longitude representation values ​​included in the identifier is provided, and the grid fence area is quantified through numerical participation, thereby improving the convenience and efficiency of obtaining the grid fence area.

[0104] The longitude and latitude information of the first vertex and the second vertex represent a set of longitude and latitude extreme points of the minimum circumscribed rectangle of the geo-fenced area. The third vertex corresponds to the first vertex, and the fourth vertex corresponds to the second vertex. If the first vertex is the lower left corner point of the rectangular area, the third vertex is the lower left corner point of the unit grid where the lower left corner point is located; the second vertex is the upper right corner point of the rectangular area, and the fourth vertex is the upper right corner point of the unit grid where the upper right corner point is located. Taking the rectangular area in the northern hemisphere and the eastern hemisphere as an example, the query range can indicate the northern hemisphere and the eastern hemisphere, the base longitude value can be 0, and the base latitude value can be 0. The first longitude representation value is 116306, the second longitude representation value is 116309, the first latitude representation value is 39982, and the second latitude representation value is 39984. The preset longitude (latitude) value is the longitude (latitude) range corresponding to the side length of the unit grid. In practical applications, the unit grid often uses an equally divided longitude and latitude grid. When the side length is 100 meters, the corresponding longitude (latitude) value is 0.001.

[0105] The longitude value of the third vertex and the longitude value of the fourth vertex can be calculated by the following formula:

[0106] longitude=lng_min+grid_x*delta_lng formula three

[0107] Among them, longitudinal can represent the longitude value of the third vertex or the longitude value of the fourth vertex, lng_min represents the reference longitude value, and delta_lng represents the preset longitude value. Therefore, the longitude value of the third vertex is 116.306, which is derived from 0+116306*0.001. The longitude value of the fourth vertex is 116309, which is derived from 0+116309*0.001.

[0108] The latitude value of the third vertex and the latitude value of the fourth vertex can be calculated by the following formula:

[0109] latitude=lat_min+grid_y*delat_lat formula four

[0110] Among them, latitude can represent the latitude value of the third vertex or the latitude value of the fourth vertex, grid_y represents the first latitude representation value or the second latitude representation value. lat_min represents the reference latitude value, and delat_lat represents the preset latitude value. Therefore, the latitude value of the third vertex is 39.982, which is derived from 0+39982*0.001. The latitude value of the fourth vertex is 39.984, which is derived from 0+39984*0.001. The grid fence area can be determined by the longitude and latitude values ​​of the third and fourth vertices. Taking into account factors such as the accuracy of the longitude and latitude values, the longitude and latitude values ​​of the third and fourth vertices obtained here may be different from the actual longitude and latitude values, but this way of obtaining is more convenient and efficient, and can take into account both accuracy and efficiency.

[0111] In practical applications, the longitude and latitude of the fourth vertex can also be calculated by the following formulas 5 and 6, which can ensure that the grid fence area is the result of the expansion of the rectangular area:

[0112] longitude=lng_min+(grid_x+1)*delta_lng Formula 5

[0113] latitude=lat_min+(grid_y+1)*delat_lat Formula 6

[0114] Therefore, the longitude value of the fourth vertex is 116310, which is derived from 0+1(16309+1)*0.001. The latitude value of the fourth vertex is 39.985, which is derived from 0+(39984+1)*0.001.

[0115] like Figure 5 As shown, the following will specifically introduce the geographic information query solution provided by the embodiment of the present application with a specific geographic information query request:

[0116] 1) The query condition provided by the geographic information query request is to search for "M brand fast food restaurant" in the area {[39.984900, 116.307446], [39.983314, 116.306159], [39.982566, 16.307017], [39.983988, 116.309023]}. This area corresponds to the above-mentioned geographic fence area. The object information requested by the geographic information query request indicates the type of "M brand fast food restaurant".

[0117] 2) The above coordinates involved in the geo-fenced area can be traversed, and then the extreme points of longitude and latitude are determined, and then the minimum enclosing rectangle of the geo-fenced area is determined. The determined extreme points of longitude and latitude include: the maximum longitude value 116.309023, the maximum latitude value 39.984900, the minimum longitude value 116.306159, and the minimum latitude value 39.982566. Determine the rectangular area where the minimum enclosing rectangle is located on the preset map. The first vertex is the lower left corner point of the rectangular area (39.982566, 116.306159), and the second vertex is the upper right corner point of the rectangular area (39.984900, 116.309023).

[0118] 3) Using the method in step S202 above (using the above formulas 1-2), determine the first identifier of the rectangular area: "M brand fast food restaurant" type #116306_39982#116309_39984. The first identifier can be used as a key for cached data.

[0119] 4) Search in the local cache using the first identifier. The local cache maintains object information of the grid area dimension, and the cache data is stored in the local cache in the form of key-value pairs. The local cache can use an in-memory kv database, such as redis.

[0120] 4.1) If a second identifier matching the first identifier is found in the local cache, the grid area indicated by the second identifier is determined to be the target grid area, and the target object information associated with the second identifier is obtained from the local cache, the target object information being used to characterize the object information in the target grid area. Then, the object information in the geo-fenced area is filtered out from the object information in the target grid area to obtain the query result corresponding to the geographic information query request.

[0121] 4.2) If the second identifier matching the first identifier is not found in the local cache, a new geographic information query request is constructed using the first identifier. Specifically, it may include: using the aforementioned formulas three to six to determine the grid fence area, the third vertex is the lower left corner point of the rectangular area (39.982, 116.306), and the fourth vertex is the upper right corner point of the rectangular area (39.985, 116.310); then construct a new geographic information query request for the grid fence area. Of course, the object information queried in the request also indicates the "M brand fast food restaurant" type.

[0122] The request is processed using the underlying search engine to obtain the query result of the request. Then, the local cache is stored using the above-mentioned first identifier ("M Brand Fast Food Restaurant" type#116306_39982#116309_39984) as the key and the query result as the value, thereby updating the local cache. Next, a second identifier matching the first identifier is found in the updated local cache. At this time, the second identifier is "M Brand Fast Food Restaurant" type#116306_39982#116309_39984. The target object information associated with the second identifier (i.e., the query result obtained using the underlying search engine) indicates the grid fence area, and the object information in the geographic fence area is filtered out from the object information in the grid fence area to obtain the query result corresponding to the geographic information query request.

[0123] The location of cached data uses regional identification, converts the geographic fence area into a rectangular area, and uses the latitude and longitude information of the unit grid and the latitude and longitude extreme points of the rectangular area to determine the identification of the rectangular area. Such identification can provide geographic semantic information, which is conducive to determining the geographic similarity of the areas corresponding to the two identifications based on the similarity of the two identifications, thereby providing support for the use of identification to locate cached data

[0124] It can be seen from the technical solution provided by the above embodiments of the present application that the embodiments of the present application utilize the target grid area to recall candidate object information, and then filter the candidate object information to obtain object information in the geographic fence area, and then obtain the query result. Taking into account the possible existence of irregularly shaped and complex fences, the target grid area has a regular shape, and the number of vertices and edges is fixed. Using the target grid area to recall candidate objects can reduce the difficulty of calculation, reduce the consumption of computing resources, and increase the calculation speed. At the same time, using the target grid area to recall candidate object information provides a smaller screening range for obtaining query results, and then accurate and reliable query results are obtained by comparing with the geographic fence area. In this way, the accuracy and efficiency of geographic information queries can be taken into account, and it has a high adaptability to query requests involving irregularly shaped and complex fences.

[0125] The present application also provides a geographic information query device, such as Fig. 9 As shown, the geographic information query device 90 includes:

[0126] Acquisition module 901: used to acquire a first geographic information query request, the first geographic information query request carries a geographic fence area, and the first geographic information query request is used to request to query object information in the geographic fence area;

[0127] Rectangular area determination module 902: used to determine a rectangular area corresponding to the geo-fenced area and a first identifier indicating the rectangular area, the rectangular area matches the circumscribed rectangle of the geo-fenced area, the rectangular area is located on a preset map, and the preset map is divided into a plurality of unit grids;

[0128] A grid area determination module 903 is configured to determine a target grid area matching the rectangular area based on the first identifier, and obtain information about objects in the target grid area, wherein the second identifier corresponding to the target grid area matches the first identifier, and the target grid area is composed of at least one unit grid;

[0129] Result acquisition module 904: used to filter out object information in the geo-fenced area from object information in the target grid area, and obtain a first query result corresponding to the first geographic information query request

[0130] It should be noted that the device in the device embodiment and the method embodiment are based on the same inventive concept.

[0131] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.

[0132] The embodiment of the present application also provides a computer-readable storage medium, wherein at least one instruction or at least one program is stored in the computer-readable storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above method. The computer-readable storage medium may be a non-volatile computer-readable storage medium.

[0133] An embodiment of the present application also provides an electronic device, which includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the at least one processor to implement the above method.

[0134] The electronic device may be provided as a terminal, a server, or a device in other forms.

[0135] Fig.10 1 shows a block diagram of an electronic device according to an embodiment of the present application. For example, the electronic device 1900 can be provided as a server. Fig.10 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0136] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, FreeBSD TM or the like.

[0137] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.

[0138] The present application may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present application.

[0139] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0140] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0141] The computer program instructions for performing the operation of the present application can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C+, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of computer-readable program instructions to personalize electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (PLAs), the electronic circuits can execute computer-readable program instructions, thereby realizing various aspects of the present application.

[0142] Various aspects of the present application are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0143] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0144] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0145] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present application. In this regard, each square frame in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the above-mentioned module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the standard function in the square frame can also occur in a sequence different from the standard in the accompanying drawings. For example, two continuous square frames can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square frame in the block diagram and / or flow chart, and the combination of the square frames in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0146] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A geographic information query method, characterized in that: The method comprises: Obtaining a first geographic information query request, the first geographic information query request carrying a geographic fence area, the first geographic information query request being used to request querying object information in the geographic fence area; Determine a rectangular area corresponding to the geo-fenced area, and determine a first identifier indicating the rectangular area, the rectangular area matches a circumscribed rectangle of the geo-fenced area, the rectangular area is located on a preset map, and the preset map is divided into a plurality of unit grids; Determine a target grid area matching the rectangular area based on the first identifier, and obtain object information in the target grid area, wherein the second identifier corresponding to the target grid area matches the first identifier, and the target grid area is composed of at least one unit grid; The object information in the geographic fence area is filtered out from the object information in the target grid area to obtain a first query result corresponding to the first geographic information query request.

2. The method according to claim 1, characterized in that The determining of a first identifier indicating the rectangular area includes: Determine a first vertex and a second vertex of the rectangular area, wherein the first vertex and the second vertex are located on the same diagonal line; The first identifier is obtained based on the longitude and latitude information of each of the first vertex and the second vertex and the longitude and latitude information of the unit grid, where the longitude and latitude information of the unit grid is used to characterize the correspondence between the side length of the unit grid and the preset longitude and latitude values.

3. The method according to claim 2, characterized in that The longitude and latitude information of the first vertex includes a first longitude value and a first latitude value, the longitude and latitude information of the second vertex includes a second longitude value and a second latitude value, and obtaining the first identifier based on the longitude and latitude information of the first vertex and the second vertex and the longitude and latitude information of the unit grid includes: Determine a query range to which the geo-fenced area belongs, and a base longitude value and a base latitude value of the query range; Obtaining a first longitude representation value based on the first longitude value, the reference longitude value, and a preset longitude value corresponding to the side length, and obtaining a first latitude representation value based on the first latitude value, the reference latitude value, and a preset latitude value corresponding to the side length; Obtaining a second longitude representation value based on the second longitude value, the reference longitude value and the preset longitude value, and obtaining a second latitude representation value based on the second latitude value, the reference latitude value and the preset latitude value; The first identifier is obtained based on the first longitude representation value, the first latitude representation value, the second longitude representation value, and the second latitude representation value.

4. The method according to claim 1, characterized in that: The determining, based on the first identifier, a target grid area matching the rectangular area, and acquiring object information in the target grid area includes: Determine from the cache a second identifier that matches the first identifier, and determine that the grid area indicated by the second identifier is the target grid area; The target object information associated with the second identifier is obtained from the cache, where the target object information is used to represent object information in the target grid area. The cache stores multiple identifiers and object information associated with each identifier.

5. The method according to claim 4, characterized in that After determining the target grid area matching the rectangular area based on the first identifier and acquiring the object information in the target grid area, the method further includes: In a case where a target grid area matching the rectangular area is not determined in the cache based on the first identifier, and the rectangular area includes at least one first-type local grid, constructing a second geographic information query request indicating a grid fence area, the second geographic information query request being used to request information of objects in the grid fence area, the grid fence area being obtained based on the rectangular area and at least one second-type local grid, the first-type local grid and the second-type local grid constituting one unit grid; Processing the second geographic information query request using a query engine and an underlying data source to obtain a second query result corresponding to the second geographic information query request; The object information in the geographic fence area is filtered out from the second query result to obtain the first query result corresponding to the first geographic information query request.

6. The method according to claim 5, characterized in that After the query engine is used to process the second geographic information query request and a second query result corresponding to the second geographic information query request is obtained, the method further includes: Establishing an association relationship between the first identifier and the second query result; The first identifier and the second query result are associated and stored in the cache.

7. The method according to claim 5, characterized in that The first identifier is obtained by using the geographic information query method according to claim 3, the grid fence area includes a third vertex and a fourth vertex located on the same diagonal line, and the method further includes determining the grid fence area: Obtaining the longitude value of the third vertex based on the first longitude representation value, the reference longitude value and the preset longitude value, and obtaining the latitude value of the third vertex based on the first latitude representation value, the reference latitude value and the preset latitude value; Obtaining the longitude value of the fourth vertex based on the second longitude representation value, the reference longitude value and the preset longitude value, and obtaining the latitude value of the fourth vertex based on the second latitude representation value, the reference latitude value and the preset latitude value; The grid fence area is obtained based on the longitude value and the latitude value of the third vertex and the longitude value and the latitude value of the fourth vertex.

8. The method according to claim 1, characterized in that The obtaining of the first geographic information query request includes: receiving a surrounding search request, wherein the surrounding search request carries an anchor point location, a preset distance, and an object of interest type; Determine the geographic fence area with the anchor point location as the search center and the preset distance as the search radius; The first geographic information query request is obtained based on the geo-fenced area and the object of interest type.

9. The method according to claim 1, characterized in that: The obtaining of the first geographic information query request includes: Receive a region search request, where the region search request is generated by triggering a target object through a target application, and the region search request is used to request information about an object in an anchor region, where the anchor region indicates a map region currently displayed on an interactive interface of the target application; It is determined that the area search request is the first geographic information query request and the anchor point area is the geographic fence area.

10. A geographic information query device, characterized in that: The device comprises: An acquisition module: used to acquire a first geographic information query request, wherein the first geographic information query request carries a geographic fence area, and the first geographic information query request is used to request to query information of objects in the geographic fence area; A rectangular area determination module: used to determine a rectangular area corresponding to the geo-fenced area and a first identifier indicating the rectangular area, the rectangular area matches a circumscribed rectangle of the geo-fenced area, the rectangular area is located on a preset map, and the preset map is divided into a plurality of unit grids; A grid area determination module: used to determine a target grid area matching the rectangular area based on the first identifier, and to obtain object information in the target grid area, wherein the second identifier corresponding to the target grid area matches the first identifier, and the target grid area is composed of at least one unit grid; Result acquisition module: used for filtering object information in the geographic fence area from object information in the target grid area, and obtaining a first query result corresponding to the first geographic information query request.

11. An electronic device, characterized in that: The electronic device includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the at least one processor to implement the geographic information query method as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the geographic information query method as described in any one of claims 1-9.

Citation Information

Cited By

  • Statistical method and system for vehicles in shared vehicle electronic fence

    CN121304303A