Patent Description:
Conventionally, a digital assistant which behaves in response to a query input by a user has been used. When a user uses a digital assistant, the user inputs a query to a client terminal such as a smart phone. When a user uses the digital assistant in a general manner, the client terminal sends a query to a server apparatus. The server apparatus performs speech recognition and natural language interpretation for the query to determine the meaning of the query. Then, the server apparatus searches a database corresponding to the determined meaning for a response to the query or generates the response, and/or obtains a response to the query by transmitting the query to an Application Programming Interface (API) corresponding to the determined meaning. The server apparatus sends the obtained response to the client terminal. The client terminal outputs the response. In other words, the client terminal behaves as part of the digital assistant by communicating with the server apparatus.

<CIT> (Patent Literature <NUM>), paragraph [<NUM>] discloses a system in which a mobile terminal performs natural language interpretation. In this system, when the mobile terminal receives a speech from a user, the mobile terminal attempts natural language interpretation for that speech. If the mobile terminal fails natural language interpretation, the mobile terminal requests the server apparatus to perform natural language interpretation for the speech.

It may happen that the user desires to use the digital assistant at a location where the mobile terminal cannot communicate with the server apparatus (for example in a tunnel). There is a necessity to enable a mobile terminal to function as a digital assistant even when the mobile terminal is in a state where it cannot communicate with the server apparatus.

<CIT> discloses methods, systems, apparatus, including computer programs encoded on a computer storage medium, for a user device to learn offline voice actions. In one aspect, the method includes actions of detecting, by the user device, an utterance at a first time when the user device is connected to a server by a network, providing, by the user device, the utterance to the server using the network, receiving, by the user device and from the server, an update to the grammar of the user device, detecting, by the user device, a subsequent utterance of the utterance at a second time when the user device is not connected to the server by a network, and in response to detecting, by the user device, the subsequent utterance of the utterance at the second time. identifying, by the user device, an operation to perform based on (i) the subsequent utterance, and (ii) the updated grammar.

An invention is defined in the appended independent claims. The present disclosure provides a technical solution to the above-described problems of conventional systems by enabling a mobile device to function as a digital assistant at times where a server apparatus is inaccessible. According to one aspect of the present disclosure, a computer-implemented method includes: receiving input of a query from a client terminal; performing natural language interpretation of the query using a grammar; outputting a response to the query after performing the natural language interpretation; and sending the grammar to the client terminal.

The method may further comprise determining, before sending a grammar to a client terminal, that a client does not store the grammar. Sending the grammar to the client terminal may be conditioned upon the client terminal not storing the grammar.

The method may further comprise determining, before sending a grammar to a client terminal, that the client terminal is configured to perform a function using the grammar in an offline state in which the client terminal is not connected to the computer. Sending the grammar to the client terminal is conditioned upon the client terminal being configured to perform the function using the grammar in the offline state.

In the method, sending a grammar to a client terminal may include sending other grammars belonging to a domain to which the grammar belongs.

The method may further comprise counting a number of times that a grammar is used in natural language interpretation of queries from a client terminal. Sending the grammar to the client terminal may be conditioned upon the counted number exceeding a threshold.

In the method, counting may include all times that grammars belonging to a domain to which the grammar belongs are used in natural language interpretation of the query.

The method may further comprise: predicting, based on the input query, a type of data needed to respond to a future query; and sending data of that type to the client terminal.

In the method, sending the data of that type may include sending a time-to-live of the data of that type.

In the method, a query input from a client terminal may include speech audio. The method may further comprise: training a speech recognition model personalized to a user of the client terminal by using utterances of the user; and sending the trained speech recognition model to the client terminal.

According to another aspect of the present disclosure, a server apparatus includes: one or more processors; and a storage device storing a program that, when executed by the one or more processors, causes the server apparatus to perform the method described above.

According to still another aspect of the present disclosure, an information system includes: a client terminal; and a server apparatus sending to the client terminal a response to a query input from the client terminal, wherein the server apparatus includes one or more processors to perform natural language interpretation of the input query using a grammar, and wherein the one or more processors send the grammar to the client terminal.

According to still another aspect of the present disclosure, a computer-implemented method includes: sending a first query to a server apparatus; receiving a grammar, from the server apparatus, used for natural language interpretation of the first query; storing the received grammar in a memory; receiving input of a second query; and performing, when the computer is not connected to the server apparatus, natural language interpretation of the second query using the grammar.

The method may further comprise: receiving input of a third query; performing, when a computer is not connected to a server apparatus, natural language interpretation of the third query; determining that natural language interpretation of the third query fails; storing the third query in the memory; and sending, in response to the failure, when the computer is connected to the server apparatus, the third query to the server apparatus.

The method may further comprise: receiving data related to a first query; storing data related to the first query in the memory; and acquiring a response to a second query using the data related to the first query.

In the method, wherein data related to the first query may include metadata indicating a time-to-live. The method may further comprise deleting the data related to a first query from a memory after time-to-live is expired.

The method may further comprise acquiring positional information of a computer. Performing natural language interpretation of a second query may include selecting a grammar to be used from one or more grammars in a memory based on the positional information.

The method may further comprise acquiring time information indicating a time when a second query is input. Performing natural language interpretation of the second query may include selecting a grammar from one or more grammars in a memory based on the time information.

In the method, receiving a second query may include receiving input of speech. The method may further comprise: receiving, from a server apparatus, a speech recognition model trained to be personalized to a user of a computer; and performing, when the computer is not connected to the server apparatus, speech recognition of the input speech using the speech recognition model.

According to still another aspect of the present disclosure, a computer-implemented method includes: receiving, when the computer is connected to a server apparatus, input of a first query; sending the first query to the server apparatus; receiving, from the server apparatus, a response to the first query; receiving, when the computer is not connected to the server apparatus, input of a second query; storing the second query in a memory together with time information indicating a time when the second query is input; sending, when the computer is connected to the server apparatus, the second query to the server apparatus together with the time information.

