Method and computer for responding to a query according to the language used

A method of, and a computer for, processing a query. The method includes receiving the query in a first language at a computerized messaging device, the first language being one of different languages. A template in the first language is then selected from one of the different languages and query data corresponding to the first language is retrieved from a database of query data. The method includes populating the template with template data corresponding to the first language to define a query response in the query language, and communicating the query response from the device to a recipient.

FIELD OF THE INVENTION

The present invention relates generally to computerized responses to queries and, more specifically, to a method of, and computer for, responding to a query.

BACKGROUND OF THE INVENTION

Centralized facilities are often provided for responding to customer queries from various geographic locations. Such facilities may have a number of different applications running to respond to customer queries and, in certain circumstances, queries may be routed between different facilities for load sharing purposes. Due to the global nature of business, the queries received from the customers may be in a variety of different languages. In order to accommodate different queries in different languages, each facility may provide a separate application dedicated to a particular language. Accordingly, once a language associated with an incoming query has been determined, the query is then routed to an independent application dedicated to the particular language. This method typically requires a separate agent, fluent in the particular language, to attend to a request in the particular language using the particular application dedicated to the particular language.

In order to facilitate responding to customer queries, a facility typically has a plurality of predefined templates each of which are associated with a particular query. The template contains a narrative of the response to be sent to the customer, and “place holders” or fields requiring customer specific data. The agent may then merely populate the template, as this requires far less time than generating a response from scratch.

SUMMARY OF THE INVENTION

A method of, and a computer for, processing a query are provided. The method comprises receiving the query in a first language at a computer, the first language being one of a plurality of different languages. A template in the first language is then selected from one of a plurality of different languages and query data corresponding to the first language is retrieved from a database of query data. The method includes populating the template with template data corresponding to the first language to define a query response in the first language, and communicating the query response from the computer to a recipient.

DETAILED DESCRIPTION

A method of, and a computer for, processing a query are described. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be evident, however, to one skilled in the art that the present invention may be practiced without these specific details.

Referring in particular toFIG. 1, an exemplary flow diagram is illustrated describing, from a high level, a method in accordance with an aspect of the invention for processing a query in any one of a plurality of languages. The method ofFIG. 1is typically implemented in a single, multi-threaded, computer application in which changes between different languages and different locales during processing take place dynamically. For example, a sequence of queries in languages A, B and C, as shown by arrow22inFIG. 1, may be received by a computer24which then processes each query in a multi-threaded fashion and generates a response to each query in the same language that the query was received in. Thereafter, the response is communicated to a recipient as shown by arrow26. In addition to processing the query in any one of the plurality of languages supported, the computer24allows an agent, using the computer24, to view and populate a template in a selected agent language which may be different from a first or query language in which the query was received. Thus, in certain embodiments, the computer24may use a single application, which interfaces with the agent in his or her preferred selected agent language, but receives queries and responds to queries in a different query language.

With the explosion of the Internet, facilities such as call centers responding to customer queries, may receive queries from various different regions or countries in which different languages are spoken. In addition to the different languages, each particular country may have preferred locale rules relating to the format or manner in which a response to a query should be set out, for example, formatting the date as either mm/dd/yy or dd/mm/yy. In addition, in order to balance loads at different facilities or call centers, queries are often routed to different call centers and, it will thus be appreciated, that processing the queries in a multi-lingual fashion facilitates this process.

For example, when the invention is implemented in an Internet environment, inFIG. 2the computer24is connected to the Internet28, and may receive a query in English from a customer30in England, a query in German from a customer32in Germany, and a query in French from a customer34located in France. The computer24may then in a single user session process any one or more of the queries or, in the event of the computer24being overloaded, redirect any one or more of the queries requiring processing, as shown by line36inFIG. 2, to a similar computer38, located at a different facility, which would then process the query irrespective of the query language. In one embodiment, the computers24,38may in addition process a query in an agent language that differs from the query language. Thus, an agent40ofFIG. 2, that is associated with the computer24, may process any one of the queries from the customers30,32,34in English, and an agent42, to which any one of the queries has been routed, may process the routed query or queries in French. However, responses from both computers24,38are sent out in the same language in which the query was received.

In one embodiment, the computer24operates in a totally automated fashion without user intervention. However, in other embodiments, the computer24requires input from an operator or agent. When requiring input from an agent or operator, the agent may identify a particular template to respond to the query, as well as the particular language in which the template is to be provided.

