CN110134745B - Method, device and equipment for inquiring route information - Google Patents

Method, device and equipment for inquiring route information Download PDF

Info

Publication number
CN110134745B
CN110134745B CN201810134648.6A CN201810134648A CN110134745B CN 110134745 B CN110134745 B CN 110134745B CN 201810134648 A CN201810134648 A CN 201810134648A CN 110134745 B CN110134745 B CN 110134745B
Authority
CN
China
Prior art keywords
content
current
noun
user
sentence pattern
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810134648.6A
Other languages
Chinese (zh)
Other versions
CN110134745A (en
Inventor
涂畅
张扬
王砚峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201810134648.6A priority Critical patent/CN110134745B/en
Publication of CN110134745A publication Critical patent/CN110134745A/en
Application granted granted Critical
Publication of CN110134745B publication Critical patent/CN110134745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Navigation (AREA)

Abstract

The invention discloses a method for inquiring route information. The method comprises the following steps: acquiring user input content and/or received communication content as current content; if the current local noun is found in the current content, deleting the current local noun from the current content to obtain the content to be matched; matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic meaning of a query route; and if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun to obtain target route information. By the method provided by the embodiment of the invention, the user can directly obtain the route information which the user wants to inquire without exiting the current application program and switching to the application with the route inquiry function to inquire the route information through a series of operations, so that unnecessary user operations are reduced. In addition, the invention also discloses a device for inquiring the route information.

Description

Method, device and equipment for inquiring route information
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method, an apparatus, and a device for querying route information.
Background
Currently, many web applications are capable of providing users with query services for route information. When a user needs to query route information, the user typically needs to do the following on the smart device: the method comprises the steps of exiting the currently used application, finding the application with the route query function, clicking and opening the application, inputting a departure place and a destination at specified positions respectively, and clicking and querying. After the user completes the above operation, the application having the route query function searches for route information between the two places according to the departure place and the destination input by the user and presents the route information to the user. As can be seen, the operations performed by the user in order to inquire the route information are excessively complicated, which causes inconvenience to the user.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method, a device and equipment for inquiring route information, so as to simplify the operation executed by a user for inquiring the route information, thereby enabling the user to more conveniently check the route information and improving the operation efficiency of the user.
In order to solve the above technical problems, an embodiment of the present invention provides a method for querying route information, including:
acquiring user input content and/or received communication content as current content;
if the current local noun is found in the current content, deleting the current local noun from the current content to obtain the content to be matched;
Matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic meaning of a query route;
And if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun to obtain target route information.
Optionally, the current place name word includes a first place name and a second place name, and the target route information is used for indicating a route between a position represented by the first place name and a position represented by the second place name.
Optionally, the current place noun includes only a third place noun, and the target route information is used for indicating a route between the position represented by the third place noun and the current positioning position of the terminal.
Optionally, the matching the content to be matched with a pre-recorded sentence pattern template includes:
Judging whether the sentence pattern template is contained in the content to be matched;
And if the sentence pattern template is contained in the content to be matched, determining that the content to be matched is matched with the sentence pattern template.
Optionally, if the content to be matched is matched with the sentence pattern template, route information query is performed based on the place name word to obtain target route information, including:
If the content to be matched is matched with the sentence pattern template, determining a place of origin and a destination position based on the sentence pattern template and the current place noun;
calculating a route from the origin location to the destination location;
Target route information indicating the route is generated.
Optionally, the method further comprises:
And responding to the user editing operation aiming at the sentence pattern template, and recording the content input under the user editing operation as the sentence pattern template.
Optionally, the method further comprises:
For a historical user behavior of executing route inquiry for an application which jumps to a route inquiry function, acquiring user input content and/or received communication content before the historical user behavior as first historical content;
and if the first historical content contains a first historical noun and the position represented by the first historical noun is consistent with the designated position for inquiring the route in the historical user behavior, extracting the sentence pattern template from the part of the first historical content, which is removed from the first historical content, and recording the sentence pattern template.
Optionally, the method further comprises:
Acquiring second historical content input by a user;
extracting an initial template from a part of the second historical noun removed from the second historical content if the second historical content contains the second historical noun;
And responding to the confirmation operation for the initial template, and recording the initial template as the sentence pattern template.
In a second aspect, to solve the above technical problem, an embodiment of the present invention provides an apparatus for querying route information, including:
The first acquisition unit is used for acquiring user input content and/or received communication content as current content;
A deleting unit, configured to delete a current local noun from the current content if the current local noun is found in the current content, so as to obtain a content to be matched;
The matching unit is used for matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic meaning of an inquiry route;
and the query unit is used for querying route information based on the current noun to obtain target route information if the content to be matched is matched with the sentence pattern template.
Optionally, the matching unit includes: a judging subunit and a matching subunit.
The judging subunit: and the sentence pattern template is used for judging whether the content to be matched contains the sentence pattern template or not.
The matching subunit: and determining that the content to be matched is matched with the sentence pattern template if the content to be matched contains the sentence pattern template.
Optionally, the query unit includes: a determination subunit, a calculation subunit, and a generation subunit.
The determination subunit: and determining a place of origin and a destination position based on the sentence pattern template and the current noun if the content to be matched is matched with the sentence pattern template.
The computing subunit: for calculating a route from the origin location to the destination location.
The generation subunit: for generating target route information for indicating the route.
Optionally, the apparatus further comprises a first recording unit.
The first recording unit: and the sentence pattern template processing module is used for responding to the user editing operation aiming at the sentence pattern template and recording the content input under the user editing operation as the sentence pattern template.
Optionally, the apparatus further includes: and a second recording unit.
The second recording unit: a historical user behavior for executing route query for an application that jumps to a function with route query, acquiring first historical content input by a user before the historical user behavior;
and if the first historical content contains a first historical noun and the position represented by the first historical noun is consistent with the designated position for inquiring the route in the historical user behavior, extracting the sentence pattern template from the part of the first historical content, which is removed from the first historical content, and recording the sentence pattern template.
Optionally, the apparatus further includes: and a third recording unit.
The third recording unit: the method comprises the steps of obtaining second historical content input by a user;
extracting an initial template from a part of the second historical noun removed from the second historical content if the second historical content contains the second historical noun;
And responding to the confirmation operation for the initial template, and recording the initial template as the sentence pattern template.
Optionally, the second recording unit includes: a first acquisition subunit and a first recording subunit.
The first acquisition subunit: historical user behavior for executing route query for an application that jumps to have a route query function, user input content and/or received communication content preceding the historical user behavior is acquired as first historical content.
The first recording subunit: and if the first historical content contains a first historical noun and the position represented by the first historical noun is consistent with the designated position for inquiring the route in the historical user behavior, extracting the sentence pattern template from the part of the first historical content, in which the first historical noun is removed, and recording the sentence pattern template.
Optionally, the third recording unit includes: the second acquisition subunit, the extraction subunit and the second recording subunit.
The second acquisition subunit: for obtaining second history content entered by the user.
The extraction subunit: and extracting an initial template from the second historical content by eliminating the part of the second historical noun if the second historical content contains the second historical noun.
The second recording subunit: and the sentence pattern template is used for responding to the confirmation operation of the initial template, and the initial template is recorded as the sentence pattern template.
Optionally, the current place name word includes a first place name and a second place name, and the target route information is used for indicating a route between a position represented by the first place name and a position represented by the second place name.
Optionally, the current place noun includes only a third place noun, and the target route information is used for indicating a route between the position represented by the third place noun and the current positioning position of the terminal.
In order to solve the above technical problem, an embodiment of the present invention provides an apparatus, including:
A memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for:
acquiring user input content and/or received communication content as current content;
if the current local noun is found in the current content, deleting the current local noun from the current content to obtain the content to be matched;
Matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic meaning of a query route;
And if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun to obtain target route information.
In a fourth aspect, to solve the above technical problem, an embodiment of the present invention provides a non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform a method for querying route information, the method including:
acquiring user input content and/or received communication content as current content;
if the current local noun is found in the current content, deleting the current local noun from the current content to obtain the content to be matched;
Matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic meaning of a query route;
And if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun to obtain target route information.
Compared with the prior art, the embodiment of the invention has the following advantages:
In the embodiment of the invention, the content input by a user on the terminal and/or the communication content received by the terminal are used as the current content, whether the current content contains the current local noun is judged, and if so, the current local noun is deleted from the current content to obtain the content to be matched; matching the content to be matched with a pre-recorded sentence pattern template with the semantic of the query route; and if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun, and presenting the inquired route information on the terminal. Therefore, the user can directly obtain the route information which the user wants to inquire under the condition that the user does not need to exit the current application program, switch to the application with the route inquiry function and the like to inquire the route information through a series of operations, so that unnecessary user operations are reduced, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present invention, and other drawings may be obtained according to the drawings without inventive effort to those skilled in the art.
FIG. 1 is a schematic diagram of an exemplary application scenario in an embodiment of the present invention;
FIG. 2 is a flow chart of a method for querying route information according to an embodiment of the invention;
FIG. 3 is a flowchart of a method for querying route information according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a device for inquiring route information according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a communication information prompting device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the present invention better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The inventor finds that in the prior art, when a user needs to query route information when using an intelligent device, the user needs to exit from a currently used application program first, then find an icon of the application program with a route query function, click the icon to enter the application program, input a departure place and a destination at specified positions respectively, and click the query to obtain the route information which the user wants to query.
This series of operation procedures is cumbersome for the user, thereby causing inconvenience for the user to operate.
In order to solve the above-mentioned problem, in the embodiment of the present invention, considering that in practical application, both input content before a user needs to query route information and received communication content may express an intention of route information that the user wants to query, the intention of route information that the user wants to query may be identified by using current user input content and/or current received communication content, so that route information that the user wants to query is automatically queried when the user input content or the received communication content shows the intention of querying a route, and the queried route information is presented on a terminal.
For example, the user inputs "i want to go from five crossing to hope" in the process of chatting with friends in the instant messaging software, and the input content "i want to go from five crossing to hope" can express the intention that the user wants to query the route from "five crossing" to "hope to the opportunity". According to the embodiment of the invention, the intention of the user to inquire the route from five crossing to Beijing can be identified according to the input content from five crossing to Beijing of the user, the route information from five crossing to Beijing can be automatically inquired, and the route information obtained by inquiry is presented on the terminal. Therefore, the user can obtain the route information which the user wants to inquire without exiting the operation interface of the instant messaging software to enter the application program with the route inquiry function for inquiry, so that the user operation is simplified, and the user experience is improved.
For another example, the user receives the communication content "you want to go from five crossing to Beijing" sent by friends in the chat process of the user with friends in the instant messaging software, and inputs the content "you want to go from five crossing to Beijing" to express the intention that the user wants to query the route from "five crossing" to "Beijing". According to the embodiment of the invention, the intention of a user to inquire a route from five road junctions to Beijing can be identified according to the received communication content from five road junctions to Beijing, route information from five road junctions to Beijing can be automatically inquired, and the inquired route information is presented on the terminal. Therefore, the user can obtain the route information which the user wants to inquire without exiting the operation interface of the instant messaging software to enter the application program with the route inquiry function for inquiry, so that the user operation is simplified, and the user experience is improved.
By way of example, the embodiments of the present invention may be applied to a scenario as shown in fig. 1. In this scenario, terminal 101 and server 103 may interact through network 102.
As an example, in the above-described scenario, first, the terminal 101 may acquire, as the current content, the content currently input by the user on the terminal and/or the communication content currently received. Then, the terminal 101 may upload the acquired current content to the server 103 through the network 102. The server 103 may determine whether the current content includes a current local noun, if so, delete the current local noun from the current content to obtain a content to be matched, then match the content to be matched with a pre-recorded sentence pattern template having a semantic meaning of the query route, and if the content to be matched is matched with the sentence pattern template, query route information based on the current local noun. Then, the server 103 transmits the route information obtained by the inquiry to the terminal 101 through the network 102, and instructs the terminal 101 to present the route information.
As another example, in the above-described scenario, first, the terminal 101 may acquire content currently input by the user on the terminal and/or as current content. Then, the terminal 101 first determines whether the current content includes a current noun, and if so, the terminal 101 sends the current content to the server 103 via the network 102. The word stock information of the current noun may be pre-stored on the terminal 101. The server 103 deletes the current noun from the current content to obtain the content to be matched, then matches the content to be matched with a pre-recorded sentence pattern template with the semantic meaning of the query route, and queries route information based on the current place noun if the content to be matched is matched with the sentence pattern template. Then, the server 103 transmits the route information obtained by the inquiry to the terminal 101 through the network 102, and instructs the terminal 101 to present the route information.
As yet another embodiment, in the above-described scenario, first, the terminal 101 may acquire, as the current content, the content currently input by the user on the terminal and/or the communication content currently received. Then, the terminal 101 first determines whether the current content includes a current noun, if so, the terminal 101 deletes the current noun from the current content to obtain a content to be matched, then matches the content to be matched with a pre-recorded sentence pattern template having a query route semantic, and if the content to be matched is matched with the sentence pattern template, the terminal 101 may send a route query request for the current noun to the server 103 through the network 102. The server 103 may query route information based on the current place name according to the route query request, and transmit the queried route information to the terminal 101 through the network 102 so that the terminal 101 presents the route information. Wherein, the word stock information of the current noun can be pre-stored on the terminal 101; the pre-recorded sentence pattern template with the semantic of the query route may be pre-sent by the server 103 to the terminal 101 via the network 102.
It will be appreciated that in the above application scenario, although the actions of the embodiments of the present invention are described as being performed in part by the terminal 101 and in part by the server. These actions may be performed entirely by terminal 101 or entirely by server 103 or in other combinations by each of terminal 101 and server 103. The present invention is not limited to the execution subject, and may be executed by performing the operations disclosed in the embodiments of the present invention.
It should be noted that the above application scenario is only shown for the convenience of understanding the present invention, and embodiments of the present invention are not limited in this respect. Rather, embodiments of the invention may be applied to any scenario where applicable.
Various non-limiting embodiments of the present invention are described in detail below with reference to the attached drawing figures.
Exemplary method
Referring to fig. 2, a flow chart of a method for querying route information in an embodiment of the invention is shown. In this embodiment, the method may include, for example, the following steps:
s201: and acquiring user input content and/or received communication content as current content.
In order to determine the intention of the route information that the user wants to query through the user input content or the received communication content, the terminal may acquire the content currently input by the user in the currently used application and/or the communication content currently received by the currently used application as the current content through the input method system. For example, for a user to input content, when the user triggers an input operation in a currently used application, the terminal may call the input method system so that the user may use the input method system to input content in the currently used application, and thus the input method system may obtain the current content input by the user in the currently used application.
As an example, if the terminal obtains the current content through the input method system, the current content may be a content input by a user or a received communication content sent well during a chat process performed by the user using a chat application program, where the chat application program may be any instant messaging software such as WeChat, trusted, QQ, and the like.
As another example, if the terminal obtains the current content input by the user on the terminal through the input method system, the current content input by the user on the terminal may also be the content input by the user when searching using a certain application program with a search function. For example, the current content input by the user may be content input when the user searches using a browser.
In addition, the current content input by the user on the terminal can be content input in other scenes using the input method.
S202: and if the current local noun is found in the current content, deleting the current local noun from the current content to obtain the content to be matched.
S203: and matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic of the query route.
In particular, the current place name may be found in an existing place name vocabulary, i.e. the current place name belongs to the place name included in the place name vocabulary. It is understood that the place names in the place name vocabulary may include place names and names of buildings. Thus, the current place name may be a specific place name, for example, the current place name may be "five crossing", "Beijing", and so on. Or the current place noun may also be the name of the landmark building, for example, the current place noun may be "the eastern pearl television tower", "the Nanjing Xuanwumen", and so on.
When searching the current local noun in the current content, the current content input by the user can be split first, the complete sentence input by the user is split into a plurality of words, and each split word is compared with the place name words in the place name vocabulary to determine the current local noun in the current input content. For example, when the current content input by the user is "i want to look up" from five crossing to hope, splitting is firstly performed on "i want to look up" from five crossing, the splitting result is "i # want to look up" from # five crossing #, the split words "i", "want", "from", "five crossing", "to" and "hope to" are respectively compared with the place names in the place name list, and if the place names "five crossing" and "hope to" are found in the place name list, the current place names in the current input content are determined to be "five crossing" and "hope to treat".
It is to be understood that in the case where a noun is included in the current content input by the user, the user sometimes has an intention to inquire about the route, but the user sometimes may not have an intention to inquire about the route. For example, the current content input by the user is "five road junction is really fun", and there is a high possibility that the user does not have an intention to inquire the route information when inputting the content. Therefore, in the case where it is determined that the current content input by the user includes the current noun, it is further necessary to determine whether or not the semantic meaning represented by the current content input by the user is a query route. In specific implementation, the current noun can be deleted from the current content, the current content input by the user deleting the current noun is taken as the content to be matched, and the content to be matched is matched with a pre-recorded sentence pattern template so as to judge whether the user has the semantic of inquiring the route information, wherein the pre-recorded sentence pattern template has the semantic of inquiring the route. Specifically, if the sentence pattern template is included in the content to be matched, the content to be matched is considered to be matched with the sentence pattern template, that is, the current content input by the user corresponding to the content to be matched has the semantic meaning of inquiring the route information. For example, the pre-recorded sentence pattern is "from" to "and the current content input by the user is" how from five lanes to the hope "and the current content corresponds to" how from "to" the to-be-matched content includes the sentence pattern "from" to "the to-be-matched content, and then it is considered that" how from "to" the to-be-matched content matches "from" to "the sentence pattern" that is, how "from five lanes to the hope" the current content input by the user has the meaning of inquiring route information.
In this embodiment, the sentence pattern template having the semantic meaning of the query route is recorded before the template is used to determine whether the content to be matched has the semantic meaning of the query route information. The recording mode of the sentence pattern template can be realized in various modes.
As an example, to implement the recording of the sentence pattern template, before S203, it may further include: and responding to the user editing operation aiming at the sentence pattern template, and recording the content input under the user editing operation as the sentence pattern template.
It will be appreciated that the developer may know what some users may enter when they want to query a route, and for this case the developer may enter the sentence pattern template directly by performing the user editing operations. For example, if the developer knows that "from" to "is input when the user wants to query the route, the developer may directly input" from "to" through the user editing operation to trigger the record "from" to "as the sentence pattern template. For another example, if the developer knows that "how to" is input when the user wants to query the route, the developer may directly input "how to" through the user editing operation to trigger the record "how to" as the sentence pattern template.
As another example, to implement the recording of the sentence pattern template, before S203, it may further include: for a historical user behavior of executing route inquiry for an application which jumps to a route inquiry function, acquiring user input content and/or received communication content before the historical user behavior as first historical content; and if the first historical content contains a first historical noun and the position represented by the first historical noun is consistent with the designated position for inquiring the route in the historical user behavior, extracting the sentence pattern template from the part of the first historical content, which is removed from the first historical content, and recording the sentence pattern template.
For convenience of description, the following description will be given with "history user behavior" indicating "behavior in which the user jumps to execute a route query by an application having a route query function".
It will be appreciated that both the user input content prior to the history of user activity and the received communication content may express the intent of the user to query for route information, in other words, either the input content prior to the user jumping to an application with route query functionality to perform a route query or the received communication content may have the semantic meaning of a query route. For example, when the user jumps to the "hundred degree map" to inquire about a certain route information, before the user jumps to the "hundred degree map" to inquire about the route information, the history content input by the user is "i don't know how to go from five channels to Beijing", and the input content input by the user before jumping to the "hundred degree map" to inquire about the route information "i don't know how to go from five channels to Beijing", which may express the intention that the user wants to inquire about the route information. Thus, user input content and/or received communication content preceding the historical user behavior may be obtained as first historical content from which the sentence pattern template is recorded.
It will be appreciated that for the first historical content, the first historical content may or may not have the semantic meaning of the query route. For example, the user jumps to "hundred degree map" to inquire about a certain route information, and before the user jumps to "hundred degree map" to inquire about the route information, the first history content input by the user is "boring, i want to busy", but the first history content is "boring, i want to busy", and i have no meaning of inquiring about the route information. For this case, after the first history content is acquired, it may be determined whether the first history content contains the semantic meaning of the query route, and then the sentence pattern template is recorded using only the first history content containing the semantic meaning of the query route, instead of recording the sentence pattern template using the first history content not containing the semantic meaning of the query route.
In order to determine whether the first history content includes the semantic meaning of the query route, it may be determined whether the first history content includes a first historic noun, and if the first history content includes the first historic noun and the position represented by the first historic noun is consistent with the specified position for the query route in the history user behavior, it is determined that the first history content has the semantic meaning of the query route.
It should be noted that, the first historical noun may include two place names or may include one place name. The following describes that the first history place name word contains two place names and that the first history place name word contains one place name word, respectively.
When the first historical place name word includes two place names, for example, the first historical content input by the user is "I does not know how to go from five places to Beijing", the first historical place name words included in the first historical content are "five places" and "Beijing", the user jumps to the "hundred degree map" after inputting the content to inquire route information from "five places" to "Beijing", that is, the position information represented by the first historical place name word is consistent with the formulated position for inquiring the route, and is "five places" and "Beijing". It may be determined that the first history content "i don't know how to have the semantic meaning of the query route from five ports to wanjing".
After determining that the first history content has the semantic meaning of the query route, a portion of the first history noun that is removed from the first history content may be used as the sentence pattern template and recorded. For example, the first history content is "i don't know how to get from five to hope", and the portions of the first history names "five crossing" and "hope" where i don't know how to get from five to hope "are" i don't know how to get from x to x ", where" i don't know how to get from x to x "may be used as a sentence pattern and recorded.
Furthermore, in order to make the recorded sentence pattern template more widely applicable to the input content varied by the user, the embodiment may also remove the part that does not affect the semantic meaning of the query route from the first history content based on removing the first history noun, so as to obtain the sentence pattern template and record. For example, the first history content is "i don't know how to get from five to hope", the parts of the first history words "five crossing" and "hope" from "i don't know how to get from five to hope" are "i don't know how to get from x to x", and "i don't know how to get from x to x" with the semantic meaning of the query route as the sentence pattern and record.
When the first historical place name word includes a place name, for example, the first historical content input by the user is "i does not know how to look up", the first historical place name included in the first historical content is "look up", the user jumps to the "hundred degree map" after inputting the content to inquire the route information from the current positioning position to the "look up", that is, the position information represented by the first historical place name is consistent with the formulated position for inquiring the route, and the first historical place name is the "front positioning position" when looking up and the "look up". It may be determined that the first history content "i do not know how to look to" has the semantic meaning of the query route.
After determining that the first history content has the semantic meaning of the query route, a portion of the first history noun that is removed from the first history content may be used as the sentence pattern template and recorded. For example, the first history content is "i does not know how to look at" and the part of the first history noun "look at" is "i does not know how to look at" is removed from "i does not know how to look at" and "i does not know how to look at" may be used as the sentence pattern template and recorded.
Furthermore, in order to make the recorded sentence pattern template more widely applicable to the input content varied by the user, the embodiment may also remove the part that does not affect the semantic meaning of the query route from the first history content based on removing the first history noun, so as to obtain the sentence pattern template and record. For example, the first history content is "i does not know how to look at" and the part of the first history noun "look at" is "i does not know how to look at" from "i does not know how to look at" may be removed therefrom "i does not know" so that "how to look at" with the semantic meaning of the query route is extracted as the sentence pattern template and recorded.
As yet another example, to implement the recording of the sentence pattern template, before S203, it may further include: acquiring second historical content input by a user; extracting an initial template from a part of the second historical noun removed from the second historical content if the second historical content contains the second historical noun; and responding to the confirmation operation for the initial template, and recording the initial template as the sentence pattern template.
It should be noted that, in order to implement the record of the sentence pattern template, the second history content input by the user may also be directly obtained, when the second history content includes a second history noun, a part of the second history noun is removed from the second history content as an initial template, and a developer determines whether the initial template has a semantic meaning of the query route. And if the initial template has the meaning of the route query, recording the initial template as the sentence pattern template, and if the initial template has no meaning of the route query, discarding the initial template. For example, regarding "how" and "how" are actually fun "for the initial template, when the developer confirms the initial template," how "is considered to have the meaning of the query route, and" how "is recorded as the sentence pattern template; when the developer confirms the initial template, consider "× true fun" without the semantic meaning of the query route, discard the initial template.
S204: and if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun to obtain target route information.
It will be appreciated that there may be a number of situations in which the number of place nouns contained in the current content entered by the user.
As one example, the current place noun includes a first place noun and a second place noun. For example, the current content input by the user is "i want to go from five crossing to Beijing", and the current content includes a first place noun "five crossing" and a second place noun "Beijing". When the current content input by the user contains a first place noun and a second place noun, the target route information is used for indicating a route between a position represented by the first place noun and a position represented by the second place noun. For example, the current content input by the user is "i want to go from five crossing to Beijing", and the target route information may be used to indicate route information between the position indicated by "five crossing" and the position indicated by "Beijing".
As another example, the current place noun contains only third place nouns. For example, the current content input by the user is "how to watch Beijing? The present content includes only the third noun "Beijing". When the current content input by the user only comprises a third place noun, the target route information is used for indicating a route between the position represented by the third place noun and the current positioning position of the terminal. For example, the current content input by the user is "how to watch Beijing? The target route information may be used to indicate route information between a location indicated by "Beijing" and a current location of the user.
It should be noted that, the query manner of the target route information may specifically be: determining a place of origin and a destination location based on the sentence pattern template and the current place noun; calculating a route from the origin location to the destination location; target route information indicating the route is generated.
It should be noted that, the number of the current nouns is different, and the corresponding sentence templates may also be different. Accordingly, the specific methods of determining the origin and destination locations are also different. The following describes a specific method of determining a departure location and a destination location for one current noun and two current nouns, respectively.
When the number of the current place nouns is one, the sentence pattern template is "how to get" and the departure position and the destination position are corresponding to the current positioning position and the current place nouns. For example, the current content input by the user is "how to go to five-way opening", the current local noun is "five-way opening", the departure position is the current positioning position, and the destination position is the position represented by "five-way opening".
When the number of the current place nouns is two, the current place nouns are a first place noun and a second place noun respectively, the sentence pattern template is from the first place noun to the second place noun, the departure position is the position indicated by the first place noun, and the destination position is the position indicated by the second place noun. For example, the current content input by the user is "how to go from the hope to the five-way opening", the first place noun is "hope" and the second place noun is "five-way opening", the departure position is the position indicated by "hope" and the destination position is the position indicated by "five-way opening".
It will be appreciated that after the target route information indicating the route is generated, the target route information may also be presented on the terminal so that the user can view the target route information conforming to the query intention thereof.
In this embodiment, according to the content input by the user on the terminal, whether the current content input by the user contains a current local noun is determined, if so, the current local noun is deleted from the current content to obtain the content to be matched; matching the content to be matched with a pre-recorded sentence pattern template with the semantic of the query route; and if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun, and presenting the inquired route information on the terminal. Therefore, the user can directly obtain the route information which the user wants to inquire without exiting the current application program and switching to the application with the route inquiry function to inquire the route information through a series of operations, so that unnecessary user operations are reduced, and the user experience is improved.
In the following, a specific scenario is taken as an example, and a method for querying route information is described. In this particular scenario, the user is chatting with friends using WeChat, and during the chat process the user has entered the content "how from five to Beijing? ". Wherein, five crossing and Beijing are place names contained in the existing place name vocabulary; the pre-recorded sentence pattern is "from x to x".
Referring to fig. 3, a flowchart of a method for querying route information in an embodiment of the present invention is shown. The method may comprise the steps of:
s301: the user inputs what the content is from five mouths to Beijing.
S302: the terminal obtains the current content 'how from five channels to Beijing' input by the user.
S303: and the terminal sends the current content 'how from five channels to Beijing looking' to the server.
S304: the server searches the current local nouns five-road junction and Beijing from the current content.
S305: the server deletes the five-way mouth and the Beijing looking from the five-way mouth to the Beijing looking to obtain the content to be matched from the moment to the moment.
S306: the server matches the content to be matched with the sentence pattern template from the first place to the second place, and confirms the matching of the content to be matched with the sentence pattern template from the first place to the second place.
S307: the server searches and obtains route information from the position indicated by the five-way port to the position indicated by the Beijing.
S308: and the server sends the route information to the terminal.
S309: and the terminal presents the route information.
In this embodiment, according to the content input by the user on the terminal, whether the current content input by the user contains a current local noun is determined, if so, the current local noun is deleted from the current content to obtain the content to be matched; matching the content to be matched with a pre-recorded sentence pattern template with the semantic of the query route; and if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun, and presenting the inquired route information on the terminal. Therefore, the user can directly obtain the route information which the user wants to inquire under the condition that the user does not need to exit the current application program and switch to the application with the route inquiry function to inquire the route information through a series of operations, so that unnecessary user operations are reduced, and the user experience is improved.
Exemplary apparatus
Referring to fig. 4, a schematic structural diagram of an apparatus for querying route information according to an embodiment of the present invention is shown. The device may, for example, specifically comprise: a first acquisition unit 401, a deletion unit 402, a matching unit 403, a query unit 404, and a presentation unit 405.
The first obtaining unit 401 is configured to obtain, as current content, user input content and/or received communication content.
The deleting unit 402 is configured to delete the current local noun from the current content if the current local noun is found in the current content, so as to obtain the content to be matched.
The matching unit 403 is configured to match the content to be matched with a pre-recorded sentence pattern template, where the sentence pattern template has a semantic meaning of a query route.
The query unit 404 is configured to query route information based on the current noun to obtain target route information if the content to be matched is matched with the sentence pattern template.
Optionally, the current place name word includes a first place name and a second place name, and the target route information is used for indicating a route between a position represented by the first place name and a position represented by the second place name.
Optionally, the current place noun includes only a third place noun, and the target route information is used for indicating a route between the position represented by the third place noun and the current positioning position of the terminal.
Optionally, the matching unit 403 includes: a judging subunit and a matching subunit.
The judging subunit: and the sentence pattern template is used for judging whether the content to be matched contains the sentence pattern template or not.
The matching subunit: and determining that the content to be matched is matched with the sentence pattern template if the content to be matched contains the sentence pattern template.
Optionally, the querying unit 404 includes: a determination subunit, a calculation subunit, and a generation subunit.
The determination subunit: and determining a place of origin and a destination position based on the sentence pattern template and the current noun if the content to be matched is matched with the sentence pattern template.
The computing subunit: for calculating a route from the origin location to the destination location.
The generation subunit: for generating target route information for indicating the route.
Optionally, the apparatus further comprises a first recording unit.
The first recording unit: and the sentence pattern template processing module is used for responding to the user editing operation aiming at the sentence pattern template and recording the content input under the user editing operation as the sentence pattern template.
Optionally, the apparatus further includes: and a second recording unit.
The second recording unit: a historical user behavior for executing route inquiry for an application which jumps to a function with route inquiry, acquiring user input content and/or received communication content before the historical user behavior as first historical content;
and if the first historical content contains a first historical noun and the position represented by the first historical noun is consistent with the designated position for inquiring the route in the historical user behavior, extracting the sentence pattern template from the part of the first historical content, which is removed from the first historical content, and recording the sentence pattern template.
Optionally, the apparatus further includes: and a third recording unit.
The third recording unit: the method comprises the steps of obtaining second historical content input by a user;
extracting an initial template from a part of the second historical noun removed from the second historical content if the second historical content contains the second historical noun;
And responding to the confirmation operation for the initial template, and recording the initial template as the sentence pattern template.
Optionally, the second recording unit includes: a first acquisition subunit and a first recording subunit.
The first acquisition subunit: a historical user behavior for performing route query for an application that jumps to have route query functionality, a first historical content entered by a user prior to the historical user behavior is obtained.
The first recording subunit: and if the first historical content contains a first historical noun and the position represented by the first historical noun is consistent with the designated position for inquiring the route in the historical user behavior, extracting the sentence pattern template from the part of the first historical content, in which the first historical noun is removed, and recording the sentence pattern template.
Optionally, the third recording unit includes: the second acquisition subunit, the extraction subunit and the second recording subunit.
The second acquisition subunit: for obtaining second history content entered by the user.
The extraction subunit: and extracting an initial template from the second historical content by eliminating the part of the second historical noun if the second historical content contains the second historical noun.
The second recording subunit: and the sentence pattern template is used for responding to the confirmation operation of the initial template, and the initial template is recorded as the sentence pattern template.
Optionally, the current place name word includes a first place name and a second place name, and the target route information is used for indicating a route between a position represented by the first place name and a position represented by the second place name.
Optionally, the current place noun includes only a third place noun, and the target route information is used for indicating a route between the position represented by the third place noun and the current positioning position of the terminal.
In this embodiment, according to the content input by the user on the terminal, whether the current content input by the user contains a current local noun is determined, if so, the current local noun is deleted from the current content to obtain the content to be matched; matching the content to be matched with a pre-recorded sentence pattern template with the semantic of the query route; and if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun, and presenting the inquired route information on the terminal. Therefore, the user can directly obtain the route information which the user wants to inquire without exiting the current application program and switching to the application with the route inquiry function to inquire the route information through a series of operations, so that unnecessary user operations are reduced, and user experience is improved.
Referring to fig. 5, apparatus 1800 may include one or more of the following components: a processing component 1802, a memory 1804, a power component 1806, a multimedia component 1806, an audio component 1810, an input/output (I/O) interface 1812, a sensor component 1814, and a communication component 1816.
The processing component 1802 generally controls overall operation of the device 1800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1802 may include one or more processors 1820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 1802 may include one or more modules that facilitate interactions between the processing component 1802 and other components. For example, the processing component 1802 may include a multimedia module to facilitate interaction between the multimedia component 1806 and the processing component 1802.
The memory 1804 is configured to store various types of data to support operations at the device 1800. Examples of such data include instructions for any application or method operating on the device 1800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 1804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
A power supply assembly 1806 provides power to the various components of the device 1800. The power components 1806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 1800.
The multimedia component 1806 includes a screen between the device 1800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1806 includes a front-facing camera and/or a rear-facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 1800 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 1810 is configured to output and/or input audio signals. For example, the audio component 1810 includes a Microphone (MIC) configured to receive external audio signals when the device 1800 is in an operational mode, such as a call mode, a recording mode, and a speech recognition mode. The received audio signals may be further stored in the memory 1804 or transmitted via the communication component 1816. In some embodiments, audio component 1810 also includes a speaker for outputting audio signals.
The I/O interface 1812 provides an interface between the processing component 1802 and a peripheral interface module, which may be a keyboard, click wheel, button, or the like. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 1814 includes one or more sensors for providing status assessment of various aspects of the apparatus 1800. For example, the sensor assembly 1814 may detect the on/off state of the device 1800, the relative positioning of the assemblies, such as the display and keypad of the device 1800, the sensor assembly 1814 may also detect the change in position of the device 1800 or a component of the device 1800, the presence or absence of user contact with the device 1800, the orientation or acceleration/deceleration of the device 1800, and the change in temperature of the device 1800. The sensor assembly 1814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1816 is configured to facilitate communication between the apparatus 1800 and other devices, either wired or wireless. The device 1800 may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication part 1816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 1816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
Specifically, an embodiment of the present invention provides an apparatus for querying route information, the apparatus including a memory, and one or more programs, wherein the one or more programs are stored in the memory, and configured to be executed by one or more processors, the one or more programs include instructions for:
acquiring user input content and/or received communication content as current content;
if the current local noun is found in the current content, deleting the current local noun from the current content to obtain the content to be matched;
Matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic meaning of a query route;
And if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun to obtain target route information.
Optionally, the current place name word includes a first place name and a second place name, and the target route information is used for indicating a route between a position represented by the first place name and a position represented by the second place name.
Optionally, the current place noun includes only a third place noun, and the target route information is used for indicating a route between the position represented by the third place noun and the current positioning position of the terminal.
Optionally, the processor is further configured to execute the one or more programs to include instructions for:
Judging whether the sentence pattern template is contained in the content to be matched;
And if the sentence pattern template is contained in the content to be matched, determining that the content to be matched is matched with the sentence pattern template.
Optionally, the processor is further configured to execute the one or more programs to include instructions for:
If the content to be matched is matched with the sentence pattern template, determining a place of origin and a destination position based on the sentence pattern template and the current place noun;
calculating a route from the origin location to the destination location;
Target route information indicating the route is generated.
Optionally, the processor is further configured to execute the one or more programs to include instructions for:
And responding to the user editing operation aiming at the sentence pattern template, and recording the content input under the user editing operation as the sentence pattern template.
Optionally, the processor is further configured to execute the one or more programs to include instructions for:
For a historical user behavior of executing route inquiry for an application which jumps to a route inquiry function, acquiring user input content and/or received communication content before the historical user behavior as first historical content;
and if the first historical content contains a first historical noun and the position represented by the first historical noun is consistent with the designated position for inquiring the route in the historical user behavior, extracting the sentence pattern template from the part of the first historical content, which is removed from the first historical content, and recording the sentence pattern template.
Optionally, the processor is further configured to execute the one or more programs to include instructions for:
Acquiring second historical content input by a user;
extracting an initial template from a part of the second historical noun removed from the second historical content if the second historical content contains the second historical noun;
And responding to the confirmation operation for the initial template, and recording the initial template as the sentence pattern template.
Optionally, the current place name word includes a first place name and a second place name, and the target route information is used for indicating a route between a position represented by the first place name and a position represented by the second place name.
Optionally, the current place noun includes only a third place noun, and the target route information is used for indicating a route between the position represented by the third place noun and the current positioning position of the terminal.
Embodiments of the present invention also provide a non-transitory computer-readable storage medium, such as memory 1804, comprising instructions executable by processor 1820 of apparatus 1800 to perform the method, and such as storage medium 1930 comprising instructions executable by central processor 1922 of server 1900 to perform the method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform a method of querying route information, the method comprising:
acquiring user input content and/or received communication content as current content;
if the current local noun is found in the current content, deleting the current local noun from the current content to obtain the content to be matched;
Matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic meaning of a query route;
And if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun to obtain target route information.
Fig. 6 is a schematic structural diagram of a server according to an embodiment of the present invention. The server 1900 may vary considerably in configuration or performance and may include one or more central processing units (central processing units, CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage mediums 1930 (e.g., one or more mass storage devices) that store applications 1942 or data 1944. Wherein the memory 1932 and storage medium 1930 may be transitory or persistent. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Still further, a central processor 1922 may be provided in communication with a storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input/output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, and the like.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (16)

1. A method of querying route information, comprising:
Acquiring user input content and/or received communication content through an input method system as current content, wherein the current content is content input by a user and/or received communication content which is sent well in the chat process of the user by using a chat application program;
if the current local noun is found in the current content, deleting the current local noun from the current content to obtain the content to be matched;
Matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic meaning of a query route;
And if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun to obtain target route information.
2. The method of claim 1, wherein if the content to be matched is matched with the sentence pattern template, performing route information query based on the current local noun to obtain target route information, including:
If the content to be matched is matched with the sentence pattern template, determining a place of origin and a destination position based on the sentence pattern template and the current place noun;
calculating a route from the origin location to the destination location;
Target route information indicating the route is generated.
3. The method as recited in claim 1, further comprising:
And responding to the user editing operation aiming at the sentence pattern template, and recording the content input under the user editing operation as the sentence pattern template.
4. The method as recited in claim 1, further comprising:
For a historical user behavior of executing route inquiry for an application which jumps to a route inquiry function, acquiring user input content and/or received communication content before the historical user behavior as first historical content;
and if the first historical content contains a first historical noun and the position represented by the first historical noun is consistent with the designated position for inquiring the route in the historical user behavior, extracting the sentence pattern template from the part of the first historical content, which is removed from the first historical content, and recording the sentence pattern template.
5. The method as recited in claim 1, further comprising:
Acquiring second historical content input by a user;
extracting an initial template from a part of the second historical noun removed from the second historical content if the second historical content contains the second historical noun;
And responding to the confirmation operation for the initial template, and recording the initial template as the sentence pattern template.
6. The method of claim 1, wherein the current place name includes a first place name and a second place name, and the target route information is used to indicate a route between a location represented by the first place name and a location represented by the second place name.
7. The method of claim 1, wherein the current place noun includes only a third place noun, and the target route information is used to indicate a route between a location represented by the third place noun and a current location of the terminal.
8. An apparatus for querying route information, comprising:
The first acquisition unit is used for acquiring user input content and/or received communication content through the input method system as current content, wherein the current content is content input by a user and/or received communication content which is sent well in the process of chatting by the user through the chatting application program;
A deleting unit, configured to delete a current local noun from the current content if the current local noun is found in the current content, so as to obtain a content to be matched;
The matching unit is used for matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic meaning of an inquiry route;
and the query unit is used for querying route information based on the current noun to obtain target route information if the content to be matched is matched with the sentence pattern template.
9. The apparatus of claim 8, wherein the querying element comprises: a determining subunit, a calculating subunit and a generating subunit;
The determining subunit is configured to determine, if the content to be matched matches the sentence pattern template, a place location and a destination location based on the sentence pattern template and the current noun;
the calculating subunit is used for calculating a route from the departure place position to the destination position;
The generation subunit is configured to generate target route information indicating the route.
10. The apparatus of claim 8, further comprising a first recording unit;
The first recording unit: and the sentence pattern template processing module is used for responding to the user editing operation aiming at the sentence pattern template and recording the content input under the user editing operation as the sentence pattern template.
11. The apparatus of claim 8, the apparatus further comprising: a second recording unit;
the second recording unit is used for:
For a historical user behavior of executing route inquiry for an application which jumps to a function with route inquiry, acquiring first historical content input by a user before the historical user behavior;
and if the first historical content contains a first historical noun and the position represented by the first historical noun is consistent with the designated position for inquiring the route in the historical user behavior, extracting the sentence pattern template from the part of the first historical content, which is removed from the first historical content, and recording the sentence pattern template.
12. The apparatus of claim 8, wherein the apparatus further comprises: a third recording unit;
The third recording unit is used for:
Acquiring second historical content input by a user;
extracting an initial template from a part of the second historical noun removed from the second historical content if the second historical content contains the second historical noun;
And responding to the confirmation operation for the initial template, and recording the initial template as the sentence pattern template.
13. The apparatus of claim 8, wherein the current place name includes a first place name and a second place name, and the target route information is used to indicate a route between a location represented by the first place name and a location represented by the second place name.
14. The apparatus of claim 8, wherein the current location noun includes only a third location noun, and wherein the target route information is used to indicate a route between a location represented by the third location noun and a current location of the terminal.
15. An apparatus for querying route information, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for:
Acquiring user input content and/or received communication content through an input method system as current content, wherein the current content is content input by a user and/or received communication content which is sent well in the chat process of the user by using a chat application program;
if the current local noun is found in the current content, deleting the current local noun from the current content to obtain the content to be matched;
Matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic meaning of a query route;
And if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun to obtain target route information.
16. A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform a method of querying route information, the method comprising:
Acquiring user input content and/or received communication content through an input method system as current content, wherein the current content is content input by a user and/or received communication content which is sent well in the chat process of the user by using a chat application program;
if the current local noun is found in the current content, deleting the current local noun from the current content to obtain the content to be matched;
Matching the content to be matched with a pre-recorded sentence pattern template, wherein the sentence pattern template has the semantic meaning of a query route;
And if the content to be matched is matched with the sentence pattern template, inquiring route information based on the current noun to obtain target route information.
CN201810134648.6A 2018-02-09 2018-02-09 Method, device and equipment for inquiring route information Active CN110134745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810134648.6A CN110134745B (en) 2018-02-09 2018-02-09 Method, device and equipment for inquiring route information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810134648.6A CN110134745B (en) 2018-02-09 2018-02-09 Method, device and equipment for inquiring route information

Publications (2)

Publication Number Publication Date
CN110134745A CN110134745A (en) 2019-08-16
CN110134745B true CN110134745B (en) 2024-05-07

Family

ID=67568025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810134648.6A Active CN110134745B (en) 2018-02-09 2018-02-09 Method, device and equipment for inquiring route information

Country Status (1)

Country Link
CN (1) CN110134745B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011003024A (en) * 2009-06-18 2011-01-06 Denso Corp Facility retrieval display device
CN102939515A (en) * 2010-01-06 2013-02-20 苹果公司 Device, method, and graphical user interface for mapping directions between search results
US8527488B1 (en) * 2010-07-08 2013-09-03 Netlogic Microsystems, Inc. Negative regular expression search operations
CN103955534A (en) * 2014-05-13 2014-07-30 百度在线网络技术(北京)有限公司 Map query method and device thereof
CN104504078A (en) * 2014-12-23 2015-04-08 北京奇虎科技有限公司 Method and system for determining invoking or not of map interface for inquiry key words
CN104794181A (en) * 2015-04-09 2015-07-22 北京搜狗科技发展有限公司 Method and device for processing services based on electronic map
CN105872213A (en) * 2016-03-28 2016-08-17 维沃移动通信有限公司 Information displaying method and electronic device
CN106254557A (en) * 2016-10-09 2016-12-21 努比亚技术有限公司 Individual's stroke intelligently pushing method and device
CN106289291A (en) * 2016-07-26 2017-01-04 北京奇虎科技有限公司 The recommendation method and apparatus of navigation way
CN106406806A (en) * 2016-09-19 2017-02-15 北京智能管家科技有限公司 A control method and device for intelligent apparatuses
CN106774969A (en) * 2015-11-20 2017-05-31 北京搜狗科技发展有限公司 A kind of input method and device
CN107084736A (en) * 2017-04-27 2017-08-22 维沃移动通信有限公司 A kind of air navigation aid and mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101997446B1 (en) * 2012-11-19 2019-07-09 엘지전자 주식회사 Mobile terminal and method for controlling thereof

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011003024A (en) * 2009-06-18 2011-01-06 Denso Corp Facility retrieval display device
CN102939515A (en) * 2010-01-06 2013-02-20 苹果公司 Device, method, and graphical user interface for mapping directions between search results
US8527488B1 (en) * 2010-07-08 2013-09-03 Netlogic Microsystems, Inc. Negative regular expression search operations
CN103955534A (en) * 2014-05-13 2014-07-30 百度在线网络技术(北京)有限公司 Map query method and device thereof
CN104504078A (en) * 2014-12-23 2015-04-08 北京奇虎科技有限公司 Method and system for determining invoking or not of map interface for inquiry key words
CN104794181A (en) * 2015-04-09 2015-07-22 北京搜狗科技发展有限公司 Method and device for processing services based on electronic map
CN106774969A (en) * 2015-11-20 2017-05-31 北京搜狗科技发展有限公司 A kind of input method and device
CN105872213A (en) * 2016-03-28 2016-08-17 维沃移动通信有限公司 Information displaying method and electronic device
CN106289291A (en) * 2016-07-26 2017-01-04 北京奇虎科技有限公司 The recommendation method and apparatus of navigation way
CN106406806A (en) * 2016-09-19 2017-02-15 北京智能管家科技有限公司 A control method and device for intelligent apparatuses
CN106254557A (en) * 2016-10-09 2016-12-21 努比亚技术有限公司 Individual's stroke intelligently pushing method and device
CN107084736A (en) * 2017-04-27 2017-08-22 维沃移动通信有限公司 A kind of air navigation aid and mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王娜 ; 施瑞娜 ; 周策 ; .基于Android的路线查询规划系统分析.无线互联科技.2016,(05),全文. *
袁红 ; 陆成成 ; .网络用户导航类查询意图识别研究.情报资料工作.2017,(03),全文. *

Also Published As

Publication number Publication date
CN110134745A (en) 2019-08-16

Similar Documents

Publication Publication Date Title
EP3171270A1 (en) Method and device for information push
CN108073606B (en) News recommendation method and device for news recommendation
US10242678B2 (en) Friend addition using voiceprint analysis method, device and medium
CN107562349B (en) Method and device for executing processing
CN107193393B (en) Input method switching method and device
CN111696553B (en) Voice processing method, device and readable medium
CN108495168B (en) Bullet screen information display method and device
EP3051772A1 (en) Method and apparatus for accessing network
US20220391446A1 (en) Method and device for data sharing
WO2023040202A1 (en) Face recognition method and apparatus, electronic device, and storage medium
CN108270661B (en) Information reply method, device and equipment
US10079787B2 (en) Method and apparatus for creating group and exiting group
CN111061452A (en) Voice control method and device of user interface
CN113936697B (en) Voice processing method and device for voice processing
CN110928425A (en) Information monitoring method and device
CN110213062B (en) Method and device for processing message
CN111552688A (en) Data export method and device and electronic equipment
CN109960444B (en) Method, device and equipment for presenting shortcut of application program
CN110134745B (en) Method, device and equipment for inquiring route information
CN108108356B (en) Character translation method, device and equipment
CN106155696B (en) Method and device for deleting information
CN111522448B (en) Method, device and equipment for providing input candidate items
CN110019706B (en) Question generation method and device
CN109120499B (en) Information processing method and device
CN111913590A (en) Input method, device and equipment

Legal Events

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