Query shaping system, query shaping method and program

JP2023154062A5Pending Publication Date: 2026-01-15RAKUTEN GROUP INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023132511
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-03-01
Filing Date
2023-08-16
Publication Date
2026-01-15

AI Technical Summary

Technical Problem

Conventional named entity recognition techniques, such as Bi-LSTM-CRF and BERT-CRF, are ineffective for improving the accuracy of query shaping in short queries, leading to inaccuracies in formatting queries for search processing.

Method used

A query formatting system that utilizes a token acquisition unit, matching execution unit, and a learning model to format queries by combining dictionary data with machine learning methods, including Fine-tuned CharacterBERT and Bi-LSTM-CRF, to accurately identify and adjust tokens in queries.

Benefits of technology

The system enhances query shaping accuracy by effectively combining matching methods with machine learning, allowing for precise token formatting and improved search results, even in queries with incorrectly spaced or missing spaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

To enhance the precision of query shaping.SOLUTION: A token obtaining unit (101) of a query shaping system (1) obtains multiple tokens contained in a query. A matching executing unit (102) executes matching that utilizes dictionary data on the basis of the multiple tokens. A second token shaping unit (105) executes shaping on a second token that does not match with the dictionary data among the multiple tokens on the basis of a first token that matches with the dictionary data among the multiple token and of learning model relating to query shaping.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a query shaping system, a query shaping method, and a program.

Background Art

[0002] Conventionally, a technique for executing a search process based on a query is known. Since queries can generally be freely input, inappropriate queries may be input for searching. For example, even if it is necessary to input a space between word A and word B, a space may not be input between word A and word B. For example, for some reason, a space may be input between the characters constituting a single word. Therefore, it is required to appropriately shape the query.

[0003] For example, since queries often contain proper expressions, it is conceivable to shape the query using a proper expression recognition task. As an example of a proper expression recognition task, the techniques of Non-Patent Document 1 and Non-Patent Document 2 are known. Non-Patent Document 1 describes Bi-LSTM-CRF for recognizing proper expressions such as personal names or place names included in a sentence. Non-Patent Document 2 describes BERT-CRF for recognizing proper expressions such as disease names or symptoms included in a medical document.

Prior Art Documents

Non-Patent Documents

[0004]

Non-Patent Document 1

Non-Patent Document 2

[0005] However, the technologies described in Non-Patent Documents 1 and 2 are intended to recognize named entities contained in texts of a certain length, and therefore cannot recognize named entities contained in relatively short queries. For this reason, even if the technologies described in Non-Patent Documents 1 and 2 are applied to query formatting, the accuracy of query formatting cannot be improved. This is also true for other named entity recognition tasks, and conventional technologies have not been able to improve the accuracy of query formatting.

[0006] One of the purposes of this disclosure is to improve the accuracy of query formatting. [Means for solving the problem]

[0007] The query formatting system relating to this disclosure includes: a token acquisition unit that acquires a plurality of tokens included in a query; a matching execution unit that performs matching using dictionary data based on the plurality of tokens; and a second token formatting unit that formats a second token that does not match the dictionary data based on a first token that matches the dictionary data from the plurality of tokens and a learning model for query formatting. [Brief explanation of the drawing]

[0008] [Figure 1] This figure shows an example of the overall configuration of a query formatting system. [Figure 2] This figure shows an example of a screen displayed on a user's terminal. [Figure 3]This is a functional block diagram showing an example of the functions realized in this embodiment. [Figure 4] This diagram shows an example of the overall flow in a query formatting system. [Figure 5] This figure shows an example of the output from the first learning model. [Figure 6] This is a flowchart illustrating an example of the process performed by the query formatting system. [Figure 7] This is a functional block diagram of a modified example. [Modes for carrying out the invention]

[0009] [1. Overall structure of the query formatting system] An example of an embodiment of the query formatting system relating to this disclosure will be described. Figure 1 is a diagram showing an example of the overall configuration of the query formatting system. The query formatting system S includes a server 10 and a user terminal 20 that can be connected to a network N. Network N is any network such as the Internet or a LAN. The query formatting system S does not need to include at least one computer and is not limited to the example in Figure 1.

[0010] Server 10 is a server computer. The control unit 11 includes at least one processor. The storage unit 12 includes volatile memory such as RAM and non-volatile memory such as a hard disk. The communication unit 13 includes at least one of a communication interface for wired communication and a communication interface for wireless communication.

[0011] The user terminal 20 is the user's computer. For example, the user terminal 20 is a personal computer, smartphone, tablet, or wearable device. The physical configuration of the control unit 21, storage unit 22, and communication unit 23 is the same as that of the control unit 11, storage unit 12, and communication unit 13, respectively. The operation unit 24 is an input device such as a touch panel. The display unit 25 is a liquid crystal display or an organic EL display.

[0012] The programs stored in the memory units 12 and 22 may be supplied via the network N. Furthermore, each computer may include at least one of a reading unit (e.g., a memory card slot) for reading computer-readable information storage media and an input / output unit (e.g., a USB port) for inputting and outputting data with external devices. For example, the programs stored on the information storage media may be supplied via at least one of the reading unit and the input / output unit.

[0013] [2. Overview of the Query Formatting System] Figure 2 shows an example of a screen displayed on the user terminal 20. In this embodiment, the case of applying the query formatting system S to a website search service is given as an example. The query formatting system S can be applied to various services. Examples of application to other services will be described later. For example, the user launches the browser or application on the user terminal 20 and accesses the top page P1 of the search service.

[0014] Server 10 can provide users with various pages, such as the top page P1 and the search results page. Users enter an arbitrary query into the input form F10 and use the search service. In this embodiment, the case where the query is entered in English is described, but queries can be entered in any language. For example, queries may be entered in other languages ​​such as Japanese, Chinese, Spanish, French, or Arabic.

[0015] A query is a word entered by the user during a search. A word is at least one letter, at least one number, at least one symbol, or a combination of these. A word is sometimes called a keyword. The individual letters, numbers, or symbols that make up a word are sometimes called elements. A query may also include search conditions other than words (e.g., numerical ranges or attributes). The search is performed by comparing the query entered by the user with the index stored on server 10.

[0016] A query contains at least one token. A token is a unit of word included in a query. A token contains at least one word. A token may consist of one word or multiple words. If a token consists of multiple words, there may be spaces between the words, or some symbol such as an underscore or hyphen may be placed between them. In this embodiment, a query containing multiple tokens is assumed, but a query may contain only one token.

[0017] For example, suppose a user enters the query "The South Mountain" to search for products from a fictional apparel brand, "The South Mountain." This query contains three words: "The," "South," and "Mountain." To improve search accuracy, these three words should be treated as a single token rather than separate tokens, as they represent the apparel brand name when considered together. Such a query contains a single token composed of three words. Therefore, even if multiple words are separated by spaces, those multiple words may still correspond to a single token.

[0018] On the other hand, suppose a user enters the query "Hawaii mountains" to search for mountains in Hawaii. This query consists of two words: "Hawaii" and "mountains". Unlike the query "The South Mountain", these two words have independent meanings, so they do not need to be treated as a set, and it is better to treat them as separate tokens. Such a query contains two tokens, each consisting of one word.

[0019] However, when server 10 receives a query, it is difficult to determine whether it is a token consisting of multiple words or a token consisting of a single word. Therefore, when server 10 receives a query, it initially considers the parts separated by spaces as tokens. For example, if the query is "The South Mountain", server 10 will initially consider it to contain three tokens: "The", "South", and "Mountain". If the query is "Hawaii mountains", server 10 will initially consider it to contain two tokens: "Hawaii" and "mountains".