In the method, storing a second query in a memory may include storing the second query in a memory together with positional information of a computer at the time when the computer receives an input of the second query. Sending the second query to the server apparatus may include sending the second query to the server apparatus together with the positional information.

According to still another aspect of the present disclosure, a computer program, when executed by one or more processors of a client terminal, causes the client terminal to perform the method described above.

According to still another aspect of the present disclosure, a client terminal includes: one or more processors; and a memory storing a program that, when executed by the one or more processors, causes the client terminal to perform the method described above.

Hereafter, a reference will be made to the drawings to describe one embodiment of an information processing system. In the following description, identical parts and components are identically denoted. Their names and functions are also identical. Accordingly, they will not be described redundantly.

<FIG> generally illustrates a configuration of a query processing system. The query processing system includes a server and a user terminal. In <FIG>, the server is indicated as "server <NUM>," and the user terminal is indicated as "user terminals 200A-<NUM>" depending on the situation where the user terminal is used.

<FIG> illustrates one implementation of processing of a query in the query processing system. In <FIG>, a user terminal of any type is referred to as a "user terminal <NUM>. " The user terminal is an example of a client terminal.

As indicated as step (<NUM>), in response to input of query A, user terminal <NUM> sends query A to server <NUM>. User terminal <NUM> may receive input of query A as voice through a microphone or as text data through a keyboard or a touch panel.

As indicated as step (<NUM>), server <NUM> interprets a meaning of query A using grammar A.

As indicated as step (<NUM>), server <NUM> formulates a response to query A based on the meaning of query A and sends the response to user terminal <NUM>.

In the query processing system of <FIG>, as indicated as step (<NUM>), server <NUM> further sends grammar A to user terminal <NUM>. Namely, server <NUM> sends to user terminal <NUM> a grammar used in interpretation of a query that is received from user terminal <NUM>.

User terminal <NUM> stores grammar A sent from server <NUM> in a memory of user terminal <NUM>. While offline, in response to input of a query, user terminal <NUM> interprets the meaning of the query using grammar A (step (1X)), formulates a response to the query based on the meaning (step (2X)), and displays (and/or audibly outputs) the response (step (3X)).

<FIG> each show a specific example of an aspect for processing a query by using user terminal <NUM>.

In <FIG>, as one example of user terminal <NUM>, a user terminal 200A used in a vehicle is shown. User terminal 200A is an information processing terminal attached to a vehicle, for example.

A user utters "Turn on the radio!" to user terminal 200A as a query. User terminal 200A sends as a query, a signal corresponding to the utterance "Turn on the radio!" to server <NUM>. In one implementation, the user may input the query after pushing a given button of user terminal 200A. User terminal 200A may receive the query as the button is operated, and user terminal 200A may send the received query to server <NUM>.

Server <NUM> uses a grammar, which is for a function to operate an element of the vehicle, to interpret the meaning of the query received from user terminal 200A, and obtains a response to the query based on the meaning. As a response to the query received from user terminal 200A, server <NUM> sends a control signal for turning on the radio to user terminal 200A. In response, user terminal 200A turns on the radio of the vehicle that has user terminal 200A mounted therein.

Furthermore, as a response to the query received from user terminal 200A, server <NUM> may send an instruction to user terminal 200A to audibly output "The radio is turned on. " User terminal 200A may audibly output "The radio is turned on. " in response to the instruction being received.

In <FIG>, as one example of user terminal <NUM>, a user terminal 200B used in an operating room is shown. User terminal 200B is an information processing terminal attachable to the head of a doctor who is a user, for example.

The user utters "Show me the medical record!" as a query, to user terminal 200B. User terminal 200B sends as the query, a signal corresponding to the utterance "Show me the medical record!" to server <NUM>. In one implementation, the user may input the query after saying a predetermined message (e.g., "<NUM>!") for inputting the query. User terminal 200B may receive the query as the message is input, and user terminal 200B may send the received query to server <NUM>.

Server <NUM> uses a grammar, which is for a function to provide information to the user in the operating room, to interpret the meaning of the query received from user terminal 200B, and forms a response to the query based on the meaning. The server <NUM> may form a response based solely on operations performed within server <NUM>. Alternatively or additionally, the server <NUM> may form a response by acquiring data from a third party service provider or website. As a response to the query received from user terminal 200B, server <NUM> sends the medical record of the patient present in the operating room to user terminal 200B. In response, user terminal 200B displays the medical record on a display to which user terminal 200B is connected. Server <NUM> may send the medical record to a display (or a computer to which the display is connected) directly.

Furthermore, as a response to the query received from user terminal 200B, server <NUM> may send an instruction to user terminal 200B to audibly output "Here is the medical record of Mr. Yamada" (one example of a name of a patient). User terminal 200B may audibly output "Here is the medical record of Mr. Yamada" (one example of a name of a patient) in response to the instruction being received.

In <FIG>, as one example of user terminal <NUM>, a user terminal 200C used in an office is shown. User terminal 200C is for example a smart phone.

The user utters "Check company A!" as a query to user terminal 200C. User terminal 200C sends a signal corresponding to the utterance "Check company A!" as the query to server <NUM>.

Server <NUM> uses a grammar, which is for a function to provide information for stock prices, to interpret the meaning of the query received from user terminal 200C and forms a response to the query based on the meaning. As a response to the query received from user terminal 200C, server <NUM> sends company A's stock price to user terminal 200C. In response, user terminal 200C displays company A's stock price on the display of user terminal 200C, and/or audibly outputs company A's stock price through a speaker of user terminal 200C.

In <FIG>, as one example of user terminal <NUM>, a user terminal 200D used in a house is shown. User terminal 200D is for example a smart speaker.

The user utters "Call Grandma!" to user terminal 200D as a query. User terminal 200D sends a signal corresponding to the utterance "Call Grandma!" to server <NUM> as the query.

Server <NUM> uses a grammar, which is for a call function, to interpret the meaning of the query received from user terminal 200D and forms a response to the query based on the meaning. As a response to the query received from user terminal 200D, server <NUM> sends an instruction to user terminal 200D to make a call to a telephone number stored in user terminal 200D as "Grandma. " In response, user terminal 200D makes a call to the telephone number registered in user terminal 200D as "Grandma.

In <FIG>, as one example of user terminal <NUM>, a user terminal 200E used in a kitchen is shown. User terminal 200E is for example a smart phone.

The user utters "Tell me a recipe for pot-au-feu!" as a query to user terminal 200E. User terminal 200E sends a signal corresponding to the utterance "Tell me a recipe for pot-au-feu!" to server <NUM> as the query.

Server <NUM> uses a grammar, which is for a function to provide information for cooking, to interpret the meaning of the query received from user terminal 200E and forms a response to the query based on the meaning. As a response to the query received from user terminal 200E, server <NUM> sends a recipe for pot-au-feu to user terminal 200E. In response, user terminal 200E displays the recipe for pot-au-feu on a display to which user terminal 200E is connected. Alternatively, as a response to the query, server <NUM> may send to user terminal 200E a list of links of websites which provide recipes of pot-au-feu. In that case, user terminal 200E displays the list. In response to the user selecting one link from the list, user terminal 200E connects to the selected link.

In <FIG>, as one example of user terminal <NUM>, a user terminal 200F used by a user sitting in front of a TV set is shown. User terminal 200F is for example a smart phone.

The user utters "What's on TV tonight?" as a query to user terminal 200F. User terminal 200F sends a signal corresponding to the utterance "What's on TV tonight?" as the query to server <NUM>.

Server <NUM> uses a grammar, which is for a function to provide information about TV programs, to interpret the meaning of the query received from user terminal 200F, and forms a response to the query based on the meaning. As a response to the query received from user terminal 200F, server <NUM> sends to user terminal 200F a TV program guide for the night of that day on which the query is input. In response, user terminal 200F displays the TV program guide received from server <NUM>.

In <FIG>, as one example of user terminal <NUM>, a user terminal <NUM> is shown. User terminal <NUM> is for example a smart phone.

The user utters "What's the weather today?" as a query to user terminal <NUM>. User terminal <NUM> sends a signal corresponding to the utterance "What's the weather today?" and an indication of the geolocation of the smart phone (user terminal <NUM>) to server <NUM> as the query.

Server <NUM> uses a grammar, which is for a function to provide information about weather, to interpret the meaning of the query received from user terminal <NUM> and forms a response to the query based on the meaning. As a response to the query received from user terminal <NUM>, server <NUM> sends to user terminal <NUM> a weather forecast for the location and day at and on, respectively, which the query is input to user terminal <NUM>. In response, user terminal <NUM> displays and/or audibly outputs the weather forecast received from server <NUM>.

<FIG> illustrates a hardware configuration of server <NUM>. With reference to <FIG>, server <NUM> includes a processing unit <NUM>, a memory <NUM>, an input/output (I/O) interface <NUM>, a network controller <NUM>, and a storage <NUM> as main hardware elements.

Processing unit <NUM> is a computing entity that performs processing necessary for implementing server <NUM> by executing various types of programs as will be described hereinafter. Processing unit <NUM> is for example one or more central processing units (CPUs) and/or graphics processing units (GPUs). Processing unit <NUM> may be a CPU or GPU having a plurality of cores. Processing unit <NUM> may be a Neural network Processing Unit (NPU) suitable for a training process for generating a trained model, as described hereinafter.

Memory <NUM> provides a storage area which temporarily stores program codes, work memory, and the like for processing unit <NUM> to execute a program. Memory <NUM> may be a volatile memory device, such as DRAM (Dynamic Random Access Memory) and SRAM (Static Random Access Memory), for example.

Processing unit <NUM> can receive data from a device (a keyboard, a mouse, and the like) connected via I/O interface <NUM>, and may output data to a device (a display, a speaker, and the like) via I/O interface <NUM>.

Network controller <NUM> communicates data with any information processor including user terminal <NUM> through a public line and/or a LAN (Local Area Network). Network controller <NUM> may be a network interface card, for example. Server <NUM> may send a request to an external Web API using network controller <NUM> in order to obtain a response to a query. Network controller <NUM> may conform to any system, such as the Ethernet ®, a wireless LAN, and Bluetooth®, for example.

Storage <NUM> may be a nonvolatile memory device, such as a hard disk drive or a SSD (Solid State Drive), for example. Storage <NUM> stores a training program 16A, a pre-processing program 16B, an application program 16C, and an OS (Operating System) 16D run in processing unit <NUM>.

Processing unit <NUM> executes training program 16A, preprocessing program 16B, application program 16C, and OS (operating system) 16D. In embodiments, the server <NUM> may receive voice data from different users, and use that voice data for each user to build a trained model <NUM> for each user. That trained model <NUM> may then be downloaded to a user terminal <NUM> for that user to enable the user terminal <NUM> to perform local speech recognition of utterances from that user.

Toward that end, server <NUM> may include a training program 16A for training trained model <NUM> used for speech recognition of queries. In embodiments, the training program 16A may be some configuration of a neural network. Preprocessing program 16B is a program for generating a training data set <NUM> for individual users by collecting and preprocessing voice data input from the individual users for training trained model <NUM>. By using collected voice data input from a specific user, trained model <NUM> can be personally trained to the specific user. Application program 16C is a program for sending a response to a query to client terminal <NUM> in response to input of the query from client terminal <NUM>. OS 16D is a basic software program for managing other processing in server <NUM>.

Storage <NUM> further stores a grammar library 16E, user information 16F, trained model <NUM>, training data set <NUM>, and voice data 16X. Grammar library 16E stores information about a grammar used for interpretation of a meaning of a query. Grammar library 16E has a data configuration, which will be described hereinafter with reference to <FIG>.

User information 16F stores information about each user registered in the query processing system. User information 16F has a data configuration, which will be described hereinafter with reference to <FIG>.

