Keyword-based spatial range determination method and device, storage medium and electronic equipment
By using keywords to match points of interest and determine the target space range in the electronic map system, the problem of inability to retrieve unmarked location data is solved, satisfying diverse query needs and improving query efficiency.
Patent Information
- Application Number
- CN202410804596.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-10
AI Technical Summary
The existing electronic map system cannot effectively retrieve location data that has not been pre-marked, resulting in user queries being fruitless and unable to meet diverse query needs.
By matching multiple points of interest with the keywords entered by the user, the target space range is determined, and marked on the map display page to achieve retrieval of unmarked location data.
It realizes the determination of the spatial range of diverse keywords without relying on manual labeled data, meets the different spatial range search needs of different users, and improves the query efficiency and accuracy of the electronic map system.
Smart Images

Figure CN118626735A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent equipment technology, and in particular to a keyword-based spatial range determination method, device, storage medium and electronic device. Background Art
[0002] With the development and promotion of electronic maps, electronic systems can provide functions such as map browsing, location search, and road planning, which provide convenience for users' travel. Location search is a common function on electronic maps. Users can enter address keywords in the search box to retrieve location data matching the keywords in the database, such as restaurants, communities, buildings, scenic spots, and other location points.
[0003] In the process of implementing the present invention, it is found that there are at least the following technical problems in the prior art: electronic maps can only search for existing location data, and cannot return search results for location data that is not pre-marked. In particular, for a spatial area corresponding to a keyword, if the spatial area is not pre-marked, the search will be fruitless, and the user's query needs cannot be met. Summary of the invention
[0004] The present invention provides a keyword-based spatial range determination method, device, storage medium and electronic device, so as to infer the spatial range corresponding to the keyword according to the keyword queried by the user and display it to the user to meet the user's diverse query needs.
[0005] According to one aspect of the present invention, there is provided a method for determining a spatial range based on a keyword, comprising: in response to a search operation for a keyword, determining a point of interest matching the keyword;
[0006] Determine the target spatial range corresponding to the keyword based on the point of interest;
[0007] A map display page is displayed, wherein the target space range in the map display page is marked.
[0008] Optionally, determining the point of interest matching the keyword includes:
[0009] The keyword is matched with multi-dimensional information of multiple location points respectively; when at least one dimensional information of any location point satisfies a matching condition with the keyword, the location point is determined as a point of interest matching the keyword.
[0010] Optionally, after determining the point of interest matching the keyword, the method further includes:
[0011] Noise points among the interest points are determined, and the noise points are removed from the interest points.
[0012] Optionally, determining the noise point in the interest point includes:
[0013] The interest points are traversed to determine the minimum distance between each interest point and other interest points; noise points are determined for each interest point based on the minimum distance corresponding to each interest point to obtain noise points in the interest point.
[0014] Optionally, determining the target space range corresponding to the keyword based on the point of interest includes:
[0015] An initial spatial range is determined based on the plurality of interest points, where the initial spatial range is the maximum spatial range formed by the lines between the plurality of interest points; the initial spatial range is updated based on the road network information to obtain a target spatial range corresponding to the keyword.
[0016] Optionally, the updating the initial spatial range based on the road network information to obtain the target spatial range corresponding to the keyword includes:
[0017] The initial spatial range is divided into blocks based on the road network information to obtain a plurality of blocks corresponding to the initial spatial range, each of the blocks spatially overlaps with the initial spatial range; a spatial overlap rate is determined for each of the blocks, and a target block is determined based on the spatial overlap rate determination result of each of the blocks, and the target blocks constitute the target spatial range.
[0018] Optionally, the determining of the spatial overlap rate of each of the blocks includes:
[0019] A spatial index is established for the multiple blocks, and a first block and a second block are determined based on the spatial index, wherein the first block is a block that partially spatially overlaps with the initial spatial range, and the second block is a block that fully spatially overlaps with the initial spatial range; the second block is set as the target block, and the spatial overlap rate of the first block is determined.
[0020] Optionally, the method for generating the map display page includes: generating a target space layer corresponding to the target space range, superimposing the target space layer on an original layer corresponding to the map data, and generating the map display page.
[0021] According to another aspect of the present invention, there is provided a device for determining a spatial range based on keywords, comprising:
[0022] An interest point matching module, configured to determine, in response to a search operation on a keyword, an interest point matching the keyword;
[0023] A target space range determination module, used to determine the target space range corresponding to the keyword based on the point of interest;
[0024] The display module is used to display a map display page, and the target space range in the map display page is set with a mark.
[0025] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0026] at least one processor; and
[0027] a memory communicatively connected to the at least one processor; wherein,
[0028] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the keyword-based spatial range determination method described in any embodiment of the present invention.
[0029] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the keyword-based spatial range determination method described in any embodiment of the present invention when executed.
[0030] The technical solution of the embodiment of the present invention receives keywords input by users, searches for multiple points of interest matching the keywords in the known data of the electronic map, determines the target spatial range including the above points of interest based on the multiple points of interest, and displays the target spatial range in a map display page. The process of determining the target spatial range corresponding to the keyword does not rely on manually marked data, and can achieve the determination of the spatial range of diverse keywords, meeting the search needs of different users for different spatial ranges.
[0031] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0033] Figure 1 is a flow chart of a method for determining a spatial range based on keywords provided by an embodiment of the present invention;
[0034] Figure 2 is a schematic diagram of points of interest provided by an embodiment of the present invention;
[0035] Figure 3 is a schematic diagram of an initial spatial range provided by an embodiment of the present invention;
[0036] Figure 4 is a block diagram provided by an embodiment of the present invention;
[0037] Figure 5 is a schematic diagram of a target space range provided by an embodiment of the present invention;
[0038] Figure 6 It is a schematic diagram of a search process for a target spatial range corresponding to a keyword provided by an embodiment of the present invention;
[0039] Figure 7 is a schematic structural diagram of a keyword-based spatial range determination device provided by an embodiment of the present invention;
[0040] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0042] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0043] Figure 1This is a flowchart of a keyword-based spatial range determination method provided by an embodiment of the present invention. This embodiment can be applied to display the spatial range corresponding to the keyword according to the keyword queried by the user. The method can be executed by a keyword-based spatial range determination device. The keyword-based spatial range determination device can be implemented in the form of hardware and / or software. The keyword-based spatial range determination device can be configured in electronic devices such as mobile phones, tablet computers, computers, etc. Figure 1 As shown, the method includes:
[0044] S110. In response to a search operation on a keyword, determine points of interest matching the keyword.
[0045] S120: Determine a target spatial range corresponding to the keyword based on the point of interest.
[0046] S130: Display a map display page, wherein the target space range in the map display page is marked.
[0047] The application program interface of the electronic map includes a map display area and a search control. The search control may be an information input box, through which a keyword input by a user is obtained; the search control may be a voice input control, through which audio information input by a user is collected and converted into text as a keyword. By determining the target spatial range corresponding to the keyword, a map display page including the target spatial range is displayed in the map display area, and the target spatial range is highlighted in the map display page to distinguish the area outside the target spatial range, so as to facilitate displaying the target spatial range to the user.
[0048] The keyword input by the user is matched with the known location points in the electronic map, and the location points that successfully match the keyword are determined as the points of interest corresponding to the keyword. The relevant information of the known location points in the electronic map may be stored in a database, and the database may be updated in real time, for example, when a location point information update request is received, the location point information in the database is updated in response to the location point information update request; or, when a location point information change is detected, the location point information in the database is updated.
[0049] The database may store multi-dimensional information of each location point, wherein the multi-dimensional information includes but is not limited to the location point name and address information. Taking the location point as a restaurant as an example, the name of the location point may be XX Restaurant, and the address information of the location point may be No. D, Street C, District B, Province A. Different dimensional information includes different information, and maintaining the multi-dimensional information of the location point in the database facilitates improving the retrieval accuracy of the point of interest.
[0050] Optionally, determining the point of interest that matches the keyword includes: matching the keyword with multi-dimensional information of multiple location points respectively; when at least one dimensional information of any of the location points meets a matching condition with the keyword, determining the location point as the point of interest that matches the keyword.
[0051] Match the keywords with the multi-dimensional information of the location point respectively, and determine whether the above keywords are included in each dimensional information of the location point. If the above keywords are included in any dimensional information of the location point, it is determined that the dimensional information and the keyword meet the matching conditions. If the information of at least one dimension of the multiple dimensions of a location point meets the matching conditions with the keyword, the location point is determined as the point of interest corresponding to the keyword. For all the location points in the database corresponding to the electronic map, match the multi-dimensional information with the keywords respectively, and determine the points of interest that match the keywords. If the points of interest matched by the keyword are empty, a prompt message is generated and displayed on the application interface of the electronic map. The content of the prompt message may be that the location point corresponding to the keyword has not been retrieved.
[0052] The number of points of interest that a keyword matches can be at least one, see Figure 2 , Figure 2 Schematic diagram of points of interest provided by an embodiment of the present invention. Figure 2 The points of interest matched by the keyword include p1, p2...p10. In an optional embodiment, the keyword is matched with one or more of the location point names and location point address information of multiple location points. If the location point name includes the above keyword and / or the location point address information includes the above keyword, the location point is determined to be a point of interest. For example, if the point of interest is mm, the corresponding points of interest matched may be mm restaurant, mm community, mm bus station, n community, where the address information of n community may be mm street n community. It is understandable that Figure 2 The small and medium circles represent an interest point. Taking the mm cell as an example, the location center point of the mm cell can be set as the interest point.
[0053] In this embodiment, the keyword-based search may include an interest point search mode and a spatial range search mode, and the search mode is determined by determining the keyword. If the search mode is an interest point search mode, multiple interest points corresponding to the keyword are displayed on the map display page; if the search mode is a spatial range search mode, the target spatial range corresponding to the keyword is determined based on the multiple interest points corresponding to the keyword, and the target spatial range is displayed on the map display page.
[0054] Optionally, a word library is maintained in advance, and the word library includes a plurality of pre-set interest point search keywords. The keywords input by the user are matched in the word library. If the match is successful, the search mode of the keyword is the interest point search mode. If the match fails, the search mode of the keyword is the spatial range search mode. Exemplarily, the word "bank" may be included in the word library as the interest point search keyword. If the keyword input by the user is xx bank, it is determined that xx bank matches the interest point search keyword "bank", and the search mode corresponding to the keyword xx bank is determined to be the interest point search mode. It is understandable that the interest point search keywords in the word library can be edited, such as adding, deleting, modifying, etc., to optimize the word library and improve the accuracy of the search mode determination of the input keyword.
[0055] Optionally, the search mode is determined based on the matched points of interest. For example, the search mode may be determined based on the distance between the points of interest, and the minimum distance between the points of interest is determined. If the minimum distance between the points of interest is greater than the first preset distance, the search mode is determined to be the point of interest search mode; if the minimum distance between the points of interest is less than the first preset cluster, the search mode is determined to be the spatial range search mode. For example, multiple points of interest may be clustered based on the clustering between the points of interest. If the multiple points of interest belong to the same class, the search mode is determined to be the spatial range search mode; if the clustering results of the multiple points of interest are at least two classes, the class center distance between the two classes is determined. If the class center distance is greater than the second preset distance, the search mode is determined to be the point of interest search mode. If the class center distance is less than the second preset distance, the search mode is determined to be the spatial range search mode.
[0056] Optionally, the search mode is determined based on the number of points of interest. When the number of points of interest is greater than or equal to 3 and at least three points of interest are not collinear, the search mode is determined to be a spatial range search mode, and the target spatial range corresponding to the keyword is determined based on multiple points of interest. When the number of points of interest is less than or equal to 2, the search mode is determined to be a point of interest search mode, and the points of interest are displayed.
[0057] In the case of the spatial range search mode, in order to improve the accuracy of the interest point, noise point recognition is performed on the matched interest point, the noise point in the interest point is determined, and the noise point is removed from the interest point, wherein the noise point may be a position point far away from the concentrated area where the interest point is located. By removing the noise point, the interference of the noise point is reduced.
[0058] The noise point can be determined by comparing the distances between multiple interest points, and if the distance between a certain interest point and other interest points meets a preset determination condition, the interest point is determined to be a noise point. For example, the preset determination condition can be that the average distance between the interest point and other interest points is much larger than the average distance between other interest points; for example, the preset determination condition can be that the minimum distance between the interest point and other interest points is much larger than the minimum distance between other interest points.
[0059] Optionally, determining the noise points in the points of interest includes: traversing the points of interest to determine the minimum distance between each of the points of interest and other points of interest; performing noise point determination on each of the points of interest based on the minimum distance corresponding to each of the points of interest to obtain the noise points in the points of interest. Obtaining coordinate data of the points of interest from a database, the coordinate data may be the center coordinate data of the location point. For any point of interest, determining the distance between the point of interest and other points of interest in turn based on the coordinate data of the point of interest, and comparing the above multiple distances to determine the minimum distance corresponding to the point of interest. Forming a minimum distance set based on the minimum distance corresponding to each point of interest.
[0060] In the minimum distance set, a noise point determination is performed on each point of interest based on the minimum distance corresponding to each point of interest, and it is determined whether the minimum distance corresponding to each point of interest meets the preset determination condition. The preset determination condition here may be that the minimum distance corresponding to the point of interest is much larger than the minimum distances corresponding to other points of interest, for example, the minimum distance corresponding to the point of interest is greater than the preset multiple of the minimum distances corresponding to other points of interest. Specifically, for the first minimum distance corresponding to any point of interest, a second minimum distance smaller than the first minimum distance corresponding to the point of interest is determined in the minimum distance set. If there is no second minimum distance, it is determined that the point of interest is not a noise point. In the case of a second minimum distance, a maximum value is determined in at least one second minimum distance, recorded as the third minimum distance, and it is determined whether the first minimum distance and the third minimum distance meet the preset determination condition, that is, whether the first minimum distance is much larger than the third minimum distance. If the first minimum distance is much larger than the third minimum distance, it is determined that the point of interest is a noise point. If the first minimum distance is not much larger than the third minimum distance, it is determined that the point of interest is not a noise point. Among them, the judgment method of "much larger than" may be whether the first minimum distance is greater than the preset multiple of the third minimum distance, for example, the preset multiple may be 3. Exemplarily, for Figure 2 The interest point p10 in the image, the minimum distance d10 between the interest point p10 and other interest points, the maximum value d2 among the second minimum distances less than d10 (i.e., the minimum distance corresponding to the interest point p2), if d10>3d2, the interest point p10 is determined to be a noise point.
[0061] Based on the above determination method, each point of interest is determined as a noise point, and the points of interest that are not noise points are added to the set of points of interest to obtain a set of target points of interest. Figure 2 p10 in is a noise point. The noise points are removed from the interest point set, and the target space range corresponding to the keyword is determined based on the remaining interest points.
[0062] The target spatial range is a spatial range that includes multiple points of interest. By matching multiple consistent points of interest corresponding to keywords in the database corresponding to the electronic map and forming a target spatial range based on the points of interest, customized spatial retrieval of users based on known data can be achieved to meet the user's diverse spatial query needs without relying on and being limited to manual area marking of electronic maps.
[0063] In some embodiments, the target spatial range may be determined by determining the maximum spatial range composed of multiple points of interest as the target spatial range. For example, the minimum circumscribed rectangle or the minimum circumscribed circle of multiple points of interest may be used as the target spatial range. For example, it may also be a convex hull area formed by multiple points of interest, and the convex hull area is determined as the target spatial range. For example, it may also be based on road network information to determine the minimum road network outline including multiple points of interest, and the spatial range within the minimum road network outline is determined as the target spatial range. Among them, the road network information is the road network data formed by the roads in the electronic map, and the road network information may include urban main roads, highways and national highways. Determine the road where each point of interest is located or the adjacent road of the point of interest, and the closed road network information that can include multiple points of interest formed based on the above roads can be used as the minimum road network outline.
[0064] In some embodiments, determining the target spatial range corresponding to the keyword based on the interest points includes: determining an initial spatial range based on multiple interest points, the initial spatial range being the maximum spatial range formed by the lines between the multiple interest points; and updating the initial spatial range based on road network information to obtain the target spatial range corresponding to the keyword.
[0065] The initial spatial range corresponding to the interest point may be a convex hull range formed based on the interest point, such as a convex polygonal area including multiple interest points. Figure 3 , Figure 3 is a schematic diagram of the initial spatial range provided by an embodiment of the present invention. Figure 2On the basis of, the point of interest p10 is determined to be a noise point, the noise point is removed, and the initial spatial range is formed based on the interest point set {p1, p2...p9}. Among them, the convex hull range is a spatial range calculated based on multiple interest points, the convex hull range includes all interest points, and the lines connecting any two interest points are within the convex hull range. Among them, the convex hull range can be generated based on the Graham scanning method and the Andrew algorithm, which is not limited here. Exemplarily, the process of forming the convex hull range can be: traversing each interest point, determining multiple lines between the interest point and other interest points, retaining the outermost connections among the multiple lines, forming a convex hull contour with the included lines, and the range within the convex hull contour is the convex hull range.
[0066] like Figure 3 The convex hull range shown is composed of the lines between the interest points, which may pass through a complete area, resulting in an uneven convex hull range and inaccurate spatial range. The initial spatial range is optimized through the road network information to obtain the target spatial range, improve the matching degree between the target spatial range and the road network information, and further improve the accuracy of the target spatial range.
[0067] In some embodiments, the updating of the initial spatial range based on the road network information may be based on replacing the contour line of the initial spatial range (i.e., the line between the points of interest) with the road. For example, the contour line of the initial spatial range may be replaced by the adjacent road based on the contour line of the initial spatial range, and the spatial range within the updated contour line (i.e., the road) may be used as the target spatial range. For the line (i.e., the local contour) between any point of interest and other points of interest, a first adjacent road and a second adjacent road outside the initial spatial range may be determined within the initial spatial range. The adjacent road may be a road or a combination of multiple roads. With the local contour p1-p2-p3, the adjacent road may be a combination of a straight road between p1p3 and a road formed by multiple roads from p1 to p2 to p3 outside the initial spatial range. By determining the overlap ratio between the local area corresponding to p1, p2, and p3 in the initial spatial range (e.g., the triangular area formed by p1, p2, and p3) and the block where p1, p2, and p3 are located, the block where p1, p2, and p3 are located is the smallest area block (e.g., the minimum area block including p1, p2, and p3) obtained by spatial segmentation by the road network information. Figure 2 If the overlap ratio is less than the preset ratio threshold, the first adjacent road in the initial spatial range is selected to replace the original local contour. If the overlap ratio is greater than or equal to the preset ratio threshold, the second adjacent road outside the initial spatial range is selected to replace the original local contour. If the local contour overlaps with the road, no update is required. The contour line of the initial spatial range is updated to obtain a new contour line. The spatial range within the new contour line is the target spatial range.
[0068] In some embodiments, the initial spatial range is updated based on the road network information to obtain the target spatial range corresponding to the keyword, including: dividing the initial spatial range into blocks based on the road network information to obtain multiple blocks corresponding to the initial spatial range, each of the blocks spatially overlapping with the initial spatial range; determining the spatial overlap rate of each block, and determining the target block based on the spatial overlap rate determination result of each block, and the target blocks constitute the target spatial range.
[0069] Here, the road network information may include road information in an electronic map, for example, road information corresponding to the initial spatial range, where the road information such as urban trunk roads, expressways and national highways is filtered to remove interference such as pedestrian paths in residential areas. The initial spatial range is divided into blocks based on polygonization technology and road network information, and each block is a spatial range bounded by a road. For example, see Figure 4 , Figure 4 It is a block diagram provided by an embodiment of the present invention. Figure 4 The block set corresponding to the initial spatial range in may be B = {B1, B2, B3, B4}. It can be understood that Figure 4 As just one example, the size of the number of blocks may vary depending on the keyword.
[0070] After the road network information is divided into blocks, multiple blocks can be obtained, among which the local blocks can be located within the initial spatial range, and the local blocks can overlap with the initial spatial range. In order to ensure the comprehensiveness of block collection, the blocks that overlap with the initial spatial range are determined as multiple blocks corresponding to the initial spatial range and added to the above block set. In order to improve the accuracy of the target spatial range, multiple blocks in the block set are judged in turn to identify the target block, remove the blocks that do not meet the judgment conditions, and form the target spatial range based on the target block.
[0071] Optionally, traverse each block in the block set and determine the spatial overlap rate of each block, wherein the spatial overlap rate of the block is the overlap ratio of the block to the initial spatial range. The spatial overlap rate of the block can be ri=Area(Intersection(Sg, Bi)) / Area(Bi), Sg is the initial spatial range, Bi is the block i, Intersection means calculating the intersection of two geometries, and Area means calculating the area. Compare the spatial overlap rate of the block with the preset overlap threshold. If the spatial overlap rate of the block is greater than or equal to the preset overlap threshold, the block is the target block. If the spatial overlap rate of the block is less than the preset overlap threshold, the block is not the target block. Exemplarily, the preset overlap threshold can be 60%, which can be set according to demand.
[0072] by Figure 4 For example, the spatial overlap ratios of B1, B2, B3, and B4 are calculated and determined respectively. The spatial overlap ratio of B3 is less than the preset overlap threshold, and the spatial overlap ratios of B1, B2, and B4 are greater than or equal to the preset overlap threshold. It can be seen that B1, B2, and B4 are target blocks. The target blocks are merged to form an overall spatial range, which is the target spatial range. Figure 5 , Figure 5 It is a schematic diagram of the target space range provided by an embodiment of the present invention.
[0073] On the basis of the above embodiment, the number of blocks in the block set is large, and the spatial overlap rate of each block is determined one by one, resulting in a large amount of calculation for the block determination process and a long time consumption. In view of the above problem, the blocks to be determined and the blocks that do not need to be determined are determined in a large number of blocks, and the determination process is only performed on the blocks to be determined. The blocks that do not need to be determined can be directly determined as target blocks without executing the determination process. The blocks to be determined are local in the block set, which reduces the number of blocks to be determined and speeds up processing efficiency. Among them, the blocks to be determined are blocks that have a partial spatial overlap with the initial spatial range, and the blocks that do not need to be determined can be blocks that overlap with the entire spatial range of the initial spatial range.
[0074] Optionally, determining the spatial overlap rate of each of the blocks includes: establishing a spatial index for the multiple blocks, and determining a first block and a second block based on the spatial index, wherein the first block is a block that has a partial spatial overlap with the initial spatial range, and the second block is a block that has a full spatial overlap with the initial spatial range; setting the second block as the target block, and determining the spatial overlap rate of the first block.
[0075] The spatial index is a data result formed based on the spatial relationship of the spatial objects, for example, it can be a tree structure. In this embodiment, the primary spatial object can include an initial spatial range and a non-initial spatial range, and the secondary spatial object can include a block. The spatial index is constructed based on the inclusion and overlap relationship between the primary spatial object and the secondary spatial object.
[0076] A spatial index is established for the initial spatial range and the non-initial spatial range, for example, it can be implemented based on the B-Tree algorithm, the KD-Tree algorithm or the R-tree algorithm. The spatial index takes the initial spatial range and the non-initial spatial range as root nodes, the initial spatial range includes multiple child nodes, and the non-initial spatial range includes multiple child nodes, where the child nodes are blocks. The blocks that overlap with the initial spatial range are child nodes of the initial spatial range, and the blocks that overlap with the non-initial spatial range are child nodes of the non-initial spatial range. The blocks included in the initial spatial range and the non-initial spatial range overlap. Figure 4 For example, the initial spatial range includes blocks B1, B2, B3, and B4, and the non-initial spatial range includes blocks B2, B3, etc. The overlapping blocks in the initial spatial range and the non-initial spatial range are determined as the first blocks, that is, the blocks to be determined, and the other blocks in the initial spatial range except the first block are determined as the second blocks, that is, the blocks that do not need to be determined.
[0077] The spatial overlap rate of the first block is determined, and the second block is determined as the target block, without the need to determine the spatial overlap rate, thereby reducing the time and computing power of the determination process.
[0078] On the basis of determining the target spatial range, the map data is rendered in the application interface of the electronic map to form a map display page, and a mark is set for the target spatial range in the map display page to distinguish the target spatial range from the non-target spatial range, and to intuitively display the target spatial range to the user. The marking method includes but is not limited to setting the first specific color data for the pixel points of the target spatial range, setting the contour line for the target spatial range, wherein the pixel points on the contour line are set to the second specific color, for example, see Figure 5 .
[0079] Optionally, the method for generating a map display page includes: generating a target space layer corresponding to the target space range, superimposing the target space layer on an original layer corresponding to the map data, and generating the map display page.
[0080] by Figure 5 For example, a target space layer corresponding to Sk is generated. Based on the location information of the target space layer, the target space layer is superimposed on the original layer corresponding to the map data. The target space range is highlighted through the target space layer, so that the user can intuitively view the location, shape, size and other attributes of the target space range. The color data of the target space layer can be different from the color data of the original layer. The target space layer can have a certain degree of transparency, and the map data inside the target space range is not blocked on the basis of highlighting the target space range.
[0081] In some embodiments, on the basis of displaying the target spatial range, it also includes marking multiple matched points of interest in the original layer of the map data, and displaying the points of interest and the target spatial range synchronously to facilitate showing the spatial relationship between the points of interest and the target spatial range to the user.
[0082] In some embodiments, a mode selection control is displayed in the display interface, and the optional modes may be a point of interest display mode, a target space range display mode, and a combined display mode, wherein the point of interest display mode displays multiple points of interest corresponding to a keyword, the target space range display mode displays the target space range corresponding to the keyword, and the combined display mode displays multiple points of interest and the target space range corresponding to the keyword. In response to the user's selection operation on the display mode selection control, the points of interest and / or the target space range corresponding to the keyword are displayed in the map display page.
[0083] In some embodiments, the target spatial range and the keyword can be associated and stored. The next time a search request for the keyword is received, the target spatial range can be directly called based on the association between the keyword and the target spatial range, without executing the calculation process, thus saving computing power and time.
[0084] The technical solution of this embodiment receives keywords input by users, searches for multiple points of interest matching the keywords in the known data of the electronic map, determines the target spatial range including the above points of interest based on the multiple points of interest, and displays the target spatial range in a map display page. The process of determining the target spatial range corresponding to the keyword does not rely on manually marked data, and can determine the spatial range of diverse keywords, meeting the search needs of different users for different spatial ranges.
[0085] Based on the above embodiments, for example, see Figure 6 , Figure 6 1 is a schematic diagram of the search process for the target spatial range corresponding to the keyword provided by an embodiment of the present invention. Enter the keyword in the search box of the application interface of the electronic map, and obtain several points of interest based on the keyword search. Specifically, calculate the matching degree between the input keyword text and the name or address of the location point in the database, and then filter and sort by the matching degree. The location points that meet the preset matching degree are determined as points of interest, and a set of points of interest Pg is obtained. It is worth noting that Pg may contain one or more points of interest, because the same keyword may have multiple points of interest corresponding to it. Of course, Pg may also be an empty set, and the keyword does not hit any point of interest at this time.
[0086] For the search result P gDenoising is performed as follows: 1) Let the distance set D be an empty set. Traverse the set Pg. For each point of interest pi, calculate the minimum distance between pi and all other points of interest, denoted as di, and add it to the distance set D, i.e., D ← D ∪ {di}; 2) Let the result set Pf of points of interest after denoising be an empty set. Traverse the minimum distance di of each point of interest pi in the set D, calculate Di = {d|d < di}. If di is much larger than the maximum value of Di, then mark it as a noise point; otherwise, add it to the result set Pf, i.e., Pf ← Pf ∪ {pi}. Here, Di represents the set composed of elements in D with values less than di. At the same time, the quantization standard for "much larger than" is: if a is greater than or equal to 3 × b, then a is considered to be much larger than b. Note that the specific multiple can be dynamically adjusted according to actual needs. The empirical value 3 set here can be used as the default value.
[0087] Based on the set of points of interest after denoising, calculate the minimum convex hull, and the obtained convex hull result is denoted as Sg, that is, the initial space range. Note that the convex hull calculation requires at least 3 non-collinear points. Therefore, if Pf does not meet this condition, the convex hull cannot be calculated, and the entire SIPR algorithm process terminates and directly returns an empty set.
[0088] Filter the road network information according to the road grade, and only retain the preset roads with higher grades, such as urban arterial roads, highways, and national roads, etc., to avoid the influence of "narrow paths" such as sidewalks in the community. The filtered road network is denoted as Rf. Use the polygonization technology to divide the road network Rf into blocks, and record the blocks formed by the road network Rf. Here, the block is a spatial range surface bounded by roads, and the set of enclosed blocks is denoted as B = {B1, B2,...}. Traverse the set B. For each block Bi, calculate the ratio ri of the geometric intersection part of sg and Bi. If ri is greater than 60%, then add the block bi to the candidate block set Bc. Merge all elements in the candidate block set Bc, and the obtained target space range is Sk, thus completing the smoothing operation of adsorbing sg to the road network R.
[0089] Among them, because the cardinality of B is very large in actual situations, if it takes too much time to calculate whether each block intersects with sg one by one, use the spatial index technology for acceleration, that is, first create a spatial index for all blocks, and then quickly query the blocks that intersect with the specified spatial surface based on this index, which greatly saves the calculation time.
[0090] Generate a target space layer corresponding to the target space range, and overlay the target space layer on the original layer corresponding to the map data to generate the map display page.
[0091] Figure 7 It is a schematic structural diagram of a spatial range determination device based on keywords provided by an embodiment of the present invention. As Figure 7 shown, the device includes:
[0092] The interest point matching module 210 is used to determine the interest points matching the keyword in response to the search operation on the keyword;
[0093] A target space range determination module 220, configured to determine a target space range corresponding to the keyword based on the point of interest;
[0094] The display module 230 is used to display a map display page, and the target space range in the map display page is set with a mark.
[0095] The technical solution of this embodiment receives keywords input by users, searches for multiple points of interest matching the keywords in the known data of the electronic map, determines the target spatial range including the above points of interest based on the multiple points of interest, and displays the target spatial range in a map display page. The process of determining the target spatial range corresponding to the keyword does not rely on manually marked data, and can determine the spatial range of diverse keywords, meeting the search needs of different users for different spatial ranges.
[0096] Based on the above embodiment, optionally,
[0097] Based on the above embodiment, optionally, the interest point matching module 210 is used to:
[0098] Matching the keyword with the multi-dimensional information of multiple location points respectively;
[0099] In the case where at least one dimension information of any of the location points meets a matching condition with the keyword, the location point is determined as a point of interest matching the keyword.
[0100] Based on the above embodiment, optionally, the device further includes:
[0101] The denoising module is used to determine noise points in the interest points after determining the interest points matching the keyword, and remove the noise points from the interest points.
[0102] Optionally, the denoising module is specifically used for:
[0103] The interest points are traversed to determine the minimum distance between each interest point and other interest points; noise points are determined for each interest point based on the minimum distance corresponding to each interest point to obtain noise points in the interest point.
[0104] Based on the above embodiment, optionally, the target space range determination module 220 is used to:
[0105] An initial spatial range is determined based on the plurality of interest points, where the initial spatial range is the maximum spatial range formed by the lines between the plurality of interest points; the initial spatial range is updated based on the road network information to obtain a target spatial range corresponding to the keyword.
[0106] Optionally, the target space range determination module 220 is further configured to:
[0107] The initial spatial range is divided into blocks based on the road network information to obtain a plurality of blocks corresponding to the initial spatial range, each of the blocks spatially overlaps with the initial spatial range; a spatial overlap rate is determined for each of the blocks, and a target block is determined based on the spatial overlap rate determination result of each of the blocks, and the target blocks constitute the target spatial range.
[0108] Optionally, the target space range determination module 220 is further configured to:
[0109] Establishing a spatial index for the multiple blocks, and determining a first block and a second block based on the spatial index, wherein the first block is a block partially spatially overlapping with the initial spatial range, and the second block is a block fully spatially overlapping with the initial spatial range;
[0110] The second block is set as the target block, and the spatial overlap rate of the first block is determined.
[0111] The keyword-based spatial range determination device provided in the embodiment of the present invention can execute the keyword-based spatial range determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0112] Figure 8 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0113] like Figure 8As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0114] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0115] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a spatial range determination method based on keywords.
[0116] In some embodiments, the keyword-based spatial range determination method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the keyword-based spatial range determination method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the keyword-based spatial range determination method in any other appropriate manner (e.g., by means of firmware).
[0117] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0118] The computer program for implementing the keyword-based spatial range determination method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0119] The embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute a spatial range determination method based on keywords, the method comprising:
[0120] In response to a search operation for a keyword, a point of interest matching the keyword is determined; a target spatial range corresponding to the keyword is determined based on the point of interest; and a map display page is displayed, wherein the target spatial range in the map display page is marked.
[0121] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0122] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0123] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0124] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0125] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0126] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for determining a spatial range based on keywords, characterized in that: include: In response to a search operation for a keyword, determining points of interest matching the keyword; Determine the target spatial range corresponding to the keyword based on the point of interest; A map display page is displayed, wherein the target space range in the map display page is marked.
2. The method according to claim 1, characterized in that The determining of the point of interest matching the keyword includes: Matching the keyword with the multi-dimensional information of multiple location points respectively; In the case where at least one dimension information of any of the location points meets a matching condition with the keyword, the location point is determined as a point of interest matching the keyword.
3. The method according to claim 1, characterized in that After determining the points of interest matching the keyword, the method further includes: Noise points among the interest points are determined, and the noise points are removed from the interest points.
4. The method according to claim 3, characterized in that The determining of the noise points in the interest points comprises: Traversing the interest points, and determining the minimum distance between each of the interest points and other interest points; Based on the minimum distance corresponding to each of the interest points, noise point determination is performed on each of the interest points to obtain noise points in the interest points.
5. The method according to claim 1, characterized in that The determining the target space range corresponding to the keyword based on the point of interest includes: Determine an initial spatial range based on the plurality of interest points, the initial spatial range being a maximum spatial range formed by lines connecting the plurality of interest points; The initial spatial range is updated based on the road network information to obtain the target spatial range corresponding to the keyword.
6. The method according to claim 5, characterized in that The updating of the initial spatial range based on the road network information to obtain the target spatial range corresponding to the keyword includes: Dividing the initial spatial range into blocks based on the road network information to obtain a plurality of blocks corresponding to the initial spatial range, each of the blocks having spatial overlap with the initial spatial range; A spatial overlap rate is determined for each of the blocks, and a target block is determined based on the spatial overlap rate determination result of each of the blocks, wherein the target blocks constitute the target spatial range.
7. The method according to claim 6, characterized in that The determining of the spatial overlap rate of each of the blocks includes: Establishing a spatial index for the multiple blocks, and determining a first block and a second block based on the spatial index, wherein the first block is a block partially spatially overlapping with the initial spatial range, and the second block is a block fully spatially overlapping with the initial spatial range; The second block is set as the target block, and the spatial overlap rate of the first block is determined.
8. The method according to claim 1, characterized in that The method for generating the map display page includes: A target space layer corresponding to the target space range is generated, and the target space layer is superimposed on the original layer corresponding to the map data to generate the map display page.
9. A spatial range determination device based on keywords, characterized in that: include: An interest point matching module, configured to determine, in response to a search operation on a keyword, an interest point matching the keyword; A target space range determination module, used to determine the target space range corresponding to the keyword based on the point of interest; The display module is used to display a map display page, and the target space range in the map display page is set with a mark.
10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the keyword-based spatial range determination method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the keyword-based spatial range determination method according to any one of claims 1 to 8 when executed.
Citation Information
Cited By
Method, device and equipment for matching water inlet of sewage pipe network with drainer, and medium
CN121093012A