[0020] Server 10 can identify the parts of a query that should be considered tokens based on predetermined rules. Initially, the parts considered tokens are not limited to those separated by spaces. For example, Server 10 may identify the parts of a query that should be considered tokens based on some kind of delimiter symbol. For example, this symbol could be parentheses, underscores, hyphens, commas, or periods. Furthermore, Server 10 may combine multiple rules to identify the parts of a query that should be considered tokens.

[0021] In the example in Figure 2, the query "Tokyo restaurant" contains the tokens "Tokyo" and "restaurant". The query "USA championship" contains the tokens "USA" and "championship". The individual tokens in these two queries are nouns with independent meanings. Since such nouns have independent meanings, it is often possible to search for them using AND or OR conditions without any problems. For this reason, these two queries have spaces inserted in the appropriate places and are suitable as tokens for searching.

[0022] The query "Tokyorestaurant" contains only one token, "Tokyorestaurant," because it lacks spaces. While a space should ideally be present between the nouns "Tokyo" and "restaurant," there is no space between them. For example, if a user finds it cumbersome to enter spaces and instead uses only text, or if they use voice input, multiple words that should be separated into multiple tokens may become a single token. This query is unsuitable as a search token because it lacks properly placed spaces.

[0023] The query "USA championship ship" contains a space between "champion" and "ship," which are part of the noun "championship." Therefore, unlike the properly entered query "USA championship," this query contains the tokens "USA," "champion," and "ship." When a user mistakenly enters a space between "champion" and "ship," or when copying and pasting from a website or document file, a single token can be split into multiple tokens. This query is also incorrect as a search token because the space is not inserted in the correct position.

[0024] Therefore, in this embodiment, query formatting is performed so that the query becomes an appropriate token. Query formatting is the process of adjusting what is initially considered a token into an appropriate token. Query formatting is sometimes called query chunking. In this embodiment, three examples of query formatting operations are given: splitting, joining, and segmenting, but query formatting operations may refer to only one or two of these three. A query formatting operation is how to format a query. An operation can also be called a type of formatting.

[0025] Splitting is the process of dividing one token into multiple tokens. A space is placed between these multiple tokens. Dividing the aforementioned single token "Tokyorestaurant" into two tokens, "Tokyo" and "restaurant," is equivalent to splitting. A space is placed between "Tokyo" and "restaurant."

[0026] Combining tokens is the process of combining multiple tokens into a single token. The spaces between the tokens are removed. Combining the two tokens "champion" and "ship" into a single token "championship" is an example of combining tokens. The spaces between "champion" and "ship" are removed.

[0027] Segmentation is similar to joining in that it combines multiple tokens into a single token, but it differs in that spaces are not removed. Combining the three tokens "The," "South," and "Mountain" into a single token, "The South Mountain," as mentioned earlier, is an example of segmentation. The spaces between "The" and "South," and between "South" and "Mountain," are not removed.

[0028] The query formatting system S improves the accuracy of query formatting by performing a novel query formatting method that effectively combines a matching method using dictionary data and a machine learning method using a learning model, rather than using general query formatting methods such as morphological analysis. The details of this embodiment will be described below.

[0029] [3. Functions implemented by the query formatting system] Figure 3 is a functional block diagram showing an example of the functions realized in this embodiment. Figure 4 is a diagram showing an example of the overall flow in the query formatting system S. Hereafter, the details of each function in Figure 3 will be explained with reference to the flow in Figure 4. As shown in Figure 4, the query formatting process is broadly divided into two stages. Stage 1 is the matching method. Stage 2 is the machine learning method that takes into account the results of the matching in Stage 1.

[0030] In this embodiment, the matching method in Stage 1 and the machine learning method in Stage 2 are implemented by the functions shown in Figure 3. For example, the data storage unit 100 is mainly implemented by the storage unit 12. The token acquisition unit 101, matching execution unit 102, determination unit 103, first token formatting unit 104, second token formatting unit 105, formatted query acquisition unit 106, search unit 107, and presentation unit 108 are mainly implemented by the control unit 11.

[0031] [Data Storage Unit] The data storage unit 100 stores the data necessary for query formatting. For example, the data storage unit 100 stores the target database DB, the first dictionary data D1, the second dictionary data D2, the third dictionary data D3, the first learning model M1, and the second learning model M2. Hereafter, when the first dictionary data D1, the second dictionary data D2, and the third dictionary data D3 are not distinguished, they will simply be referred to as dictionary data D. Similarly, when the first learning model M1 and the second learning model M2 are not distinguished, they will simply be referred to as learning model M.

[0032] The search target database DB is a database that stores the data to be searched. The search target database DB also stores indexes that are used for comparison with queries. In this embodiment, since websites correspond to the search target, indexes containing words extracted from various websites are stored. If websites are categorized, the categories also correspond to indexes. The information that can be used as an index can be various publicly known pieces of information. For example, the search target database DB stores website indexes and website URLs in association.

[0033] Dictionary data D is data that stores words suitable as tokens during searches. Words stored in dictionary data D may consist of a single word or contain multiple words. For example, if you want to use the fictional apparel brand "The South Mountain" as a single token, these three words would be stored as one word in dictionary data D. Various publicly available dictionary data D can be used. For example, dictionary data D may be created based on data from a Japanese dictionary or an online encyclopedia. Tokens included in frequently entered queries may also be stored in dictionary data D.

[0034] In this embodiment, we take the example of using three dictionary data sets D, namely the first dictionary data set D1, the second dictionary data set D2, and the third dictionary data set D3. The dictionary data sets D used in the matching method of Stage 1 are not limited to the example in this embodiment. For example, only one dictionary data set D may be used, or two or four or more dictionary data sets D may be used.

[0035] For example, the first dictionary data D1 stores words commonly used in a particular field. The second dictionary data D2 stores general words listed in an online encyclopedia. The third dictionary data D3 stores at least one word equivalent to a prefix, a word equivalent to a suffix, and a word with co-occurrence. The first dictionary data D1, the second dictionary data D2, and the third dictionary data D3 are to be created by the administrator of the query formatting system S, but they may also be publicly available on the internet.

[0036] The learning model M is a model that utilizes machine learning. Machine learning itself can utilize various methods used in natural language processing, such as supervised learning, semi-supervised learning, or unsupervised learning. The learning model M is sometimes referred to as AI (Artificial Intelligence). For example, the learning model M may utilize a pre-trained natural language processing model based on Transformers, such as CharacterBERT, or a character-based CNN (Convolutional Neural Network). Furthermore, other methods such as Bi-LSTM, Bi-LSTM-CRF, or Word2Vec may be partially utilized as the learning model M. Other examples include BERT and ELECTRA, which are based on Transformer models.

[0037] In this embodiment, we take the example of a case where two learning models M, such as a first learning model M1 and a second learning model M2, are used. The learning models M used in the machine learning method of Stage 2 are not limited to the example of this embodiment. For example, only one learning model M may be used, or three or more learning models M may be used. When multiple learning models M are used, the machine learning methods of each learning model M may be different from one another.

[0038] For example, the first learning model M1 is a finely tuned CharacterBERT. For example, the first learning model M1 is a model used in methods to solve the so-called sequence labeling problem. The first learning model M1 is input with the individual characters contained in the token. The first learning model M1 calculates character features about the characteristics of each character. If a token has 5 characters, then 5 character features are calculated. The features themselves can be calculated using various known computation methods. Features can be represented in any form, for example, as a multidimensional vector, array, or single numerical value. Features are sometimes called embedding representations. The first learning model M1 may output character features as the final output, or it may output character features as an intermediate computation result to obtain the final output.

[0039] For example, the second learning model M1 computes token features, which relate to the features of the token itself, rather than to individual characters. Token features differ from character features in that they relate to the overall features of the token rather than the individual characters contained within it, although the meaning of the features themselves is the same as that of character features. Token features can also be expressed in any format and computed using various known computation methods. The second learning model M1 can be any model capable of computed features of a string of a certain length, and may be Bi-LSTM, Bi-LSTM-CRF, or Word2Vec. The second learning model M2 may output token features as the final output, or it may output token features as an intermediate computation result to obtain the final output.

[0040] [Token acquisition section] The token acquisition unit 101 acquires multiple tokens included in the query. The token acquisition unit 101 identifies the token delimiter positions within the query based on a predetermined method. In this embodiment, the case where tokens are separated by spaces is described, so the token acquisition unit 101 identifies the positions of spaces included in the query and acquires multiple tokens from the query. If tokens are separated by a specific symbol instead of spaces, the token acquisition unit 101 may acquire multiple tokens from the query based on the positions of the relevant symbols included in the query.

[0041] In this embodiment, the token acquisition unit 101 is shown as acquiring multiple tokens included in a query entered by the user from the user terminal 20. However, the token acquisition unit 101 may also acquire multiple tokens included in a query from a database where previously entered queries are stored. A query may contain only one token, so the token acquisition unit 101 may acquire only one token included in the query. Even if a query contains multiple tokens, the token acquisition unit 101 may acquire only some of the tokens included in the query.

[0042] [Matching Execution Department] The matching execution unit 102 performs matching using dictionary data D based on multiple tokens. Matching is the process of comparing multiple tokens with words stored in dictionary data D. In this embodiment, the case where comparing individual tokens with words stored in dictionary data D constitutes matching is explained, but it is also possible that comparing multiple tokens as a single unit with words stored in dictionary data D constitutes matching.

[0043] In this embodiment, since multiple dictionary data D are provided, the matching execution unit 102 performs matching using each of the multiple dictionary data D. If only one dictionary data D is provided, the matching execution unit 102 performs matching using only that one dictionary data D. Through matching, the matching execution unit 102 classifies each of the multiple tokens into either the first token or the second token.

[0044] The first token is a token that matches a dictionary data D. In this embodiment, if multiple dictionary data Ds are provided, the first token is a token that matches at least one of the multiple dictionary data Ds. In this embodiment, any token that matches any one of the multiple dictionary data Ds is classified as a first token, however, matching more than a threshold number of dictionary data Ds may be a condition for classification as a first token. This threshold may be 2 or greater. This threshold may be specified by the administrator of the query formatting system S.

[0045] The second token is a token that did not match any of the dictionary data D. In the case where multiple dictionary data D are provided, as in this embodiment, the second token is a token that did not match any of the multiple dictionary data D. If a threshold value of 2 or more is set for the condition of being classified as a first token, the second token is a token that did not match any of the dictionary data D, or a token that only matched dictionary data D below the threshold value.

[0046] For example, the matching execution unit 102 performs matching by determining whether or not each token matches a word stored in the dictionary data D. That is, the matching execution unit 102 determines whether or not a word matching each token exists in the dictionary data D. In this embodiment, the case in which an exact match is determined is described, but a partial match may also be determined. A partial match may be a prefix match, a middle match, or a suffix match. In this embodiment, as an example of matching, a method of searching for a matching character from the leftmost character in a string (so-called leftmost longest match) is described.

[0047] For example, suppose a user enters the query "Dinner Italian Tokyorestaurant". In this case, the user likely made a typo, inserting a space between "Ita" and "lian," and failing to insert a space between "Tokyo" and "restaurant." This query should be formatted as "Dinner Italian Tokyo restaurant."

[0048] The token acquisition unit 101 acquires four tokens, "Dinner," "Ita," "lian," and "Tokyorestaurant," based on the position of spaces in the query "Dinner Italian Tokyorestaurant." The matching execution unit 102 performs matching between each of these four tokens and the dictionary data D. Here, it is assumed that words such as "Dinner," "Italian," "Tokyo," and "restaurant" are stored in the dictionary data D.

[0049] The first token, "Dinner," exists in dictionary data D, so the matching execution unit 102 classifies this token as a first token. There is a space between the second token, "Ita," and the third token, "lian," but the so-called longest left match matches the word "Italian," so the matching execution unit 102 classifies these two tokens as first tokens. The fourth token, "Tokyorestaurant," is a combination of the words "Tokyo" and "restaurant" from dictionary data D, but the longest left match does not match, so the matching execution unit 102 classifies this token as a second token.

[0050] In this embodiment, the matching execution unit 102 uses the first dictionary data D1, the second dictionary data D2, and the third dictionary data D3 to perform the matching described above. For example, as shown in Figure 4, let x be the input sequence query. The tokens included in query x are x i (Let i be a natural number less than or equal to l (the letter L) as described below). If the total number of tokens is l (where l is an integer greater than or equal to 2), then x = x1...x l That is the case.

[0051] For example, let y be a formatted query. A formatted query y can also be described as a sequence of formatted tokens. Obtaining a formatted query y from query x is one of the goals of the query formatting system S. The tokens contained in the formatted query y are y I Let I be a natural number less than or equal to L (as described below). If L is the total number of tokens in the formatted query y (where L is an integer greater than or equal to 2), then y = y1...y L That is the case.

[0052] For example, let o be a sequence of operations in query formatting. Operation o is a sequence of tokens x i Operation o i It is a collection. Therefore, o=o1···o l Therefore, as mentioned above, in this embodiment, we will give three operations as examples: splitting, joining, and segmenting.i will be "Split", "Merge", "Segment", or "Single". "Single" is the token x that does not require an operation i assigned to it. These four can be said to be labels indicating the operation content.

[0053] token x i If it is the first token, the operation o i will be "Split", "Merge", "Segment", or "Single". That is, any one of these four operations o i being assigned is equivalent to the token x i being classified as the first token. Token x i If it is the second token, the operation o i will be "Uncertain", which is not any of these four. "Uncertain" can be said to be a provisional label. That is, the operation o i being assigned is equivalent to the token x i being classified as the second token.

[0054] As shown in FIG. 4, the matching execution unit 102 executes the matching between the token x = x1···x l and the first dictionary data D1. For example, assume that the token x3 and the token x4 match the words in the first dictionary data D1. In the above example, when the token x3 is "Ita" and the token x4 is "lian", it matches one word "Italian" stored in the first dictionary data D1. The matching execution unit 102 classifies each of the tokens x3 and x4 as the first tokens that should be combined with each other. That is, the matching execution unit 102 sets each of the operations o3 and o4 to "Merge".

[0055] When the matching using the first dictionary data D1 is completed, the matching execution unit 102 extracts the tokens x3 and x4 that match the first dictionary data D1 from the query x. As shown in FIG. 4, the object of matching with the second dictionary data D2 is the query x = x1, x2, x5···xl This is how it works. For example, suppose token x2 matches a word in the second dictionary data D2. In the example mentioned above, if token x2 is "Dinner", it matches one word "Dinner" in the second dictionary data D2. The matching execution unit 102 classifies token x2 as a first token that does not require any operation. That is, the matching execution unit 102 sets operation o2 to "Single".

[0056] When the matching execution unit 102 completes the matching using the second dictionary data D2, it extracts the token x2 that matched the second dictionary data D2 from query x. As shown in Figure 4, the queries that are targeted for matching with the third dictionary data D3 are queries x=x1,x5...x l For example, if token x1 matches a suffix in the third dictionary data D3, the matching execution unit 102 classifies token x1 as a first token that does not require any operation. That is, the matching execution unit 102 sets operation o1 to "Single". Note that morphological analysis may be performed on query x to decompose it into morphemes before matching with the third dictionary data D3. In matching using the third dictionary data D3, metrics such as co-occurrence scales may be calculated before the matching is performed.

[0057] Token x5···x l Since each of them did not match any of the dictionary data D, the matching execution unit 102 calculated token x5···x l This is classified as the second token. That is, the matching execution unit 102 performs operation o5···o l Set this to "Uncertain". This completes the matching process. In the following explanation, we will omit the codes for queries, tokens, etc., unless it is necessary to refer to Figure 4.

[0058] In this embodiment, the "Split" operation is not assigned by matching, but the "Split" operation may be assigned by matching. Also, although the example in Figure 4 describes a case where tokens that match dictionary data D are extracted from the query, even if a token matches, it does not have to be extracted from the query. For example, the matching execution unit 102 may perform matching between tokens that match the first dictionary data D1 and the second dictionary data D2 and the third dictionary data D3.

[0059] [Judgment section] The determination unit 103 determines whether all of the multiple tokens obtained by the token acquisition unit 101 match the dictionary data D. That is, the determination unit 103 determines whether there are any tokens among the multiple tokens that do not match the dictionary data D. The determination unit 103 can also determine whether all of the multiple tokens are the first token, or whether there is a second token among the multiple tokens.

[0060] In Figure 4, the determination of "having an Uncertain label" corresponds to the processing of the determination unit 103. Within query x, where matching up to the third dictionary data D3 has been completed, operation o i Token x is "Uncertain" i The absence of all tokens x i This corresponds to a match in dictionary data D. The determination unit 103 performs operation o=o1···o l Based on this, all tokens x i Determine whether it matches the dictionary data D. In the example in Figure 4, token x5···x l Since it does not match dictionary data D and there is a token with the label "Uncertain", the judgment process in Figure 4 becomes "Y".

[0061] [First Token Shaping Department] The first token formatting unit 104 formats the first token based on the matching result. In this embodiment, the first token of "Single" is not formatted, so the first token formatting unit 104 formats the first tokens that need to be formatted from among the multiple first tokens based on the matching result. The first tokens that need to be formatted are those other than "Single" i This is the first token to which the "Split" keyword is assigned. In this embodiment, since "Split" is not assigned in matching with dictionary data D, the first token formatting unit 104 formats the first token to either "Merge" or "Segment".

[0062] For example, if "Merge" is assigned to multiple consecutive first tokens, the first token formatting unit 104 formats the multiple first tokens so that they become a single token by removing the spaces between them. For example, if there are two first tokens like "Ita" and "lian" as mentioned above, the first token formatting unit 104 formats these two first tokens so that they become a single token, "Italian," by removing the space between "Ita" and "lian."

[0063] For example, if "Segment" is assigned to multiple consecutive first tokens, the first token formatting unit 104 formats the multiple first tokens so that they become a single token without removing the spaces between them. For example, if there are three first tokens such as "The," "South," and "Mountain" as mentioned above, the first token formatting unit 104 formats these three first tokens so that they become a single token, "The South Mountain," without removing the spaces between them. The formatted first token may be enclosed in quotation marks or double quotation marks to indicate that it has been segmented.

[0064] In the example in Figure 4, since tokens x3 and x4 are "Merge", the first token formatting unit 104 removes the space between tokens x3 and x4 and combines the two into a single token. In the example in Figure 4, the formatted query by the first token formatting unit 104 is x r Let r be a natural number less than or equal to m (as described later). xr = x1x2···x m (m is an integer greater than or equal to 2). Here, tokens x3 and x4 are combined and reduced by one, so the value of m is 1 less than l.

[0065] Furthermore, various methods can be used for formatting. For example, when a matching operation is performed that can assign "Split" to the first token, the first token formatting unit 104 may format the first token so that the first token of "Split" is divided into multiple parts. For example, if an operation assigned using one dictionary data D is different from an operation assigned using another dictionary data D, the operation may be determined by majority vote, or the operation may be determined according to the priority specified in the dictionary data D.

[0066] [Second Token Shaping Department] The second token formatting unit 105 formats the second tokens that did not match the dictionary data D, based on the first token that matched the dictionary data D among the multiple tokens, and the learning model M for query formatting. The learning model M refers not only to information about the second token itself, but also to information about the first token in order to format the second token. That is, the learning model M refers not only to the second token, but also to the results of the matching, and formats the second token. The learning model M can consider not only the character features of the token, but also which token matched the dictionary data D. The second token formatting unit 105 modifies the internal calculation results of the learning model M, or the output from the learning model M, using the information about the first token, and formats the second token.

[0067] In this embodiment, since multiple types of operations are available for the second token, the second token formatting unit 105 selects one of the multiple operations based on the first token and the learning model M. The second token formatting unit 105 formats the second token based on the selected operation. For example, the second token formatting unit 105 selects one of four operations: "Split", "Merge", "Segment", and "Single". The operations may differ between the first and second tokens. The second token formatting unit 105 may also select an operation for the second token from any three or any two of these four.

[0068] In this embodiment, when the first token is formatted by the first token formatting unit 104, the second token formatting unit 105 formats the second token based on the formatted first token and the learning model M. That is, the learning model M refers to information about the formatted first token and uses it to format the second token. In the example in Figure 4, the first tokens x3 and x4 of "Merge" are formatted to become one first token, so the learning model M refers to information about the first token that has been formatted into one.

[0069] For example, if only a portion of the multiple first tokens has been formatted, the second token formatting unit 105 formats the second token based on the formatted first tokens, the unformatted first tokens, and the learning model M. In this case, the learning model M refers to both the information about the formatted first tokens and the information about the unformatted first tokens. In the example in Figure 4, the first tokens x1 and x2 of "Single" are not formatted, while the first tokens x3 and x4 of "Merge" are formatted, so the learning model M refers to information about both of these first tokens.

[0070] In this embodiment, query x has "Uncertain" r =x1x2···x mGiven a string, the letters in the "Uncertain" token are classified as either "B", "I", "O", "E", or "S". This classification is sometimes called BIOES chunking. The attribute "B" means the beginning of a word. The attribute "I" means the inside of a word. The attribute "E" means the end of a word. The attribute "S" means it is a single-letter word. The attribute "O" means a space.

[0071] For example, a query containing spaces r The sequence of characters is c = c 1,1 ···c m,n Let's assume that. c i,j c is the j-th character within the i-th token. For example, if the i-th token is "Dinner", then c is the j-th character. i,1 is "D", c i,2 is "i", c i,3 is "n", and c i,4 is "n" and c i,5 is "e" and c i,6 It is "r".

[0072] In the example in Figure 4, the output sequence of the learning model M is set to z = z 1,1 ···z m,n Let's assume that z i,j is the letter c i,j It is an attribute of z. That is, z i,j is one of "B", "I", "O", "E", or "S". The machine learning method in Stage 2 is the character sequence c=c 1,1 ···c m,n From the output sequence z=z 1,1 ···z m,n The task is to predict the result. The second token formatting unit 105 updates the label of the "Uncertain" token to either "Split", "Merge", "Segment", or "Single" based on the output sequence z.

[0073] In this embodiment, the Stage 2 machine learning method consists of four layers: acquisition of character features of character sequence c, concatenation with token features considering the matching results, fully connected, and CRF. These four layers are included in the first learning model M1, but may be divided into multiple learning models M. The second learning model M2 is used in the calculation of token features in the second stage layers. The token features may be calculated by the layers of the first learning model M1 instead of the second learning model M2.

[0074] Note that "CLS" and "SEP" in Figure 4 are strings indicating the beginning and end, respectively. Feature quantities will also be calculated for these strings. Furthermore, in this embodiment, the second token formatting unit 105 inputs not only the character sequence c but also the operation sequence o to the first learning model M1, however, the second token formatting unit 105 does not need to input a portion of the operation sequence o to the first learning model M1. For example, the second token formatting unit 105 may input the operation o of the first token from the operation sequence o. i Only this may be input into the first learning model M1.

[0075] For example, the second token formatting unit 105 calculates a first character feature for each first character contained in the first token, based on the first learning model M1. The first character is each individual character contained in the first token. In the example in Figure 4, there are first tokens x1, x2, x3, and x4 (however, first tokens x3 and x4 are combined into one), so the individual characters contained in them correspond to the first character. In Figure 4, boxes related to the first character are given a shaded background.

[0076] For example, the first token x1 is the first letter c 1,1 ,c 1,2 Assuming that it includes, the second token formatting unit 105, based on the first learning model M1, will format the character c 1,1 The first character feature h 1,1 And the letter c 1,2 The first character feature h 1,2The second token formatting unit 105 calculates the first character features for other first characters contained in other first tokens in the same manner. This calculation method itself may be a known method. In this embodiment, since the first learning model M1 is a finely tuned CharacterBERT, the first character features are calculated based on the calculation method defined in CharacterBERT.

[0077] For example, the second token formatting unit 105 calculates a second character feature for each second character contained in the second token, based on the first learning model M. The second character is each individual character contained in the second token. In the example in Figure 4, the second token is x5,···,x m Since these exist, each character contained within them corresponds to the second character. In the example in Figure 4, the second token x5 is the character c 5,1 Includes multiple second characters such as:

[0078] The second token formatting unit 105, based on the first learning model M1, formats the character c 5,1 The second character feature h 5,1 The second token formatting unit 105 calculates the second character feature for other second characters contained in other second tokens. This calculation method, like the first character feature, may be a known method. In the example in Figure 4, the second token formatting unit 105 calculates the character feature H = [h] which includes the first character feature and the second character feature based on the first learning model M1. [CLS] ,h 1,1 ,···,h m,l ,h [SEP] Get ]. h i,j is the letter c i,j These are the corresponding character features.

[0079] For example, the second token formatting unit 105 obtains a first token feature quantity relating to the characteristics of the first token itself, calculated based on a predetermined calculation method. In this embodiment, this calculation method is a method that utilizes a second learning model M2 that calculates the feature quantity of the input string. The second learning model M is an example of a calculation model. Therefore, the parts describing the second learning model M can be read as calculation models. The second token formatting unit 105 obtains the first token feature quantity calculated by the second learning model M2.

[0080] In the example shown in Figure 4, the second token formatting unit 105, based on the second learning model M2, formats the first character c 1,1 ,c 1,2 The first token feature w1 of the first token x1 containing the first letter c is obtained. The first token feature w1 is obtained from these two first letters c 1,1 ,c 1,2 This is common to all. The second token formatting unit 105 similarly obtains the first token features for other first tokens as well. The method for calculating the first token features by the second learning model M2 may be a publicly known method. For example, the second character features are calculated based on calculation methods defined in BERT, Bi-LSTM, Bi-LSTM-CRF, or Word2Vec, etc.

[0081] For example, the second token formatting unit 105 formats the second token based on the first character feature, the first token feature, and the second character feature. For example, for each first character, the second token formatting unit 105 calculates the average of the first character feature and the first token feature of that first character, and formats the second token based on the calculated average and the second character feature.

[0082] In the example in Figure 4, the second token formatting unit 105 is the character c 1,1 The first character feature h 1,1 Then, the average of the first token feature w1 and is calculated. Here, a simple average is used. The second token formatting unit 105 is the character c 1,2 The first character feature h 1,2The first token feature w1 and the average of the first token feature are calculated. The second token formatting unit 105 similarly calculates the average of the first character feature and the first token feature for the other first characters.

[0083] As shown in Figure 4, the second token formatting unit 105 formats the second token based on the first character feature, the first token feature, and the second character feature, rather than on the second token feature, which is related to the characteristics of the second token itself. In the example in Figure 4, the character c of the second token x5. 5,1 For the second character feature, the average with the feature of the second token x5 itself is not calculated. Similarly, for other second tokens, the second token formatting unit 105 uses the second character feature as is, without calculating the average of the second character feature and the second token feature.

[0084] In the example in Figure 4, the second token formatting unit 105 calculates the character feature quantity H=[h] after the average has been calculated for the fully connected layer and CRF layer of the first learning model M1. [CLS] ,h 1,1 ,···,h m,l ,h [SEP] The input is ]. The CRF layer outputs the labeling results of "B", "I", "O", "E", and "S" for each character. That is, the second token formatting unit 105 performs query formatting labeling for each second character included in the second token based on the first token and the learning model M, and formats the second token based on the labeling results. In this embodiment, assigning one of the attributes "B", "I", "O", "E", or "S" to each character corresponds to labeling.

[0085] Figure 5 shows an example of the output from the first learning model M1. In Figure 5, the output of the first learning model M1 for the token "Tokyorestaurant" and the token "championship" is shown. For the sake of explanation, both of these are referred to as second tokens here, but similar outputs may be obtained even if they were first tokens.

[0086] As shown in Figure 5, in this embodiment, the first learning model M1 outputs splitting necessity information regarding whether or not to split the second token. The aforementioned "B", "I", "O", "E", and "S" are examples of splitting necessity information. The second token formatting unit 105 formats the second token based on the splitting necessity information. For example, the second token formatting unit 105 decides to split tokens that the splitting necessity information output from the first learning model M1 indicates need to be split. The second token formatting unit 105 decides not to split tokens that the splitting necessity information output from the first learning model M1 indicates do not need to be split.

[0087] The token "Tokyorestaurant" consists of 15 characters (15 letters of the alphabet), so the first learning model M1 identifies 15 attributes. The attributes of each character are as shown in Figure 5. The first learning model M1 estimates that the part from the first character of attribute B to the subsequent attribute E (from the 1st "T" to the 5th "o" in "Tokyo") constitutes one token. The first learning model M1 then estimates that the part from the next character of attribute B to the subsequent attribute E (from the 6th "r" to the 15th "t" in "restaurant") constitutes one token.

[0088] The first learning model M1 estimates that the input token "Tokyorestaurant" is composed of two tokens, and therefore outputs splitting information indicating whether the token "Tokyorestaurant" should be split. The first learning model M1 may also output the individual tokens estimated above. In this case, the first learning model M1 also performs the splitting of the token "Tokyorestaurant". The first learning model M1 may split the token "Tokyorestaurant" into two and output the token "Tokyo" and the token "restaurant".

[0089] The token "championship" is composed of 12 characters (12 letters of the alphabet), so the first learning model M1 identifies 12 attributes. The attributes of each character are as shown in Figure 5. The first learning model M1 estimates that the part from the first character with attribute B to the subsequent character with attribute E (from the first "c" to the twelfth "p" in "championship") constitutes one token. Since the first learning model M1 has estimated that the input token "championship" is one token, it outputs splitting necessity information indicating that the token "championship" should not be split.

[0090] As described above, the first learning model M1 estimates that the space between the character of attribute B and the subsequent character of attribute E constitutes one token. The first learning model M1 also estimates that the character of attribute S constitutes one token. If the first learning model M1 estimates that multiple tokens exist for a single input token (for example, if there are multiple pairs of characters with attribute B and characters with attribute E), it outputs splitting necessity information indicating that the single input token should be split. If the learning model M estimates that one token exists for a single input token (for example, if there is only one pair of characters with attribute B and characters with attribute E), it outputs splitting necessity information indicating that the single input token should not be split.

[0091] The second token formatting unit 105 may format the second token by dividing the second token, which the division necessity information indicates should be divided, using the dictionary data D. In this embodiment, the case in which the first dictionary data D1 is used will be described, but the second token formatting unit 105 may divide the second token using the second dictionary data D2 or the third dictionary data D3. When the division necessity information indicates that a certain second token should be divided, the second token formatting unit 105 determines whether this second token and the first dictionary data D1 are a partial match. If a word that partially matches this second token exists in the first dictionary data D1, the second token formatting unit 105 divides this token so that it includes a token composed of this word and a token composed of the remaining parts.

[0092] In this embodiment, the second token formatting unit 105 does not format the second token if the determination unit 103 determines that all of the multiple tokens match the dictionary data D. In this case, since all of the multiple tokens are first tokens, even if formatting of the first token is necessary, query formatting can be completed by the first token formatting unit 104 alone. The second token formatting unit 105 formats the second token if the determination unit 103 determines that only some of the multiple tokens match the dictionary data D.

[0093] The second token formatting unit 105 only needs to format the second token based on the matching execution result and the learning model M, and the method of formatting the second token is not limited to the example of this embodiment. For example, if the functions of the first learning model M1 and the functions of the second learning model M2 are combined into one learning model M, the second token formatting unit 105 may format the second token based on that one learning model M.

[0094] Alternatively, the second token may be formatted by focusing on the morphemes contained in the token, rather than the characters contained in the token. In this case, the second token formatting unit 105 performs morphological analysis on the first and second tokens. Various known methods can be used for the morphological analysis itself. A morpheme may consist of one character or contain multiple characters. Here, the morphemes contained in the first token are referred to as the first morphemes, and the morphemes contained in the second token are referred to as the second morphemes.

[0095] The second token formatting unit 105 calculates a first morphological feature vector relating to the features of the first morpheme and a second morphological feature vector relating to the features of the second morpheme, based on the learning model M. The second token formatting unit 105 calculates the average of the first morphological feature vector and the first token feature vector. The second token formatting unit 105 inputs the calculated average and the second morphological feature vector to the fully connected layer and the CRF layer and performs labeling of the second morpheme. The second token formatting unit 105 formats the second token based on the attributes assigned to the second morpheme.

[0096] Alternatively, the second token formatting unit 105 may directly input the formatted first token and the second token into the learning model M. In this case, the second token formatting unit 105 calculates the first token feature of the formatted first token and the second token feature related to the features of the second token based on the learning model M. The second token formatting unit 105 inputs the first token feature and the second token feature into the fully connected layer and the CRF layer to perform labeling of the second token. The second token formatting unit 105 then formats the second token based on the attributes assigned to the second token.

[0097] [Formatted query retrieval section] The formatted query retrieval unit 106 retrieves a formatted query y based on the results of matching using the dictionary data D and the processing results using the learning model M. For example, if both formatting of the first token and formatting of the second token are performed, the formatted query retrieval unit 106 retrieves a formatted query y that includes the formatted first token and the formatted second token. For example, if the formatting of the first token is not performed and only the formatting of the second token is performed, the formatted query retrieval unit 106 retrieves a formatted query y that includes the unformatted first token and the formatted second token.

[0098] For example, if the first token is formatted but the second token is not, the formatted query retrieval unit 106 retrieves a formatted query y containing the formatted first token and the unformatted second token. For example, if neither the formatting of the first token nor the formatting of the second token is performed, the formatted query retrieval unit 106 retrieves a formatted query y containing the unformatted first token and the unformatted second token.

[0099] [Search section] The search unit 107 executes the search process based on the formatted second token. The search unit 107 only needs to execute the search process based on at least the formatted second token. In this embodiment, the formatted query acquisition unit 106 acquires the formatted query y, so the search unit 107 executes the search process based on the target database DB and the formatted query y. The search unit 107 executes the search process by comparing the index stored in the target database DB with the formatted query y. Various known methods can be used for the search process itself. For example, if the formatted query y contains multiple tokens, the search unit 107 executes the search process using the multiple tokens with an OR condition. In the example in Figure 2, the queries "Tokyo restaurant" and "USA championship" are not formatted, so the search unit 107 executes the search process on these queries as they are.

[0100] On the other hand, the query "Tokyorestaurant" in Figure 2 is split into the token "Tokyo" and the token "restaurant". Therefore, the search unit 107 performs the search based on the query "Tokyo restaurant" which has been formatted so that it is split into these two tokens (so that a space is inserted between them). In the query "USA champion ship", the token "USA" remains the same, but the tokens "champion" and "ship" are combined to become "champion ship". Therefore, the search unit 107 performs the search based on the query "USA" which has been formatted so that these two tokens are combined into one (so that there is no space between them). The search process is executed based on the "rights" criteria.

[0101] [Presentation part] The presentation unit 108 presents the results of the search process to the user who entered the query. In this embodiment, the case in which the results are presented visually using images is described, but the results may also be presented audibly using sound. The results of the search process are a list of indexes that were hit in the search. For example, the presentation unit 108 generates display data (e.g., HTML data) for the screen including the results of the search process and sends it to the user terminal 20.

[0102] [4. Processing performed by the query formatting system] Figure 6 is a flowchart showing an example of the process performed by the query formatting system S. This process is performed by the control units 11 and 21 operating according to the program stored in the storage units 12 and 22.

[0103] When the user selects a link on the top page P1, the user terminal 20 accesses the server 10 and displays the top page P1 of the search service on the display unit 25 (S1). Based on the user's operation from the operation unit 24, the user terminal 20 accepts query input for the input form F10 (S2). The user terminal 20 sends the query entered by the user to the server 10 (S3).

[0104] When server 10 receives a query from user terminal 20 (S4), it obtains multiple tokens included in the query (S5). Based on the multiple tokens, server 10 performs matching using dictionary data D (S6). In S6, server 10 performs matching using each of the first dictionary data D1 to the third dictionary data D3 based on the multiple tokens, following the flow described with reference to Figure 4.

[0105] Server 10 formats the first token based on the matching results in S6 (S7). Server 10 determines whether all of the multiple tokens match the dictionary data D (S8). If it is determined that all of the multiple tokens match the dictionary data D (S8; Y), the subsequent processes S9-S12 are not executed, and the process in S13 is executed. In other words, since the second token does not exist in the query, the search process is executed based on the formatted first token.

[0106] On the other hand, if not all of the multiple tokens are determined to match the dictionary data D (S8;N), the server 10 calculates character features based on the first learning model M1 (S9). In S9, the server 10 calculates the first character feature and the second character feature. The server 10 calculates the first token feature based on the second learning model M2 (S10). The server 10 calculates the average of the first character feature of the first character and the first token feature (S11). The server 10 reshapes the second token based on the average in S11 and the second character feature of the second character (S12).

[0107] Server 10 obtains a formatted query based on the processing result of at least one of S7 and S12 and executes a search process on the target database DB (S13). Server 10 sends the search results from S13 to the user terminal 20 (S14). When the user terminal 20 receives the search result data from Server 10, it displays the search results on the display unit 25 (S15), and this process ends.

[0108] According to the query formatting system S of this embodiment, matching is performed using dictionary data D based on multiple tokens included in the query. The query formatting system S formatts the second token that did not match the dictionary data D based on the first token that matched the dictionary data D and the learning model M. This improves the accuracy of query formatting because the second token can be accurately formatted using the matching results with a machine learning method. For example, when a user enters a query by copy and paste, the query tends to contain spaces throughout. In this case, if the first token is "Merge", the second token may also be "Merge". Alternatively, when a conscientious user manually enters a query, the tokens included in the query may all be correct. In this case, if the first token is "Single", the second token may also be "Single". Therefore, by using a machine learning method that takes the matching results into consideration, the learning model M can take into account that the second token may have a similar tendency to the first token, thus improving the accuracy of query formatting.

[0109] Furthermore, the query formatting system S format the second token based on the formatted first token and the learning model M. This allows for the formatting of both the first and second tokens, thus improving the accuracy of query formatting. Moreover, by utilizing the formatted first token, more accurate information can be considered by the learning model M, further improving the accuracy of query formatting.

[0110] Furthermore, if only a portion of the multiple first tokens are formatted, the query formatting system S formats the second token based on the formatted first tokens, the unformatted first tokens, and the learning model M. This allows the learning model M to consider information from first tokens that do not need to be formatted, thereby improving the accuracy of query formatting.

[0111] Furthermore, the query formatting system S calculates a second-character feature for each second character contained in the second token, based on the learning model M, and formats the second token based on the first-character feature, the first token feature, and the second-character feature. This allows the second token to be formatted at a finer character level, thus improving the accuracy of query formatting. The features used in query formatting can also be calculated at a finer character level, allowing query formatting to be performed with more detailed consideration of the relationships between characters, further improving the accuracy of query formatting.

[0112] Furthermore, the query formatting system S obtains the first token features calculated by the second learning model M2. This allows the use of a dedicated second learning model M2 for calculating the first token features, resulting in the calculation of more accurate first token features and improved query formatting accuracy. Since the roles of the first learning model M1 and the second learning model M2 can be divided, query formatting can be accelerated. For example, when using query formatting in real-time search processing as in this embodiment, the time required to present search results can be reduced by executing the processing of the first learning model M1 and the second learning model M2 in parallel.

[0113] Furthermore, the query formatting system S format the second token based on the average of the first character feature and the first token feature, and the second character feature. This allows the learning model M to consider the information obtained through matching using the first token feature, thereby improving the accuracy of query formatting. In addition, the process of calculating the average itself is computationally intensive, which reduces the processing load on the server 10. By employing computationally intensive processing, query formatting can be accelerated.

[0114] Furthermore, the query formatting system S format the second token based on the first character feature, the first token feature, and the second character feature, rather than on the second token feature concerning the characteristics of the second token itself. This allows the learning model M to consider the information obtained through matching while avoiding inappropriate embedding representations. For example, in a character-level sequence labeling task, if word embedding representations were considered for all characters, words with unclear labels might also be considered. In this regard, the query formatting system S improves the accuracy of query formatting by deliberately not allowing the learning model M to consider the second token feature for second tokens with the unclear label "Uncertain".

[0115] Furthermore, the query formatting system S formats the second token based on the first token and the learning model M, and the results of labeling performed for each second character contained in the second token. This allows the second token to be formatted at a finer character level, thus improving the accuracy of query formatting.

[0116] Furthermore, the first token is a token that matches at least one of the multiple dictionary data D, while the second token is a token that does not match any of the multiple dictionary data D. This allows for matching that comprehensively considers multiple dictionary data D, thereby increasing the accuracy of the matching. As a result, the information obtained from highly accurate matching can be incorporated into the learning model M, further improving the accuracy of query formatting.

[0117] Furthermore, the query formatting system S does not format the second token if it determines that all of the multiple tokens match the dictionary data D, but formats the second token if it determines that only some of the multiple tokens match the dictionary data D. This allows the machine learning method to be skipped when query formatting can be completed by matching alone, eliminating the need to perform unnecessary processing and reducing the processing load on the server 10. As a result, query formatting can be sped up.

[0118] Furthermore, the query formatting system S selects one of several operations based on the first token and the learning model M, and formats the second token based on the selected operation. This allows query formatting to be performed using multiple operations, thus improving the accuracy of query formatting. For example, query formatting can be performed not only by splitting tokens, but also by using various operations such as splitting, joining, and segmenting.

[0119] Furthermore, the query formatting system S formats the second token based on the splitting necessity information output from the learning model M. This allows for a decision on whether or not to actually split the token, thus improving the accuracy of query formatting. For example, even if token splitting is difficult using matching methods, it becomes possible to split the token using the learning model M.

[0120] Furthermore, the query formatting system S formats the second token, which indicates that the splitting necessity information should be split, by splitting it using the dictionary data D. This allows the system to determine whether or not to actually split the data using the dictionary data D, thus improving the accuracy of query formatting.

[0121] Furthermore, the query formatting system S presents the user with the results of the search process executed based on the formatted second token. This improves the accuracy of the search process because it allows the search process to be performed based on the formatted second token.

[0122] [5. Variant] This disclosure is not limited to the embodiments described above. It may be modified as appropriate without departing from the spirit of this disclosure.

[0123] Figure 7 is a functional block diagram of a modified example. It includes a first score acquisition unit 109, a second score acquisition unit 110, and a genre identification unit 111. These are primarily implemented by the control unit 11.

[0124] [5-1. Variation 1] For example, in the embodiment, a case was described in which a simple average of the first character feature and the first token feature is calculated, but a weighted average of these may also be calculated. In the weighted average, a weighting coefficient is set for at least one of the first character feature and the first token feature. In Modification 1, a case is described in which a weighting coefficient is set only for the first token feature, but a weighting coefficient may also be set only for the first character feature, or weighting coefficients may be set for both of them.

[0125] In Modification 1, the second token formatting unit 105 determines a weighting coefficient for the average based on the matching results and calculates the average based on the weighting coefficient. The matching results represent the matching accuracy. For example, in the case of matching using multiple dictionary data D, the number of dictionary data D entries that the first token matches corresponds to the matching results. For example, in the case of matching that allows partial matching, the number of characters that the first token matches corresponds to the matching results.

[0126] The second token formatting unit 105 determines the weighting coefficients such that the higher the matching accuracy, the more weighting is given to the first token feature. In the modified example 1, since weighting coefficients are set only for the first token feature, the second token formatting unit 105 determines the weighting coefficients such that the higher the matching accuracy, the higher the weighting coefficient of the first token feature. If weighting coefficients are also set for the first character feature, the second token formatting unit 105 should determine the weighting coefficients such that the higher the matching accuracy, the lower the weighting coefficient of the first character feature. This differs from the average in the embodiment in that weighting coefficients are considered, but in other respects, it is the same as the embodiment.

[0127] According to Modification 1, the average of the first character feature and the first token feature is calculated based on weighting coefficients corresponding to the matching results. This allows the learning model M to more effectively consider the matching results, thereby improving the accuracy of query formatting.

[0128] [5-2. Variation 2] For example, the attribute of the first character contained in the first token can also be obtained from the learning model M. In this case, the formatting result of the first token in the matching method and the formatting result of the first token in the learning model M may differ. In this embodiment, the formatting result in the matching method is assumed to be correct, but if the score of the formatting result in the learning model M is high, the formatting result in the learning model M may be assumed to be correct. The query formatting system S of the modified example 2 includes a first score acquisition unit 109 and a second score acquisition unit 110.

[0129] The first score acquisition unit 109 acquires a first score for the first token based on the matching results. The first score is the matching accuracy described in Modification 1. For example, the first score is the number of dictionary data D that match the first token out of a plurality of dictionary data D. For example, the first score is the number of characters that matched the first token. If matching is employed using dictionary data D and some learning model that references said dictionary data, the first score may be the score calculated by said learning model.

[0130] The second score acquisition unit 110 acquires a second score for the first token based on the processing results of the learning model M. The second score is a score calculated by the learning model M. For example, when the learning model M performs labeling of individual characters, it calculates a second score that indicates the accuracy of the label. This second score is sometimes called probability. The method for calculating the score itself can be any method used in well-known machine learning.

[0131] The first token formatting unit 104 selects either the matching execution result or the learning model M processing result based on the first score and the second score, and formats the first token based on the selected method. For example, if the first score is higher than the second score, the first token formatting unit 104 formats the first token based on the matching execution result. If the second score is higher than the first score, the first token formatting unit 104 formats the first token based on the learning model M processing result. The method for formatting the first token based on the learning model M processing result is the same as for the second token; the first token should be formatted based on the attributes "B", "I", "O", "E", and "S".

[0132] According to Modification 2, the first token is formatted based on the first score, which corresponds to the matching execution result, and the second score, which corresponds to the processing result of the learning model M, whichever is selected. This allows the first token to be formatted with greater precision, thus improving the accuracy of query formatting.

[0133] [5-3. Modified Example 3] For example, in the embodiment, the case in which an English query is entered in a website search service was used as an example. The query formatting system S is applicable to queries in any language in any service, and the service and language are not limited to the examples in the embodiment. In the third modified example, the case in which a Japanese query is entered in an online shopping service is used as an example.

[0134] The query in Variation 3 is entered when searching for products on an online shopping service. The user enters any query to search for desired products. The user can also specify various attributes as part of the query, such as genre, availability, color, size, origin, or manufacturer. The query is entered when searching for products on an online shopping service.

[0135] The searchable database DB in Modification Example 3 contains information about products sold in an online shopping mall. For example, the searchable database DB stores information such as a store ID that can identify the store selling the product, a product ID that can identify individual products, an index containing keywords extracted for product searching, attributes such as the product title and product genre, a detailed product description, a product image, and the product price. The product title is a string that provides a brief description of the product. The product title may also be a list of words. The product title and detailed product description are entered by the store staff.

[0136] For example, dictionary data D may be created based on tokens included in queries frequently entered in online shopping malls, or on product titles on product pages in online shopping malls. The words in dictionary data D may be the product titles themselves, or they may be nouns included in the product titles. A known method such as morphological analysis can be used to extract nouns from product titles. Modification example 3 describes a case where dictionary data D is created for each product genre based on the product titles of products in that product genre, but dictionary data D may also be created regardless of the product genre.

[0137] The query formatting system S of Modification 3 further includes a genre identification unit 111 that identifies the product genre corresponding to the query. A product genre is information used to classify products. A product genre is sometimes called a product category. A product genre is one of the attributes of a product. A product genre corresponding to a query is a product genre associated with the query. For example, if a query includes a product genre, the product genre included in the query is the product genre corresponding to the query. If a product genre is attached to a query, the product genre attached to the query is the product genre corresponding to the query.

[0138] In variation 3, the user specifies the product genre. For example, the user terminal 20 sends the product genre specified by the user along with a query to the server 10. The server 10 receives the product genre and query from the user terminal 20. The genre identification unit 111 identifies the product genre by obtaining the product genre received from the user terminal 20. Since the user may not specify a product genre, in this case, the processing of the genre identification unit 111 is omitted.

[0139] The method for identifying a product genre is not limited to the examples above. The genre identification unit 111 may identify a product genre based on tokens included in the query. In this case, the data storage unit 100 is assumed to have defined relationships between strings that may be included in a token and product genres. For example, if the product genre is "electrical appliances," strings such as the manufacturer name and product name are associated with it. For example, if the product genre is "clothing," strings such as the brand name and size are associated with it. If the query contains a string defined in the above relationships, the genre identification unit 111 identifies the product genre corresponding to the query by obtaining the product genre associated with that string.

[0140] The matching execution unit 102 performs matching based on the product genre. For each product genre, a dictionary data D is prepared based on the product titles of products belonging to that product genre. The matching execution unit 102 performs matching based on the dictionary data D corresponding to the product genre. The matching execution unit 102 uses the product titles from the online shopping service as dictionary data D to perform matching.

[0141] According to variation 3, matching is performed based on the product genre corresponding to the query. This eliminates the need to create dictionary data D by reusing product titles. Furthermore, it improves search accuracy in online services.

[0142] Furthermore, queries are entered when searching the online shopping service, and the matching execution unit 102 uses the product titles from the online shopping service as dictionary data D to perform matching. This allows for appropriate query formatting using product genres, effectively improving the accuracy of query formatting. For example, when using dictionary data D corresponding to product genres in matching, the number of words to be compared in matching can be reduced, thereby reducing the processing load on the server 10. Processing can be sped up by avoiding unnecessary matching.

[0143] [5-4. Other variations] For example, the above variations may be combined.

[0144] For example, the query formatting system S can be used for any service other than search services and online shopping services. For instance, the query formatting system S may be used for searching other services such as travel booking services, electronic payment services, financial services, communication services, or content distribution services. Alternatively, for example, the query formatting system S may be used when a database is searched within a single device.

[0145] For example, the method for making the learning model M consider the results of the matching is not limited to the example described in the embodiment. For example, the learning model M may calculate the average of the second character feature and the second token feature, but in this case, the weighting coefficient of the second token feature may be smaller than the weighting coefficient of the first token feature. In this way, the first token can be given more weight compared to a general CharacterBERT. Alternatively, for example, the first character and the label of the operation assigned to the first token may be made into features in some way without using the first token feature. In this case, since the results of the matching are reflected in these features, the learning model M can be made to consider the results of the matching by performing a reshaping of the second token based on these features.

[0146] For example, the functions described as being implemented on server 10 may be implemented on user terminal 20 or other computers, or they may be shared among multiple computers. For example, the data that is to be stored in data storage unit 100 may be stored on a database server. [Explanation of Symbols]

[0147] S Query formatting system, N Network, 10 Server, 11,21 Control unit, 12,22 Storage unit, 13,23 Communication unit, 20 User terminal, 24 Operation unit, 25 Display unit, DB Database to be searched, P1 Top page, 100 Data storage unit, 101 Token acquisition unit, 102 Matching execution unit, 103 Judgment unit, 104 First token formatting unit, 105 Second token formatting unit, 106 Formatted query acquisition unit, 107 Search unit, 108 Presentation unit, 109 First score acquisition unit, 110 Second score acquisition unit, 111 Genre identification unit.

Claims

1. a token acquisition unit that acquires multiple tokens included in a query; a matching execution unit that executes matching using dictionary data based on the plurality of tokens; a second token shaping unit that performs morphological analysis on a first token among the plurality of tokens that matches the dictionary data and a second token among the plurality of tokens that does not match the dictionary data, calculates a first morpheme feature related to a feature of a first morpheme included in the first token and a second morpheme feature related to a feature of a second morpheme included in the second token based on a learning model related to query shaping, calculates an average of the first morpheme feature and the feature of the first token, performs labeling of the second morpheme based on the calculated average and the second morpheme feature, and shapes the second token based on an attribute assigned to the second morpheme; A query reformulation system including:

2. A token acquisition step of acquiring multiple tokens included in a query; a matching execution step of executing matching using dictionary data based on the plurality of tokens; a second token shaping step of performing morphological analysis on a first token among the plurality of tokens that matches the dictionary data and a second token among the plurality of tokens that does not match the dictionary data, calculating a first morpheme feature related to a feature of a first morpheme included in the first token and a second morpheme feature related to a feature of a second morpheme included in the second token based on a learning model for query shaping, calculating an average of the first morpheme feature and the feature of the first token, labeling the second morpheme based on the calculated average and the second morpheme feature, and shaping the second token based on the attribute assigned to the second morpheme; Query reformulation methods, including:

3. A token acquisition unit that acquires multiple tokens included in a query; a matching execution unit that executes matching using dictionary data based on the plurality of tokens; a second token shaping unit that performs morphological analysis on a first token among the plurality of tokens that matches the dictionary data and a second token among the plurality of tokens that does not match the dictionary data, calculates a first morpheme feature related to a feature of a first morpheme included in the first token and a second morpheme feature related to a feature of a second morpheme included in the second token based on a learning model related to query shaping, calculates an average of the first morpheme feature and the feature of the first token, performs labeling of the second morpheme based on the calculated average and the second morpheme feature, and shapes the second token based on an attribute assigned to the second morpheme; A program that allows a computer to function as a