Trained model <NUM> is used for speech recognition of a query, as has been discussed above. Training data set <NUM> is a data set used for training trained model <NUM>. In training data set <NUM>, each voice data may be tagged to each user who uttered the corresponding voice, a phonetic transcription indicating a word or a phrase that the user intended to utter, the attribution (age, sex, occupation, etc.) of the user, and/or a situation (location, time, etc.) in which the user uttered the corresponding voice. Voice data 16X is collected for training trained model <NUM>, and stored in storage <NUM>.

<FIG> illustrates a data configuration of grammar library 16E.

Grammar library 16E stores grammars used for interpretation of meaning of queries and information related to each grammar.

The information associated with each grammar includes an item (or domain) for classifying the grammar. In <FIG>, domains A to G are indicated. Though all the domains indicated in <FIG> include a plurality of grammars, some domains may include only one grammar.

Domain A includes grammars A1, A2 and A3 or the like. Grammar A1 defines a combination of words "turn on the radio. " Grammar A2 defines a combination of words "close the window," and Grammar A3 defines a combination of words "open the window. " Grammars belonging to domain A are mainly used for interpretation of queries input inside a vehicle to realize a function to manipulate elements of the vehicle.

Domain B includes grammar B1 or the like. Grammar B1 defines a combination of words "show me the medical record. " Grammars belonging to domain B are mainly used for interpretation of queries input in an operating room to realize a function to provide users in the operating room with information.

Domain C includes grammar C1 or the like. Grammar C1 defines a combination of a slot indicating a name of a company (<name of company> in <FIG>) and a word "check. " Grammars belonging to domain C are mainly used for interpretation of queries input in an office to realize a function to provide information about stock prices.

Domain D includes grammars D1 and D2 or the like. Grammar D1 defines a combination of a slot indicating a registered name in an address book (<name> in <FIG>) and a word "call. " Grammar D2 defines a combination of a slot indicating a name of a musician (<musician> in <FIG>), a word "by," a slot indicating a title of a song (<title> in <FIG>), and a word "play. " Grammars belonging to domain D are mainly used for interpretation of queries input in a home or office to realize a general function to provide information and a call function.

Domain E includes grammar E1 or the like. Grammar E1 defines a combination of a slot indicating a name of a dish (<dish> in <FIG>) and words "tell me a recipe for. " Grammars belonging to domain E are mainly used for interpretation of queries input in a kitchen to realize a function to provide information about cooking.

Domain F includes grammar F1 or the like. Grammar F1 defines a combination of a slot indicating a time or a date (<time> in <FIG>) and words "what's on TV for. " Grammars belonging to domain F are mainly used for interpretation of queries input in front of a TV in a home to realize a function to provide information about TV programs.

Domain G includes grammars G1 and G2 or the like. Grammar G1 defines a combination of words "what's the weather today. " Grammar G2 defines a combination of a slot indicating a time or a city (<city> in <FIG>) and words "what's the weather in. " Grammars belonging to domain G are mainly used for interpretation of queries input by a user asking for a weather forecast to realize a function to provide information about weather.

An item "offline setting" in grammar library 16E defines whether the function using grammars belonging to each domain can be used while user terminal <NUM> is offline. The value "0N" indicates that the function can be used even while user terminal <NUM> is offline. The value "0FF" indicates that the function cannot be used while user terminal <NUM> is offline.

An item "predicted type of data" in grammar library 16E defines a type of data to predict that a user terminal will require in the future when server <NUM> receives a query from the user terminal.

For example, in response to input of a query "Play Yesterday by the Beatles!" server <NUM> interprets the meaning of the query by using grammar D2 ("play <title> by <musician>"). The value of the item "predicted type of data" for grammar D2 is "list of titles of songs by <musician>.

In the query "Play Yesterday by the Beatles!" "Yesterday" corresponds to the slot <title>, and "the Beatles" corresponds to the slot <musician>. In one implementation, in response to the above-mentioned query "Play Yesterday by the Beatles!" server <NUM> may further specify "list of titles of songs by the Beatles" as a "predicted type of data.

Then, server <NUM> may acquire data of the specified type, i.e., a list of titles of songs by the Beatles, as related data. Server <NUM> may send the list of titles of songs by the Beatles as related data of the query "Play Yesterday by the Beatles!" to the user terminal from which the query "Play Yesterday by the Beatles!" is sent, in addition to the response to the query "Play Yesterday by the Beatles!".

An item "time-to-live" of grammar library 16E defines a time-to-live assigned to related data. The time-to-live is mainly used in user terminal <NUM>, and defines a time period over which data relating the query is to be maintained in memory of user terminal <NUM>.

For example, in <FIG>, for grammar G1' s predicted type of data "weather forecast for the current place for seven days, " a time-to-live of "<NUM> days" is defined. In that case, when server <NUM> receives the query "what's the weather today" on October <NUM> from user terminal <NUM> located in Osaka, server <NUM> responds to the query by sending a weather forecast for Osaka for October <NUM>, and in addition, sending a weather forecast for Osaka for the <NUM> days from October <NUM> to October <NUM> as related data. The related data is given a time-to-live of "<NUM> days. " User terminal <NUM> holds the related data received from server <NUM> for the seven days after October <NUM>, that is, until October <NUM>. While user terminal <NUM> is off-line, user terminal <NUM> may use the related data to output a response to a query input by the user. Once the time-to-live has passed, that is, once October <NUM> has passed, user terminal <NUM> deletes the related data from user terminal <NUM>.

In grammar library 16E an item "count (<NUM>)" represents how many times each grammar is used to interpret a meaning of a query. An item "count (<NUM>)" represents how many times in total any grammar belonging to each domain is used to interpret a meaning of a query. For example, when grammar A1 is used for interpreting a meaning of a query, the count (<NUM>) of grammar A1 has a value incremented by <NUM>, and further, the count (<NUM>) of domain A has a value incremented by <NUM>.

<FIG> illustrates a data structure of user information 16F. User information 16F associates "user ID," "terminal ID" and "sent grammars. " The item "sent grammars" defines name(s) of domain(s) to which the grammars sent to each user terminal belong.

A user ID defines a value assigned to each user. A terminal ID represents a value assigned to each user terminal <NUM>. Sent grammars represent domains to which grammars sent to each user terminal <NUM> belong.

In the example of <FIG>, terminal ID "SP01" is associated with user ID "<NUM>" and domains A and C. This means that a user assigned user ID "<NUM>" sent one or more queries to server <NUM> by using a terminal assigned terminal ID "SP01, " and that server <NUM> sent grammars belonging to domains A and C to the terminal assigned terminal ID "SP01.

In one implementation, server <NUM> may send only a grammar of a portion of a domain to each user terminal <NUM>. In that case, user information 16F may specify as a value of "sent grammar" a grammar (grammar A1, etc.) sent to each user terminal <NUM>.

<FIG> illustrates a hardware configuration of user terminal <NUM>. With reference to <FIG>, user terminal <NUM> includes as main hardware elements a CPU <NUM>, a display <NUM>, a microphone <NUM>, a speaker <NUM>, a GPS (Global Positioning System) receiver <NUM>, a communication interface (I/F) <NUM>, a storage <NUM>, and a memory <NUM>.

CPU <NUM> is a computing entity that performs processing necessary for implementing user terminal <NUM> by executing various types of programs as will be described hereinafter.

Display <NUM> may be a liquid crystal display device, for example. CPU <NUM> may cause display <NUM> to display a result of having performed a process.

Microphone <NUM> receives voice input and outputs a signal corresponding to the received voice for CPU <NUM> to access. Speaker <NUM> provides audio output. CPU <NUM> may output a result of having performed a process audibly through speaker <NUM>.

GPS receiver <NUM> receives a signal from GPS satellites and outputs the signal for CPU <NUM> to access. CPU <NUM> may determine the current position of user terminal <NUM> based on the signal received from GPS receiver <NUM>. Communication I/F <NUM> communicates data with any information processor including server <NUM> through a public line and/or a LAN. Communication I/F <NUM> may be a mobile network interface, for example.

Storage <NUM> may be a nonvolatile memory device, such as a hard disk drive or a SSD (Solid State Drive), for example. Storage <NUM> stores an application program <NUM>. In addition, storage <NUM> includes a grammar region <NUM>, a related data region <NUM>, a failure data region <NUM>, location information <NUM>, and a personalized trained model <NUM>.

Application program <NUM> is a program for receiving a query input by a user and outputting a response to the query. Application program <NUM> may be a car navigation program or an assistant program, for example.

Grammar region <NUM> stores a grammar sent from server <NUM>. Related data region <NUM> stores related data related to the grammar and sent from server <NUM>. Failure data region <NUM> stores a target query when user terminal <NUM> has failed interpreting what the query means.

Location information <NUM> indicates the location of user terminal <NUM> and information which may be used to select types of grammars used in interpreting what queries mean. Location information <NUM> has a data configuration, which will be described hereinafter with reference to <FIG>. Trained model <NUM> is sent from server <NUM> and stored in storage <NUM> as personalized trained model <NUM>.

<FIG> illustrates a detailed structure of location information <NUM>. Location information <NUM> correlates location "home" and grammar "domains D, E, F, and G, " and correlates location "office" and grammar "domain C.

User terminal <NUM> may determine one or more grammars to be used in interpretation of meaning of queries while offline based on information in <FIG>. For example, the user terminal <NUM> will use different grammars depending on the location of the user terminal <NUM>.

In response to input of a query, user terminal <NUM> may specify its position. In one example, the position of user terminal <NUM> can be specified based on a GPS signals received by GPS receiver <NUM>. In another example, the position of user terminal <NUM> can be specified based on a kind of a beacon signal received by user terminal <NUM>. In another example, the position of user terminal <NUM> can be specified based on network information such as an IP address or mobile base station ID.

In one implementation, if the specified position is within the location previously registered as "home," user terminal <NUM> may try to interpret a meaning of the query using grammars belonging to domains D, E, F, and G, and may not try to interpret a meaning of the query using grammars belonging to other domains. If the specified position is within the location previously registered as "office," user terminal <NUM> may try to interpret a meaning of the query using grammars belonging to domain C, and may not try to interpret of the query using grammars belonging to other domains.

<FIG> and <FIG> are a flowchart of a process executed in server <NUM> for outputting a response to a query. In one implementation, the process is implemented by processing unit <NUM> running application program 16C. In one implementation, server <NUM> starts the process in response to reception of data which declares that a query is sent.

Initially, with reference to <FIG>, in step S100, server <NUM> receives a query from user terminal <NUM>.

In step S102, server <NUM> subjects the query received from user terminal <NUM> to speech recognition to generate a transcription of the query. When the query is sent from user terminal <NUM> in a form other than voice, step S102 may be skipped. The user can input the query to user terminal <NUM> in a text format. User terminal <NUM> can send the query to server <NUM> in a text format. When server <NUM> receives a query in a text format, server <NUM> may skip step S102.

In step S104, server <NUM> subjects the transcription generated in step S102 (or the text data received from user terminal <NUM>) to natural language interpretation. Thus, the query's meaning is interpreted.

Server <NUM> in step S104 may select one of a plurality of grammars on server <NUM> to interpret the meaning of the query, and interpret the meaning of the query by using the selected grammar.

In one implementation, each of step S102 and step S104 for multiple transcriptions are performed in multiple iterations such that natural language interpretation happens on the multiple transcriptions when one speech of a user includes the multiple transcriptions.

In step S106, server <NUM> increments a count for grammar library 16E for the grammar used to interpret the meaning of the query in step S104. More specifically, server <NUM> increments count (<NUM>) by one for the grammar used and increments count (<NUM>) by one the total any grammar belonging to each domain is used.

In step S108, server <NUM> forms a response to the query based on the interpretation done in step S104.

In one example, as a response to the query "Turn on the radio," server <NUM> obtains an instruction to turn on a radio mounted in a vehicle. In another example, in order to obtain a response to the query "Check Company A," server <NUM> may make an inquiry for Company A's stock price by sending at least a portion of the query (Company A) to an API which provides stock prices. As a reply to that inquiry, server <NUM> obtains, as a reply to the query "Check company A. ", the stock price of company A from the API.

In yet another example, as a response to the query "Play Yesterday by the Beatles," server <NUM> obtains an instruction to search for and retrieve an audio file of Yesterday by the Beatles and an instruction to play that audio file.

In step S110, server <NUM> sends the response obtained in step S108 to user terminal <NUM>.

In step S112, server <NUM> determines whether the grammar used in step S104 is stored in user terminal <NUM>. In one implementation, server <NUM> refers to user information 16F (see <FIG>) for the grammar(s) having been sent to user terminal <NUM> that is a sender of the query sent in step S100. More specifically, when a grammar belonging to a domain stored as a sent grammar includes a grammar used in step S104, server <NUM> determines that the grammar is stored in user terminal <NUM>.

When server <NUM> determines that the grammar used in step S104 is stored in user terminal <NUM> (YES in step S112), the control proceeds to step S120 (<FIG>), otherwise (NO in step S112), the control proceeds to step S114.

Some implementations do not include step S112 and proceed directly from step S110 to step S114. In such implementations, user terminal <NUM> can sometimes receive one grammar more than once and disregard (or delete) a copy. This uses more communication bandwidth by increasing network traffic but avoids the possible complexity of a server maintain accurate information of what grammars are stored in user terminals.

In step S114, server <NUM> determines whether the grammar used in step S104 has a value of "offline setting" set ON in grammar library 16E. When the grammar used in step S104 has a value of "offline setting" set ON (YES in step S114), the control proceeds to step S116, otherwise (NO in step S114), the control proceeds to step S120 (<FIG>).

In embodiments, the user terminal <NUM> may be set up to only receive a grammar that has been used in response to a query some predetermined number of times. In this way, download of a grammar that is rarely used may be avoided. In accordance with this embodiment, in step S116, server <NUM> determines whether a count value related to the grammar used in step S104 exceeds a given threshold value. The "count value" in step S116 may be the value of count (<NUM>), that of count (<NUM>), or both that of count (<NUM>) and that of count (<NUM>) in grammar library 16E. When server <NUM> determines that the count value exceeds the given threshold value (YES in step S116), the control proceeds to step S118; otherwise (NO in step S116), the control proceeds to step S120 (<FIG>).

In step S118, server <NUM> sends to user terminal <NUM> the grammar used in step S104. In step S118, server <NUM> may further send to user terminal <NUM> another grammar belonging to the same domain as the grammar used in step S104. Subsequently, the control proceeds to step S120 (<FIG>).

With reference to <FIG>, in step S120, as well as in step S114, server <NUM> determines whether the grammar used in step S104 has a value of "offline setting" set ON in grammar library 16E. When the grammar used in step S104 has a value of "offline setting" set ON (YES in step S120), the control proceeds to step S122, otherwise (NO in step S120), the control ends the process.

In step S122, server <NUM> specifies in grammar library 16E a "predicted type of data" corresponding to the grammar used in step S104. When grammar D2 is used in step S104, server <NUM> specifies as a "predicted type of data" a list of titles of songs of a musician included in the query. More specifically, when the meaning of the query "Play Yesterday by the Beatles" is interpreted using grammar D2, server <NUM> specifies "a list of titles of songs by the Beatles" as the "predicted type of data.

When grammar G2 is used in step S104, server <NUM> specifies a <NUM>-day weather forecast for a city included in the query as a "predicted type of data. " More specifically, when the meaning of the query "Tell me the weather in Osaka" is interpreted using grammar G2, server <NUM> specifies as the "predicted type of data" "a weather forecast in Osaka for seven days from the next day as counted from the day on which the query is input.

In step S124, server <NUM> obtains, as related data, data of the type specified in step S122. For example, when server <NUM> specifies "a list of titles of songs by the Beatles" as a "predicted type of data," server <NUM> obtains data of the list. When server <NUM> specifies as a "predicted type of data" "a weather forecast for Osaka for seven days from the next day as counted from the day on which the query is input," server <NUM> requests a weather forecast in Osaka for the seven days from a weather forecast API and obtains data of the weather forecast obtained in response to that request. In step S126, server <NUM> sends to user terminal <NUM> the related data obtained in step S124.

In step S128, server <NUM> sends personalized trained model <NUM> corresponding to the user of user terminal <NUM> to user terminal <NUM>. In one implementation, server <NUM> refers to user information 16F (see <FIG>) to specify a user ID associated with user terminal <NUM> with which server <NUM> communicates, and server <NUM> sends to user terminal <NUM> personalized trained model <NUM> stored in storage <NUM> in association with the identified user. Subsequently, server <NUM> ends the process.

Thus, in the process described with reference to <FIG> and <FIG>, server <NUM> sends to user terminal <NUM> a grammar used for natural language interpretation of a query received from user terminal <NUM>.

As has been described for step S112, server <NUM> may send the grammar to user terminal <NUM> when the grammar is not stored in user terminal <NUM>. As has been described for step S114, server <NUM> may send the grammar to user terminal <NUM> when user terminal <NUM> is configured to function using the grammar in the offline state (or has a value of offline setting set ON). As has been described for step S116, server <NUM> may send the grammar to user terminal <NUM> when how many times the grammar used in step S104 (or count (<NUM>)) or how many times any grammar belonging to the same domain as that grammar (or count (<NUM>)) exceeds a given threshold.

As has been described for steps S122-S126, server <NUM> may predict, based on the input query, a type of data required for responding to a query received in the future (or a predicted type of data), and send the predicted type of data (or related data) to user terminal <NUM>.

Server <NUM> may further send a time-to-live of the related data in step S126. The time-to-live may be specified for each "predicted type of data," as shown in <FIG>. The time-to-live may be sent as metadata of the related data.

Server <NUM> may perform a process for training trained model <NUM>. The training may be done for each user. As has been described for step S128, server <NUM> may send trained model <NUM> for the user of user terminal <NUM> to user terminal <NUM>.

In one embodiment, in training of trained model <NUM> at server <NUM>, one or more utterances of one or more users and text data for each of the one or more utterances can be used as training data set <NUM>. The training data may further include information related to each of the one or more users (names in the "contact list" file stored in the user terminal of each user, for example). Techniques described in Reference <NUM> ("Robust i-vector based Adaptation of DNN Acoustic Model for Speech Recognition", <URL:
http://www1. edu/~sparta/2015_ivector_paper. pdf >), Reference <NUM> ("PERSONALIZED SPEECH RECOGNITION ON MOBILE DEVICES", <URL:
https://arxiv. org/pdf/<NUM>. pdf>), Reference <NUM> ("Speech Recognition Based on Unified Model of Acoustic and Language Aspects of Speech", <URL:
https://www. ntt-review. jp/archive/ntttechnical. php?contents=ntr201312fa4. pdf&mode=show pdf>), and Reference <NUM> ("Speech Recognition Based on Unified Model of Acoustic and Language Aspects of Speech", <URL:
https://www. jp/journal/<NUM>/files/jn201309022. pdf>) can be used for the training of trained model <NUM>.

<FIG> and <FIG> are a flowchart of a process executed by user terminal <NUM>. In one implementation, CPU <NUM> of user terminal <NUM> implements the process by executing a given program. The process is started for example whenever a predetermined period of time elapses.

Referring to <FIG>, in step S200, user terminal <NUM> deletes related data stored in related data regions <NUM> that has passed a time-to-live.

In step S202, user terminal <NUM> determines whether user terminal <NUM> is online (or communicable with server <NUM>). When user terminal <NUM> determines that user terminal <NUM> is online (YES in step S202), the control proceeds to step S204; otherwise (NO in step S202), the control proceeds to step S226 (see <FIG>).

In step S204, user terminal <NUM> sends to server <NUM> any query stored in failure data region <NUM> (see step S242 below). When the query is associated with time information and/or location information, the time information and/or location information may also be sent to server <NUM> in step S204. After the query is sent, user terminal <NUM> may delete the sent query from failure data regions <NUM>.

In step S206, user terminal <NUM> obtains a query. In an example, the query is input via voice through microphone <NUM>. In another example, the query is input in the form of text data by operating a touch sensor (not shown) of user terminal <NUM>.

In step S208, user terminal <NUM> sends to server <NUM> the query obtained in step S206. The sent query may be received by server <NUM> in step S100 (see <FIG>).

In step S210, user terminal <NUM> receives a response to the query from server <NUM>. The response may be sent from server <NUM> in step S110 (see <FIG>).

In step S212, user terminal <NUM> outputs the response received from server <NUM>. An example of the response output is an action following an instruction included in the response. For example, when the response includes an "instruction to turn on the radio", user terminal <NUM> turns on a radio mounted in a vehicle in which user terminal <NUM> is mounted.

In step S214, user terminal <NUM> receives a grammar sent from server <NUM>. The grammar may be sent from server <NUM> in step S118 (see <FIG>).

In step S216, user terminal <NUM> stores in grammar region <NUM> the grammar received in step S214.

In step S218, user terminal <NUM> receives related data. The related data may be sent from server <NUM> in step S126 (see <FIG>).

In step S220, user terminal <NUM> stores in related data region <NUM> the related data received in step S218.

In step S222, user terminal <NUM> receives trained model <NUM>. Trained model <NUM> may be sent from server <NUM> in step S128 (see <FIG>).

In step S224, user terminal <NUM> stores trained model <NUM> that is received in step S222 in storage <NUM> as personalized trained model <NUM>. Subsequently, user terminal <NUM> ends the process.

Queries sent to server <NUM> in step S208 may result in all, none, or any combination of grammars as in step S214, related data as in step S218, and a personalized trained speech recognition model as in step S222.

In accordance with aspects of the present technology, when it is determined in step S202 that the user terminal <NUM> is offline (with no connection to server <NUM>), the user terminal <NUM> uses speech recognition to parse the utterance into a query. The personalized trained model <NUM> (generated at server <NUM> and downloaded to user terminal <NUM>) may be used for this purpose. Once a query is recognized, the present technology may then use one or more of the downloaded and locally stored grammars to interpret a natural language meaning of the query. The present technology may apply a variety of predefined criteria, explained below, in selecting which locally stored grammar or grammars stored at server <NUM> to use. <FIG> explains these steps in greater detail.

In step S226, user terminal <NUM> obtains a query similarly as done in step S206. In step S228, user terminal <NUM> obtains time information representing when the query is obtained by user terminal <NUM>. The obtained time information may be associated with the query obtained in step S226, and thus stored in storage <NUM>.

In step S230, user terminal <NUM> obtains location information representing where user terminal <NUM> is located when the query is obtained by user terminal <NUM>. The obtained location information may be associated with the query obtained in step S226, and thus stored in storage <NUM>.

In step S231, user terminal <NUM> identifies which one of multiple possible users is using user terminal <NUM>. In some embodiments, the identification of one user may be performed by reading out the profile of a logged-in account. In some embodiments, the identification of one user may also be performed by using a voice fingerprinting algorithm on the audio of the voice query. Based on the identification of the user, user terminal <NUM> chooses one trained model of one or more models as personalized trained model <NUM>.

In step S232, user terminal <NUM> subjects the query obtained in step S226 to speech recognition. In the speech recognition, user terminal <NUM> may use personalized trained model <NUM>. Step S232 may be performed when the query is input via voice. Step S232 may be skipped when the query is input as text data.

In step S234, user terminal <NUM> subjects the query obtained in step S226 to natural language interpretation. Thus, the query's meaning is interpreted. In the natural language interpretation, user terminal <NUM> may use a grammar stored in grammar region <NUM>. The grammar stored in grammar region <NUM> includes the grammar used to interpret the meaning of the query obtained in step S206. That is, user terminal <NUM> can use a grammar used in interpreting the meaning of the query obtained in step S206 (a first query) to interpret the meaning of the query obtained in step S226 (a second query).

A grammar used for natural language interpretation may be selected depending on the situation where user terminal <NUM> obtains the query. Examples of how different situations affect which grammar is used are explained below. Limiting a grammar which can be used depending on the situation can prevent more reliably an improper grammar from being used in subjecting a query to natural language interpretation. That is, the meaning of the query can be interpreted with increased precision.

In one example, user terminal <NUM> may refer to location information <NUM> (see <FIG>) to follow location information that is obtained when a query is obtained to select a range of grammars that can be used in the natural language interpretation. In the example of <FIG>, when the location information obtained when a query is obtained is included in a location registered as "home," a grammar used for natural language interpretation is selected from domains D, E, F, and G. When the location information obtained when a query is obtained is included in a location registered as "office", a grammar used for the natural language interpretation is selected from domain C.

In another example, user terminal <NUM> may follow time information that is obtained when a query is obtained to select a range of grammars that can be used in the natural language interpretation. More specifically, when the time information is included in a time zone registered as the user's working hours, a grammar used for the natural language interpretation is selected from domain C. When the time information is not included in the time zone registered as the user's working hours, a grammar used for the natural language interpretation is selected from domains D, E, F and G.

In yet another example, user terminal <NUM> may follow a combination of location information and time information that are obtained when a query is obtained to select a range of grammars that can be used for the natural language interpretation. More specifically, when the location information obtained when the query is obtained is included in a location registered as "home", and the time information obtained when the query is obtained is included in a time zone registered as the user's cooking time, a grammar used for the natural language interpretation is selected from domain E, whereas when the location information obtained when the query is obtained is included in the location registered as "home", and the time information obtained when the query is obtained is not included in the time zone registered as the user's cooking time, a grammar used for the natural language interpretation is selected from domains D, F and G.

In some implementations, the location information and/or the time information constraint are not strict conditions but instead provide a weight to one or more hypothesized correct grammars for interpreting each given text or utterance transcription. In one example, application program 16C outputs possibility of each grammar to be applied for the given text or utterance transcription. Application program 16C selects the grammar having the largest sum of the output possibility and the weight, as a grammar to be used in interpretation of the given text or utterance transcription.

In step S236, user terminal <NUM> determines whether the natural language interpretation in step S234 has successfully been performed. User terminal <NUM> determines that the natural language interpretation is successful if the query is interpreted by any of one or more grammars stored in grammar region <NUM>. In contrast, user terminal <NUM> determines that the natural language interpretation has failed if the query is not interpreted by any of one or more grammars stored in grammar regions <NUM>.

When it is determined that the natural language interpretation in step S234 is successful (YES in step S236), user terminal <NUM> proceeds to step S238. When it is determined that the natural language interpretation in step S234 has failed (NO in step S236), user terminal <NUM> proceeds to step S242.

In step S238, user terminal <NUM> obtains a response to the query obtained in step S226, based on the interpretation done in step S234. User terminal <NUM> may obtain the response to the query from the related data in related data region <NUM>.

In one example, when a query "Play Yesterday by the Beatles" is obtained in step S206, user terminal <NUM> stores a list of titles of songs by the Beatles as related data in related data regions <NUM> in step S220. Subsequently, in step S226, when a query "Tell me a list of songs by the Beatles" is obtained, user terminal <NUM> obtains as a response to that query a list of songs of the Beatles stored in related data regions <NUM>. In step S240, user terminal <NUM> outputs the response obtained in step S238. Subsequently, user terminal <NUM> ends the process.

In step S242, user terminal <NUM> stores in failure data regions <NUM> the query obtained in step S226. The query stored in failure data regions <NUM> is sent to server <NUM> in step S204. Subsequently, user terminal <NUM> ends the process.

In the process described with reference to <FIG> and <FIG>, a query for which the natural language interpretation has failed when user terminal <NUM> is offline is sent to server <NUM>. A query for which the natural language interpretation is successfully performed when user terminal <NUM> is offline may also be sent to server <NUM>. Thus, server <NUM> can obtain a query input to user terminal <NUM> when it is offline. Server <NUM> may specify a grammar used to interpret what these queries mean. Server <NUM> may increment and thus update count (<NUM>) and count (<NUM>) for a specified grammar. Thus, information about a query input to user terminal <NUM> when it is offline may also be reflected in a value of count (<NUM>) and that of count (<NUM>).

The disclosed features can be summarized as a computer-implemented method, a system, a computer software (program) and/or a non-transitory computer-readable data storage medium which stores therein instructions to perform the method. For example, according to one aspect of the present disclosure, a non-transitory computer-readable data storage medium stores instructions for implementing a method including receiving input of a query from a client terminal; performing natural language interpretation of the query using a grammar; outputting a response to the query after performing the natural language interpretation; and sending the grammar to the client terminal.

It should be understood that the embodiments disclosed herein have been described for the purpose of illustration only and in a non-restrictive manner in any respect. The scope of the present invention is defined by the terms of the claims, rather than the description above. In addition, the embodiments and modifications described are intended to be implemented singly or in combination as far as possible.

Claim 1:
A computer-implemented method, comprising:
receiving input of a query from a client terminal (200A-<NUM>);
performing natural language interpretation of the query using a grammar;
outputting a response to the query after performing the natural language interpretation;
counting a number of times that the grammar is used in natural language interpretation of queries from the client terminal, wherein the counting includes all times that grammars belonging to a domain to which the grammar belongs are used in natural language interpretation of the query, and
sending the grammar to the client terminal, wherein sending the grammar to the client terminal is conditioned upon the counted number exceeding a threshold.