CN110399566B - Position searching method and device and electronic equipment - Google Patents

Position searching method and device and electronic equipment Download PDF

Info

Publication number
CN110399566B
CN110399566B CN201810362102.6A CN201810362102A CN110399566B CN 110399566 B CN110399566 B CN 110399566B CN 201810362102 A CN201810362102 A CN 201810362102A CN 110399566 B CN110399566 B CN 110399566B
Authority
CN
China
Prior art keywords
search information
determining
index
word segmentation
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810362102.6A
Other languages
Chinese (zh)
Other versions
CN110399566A (en
Inventor
胡渭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201810362102.6A priority Critical patent/CN110399566B/en
Publication of CN110399566A publication Critical patent/CN110399566A/en
Application granted granted Critical
Publication of CN110399566B publication Critical patent/CN110399566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0623Item investigation
    • G06Q30/0625Directed, with specific intent or strategy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0639Item locations

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a position searching method, a position searching device and electronic equipment, wherein the method comprises the following steps: acquiring search information and determining the type corresponding to the search information; if the search information is of the first type, querying offline data in a space index mode, and determining position information corresponding to the search information; if the search information is of the second type, inquiring offline data in a word segmentation index mode, and determining position information corresponding to the search information; displaying the position corresponding to the search information in a map according to the position information corresponding to the search information; and then, by adopting different index modes for different types of search information, the position information corresponding to the search information is determined, so that the accuracy of the offline search position is improved, and the search efficiency is also improved.

Description

Position searching method and device and electronic equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for searching a location, and an electronic device.
Background
Along with the development of positioning technology, users often search routes and positions of target sites by using navigation devices such as mobile phones, vehicle-mounted terminals and the like, such as hotels, restaurants, buildings and the like; upon receiving a user search request, the navigation device may match corresponding search results, such as displaying a navigation route, displaying a target location position, and so forth.
The search modes provided by the navigation device comprise two types of online search and offline search, wherein the accuracy of the result of the offline search of the navigation device is lower than that of the online search.
Disclosure of Invention
The embodiment of the invention provides a position searching method for improving the accuracy of offline searching positions.
Correspondingly, the embodiment of the invention also provides a position searching device and electronic equipment, which are used for ensuring the realization and application of the method.
In order to solve the above problems, an embodiment of the present invention discloses a location searching method, which specifically includes: acquiring search information and determining the type corresponding to the search information; if the search information is of the first type, querying offline data in a space index mode, and determining position information corresponding to the search information; if the search information is of the second type, inquiring offline data in a word segmentation index mode, and determining position information corresponding to the search information; and displaying the position corresponding to the search information in the map according to the position information corresponding to the search information.
Optionally, the querying offline data in a spatial index manner, and determining the location information corresponding to the search information includes: determining the area information corresponding to the search information, and determining the grid number corresponding to the area information; determining a category corresponding to the search information and determining a category number corresponding to the category; inquiring a spatial index in offline data according to the grid number and the category number, and determining position information corresponding to the search information; the spatial index comprises two layers of indexes, wherein the first layer of indexes are regional grid indexes, and the second layer of indexes are category indexes.
Optionally, the determining the area information corresponding to the search information includes at least one of the following: acquiring the current position of a user, and determining the region information corresponding to the search information according to the current position; and extracting a position keyword from the search information, and determining the region information corresponding to the search information according to the position keyword.
Optionally, the querying the spatial index in the offline data according to the grid number and the category number, and determining the location information corresponding to the search information includes: inquiring a regional grid index according to the grid number, and determining a category index corresponding to the grid number; and inquiring the category index corresponding to the grid number according to the category number, and determining the position information corresponding to the search information.
Optionally, the querying the offline data by using a word segmentation index manner to determine the location information corresponding to the search information includes: word segmentation is carried out on the search information, and word segmentation fragments are obtained; inquiring word segmentation indexes in offline data according to the word segmentation fragments, and determining position information corresponding to the search information; the word segmentation indexes comprise two layers of indexes, wherein the first layer of indexes are word segmentation segment indexes, and the second layer of indexes are number indexes.
Optionally, the determining the location information corresponding to the search information according to the word segmentation index in the word segmentation segment query offline data includes: inquiring a word segmentation segment index according to the word segmentation segment to obtain an interest point number corresponding to the search information; and inquiring a number index according to the interest point number to obtain the position information corresponding to the search information.
Optionally, the querying the word segmentation segment index according to the word segmentation segment to obtain the point of interest number corresponding to the search information includes: if the number of the word segmentation fragments is more than one, determining the corresponding interest point numbers of the word segmentation fragments by inquiring the index of the word segmentation fragments; if the interest point number corresponding to any word segmentation segment is matched with the interest point numbers corresponding to other word segmentation segments, determining the matched interest point number as the interest point number corresponding to the search information.
Optionally, the word segmentation segment index is an inverted index.
Optionally, the point of interest number and other index data of the word segmentation segment index are stored independently, and the point of interest number is compressed by adopting a variable length coding mode.
The embodiment of the invention also discloses a position searching device, which specifically comprises: the type determining module is used for acquiring the search information and determining the type corresponding to the search information; the space index module is used for inquiring offline data in a space index mode and determining position information corresponding to the search information if the search information is of a first type; the word segmentation index module is used for inquiring offline data in a word segmentation index mode and determining position information corresponding to the search information if the search information is of a second type; and the display module is used for displaying the position corresponding to the search information in the map according to the position information corresponding to the search information.
Optionally, the spatial index module includes: the area determining submodule is used for determining area information corresponding to the search information and determining grid numbers corresponding to the area information; the category determining submodule is used for determining a category corresponding to the search information and determining a category number corresponding to the category; the first position information determining submodule is used for querying a space index in offline data according to the grid number and the category number and determining position information corresponding to the search information; the spatial index comprises two layers of indexes, wherein the first layer of indexes are regional grid indexes, and the second layer of indexes are category indexes.
Optionally, the region determination submodule includes: the first determining unit is used for obtaining the current position of the user and determining the area information corresponding to the search information according to the current position; and the second determining unit is used for extracting the position keywords from the search information and determining the area information corresponding to the search information according to the position keywords.
Optionally, the first location information determining submodule is configured to query a regional grid index according to the grid number, and determine a category index corresponding to the grid number; and inquiring the category index corresponding to the grid number according to the category number, and determining the position information corresponding to the search information.
Optionally, the word segmentation index module includes: the word segmentation sub-module is used for segmenting the search information to obtain word segmentation fragments; the second position information determining submodule is used for inquiring word segmentation indexes in offline data according to the word segmentation fragments and determining position information corresponding to the search information; the word segmentation indexes comprise two layers of indexes, wherein the first layer of indexes are word segmentation segment indexes, and the second layer of indexes are number indexes.
Optionally, the second location information determining submodule is configured to query a word segmentation segment index according to the word segmentation segment to obtain an interest point number corresponding to the search information; and inquiring a number index according to the interest point number to obtain the position information corresponding to the search information.
Optionally, the second location information determining submodule is specifically configured to determine, if the number of the segmented word segments is more than one, an interest point number corresponding to each segmented word segment by querying a segmented word segment index; if the interest point number corresponding to any word segmentation segment is matched with the interest point numbers corresponding to other word segmentation segments, determining the matched interest point number as the interest point number corresponding to the search information.
Optionally, the word segmentation segment index is an inverted index.
Optionally, the point of interest number and other index data of the word segmentation segment index are stored independently, and the point of interest number is compressed by adopting a variable length coding mode.
The embodiment of the invention also discloses a readable storage medium, which is characterized in that when the instructions in the storage medium are executed by a processor of the electronic device, the electronic device can execute the position searching method according to any one of the embodiments of the invention.
The embodiment of the invention also discloses an electronic device, which comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, and the one or more programs comprise instructions for: acquiring search information and determining the type corresponding to the search information; if the search information is of the first type, querying offline data in a space index mode, and determining position information corresponding to the search information; if the search information is of the second type, inquiring offline data in a word segmentation index mode, and determining position information corresponding to the search information; and displaying the position corresponding to the search information in the map according to the position information corresponding to the search information.
Optionally, the querying offline data in a spatial index manner, and determining the location information corresponding to the search information includes: determining the area information corresponding to the search information, and determining the grid number corresponding to the area information; determining a category corresponding to the search information and determining a category number corresponding to the category; inquiring a spatial index in offline data according to the grid number and the category number, and determining position information corresponding to the search information; the spatial index comprises two layers of indexes, wherein the first layer of indexes are regional grid indexes, and the second layer of indexes are category indexes.
Optionally, the determining the area information corresponding to the search information includes at least one of the following: acquiring the current position of a user, and determining the region information corresponding to the search information according to the current position; and extracting a position keyword from the search information, and determining the region information corresponding to the search information according to the position keyword.
Optionally, the querying the spatial index in the offline data according to the grid number and the category number, and determining the location information corresponding to the search information includes: inquiring a regional grid index according to the grid number, and determining a category index corresponding to the grid number; and inquiring the category index corresponding to the grid number according to the category number, and determining the position information corresponding to the search information.
Optionally, the querying the offline data by using a word segmentation index manner to determine the location information corresponding to the search information includes: word segmentation is carried out on the search information, and word segmentation fragments are obtained; inquiring word segmentation indexes in offline data according to the word segmentation fragments, and determining position information corresponding to the search information; the word segmentation indexes comprise two layers of indexes, wherein the first layer of indexes are word segmentation segment indexes, and the second layer of indexes are number indexes.
Optionally, the determining the location information corresponding to the search information according to the word segmentation index in the word segmentation segment query offline data includes: inquiring a word segmentation segment index according to the word segmentation segment to obtain an interest point number corresponding to the search information; and inquiring a number index according to the interest point number to obtain the position information corresponding to the search information.
Optionally, the querying the word segmentation segment index according to the word segmentation segment to obtain the point of interest number corresponding to the search information includes: if the number of the word segmentation fragments is more than one, determining the corresponding interest point numbers of the word segmentation fragments by inquiring the index of the word segmentation fragments; if the interest point number corresponding to any word segmentation segment is matched with the interest point numbers corresponding to other word segmentation segments, determining the matched interest point number as the interest point number corresponding to the search information.
Optionally, the word segmentation segment index is an inverted index.
Optionally, the point of interest number and other index data of the word segmentation segment index are stored independently, and the point of interest number is compressed by adopting a variable length coding mode.
The embodiment of the invention has the following advantages:
The embodiment of the invention can acquire the search information, determine the type corresponding to the search information, search by adopting a corresponding index mode according to the type of the search information, namely, if the search information is of a first type, inquiring offline data by adopting a spatial index mode, determining the position information corresponding to the search information, and if the search information is of a second type, inquiring offline data by adopting a word segmentation index mode, and determining the position information corresponding to the search information; and then, by adopting different index modes for different types of search information, the position information corresponding to the search information is determined, so that the accuracy of the offline search position is improved, and the search efficiency is also improved.
Drawings
FIG. 1 is a flow chart of steps of an embodiment of a location search method of the present invention;
FIG. 2a is a schematic diagram of a location corresponding to a first type of search information according to the present invention;
FIG. 2b is a schematic diagram of a location corresponding to a second type of search information according to the present invention;
FIG. 3 is a flow chart of steps of an alternative embodiment of a location search method of the present invention;
FIG. 4 is a schematic diagram of a location corresponding to another second type of search information according to the present invention;
FIG. 5 is a block diagram of an embodiment of a position search device of the present invention;
FIG. 6 is a block diagram of an alternative embodiment of a location search device of the present invention;
FIG. 7 illustrates a block diagram of an electronic device for location searching, according to an exemplary embodiment;
Fig. 8 is a schematic structural view of an electronic device for location search according to another exemplary embodiment of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
One of the core ideas of the embodiment of the invention is that the method adopts a corresponding index mode to perform offline search aiming at different types of search information, and determines the position information of the search information, thereby improving the accuracy of the offline search position and also improving the search efficiency.
The embodiment of the invention is applied to the navigation equipment, wherein the navigation equipment is equipment with a navigation function, and the navigation equipment can comprise various types of equipment, such as a mobile terminal, a vehicle-mounted equipment, an independent navigator and the like.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a location searching method according to the present invention may specifically include the following steps:
step 102, obtaining search information and determining the type corresponding to the search information.
In the embodiment of the invention, the navigation equipment can download the offline data in advance, and further after the user performs operations such as position searching, navigation and the like by adopting the navigation equipment, the navigation equipment can determine and display the corresponding query result by querying the offline data. Therefore, after the user inputs the position to be searched in the navigation device and performs the search operation, the navigation device can acquire the information input by the user, namely the search information, and then can determine the position information corresponding to the search information by inquiring the offline data.
The embodiment of the invention improves the accuracy of the offline searching position and the searching efficiency, and can search by adopting different index modes aiming at different types of searching information; the navigation equipment can analyze the search information to determine the type corresponding to the search information, namely judging the specific place characterized by the search information or the type of the place, such as searching fox network mansion, shenzhou mansion and national library, etc., as the specific place, and quick hotels, banks, hospitals, shops, etc. refer to the type of the place; and if the search information characterizes the category of the place, determining the search information as a first type, and if the search information characterizes the specific place, determining the search information as a second type.
And 104, if the search information is of the first type, querying offline data in a space index mode, and determining position information corresponding to the search information.
In the embodiment of the invention, after the navigation equipment determines that the search information is of a first type, the navigation equipment can query offline data in a spatial index mode to acquire the position information corresponding to the search information, wherein the spatial index mode refers to that a geographic area corresponding to the search information is determined first, and then the position information corresponding to the search information is searched in the geographic area. For example, if the search information is "quick hotel", the geographical area, such as area a, where the current location of the user is located is determined, and then the location information of all quick hotels in the area a is queried, such as area a: huangpu, searching all shortcut hotels near the Huangpu large lane, such as the address of the shortcut hotel 1: guangzhou Huangpu Daoxi 267 address of quick hotel 2: guangzhou Huangpu Daoxi 101, address of 1716, fast hotel 3: guangzhou Huangpu Daqu 243.
And 106, if the search information is of the second type, inquiring offline data in a word segmentation index mode, and determining position information corresponding to the search information.
In the embodiment of the invention, after the navigation equipment determines that the search information is of a second type, offline data can be queried in a word segmentation index mode to determine the position information corresponding to the search information, wherein the word segmentation index refers to the step of segmenting the search information, and the position information corresponding to the search information is searched according to word segmentation fragments obtained by word segmentation; for example, the search information is "search fox network building", offline data can be queried according to the word segmentation fragments "search fox", "network" and "building", and the location information of the interest point "search fox network building" can be obtained, such as address: guan Dong Lu 1 in the sea lake area of Beijing city.
And 108, displaying the position corresponding to the search information in the map according to the position information corresponding to the search information.
After the navigation equipment inquires the position information corresponding to the search information, the position corresponding to the search information can be displayed in the map according to the position information, and then a user can check the position corresponding to the search information through the map. Of course, the navigation device may also broadcast the address corresponding to the search information in the location information, so as to better prompt the user.
In one example of the present invention, the search information is: and displaying the positions of the quick hotels nearby the Huangpu lane on the map when the current position of the user is Huangpu lanes, as shown in fig. 2a, wherein the identification points 1-10 respectively correspond to the positions of one quick hotel. In another example of the present invention, the search information is: the network building searching for fox is displayed on the map as indicated by the identified points in fig. 2 b.
The embodiment of the invention can acquire the search information, determine the type corresponding to the search information, search by adopting a corresponding index mode according to the type of the search information, namely, if the search information is of a first type, inquiring offline data by adopting a spatial index mode, determining the position information corresponding to the search information, and if the search information is of a second type, inquiring offline data by adopting a word segmentation index mode, and determining the position information corresponding to the search information; and then, by adopting different index modes for different types of search information, the position information corresponding to the search information is determined, so that the accuracy of the offline search position is improved, and the search efficiency is also improved.
In another embodiment of the present invention, the offline data may include a spatial index and a word segmentation index, where the spatial index includes two layers of indexes, the first layer of indexes is a region grid index, the second layer of indexes is a category index, and the word segmentation index may also include two layers of indexes, the first layer of indexes is a word segmentation segment index, and the second layer of indexes is a number index. The method comprises the steps of inquiring offline data in a space index mode, determining position information corresponding to search information, namely firstly inquiring a regional grid index and then inquiring a category index according to the search information, and determining the position information corresponding to the search information; inquiring offline data in a word segmentation index mode, namely inquiring a word segmentation segment index and then inquiring a number index according to the search information, and determining position information corresponding to the search information; the method comprises the following steps:
Referring to fig. 3, a flowchart illustrating steps of an alternative embodiment of a location searching method of the present invention may specifically include the following steps:
step 302, obtaining search information and determining the type corresponding to the search information.
In the embodiment of the invention, after the navigation equipment acquires the search information, the type corresponding to the search information can be determined, and then whether to query offline data in a space index mode or a word segmentation index mode is determined according to the type corresponding to the search information, so as to determine the position information corresponding to the search information; if the search information is of the first type, the offline data is queried in a spatial index manner, specifically, in step 304-step 310, and if the search information is of the second type, the offline data is queried in a word segmentation index manner, specifically, in step 312-step 316.
Step 304, if the search information is of the first type, determining the area information corresponding to the search information, and determining the grid number corresponding to the area information.
In the embodiment of the invention, the map can be divided into a plurality of geographic areas in advance, and the shape of the geographic areas can be set as a rectangle according to requirements; then, a geographic area is used as a grid, and the grids are numbered, so that the grid number corresponding to each geographic area is determined, and the grid number can be used for uniquely identifying the geographic area. The space index mode is to determine a geographic area corresponding to search information, and then search position information corresponding to the search information in the geographic area, so that after the navigation equipment determines that the search information is of a first type, on one hand, the area information corresponding to the search information can be determined, and grid numbers corresponding to the area information can be obtained; wherein, the step of determining the region information may be as follows:
in the embodiment of the invention, the method for determining the area information comprises the steps of obtaining the current position of a user and determining the area information corresponding to the search information according to the current position; the method comprises the steps of obtaining the current position of a user, then carrying out space rectangle calculation on the current position, and calculating the area information corresponding to the geographical area where the user is currently located.
In the embodiment of the invention, when a user inputs search information, some position limiting information is likely to be input, for example, when the user wants to inquire a quick hotel near a road M of a city B in a diagram from the city A to the city B, the user inputs a quick hotel of the road M of the city B; at this time, the location limitation information is the target search area of the user in the search information, so another way of determining the area information is to extract location keywords from the search information and determine the area information corresponding to the search information according to the location keywords; namely, extracting a position keyword, then determining the position information of the position keyword, and determining the region information corresponding to the geographical region where the position keyword is located according to the position information of the position keyword. For example, the search information "quick hotel for city B road M", the location keyword "city B road M", can determine the area information of the geographical area where city B road M is located.
If a user is driving on a road M of a city B, and wants to search for a fast hotel near a conference center on the road M, the user inputs search information of the fast hotel in the conference center, and at this time, the current position of the user and a position keyword of the search information can be combined to determine region information corresponding to the search information. Therefore, in another mode of determining the area information according to the embodiment of the present invention, the first mode and the second mode are combined, that is, the current position of the user and the position keyword of the search information are obtained, and the area information corresponding to the search information is determined according to the current position and the position keyword; the details are not described in detail.
Step 306, determining a category corresponding to the search information, and determining a category number corresponding to the category.
In the embodiment of the invention, after the navigation equipment determines that the search information is of the first type, on the other hand, the category corresponding to the search information can be determined, and the category number corresponding to the category can be determined. The corresponding white list can be generated in advance according to the category of the place, and each category in the white list is numbered, such as a bank 0001, a hospital 0002, a school 0003 and the like; and after the navigation equipment acquires the search information, the search information can be compared with the white name list to determine the category corresponding to the search information, and the number corresponding to the category is acquired.
After the navigation equipment acquires the grid number and the category number, the navigation equipment can inquire the space index in the offline data according to the grid number and the category number and determine the position information corresponding to the search information; the spatial index includes two layers of indexes, the first layer of indexes is a region grid index, and the second layer of indexes is a category index, specifically, in steps 308-310:
Step 308, inquiring the regional grid index according to the grid number, and determining a category index corresponding to the grid number.
Step 310, querying a category index corresponding to the grid number according to the category number, and determining the position information corresponding to the search information.
In the embodiment of the invention, the area grid index is associated with the category index, namely, the area grid index is queried for each grid number, and the category index corresponding to the grid number can be obtained, so that the navigation equipment can query the area grid index according to the grid number, and determine the category index corresponding to the grid number; and then inquiring the category index corresponding to the grid number according to the category number, and determining the position information corresponding to the search information. Wherein the location information in the category index may include location name and address information.
Step 312, if the search information is of the second type, word segmentation is performed on the search information to obtain word segmentation fragments.
And step 314, inquiring the segmentation segment index according to the segmentation segment to obtain the interest point number corresponding to the search information.
Step 316, inquiring the number index according to the interest point number to obtain the position information corresponding to the search information.
In the embodiment of the invention, the navigation equipment determines the search information to be of the second type, and can query offline data in a word segmentation index mode, so that the search information can be segmented to obtain word segmentation fragments corresponding to the search information; and then, inquiring the segmentation segment index by adopting the segmentation segment to obtain the interest point number corresponding to the search information. The word segmentation indexes comprise two layers of indexes, wherein the first layer of indexes are word segmentation segment indexes, and the second layer of indexes are number indexes, so that the word segmentation segment indexes can be queried according to the word segmentation segments to obtain the interest point numbers corresponding to the search information, and then the number indexes are queried according to the interest point numbers to obtain the position information corresponding to the search information. The interest point numbers are predetermined, namely, the interest points in the offline data are numbered in advance, and each interest point number can correspond to the position information of the interest point; the location information of the interest point at least comprises location name and address information. In the embodiment of the invention, the word segmentation segment index is an inverted index, the interest point number and other index data of the word segmentation segment index are stored in a related and independent way, and the interest point number can be compressed in a long coding way so as to save the storage space of navigation equipment.
In the embodiment of the invention, the number of the interest point corresponding to the word segmentation segment can be determined by inquiring the index of the word segmentation segment if the number of the word segmentation segment corresponding to the search information is one or more; for example, the information "Hilden" is searched to obtain a word segmentation "Hilden", then the word segmentation index is queried according to the "Hilden", the interest point number 00283 of the interest point "Hilden hotel-Beijing" and the interest point number 02143 of the interest point "Hilden hotel-Wuhan" are matched, and the corresponding interest point numbers of the search information include: 00283 and 02143. If the number of the word segmentation fragments is more than one, determining the corresponding interest point numbers of the word segmentation fragments by inquiring the index of the word segmentation fragments; if the interest point number corresponding to any word segmentation segment is matched with the interest point numbers corresponding to other word segmentation segments, determining the matched interest point number as the interest point number corresponding to the search information. For example, searching for information "search fox network building", and word segmentation to obtain word segmentation fragments "search fox", "network" and "building"; inquiring the index of the word segmentation fragments to obtain the interest point numbers corresponding to the 'search fox' comprises the following steps: interest point number 01457 corresponding to the interest point "search fox network building", interest point number 01422 corresponding to the interest point "search fox free travel", and interest point number 01441 corresponding to the interest point "search fox map"; the interest point number corresponding to the network includes: the point of interest number 01457 corresponding to the point of interest "search fox network building", the point of interest number 05623 corresponding to the point of interest "network technologies limited", and the point of interest number 09983 corresponding to the point of interest "network meeting", and the point of interest number corresponding to the "building" include: interest point number 01457 corresponding to the interest point "search fox network mansion", interest point number 03972 corresponding to the interest point "Shenzhou mansion" and interest point number 18673 corresponding to the interest point "Kande mansion"; the interest point numbers corresponding to the three word segmentation segments each include an interest point number 01457 of the interest point "search fox network building", so that the interest point number 01457 can be determined as the interest point number corresponding to the search information "search fox network building".
The user is likely to be unable to clearly remember the specific address of a certain place, for example, the specific address of "search fox network building" is "guan-dong-lu-1 in the seastarch area of Beijing city", but the guan-lu-u is crossed, so the user is likely to search "search fox network building in the form of a fun-fu-u road"; because the location information of the interest point only includes the interest point name and the interest point address, when the user inputs the search information "the mansion search fox network building", the word segmentation segment "the mansion" cannot hit the interest point "the search fox network building", that is, the interest point number corresponding to the word segmentation segment "the mansion" does not include the interest point number 01457 of the interest point "the search fox network building", and thus the interest point number corresponding to the search information cannot be determined. Address information associated with a point of interest may thus be added to the location information of that point of interest, e.g., the location information of the point of interest "search network building" may include: "Guanchun Donglu No. 1" and "Chengfu" in the sea lake area of Beijing city and "search for fox network mansion"; the address information associated with the interest points is used for establishing a word segmentation segment index.
And then inquiring a number index according to the interest point number to obtain position information corresponding to the search information, wherein the position information can also at least comprise the following information: location name and address information.
Step 318, displaying the position corresponding to the search information in the map according to the position information corresponding to the search information.
In the embodiment of the invention, after the navigation equipment acquires the position information of the search information, the position corresponding to the search information can be marked on a map according to the position information; specifically, the position corresponding to the address information is identified on the map, and the corresponding position name is displayed; for example, the search information "search for a fox network building" may be located as shown in fig. 4, and the location name "search for a fox network building" may be displayed according to the identification point.
The embodiment of the invention can acquire search information, determine the type corresponding to the search information, select a corresponding index mode for searching according to the type of the search information, namely, if the search information is of a first type, the position information corresponding to the search information is determined by querying offline data in a spatial index mode, and if the search information is of a second type, the position information corresponding to the search information is determined by querying offline data in a word segmentation index mode; then displaying the position corresponding to the search information on a map; and then, the position information is inquired by adopting different index modes for different types of search information, so that the accuracy of the offline search position can be improved, and the search efficiency is also improved.
Secondly, in the embodiment of the invention, when the offline data is queried in a space index mode and the position information corresponding to the search information is determined, firstly determining the grid number of the area information corresponding to the search information and determining the category number of the category corresponding to the search information; inquiring a spatial index of offline data according to the grid number and the category number, and determining position information corresponding to the search information; further improving the searching efficiency.
Again, when determining the area information corresponding to the search information, the embodiment of the present invention may include at least one of the following manners: acquiring the current position of a user, and determining the region information corresponding to the search information according to the current position; extracting position keywords from the search information, and determining area information corresponding to the search information according to the position keywords; the accuracy of the region information corresponding to the search information can be improved, and the accuracy of the offline search position is further improved.
Further, in the embodiment of the invention, the word segmentation segment index is an inverted index, so that the searching efficiency can be improved; in addition, the interest point numbers and other index data of the word segmentation segment indexes are stored independently, the interest point numbers are compressed in a variable length coding mode, and storage space of navigation equipment is saved.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Referring to fig. 5, a block diagram of an embodiment of a location search device according to the present invention is shown, and may specifically include the following modules: a type determination module 502, a spatial index module 504, a word segmentation index module 506, and a presentation module 508, wherein,
The type determining module 502 is configured to obtain search information, and determine a type corresponding to the search information;
The spatial index module 504 is configured to query offline data in a spatial index manner if the search information is of a first type, and determine location information corresponding to the search information;
the word segmentation index module 506 is configured to query offline data in a word segmentation index manner if the search information is of the second type, and determine location information corresponding to the search information;
And the display module 508 is configured to display a position corresponding to the search information in the map according to the position information corresponding to the search information.
Referring to fig. 6, a block diagram of an alternative embodiment of a location search device of the present invention is shown.
In an alternative embodiment of the present invention, the spatial index module 504 includes: a region determination submodule 5042, a category determination submodule 5044, and a first location information determination submodule 5046, wherein,
A region determining submodule 5042, configured to determine region information corresponding to the search information, and determine a grid number corresponding to the region information;
A category determination submodule 5044, configured to determine a category corresponding to the search information, and determine a category number corresponding to the category;
a first location information determining submodule 5046, configured to query a spatial index in offline data according to the grid number and the category number, and determine location information corresponding to the search information; the spatial index comprises two layers of indexes, wherein the first layer of indexes are regional grid indexes, and the second layer of indexes are category indexes.
Wherein, the first location information determining submodule 5046 is configured to query a regional grid index according to the grid number, and determine a category index corresponding to the grid number; and inquiring the category index corresponding to the grid number according to the category number, and determining the position information corresponding to the search information.
In an alternative embodiment of the present invention, the area determination submodule 5042 includes: a first determination unit 50422 and a second determination unit 50424, wherein,
A first determining unit 50422, configured to obtain a current position of a user, and determine area information corresponding to the search information according to the current position;
And a second determining unit 50424, configured to extract a location keyword from the search information, and determine the area information corresponding to the search information according to the location keyword.
In an alternative embodiment of the present invention, the word segmentation index module 506 includes: the word segmentation submodule 5062 and the second location information determination submodule 5064, wherein,
The word segmentation submodule 5062 is used for segmenting the search information to obtain segmented fragments;
A second location information determining sub-module 5064, configured to query a word segmentation index in offline data according to the word segmentation segment, and determine location information corresponding to the search information; the word segmentation indexes comprise two layers of indexes, wherein the first layer of indexes are word segmentation segment indexes, and the second layer of indexes are number indexes.
The second location information determining submodule 5064 is configured to query a word segmentation segment index according to the word segmentation segment to obtain an interest point number corresponding to the search information; and inquiring a number index according to the interest point number to obtain the position information corresponding to the search information.
The number determining submodule 5064 is specifically configured to determine, if the number of the segmented word segment is more than one, a point of interest number corresponding to each segmented word segment by querying a segmented word segment index; if the interest point number corresponding to any word segmentation segment is matched with the interest point numbers corresponding to other word segmentation segments, determining the matched interest point number as the interest point number corresponding to the search information.
In an alternative embodiment of the present invention, the word segmentation segment index is an inverted index.
In an optional embodiment of the present invention, the point of interest number and other index data of the word segmentation segment index are stored independently, and the point of interest number is compressed by adopting a variable length coding mode.
The embodiment of the invention can acquire the search information, determine the type corresponding to the search information, search by adopting a corresponding index mode according to the type of the search information, namely, if the search information is of a first type, inquiring offline data by adopting a spatial index mode, determining the position information corresponding to the search information, and if the search information is of a second type, inquiring offline data by adopting a word segmentation index mode, and determining the position information corresponding to the search information; and then, by adopting different index modes for different types of search information, the position information corresponding to the search information is determined, so that the accuracy of the offline search position is improved, and the search efficiency is also improved.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
Fig. 7 is a block diagram illustrating a structure of an electronic device 700 for location searching, according to an example embodiment. For example, the electronic device 700 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 7, an electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the electronic device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 702 can include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 706 provides power to the various components of the electronic device 700. Power component 706 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic device 700.
The multimedia component 708 includes a screen between the electronic device 700 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front-facing camera and/or a rear-facing camera. When the electronic device 700 is in an operational mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 704 or transmitted via the communication component 716. In some embodiments, the audio component 710 further includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the electronic device 700. For example, the sensor assembly 714 may detect an on/off state of the electronic device 700, a relative positioning of the components, such as a display and keypad of the electronic device 700, a change in position of the electronic device 700 or a component of the electronic device 700, the presence or absence of a user's contact with the electronic device 700, an orientation or acceleration/deceleration of the electronic device 700, and a change in temperature of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate communication between the electronic device 700 and other devices, either wired or wireless. The electronic device 700 may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 716 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 704, including instructions executable by processor 720 of electronic device 700 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform a location search method, the method comprising: acquiring search information and determining the type corresponding to the search information; if the search information is of the first type, querying offline data in a space index mode, and determining position information corresponding to the search information; if the search information is of the second type, inquiring offline data in a word segmentation index mode, and determining position information corresponding to the search information; and displaying the position corresponding to the search information in the map according to the position information corresponding to the search information.
Optionally, the querying offline data in a spatial index manner, and determining the location information corresponding to the search information includes: determining the area information corresponding to the search information, and determining the grid number corresponding to the area information; determining a category corresponding to the search information and determining a category number corresponding to the category; inquiring a spatial index in offline data according to the grid number and the category number, and determining position information corresponding to the search information; the spatial index comprises two layers of indexes, wherein the first layer of indexes are regional grid indexes, and the second layer of indexes are category indexes.
Optionally, the determining the area information corresponding to the search information includes at least one of the following: acquiring the current position of a user, and determining the region information corresponding to the search information according to the current position; and extracting a position keyword from the search information, and determining the region information corresponding to the search information according to the position keyword.
Optionally, the querying the spatial index in the offline data according to the grid number and the category number, and determining the location information corresponding to the search information includes: inquiring a regional grid index according to the grid number, and determining a category index corresponding to the grid number; and inquiring the category index corresponding to the grid number according to the category number, and determining the position information corresponding to the search information.
Optionally, the querying the offline data by using a word segmentation index manner to determine the location information corresponding to the search information includes: word segmentation is carried out on the search information, and word segmentation fragments are obtained; inquiring word segmentation indexes in offline data according to the word segmentation fragments, and determining position information corresponding to the search information; the word segmentation indexes comprise two layers of indexes, wherein the first layer of indexes are word segmentation segment indexes, and the second layer of indexes are number indexes.
Optionally, the determining the location information corresponding to the search information according to the word segmentation index in the word segmentation segment query offline data includes: inquiring a word segmentation segment index according to the word segmentation segment to obtain an interest point number corresponding to the search information; and inquiring a number index according to the interest point number to obtain the position information corresponding to the search information.
Optionally, the querying the word segmentation segment index according to the word segmentation segment to obtain the point of interest number corresponding to the search information includes: if the number of the word segmentation fragments is more than one, determining the corresponding interest point numbers of the word segmentation fragments by inquiring the index of the word segmentation fragments; if the interest point number corresponding to any word segmentation segment is matched with the interest point numbers corresponding to other word segmentation segments, determining the matched interest point number as the interest point number corresponding to the search information.
Optionally, the word segmentation segment index is an inverted index.
Optionally, the point of interest number and other index data of the word segmentation segment index are stored independently, and the point of interest number is compressed by adopting a variable length coding mode.
Fig. 8 is a schematic structural view of an electronic device 800 for location searching according to another exemplary embodiment of the present invention. The electronic device 800 may be a server that may vary widely in configuration or performance and may include one or more central processing units (central processing units, CPUs) 822 (e.g., one or more processors) and memory 832, one or more storage mediums 830 (e.g., one or more mass storage devices) that store applications 842 or data 844. Wherein the memory 832 and the storage medium 830 may be transitory or persistent. The program stored in the storage medium 830 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Still further, the central processor 822 may be configured to communicate with the storage medium 830 and execute a series of instruction operations in the storage medium 830 on a server.
The server(s) may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input/output interfaces 858, one or more keyboards 856, and/or one or more operating systems 841 such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, and the like.
An electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for: acquiring search information and determining the type corresponding to the search information; if the search information is of the first type, querying offline data in a space index mode, and determining position information corresponding to the search information; if the search information is of the second type, inquiring offline data in a word segmentation index mode, and determining position information corresponding to the search information; and displaying the position corresponding to the search information in the map according to the position information corresponding to the search information.
Optionally, the querying offline data in a spatial index manner, and determining the location information corresponding to the search information includes: determining the area information corresponding to the search information, and determining the grid number corresponding to the area information; determining a category corresponding to the search information and determining a category number corresponding to the category; inquiring a spatial index in offline data according to the grid number and the category number, and determining position information corresponding to the search information; the spatial index comprises two layers of indexes, wherein the first layer of indexes are regional grid indexes, and the second layer of indexes are category indexes.
Optionally, the determining the area information corresponding to the search information includes at least one of the following: acquiring the current position of a user, and determining the region information corresponding to the search information according to the current position; and extracting a position keyword from the search information, and determining the region information corresponding to the search information according to the position keyword.
Optionally, the querying the spatial index in the offline data according to the grid number and the category number, and determining the location information corresponding to the search information includes: inquiring a regional grid index according to the grid number, and determining a category index corresponding to the grid number; and inquiring the category index corresponding to the grid number according to the category number, and determining the position information corresponding to the search information.
Optionally, the querying the offline data by using a word segmentation index manner to determine the location information corresponding to the search information includes: word segmentation is carried out on the search information, and word segmentation fragments are obtained; inquiring word segmentation indexes in offline data according to the word segmentation fragments, and determining position information corresponding to the search information; the word segmentation indexes comprise two layers of indexes, wherein the first layer of indexes are word segmentation segment indexes, and the second layer of indexes are number indexes.
Optionally, the determining the location information corresponding to the search information according to the word segmentation index in the word segmentation segment query offline data includes: inquiring a word segmentation segment index according to the word segmentation segment to obtain an interest point number corresponding to the search information; and inquiring a number index according to the interest point number to obtain the position information corresponding to the search information.
Optionally, the querying the word segmentation segment index according to the word segmentation segment to obtain the point of interest number corresponding to the search information includes: if the number of the word segmentation fragments is more than one, determining the corresponding interest point numbers of the word segmentation fragments by inquiring the index of the word segmentation fragments; if the interest point number corresponding to any word segmentation segment is matched with the interest point numbers corresponding to other word segmentation segments, determining the matched interest point number as the interest point number corresponding to the search information.
Optionally, the word segmentation segment index is an inverted index.
Optionally, the point of interest number and other index data of the word segmentation segment index are stored independently, and the point of interest number is compressed by adopting a variable length coding mode.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or terminal device that comprises the element.
The above description of a location searching method, a location searching device and an electronic device provided by the present invention applies specific examples to illustrate the principles and embodiments of the present invention, and the above description of the examples is only used to help understand the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (22)

1. A location search method, comprising:
acquiring search information and determining the type corresponding to the search information;
If the search information is of the first type, querying offline data in a space index mode, and determining position information corresponding to the search information; the first type characterizes the search information as a category of places;
If the search information is of the second type, inquiring offline data in a word segmentation index mode, and determining position information corresponding to the search information; the second type characterizes the search information as a specific location; the word segmentation index comprises two layers of indexes, wherein the first layer of indexes are word segmentation segment indexes, and the second layer of indexes are numbered indexes;
Displaying the position corresponding to the search information in a map according to the position information corresponding to the search information;
the step of querying offline data in a spatial index mode and determining the position information corresponding to the search information comprises the following steps:
determining the area information corresponding to the search information, and determining the grid number corresponding to the area information;
determining a category corresponding to the search information and determining a category number corresponding to the category;
Inquiring a spatial index in offline data according to the grid number and the category number, and determining position information corresponding to the search information;
the spatial index comprises two layers of indexes, wherein the first layer of indexes are regional grid indexes, and the second layer of indexes are category indexes;
The step of inquiring the space index in the offline data according to the grid number and the category number to determine the position information corresponding to the search information comprises the following steps:
Inquiring a regional grid index according to the grid number, and determining a category index corresponding to the grid number;
and inquiring the category index corresponding to the grid number according to the category number, and determining the position information corresponding to the search information.
2. The method of claim 1, wherein the determining the region information corresponding to the search information includes at least one of:
acquiring the current position of a user, and determining the region information corresponding to the search information according to the current position;
And extracting a position keyword from the search information, and determining the region information corresponding to the search information according to the position keyword.
3. The method of claim 1, wherein the querying the offline data using the word segmentation index method to determine the location information corresponding to the search information includes:
Word segmentation is carried out on the search information, and word segmentation fragments are obtained;
and inquiring word segmentation indexes in offline data according to the word segmentation fragments, and determining position information corresponding to the search information.
4. The method of claim 3, wherein the determining the location information corresponding to the search information according to the word segmentation index in the word segmentation segment query offline data includes:
Inquiring a word segmentation segment index according to the word segmentation segment to obtain an interest point number corresponding to the search information;
And inquiring a number index according to the interest point number to obtain the position information corresponding to the search information.
5. The method of claim 4, wherein the querying the segmentation segment index according to the segmentation segment to obtain the point of interest number corresponding to the search information comprises:
If the number of the word segmentation fragments is more than one, determining the corresponding interest point numbers of the word segmentation fragments by inquiring the index of the word segmentation fragments;
if the interest point number corresponding to any word segmentation segment is matched with the interest point numbers corresponding to other word segmentation segments, determining the matched interest point number as the interest point number corresponding to the search information.
6. The method of any of claims 3-5, wherein the word segmentation segment index is an inverted index.
7. The method according to any one of claims 4-5, wherein the point of interest number is stored separately from other index data of the word segmentation segment index, and the point of interest number is compressed by variable length coding.
8. A position search apparatus, comprising:
the type determining module is used for acquiring the search information and determining the type corresponding to the search information;
the space index module is used for inquiring offline data in a space index mode and determining position information corresponding to the search information if the search information is of a first type; the first type characterizes the search information as a category of places;
the word segmentation index module is used for inquiring offline data in a word segmentation index mode and determining position information corresponding to the search information if the search information is of a second type; the second type characterizes the search information as a specific location; the word segmentation index comprises two layers of indexes, wherein the first layer of indexes are word segmentation segment indexes, and the second layer of indexes are numbered indexes;
the display module is used for displaying the position corresponding to the search information in the map according to the position information corresponding to the search information;
The spatial index module includes:
the area determining submodule is used for determining area information corresponding to the search information and determining grid numbers corresponding to the area information;
The category determining submodule is used for determining a category corresponding to the search information and determining a category number corresponding to the category;
The first position information determining submodule is used for querying a space index in offline data according to the grid number and the category number and determining position information corresponding to the search information; the spatial index comprises two layers of indexes, wherein the first layer of indexes are regional grid indexes, and the second layer of indexes are category indexes;
The first position information determining submodule is used for querying the regional grid index according to the grid number and determining a category index corresponding to the grid number; and inquiring the category index corresponding to the grid number according to the category number, and determining the position information corresponding to the search information.
9. The apparatus of claim 8, wherein the region determination submodule comprises:
the first determining unit is used for obtaining the current position of the user and determining the area information corresponding to the search information according to the current position;
And the second determining unit is used for extracting the position keywords from the search information and determining the area information corresponding to the search information according to the position keywords.
10. The apparatus of claim 8, wherein the word segmentation index module comprises:
the word segmentation sub-module is used for segmenting the search information to obtain word segmentation fragments;
and the second position information determining submodule is used for determining position information corresponding to the search information according to the word segmentation indexes in the word segmentation segment query offline data.
11. The apparatus of claim 10, wherein the device comprises a plurality of sensors,
The second position information determining submodule is used for inquiring the segmentation segment index according to the segmentation segment to obtain the interest point number corresponding to the search information; and inquiring a number index according to the interest point number to obtain the position information corresponding to the search information.
12. The apparatus of claim 10, wherein the device comprises a plurality of sensors,
The second position information determining submodule is specifically configured to determine, if the number of the segmented word segments is more than one, an interest point number corresponding to each segmented word segment by querying the segmented word segment index; if the interest point number corresponding to any word segmentation segment is matched with the interest point numbers corresponding to other word segmentation segments, determining the matched interest point number as the interest point number corresponding to the search information.
13. The apparatus of any of claims 10-12, wherein the word segmentation segment index is an inverted index.
14. The apparatus according to any one of claims 11-12, wherein the point of interest number is stored separately from other index data of the word segmentation segment index, and the point of interest number is compressed by variable length coding.
15. A readable storage medium, characterized in that instructions in said storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the location search method according to any one of the method claims 1-7.
16. An electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for:
acquiring search information and determining the type corresponding to the search information;
If the search information is of the first type, querying offline data in a space index mode, and determining position information corresponding to the search information; the first type characterizes the search information as a category of places;
If the search information is of the second type, inquiring offline data in a word segmentation index mode, and determining position information corresponding to the search information; the second type characterizes the search information as a specific location; the word segmentation index comprises two layers of indexes, wherein the first layer of indexes are word segmentation segment indexes, and the second layer of indexes are numbered indexes;
Displaying the position corresponding to the search information in a map according to the position information corresponding to the search information;
the step of querying offline data in a spatial index mode and determining the position information corresponding to the search information comprises the following steps:
determining the area information corresponding to the search information, and determining the grid number corresponding to the area information;
determining a category corresponding to the search information and determining a category number corresponding to the category;
Inquiring a spatial index in offline data according to the grid number and the category number, and determining position information corresponding to the search information;
the spatial index comprises two layers of indexes, wherein the first layer of indexes are regional grid indexes, and the second layer of indexes are category indexes;
The step of inquiring the space index in the offline data according to the grid number and the category number to determine the position information corresponding to the search information comprises the following steps:
Inquiring a regional grid index according to the grid number, and determining a category index corresponding to the grid number;
and inquiring the category index corresponding to the grid number according to the category number, and determining the position information corresponding to the search information.
17. The electronic device of claim 16, wherein the determining the region information corresponding to the search information comprises at least one of:
acquiring the current position of a user, and determining the region information corresponding to the search information according to the current position;
And extracting a position keyword from the search information, and determining the region information corresponding to the search information according to the position keyword.
18. The electronic device of claim 16, wherein the querying the offline data using the word segmentation index to determine the location information corresponding to the search information comprises:
Word segmentation is carried out on the search information, and word segmentation fragments are obtained;
and inquiring word segmentation indexes in offline data according to the word segmentation fragments, and determining position information corresponding to the search information.
19. The electronic device of claim 18, wherein the determining location information corresponding to the search information according to the word segmentation index in the word segmentation segment query offline data comprises:
Inquiring a word segmentation segment index according to the word segmentation segment to obtain an interest point number corresponding to the search information;
And inquiring a number index according to the interest point number to obtain the position information corresponding to the search information.
20. The electronic device of claim 19, wherein the querying the segmentation segment index according to the segmentation segment to obtain the point of interest number corresponding to the search information comprises:
If the number of the word segmentation fragments is more than one, determining the corresponding interest point numbers of the word segmentation fragments by inquiring the index of the word segmentation fragments;
if the interest point number corresponding to any word segmentation segment is matched with the interest point numbers corresponding to other word segmentation segments, determining the matched interest point number as the interest point number corresponding to the search information.
21. The electronic device of any of claims 18-20, wherein the word segmentation segment index is an inverted index.
22. The electronic device of any of claims 19-20, wherein the point of interest number is stored separately from other index data of the word segmentation segment index, and the point of interest number is compressed using a variable length coding scheme.
CN201810362102.6A 2018-04-20 2018-04-20 Position searching method and device and electronic equipment Active CN110399566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810362102.6A CN110399566B (en) 2018-04-20 2018-04-20 Position searching method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810362102.6A CN110399566B (en) 2018-04-20 2018-04-20 Position searching method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110399566A CN110399566A (en) 2019-11-01
CN110399566B true CN110399566B (en) 2024-06-07

Family

ID=68319529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810362102.6A Active CN110399566B (en) 2018-04-20 2018-04-20 Position searching method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110399566B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010105A (en) * 2021-02-25 2021-06-22 深圳市广和通无线股份有限公司 Data backup method, device, equipment and computer readable storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2620770A1 (en) * 2005-08-30 2007-03-08 Google Inc. Local search
CN101350013A (en) * 2007-07-18 2009-01-21 北京灵图软件技术有限公司 Method and system for searching geographical information
CN101794307A (en) * 2010-03-02 2010-08-04 光庭导航数据(武汉)有限公司 Vehicle navigation POI (Point of Interest) search engine based on internetwork word segmentation idea
CN101998692A (en) * 2009-08-21 2011-03-30 中兴通讯股份有限公司 Method and device for establishing index and carrying out mixed searching on mobile terminal
CN102004793A (en) * 2010-12-08 2011-04-06 厦门雅迅网络股份有限公司 POI (Point Of Interest) position inquiry index file based on grid space and information inquiry method
CN102456055A (en) * 2010-10-28 2012-05-16 腾讯科技(深圳)有限公司 Method and device for retrieving interest points
CN102467544A (en) * 2010-11-16 2012-05-23 中国电信股份有限公司 Information smart searching method and system based on space fuzzy coding
CN103927310A (en) * 2013-01-14 2014-07-16 百度在线网络技术(北京)有限公司 Map data searching suggestion generation method and device
CN104008132A (en) * 2014-05-04 2014-08-27 深圳市北科瑞声科技有限公司 Voice map searching method and system
CN104951491A (en) * 2014-11-20 2015-09-30 百度在线网络技术(北京)有限公司 Information searching method and device
CN105787110A (en) * 2016-03-23 2016-07-20 苏州数字地图信息科技股份有限公司 Positioning method and device based on spatial search
KR101654314B1 (en) * 2015-12-16 2016-09-06 주식회사 포스웨이브 Distributed processing system in spatial data and method for operating the same

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169327B (en) * 2006-10-25 2011-02-09 高德软件有限公司 Information searching device
US8315953B1 (en) * 2008-12-18 2012-11-20 Andrew S Hansen Activity-based place-of-interest database
US20130325839A1 (en) * 2012-03-05 2013-12-05 TeleCommunication Communication Systems, Inc. Single Search Box Global
US9727595B2 (en) * 2013-09-20 2017-08-08 Uber Technologies, Inc. Location searching with category indices

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2620770A1 (en) * 2005-08-30 2007-03-08 Google Inc. Local search
CN101313300A (en) * 2005-08-30 2008-11-26 谷歌公司 Local search
CN101350013A (en) * 2007-07-18 2009-01-21 北京灵图软件技术有限公司 Method and system for searching geographical information
CN101998692A (en) * 2009-08-21 2011-03-30 中兴通讯股份有限公司 Method and device for establishing index and carrying out mixed searching on mobile terminal
CN101794307A (en) * 2010-03-02 2010-08-04 光庭导航数据(武汉)有限公司 Vehicle navigation POI (Point of Interest) search engine based on internetwork word segmentation idea
CN102456055A (en) * 2010-10-28 2012-05-16 腾讯科技(深圳)有限公司 Method and device for retrieving interest points
CN102467544A (en) * 2010-11-16 2012-05-23 中国电信股份有限公司 Information smart searching method and system based on space fuzzy coding
CN102004793A (en) * 2010-12-08 2011-04-06 厦门雅迅网络股份有限公司 POI (Point Of Interest) position inquiry index file based on grid space and information inquiry method
CN103927310A (en) * 2013-01-14 2014-07-16 百度在线网络技术(北京)有限公司 Map data searching suggestion generation method and device
CN104008132A (en) * 2014-05-04 2014-08-27 深圳市北科瑞声科技有限公司 Voice map searching method and system
CN104951491A (en) * 2014-11-20 2015-09-30 百度在线网络技术(北京)有限公司 Information searching method and device
KR101654314B1 (en) * 2015-12-16 2016-09-06 주식회사 포스웨이브 Distributed processing system in spatial data and method for operating the same
CN105787110A (en) * 2016-03-23 2016-07-20 苏州数字地图信息科技股份有限公司 Positioning method and device based on spatial search

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Wang Xiao-Shu ; Xie Yao ; Luo Huan.Cloud Computing Oriented Retrieval Technology Based on Big Data.2015 Seventh International Conference on Measuring Technology and Mechatronics Automation.2015,第[ 275-278]页. *
地图匹配算法中的待配路段快速筛选方法;杨新勇, 黄圣国;华南理工大学学报(自然科学版)(第02期);第[62-66]页 *
基于SpatialHadoop的空间大数据拓展研究;杨亚飞;汤 军;宋树华;陈建美;李功权;无线互联科技;20180225(第4期);第[100-104]页 *
建立于可视化地图组件的数据空间索引研究;王晓颖;;黑龙江水利科技;20160331;第44卷(第03期);第[41-43]页 *

Also Published As

Publication number Publication date
CN110399566A (en) 2019-11-01

Similar Documents

Publication Publication Date Title
US20210117726A1 (en) Method for training image classifying model, server and storage medium
CN105489220B (en) Voice recognition method and device
RU2636270C2 (en) Method and device of navigation
US9477687B2 (en) Mobile terminal and metadata setting method thereof
KR20180048221A (en) Method and device for navigating and method and device for generating a navigation video
EP3958110A1 (en) Speech control method and apparatus, terminal device, and storage medium
CN105956091B (en) Extended information acquisition method and device
CN107315487B (en) Input processing method and device and electronic equipment
CN108874827B (en) Searching method and related device
CN110472158B (en) Method and device for ordering search entries
RU2682000C2 (en) Interface display method and apparatus
CN104951522B (en) Method and device for searching
CN105488074B (en) Photo clustering method and device
US9706347B2 (en) Method and device for determining position
CN110715672A (en) Navigation path planning method and device
CN108241678B (en) Method and device for mining point of interest data
CN110399566B (en) Position searching method and device and electronic equipment
KR101895701B1 (en) Method and device for pushing user information
CN109799916B (en) Candidate item association method and device
CN107436900B (en) Information processing method and device based on search engine
CN110362760B (en) Method, device and medium for intelligently prompting search results
CN107037887B (en) Method and device for Chinese character input and electronic equipment
CN110019611B (en) Multi-destination query method and device
CN107976171B (en) Information processing method, device and equipment
CN108595716B (en) Information display method and device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant