WO2016115939A1 - 一种搜索方法、装置、设备及计算机存储介质 - Google Patents

一种搜索方法、装置、设备及计算机存储介质 Download PDF

Info

Publication number
WO2016115939A1
WO2016115939A1 PCT/CN2015/094396 CN2015094396W WO2016115939A1 WO 2016115939 A1 WO2016115939 A1 WO 2016115939A1 CN 2015094396 W CN2015094396 W CN 2015094396W WO 2016115939 A1 WO2016115939 A1 WO 2016115939A1
Authority
WO
WIPO (PCT)
Prior art keywords
search result
client
terminal
search
location
Prior art date
Application number
PCT/CN2015/094396
Other languages
English (en)
French (fr)
Inventor
郑学双
蒲鹏
Original Assignee
百度在线网络技术(北京)有限公司
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 百度在线网络技术(北京)有限公司 filed Critical 百度在线网络技术(北京)有限公司
Publication of WO2016115939A1 publication Critical patent/WO2016115939A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Definitions

  • the present disclosure relates to the field of Internet technologies, and in particular, to a search method, apparatus, device, and computer storage medium.
  • the user's search needs are sometimes related to the user's current geographic location, for example, searching for a web page related to the geographic location, or consulting a problem related to the geographic location.
  • the search results that are desired to be obtained are related to the geographic location, so the search results related to the geographic location need to have a reasonable position in all the search results to satisfy the user. Search needs.
  • the embodiments of the present disclosure provide a search method and apparatus, which can improve the accuracy of search results.
  • An aspect of an embodiment of the present disclosure provides a search method, including:
  • the foregoing aspect and any possible implementation manner further provide an implementation manner, where the obtaining the first search result according to the query term and the geographic location information of the terminal where the client is located, including:
  • the aspect as described above, and any possible implementation manner, further providing an implementation manner, where the client is located from the second search result according to the geographic location information of the terminal where the client is located The location-related search results for the terminal, including:
  • the search result is related to the geographic location of the terminal where the client is located.
  • the method further includes:
  • the aspect as described above and any possible implementation manner further provide an implementation manner of adjusting a presentation position of a search result related to a geographical location of a terminal where the client is located in the second search result, Obtaining the first search result, including:
  • Each of the search results in the second search result is sorted in descending order of weight values to obtain a sort result, and the sort result is used as the first search result.
  • the aspect as described above and any possible implementation manner further provide an implementation manner of adjusting a presentation position of a search result related to a geographical location of a terminal where the client is located in the second search result, Obtaining the first search result, including:
  • the presentation location of the other search results is located before the presentation location of the search result related to the geographic location of the terminal where the client is located.
  • the aspect as described above, and any possible implementation manner, further provide an implementation manner, where the first obtaining is performed according to the query term and the geographic location information of the terminal where the client is located Search results, including:
  • An aspect of an embodiment of the present disclosure provides a search apparatus, including:
  • Query input unit for obtaining a query word input by the user on the client
  • a location obtaining unit configured to obtain geographic location information of a terminal where the client is located
  • the search processing unit is configured to obtain the first search result according to the query word and the geographical location information of the terminal where the client is located.
  • search processing unit is specifically configured to:
  • search processing unit is configured to obtain, according to the geographic location information of the terminal where the client is located, from the second search result, When the search result of the location of the terminal where the client is located is specifically used for:
  • the search result is related to the geographic location of the terminal where the client is located.
  • the device further includes:
  • An index generating unit configured to obtain source code of the crawled webpage; and obtain location attribute information of the webpage from the source code; and generate, according to the webpage and location attribute information of the webpage The index database.
  • search processing unit is configured to adjust a search result related to a geographical location of the terminal where the client is located in the second search result.
  • the location of the presentation to obtain the first search result specifically for:
  • Each of the search results in the second search result is sorted in descending order of weight values to obtain a sort result, and the sort result is used as the first search result.
  • search processing unit is configured to adjust a search result related to a geographical location of the terminal where the client is located in the second search result. Showing the position to obtain the first search result, Specifically used for:
  • the presentation location of the other search results is located before the presentation location of the search result related to the geographic location of the terminal where the client is located.
  • the foregoing aspect and any possible implementation manner further provide an implementation manner, where the obtaining the first search result according to the query term and the geographic location information of the terminal where the client is located, including:
  • the first search result is obtained according to the query word input by the user and the geographical location information of the terminal where the client is located.
  • the obtained search result is a search result that matches the input query word and the geographical location of the terminal where the client is located.
  • the search result that satisfies the search requirement can be obtained in time.
  • the relevance of the recalled search results can be improved, thereby improving the accuracy of the recalled search results and improving search efficiency.
  • FIG. 1 is a schematic flowchart of a search method provided by an embodiment of the present disclosure
  • FIG. 2 is a diagram showing an example of search results provided by the prior art
  • FIG. 3 is a first exemplary diagram of a first search result provided by an embodiment of the present disclosure
  • FIG. 4 is a second exemplary diagram of a first search result provided by an embodiment of the present disclosure.
  • FIG. 5 is a functional block diagram of a search apparatus according to an embodiment of the present disclosure.
  • first, second, etc. may be used to describe search results in embodiments of the present disclosure, these search results should not be limited to these terms. These terms are only used to distinguish search results from each other.
  • the first search result may also be referred to as a second search result without departing from the scope of the embodiments of the present disclosure.
  • the second search result may also be referred to as a first search result.
  • the word “if” as used herein may be interpreted as “when” or “when” or “in response to determining” or “in response to detecting.”
  • the phrase “if determined” or “if detected (conditions or events stated)” may be interpreted as “when determined” or “in response to determination” or “when detected (condition or event stated)” Or “in response to a test (condition or event stated).”
  • FIG. 1 it is a schematic flowchart of a search method according to an embodiment of the present disclosure. As shown in the figure, the method includes the following steps:
  • terminals involved in the embodiments of the present disclosure may include, but are not limited to, a personal computer (PC), a personal digital assistant (PDA), a wireless handheld device, a tablet computer, and a tablet computer.
  • PC personal computer
  • PDA personal digital assistant
  • Mobile phones MP3 players, MP4 players, etc.
  • the execution body of S101 to S103 may be a search device, and the device may be located in an application of a local terminal, or may be a plug-in or a software development kit (SDK) in an application of the local terminal.
  • SDK software development kit
  • the functional unit, or may be located in the server, is not specifically limited in this embodiment of the present disclosure.
  • the application may be an application (nativeApp) installed on the terminal, or may be a web application (webApp) of the browser on the terminal, which is not limited by the embodiment of the disclosure.
  • the method of the present disclosure specifically describes the method of S101.
  • the step may specifically include:
  • the method for obtaining the query word input by the user on the client may include, but is not limited to:
  • the search request sent by the client may be received, and the search request carries a query word (Query) input by the user on the client. Therefore, according to the search request sent by the client, the query word input by the user on the client may be obtained.
  • Query query word
  • the client may receive the first query word “the market” input by the user, and then the client sends a search request carrying the query word “the market” to initiate a search operation for the query word “the market”. Then get the search results.
  • the method of the present disclosure specifically describes the method of S102.
  • the step may specifically include:
  • the method for obtaining the geographic location information of the terminal where the client is located may include, but is not limited to, the following two types:
  • the first type after receiving the search request sent by the client, the positioning technology can be used to perform a positioning operation on the terminal where the client is located to obtain the geographical location information of the terminal where the client is located.
  • the positioning technology may include, but is not limited to, a Global Positioning System (GPS) positioning technology, a base station positioning technology, or a Wireless-Fidelity (Wi-Fi) positioning technology.
  • GPS Global Positioning System
  • Wi-Fi Wireless-Fidelity
  • the second type the search request sent by the receiving client, in addition to carrying the query word input by the user on the client, may also carry the IP address of the terminal where the client is located, so that the IP address can be extracted from the search request, and then The mapping between the IP address and the geographic location obtains the geographical location information of the terminal where the client is located.
  • the query term input by the user on the client may be used to determine whether the search requirement of the user is related to the geographic location of the terminal where the client is located. For example, it may be determined according to the query term whether the query word includes a website providing information, or whether the query word is a question for a geographical location. If the query word includes the name of the website providing the information, or the query word is for the geographical location question consultation, it can be determined that the user's search demand is related to the geographical location of the terminal where the client is located, and thus the terminal where the client is located can be obtained. Geographic location information.
  • the query name does not include the name of the website providing the information, or if the query word is not for the problem of the geographical location of the terminal, it is determined that the search requirement of the user is not related to the geographical location of the terminal where the client is located, and the client is not obtained.
  • the geographical location information of the terminal is located, but the search result is directly searched in the webpage database according to the query word to obtain the search result matching the query word.
  • the query words are “Gathering Network” and “Wedding Planning”, which provide information such as the name of the website.
  • the query word is “Where to buy used cars”, such as consultation on geographical location.
  • the first method of S103 is specifically described based on the search method, the second embodiment and the third embodiment provided in the first embodiment.
  • the step may specifically include:
  • the method for obtaining the first search result according to the query term and the geographic location information of the terminal where the client is located may include, but is not limited to:
  • a webpage matching the query word is obtained from a webpage database as a second search result. Then, according to the geographical location information of the terminal where the client is located, from the second search result, a search result related to the geographical location of the terminal where the client is located is obtained. Finally, adjusting a presentation position of the search result related to the geographical location of the terminal where the client is located in the second search result to obtain the first search result fruit.
  • the search may be performed in the webpage database according to the query word, all the webpages containing the query words are found out from the webpage database, and the found webpages are sorted according to the ranking algorithm, and the webpage obtained by the sorting is taken as The query result matches the second search result.
  • the method for obtaining, from the second search result, the search result related to the geographic location of the terminal where the client is located may include, but is not limited to, according to the geographic location information of the terminal where the client is located:
  • the location attribute information of each search result in the second search result is obtained from a preset index database, and the location attribute information may include detailed information of a geographical location that matches the content provided by the search result. Then, according to the geographical location information of the terminal where the client is located and the location attribute information of each search result, obtaining, from the second search result, that the provided content can match the geographical location of the terminal where the client is located Search results as a search result related to the geographic location of the terminal where the client is located.
  • the index database may be generated in advance before the location attribute information of each search result in the second search result is obtained from the index database.
  • the method for generating the index database may include, but is not limited to: first, crawling a webpage from a website by using a crawler tool, then obtaining source code of the crawled webpage, and obtaining the location of the webpage from the source code. Attribute information. Finally, the index database is generated according to the webpage and location attribute information of the webpage.
  • a Meta tag is generated in advance for a webpage related to a geographical location, and the Meta tag may include a name attribute and a tag content; wherein the tag content may include location attribute information of the webpage, such as a province name, a city name, and coordinate information.
  • Meta tag can be:
  • the value of the name attribute is location, indicating that the Meta tag is a tag for saving location attribute information of the webpage.
  • Content indicates the content of the label. In the label content, the province name is Beijing and the city name is Beijing.
  • Table 1 lists some provinces in China and some cities in provinces and cities.
  • the value of coord represents the latitude and longitude coordinates corresponding to the web page.
  • Baidu latitude and longitude coordinates (bd09ll) are used.
  • the value of the coord may be the latitude and longitude coordinates of the central point of the city.
  • the value of the coord may be the coordinates of the specific address.
  • the address resolution application programming interface (API) provided by the Baidu map server may be invoked according to the name of the geographic location to obtain the latitude and longitude coordinates corresponding to the geographical location.
  • the Meta tag is generated for the webpage related to the geographical location
  • the Meta tag is added to the source code of the webpage, so that the location attribute information of the webpage is carried by the source code of the webpage.
  • Meta tag to the ⁇ head> tag in the source code of the web page, such as:
  • the location attribute information can be configured for the webpage.
  • the meta tag of the webpage can be obtained from the source code of the crawled webpage, and then The location attribute information of the webpage is parsed in the Meta tag, and finally the index relationship between the webpage and the location attribute information is established, and an index database is generated.
  • the location attribute information of each search result can be found to be related to the geographical location of the terminal where the client is located. Those search results.
  • the method for adjusting the presentation position of the search result related to the geographic location of the terminal where the client is located in the second search result, and the method for obtaining the first search result may include, but is not limited to, the following three :
  • the first type increasing the weight value of the search result related to the geographical location of the terminal where the client is located. Then, each search result in the second search result is sorted in descending order of weight values to obtain a sort result, and the sort result is used as the first search result.
  • the original weight value of the search result related to the geographical location of the terminal where the client is located may be multiplied by an adjustment coefficient greater than 1, or the original weight value of the search result related to the geographical location of the terminal where the client is located may be added.
  • the display position of the search result related to the geographical location of the terminal where the client is located is increased, so that the geographically related search result of the terminal where the client is located is in the first search result.
  • the presentation position will be higher than the presentation position in the second search result.
  • the weight value of the search result other than the search result related to the geographical location of the terminal where the client is located may be multiplied by an adjustment coefficient greater than 0 and less than 1 in the second search result, or And subtracting, from the second search result, a weight value of the search result other than the search result related to the geographical location of the terminal where the client is located, and subtracting an adjustment amount, thereby reducing the division of the second search result
  • the weight value of other search results other than the geographically relevant search result of the terminal where the client is located may be multiplied by an adjustment coefficient greater than 0 and less than 1 in the second search result, or And subtracting, from the second search result, a weight value of the search result other than the search result related to the geographical location of the terminal where the client is located, and subtracting an adjustment amount, thereby reducing the division of the second search result
  • the weight value of other search results other than the geographically relevant search result of the terminal where the client is located may be multiplied by an adjustment coefficient greater than 0 and less than 1 in the second search
  • the weight value of the search result other than the search result related to the geographical location of the terminal where the client is located in the second search result is reduced, and the second search result is in the terminal with the client
  • the weight value of the geographically-related search result is not changed, so after the weight values are sorted in descending order, the display position of the search result related to the geographical location of the terminal where the client is located is improved, so that The location of the search result related to the geographical location of the terminal where the client is located in the first search result will be higher than the presentation position in the second search result.
  • the original weight value of each search result in the second search result can be obtained from the webpage database. Wherein, based on the correlation between the search result and the query term Degree, the original weight value of the search result is determined.
  • the display position of the search result related to the geographic location of the terminal where the client is located is exchanged with the display position of the other search results in the second search result; wherein, in the second search result The presentation location of the other search results is located before the presentation location of the search results related to the geographic location of the terminal where the client is located.
  • the display position of the search result related to the geographical location of the terminal where the client is located in the second search result is the second item, and after the second search result is presented to the user for a period of time, the user is found in the second search result.
  • the search result selected for the first time is the search result related to the geographical location of the terminal where the client is located, instead of the search result indicating that the location is the first one, indicating that the search result related to the geographical location of the terminal where the client is located is more capable.
  • the presentation position of the search result of the second item related to the geographical location of the terminal where the client is located can be exchanged with the presentation position of the first search result.
  • search results related to the geographic location of the terminal where the client is located are found from the search results, and the search results are preferentially displayed, so that when the search requirement of the user is related to the geographical location of the terminal used by the user, In this way, search results that meet the search needs can be obtained in the search results, thereby improving search efficiency and improving the accuracy of search results.
  • the second method of the S103 is specifically described in the embodiment of the present disclosure.
  • the step may specifically include:
  • the method for obtaining the first search result according to the query term and the geographic location information of the terminal where the client is located may include, but is not limited to:
  • Searching in the webpage database to obtain search results that match the query term and the geographic location information of the terminal where the client is located, as the first search result.
  • the search may be performed in the webpage database according to the query term and the geographical location information of the terminal where the client is located, and all the webpages including the query term and the geographical location information are found out from the webpage database, and the search is performed according to the ranking algorithm.
  • the out-out webpages are sorted, and the webpages obtained by the sorting are used as search results matching the query words and the geographical location information of the terminal where the client is located.
  • the geographical location information of the terminal where the client is located is also taken as a reference, so that the obtained search result is the input query term and the geography of the terminal where the client is located.
  • the location information matches the search results, so that when the user's search demand is related to the geographic location of the terminal used by the user, the search result that satisfies the search requirement can be obtained in time, thereby improving the relevance of the search result and Accuracy and improve search efficiency.
  • FIG. 2 is an exemplary diagram of search results provided by the prior art.
  • users located in different regions use the client to input the query word “Marking Network”, and then see The search results are the same, that is, the search results shown in FIG. 2, and the search results generally only satisfy the search needs of users located in Beijing.
  • FIG. 3 is a first example diagram of a first search result provided by the embodiment of the present disclosure.
  • the query word input by the user on the client is “the market”, indicating that the search requirement of the user is I want to open the “Jiji.com”, and the information provided by “Jianji.com” is different according to the geographical location. Therefore, according to the query term, it can be determined that the user’s search demand is the geography of the terminal where the client currently uses the client. Location-related, therefore, The geographical location information of the terminal where the client currently used by the user is located, and the geographical location information of the terminal where the client is located in FIG. 3 is “Chengdu”.
  • the search result related to the geographical location "Chengdu” of the terminal where the client is located is found in the obtained search result, and the customer is displayed on the first page of the search result page.
  • the search result related to the geographical location "Chengdu” of the terminal where the terminal is located can display the search related to the geographical location "Chengdu” of the terminal where the client is located in the first presentation position on the first page of the search result page. As a result, the user can obtain the desired search result on the first page of the search result.
  • FIG. 4 is a second example diagram of the first search result provided by the embodiment of the present disclosure.
  • the query word input by the user on the client is “the market”, indicating that the search requirement of the user is I want to open the “Jiji.com”, and the information provided by “Jianji.com” is different according to the geographical location. Therefore, according to the query term, it can be determined that the user’s search demand is the geography of the terminal where the client currently uses the client. The location is related. Therefore, the geographic location information of the terminal where the client is currently used can be obtained.
  • the geographic location information of the terminal where the client is located in FIG. 4 is “Shanghai”.
  • the search result related to the geographical location "Shanghai” of the terminal where the client is located is found in the obtained search result, and the customer is displayed on the first page of the search result page.
  • the search result related to the geographical location "Shanghai” of the terminal where the terminal is located can display the search related to the geographical location "Shanghai" of the terminal where the client is located in the first presentation position on the first page of the search result page. As a result, the user can obtain the desired search result on the first page of the search result.
  • Embodiments of the present disclosure further provide for implementing the steps and methods in the foregoing method embodiments. Embodiments are set.
  • FIG. 5 is a functional block diagram of a search apparatus according to an embodiment of the present disclosure. As shown, the device includes:
  • the query input unit 501 is configured to obtain a query word input by the user on the client;
  • a location obtaining unit 502 configured to obtain geographic location information of a terminal where the client is located;
  • the search processing unit 503 is configured to obtain a first search result according to the query word and geographic location information of the terminal where the client is located.
  • the search processing unit 503 is specifically configured to:
  • the search processing unit 503 is configured to obtain, according to the geographical location information of the terminal where the client is located, a search result related to a geographical location of the terminal where the client is located, from the second search result, specifically Used for:
  • the device further includes:
  • a webpage obtaining unit 504 configured to crawl a webpage from a website
  • An index generating unit 505 configured to acquire source code of the crawled webpage; and obtain location attribute information of the webpage from the source code; and, according to the webpage and location attribute information of the webpage, The index database is generated.
  • the search processing unit 503 is configured to adjust a presentation position of a search result related to a geographical location of the terminal where the client is located in the second search result, to obtain the first search result, specifically to:
  • Each of the search results in the second search result is sorted in descending order of weight values to obtain a sort result, and the sort result is used as the first search result.
  • the search processing unit 503 is configured to adjust a presentation position of a search result related to a geographical location of the terminal where the client is located in the second search result, to obtain the first search result, specifically to:
  • the presentation location of the other search results is located before the presentation location of the search result related to the geographic location of the terminal where the client is located.
  • the search processing unit 503 is specifically configured to:
  • the number of web pages Searching is performed in the library to obtain search results that match the query term and the geographic location information of the terminal where the client is located, as the first search result.
  • the first search result is obtained according to the query word input by the user and the geographical location information of the terminal where the client is located.
  • the obtained search result is a search result that matches the input query word and the geographical location of the terminal where the client is located.
  • the same search result is obtained.
  • the technical solution cannot satisfy the user's search requirement, and the user needs to re-enter the query word or require the user to perform page-by-page screening in several search result pages.
  • the search requirement of the user is related to the geographical location of the terminal used by the user, the search result that can satisfy the search requirement can be obtained in time. Therefore, the relevance of the recalled search results can be improved, thereby improving the accuracy of the recalled search results, improving the search efficiency, meeting the user's search needs in time, and improving the user search experience.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative, for example, the division of the elements is merely a logical functional division, There may be additional divisions in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in various embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional unit described above is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present disclosure. Part of the steps.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开实施例提供了一种搜索方法、装置、设备及计算机存储介质。一方面,本公开实施例通过获得用户在客户端输入的查询词;从而,获得所述客户端所在终端的地理位置信息;进而,依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果。因此,本公开实施例提供的技术方案能够提高搜索结果的准确性。

Description

一种搜索方法、装置、设备及计算机存储介质
本申请要求了申请日为2015年01月22日,申请号为201510033092.8发明名称为“一种搜索方法及装置”的中国专利申请的优先权。
技术领域
本公开涉及互联网技术领域,尤其涉及一种搜索方法、装置、设备及计算机存储介质。
背景技术
目前,用户在使用搜索功能时,用户的搜索需求有时会与用户当前所在地理位置相关,例如,搜索与地理位置相关的网页,或者,进行与地理位置有关的问题咨询等。在这种搜索场景下,对于地理位置不同的用户,希望获得的搜索结果是与地理位置相关的,因此与地理位置相关的搜索结果有必要在全部搜索结果中具有合理的位置,才能够满足用户的搜索需求。
然而,现有技术中,在依据用户输入的查询词进行搜索时,在地理位置不同的用户在相同的客户端上输入相同的查询词时,获得的搜索结果都是一样的,并没有针对不同地理位置对搜索结果进行处理,因此导致获得的搜索结果的准确性比较低。
发明内容
有鉴于此,本公开实施例提供了一种搜索方法及装置,可以实现提高搜索结果的准确性。
本公开实施例的一方面,提供一种搜索方法,包括:
获得用户在客户端输入的查询词;
获得所述客户端所在终端的地理位置信息;
依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果,包括:
依据所述查询词,从网页数据库获得与所述查询词相匹配的网页,以作为第二搜索结果;
依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果;
调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果,包括:
从索引数据库中获得所述第二搜索结果中每条搜索结果的位置属性信息,所述位置属性信息包括与该搜索结果所提供的内容相匹配的地理位置的详细信息;
依据所述客户端所在终端的地理位置信息和所述每条搜索结果的位置属性信息,从所述第二搜索结果中,获得所提供的内容能够匹配所述客户端所在终端的地理位置的搜索结果,以作为与所述客户端所在终端的地理位置相关的搜索结果。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式, 所述从索引数据库中获得所述第二搜索结果中每条搜索结果的位置属性信息之前,所述方法还包括:
从网站上爬取网页;
获取爬取的所述网页的源代码;
从所述源代码中获得所述网页的位置属性信息;
依据所述网页以及所述网页的位置属性信息,生成所述索引数据库。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果,包括:
增加与所述客户端所在终端的地理位置相关的搜索结果的权重值,或者,减小所述第二搜索结果中,除与所述客户端所在终端的地理位置相关的搜索结果以外的其他搜索结果的权重值;
按照权重值由大到小的顺序对所述第二搜索结果中的每条搜索结果进行排序,以获得排序结果,将所述排序结果作为所述第一搜索结果。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果,包括:
将与所述客户端所在终端的地理位置相关的搜索结果的展现位置,与所述第二搜索结果中其他搜索结果的展现位置进行调换;
其中,在所述第二搜索结果中,所述其他搜索结果的展现位置位于与所述客户端所在终端的地理位置相关的搜索结果的展现位置之前。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述依据所述查询词和所述客户端所在终端的地理位置信息,获得第一 搜索结果,包括:
依据所述查询词和所述客户端所在终端的地理位置信息,在网页数据库中进行搜索,以获得与所述查询词和所述客户端所在终端的地理位置信息都相匹配的搜索结果,以作为所述第一搜索结果。
本公开实施例的一方面,提供一种搜索装置,包括:
查询输入单元,用于获得用户在客户端输入的查询词;
位置获取单元,用于获得所述客户端所在终端的地理位置信息;
搜索处理单元,用于依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述搜索处理单元,具体用于:
依据所述查询词,从网页数据库获得与所述查询词相匹配的网页,以作为第二搜索结果;
依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果;
调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述搜索处理单元用于依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果时,具体用于:
从索引数据库中获得所述第二搜索结果中每条搜索结果的位置属性信息,所述位置属性信息包括与该搜索结果所提供的内容相匹配的地理 位置的详细信息;
依据所述客户端所在终端的地理位置信息和所述每条搜索结果的位置属性信息,从所述第二搜索结果中,获得所提供的内容能够匹配所述客户端所在终端的地理位置的搜索结果,以作为与所述客户端所在终端的地理位置相关的搜索结果。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述装置还包括:
网页获取单元,用于从网站上爬取网页;
索引生成单元,用于获取爬取的所述网页的源代码;以及,从所述源代码中获得所述网页的位置属性信息;以及,依据所述网页以及所述网页的位置属性信息,生成所述索引数据库。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述搜索处理单元用于调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果时,具体用于:
增加与所述客户端所在终端的地理位置相关的搜索结果的权重值,或者,减小所述第二搜索结果中,除与所述客户端所在终端的地理位置相关的搜索结果以外的其他搜索结果的权重值;
按照权重值由大到小的顺序对所述第二搜索结果中的每条搜索结果进行排序,以获得排序结果,将所述排序结果作为所述第一搜索结果。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述搜索处理单元用于调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果时, 具体用于:
将与所述客户端所在终端的地理位置相关的搜索结果的展现位置,与所述第二搜索结果中其他搜索结果的展现位置进行调换;
其中,在所述第二搜索结果中,所述其他搜索结果的展现位置位于与所述客户端所在终端的地理位置相关的搜索结果的展现位置之前。
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果,包括:
依据所述查询词和所述客户端所在终端的地理位置信息,在网页数据库中进行搜索,以获得与所述查询词和所述客户端所在终端的地理位置信息都相匹配的搜索结果,以作为所述第一搜索结果。
由以上技术方案可以看出,本公开实施例具有以下有益效果:
本公开实施例所提供的技术方案中,依据用户输入的查询词以及客户端所在终端的地理位置信息,去获取第一搜索结果。这样,获得的搜索结果是与输入的查询词以及客户端所在终端的地理位置都相匹配的搜索结果。这样,当用户的搜索需求与用户所使用的终端的地理位置相关时,就可以及时获得能够满足搜索需求的搜索结果。因此,可以提高召回的搜索结果的相关性,从而提高召回的搜索结果的准确性,以及提高搜索效率。
附图说明
图1是本公开实施例所提供的搜索方法的流程示意图;
图2是现有技术所提供的搜索结果的示例图;
图3是本公开实施例所提供的第一搜索结果的第一示例图;
图4是本公开实施例所提供的第一搜索结果的第二示例图;
图5是本公开实施例所提供的搜索装置的功能方块图。
具体实施方式
为了使本公开的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本公开进行详细描述。
应当明确,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本公开保护的范围。
在本公开实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
应当理解,尽管在本公开实施例中可能采用术语第一、第二等来描述搜索结果,但这些搜索结果不应限于这些术语。这些术语仅用来将搜索结果彼此区分开。例如,在不脱离本公开实施例范围的情况下,第一搜索结果也可以被称为第二搜索结果,类似地,第二搜索结果也可以被称为第一搜索结果。
取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取 决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。
本公开实施例给出一种搜索方法,请参考图1,其为本公开实施例所提供的搜索方法的流程示意图,如图所示,该方法包括以下步骤:
S101,获得用户在客户端输入的查询词。
S102,获得所述客户端所在终端的地理位置信息。
S103,依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果。
需要说明的是,本公开实施例中所涉及的终端可以包括但不限于个人计算机(Personal Computer,PC)、个人数字助理(Personal Digital Assistant,PDA)、无线手持设备、平板电脑(Tablet Computer)、手机、MP3播放器、MP4播放器等。
需要说明的是,S101~S103的执行主体可以为搜索装置,该装置可以位于本地终端的应用,或者还可以为位于本地终端的应用中的插件或软件开发工具包(Software Development Kit,SDK)等功能单元,或者,也可以位于服务器,本公开实施例对此不进行特别限定。
可以理解的是,所述应用可以是安装在终端上的应用程序(nativeApp),或者还可以是终端上的浏览器的一个网页程序(webApp),本公开实施例对此不进行限定。
实施例二
基于上述实施例一所提供的搜索方法,本公开实施例对S101的方法进行具体描述。该步骤具体可以包括:
举例说明,本公开实施例中,获得用户在客户端输入的查询词的方法可以包括但不限于:
可以接收客户端发送的搜索请求,该搜索请求中携带用户在客户端输入的查询词(Query),因此,依据所述客户端发送的搜索请求,就可以获得用户在客户端输入的查询词。
例如,客户端可以接收到用户输入的第一查询词“赶集网”,然后客户端发出携带该查询词“赶集网”的搜索请求,用以发起针对该查询词“赶集网”的搜索操作,进而获得搜索结果。
实施例三
基于上述实施例一所提供的搜索方法和实施例二,本公开实施例对S102的方法进行具体描述。该步骤具体可以包括:
举例说明,本公开实施例中,获得所述客户端所在终端的地理位置信息的方法可以包括但不限于以下两种:
第一种:在收到客户端发送的搜索请求后,可以利用定位技术,对该客户端所在终端执行定位操作,以获得客户端所在终端的地理位置信息。
优选地,所述定位技术可以包括但不限于:全球定位***(Global Positioning System,GPS)定位技术、基站定位技术或者无线保真(Wireless-Fidelity,Wi-Fi)定位技术等。
第二种:接收的客户端发送的搜索请求中,除了携带用户在客户端输入的查询词,还可以携带客户端所在终端的IP地址,这样,可以从搜索请求中提取该IP地址,然后依据IP地址与地理位置的对应关系,获得该客户端所在终端的地理位置信息。
可选地,在对该客户端所在终端执行定位操作之前,可以先依据用户在客户端输入的查询词,判断用户的搜索需求是否与客户端所在终端的地理位置相关。例如,可以依据查询词,判断该查询词中是否包含提供信息的网站,或者,判断查询词是否为针对地理位置的问题咨询。若该查询词中包含提供信息的网站名称,或者,查询词是针对地理位置的问题咨询,则可以确定用户的搜索需求是与客户端所在终端的地理位置相关的,进而可以获得客户端所在终端的地理位置信息。反之,若该查询词中没有包含提供信息的网站名称,或者,查询词不是针对终端的地理位置的问题咨询,则确定用户的搜索需求与客户端所在终端的地理位置无关,则不获得客户端所在终端的地理位置信息,而是依据查询词直接在网页数据库中进行搜索,以获得与查询词相匹配的搜索结果。如查询词为“赶集网”、“婚礼策划”这种提供信息的网站名称,再如,查询词是“在哪儿买二手车”这种针对地理位置的问题咨询等。
实施例四
基于上述实施例一所提供的搜索方法、实施例二和实施例三,本公开实施例对S103的第一种方法进行具体描述。该步骤具体可以包括:
优选地,本公开实施例中,依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果的方法可以包括但不限于:
首先,依据所述查询词,从网页数据库获得与所述查询词相匹配的网页,以作为第二搜索结果。然后,依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果。最后,调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结 果。
优选地,可以依据该查询词,在网页数据库中进行搜索,从网页数据库中找出所有包含该查询词的网页,并且依据排名算法对找出的网页进行排序,将排序后获得的网页作为与所述查询词相匹配的第二搜索结果。
优选地,依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果的方法可以包括但不限于:
首先,从预设的索引数据库中获得所述第二搜索结果中,每条搜索结果的位置属性信息,该位置属性信息可以包括与该搜索结果所提供的内容相匹配的地理位置的详细信息。然后,依据所述客户端所在终端的地理位置信息和所述每条搜索结果的位置属性信息,从所述第二搜索结果中,获得所提供的内容能够匹配所述客户端所在终端的地理位置的搜索结果,以作为与所述客户端所在终端的地理位置相关的搜索结果。
可选地,在从索引数据库中获得所述第二搜索结果中每条搜索结果的位置属性信息之前,可以预先生成所述索引数据库。
举例说明,生成索引数据库的方法可以包括但不限于:首先,利用爬虫工具从网站上爬取网页,然后获取爬取的所述网页的源代码,并从该源代码中获得所述网页的位置属性信息。最后,依据所述网页以及所述网页的位置属性信息,生成所述索引数据库。
例如,预先为与地理位置相关的网页生成Meta标签,该Meta标签可以包括名称属性和标签内容;其中,该标签内容可以包括该网页的位置属性信息,如省份名称、城市名称和坐标信息。
例如,Meta标签可以为:
<meta name=”location”content=”province=北京;city=北京;
coord=116.306522891,40.0555055968”>
该Meta标签中,名称属性的值为location,表示该Meta标签是用于保存网页的位置属性信息的标签。Content表示标签内容,该标签内容中,省份名称为北京,城市名称为北京。
如表1所示,表1为中国的部分省份以及省市中的部分城市列表。
表1
省份 城市
安徽 合肥、蚌埠、亳州、滁州、阜阳、淮北、淮南、黄山、六安
福建 福州、龙岩、南平、宁德、泉州、厦门、漳州
广东 广州、潮州、东莞、佛山、江门、梅州、汕头、韶关、深圳
海南 海口、白沙、保亭、昌江、澄迈、东方、琼海琼中、三亚
河北 石家庄、保定、沧州、承德、邯郸、廊坊、秦皇岛、唐山
湖南 长沙、常德、衡阳、怀化、娄底、邵阳、湘潭、湘西州、益阳
江苏 南京、常州、淮安、连云港、南通、苏州、无锡、徐州
吉林 长春、白城、白山、吉林市、四平、通化、延边
辽宁 沈阳、鞍山、本溪、大连、丹东、抚顺、锦州、盘锦
四川 成都、阿坝州、达州、德阳、甘孜州、广安、广元、乐山
云南 昆明、大理州、丽江、临沧、普洱、昭通、西双版纳
浙江 杭州、嘉兴、金华、宁波、绍兴、温州
北京 北京
上海 上海
天津 天津
重庆 重庆
香港 香港
澳门 澳门
上述Meta标签中,coord的值表示该网页对应的经纬度坐标。本示例中,采用的是百度经纬度坐标(bd09ll)。其中,若Meta标签中地理位置是城市级别的,则coord的值可以为城市的中心点的经纬度坐标。若Meta标签中地理位置是具体地址,则coord的值可以为该具体地址的坐标。优选的,可以依据地理位置的名称,调用百度地图服务器提供的地址解析应用程序编程接口(Application Programming Interface,API),来获取该地理位置对应的经纬度坐标。
在为与地理位置相关的网页生成Meta标签后,在该网页的源代码中添加该Meta标签,从而实现通过网页的源代码携带网页的位置属性信息。
例如,可以在该网页的源代码中<head>标签中添加该Meta标签,如:
<head>
<meta name=”location”content=”province=北京;city=北京;
coord=116.306522891,40.0555055968”>
……
</head>
在网页的源代码中添加Meta标签后,就可以实现为网页配置了位置属性信息,当爬虫爬取网页后,就可以从爬取到的网页的源代码中获得该网页的Meta标签,进而从Meta标签中解析出该网页的位置属性信息,最后建立该网页与位置属性信息之间的索引关系,生成索引数据库。这样,当需要从大量的搜索结果中,找到与客户端所在终端的地理位置相关的搜索结果时,就可以依据每条搜索结果的位置属性信息,找到其中与客户端所在终端的地理位置相关的那些搜索结果。
优选地,所述调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果的方法可以包括但不限于以下三种:
第一种:增加与所述客户端所在终端的地理位置相关的搜索结果的权重值。然后,按照权重值由大到小的顺序对所述第二搜索结果中的每条搜索结果进行排序,以获得排序结果,将所述排序结果作为所述第一搜索结果。
例如,可以将与客户端所在终端的地理位置相关的搜索结果原始的权重值乘以一个大于1的调整系数,或者,将与客户端所在终端的地理位置相关的搜索结果原始的权重值加上一个调整量,从而实现增加与客户端所在终端的地理位置相关的搜索结果的权重值。
这里,由于增加了与客户端所在终端的地理位置相关的搜索结果的权重值,而第二搜索结果中其他搜索结果的权重值没有改变,所以按照 权重值由大到小的顺序进行排序之后,与客户端所在终端的地理位置相关的搜索结果的展现位置会提高,使得所述客户端所在终端的地理位置相关的搜索结果在第一搜索结果中的展现位置,将高于在第二搜索结果中的展现位置。
第二种:减小所述第二搜索结果中,除与所述客户端所在终端的地理位置相关的搜索结果以外的其他搜索结果的权重值。然后,按照权重值由大到小的顺序对所述第二搜索结果中的每条搜索结果进行排序,以获得排序结果,将所述排序结果作为所述第一搜索结果。
例如,可以将所述第二搜索结果中除与所述客户端所在终端的地理位置相关的搜索结果以外的其他搜索结果的权重值,乘以一个大于0且小于1的调整系数,或者,将所述第二搜索结果中除与所述客户端所在终端的地理位置相关的搜索结果以外的其他搜索结果的权重值,减去一个调整量,从而实现减小所述第二搜索结果中除与所述客户端所在终端的地理位置相关的搜索结果以外的其他搜索结果的权重值。
这里,由于减小了所述第二搜索结果中除与所述客户端所在终端的地理位置相关的搜索结果以外的其他搜索结果的权重值,而第二搜索结果中与所述客户端所在终端的地理位置相关的搜索结果的权重值没有改变,所以按照权重值由大到小的顺序进行排序之后,与所述客户端所在终端的地理位置相关的搜索结果的展现位置会提高,使得与所述客户端所在终端的地理位置相关的搜索结果在第一搜索结果中的展现位置,将高于在第二搜索结果中的展现位置。
需要说明的是,第二搜索结果中每条搜索结果原始的权重值都可以从网页数据库中获得。其中,可以依据该搜索结果与查询词之间的相关 度,确定该搜索结果原始的权重值。
第三种:将与所述客户端所在终端的地理位置相关的搜索结果的展现位置,与所述第二搜索结果中其他搜索结果的展现位置进行调换;其中,在所述第二搜索结果中,所述其他搜索结果的展现位置位于与所述客户端所在终端的地理位置相关的搜索结果的展现位置之前。
例如,与所述客户端所在终端的地理位置相关的搜索结果在第二搜索结果中的展现位置是第二条,将第二搜索结果展现给用户一段时间后,发现用户在第二搜索结果中首次选择的搜索结果是该与该客户端所在终端的地理位置相关的搜索结果,而不是展现位置是第一条的搜索结果,表示与所述客户端所在终端的地理位置相关的搜索结果更能满足用户的搜索需求。因此,可以将第二条的与所述客户端所在终端的地理位置相关的搜索结果的展现位置,与第一条搜索结果的展现位置调换。
本实施例中,从搜索结果中找到与客户端所在终端的地理位置相关的搜索结果,并对这些搜索结果进行优先展现,这样,当用户的搜索需求与用户所使用的终端的地理位置相关时,就可以在搜索结果中及时获得能够满足搜索需求的搜索结果,从而可以提高搜索效率,提高搜索结果的准确性。
实施例五
基于上述实施例一所提供的搜索方法、实施例二和实施例三,本公开实施例对S103的第二种方法进行具体描述。该步骤具体可以包括:
举例说明,本公开实施例中,依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果的方法可以包括但不限于:
首先,依据所述查询词和所述客户端所在终端的地理位置信息,在 网页数据库中进行搜索,以获得与所述查询词和所述客户端所在终端的地理位置信息都相匹配的搜索结果,以作为所述第一搜索结果。
优选地,可以依据该查询词和客户端所在终端的地理位置信息,在网页数据库中进行搜索,从网页数据库中找出所有包含该查询词和该地理位置信息的网页,并且依据排名算法对找出的网页进行排序,将排序后获得的网页作为与所述查询词和客户端所在终端的地理位置信息都相匹配的搜索结果。
本实施例中,在依据查询词获得相匹配的搜索结果时,还同时将客户端所在终端的地理位置信息作为参考,这样,获得的搜索结果是与输入的查询词以及客户端所在终端的地理位置信息都相匹配的搜索结果,从而,当用户的搜索需求与用户所使用的终端的地理位置相关时,就可以及时获得能够满足搜索需求的搜索结果,因此,可以提高搜索结果的相关性和准确性,以及提高搜索效率。
实施例六
请参考图2,其为现有技术所提供的搜索结果的示例图,如图所示,现有技术中,位于不同地域的用户使用客户端输入查询词“赶集网”后,所看到的搜索结果是相同的,即图2所示的搜索结果,而该搜索结果一般只能满足位于北京的用户的搜索需求。
请参考图3,其为本公开实施例所提供的第一搜索结果的第一示例图,如图所示,用户在客户端上输入的查询词为“赶集网”,表示用户的搜索需求是想打开“赶集网”,而“赶集网”所提供的信息是依据地理位置的不同而不同,因此,依据该查询词,可以确定用户的搜索需求是与用户当前使用的客户端所在终端的地理位置相关的,因此,可以获 取用户当前使用的客户端所在终端的地理位置信息,图3中客户端所在终端的地理位置信息是“成都”。在依据输入的查询词“赶集网”进行搜索后,在获得的搜索结果中找到与客户端所在终端的地理位置“成都”相关的搜索结果,并在搜索结果页的第一页展现该与客户端所在终端的地理位置“成都”相关的搜索结果,如图3所示,可以在搜索结果页的第一页中第一条展现位置展现与客户端所在终端的地理位置“成都”相关的搜索结果,这样在搜索结果的第一页用户就可以获取到所需要的搜索结果。
请参考图4,其为本公开实施例所提供的第一搜索结果的第二示例图,如图所示,用户在客户端上输入的查询词为“赶集网”,表示用户的搜索需求是想打开“赶集网”,而“赶集网”所提供的信息是依据地理位置的不同而不同,因此,依据该查询词,可以确定用户的搜索需求是与用户当前使用的客户端所在终端的地理位置相关的,因此,可以获取用户当前使用的客户端所在终端的地理位置信息,图4中客户端所在终端的地理位置信息是“上海”。在依据输入的查询词“赶集网”进行搜索后,在获得的搜索结果中找到与客户端所在终端的地理位置“上海”相关的搜索结果,并在搜索结果页的第一页展现该与客户端所在终端的地理位置“上海”相关的搜索结果,如图4所示,可以在搜索结果页的第一页中第一条展现位置展现与客户端所在终端的地理位置“上海”相关的搜索结果,这样在搜索结果的第一页用户就可以获取到所需要的搜索结果。
实施例七
本公开实施例进一步给出实现上述方法实施例中各步骤及方法的装 置实施例。
请参考图5,其为本公开实施例所提供的搜索装置的功能方块图。如图所示,该装置包括:
查询输入单元501,用于获得用户在客户端输入的查询词;
位置获取单元502,用于获得所述客户端所在终端的地理位置信息;
搜索处理单元503,用于依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果。
优选的,所述搜索处理单元503,具体用于:
依据所述查询词,从网页数据库获得与所述查询词相匹配的网页,以作为第二搜索结果;
依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果;
调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果。
优选地,所述搜索处理单元503用于依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果时,具体用于:
从索引数据库中获得所述第二搜索结果中每条搜索结果的位置属性信息,所述位置属性信息包括与该搜索结果所提供的内容相匹配的地理位置的详细信息;
依据所述客户端所在终端的地理位置信息和所述每条搜索结果的位置属性信息,从所述第二搜索结果中,获得所提供的内容能够匹配所述客户端所在终端的地理位置的搜索结果,以作为与所述客户端所在终端 的地理位置相关的搜索结果。
可选地,所述装置还包括:
网页获取单元504,用于从网站上爬取网页;
索引生成单元505,用于获取爬取的所述网页的源代码;以及,从所述源代码中获得所述网页的位置属性信息;以及,依据所述网页以及所述网页的位置属性信息,生成所述索引数据库。
优选地,所述搜索处理单元503用于调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果时,具体用于:
增加与所述客户端所在终端的地理位置相关的搜索结果的权重值,或者,减小所述第二搜索结果中,除与所述客户端所在终端的地理位置相关的搜索结果以外的其他搜索结果的权重值;
按照权重值由大到小的顺序对所述第二搜索结果中的每条搜索结果进行排序,以获得排序结果,将所述排序结果作为所述第一搜索结果。
优选地,所述搜索处理单元503用于调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果时,具体用于:
将与所述客户端所在终端的地理位置相关的搜索结果的展现位置,与所述第二搜索结果中其他搜索结果的展现位置进行调换;
其中,在所述第二搜索结果中,所述其他搜索结果的展现位置位于与所述客户端所在终端的地理位置相关的搜索结果的展现位置之前。
优选地,所述搜索处理单元503,具体用于:
依据所述查询词和所述客户端所在终端的地理位置信息,在网页数 据库中进行搜索,以获得与所述查询词和所述客户端所在终端的地理位置信息都相匹配的搜索结果,以作为所述第一搜索结果。
由于本实施例中的各单元能够执行图1所示的方法,本实施例未详细描述的部分,可参考对图1的相关说明。
本公开实施例的技术方案具有以下有益效果:
本公开实施例所提供的技术方案中,依据用户输入的查询词以及客户端所在终端的地理位置信息,去获取第一搜索结果。这样,获得的搜索结果是与输入的查询词以及客户端所在终端的地理位置都相匹配的搜索结果。
现有技术中,在地理位置不同的终端上相同的客户端中输入相同的查询词时,获得相同的搜索结果。当用户的搜索需求与用户所使用的终端的地理位置相关时,这种技术方案就不能满足用户的搜索需求,需要用户重新输入查询词或者需要用户在若干搜索结果页中进行逐页筛选。而本公开实施例中,当用户的搜索需求与用户所使用的终端的地理位置相关时,就可以及时获得能够满足搜索需求的搜索结果。因此,可以提高召回的搜索结果的相关性,从而提高召回的搜索结果的准确性,以及提高搜索效率,及时满足用户的搜索需求,提高用户搜索体验。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本公开所提供的几个实施例中,应该理解到,所揭露的***,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分, 实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(Processor)执行本公开各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅为本公开的较佳实施例而已,并不用以限制本公开,凡在本公开的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本公开保护的范围之内。

Claims (16)

  1. 一种搜索方法,其特征在于,所述方法包括:
    获得用户在客户端输入的查询词;
    获得所述客户端所在终端的地理位置信息;
    依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果。
  2. 根据权利要求1所述的方法,其特征在于,所述依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果,包括:
    依据所述查询词,从网页数据库获得与所述查询词相匹配的网页,以作为第二搜索结果;
    依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果;
    调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果。
  3. 根据权利要求2所述的方法,其特征在于,所述依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果,包括:
    从索引数据库中获得所述第二搜索结果中每条搜索结果的位置属性信息,所述位置属性信息包括与该搜索结果所提供的内容相匹配的地理位置的详细信息;
    依据所述客户端所在终端的地理位置信息和所述每条搜索结果的位置属性信息,从所述第二搜索结果中,获得所提供的内容能够匹配所述客户端所在终端的地理位置的搜索结果,以作为与所述客户端所在终端 的地理位置相关的搜索结果。
  4. 根据权利要求3所述的方法,其特征在于,所述从索引数据库中获得所述第二搜索结果中每条搜索结果的位置属性信息之前,所述方法还包括:
    从网站上爬取网页;
    获取爬取的所述网页的源代码;
    从所述源代码中获得所述网页的位置属性信息;
    依据所述网页以及所述网页的位置属性信息,生成所述索引数据库。
  5. 根据权利要求2所述的方法,其特征在于,所述调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果,包括:
    增加与所述客户端所在终端的地理位置相关的搜索结果的权重值,或者,减小所述第二搜索结果中,除与所述客户端所在终端的地理位置相关的搜索结果以外的其他搜索结果的权重值;
    按照权重值由大到小的顺序对所述第二搜索结果中的每条搜索结果进行排序,以获得排序结果,将所述排序结果作为所述第一搜索结果。
  6. 根据权利要求2所述的方法,其特征在于,所述调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果,包括:
    将与所述客户端所在终端的地理位置相关的搜索结果的展现位置,与所述第二搜索结果中其他搜索结果的展现位置进行调换;
    其中,在所述第二搜索结果中,所述其他搜索结果的展现位置位于与所述客户端所在终端的地理位置相关的搜索结果的展现位置之前。
  7. 根据权利要求1所述的方法,其特征在于,所述依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果,包括:
    依据所述查询词和所述客户端所在终端的地理位置信息,在网页数据库中进行搜索,以获得与所述查询词和所述客户端所在终端的地理位置信息都相匹配的搜索结果,以作为所述第一搜索结果。
  8. 一种搜索装置,其特征在于,所述装置包括:
    查询输入单元,用于获得用户在客户端输入的查询词;
    位置获取单元,用于获得所述客户端所在终端的地理位置信息;
    搜索处理单元,用于依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果。
  9. 根据权利要求8所述的装置,其特征在于,所述搜索处理单元,具体用于:
    依据所述查询词,从网页数据库获得与所述查询词相匹配的网页,以作为第二搜索结果;
    依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果;
    调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果。
  10. 根据权利要求9所述的装置,其特征在于,所述搜索处理单元用于依据所述客户端所在终端的地理位置信息,从所述第二搜索结果中,获得与所述客户端所在终端的地理位置相关的搜索结果时,具体用于:
    从索引数据库中获得所述第二搜索结果中每条搜索结果的位置属性信息,所述位置属性信息包括与该搜索结果所提供的内容相匹配的地理 位置的详细信息;
    依据所述客户端所在终端的地理位置信息和所述每条搜索结果的位置属性信息,从所述第二搜索结果中,获得所提供的内容能够匹配所述客户端所在终端的地理位置的搜索结果,以作为与所述客户端所在终端的地理位置相关的搜索结果。
  11. 根据权利要求10所述的装置,其特征在于,所述装置还包括:
    网页获取单元,用于从网站上爬取网页;
    索引生成单元,用于获取爬取的所述网页的源代码;以及,从所述源代码中获得所述网页的位置属性信息;以及,依据所述网页以及所述网页的位置属性信息,生成所述索引数据库。
  12. 根据权利要求9所述的装置,其特征在于,所述搜索处理单元用于调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果时,具体用于:
    增加与所述客户端所在终端的地理位置相关的搜索结果的权重值,或者,减小所述第二搜索结果中,除与所述客户端所在终端的地理位置相关的搜索结果以外的其他搜索结果的权重值;
    按照权重值由大到小的顺序对所述第二搜索结果中的每条搜索结果进行排序,以获得排序结果,将所述排序结果作为所述第一搜索结果。
  13. 根据权利要求9所述的装置,其特征在于,所述搜索处理单元用于调整与所述客户端所在终端的地理位置相关的搜索结果在所述第二搜索结果中的展现位置,以获得所述第一搜索结果时,具体用于:
    将与所述客户端所在终端的地理位置相关的搜索结果的展现位置,与所述第二搜索结果中其他搜索结果的展现位置进行调换;
    其中,在所述第二搜索结果中,所述其他搜索结果的展现位置位于与所述客户端所在终端的地理位置相关的搜索结果的展现位置之前。
  14. 根据权利要求8所述的装置,其特征在于,所述搜索处理单元,具体用于:
    依据所述查询词和所述客户端所在终端的地理位置信息,在网页数据库中进行搜索,以获得与所述查询词和所述客户端所在终端的地理位置信息都相匹配的搜索结果,以作为所述第一搜索结果。
  15. 一种设备,包括:
    一个或多个处理器;
    存储器;
    一个或多个程序,所述一个或多个程序存储在所述存储器中,当被所述一个或多个处理器执行时,执行以下操作:
    获得用户在客户端输入的查询词;
    获得所述客户端所在终端的地理位置信息;
    依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果。
  16. 一种非易失性计算机存储介质,所述计算机存储介质存储有一个或多个程序,当所述一个或多个程序被一个设备执行时,使得所述设备执行以下操作:
    获得用户在客户端输入的查询词;
    获得所述客户端所在终端的地理位置信息;
    依据所述查询词和所述客户端所在终端的地理位置信息,获得第一搜索结果。
PCT/CN2015/094396 2015-01-22 2015-11-12 一种搜索方法、装置、设备及计算机存储介质 WO2016115939A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510033092.8 2015-01-22
CN201510033092.8A CN104615688A (zh) 2015-01-22 2015-01-22 一种搜索方法及装置

Publications (1)

Publication Number Publication Date
WO2016115939A1 true WO2016115939A1 (zh) 2016-07-28

Family

ID=53150130

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/094396 WO2016115939A1 (zh) 2015-01-22 2015-11-12 一种搜索方法、装置、设备及计算机存储介质

Country Status (2)

Country Link
CN (1) CN104615688A (zh)
WO (1) WO2016115939A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104615686B (zh) * 2015-01-22 2018-11-09 百度在线网络技术(北京)有限公司 一种搜索方法及装置
CN104615688A (zh) * 2015-01-22 2015-05-13 百度在线网络技术(北京)有限公司 一种搜索方法及装置
WO2018126385A1 (zh) * 2017-01-05 2018-07-12 深圳市前海中康汇融信息技术有限公司 基于地理位置的数据库搜索方法
WO2018126384A1 (zh) * 2017-01-05 2018-07-12 深圳市前海中康汇融信息技术有限公司 基于地理位置的数据库搜索***
CN115495674A (zh) * 2021-06-17 2022-12-20 华为技术有限公司 信息点搜索的方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604317A (zh) * 2009-07-13 2009-12-16 腾讯科技(深圳)有限公司 搜索引擎的检索结果重排序方法及***
CN103970747A (zh) * 2013-01-24 2014-08-06 爱帮聚信(北京)科技有限公司 网络侧计算机对搜索结果进行排序的数据处理方法
CN104090989A (zh) * 2014-07-30 2014-10-08 携程计算机技术(上海)有限公司 基于移动终端的网站的搜索***及方法
CN104615688A (zh) * 2015-01-22 2015-05-13 百度在线网络技术(北京)有限公司 一种搜索方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060085392A1 (en) * 2004-09-30 2006-04-20 Microsoft Corporation System and method for automatic generation of search results based on local intention
CN102169503B (zh) * 2011-04-29 2013-04-24 北京百度网讯科技有限公司 一种获取与用户查询序列相对应的搜索结果的方法与设备
CN102867031A (zh) * 2012-08-27 2013-01-09 百度在线网络技术(北京)有限公司 兴趣点poi搜索结果优化方法、***、移动终端和服务器
CN103942221B (zh) * 2013-01-23 2019-03-08 百度在线网络技术(北京)有限公司 检索方法及设备
CN103902680A (zh) * 2014-03-21 2014-07-02 百度在线网络技术(北京)有限公司 搜索推荐方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604317A (zh) * 2009-07-13 2009-12-16 腾讯科技(深圳)有限公司 搜索引擎的检索结果重排序方法及***
CN103970747A (zh) * 2013-01-24 2014-08-06 爱帮聚信(北京)科技有限公司 网络侧计算机对搜索结果进行排序的数据处理方法
CN104090989A (zh) * 2014-07-30 2014-10-08 携程计算机技术(上海)有限公司 基于移动终端的网站的搜索***及方法
CN104615688A (zh) * 2015-01-22 2015-05-13 百度在线网络技术(北京)有限公司 一种搜索方法及装置

Also Published As

Publication number Publication date
CN104615688A (zh) 2015-05-13

Similar Documents

Publication Publication Date Title
WO2016115939A1 (zh) 一种搜索方法、装置、设备及计算机存储介质
US11494451B2 (en) Personal search result identifying a physical location previously interacted with by a user
US9928537B2 (en) Management and storage of distributed bookmarks
CN107463591B (zh) 响应于搜索查询对待与内容匹配的图像动态排序的方法和***
CN104216942B (zh) 查询建议模板
US9690804B2 (en) Information processing device, information processing method, information processing program, and recording medium
JP2017220203A (ja) 類似性スコアに基づきコンテンツアイテムと画像とのマッチングを評価する方法、およびシステム
CN107766399B (zh) 用于使图像与内容项目匹配的方法和***及机器可读介质
CN103064842B (zh) 信息订阅处理装置和信息订阅处理方法
TW201348990A (zh) 根據地理位置推薦候選詞的方法和裝置
TW201229790A (en) Information providing method and device
CN107463592B (zh) 用于将内容项目与图像匹配的方法、设备和数据处理***
US8788502B1 (en) Annotating articles
US20190050425A1 (en) Semantic geotokens
WO2017063531A1 (zh) 一种基于地址信息的账户映射方法及装置
EP3345102A1 (en) Context based instant search suggestions
TW201348989A (zh) 應用程式介面提供方法及裝置
US20180035367A1 (en) Method and Apparatus for Accessing Wifi Access Point in Target Shop
JP2022137281A (ja) データ照会方法、装置、電子デバイス、記憶媒体、及びプログラム
CN105893396B (zh) 基于附近位置来解释用户查询
CN106055591A (zh) 一种天气推送方法及装置
CN104077320B (zh) 一种用于生成待发布信息的方法和装置
CN103646034A (zh) 一种基于内容可信的Web搜索引擎***及搜索方法
WO2015175313A1 (en) Disambiguation of queries implicit to multiple entities
TW201741911A (zh) 資料推薦的處理互動方法、裝置及系統

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15878607

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15878607

Country of ref document: EP

Kind code of ref document: A1