FIG. 3shows a high level view of how the computer24, in one embodiment, allows the processing of queries in an agent language that is different from the query language. In one embodiment, the computer24typically has a default language set to the language of choice of the agent upon installation. For example, if the computer24is installed in the United States of America, the agent language is typically English and, accordingly, in this embodiment all interaction via a display of the computer24with an agent is in English, unless the agent language is specifically changed. Accordingly, in this embodiment a display screen of the computer24displays templates, suitable for responding to the query as well as data to populate the template, in the agent language. In block44, when, for example, a query is received in language A, the agent at an exemplary call center or facility46identifies the particular language of the query, as well as the particular template that is suitable to respond to the query. The agent then enters the query language into the computer24using a drop down menu of the computer24. The computer24then, in an automated fashion in one embodiment, populates a corresponding template in language A with template data corresponding to language A. In block47the operator or agent views the response in the agent language which is his or her language of choice. Thereafter, in block48, the response is sent in the query language (query language A) to the recipient. In order to perform its various functions the computer24has a processor25which accesses a database27.

Referring in particularFIG. 4, an exemplary software application50, also in accordance with an aspect of the invention, is illustrated. The software application50can be run on the computer24to process queries in different languages. The application50is a multi-threaded application so that it can process queries in different languages, and also process one or more queries simultaneously or concurrently. In block52ofFIG. 4, the application50receives a query in any one of the languages supported whereafter, in block54, the application50identifies the query language and locale of the recipient. Thereafter, in block56, an appropriate template ofFIG. 5is chosen and the template is then populated in block58. The functionality carried out in blocks54,56and58forms part of a single thread of the multi-threaded application50. Accordingly, in one embodiment, the functionality in blocks54,56and58of the application50may be repeated for each different thread which is executed by the application50in any single user session. After a particular thread has processed the query and generated a response in the particular language in which the query was received (the query language), the response is then communicated to the recipient in block60. In one embodiment, multiple instances of the application50are provided on a plurality of servers so as to accommodate a large number of queries such as those typically received via the Internet.

As shown inFIG. 5, the application50includes a plurality of different templates in a plurality of different languages. In one embodiment, different templates types may be provided for different types of queries and each template type is also provided in different languages. Accordingly, as shown inFIG. 5, each template which, for example, relates to a specific product query, may be provided as a Spanish template62, a French template64, a Portuguese Template66, an English template68, and any other languages which the application50may support. Likewise, different template types may be provided for different products or different queries and the appropriate template type that answers the query is chosen in block56ofFIG. 4. Once the appropriate template type to address the query has been chosen, a specific template in the query language is then chosen. The specific template is then populated in block58using, for example, data from tables such as customer data tables70, product data tables72, locale data tables74, and any other relevant data tables76which the template may require. The tables70,72,74and76may be provided in the database27.

An example of a template is as follows:

We have received your complaint against [Product Number], [Product Description] and a Service Request [Service Request Number] has been logged to track the progress on resolving it. The current status of the Service Request is [Service Request Status]. If you do not hear from us by [Expected Resolution Date], please call [Phone Number].

In one embodiment, the above exemplary template is provided in all the different languages supported by the application50. The templates in each language include placeholders or fields for receiving template data associated with the particular query. The template data included in the fields or placeholders may or may not be language dependant. For example, the Product Number place holder need not, in certain circumstances be language dependant, however, the Product Description may be dependant on the query language. Accordingly, in one embodiment, the template may be populated with both language dependant and language independent data. Thus, in certain embodiments, the customer data tables70my include language dependant and language independent data, the product data tables72may include data in the plurality of different languages supported by the application50, the locale data tables74may be dependant on language, and the other relevant data tables76may or may not be dependant on the query language, depending upon how the application50is configured. When the application50populates the particular template in the particular query language, template data in the query language is thus selected from data provided in a plurality of different languages. The locale data is then used to define the format or manner in which the template data is included in the template.

Referring in particularFIG. 6, an exemplary locale data table80is illustrated from which appropriate locale data is retrieved to define the format in which the template data is to be included in the template. In one embodiment, sets of locale data are provided wherein each set corresponds to a particular query language. As mentioned above, in one embodiment the locale data includes a set of locale rules that define how data is to be displayed or formatted in each particular template. The locale rules are used to format the data so that, in one embodiment, when the template is read it is in a format corresponding to a particular geographical convention associated with the query language. Typical examples of locale data are dates, times, numbers, currency based data, or the like.

In one embodiment, the locale data is defined during a configuration operation with the aid of a user interface82ofFIG. 10. In order to identify a particular locale set corresponding with a particular query language, a locale code84is provided. In one embodiment, the locale codes are internationally accepted codes or commonly known codes such as those provided by Microsoft™. However, it is to be appreciated that the Microsoft™ codes are provided merely by way of example and that any other standard or non-standard codes can be used. When configuring the computer24to run the application50, an administrator may select the particular locale code84and enter the relevant data in a form86ofFIG. 10. In certain embodiments, default values are provided to facilitate configuration. Any one or more of the fields86may be used to define the format in which the template data is displayed in the template. For example, each locale code84may be defined in terms of any one or more of an international dialing code90, a positive currency format92, a negative currency format94, a number decimal separator96, a number grouping separator98, a number of fractional digits100, a number of leading zeros102, a list separator103, a short date format104, a long date format106, a date separator108, a time separator110, a time designator position112, an option to add a leading zero for time114, an option to set a twenty-four hour clock116, an AM/PM time designator118, and a user interface directionality facility120.

Returning toFIG. 6, the locale data table80shows schematically how different configurations or data formats are associated with each locale code84. For example, when the query language is English-USA, then the locale code84is ENU and the template data is formatted so that a date is shown as MM/DD/YY and a currency is shown in US Dollars. Likewise, if the query language is English-United Kingdom, then the locale code84is ENG and the template data is formatted so that the date is displayed as DD/MM/YY and the currency is British Pounds. In a similar fashion in other embodiments, various other locale codes84may provide a format in which the template data is displayed so that a recipient of the response receives a customized response in a format customarily used in their particular language.

Referring in particular toFIG. 7, an exemplary product data table122is illustrated from which appropriate product data is retrieved for populating the template. The exemplary product data table122includes a plurality of product names124and product descriptions126which are identified as translatable items. The exemplary product data table122further includes translation table names128which identify an exemplary translation table130ofFIG. 8, which includes translations of product descriptions and product names in each of the languages supported by the application50. Thus, in one embodiment, when populating the template, a product description and a product name set out in the query language is imported or populated into the template.

In certain embodiments, the application50includes the other relevant data tables76ofFIG. 5in various different languages for inclusion in the chosen template. For example, a multi-lingual list of values (MLOV) table132ofFIG. 9is provided in certain embodiments. The MLOV table132may include a data type e.g. a salutation134and, associated with each data type134, is a name136, a value138and a language code140. Accordingly, in certain embodiments, when the query language has been identified, the language code140may be identified and used to retrieve relevant data from the MLOV table132to populate the template with data associated with the query language. For example, when the type is a salutation134, and the language code is English (ENG), the value138would then be “Mr.” However, when the language code140is French (FRA) then the value138would then be “Monsieur.”

Referring in particular toFIGS. 11 to 16of the drawings, an embodiment of an object orientated implementation of the application50is provided. In the embodiment depicted inFIGS. 11 to 16, the application50is a multi-threaded application in which an object manager hosts the logic to process the queries.

FIG. 11illustrates an exemplary flow diagram of an initialization process to initialize the object manager. During the initialization process, in block152a component object manager process is first initialized whereafter locale information for a component locale is read and added to a global locale map in block154. The locale information may be read from the locale data table80ofFIG. 6when particular locale information, associated with a particular query language, is required. In one embodiment, the locale information is then cached. When a query in a different language requires locale information that has not already been cached, locale information, associated with the different query language, is once again read from the locale data table80and added to the cache. Thus, in one embodiment, the particular locale information is dependent upon the query language and, accordingly, locale information specific to a particular query language is added to the cache each time a query in a different language is received by the application50.

Once the locale information associated with the query language has been retrieved, and an appropriate template in the query language has been identified, the template is then populated as discussed above with reference to block58inFIG. 4. Referring in particular toFIG. 12, exemplary application logic of the application50to populate correspondence templates is illustrated. The application logic in block158initially chooses a particular template for the correspondence or query response that is to be communicated to the recipient. Choosing the appropriate template relates both to choosing an appropriate template that addresses the content of the query as well as choosing the language of the appropriate template, which is typically the query language. Once the query language has been identified, in block160the session data language code140ofFIG. 9and the session locale code84ofFIG. 6are set. Thereafter, in block162business components that are logical stores for the data used in the template are executed and values are obtained, for example, from the MLOV table132ofFIG. 9, which are then used to populate the template in block164ofFIG. 12.

Exemplary functionality in setting the session data language code140and the locale code84in block160ofFIG. 12is described in more detail inFIG. 13. In block168ofFIG. 13, the logic in the object manager switches the session locale code84and data language code140to accommodate a query in a different language. For example, assuming the application50sets the locale code84to French (code FRA) as shown in block168, then the logic in block170ofFIG. 13checks to ascertain whether or not the locale information or data for French is present in the global locale map. If the locale information is not present in the global locale map, then in block172the locale information is read from the locale data table80ofFIG. 6and stored in cache, and the logic thereafter proceeds to block174inFIG. 13. If, however, the locale information is already present in the global locale map, then the logic proceeds directly from block170to174. In block174the application50sets the data language code140for the particular session to French. The data language code140is thus the language in which the query is to be responded to and is thus the same as the query language. After the data language code140has been set, the logic ofFIG. 13in block176then performs a clean up operation of any session structures dependent on the data language code140and sets the data language for the current thread to French.

As mentioned above with reference to block162ofFIG. 12, the application logic executes business components and this logic or functionality is shown in more detail inFIG. 14. In particular,FIG. 14illustrates exemplary logic in the object manager to support the multi-lingual data when the business component is executed. The logic in block180ofFIG. 14initially identifies whether a particular business component has associated language dependent tables such as the product data table122and the translation table130ofFIGS. 7 and 8respectively. This may be required as, in certain embodiments, not all template data may be language dependant and thus include translations in different languages for inclusion in the particular template. If the business component has an associated language component, then in block182the translation table130is joined to retrieve a row corresponding to the session data language code140so that template data in the particular language of the chosen template is retrieved to populate the template.

Referring in particular toFIG. 15, a schematic flow diagram is illustrated that describes exemplary logic in the object manager when the application obtains locale data. In one embodiment, in block188the application50accesses a value for a Date, Currency, Time, DateTime, Number or Phone field required for the template. As the preferred format of the aforementioned values may differ from locale to locale, the formatting function calls a static method in block190in a locale class to get a pointer to point to the particular process locale. The pointer is defined with reference to the global locale map which is the map of the locale information for the particular query language stored in cache, as described above in block154ofFIG. 11and block172ofFIG. 13. Thus, in block192ofFIG. 15, the method in the locale class accesses the global locale map and returns a pointer to the specific locale used in the current session, and thereafter formats the template data for the specific session locale in block194inFIG. 15using the locale data table80ofFIG. 6. It is important to bear in mind that, in certain embodiments, the application50is multi-threaded and, accordingly, the pointer may relate to a specific thread of one of a plurality of different threads that each relate to a different query.

Referring in particular toFIG. 16, in block198the application logic accesses the value of a translatable field. In block200, the logic checks to determine whether or not the field is based on data provided in the MLOV table132ofFIG. 9and, if not, a translated value is retrieved in block202from the translation table130. However, if the field is based on data provided in the MLOV table132, then in block204the logic ofFIG. 16checks to determine whether or not the values required for the session query language are cached. If the values are not cached in the session query language, then in block132ofFIG. 16the logic updates the cache by reading a list of values from the MLOV table132ofFIG. 9associated with the query language, and in block206stores the values in cache. If the values are already stored in cache, then in block208the cached valued is returned to the application50.

Thus, the object orientated embodiment of the application50allows multiple threads to run on the computer24so that queries in different query languages may be processed. As each thread is processed, the language code140of the product data table122ofFIG. 8and the translation table ofFIG. 9is set for the particular thread. Likewise, as each thread is processed, the locale code84of the locale data table80is set. It is important to appreciate that the tables ofFIGS. 6 to 9are merely provided by way of example. Thus, dependent upon the circumstances, a variety of different tables may be provided to populate the template with template data in an appropriate language.

FIG. 17shows a diagrammatic representation of machine in the exemplary form of the computer system300within which a set of instructions, for causing the machine to perform any one of the methodologies discussed above, may be executed.

The computer system300includes a processor302, a main memory304and a static memory306, which communicate with each other via a bus308. The computer system300may further include a video display unit310(e.g., a liquid crystal display (LCD) or a cathode ray tube (CRT)). The computer system300also includes an alphanumeric input device312(e.g. a keyboard), a cursor control device314(e.g. a mouse), a disk drive unit316, a signal generation device318(e.g. a speaker) and a network interface device320.

The disk drive unit316includes a machine-readable medium322on which is stored a set of instructions (software)324embodying any one, or all, of the methodologies described above. The software324is also shown to reside, completely or at least partially, within the main memory304and/or within the processor302. The software324may further be transmitted or received via the network interface device320. For the purposes of this specification, the term “machine-readable medium” shall be taken to include any medium which is capable of storing or encoding a sequence of instructions for execution by the machine and that cause the machine to perform any one of the methodologies of the present invention. The term “machine-readable medium” shall accordingly be taken to included, but not be limited to, solid-state memories, optical and magnetic disks, and carrier wave signals.

Thus, a method and computer for responding to a query in any one of a plurality of languages have been described. Although the present invention has been described with reference to specific exemplary embodiments, it will be evident that various modifications and changes may be made to these embodiments without departing from the broader spirit and scope of the invention. Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense.