Search method, device, server and storage medium
By determining the degree of correlation between the candidate location and the current location of the terminal, the problem of low accuracy when the search request corresponds to multiple locations is solved, and higher search accuracy is achieved.
Patent Information
- Application Number
- CN202210113041.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-29
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2042-01-29
AI Technical Summary
When a user provides a name search, it is difficult to determine which location is the location the user expects to search, resulting in a low search accuracy.
By determining a plurality of candidate positions corresponding to the search request, and determining the target position from it based on the degree of association between these candidate positions and the current position of the terminal, information associated with the target position is sent to the terminal.
The accuracy of the search is improved because the high correlation of candidate positions means that it is more likely that the user expects to search.
Smart Images

Figure CN114443981B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a search method, device, server, and storage medium. Background Art
[0002] With the continuous development of computer technology, computer technology has been widely used in all walks of life. In people's daily travel, if you want to search for a certain location, you can provide the name of the location, and then search for the location based on the name of the location.
[0003] However, when multiple locations are searched according to the names provided by the user, it is difficult to determine which location is the location that the user desires to search, resulting in a low search accuracy. Summary of the invention
[0004] The embodiments of the present application provide a search method, device, server and storage medium, which can improve the accuracy of search. The technical solution is as follows:
[0005] In one aspect, a search method is provided, the method comprising:
[0006] In response to a search request sent by a terminal, determining a plurality of candidate locations corresponding to the search request;
[0007] Determine first association information corresponding to the multiple candidate positions, where the first association information indicates a degree of association between the candidate positions and a reference position, where the reference position is a current position of the terminal;
[0008] Determining a target position from the multiple candidate positions based on the first association information corresponding to the multiple candidate positions, wherein the association degree represented by the first association information corresponding to the target position is higher than the association degrees represented by the first association information corresponding to other candidate positions;
[0009] The search results are sent to the terminal, where the search results include information associated with the target location.
[0010] Optionally, before sending the search results to the terminal, the method further includes:
[0011] Information semantically matching the search information in the search request is filtered out from the information associated with the target location, and the filtered information is determined as the search result corresponding to the search information.
[0012] In another aspect, a search device is provided, the device comprising:
[0013] A first location determination module, configured to determine, in response to a search request sent by a terminal, a plurality of candidate locations corresponding to the search request;
[0014] A first information determination module, configured to determine first association information corresponding to the plurality of candidate positions, wherein the first association information indicates a degree of association between the candidate positions and a reference position, wherein the reference position is a current position of the terminal;
[0015] a second position determination module, configured to determine a target position from the plurality of candidate positions based on the first association information corresponding to the plurality of candidate positions, wherein the association degree represented by the first association information corresponding to the target position is higher than the association degrees represented by the first association information corresponding to other candidate positions;
[0016] The result sending module is used to send the search result to the terminal, where the search result includes information associated with the target location.
[0017] Optionally, the first information determining module includes:
[0018] A first determining unit, configured to determine first association information corresponding to the plurality of candidate positions according to the geographical areas to which the plurality of candidate positions belong and the geographical area to which the reference position belongs;
[0019] The degree of association represented by the first association information corresponding to the candidate position belonging to the same geographical area as the reference position is higher than the degree of association represented by the first association information corresponding to the candidate position belonging to a different geographical area from the reference position.
[0020] Optionally, the first determining unit is configured to:
[0021] In a case where the geographical area of each level to which the candidate position belongs is different from the geographical area of the corresponding level to which the reference position belongs, determining the first value as the first association information corresponding to the candidate position;
[0022] In the case where at least one geographical area to which the candidate position belongs is the same as a geographical area of a corresponding level to which the reference position belongs, determining a lowest level in the levels corresponding to the same at least one geographical area, determining a second value corresponding to the lowest level as the first association information corresponding to the candidate position, and the geographical area of the low level belongs to a sub-area of the geographical area of the high level;
[0023] The degree of association represented by the first value is lower than the degree of association represented by the second value, different levels correspond to different second values, and the higher the level, the lower the degree of association represented by the corresponding second value.
[0024] Optionally, the first information determination module includes:
[0025] The second determination unit is used to determine first association information corresponding to the multiple candidate positions based on the distances between the multiple candidate positions and the reference position, and the degree of association represented by the first association information corresponding to the candidate positions is negatively correlated with the distances corresponding to the candidate positions.
[0026] Optionally, the second position determination module includes:
[0027] a fusion unit, configured to fuse the first association information and target traffic information corresponding to the candidate position to obtain fusion information corresponding to the candidate position, wherein the target traffic information indicates the number of objects that have arrived at the candidate position within a target time period, and the degree of fusion association indicated by the fusion information is determined by the degree of association between the candidate position and the reference position and the number;
[0028] A position determination unit is used to determine the target position from the multiple candidate positions based on the fusion information corresponding to the multiple candidate positions, and the fusion association degree represented by the fusion information corresponding to the target position is higher than the fusion association degree represented by the fusion information corresponding to other candidate positions.
[0029] Optionally, the device further comprises:
[0030] A traffic information determination module is used to determine the target traffic information corresponding to the candidate location based on at least one of the first traffic information or the second traffic information corresponding to the candidate location, wherein the first traffic information indicates the number of objects that have arrived at the candidate location in a current cycle, and the second traffic information indicates the number of objects that have arrived at the candidate location in a cycle before the current cycle.
[0031] Optionally, the second position determination module includes:
[0032] a fusion unit, configured to fuse the first association information and the second association information corresponding to the candidate position to obtain fused information corresponding to the candidate position, wherein the second association information indicates a degree of association between the candidate position and the search information in the search request, and the degree of fused association indicated by the fused information is determined by a degree of association between the candidate position and the reference position and a degree of association between the candidate position and the search information;
[0033] A position determination unit is used to determine the target position from the multiple candidate positions based on the fusion information corresponding to the multiple candidate positions, and the fusion association degree represented by the fusion information corresponding to the target position is higher than the fusion association degree represented by the fusion information corresponding to other candidate positions.
[0034] Optionally, the candidate position corresponds to a first entity element, the search information includes a plurality of second entity elements, and the device further includes:
[0035] A second information determination module, configured to determine the similarity between the first entity element corresponding to the candidate position and the plurality of second entity elements;
[0036] The second information determination module is further configured to perform weighted processing on the similarities corresponding to the plurality of second entity elements based on the weights of the plurality of second entity elements, so as to obtain the second association information corresponding to the candidate position.
[0037] Optionally, the device further comprises:
[0038] The weight determination module is used to determine the weight of the second entity element based on the similarity between the second entity element and multiple second entity elements in the search information.
[0039] Optionally, the device further comprises:
[0040] A feature determination module is used to obtain a plurality of location description texts, wherein the location description texts include a plurality of entity elements;
[0041] The feature determination module is further used to determine, for each of the entity elements, an element feature corresponding to the entity element according to the entity element and other entity elements in the description text located at the same position as the entity element;
[0042] The second information determination module is configured to determine the similarity between the first entity element and the second entity element based on an element feature corresponding to the first entity element and an element feature corresponding to the second entity element.
[0043] Optionally, the first position determination module includes:
[0044] an element identification unit, configured to identify, in response to the search request, a target entity element used to describe a location in the search information carried in the search request;
[0045] The position query unit is used to query the multiple candidate positions corresponding to the target entity element in the position dictionary.
[0046] Optionally, the device further comprises:
[0047] A dictionary creation module, configured to determine at least one entity element for describing a location;
[0048] The dictionary creation module is further configured to create, for each of the entity elements, a correspondence between the entity element and at least one position described by the entity element, to form the position dictionary.
[0049] Optionally, the device further comprises:
[0050] The result acquisition module is used to filter information associated with the target location to obtain information that semantically matches the search information in the search request, and determine the filtered information as the search result corresponding to the search information.
[0051] On the other hand, a server is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the search method described in the above aspects.
[0052] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed by the search method described in the above aspects.
[0053] On the other hand, a computer program product is provided, comprising a computer program, wherein the computer program is loaded and executed by a processor to implement the operations performed by the search method as described in the above aspects.
[0054] The method, device, server and storage medium provided by the embodiments of the present application determine first association information between multiple candidate locations and the current location of the terminal when a search request corresponds to multiple candidate locations. Since the first association information can reflect the degree of association between the candidate location and the current location of the terminal, and the higher the degree of association corresponding to the candidate location, the higher the possibility that the candidate location is the expected search location, from the multiple candidate locations, a target location with a higher degree of association than other candidate locations is determined, so that the degree of association with the location of the terminal is taken into account in the process of searching for the target location, which is beneficial to improving the accuracy of the search. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0056] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0057] Figure 2 is a flow chart of a search method provided in an embodiment of the present application;
[0058] Figure 3 is a flow chart of another search method provided in an embodiment of the present application;
[0059] Figure 4 is a schematic diagram of a method for identifying physical elements provided in an embodiment of the present application;
[0060] Figure 5 is a flowchart of another search method provided in an embodiment of the present application;
[0061] Figure 6 is a flowchart of another search method provided in an embodiment of the present application;
[0062] Figure 7 is a flowchart of another search method provided in an embodiment of the present application;
[0063] Figure 8 is a structural schematic diagram of a search device provided in an embodiment of the present application;
[0064] Fig. 9 is a schematic diagram of the structure of another search device provided in an embodiment of the present application;
[0065] Fig.10 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0066] Fig.11 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0068] It is understood that the terms "first", "second", etc. used in this application can be used in this article to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of this application, the first association information can be referred to as the second association information, and similarly, the second association information can be referred to as the first association information.
[0069] Among them, at least one refers to one or more than one, for example, at least one candidate position can be one candidate position, two candidate positions, three candidate positions, or any other integer greater than or equal to one. Multiple refers to two or more than two, for example, multiple candidate positions can be two candidate positions, three candidate positions, or any other integer greater than or equal to two. Each refers to each of at least one, for example, each candidate position refers to each candidate position in the multiple candidate positions. If the multiple candidate positions are 3 candidate positions, each candidate position refers to each candidate position in the 3 candidate positions.
[0070] It is understandable that in the implementation of the present application, related data such as user information is involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0071] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0072] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.
[0073] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
[0074] Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, and knowledge graphs.
[0075] The following will explain the search method provided in the embodiment of the present application based on artificial intelligence technology and natural language processing technology.
[0076] In order to facilitate the understanding of the embodiments of the present application, entity disambiguation is first introduced. Entity disambiguation is a research direction in the field of natural language processing. Entity disambiguation can eliminate ambiguous problems in natural language, which plays an important role in knowledge graph construction, information extraction, semantic search, and question-answering systems. In entity disambiguation, the referent refers to the expression that needs to be disambiguated. After entity linking, it points to the entity in the knowledge base. The entity refers to an object with a unique identifier stored in the knowledge base. For example, the referent "notebook" can refer to a paper book or an electronic device; in addition, the referents "Baiyu", "Yuzhou", and "Mountain City" can all be used to refer to the Chongqing area. Since the referent is ambiguous, it is necessary to perform entity disambiguation on the referent.
[0077] In the case where a referent is used to describe a location, there is a case where one referent corresponds to multiple locations, for example, the names of multiple locations are all the referent, so it is necessary to disambiguate the multiple locations to determine the target location corresponding to the referent in the multiple locations. The following embodiment will illustrate the method for searching a target location.
[0078] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application, see Figure 1 The implementation environment includes: a server 101 and a terminal 102. The server 101 and the terminal 102 can be directly or indirectly connected via wired or wireless communication.
[0079] The server 101 is used to receive the search request sent by the terminal 102, determine the target location corresponding to the search request, and then determine the search result corresponding to the search request in the information related to the target location, and return the search result to the terminal 102, which is used to display the search result.
[0080] In one possible implementation, a target application served by server 101 is installed on terminal 102. Optionally, the target application is a target application in the operating system of terminal 102, or a target application provided by a third party. The target application can provide a search function. Optionally, the target application can also have other functions, such as a review function, a shopping function, or a navigation function. Optionally, the target application is a content sharing application, a navigation application, a browser, or other applications, which is not limited in the embodiments of the present application. Optionally, server 101 is a background server of the target application or a cloud server that provides services such as cloud computing and cloud storage.
[0081] In one possible implementation, the terminal 102 is used to log in to the target application based on an account, and report POI information (Point of Information) to the server 101 through the target application. The server 101 is used to receive the POI information reported by the terminal 102, and provide location services for the terminal 102 according to the POI information reported by the terminal 102.
[0082] In one possible implementation, the server 101 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In one possible implementation, the terminal 102 may be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, smart TV, car terminal, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert compression standard audio layer 3) player and MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert compression standard audio layer 4) player, etc.
[0083] The search method provided in the embodiments of the present application can be applied in any scenario.
[0084] For example, it is applied to the scenario of searching for scenic spot introductions. The user enters a search text for querying scenic spot introductions in the search box, and the search text includes the name of the scenic spot. The terminal sends the search text and the current location of the terminal to the server. The server uses the search method provided by the embodiment of the present application. After querying multiple scenic spots corresponding to the scenic spot name, based on the current location of the terminal, the server determines the target scenic spot that the user wants to search from the multiple scenic spots, and returns the introduction information of the target scenic spot to the terminal, which displays the introduction information of the target scenic spot.
[0085] Another example is applied to a question-and-answer system of a ticket purchase application. In a scenario where a user needs to order a scenic spot ticket online, the user enters a search text for querying the scenic spot ticket price in the ticket purchase application, and the search text includes the scenic spot name. The question-and-answer system of the ticket purchase application obtains the search text entered by the user and the current location of the terminal, and adopts the search method provided in the embodiment of the present application. After querying multiple scenic spots corresponding to the scenic spot name, based on the current location of the terminal, the target scenic spot that the user wants to search for is determined from the multiple scenic spots, and the ticket price information of the target scenic spot is returned to the ticket purchase application, and the ticket purchase application displays the ticket price information of the target scenic spot.
[0086] Another example is applied in a navigation scenario. A user enters a location name in a navigation application, and the navigation application obtains the current location of the terminal. The search method provided in the embodiment of the present application is used to query multiple locations corresponding to the location name, and then, based on the current location of the terminal, the target location that the user wants to reach is determined from the multiple locations, and a navigation route to the target location is displayed.
[0087] In addition, the search method provided in the embodiment of the present application can also be applied to any other scenario where a location needs to be searched, such as a scenario where a voice assistant is used to query location information, and the embodiment of the present application is not limited to this.
[0088] Figure 2 is a flowchart of a search method provided by an embodiment of the present application. Figure 1 Implementation environment of the server execution, see Figure 2 , the method comprising:
[0089] 201. The server determines, in response to a search request sent by a terminal, a plurality of candidate locations corresponding to the search request.
[0090] The search request sent by the terminal is used to search for a location, and the server determines multiple candidate locations corresponding to the search request based on the search request. Optionally, the search request carries search information, and the server obtains the search information carried in the search request and determines multiple candidate locations corresponding to the search information. The search information can be a search text or a search voice, etc., which is not limited in the embodiments of the present application.
[0091] Since different locations correspond to the same location name or description information, there is a situation where the search request corresponds to multiple locations. Optionally, the multiple candidate locations corresponding to the search request are also the multiple locations described by the search text corresponding to the search request. For example, the search text is "What are the fun attractions in Yuntaishan Scenic Area?" The search text includes the word "Yuntaishan Scenic Area" used to describe the location, and the word "Yuntaishan Scenic Area" can describe "Yuntaishan Scenic Area, Xiuwu County, Jiaozuo City, Henan Province", "Yuntaishan Scenic Area, Lianyungang City, Jiangsu Province", "Yuntaishan Scenic Area, Zhenjiang City, Jiangsu Province" and "Anhua National 4A Scenic Area", so the search request corresponds to 4 candidate locations.
[0092] 202. The server determines first association information corresponding to multiple candidate positions.
[0093] After determining multiple candidate locations corresponding to the search request, the server determines first association information corresponding to the multiple candidate locations, wherein the first association information corresponding to the candidate location indicates the degree of association between the candidate location and a reference location, where the reference location is the current location of the terminal.
[0094] The server obtains the current location of the terminal, takes the current location of the terminal as a reference location, and determines first association information between the candidate location and the reference location based on the candidate location and the reference location.
[0095] 203. The server determines a target location from the multiple candidate locations based on the first association information corresponding to the multiple candidate locations.
[0096] Among them, the degree of association represented by the first association information corresponding to the target position is higher than the degree of association represented by the first association information corresponding to other candidate positions. Optionally, the server determines the first association information with the highest degree of association represented among multiple first association information, and determines the candidate position corresponding to the association information as the target position. Alternatively, the server sorts the multiple first association information in descending order according to the degree of association represented, determines the target number of first association information in the front, and determines the candidate position corresponding to the target number of first association information as the target position. For example, the target number is 2 or 3, etc.
[0097] Considering that the higher the degree of association between the candidate location and the current location of the terminal, the greater the possibility that the candidate location is the expected search location, and the first association information corresponding to the candidate location can reflect the degree of association between the candidate location and the current location of the terminal, the server determines the first association information with a higher degree of association among the multiple first association information based on the first association information corresponding to multiple candidate locations, determines the candidate location corresponding to the first association information as the target location, and uses the target location as the location searched based on the search request, thereby improving the accuracy of the search.
[0098] 204. The server sends the search results to the terminal.
[0099] After the server determines the target location, it obtains search results based on the target location and sends the search results to the terminal. The search results include information associated with the target location, such as the longitude and latitude information corresponding to the target location, location introduction information or location navigation information.
[0100] The method provided in the embodiment of the present application determines first association information between multiple candidate locations and the current location of the terminal when there are multiple candidate locations corresponding to the search request. Since the first association information can reflect the degree of association between the candidate location and the current location of the terminal, and the higher the degree of association corresponding to the candidate location, the higher the possibility that the candidate location is the expected search location, from the multiple candidate locations, a target location with a higher degree of association than other candidate locations is determined, so that the degree of association with the location of the terminal is taken into account in the process of searching for the target location, which is beneficial to improving the accuracy of the search.
[0101] In the case where the search request corresponds to multiple candidate locations, the target location can be determined from the multiple candidate locations based on the first association information corresponding to the candidate locations and the target traffic information. The specific process is described below. Figure 3 Embodiment of the invention. Figure 3 is a flowchart of another search method provided in an embodiment of the present application. Figure 1 Server and terminal execution in the implementation environment of Figure 3 , the method comprising:
[0102] 301. The terminal sends a search request to the server.
[0103] The search request is used to request the server to perform a search based on the search request.
[0104] In a possible implementation, the search request also carries the current location of the terminal. The terminal determines the current location and uses the location as a reference location. The terminal generates a search request carrying the reference location and sends the search request to the server.
[0105] In a possible implementation, the search request carries search information, and the search request is used to request the server to search based on the search information. Optionally, the search information is search information input by a user of the terminal, for example, the search information is search text or search voice.
[0106] Optionally, the search information is a search text. The terminal displays a search box and a search button. When the user wants to search for information, the user enters the corresponding search text in the search box and triggers the search button. In response to the triggering operation of the search button, the terminal obtains the search text entered in the search box, generates a search request, and the search request carries the search text, and sends the search request to the server.
[0107] Optionally, when the user wants to search, he speaks a corresponding search voice. The terminal collects the search voice, converts the search voice into a search text, generates a search request, and the search request carries the search text, and sends the search request to the server. Alternatively, when the terminal collects the search voice, it directly generates a search request carrying the search voice and sends the search request to the server.
[0108] 302. The server determines, in response to the search request sent by the terminal, multiple candidate locations corresponding to the search request.
[0109] The server determines, in response to the search request sent by the terminal, a plurality of candidate locations corresponding to the search request.
[0110] In a possible implementation, the search request optionally carries search information, which may be a search text or a search voice, etc. The server determines multiple candidate locations corresponding to the search request, including the following steps (1) and (2):
[0111] (1) The server responds to the search request and identifies the target entity element used to describe the location in the search information carried in the search request.
[0112] The search information includes multiple words, and there is at least one entity element in the multiple words. The entity element refers to a word that serves as a subject or predicate in a sentence, or can also be a word whose part of speech is a noun. There are different types of entity elements. The type corresponding to the entity element refers to the type of the object described by the entity element. For example, the type corresponding to the entity element includes a person name, a location name, an organization name, or a proper noun.
[0113] After the server obtains the search information, it performs entity recognition on the search information to obtain multiple entity elements in the search information, as well as the type corresponding to each entity element. The type corresponding to the entity element refers to the type of thing represented by the entity element, such as a person's name, a location name, an organization name, or a proper noun. The server determines the entity element that belongs to the location name among the multiple entity elements as the target entity element, that is, the entity element used to describe the location is determined as the target entity element. For example, the search information is "Has Li Ming been to Yuntai Mountain?", and "Li Ming" and "Yuntai Mountain" in the search information are both entity elements, and "Yuntai Mountain" is an entity element used to describe the location, then the server determines "Yuntai Mountain" as the target entity element.
[0114] Optionally, the server calls the entity recognition model to perform entity recognition on the search information to obtain multiple entity elements in the search information and the type corresponding to each entity element. The entity recognition model is used to perform entity recognition. For example, the entity recognition model is a model combined by BERT (Bidirectional Encoder Representations from Transformers) and CRF (Conditional Random Field), or the entity recognition model can also be a model combined by BERT and a pointer model, etc. The embodiment of the present application does not limit the type of entity recognition model.
[0115] The input of the entity recognition model is the search information, and the output is the label and type corresponding to each word in the search information. The label is used to indicate whether the word belongs to an entity element, and the type is used to indicate the type of the entity element. For example, the labels include B, I, and O, B represents the first word in the entity element, I represents other words in the entity element except the first word, and O represents words that do not belong to the entity element. Label B and label O also correspond to a type, indicating the type of the entity element, such as a person name, a location name, or an organization name. The server determines the word with label B and the word with label I corresponding to the word with label B as an entity element.
[0116] It should be noted that, when the search information is a search text, the server directly performs entity recognition on the search text. When the search information is a search voice, the server may first convert the search voice into a search text and then process it, or the server may directly process the search voice, for example, directly perform entity recognition on the search voice.
[0117] Figure 4 is a schematic diagram of a method for identifying physical elements provided in an embodiment of the present application, such as Figure 4As shown, taking the search information as a search text as an example, the search text includes multiple characters, a start character is added in front of the search text, the start character indicates the beginning of the text, and the multiple characters composed of the start character and the search text are input into the entity recognition model 401, and the entity recognition model 401 performs operations such as feature extraction and feature mapping on each character, and outputs a label corresponding to each character in the search text, such as label O or label B, as shown in FIG. Figure 4 As shown, tag B also corresponds to the type "location name".
[0118] (2) The server searches the location dictionary for multiple candidate locations corresponding to the target entity element.
[0119] The server searches the location dictionary for the location corresponding to the target entity element, and determines the multiple locations found as candidate locations. If the server only searches for one location corresponding to the target entity element, it means that the target entity element is only used to describe the location, and the target entity element is not ambiguous. If the server searches for multiple locations corresponding to the target entity element, it means that the target entity element can describe multiple locations, and the target entity element is ambiguous, so it needs to be disambiguated. In the embodiment of the present application, the server searches for multiple candidate locations corresponding to the target entity element as an example for explanation.
[0120] The location dictionary includes the correspondence between entity elements and locations, and the entity elements in the location dictionary are all entity elements used to describe locations, and the location corresponding to the entity element is the location described by the entity element. An entity element may correspond to multiple locations, for example, the names of multiple locations are all the entity element. A location may also correspond to multiple entity elements, for example, a location has multiple names.
[0121] Optionally, the location dictionary includes a correspondence between entity elements and location identifiers, and the location identifier is used to indicate a location, for example, the location identifier is a location number, a latitude and longitude parameter, or a location name that can uniquely indicate a location. Optionally, the entity elements and locations in the location dictionary exist in the form of key-value pairs, the key is the entity element, and the value is at least one location corresponding to the entity element. For example, Yuntaishan Scenic Area: {Yuntaishan Scenic Area, Xiuwu County, Jiaozuo City, Henan Province, Yuntaishan Scenic Area, Lianyungang City, Jiangsu Province, Yuntaishan Scenic Area, Zhenjiang City, Jiangsu Province, Anhua National 4A Scenic Area}, "Yuntaishan Scenic Area" is the key, and "Yuntaishan Scenic Area, Xiuwu County, Jiaozuo City, Henan Province, Yuntaishan Scenic Area, Lianyungang City, Jiangsu Province, Yuntaishan Scenic Area, Zhenjiang City, Jiangsu Province, Anhua National 4A Scenic Area" is the value.
[0122] In one possible implementation, the location dictionary is created by a server, and the process of creating the location dictionary includes: the server determines at least one entity element for describing a location, and for each entity element, creates a correspondence between the entity element and at least one location described by the entity element to form a location dictionary.
[0123] The server determines multiple locations. For each location, the server determines at least one entity element used to describe the location, and different locations may correspond to the same entity element. For each entity element, the server determines at least one location described by the entity element, and then creates a correspondence between the entity element and the at least one location described by the entity element, so that the server can obtain the correspondence between the multiple entity elements and the locations, and the multiple correspondences constitute the location dictionary. Optionally, the server stores the correspondence between the entity elements and the locations in the form of key-value pairs.
[0124] In the embodiment of the present application, by creating a location dictionary, a method for determining the location corresponding to an entity element is provided, and subsequent searches can be directly performed in the location dictionary, making the location query process more convenient and helping to improve the efficiency of location query.
[0125] 303. The server determines first association information corresponding to multiple candidate positions.
[0126] After the server determines multiple candidate locations corresponding to the search request, it determines first association information between the candidate location and the reference location based on the candidate location and the reference location, wherein the reference location is the current location of the terminal, and the first association information corresponding to the candidate location indicates the degree of association between the candidate location and the reference location.
[0127] Optionally, the first association information is expressed in the form of a numerical value. For example, the first association information corresponding to the candidate position is positively correlated with the degree of association represented by the first association information, that is, the larger the first association information corresponding to the candidate position is, the higher the degree of association between the candidate position and the reference position is, and the smaller the first association information corresponding to the candidate position is, the lower the degree of association between the candidate position and the reference position is. Alternatively, the first association information corresponding to the candidate position is negatively correlated with the degree of association represented by the first association information, that is, the smaller the first association information corresponding to the candidate position is, the higher the degree of association between the candidate position and the reference position is, and the smaller the first association information corresponding to the candidate position is, the lower the degree of association between the candidate position and the reference position is.
[0128] In a possible implementation, the server obtains the current location of the terminal in real time, and the server determines the last acquired current location of the terminal as the reference location. Alternatively, the search request sent by the terminal carries the current location of the terminal, and the server determines the location carried in the search request as the reference location.
[0129] In another possible implementation, the server determines the first association information corresponding to the candidate position, including the following two methods.
[0130] The first method: the server determines the first association information corresponding to the plurality of candidate locations according to the geographical areas to which the plurality of candidate locations belong and the geographical area to which the reference location belongs. The degree of association represented by the first association information corresponding to the candidate location that belongs to the same geographical area as the reference location is higher than the degree of association represented by the first association information corresponding to the candidate location that belongs to a different geographical area from the reference location.
[0131] The geographical environment in which people live in their daily lives is divided into multiple geographical areas. If the geographical area to which the candidate position belongs is different from the geographical area to which the reference position belongs, it means that the degree of association between the candidate position and the reference position is small. If the geographical area to which the candidate position belongs is the same as the geographical area to which the reference position belongs, it means that the degree of association between the candidate position and the reference position is large. Therefore, the server determines the geographical area to which the candidate position belongs and the geographical area to which the reference position belongs, and determines the first association information corresponding to the multiple candidate positions based on the geographical areas. For example, the first association information is information in the form of a numerical value, and the numerical value is positively correlated with the degree of association represented. The server determines the first numerical value and the second numerical value, and the first numerical value is smaller than the second numerical value. If the geographical area to which the candidate position belongs is different from the geographical area to which the reference position belongs, the first numerical value is determined as the first association information corresponding to the candidate position. If the geographical area to which the candidate position belongs is the same as the geographical area to which the reference position belongs, the second numerical value is determined as the first association information corresponding to the candidate position. In an embodiment of the present application, whether the candidate location and the reference location belong to the same geographical area can be considered to reflect the degree of association between the candidate location and the reference location. Therefore, the server determines the first association information corresponding to the candidate location from the perspective of the geographical area, providing a simple and quick way to determine the first association information.
[0132] Optionally, when the geographical area of each level to which the candidate location belongs is different from the geographical area of the corresponding level to which the reference location belongs, the server determines the first numerical value as the first association information corresponding to the candidate location. When at least one geographical area to which the candidate location belongs is the same as the geographical area of the corresponding level to which the reference location belongs, the server determines the lowest level among the levels corresponding to the same at least one geographical area, and determines the second numerical value corresponding to the lowest level as the first association information corresponding to the candidate location.
[0133] Among them, the low-level geographical area belongs to the sub-area of the high-level geographical area, that is, the high-level geographical area includes the low-level geographical area. The degree of association represented by the first value is lower than the degree of association represented by the second value. Different levels correspond to different second values. The higher the level, the lower the degree of association represented by the corresponding second value. The geographical areas are divided into different levels, and each candidate location and reference location corresponds to multiple geographical areas of different levels. For example, according to the administrative division, the geographical areas can be divided into provincial geographical areas, municipal geographical areas and county geographical areas in order from high to low levels.
[0134] Optionally, the server matches the current level geographic area of the candidate position with the corresponding level geographic area of the reference position in order from low to high levels, until the current level geographic area of the candidate position is the same as the corresponding level geographic area of the reference position, then stops matching, determines the current level as the lowest level, and determines the second value corresponding to the lowest level as the first association information corresponding to the candidate position. Alternatively, the server matches the current level geographic area of the candidate position with the corresponding level geographic area of the reference position in order from low to high levels, until it is determined that the geographic area of each level of the candidate position is different from the geographic area of the corresponding level of the reference position, then determines the first value as the first association information corresponding to the candidate position.
[0135] For example, the geographical area is divided into a provincial geographical area and a municipal geographical area. The second value corresponding to the municipal geographical area is 1, the second value corresponding to the provincial geographical area is 0.6, and the first value is 0.2. If the candidate position and the reference position belong to the same municipal geographical area, 1 is determined as the first association information corresponding to the candidate position. If the candidate position and the reference position do not belong to the same municipal geographical area, but belong to the same provincial geographical area, 0.6 is determined as the first association information corresponding to the candidate position. If the candidate position and the reference position do not belong to the same municipal geographical area nor the same provincial geographical area, 0.2 is determined as the first association information corresponding to the candidate position.
[0136] In the embodiment of the present application, the first association information is represented by an assignment method, which simplifies the expression form of the first association information. Since the first association information is a simple numerical value, the processing amount can be reduced when the first association information is subsequently processed.
[0137] The second method: the server determines first association information corresponding to multiple candidate positions according to the distances between the multiple candidate positions and the reference position, and the degree of association represented by the first association information corresponding to the candidate positions is negatively correlated with the distances corresponding to the candidate positions.
[0138] The server determines the distances between multiple candidate positions and the reference position, and determines the first association information corresponding to the multiple candidate positions based on the distances between the multiple candidate positions and the reference position. The smaller the distance between the candidate position and the reference position, the greater the degree of association between the candidate position and the reference position, and the greater the degree of association represented by the first association information corresponding to the candidate position. The larger the distance between the candidate position and the reference position, the smaller the degree of association between the candidate position and the reference position, and the smaller the degree of association represented by the first association information corresponding to the candidate position. In the embodiment of the present application, considering the distance between the candidate position and the reference position, the degree of association between the candidate position and the reference position can be reflected. Therefore, the server determines the first association information corresponding to the candidate position from the perspective of the distance between the candidate position and the reference position, providing another simple and quick way to determine the first association information.
[0139] 304. The server determines target traffic information corresponding to multiple candidate locations.
[0140] The target flow information corresponding to the candidate location indicates the number of objects that have arrived at the candidate location within the target time period. Since the more objects that have arrived at the candidate location, the more popular the candidate location is, and the fewer objects that have arrived at the candidate location, the less popular the candidate location is, the target flow information corresponding to the candidate location can reflect the popularity of the candidate location. For example, if the candidate location is a scenic spot, the more objects that have arrived at the scenic spot, the more popular the scenic spot is.
[0141] In a possible implementation, the server determines the target traffic information corresponding to the candidate location based on at least one of the first traffic information or the second traffic information corresponding to the candidate location, wherein the first traffic information indicates the number of objects that have arrived at the candidate location in the current cycle, and the second traffic information indicates the number of objects that have arrived at the candidate location in the cycle before the current cycle.
[0142] The server obtains the first flow information corresponding to the candidate location, and determines the first flow information as the target flow information corresponding to the candidate location. Alternatively, the server obtains the second flow information corresponding to the candidate location, and determines the second flow information as the target flow information corresponding to the candidate location. Alternatively, the server merges the first flow information and the second flow information to obtain the target flow information corresponding to the candidate location.
[0143] The period may be 1 day, 1 week, or 1 month, etc. Taking a period of 1 day as an example, the server obtains the number of objects that have arrived at the candidate location today, and the number of objects that have arrived at the candidate location at least one day before today, determines the total number of objects that have arrived at the candidate location today and at least one day before today, and determines the total number as the target flow information corresponding to the candidate location. Alternatively, the server may also determine the average flow of people that have arrived at the candidate location today and at least one day before today, and determines the average flow of people as the target flow information corresponding to the candidate location.
[0144] In an embodiment of the present application, the target flow information corresponding to the candidate location is determined based on the number of objects that have arrived at the candidate location in the current cycle. The target flow information is therefore real-time, thereby ensuring the validity of the target flow information. The target location is subsequently determined based on the target flow information, which is beneficial to ensuring the accuracy of the searched target location.
[0145] In another possible implementation, the server determines the target traffic information corresponding to the candidate location based on at least one of the third traffic information or the fourth traffic information of the candidate location, wherein the third traffic information is the traffic information of the candidate location in the current time period, and the fourth traffic information is the traffic information of the candidate location in the same time period in the period before the current time period.
[0146] The cycle may be 1 day, 1 week or 1 month, etc. Taking a cycle of 1 day as an example, a cycle is divided into multiple time periods in units of hours, and taking the current time period of 10:00-11:00 as an example, the server obtains the number of objects that have arrived at the candidate location in the time period of 10:00-11:00 today, and the number of objects that have arrived at the candidate location in the time period of 10:00-11:00 in at least one day before today, and determines the total number of objects that have arrived at the candidate location in the time period of 10:00-11:00 today and at least one day before today, and determines the total number as the target flow information corresponding to the candidate location. Alternatively, the server may also determine the average flow of people that have arrived at the candidate location in the time period of 10:00-11:00 today and at least one day before today, and determines the average flow of people as the target flow information corresponding to the candidate location.
[0147] In another possible implementation, the server divides the target flow information into a plurality of different values according to the number of objects that have arrived at the candidate location within the target time period. The more objects that have arrived at the candidate location within the target time period, the larger the target flow information corresponding to the candidate location. For example, the target flow information is divided into five levels: "large", "relatively large", "medium", "relatively small" and "small". The target flow information corresponding to the "large" level is 1, the target flow information corresponding to the "relatively large" level is 0.7, the target flow information corresponding to the "medium" level is 0.5, the target flow information corresponding to the "relatively small" level is 0.3, and the target flow information corresponding to the "small" level is 0.1.
[0148] In the embodiment of the present application, the target flow information is represented by an assignment method, which simplifies the expression of the target flow information. Since the target flow information is a simple numerical value, the processing volume can be reduced when the target flow information is subsequently processed.
[0149] It should be noted that the embodiment of the present application is only described by first executing step 303 and then executing step 304, that is, first determining the first association information corresponding to the candidate position, and then determining the target flow information corresponding to the candidate position. In another embodiment, the target flow information may be determined first, and then the first association information may be determined, or the first association information and the target flow information may be determined at the same time. The embodiment of the present application does not limit the execution order of the above steps 303 and 304.
[0150] 305. The server fuses the first association information and the target traffic information corresponding to the candidate location to obtain fusion information corresponding to the candidate location.
[0151] After the server obtains the first association information and target traffic information corresponding to the candidate location, for each candidate location, the server fuses the first association information and target traffic information corresponding to the candidate location to obtain the fusion information corresponding to the candidate location. The degree of fusion association represented by the fusion information is determined by the degree of association between the candidate location and the reference location and the number. Since the number of objects that have arrived at the candidate location can reflect the popularity of the candidate location, the fusion information comprehensively considers the degree of association between the candidate location and the location of the terminal, as well as the popularity of the candidate location.
[0152] Optionally, the fusion information is expressed in the form of a numerical value. For example, the fusion information corresponding to the candidate position is positively correlated with the degree of association and the popularity. The larger the fusion information corresponding to the candidate position, the higher the degree of association between the candidate position and the location of the terminal, and the higher the popularity of the candidate position. The smaller the fusion information corresponding to the candidate position, the lower the degree of association between the candidate position and the location of the terminal, and the lower the popularity of the candidate position. Alternatively, the fusion information corresponding to the candidate position may also be negatively correlated with the degree of association and the popularity, which is not limited in the embodiments of the present application.
[0153] In one possible implementation, the server obtains the weight corresponding to the first association information and the weight corresponding to the target traffic information, and based on the two weights, performs weighted processing on the first association information and the target traffic information corresponding to the candidate location to obtain the fusion information corresponding to the candidate location.
[0154] 306. The server determines a target position from the multiple candidate positions based on the fusion information corresponding to the multiple candidate positions.
[0155] Among them, the fusion correlation degree represented by the fusion information corresponding to the target position is higher than the fusion correlation degree represented by the fusion information corresponding to other candidate positions.
[0156] In one possible implementation, the fusion information is information in numerical form. Optionally, the fusion information is positively correlated with the degree of fusion association, and the fusion information corresponding to the target position may be the largest fusion information among multiple fusion information, that is, the server determines the candidate position corresponding to the largest fusion information as the target position. Or the server sorts the fusion information from large to small, and the fusion information corresponding to the target position may be the fusion information of the number of targets in front, that is, the server determines the candidate position corresponding to the fusion information of the number of targets in front as the target position. Optionally, the fusion information is negatively correlated with the degree of fusion association, and the fusion information corresponding to the target position may be the smallest fusion information among multiple fusion information. Or the server sorts the fusion information from small to large, and the fusion information corresponding to the target position may be the fusion information of the number of targets in front.
[0157] In an embodiment of the present application, considering that the higher the degree of correlation between the candidate location and the current location of the terminal, the greater the possibility that the candidate location is the desired search location, and the higher the popularity of the candidate location, the greater the possibility that the candidate location is the desired search location, and the fusion information corresponding to the candidate location can reflect the degree of correlation and popularity corresponding to the candidate location, the server determines the candidate location with a higher degree of fusion correlation represented by the fusion information as the target location based on the fusion information corresponding to multiple candidate locations, and uses the target location as the location searched based on the search request, thereby improving the accuracy of the location search.
[0158] 307. The server sends the search results to the terminal.
[0159] After the server determines the target location, it obtains search results based on the target location and sends the search results to the terminal. The search results include information associated with the target location, such as the longitude and latitude information corresponding to the target location, location introduction information or location navigation information.
[0160] In one possible implementation, the search request carries search information, and the server filters information semantically matching the search information from information associated with the target location, determines the filtered information as the search result corresponding to the search information, and sends the search result to the terminal.
[0161] Among them, the search information can be a search text or a search voice. Different search information can be used to search for different types of information. The type of information that the search information is used to search for can be determined by the semantics of the search information. Therefore, after determining the target location, the server filters the information that matches the semantics of the search information from the information associated with the target location to obtain the search results corresponding to the search information.
[0162] For example, if the semantics of the search information indicates a search for brief information, the server obtains the brief information of the target location from the information associated with the target location as the search result of the search information. For another example, if the semantics of the search information indicates a search for a navigation route, the server obtains the navigation route to the target location from the information associated with the target location as the search result of the search information. For another example, if the semantics of the search information indicates a search for ticket information, the server obtains the ticket information of the target location from the information associated with the target location as the search result of the search information.
[0163] 308. The terminal receives the search result sent by the server and displays the search result.
[0164] After receiving the search results sent by the server, the terminal displays the search results, and the user of the terminal can view the search results. In one possible implementation, if the search results are information in text form, the terminal displays the search results, or if the search results are information in voice form or video form, the terminal plays the search results. The embodiment of the present application does not limit the display form of the search results.
[0165] The search method provided by the embodiment of the present application can be applied to the scene of scenic spot search. When the user searches for a scenic spot, there are scenic spots with the same name that need to be disambiguated. On the one hand, considering that the current location of the terminal is related to the scenic spot that the user expects to search, for example, the entity element "Yuntaishan Scenic Area" corresponds to four different scenic spots, namely Yuntaishan Scenic Area in Xiuwu County, Jiaozuo City, Henan Province, Yuntaishan Scenic Area in Lianyungang City, Jiangsu Province, Yuntaishan Scenic Area in Zhenjiang City, Jiangsu Province, and Anhua National 4A Scenic Area, and the Yuntaishan Scenic Area that the user expects to search is related to the location of the terminal, that is, when it is located in Jiaozuo City, Henan Province, it is more likely to expect to search for the Yuntaishan Scenic Area in Xiuwu County, Jiaozuo City, Henan Province, which is closer. On the other hand, considering that the popularity of the scenic spot is also related to the scenic spot that the user expects to search, the user is more likely to expect to search for a more popular scenic spot. Therefore, the first association information between the scenic spot and the current location of the terminal and the target traffic information of the scenic spot are integrated, and the obtained integrated information is used as auxiliary information for entity disambiguation. By optimizing the geographical location and popularity level, the accuracy of scenic spot disambiguation is improved, thereby improving the accuracy of scenic spot search.
[0166] The method provided in the embodiment of the present application determines fusion information corresponding to multiple candidate locations when there are multiple candidate locations corresponding to a search request. Since the fusion information can reflect the degree of association between the candidate location and the reference location and the popularity of the candidate location, and the higher the degree of association corresponding to the candidate location, the higher the possibility that the candidate location is the expected search location, and the higher the popularity corresponding to the candidate location, the higher the possibility that the candidate location is the expected search location, the candidate location with a higher degree of fusion association represented by the fusion information is determined as the searched target location, so that the influence of the terminal's location and the popularity of the target location are taken into account in the process of searching for the target location, which is conducive to improving the accuracy of the search.
[0167] Furthermore, by creating a location dictionary, a method for determining the location corresponding to an entity element is provided, and subsequent searches can be directly performed in the location dictionary, making the location query process more convenient and helping to improve the efficiency of location queries.
[0168] Furthermore, considering whether the candidate location and the reference location belong to the same geographical area, it can reflect the degree of association between the candidate location and the reference location. Therefore, the server determines the first association information corresponding to the candidate location from the perspective of the geographical area, providing a simple and quick way to determine the first association information.
[0169] Furthermore, considering the distance between the candidate position and the reference position, the degree of association between the candidate position and the reference position can be reflected. Therefore, the server determines the first association information corresponding to the candidate position from the perspective of the distance between the candidate position and the reference position, providing another simple and quick way to determine the first association information.
[0170] Furthermore, based on the number of objects that have arrived at the candidate location in the current cycle, the target traffic information corresponding to the candidate location is determined. Therefore, the target traffic information is real-time, thereby ensuring the validity of the target traffic information. The target location is subsequently determined based on the target traffic information, which is conducive to ensuring the accuracy of the searched target location.
[0171] Furthermore, the first association information is represented by an assignment method, which simplifies the representation of the first association information. Since the first association information is a simple numerical value, the processing amount can be reduced when the first association information is subsequently processed.
[0172] Furthermore, the target flow information is represented by an assignment method, which simplifies the representation of the target flow information. Since the target flow information is a simple numerical value, the processing amount can be reduced when the target flow information is subsequently processed.
[0173] In the case where the search request corresponds to multiple candidate locations, the target location can be determined from the multiple candidate locations based on the first association information and the second association information corresponding to the candidate locations. The specific process is described in detail below. Figure 5 Embodiment of the invention. Figure 5 is a flowchart of another search method provided in an embodiment of the present application. Figure 1 Server and terminal execution in the implementation environment of Figure 5 , the method comprising:
[0174] 501. The terminal sends a search request to the server.
[0175] 502. The server determines a plurality of candidate locations corresponding to the search request in response to the search request sent by the terminal.
[0176] 503. The server determines first association information corresponding to multiple candidate positions.
[0177] The process of the above step 501 to step 503 is the same as the process of the above step 301 to step 303, and will not be repeated here.
[0178] 504. The server determines second association information corresponding to multiple candidate positions.
[0179] In an embodiment of the present application, the search request carries search information, which may be a search text or a search voice. After the server determines the multiple candidate locations corresponding to the search request, it determines the second association information between the candidate location and the search information based on the candidate location and the search information. Among them, the second association information corresponding to the candidate location indicates the degree of association between the candidate location and the search information, and the degree of association between the candidate location and the search information refers to the semantic similarity between the candidate location and the search information. The higher the degree of association between the candidate location and the search information, the closer the semantics represented by the candidate location is to the semantics represented by the search information, and the lower the degree of association between the candidate information and the search information, the farther the semantics represented by the candidate location is from the semantics represented by the search information.
[0180] Optionally, the second association information is expressed in the form of a numerical value. For example, the second association information corresponding to the candidate position is positively correlated with the degree of association represented by the second association information, that is, the larger the second association information corresponding to the candidate position is, the higher the degree of association between the candidate position and the search information is, and the smaller the second association information corresponding to the candidate position is, the lower the degree of association between the candidate position and the search information is. Alternatively, the second association information corresponding to the candidate position is negatively correlated with the degree of association represented by the second association information, that is, the smaller the second association information corresponding to the candidate position is, the higher the degree of association between the candidate position and the search information is, and the smaller the second association information corresponding to the candidate position is, the lower the degree of association between the candidate position and the search information is.
[0181] In a possible implementation, the candidate position corresponds to a first entity element, and the search information includes multiple second entity elements. The server determines the similarity between the first entity element corresponding to the candidate position and the multiple second entity elements, and performs weighted processing on the similarities corresponding to the multiple second entity elements based on the weights of the multiple second entity elements to obtain the second association information corresponding to the candidate position.
[0182] Among them, the entity element refers to a word that serves as a subject or predicate in a sentence, or can also be a word whose part of speech is a noun, etc. The first entity element corresponding to the candidate position is an entity element used to describe the candidate position, such as the name of the candidate position, etc. The search information includes multiple second entity elements, and the weight of the second entity element indicates the importance of the second entity element in the search information. The similarity between the first entity element and the second entity element can be the semantic similarity between the first entity element and the second entity element.
[0183] The more similar the first entity element corresponding to the candidate position is to the multiple second entity elements in the search information, the greater the possibility that the first entity element and the multiple second entity elements have the same subject, the greater the possibility that the position described by the search information is the candidate position, and the higher the degree of association between the candidate position and the search information. The less similar the first entity element corresponding to the candidate position is to the multiple second entity elements in the search information, the less likely the first entity element and the multiple second entity elements have the same subject, the less likely the position described by the search information is the candidate position, and the lower the degree of association between the candidate position and the search information. Therefore, the server can determine the second association information corresponding to the candidate position based on the similarity between the first entity element corresponding to the candidate position and the multiple second entity elements.
[0184] In addition, considering that the importance of each second entity element in the search information is different, the more similar the first entity element is to the more important second entity element in the search information, the higher the degree of association between the candidate position and the search information. Therefore, the server can obtain the weights of multiple second entity elements, and based on the weights of the multiple second entity elements, perform weighted processing on the similarities corresponding to the multiple second entity elements to obtain the second association information corresponding to the candidate position. Therefore, the second association information not only considers the similarity between the first entity element and the second entity element, but also considers the importance of the second entity element in the search information, which is conducive to improving the accuracy of the second association information.
[0185] For example, the search information is a search text, and the search text is "Where is Yuntai Mountain in Henan?" The search text includes the second entity elements "Yuntai Mountain" and "Henan", and the first entity elements corresponding to multiple candidate locations are "Yuntai Mountain Scenic Area, Xiuwu County, Jiaozuo City, Henan Province", "Yuntai Mountain Scenic Area, Lianyungang City, Jiangsu Province", "Yuntai Mountain Scenic Area, Zhenjiang City, Jiangsu Province", and "Anhua National 4A Scenic Area". Considering that the search text includes the second entity element "Henan", the first entity element "Yuntai Mountain Scenic Area, Xiuwu County, Jiaozuo City, Henan Province" has the highest similarity with the second entity element. Therefore, the candidate location corresponding to the first entity element "Yuntai Mountain Scenic Area, Xiuwu County, Jiaozuo City, Henan Province" is more likely to be the target location expected to be searched.
[0186] For example, the server uses the following formula (1) to determine the second association information corresponding to the candidate position.
[0187]
[0188] Where m represents the first entity element corresponding to the candidate position, o represents the search information, C(m,o) represents the second associated information corresponding to the candidate position, and e irepresents the i-th second entity element in the search information, i is a positive integer, and i is not greater than the number of second entity elements in the search information, w(e i ,o) represents the second entity element e i The weight of sr(m,e i ) represents the first entity element m and the second entity element e i The similarity between .
[0189] Optionally, the server determines the weight of the second entity element, including: determining the weight of the second entity element based on similarities between the second entity element and multiple second entity elements in the search information.
[0190] For each second entity element, the server determines the similarity between the second entity element and multiple second entity elements in the search information, merges the similarities between the second entity element and the multiple second entity elements, and obtains the weight of the second entity element. The weight of the second entity element is positively correlated with the similarity between the second entity element and the multiple second entity elements, that is, the greater the similarity between the second entity element and the multiple second entity elements, the higher the importance of the second entity element in the search information. Therefore, the greater the weight of the second entity element, the smaller the similarity between the second entity element and the multiple second entity elements, the lower the importance of the second entity element in the search information, and the smaller the weight of the second entity element.
[0191] For example, the server uses the following formula (2) to determine the weight of the second attribute element.
[0192]
[0193] Among them, e i Indicates the i-th second entity element in the search information, e t represents the t-th second entity element in the search information, i and t are positive integers, and i and t are not greater than the number of second entity elements in the search information, o represents the search information, w(e i ,o) represents the second entity element e i The weight of N represents the number of the second entity elements in the search information, sr(e i ,e t ) represents the second entity element e i With the second entity element e t The similarity between .
[0194] Optionally, the server determines the similarity between the first entity element and the second entity element based on the element feature corresponding to the first entity element and the element feature corresponding to the second entity element. For example, the server determines the similarity between the element feature corresponding to the first entity element and the element feature corresponding to the second entity element as the similarity between the first entity element and the second entity element. The element feature corresponding to the entity element is used to represent the feature of the entity element. For example, if the entity element is actually composed of words, the element feature corresponding to the entity element is the word vector of the entity element or other types of features. For example, the server uses a cosine similarity algorithm to determine the similarity between element features.
[0195] Optionally, the element feature corresponding to the entity element is determined by the server, and the process of determining the element feature corresponding to the entity element includes: the server obtains multiple location description texts, each location description text includes multiple entity elements, and for each entity element, the server determines the element feature corresponding to the entity element based on the entity element and other entity elements in the same location description text as the entity element.
[0196] The location description text is a text used to describe a location, and the location description text includes at least one entity element used to describe the location. For example, the server may obtain corpus information corresponding to multiple locations, such as the corpus information including latitude and longitude information corresponding to the location, the location name, location introduction information or location rating information, etc., perform word segmentation, remove invalid words, perform entity recognition, etc. on the corpus information, and obtain a location description text including multiple entity elements.
[0197] In order to extract the element features corresponding to the entity element, the server can train the Word2vec (Word to vector) model according to the entity element and other entity elements in the same position description text as the entity element to obtain the element features corresponding to the entity element. For example, two training modes, CBOW (Continuous Bag-of-Words Model) or Skip-gram (Continuous Skip-gram Model), can be used to train the Word2vec model to obtain the element features corresponding to multiple entity elements in the position description text. The multiple entity elements include a first entity element and a second entity element, so the server can obtain the element features corresponding to the first entity element and the element features corresponding to the second entity element. In addition to using the position description text to train the Word2vec model to obtain the element features corresponding to the entity element, the server can also obtain the element features corresponding to the entity element by training the Word2vec model using other texts including the entity element, and then fuse the element features obtained by the two methods, thereby improving the robustness of the element features corresponding to the entity element. For example, the server performs weighted processing on two element features according to preset weights to obtain weighted element features, and subsequently uses the weighted element features to determine the similarity.
[0198] It should be noted that the embodiments of the present application only use the example of determining the similarity between entity elements by using the element features corresponding to the entity elements. In addition, the server can also use deep learning to determine the similarity between entity elements. For example, the entity elements are input into a deep learning model for determining the similarity, and the deep learning model outputs the similarity between the entity elements. The embodiments of the present application do not limit the method of determining the similarity.
[0199] It should be noted that the embodiment of the present application is only described by first executing step 503 and then executing step 504, that is, first determining the first association information corresponding to the candidate position, and then determining the second association information corresponding to the candidate position. In another embodiment, the second association information may be determined first, and then the first association information may be determined, or the first association information and the second association information may be determined at the same time. The embodiment of the present application does not limit the execution order of the above steps 503 and 504.
[0200] 505. The server fuses the first associated information and the second associated information corresponding to the candidate position to obtain fused information corresponding to the candidate position.
[0201] After the server obtains the first association information and the second association information corresponding to the candidate position, for each candidate position, the server fuses the first association information and the second association information corresponding to the candidate position to obtain the fused information corresponding to the candidate position. The degree of fusion association represented by the fused information is determined by the degree of association between the candidate position and the reference position and the degree of association between the candidate position and the search information. Therefore, the fused information comprehensively considers the degree of association between the candidate position and the location of the terminal, as well as the degree of association between the candidate position and the search text.
[0202] Optionally, the fusion information is expressed in the form of a numerical value. For example, the fusion information corresponding to the candidate position is positively correlated with the two degrees of association corresponding to the candidate position. The larger the fusion information corresponding to the candidate position, the higher the degree of association between the candidate position and the position of the terminal, and the higher the degree of association between the candidate position and the search text. The smaller the fusion information corresponding to the candidate position, the lower the degree of association between the candidate position and the position of the terminal, and the lower the degree of association between the candidate position and the search text. Alternatively, the fusion information corresponding to the candidate position may also be negatively correlated with the two degrees of association corresponding to the candidate position, which is not limited in the embodiments of the present application.
[0203] In one possible implementation, the server obtains a weight corresponding to the first association information and a weight corresponding to the second association information, and based on the two weights, performs weighted processing on the first association information and the second association information corresponding to the candidate position to obtain fusion information corresponding to the candidate position.
[0204] 506. The server determines a target position from the multiple candidate positions based on the fusion information corresponding to the multiple candidate positions.
[0205] Among them, the fusion correlation degree represented by the fusion information corresponding to the target position is higher than the fusion correlation degree represented by the fusion information corresponding to other candidate positions.
[0206] 507. The server sends the search results to the terminal.
[0207] The search result includes information associated with the target location.
[0208] 508. The terminal receives the search result sent by the server and displays the search result.
[0209] The process of the above step 506 to step 508 is the same as the process of the above step 306 to step 308, and will not be repeated here.
[0210] The method provided in the embodiment of the present application determines fusion information corresponding to multiple candidate positions when there are multiple candidate positions corresponding to a search request. Since the fusion information can reflect the degree of association between the candidate position and the reference position, as well as the degree of association between the candidate position and the search information, and the higher the degree of association between the candidate position and the reference position, the higher the possibility that the candidate position is the expected searched position, and the higher the degree of association between the candidate position and the search information, the higher the possibility that the candidate position is the expected searched position, the candidate position with a higher degree of fusion association represented by the fusion information is determined as the searched target position, so that the influence of the terminal's location and the search information are taken into account in the process of searching for the target position, which is beneficial to improving the accuracy of position search.
[0211] Furthermore, the second association information not only considers the similarity between the first attribute element and the second attribute element, but also considers the importance of the second attribute element in the search information, which is conducive to improving the accuracy of the second association information.
[0212] Furthermore, since the higher the similarity between the second entity element and multiple second entity elements, the higher the importance of the second entity element in the search information, and the smaller the similarity between the second entity element and multiple second entity elements, the lower the importance of the second entity element in the search information, when determining the weight of the second entity element, the similarity between the second entity element and multiple second entity elements is taken into account, thereby improving the accuracy of the weight of the second entity element.
[0213] The above embodiments respectively illustrate determining the target location from multiple candidate locations based on the first association information, based on the first association information and the target flow information, or based on the first association information and the second association information. In another embodiment, in order to further improve the accuracy of the search, Figure 3 and Figure 4 That is, based on the first association information, the target flow information and the second association information, the target location is determined from multiple candidate locations. The specific process is described in detail below. Figure 6 Embodiment of the invention.
[0214] Figure 6 This is a flowchart of another search method provided in the embodiment of the present application. Figure 1 Server and terminal execution in the implementation environment of Figure 6 , the method comprising:
[0215] 601. The terminal sends a search request to the server.
[0216] 602. The server determines a plurality of candidate locations corresponding to the search request in response to the search request sent by the terminal.
[0217] 603. The server determines first association information corresponding to multiple candidate positions.
[0218] 604. The server determines target traffic information corresponding to multiple candidate locations.
[0219] 605. The server determines second association information corresponding to multiple candidate positions.
[0220] The process of steps 601 to 605 can be found in the above Figure 3 and Figure 5 The embodiments of the present invention will not be described in detail here.
[0221] It should be noted that the embodiment of the present application is described only by taking the order of step 603, step 604 and step 605 as an example. In another embodiment, step 603, step 604 and step 605 may be performed in other orders, or step 603, step 604 and step 605 may be performed simultaneously, etc. The embodiment of the present application does not limit the execution order of the above-mentioned step 603, step 604 and step 605.
[0222] 606. The server fuses the first associated information, the target traffic information, and the second associated information corresponding to the candidate location to obtain fused information corresponding to the candidate location.
[0223] After the server obtains the first association information, target traffic information, and second association information corresponding to the candidate location, for each candidate location, the server fuses the first association information, target traffic information, and second association information corresponding to the candidate location to obtain the fused information corresponding to the candidate location. The degree of fusion association represented by the fused information is determined by the degree of association between the candidate location and the reference location, the number of objects that have arrived at the candidate location, and the degree of association between the candidate location and the search information. Since the number of objects that have arrived at the candidate location can reflect the popularity of the candidate location, the fused information comprehensively considers the degree of association between the candidate location and the location of the terminal, the popularity of the candidate location, and the degree of association between the candidate location and the search information.
[0224] Optionally, the fusion information is expressed in the form of a numerical value. For example, the fusion information corresponding to the candidate position is positively correlated with the two degrees of association and popularity corresponding to the candidate position. The larger the fusion information corresponding to the candidate position, the higher the degree of association between the candidate position and the position of the terminal, and the higher the popularity of the candidate position, and the higher the degree of association between the candidate position and the search text. The smaller the fusion information corresponding to the candidate position, the lower the degree of association between the candidate position and the position of the terminal, and the lower the popularity of the candidate position, and the lower the degree of association between the candidate position and the search text. Alternatively, the fusion information corresponding to the candidate position may also be negatively correlated with the two degrees of association and popularity corresponding to the candidate position, and the embodiments of the present application are not limited to this.
[0225] In one possible implementation, the server obtains the weight corresponding to the first association information, the weight corresponding to the target traffic information, and the weight corresponding to the second association information, and based on the three weights, performs weighted processing on the first association information, target traffic information, and second association information corresponding to the candidate location to obtain the fusion information corresponding to the candidate location.
[0226] For example, the server determines the fusion information corresponding to the candidate position based on the following formula (3).
[0227] score=Q1*coscore+Q2*location+Q3*traffic (3)
[0228] Among them, score represents fusion information, coscore represents the second associated information, location represents the first associated information, traffic represents the target fusion information, Q1 represents the weight corresponding to the second associated information, Q2 represents the weight corresponding to the first associated information, and Q3 represents the weight corresponding to the target fusion information. For example, Q1 is equal to 0.85, Q2 is equal to 0.1, and Q3 is equal to 0.05.
[0229] 607. The server determines a target position from the multiple candidate positions based on the fusion information corresponding to the multiple candidate positions.
[0230] 608. The server sends the search results to the terminal.
[0231] The search result includes information associated with the target location.
[0232] 609. The terminal receives the search result sent by the server and displays the search result.
[0233] The process of the above step 607 to step 609 is the same as the process of the above step 306 to step 308, and will not be repeated here.
[0234] The method provided in the embodiment of the present application determines fusion information corresponding to multiple candidate positions when there are multiple candidate positions corresponding to a search request. The fusion information can reflect the degree of association between the candidate position and the reference position, the popularity of the candidate position, and the degree of association between the candidate position and the search information. Therefore, the candidate position with a higher degree of fusion association represented by the fusion information is determined as the searched target position, so that the influence of the terminal's location, the popularity of the target location, and the influence of the search information are taken into account in the process of searching for the target location, which is conducive to improving the accuracy of the search.
[0235] Figure 7 is a flowchart of another search method provided in an embodiment of the present application. Figure 7 As shown, the search method includes the following steps.
[0236] 701. The server obtains corpus information of multiple locations. The multiple locations may be multiple scenic spots. The corpus information is also called POI information, which may include latitude and longitude information, location name, location introduction information, or location rating information, etc. The corpus information of the multiple locations may be multiple scenic spot POI information.
[0237] 702. The server constructs a knowledge base. The server performs word segmentation, invalid word removal, entity recognition, etc. on the corpus information according to the corpus information to obtain multiple location description texts to form a knowledge base.
[0238] 703. The server obtains element features corresponding to the entity elements. The server trains a Word2vec model (word vector model) based on the location description text in the knowledge base, and obtains element features corresponding to the entity elements in the location description text from the trained Word2vec model.
[0239] 704. The server constructs a location dictionary. The server determines the entity elements corresponding to the multiple locations based on the location description text in the knowledge base, creates a corresponding relationship between the entity element and at least one location described by the entity element, and constructs a location dictionary.
[0240] 705. The server obtains the search text input by the user. The search text input by the user is also the corpus input by the user, and the corpus can be the corpus used to search for scenic spots.
[0241] 706. The server performs entity recognition on the search text to obtain a target entity element in the search text that is used to describe a location.
[0242] 707. The server determines the second association information corresponding to the candidate position. The server searches the position dictionary for multiple candidate positions corresponding to the target entity element, performs topic consistency calculation on the candidate positions and the search text, and determines the second association information between the candidate positions and the search text based on the element features corresponding to the target entity element and the element features corresponding to the entity element in the search text.
[0243] 708. The server determines the first association information and the target flow information corresponding to the candidate location. The server determines the first association information between the candidate location and the reference location, and determines the target flow information corresponding to the candidate location. For example, if the candidate location is a scenic spot, the target flow information corresponding to the candidate location can reflect the flow of people in the scenic spot.
[0244] 709. The server determines the fusion information corresponding to the candidate location, and determines the target location from the multiple candidate locations based on the fusion information. The server fuses the first association information, the second association information, and the target traffic information corresponding to the candidate location to obtain the fusion information of the candidate scenic spot. After determining the target location based on the fusion information, the server links the target location. Linking the target location means sending the information associated with the target location to the terminal so that the terminal displays the information associated with the target location to the user.
[0245] Figure 8 is a schematic diagram of the structure of a search device provided in an embodiment of the present application. Figure 8 , the device comprises:
[0246] A first position determination module 801, configured to determine, in response to a search request sent by a terminal, a plurality of candidate positions corresponding to the search request;
[0247] A first information determination module 802 is used to determine first association information corresponding to a plurality of candidate positions, where the first association information indicates the degree of association between the candidate positions and a reference position, where the reference position is the current position of the terminal;
[0248] A second position determination module 803 is used to determine a target position from a plurality of candidate positions based on the first association information corresponding to the plurality of candidate positions, wherein the association degree represented by the first association information corresponding to the target position is higher than the association degrees represented by the first association information corresponding to other candidate positions;
[0249] The result sending module 804 is used to send the search results to the terminal, where the search results include information associated with the target location.
[0250] The search device provided in the embodiment of the present application determines first association information between the multiple candidate positions and the current position of the terminal when a search request corresponds to multiple candidate positions. Since the first association information can reflect the degree of association between the candidate position and the current position of the terminal, and the higher the degree of association corresponding to the candidate position, the higher the possibility that the candidate position is the expected searched position, a target position with a higher degree of association than other candidate positions is determined from the multiple candidate positions, so that the degree of association with the position of the terminal is taken into account in the process of searching for the target position, which is beneficial to improving the accuracy of the search.
[0251] Alternatively, see Fig. 9 , the first information determination module 802 includes:
[0252] A first determining unit 812, configured to determine first association information corresponding to the plurality of candidate positions according to the geographical areas to which the plurality of candidate positions belong and the geographical area to which the reference position belongs;
[0253] The degree of association represented by the first association information corresponding to the candidate position belonging to the same geographical area as the reference position is higher than the degree of association represented by the first association information corresponding to the candidate position belonging to a different geographical area from the reference position.
[0254] Alternatively, see Fig. 9 , a first determining unit 812 is configured to:
[0255] In a case where the geographical area of each level to which the candidate position belongs is different from the geographical area of the corresponding level to which the reference position belongs, determining the first value as the first association information corresponding to the candidate position;
[0256] In the case where at least one geographical area to which the candidate position belongs is the same as a geographical area of a corresponding level to which the reference position belongs, determining a lowest level in the levels corresponding to the same at least one geographical area, determining a second value corresponding to the lowest level as the first association information corresponding to the candidate position, and the geographical area of the low level belongs to a sub-area of the geographical area of the high level;
[0257] The degree of association represented by the first value is lower than the degree of association represented by the second value, different levels correspond to different second values, and the higher the level, the lower the degree of association represented by the corresponding second value.
[0258] Alternatively, see Fig. 9 , the first information determination module 802 includes:
[0259] The second determining unit 822 is used to determine first association information corresponding to multiple candidate positions according to the distances between the multiple candidate positions and the reference position, and the association degree represented by the first association information corresponding to the candidate position is negatively correlated with the distance corresponding to the candidate position.
[0260] Alternatively, see Fig. 9 , the second position determination module 803 includes:
[0261] The fusion unit 813 is used to fuse the first association information corresponding to the candidate position and the target traffic information to obtain fusion information corresponding to the candidate position, where the target traffic information indicates the number of objects that have arrived at the candidate position within the target time period, and the fusion association degree indicated by the fusion information is determined by the association degree between the candidate position and the reference position and the number;
[0262] The position determination unit 823 is used to determine the target position from multiple candidate positions based on the fusion information corresponding to the multiple candidate positions, and the fusion association degree represented by the fusion information corresponding to the target position is higher than the fusion association degree represented by the fusion information corresponding to other candidate positions.
[0263] Alternatively, see Fig. 9 , the device further comprises:
[0264] The traffic information determination module 805 is used to determine the target traffic information corresponding to the candidate location based on at least one of the first traffic information or the second traffic information corresponding to the candidate location, the first traffic information indicates the number of objects that have arrived at the candidate location in the current cycle, and the second traffic information indicates the number of objects that have arrived at the candidate location in the cycle before the current cycle.
[0265] Alternatively, see Fig. 9 , the second position determination module 803 includes:
[0266] A fusion unit 813 is configured to fuse the first association information and the second association information corresponding to the candidate position to obtain fusion information corresponding to the candidate position, wherein the second association information indicates a degree of association between the candidate position and the search information in the search request, and the fusion degree of association indicated by the fusion information is determined by a degree of association between the candidate position and the reference position and a degree of association between the candidate position and the search information;
[0267] The position determination unit 823 is used to determine the target position from multiple candidate positions based on the fusion information corresponding to the multiple candidate positions, and the fusion association degree represented by the fusion information corresponding to the target position is higher than the fusion association degree represented by the fusion information corresponding to other candidate positions.
[0268] Alternatively, see Fig. 9, the candidate position corresponds to a first entity element, the search information includes a plurality of second entity elements, and the device further includes:
[0269] A second information determination module 806, configured to determine the similarity between the first entity element corresponding to the candidate position and a plurality of second entity elements;
[0270] The second information determination module 806 is further configured to perform weighted processing on the similarities corresponding to the plurality of second entity elements based on the weights of the plurality of second entity elements, so as to obtain the second association information corresponding to the candidate position.
[0271] Alternatively, see Fig. 9 , the device further comprises:
[0272] The weight determination module 807 is used to determine the weight of the second attribute element based on the similarity between the second attribute element and multiple second attribute elements in the search information.
[0273] Alternatively, see Fig. 9 , the device further comprises:
[0274] A feature determination module 808 is used to obtain a plurality of location description texts, where the location description texts include a plurality of entity elements;
[0275] The feature determination module 808 is further configured to determine, for each entity element, an element feature corresponding to the entity element according to the entity element and other entity elements in the description text located at the same position as the entity element;
[0276] The second information determination module 806 is configured to determine the similarity between the first entity element and the second entity element based on the element feature corresponding to the first entity element and the element feature corresponding to the second entity element.
[0277] Alternatively, see Fig. 9 , the first position determination module 801 includes:
[0278] An element identification unit 811 is used to identify, in response to a search request, a target entity element used to describe a location in the search information carried in the search request;
[0279] The position query unit 821 is used to query a plurality of candidate positions corresponding to the target entity element in the position dictionary.
[0280] Alternatively, see Fig. 9 , the device further comprises:
[0281] A dictionary creation module 809, used to determine at least one entity element for describing a location;
[0282] The dictionary creation module 809 is further configured to create, for each entity element, a correspondence between the entity element and at least one position described by the entity element, to form a position dictionary.
[0283] Alternatively, see Fig. 9 , the device further comprises:
[0284] The result acquisition module 810 is used to filter information semantically matching the search information in the search request from the information associated with the target location, and determine the filtered information as the search result corresponding to the search information.
[0285] It should be noted that: the search device provided in the above embodiment only uses the division of the above functional modules as an example when searching for a location. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the server is divided into different functional modules to complete all or part of the functions described above. In addition, the search device provided in the above embodiment and the search method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0286] Fig.10 A schematic structural diagram of a terminal 1000 provided by an exemplary embodiment of the present application is shown.
[0287] The terminal 1000 includes: a processor 1001 and a memory 1002 .
[0288] The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1001 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1001 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0289] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one computer program, which is used to be possessed by the processor 1001 to implement the search method provided in the method embodiment of the present application.
[0290] In some embodiments, the terminal 1000 may further optionally include: a peripheral device interface 1003 and at least one peripheral device. The processor 1001, the memory 1002 and the peripheral device interface 1003 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1003 via a bus, a signal line or a circuit board. Optionally, the peripheral device includes: at least one of a radio frequency circuit 1004, a display screen 1005, a camera assembly 1006, an audio circuit 1007, a positioning assembly 1008 and a power supply 1009.
[0291] The peripheral device interface 1003 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1001 and the memory 1002. In some embodiments, the processor 1001, the memory 1002, and the peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1001, the memory 1002, and the peripheral device interface 1003 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0292] The radio frequency circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1004 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 1004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 1004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1004 can communicate with other devices through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1004 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0293] The display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1005 is a touch display screen, the display screen 1005 also has the ability to collect touch signals on the surface or above the surface of the display screen 1005. The touch signal can be input to the processor 1001 as a control signal for processing. At this time, the display screen 1005 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1005 can be one, arranged on the front panel of the terminal 1000; in other embodiments, the display screen 1005 can be at least two, respectively arranged on different surfaces of the terminal 1000 or in a folding design; in other embodiments, the display screen 1005 can be a flexible display screen, arranged on a curved surface or a folding surface of the terminal 1000. Even, the display screen 1005 can also be arranged as a non-rectangular irregular figure, that is, a special-shaped screen. The display screen 1005 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0294] The camera assembly 1006 is used to capture images or videos. Optionally, the camera assembly 1006 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal 1000, and the rear camera is arranged on the back of the terminal 1000. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1006 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. The dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0295] The audio circuit 1007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1001 for processing, or input them into the radio frequency circuit 1004 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 1000. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1007 may also include a headphone jack.
[0296] The positioning component 1008 is used to locate the current geographical location of the terminal 1000 to implement navigation or LBS (Location Based Service).
[0297] The power supply 1009 is used to power various components in the terminal 1000. The power supply 1009 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1009 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0298] Those skilled in the art will understand that Fig.10 The structure shown in the figure does not constitute a limitation on the terminal 1000, and the terminal 1000 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0299] An embodiment of the present application further provides a server, which includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the search method of the above embodiment.
[0300] Fig.11 This is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 1100 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1101 and one or more memories 1102, wherein the memory 1102 stores at least one computer program, and the at least one computer program is loaded and executed by the processor 1101 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server may also include other components for implementing device functions, which will not be described in detail here.
[0301] An embodiment of the present application further provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed in the search method of the above embodiment.
[0302] The present application embodiment also provides a computer program product, including a computer program, which is loaded and executed by a processor to implement the operations performed in the search method of the above embodiment. In some embodiments, the computer program involved in the embodiment of the present application can be deployed on a computer device for execution, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network can constitute a blockchain system.
[0303] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0304] The above description is only an optional embodiment of the embodiments of the present application and is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A search method, characterized in that: The method comprises: In response to a search request sent by a terminal, determining a plurality of candidate positions corresponding to the search request, the search request including search information, the candidate positions corresponding to a first entity element, and the search information including a plurality of second entity elements; Determine first association information corresponding to the multiple candidate positions, where the first association information indicates a degree of association between the candidate positions and a reference position, where the reference position is a current position of the terminal; For any one of the plurality of second entity elements, based on the similarity between the second entity element and the plurality of second entity elements in the search information, determine the weight of the second entity element, the weight of the second entity element indicating the importance of the second entity element in the search information; determine the similarity between the first entity element corresponding to the candidate position and each of the second entity elements; based on the weights of the plurality of second entity elements, perform weighted processing on the similarities corresponding to the plurality of second entity elements to obtain second association information corresponding to the candidate position, the second association information indicating the association degree between the candidate position and the search information in the search request; fusing the first association information and the second association information corresponding to the candidate position to obtain fused information corresponding to the candidate position, wherein a fused association degree represented by the fused information is determined by a degree of association between the candidate position and the reference position and a degree of association between the candidate position and the search information; Based on the fusion information corresponding to the multiple candidate positions, determining a target position from the multiple candidate positions, the fusion correlation degree represented by the fusion information corresponding to the target position being higher than the fusion correlation degrees represented by the fusion information corresponding to other candidate positions; The search results are sent to the terminal, where the search results include information associated with the target location.
2. The method according to claim 1, characterized in that The determining the first association information corresponding to the multiple candidate positions includes: Determining first association information corresponding to the multiple candidate positions according to the geographical areas to which the multiple candidate positions belong and the geographical area to which the reference position belongs; The degree of association represented by the first association information corresponding to the candidate position belonging to the same geographical area as the reference position is higher than the degree of association represented by the first association information corresponding to the candidate position belonging to a different geographical area from the reference position.
3. The method according to claim 2, characterized in that The determining, according to the geographical areas to which the multiple candidate positions belong and the geographical area to which the reference position belongs, first association information corresponding to the multiple candidate positions includes: In a case where the geographical area of each level to which the candidate position belongs is different from the geographical area of the corresponding level to which the reference position belongs, determining the first value as the first association information corresponding to the candidate position; In the case where at least one geographical area to which the candidate position belongs is the same as a geographical area of a corresponding level to which the reference position belongs, determining a lowest level in the levels corresponding to the same at least one geographical area, determining a second value corresponding to the lowest level as the first association information corresponding to the candidate position, and the geographical area of the low level belongs to a sub-area of the geographical area of the high level; The degree of association represented by the first value is lower than the degree of association represented by the second value, different levels correspond to different second values, and the higher the level, the lower the degree of association represented by the corresponding second value.
4. The method according to claim 1, characterized in that: The determining the first association information corresponding to the multiple candidate positions includes: According to the distances between the multiple candidate positions and the reference position, first association information corresponding to the multiple candidate positions is determined, and the degree of association represented by the first association information corresponding to the candidate positions is negatively correlated with the distances corresponding to the candidate positions.
5. The method according to any one of claims 1 to 4, characterized in that: The determining the target position from the multiple candidate positions based on the first association information corresponding to the multiple candidate positions includes: The first association information and target traffic information corresponding to the candidate position are fused to obtain fused information corresponding to the candidate position, wherein the target traffic information indicates the number of objects that have arrived at the candidate position within a target time period, and the degree of fusion association indicated by the fused information is determined by the degree of association between the candidate position and the reference position and the number; Based on the fusion information corresponding to the multiple candidate positions, the target position is determined from the multiple candidate positions, and the fusion association degree represented by the fusion information corresponding to the target position is higher than the fusion association degree represented by the fusion information corresponding to other candidate positions.
6. The method according to claim 5, characterized in that The method further comprises: Based on at least one of the first traffic information or the second traffic information corresponding to the candidate location, determine the target traffic information corresponding to the candidate location, the first traffic information indicates the number of objects that have arrived at the candidate location in the current cycle, and the second traffic information indicates the number of objects that have arrived at the candidate location in the cycle before the current cycle.
7. The method according to claim 1, characterized in that Before determining the similarity between the first entity element corresponding to the candidate position and each of the second entity elements, the method further includes: Acquire a plurality of location description texts, wherein the location description texts include a plurality of entity elements; For each of the entity elements, determining an element feature corresponding to the entity element according to the entity element and other entity elements in the description text located at the same position as the entity element; The determining the similarity between the first entity element corresponding to the candidate position and each of the second entity elements includes: Based on an element feature corresponding to the first entity element and an element feature corresponding to the second entity element, a similarity between the first entity element and the second entity element is determined.
8. The method according to any one of claims 1 to 4, characterized in that: The step of determining, in response to a search request sent by a terminal, a plurality of candidate locations corresponding to the search request includes: In response to the search request, identifying a target entity element for describing a location in the search information carried in the search request; In the position dictionary, the multiple candidate positions corresponding to the target entity element are searched.
9. The method according to claim 8, characterized in that Before searching the location dictionary for the multiple candidate locations corresponding to the target entity element, the method further includes: determining at least one attribute element for describing the location; For each of the entity elements, a corresponding relationship between the entity element and at least one position described by the entity element is created to form the position dictionary.
10. A search device, characterized in that: The device comprises: A first location determination module, configured to determine, in response to a search request sent by a terminal, a plurality of candidate locations corresponding to the search request, wherein the search request includes search information, the candidate locations correspond to a first entity element, and the search information includes a plurality of second entity elements; A first information determination module, configured to determine first association information corresponding to the plurality of candidate positions, wherein the first association information indicates a degree of association between the candidate positions and a reference position, wherein the reference position is a current position of the terminal; a weight determination module, configured to determine, for any one of the plurality of second attribute elements, a weight of the second attribute element based on a similarity between the second attribute element and a plurality of second attribute elements in the search information, wherein the weight of the second attribute element indicates an importance of the second attribute element in the search information; A second information determination module, configured to determine a similarity between the first entity element corresponding to the candidate position and each of the second entity elements; The second information determination module is further configured to perform weighted processing on the similarities corresponding to the plurality of second entity elements based on the weights of the plurality of second entity elements to obtain second association information corresponding to the candidate position, wherein the second association information indicates a degree of association between the candidate position and the search information in the search request; a second position determination module, configured to fuse the first association information and the second association information corresponding to the candidate position to obtain fused information corresponding to the candidate position, wherein the degree of fused association represented by the fused information is determined by the degree of association between the candidate position and the reference position and the degree of association between the candidate position and the search information; The second position determination module is further used to determine a target position from the multiple candidate positions based on the fusion information corresponding to the multiple candidate positions, the fusion association degree represented by the fusion information corresponding to the target position being higher than the fusion association degree represented by the fusion information corresponding to other candidate positions; The result sending module is used to send the search result to the terminal, where the search result includes information associated with the target location.
11. The device according to claim 10, characterized in that The first information determination module includes: A first determining unit, configured to determine first association information corresponding to the plurality of candidate positions according to the geographical areas to which the plurality of candidate positions belong and the geographical area to which the reference position belongs; The degree of association represented by the first association information corresponding to the candidate position belonging to the same geographical area as the reference position is higher than the degree of association represented by the first association information corresponding to the candidate position belonging to a different geographical area from the reference position.
12. The device according to claim 11, characterized in that The first determining unit is configured to: In a case where the geographical area of each level to which the candidate position belongs is different from the geographical area of the corresponding level to which the reference position belongs, determining the first value as the first association information corresponding to the candidate position; In the case where at least one geographical area to which the candidate position belongs is the same as a geographical area of a corresponding level to which the reference position belongs, determining a lowest level in the levels corresponding to the same at least one geographical area, determining a second value corresponding to the lowest level as the first association information corresponding to the candidate position, and the geographical area of the low level belongs to a sub-area of the geographical area of the high level; The degree of association represented by the first value is lower than the degree of association represented by the second value, different levels correspond to different second values, and the higher the level, the lower the degree of association represented by the corresponding second value.
13. The device according to claim 10, characterized in that The first information determination module includes: The second determination unit is used to determine first association information corresponding to the multiple candidate positions based on the distances between the multiple candidate positions and the reference position, and the degree of association represented by the first association information corresponding to the candidate positions is negatively correlated with the distances corresponding to the candidate positions.
14. The device according to any one of claims 10 to 13, characterized in that: The second position determination module comprises: a fusion unit, configured to fuse the first association information and target traffic information corresponding to the candidate position to obtain fusion information corresponding to the candidate position, wherein the target traffic information indicates the number of objects that have arrived at the candidate position within a target time period, and the degree of fusion association indicated by the fusion information is determined by the degree of association between the candidate position and the reference position and the number; A position determination unit is used to determine the target position from the multiple candidate positions based on the fusion information corresponding to the multiple candidate positions, and the fusion association degree represented by the fusion information corresponding to the target position is higher than the fusion association degree represented by the fusion information corresponding to other candidate positions.
15. The device according to claim 14, characterized in that The device also includes: A traffic information determination module is used to determine the target traffic information corresponding to the candidate location based on at least one of the first traffic information or the second traffic information corresponding to the candidate location, wherein the first traffic information indicates the number of objects that have arrived at the candidate location in a current cycle, and the second traffic information indicates the number of objects that have arrived at the candidate location in a cycle before the current cycle.
16. The device according to claim 10, characterized in that The device also includes: A feature determination module is used to obtain a plurality of location description texts, wherein the location description texts include a plurality of entity elements; The feature determination module is further used to determine, for each of the entity elements, an element feature corresponding to the entity element according to the entity element and other entity elements in the description text located at the same position as the entity element; The second information determination module is configured to determine the similarity between the first entity element and the second entity element based on an element feature corresponding to the first entity element and an element feature corresponding to the second entity element.
17. The device according to any one of claims 10 to 13, characterized in that: The first position determination module includes: an element identification unit, configured to identify, in response to the search request, a target entity element used to describe a location in the search information carried in the search request; The position query unit is used to query the multiple candidate positions corresponding to the target entity element in the position dictionary.
18. The device according to claim 17, characterized in that The device also includes: A dictionary creation module, configured to determine at least one entity element for describing a location; The dictionary creation module is further configured to create, for each of the entity elements, a correspondence between the entity element and at least one position described by the entity element, to form the position dictionary.
19. A server, characterized in that: The server includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the search method according to any one of claims 1 to 9.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the search method according to any one of claims 1 to 9.
21. A computer program product, comprising a computer program, characterized in that The computer program is loaded and executed by a processor to implement the search method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Position recommendation method and device, equipment and storage medium
CN112685525A