Information processing apparatus, information processing method, and information processing program
The information processing device generates character strings and matrices to determine document relevance, addressing the time-consuming preparation issues in conventional systems by enabling faster and more efficient search processing.
Patent Information
- Application Number
- JP2023031419
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2024-09-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Conventional dialogue systems and search methods require significant time for advance preparation of matching sentences and transposed indexes, which are cumbersome and time-consuming processes.
An information processing device that generates character strings without duplicates, creates matrices indicating character inclusion, and calculates input and output vectors to determine document relevance, thereby reducing the time needed for search preparation.
This approach significantly shortens the time required for search preparation by eliminating the need for heavy-load processing like generating inverted indexes and allows for parallel processing, thus speeding up the search process.
Smart Images

Figure 2024123763000001
Abstract
Description
[Technical field]
[0001] The present invention relates to an information processing device, an information processing method, and an information processing program. [Background technology]
[0002] Conventionally, dialogue systems have been proposed that conduct dialogue by inputting text based on user utterances, operations, etc. AIML (Artificial Intelligence Markup Language), which describes rules for automatic responses to input text, is known as a language used in dialogue systems.
[0003] Patent document 1 describes a sentence matching system that includes an input unit for inputting a sentence, and a matching judgment unit for judging a match between the sentence input by the input unit and a preset matching sentence, the matching sentence being divided into a plurality of units of character strings, at least one of which includes a plurality of candidates which are further divided into a plurality of units of character strings, and the matching judgment unit judges matching by treating the sentence input by the input unit as being divided into a plurality of units of character strings.
[0004] Conventionally, a search method has been known in which an inverted index is created in advance for all documents to be searched, and a document search is performed using a search term and the inverted index.
[0005] Patent Document 2 describes an information processing device in which an extraction means of the information processing device extracts features of a selected document from an inverted index that associates documents with their features, a search means searches for documents having any of the features extracted by the extraction means using the inverted index, a selection means selects a feature that is highly effective in narrowing down the search results from among features corresponding to multiple search results by the search means, and a presentation means presents the combination of features selected by the selection means as search conditions. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] JP 2019-192195 A [Patent Document 2] JP 2016-091354 A Summary of the Invention [Problem to be solved by the invention]
[0007] However, in the technology described in Patent Document 1, matching sentences for matching with input sentences must be prepared in advance. In conventional AIML, in order to perform an appropriate automatic response to input sentences, it was necessary to prepare a large number of matching sentences that only differed in parts, and it took a lot of time to create matching sentences as advance preparation for search.
[0008] Furthermore, in the technology described in Patent Document 2, it is necessary to record the inverted index in advance, and it takes time to create the inverted index as a preparation for a search.
[0009] The present invention has been made in consideration of the above circumstances, and has as its object to reduce the time required for advance preparation for a search. [Means for solving the problem]
[0010] As one embodiment for solving the above problem, an information processing device is an information processing device that searches for a plurality of search target documents stored in a database based on keywords to be searched, and includes: a string generation unit that scans characters contained in a document to generate a string in which characters that appear do not overlap; a matrix generation unit that generates a matrix in which, for each sentence, a numeric string indicating whether or not a character contained in a sentence in the document is included in the string generated by the string generation unit is arranged; a keyword acquisition unit that acquires a keyword; an input vector generation unit that generates an input vector having the size of the string, the elements of which are positive values when a character contained in a keyword acquired by the keyword acquisition unit is included in the string generated by the string generation unit; an output vector generation unit that generates an output vector by calculating the product of the input vector generated by the input vector generation unit and the matrix generated by the matrix generation unit; and a determination unit that determines the number of positive values of the elements of the output vector generated by the output vector generation unit. Effect of the Invention
[0011] According to one embodiment of the present invention, an information processing device scans characters contained in a document to generate a string in which no overlapping characters appear, generates a matrix in which, for each sentence, a numeric string indicating whether or not a character contained in a sentence in the document is included in the generated string, acquires keywords, generates an input vector having the size of the string, whose elements are positive when a character contained in the acquired keyword is included in the generated string, calculates the product of the generated input vector and the generated matrix to generate an output vector, and determines the number of positive values of the elements of the generated output vector, thereby reducing the time required for advance preparation for a search. [Brief description of the drawings]
[0012] [Figure 1] FIG. 1 is a diagram illustrating an example of an outline of a process in an information processing method according to an embodiment. [Diagram 2] FIG. 11 illustrates an example of a pre-search process according to a first processing method in the information processing apparatus of the embodiment. [Diagram 3]FIG. 4 illustrates an example of a search process according to a first processing method in the information processing apparatus of the embodiment. [Figure 4] FIG. 11 illustrates an example of a pre-search process according to a second processing method in the information processing apparatus of the embodiment. [Diagram 5] 11A to 11C are diagrams illustrating an example of a search process according to a second processing method in the information processing apparatus of the embodiment. [Figure 6] FIG. 2 is a block diagram showing an example of a software configuration of the information processing apparatus according to the embodiment. [Figure 7] 1 is a block diagram showing an example of a hardware configuration of an information processing apparatus according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] An information processing apparatus, an information processing method, and an information processing program according to an embodiment of the present invention will be described in detail below with reference to the drawings.
[0014] First, an overview of an information processing method will be described with reference to Fig. 1. Fig. 1 is a diagram showing an example of an overview of processing in the information processing method according to an embodiment.
[0015] 1, the information processing method includes a search pre-processing S1 and a search process S2. The search pre-processing S1 is a process that is performed before the search process S2 is performed. The information processing method in this embodiment can shorten the time required for advance preparation of a search by speeding up the search pre-processing S1.
[0016] The search process S2 in this embodiment is a process of searching for a plurality of documents to be searched stored in a database based on a keyword to be searched. The keyword to be searched is a keyword input by a user who executes a search using the information processing method of the embodiment. A keyword is a character string consisting of one or more characters. A keyword can include a plurality of types of characters. Examples of types of characters include hiragana, kanji, English letters, numbers, punctuation marks, symbols, pictograms, etc.
[0017] The search process S2 is performed on a plurality of documents stored in a database as search targets. A document is made up of one or more sentences. A sentence is made up of one or more characters. In this embodiment, a sentence is, for example, a character string delimited by a period, a punctuation mark, or a space.
[0018] The search pre-processing S1 includes a character string generation process S11, a serial number assignment process S12, a matrix generation process S13, and a matrix storage process S14.
[0019] The character string generation process S11 is a process for scanning characters contained in a document to be searched and generating a character string in which characters that appear do not overlap. Here, a first processing method of the character string generation process S11 will be described with reference to Fig. 2 and Fig. 3. Fig. 2 is a diagram showing an example of pre-search processing S11 by the first processing method in the information processing device of the embodiment. Fig. 3 is a diagram showing an example of search processing by the first processing method in the information processing device of the embodiment.
[0020] In FIG. 2, the character string generation process S11 includes a leading character extraction process S111 and a leading character string generation process S112. The leading character extraction process S111 scans characters from the beginning of a document and extracts the first character that appears in the document. FIG. 2 shows a case where a document to be searched has three sentences: "Today is a sunny and pleasant day. Yesterday was cloudy all day and very cold. Tomorrow is forecast to rain, so I'm worried." Note that "Today is a sunny and pleasant day." is the first sentence. "Yesterday was cloudy all day and very cold." is the second sentence. Also, "Tomorrow is forecast to rain, so I'm worried." is the third sentence. The character extracted as the first character that appears in the document in the leading character extraction process S111 is shown by filling in. The character extracted in the leading character extraction process S111 is "Today is sunny and pleasant. Yesterday was cloudy all day and very cold, so I'm worried about the light rain forecast."
[0021] The head character string generation process S112 generates a character string for each type of character from the characters extracted in the head character extraction process S111. Fig. 2 illustrates an example in which there are three types of characters: hiragana, punctuation marks, and kanji. In the head character string generation process S112, the characters extracted in the head character extraction process S111, "Today is sunny and pleasant. Yesterday it was completely cloudy and cold, but the forecast is forecasting light rain and worries", are converted into a character string in the order of hiragana, punctuation marks, and kanji, to generate a character string of "It's sunny and pleasant today. Yesterday it was completely cloudy and cold, but the forecast is forecasting light rain and worries".
[0022] In the character string generation process S11, as a process for scanning characters contained in a document to be searched and generating a character string in which characters that appear are not duplicated, a process for scanning from the beginning of the document and generating a character string for each character type from the first character that appears (leading character extraction process S111 and leading character string generation process S112) has been exemplified. However, the character string generated in the character string generation process S11 is not limited to the above embodiment as long as the characters do not overlap. For example, the character string generation process S11 may generate a character string in which the characters are arranged regardless of the order in which they appear.
[0023] Furthermore, the character string generation process S11 may generate a character string arranged regardless of the type of characters.
[0024] Furthermore, the character string generation process S11 may generate (select) a predetermined fixed character string (hereinafter referred to as a "fixed character string"). Any character string may be used in the fixed character string as long as each character does not overlap. For example, the fixed character string may be a character string unrelated to the document to be searched. In this case, the characters of the fixed character string may not be included in the document to be searched, and even if it is determined to be a hit in the determination process described below, there is a high possibility that it will be determined to be rejected when the original text is searched again. However, by using a fixed character string, it is not necessary to perform the character string generation process S11 again even if the document to be searched is changed or added, and the processing can be speeded up.
[0025] Returning to Fig. 1, the search pre-processing S1 executes a character string generation process S11, followed by a serial number assignment process S12. The serial number assignment process S12 is a process for assigning a serial number to each of the characters contained in the document to be searched. An example of the serial number assignment process S12 will be described with reference to Fig. 2.
[0026] In FIG. 2, the sequential numbering process S12 includes a first sequential numbering process S121. In the first sequential numbering process S121, a document to be searched is broken down into sentences, and a sequential number is assigned to each sentence. For example, the first sentence, "It's sunny and pleasant today," is composed of 18 characters, and is assigned sequential numbers 1 to 18. Similarly, the second sentence, "It was cloudy all day yesterday, and very cold," is assigned sequential numbers 1 to 19. Moreover, the third sentence, "It's forecast to rain tomorrow, so I'm worried," is assigned sequential numbers 1 to 16.
[0027] Returning to Fig. 1, the search pre-processing S1 executes the sequential numbering process S12, and then executes the matrix generation process S13. The matrix generation process S13 is a process for generating a matrix in which, for each sentence, a number string indicating whether or not a character contained in a sentence of a document is contained in a string generated in the string generation process S11 is arranged. An example of the matrix generation process S13 will be described with reference to Fig. 2.
[0028] In Fig. 2, the matrix generation process S13 includes a first matrix generation process S131. The first matrix generation process S131 is a process for generating a matrix (hereinafter referred to as a "first matrix") in which a number string indicating whether or not a character included in a sentence of a document is a positive value included in the string generated in the head string generation process S112 is arranged for each sentence. The number string indicating whether or not a character is included in the generated string is an arrangement of numbers indicating whether or not a character is a positive value included in the generated string or a negative value not included in the string. Fig. 2 shows a case in which the number string is a number string using the consecutive numbers assigned in the first consecutive number assignment process S121 (hereinafter referred to as a "first number string").
[0029] For example, the first sentence, "Today is a sunny and pleasant day.", is assigned a sequential number from 1 to 18 in the first sequential number assignment process S121, as described above. The first character "ha" in the string "HareteichidesuSuritomottanana.,Today it's sunny and pleasant,Yesterday it's all cloudy and cold, but the forecast is worrying" generated in the first string generation process S112 is included in the third position of the first sentence, so the number "3" is assigned to "ha". Similarly, the second character "re" is included in the fifth position of the first sentence, so the number "5" is assigned to "re", and the third character "te" is assigned the number "6". On the other hand, the ninth character "ri" is not included in the first sentence, so the number "0" is assigned to "ri", indicating that it is not included in the string. When this process is performed for all the character strings generated in the head character string generation process S112, a first numeric string consisting of 31 numbers, "3, 5, 6, 7, 11, 12, 16, 17, 0, 0, 0, 0, 0, 0, 0, 18, 1, 2, 4, 9, 10, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0" is generated. By performing the same process on the second and third sentences, a first matrix with 3 rows and 33 columns as shown in the figure can be generated in the first matrix generation process S131.
[0030] 1, in the search pre-processing S1, after executing the matrix generation process S13, the matrix storage process S14 is executed. The matrix storage process S14 is a process for storing the matrix generated in the matrix generation process S13, and the destination for storing the matrix is arbitrary.
[0031] As described above, the search pre-processing S1 does not perform a high-load process such as generating a transposed index by generating a matrix for each sentence of a number string indicating whether the character in the sentence of the document is included in the string generated in the string generation process S11. This makes it possible to reduce the time required for advance preparation for a search.
[0032] The search pre-processing S1 and the search process S2 can be performed synchronously or asynchronously. Since the search pre-processing S1 can be executed in a short time, if it is executed asynchronously with the search process S2, it is possible to shorten the time required for advance preparation of the search. Also, even if the search pre-processing S1 is executed synchronously with the search process S2, the waiting time of the search process S2 can be shortened.
[0033] The search process S2 includes a keyword acquisition process S21, an input vector generation process S22, an output vector generation process S23, and a determination process S24. The keyword acquisition process S21 is a process for acquiring a keyword input by a user. Here, the keyword acquisition process S21 will be described with reference to Fig. 3. Fig. 3 is a diagram showing an example of the search process S21 by the first processing method in the information processing device of the embodiment.
[0034] 3, the keyword acquisition process S21 includes an acquisition process S211. The acquisition process S211 indicates that "good day" is acquired as a keyword.
[0035] Returning to Fig. 1, the search process S2 executes the keyword acquisition process S21, and then executes the input vector generation process S22. The input vector generation process S22 is a process for generating an input vector having the size of the character string, in which elements are positive values when the characters included in the keyword acquired in the keyword acquisition process S21 are included in the character string generated in the character string generation process S11. In other words, the input vector has a number of elements according to the size of the character string.
[0036] Each element of the input vector has either a positive or negative value. If an element is a positive value, it indicates that the character included in the keyword is included in the string generated in the string generation process S11. On the other hand, if an element is a negative value, it indicates that the character included in the keyword is not included in the string generated in the string generation process S11.
[0037] In FIG. 3, the input vector generation process S22 includes an input vector generation process S221. The character string generated in the character string generation process S11 is, as described above, 33 characters: "It's sunny, it's sunny today, it's nice yesterday, it's cloudy, it's cold, it's rainy, it's rainy, it's rainy." Therefore, the number of elements of the input vector is 33. The first character "wa" in the character string is not included in the keyword "good day." Therefore, in the input vector generation process S221, the first element of the input vector is set to "0" indicating a negative value. Similarly, the second character "re" and the third character "te" in the character string are not included in "good day," so the second and third elements of the input vector are set to "0." On the other hand, the fourth character "i" in the character string is included in "good day," so the fourth element of the input vector is set to "1" indicating a positive value. Similarly, an input vector having a value of either "1" or "0" for all 33 elements is generated. As a result, in the input vector generation process S221, an input vector of "000100000000000000100010000000000" having 33 elements is generated.
[0038] Returning to Fig. 1, the search process S2 executes an input vector generation process S22, and then executes an output vector generation process S23. The output vector generation process S23 generates an output vector by calculating the product of the input vector generated in the input vector generation process S22 and the matrix generated in the matrix generation process S13. For example, if the matrix is A and the input vector is x, the output vector y is generated as y = Ax.
[0039] 3, the output vector generation process S23 includes an output vector generation process S231. In the output vector generation process S231, a product of an input vector having 33 elements generated in the input vector generation process S221 and a first matrix of 3 rows and 33 columns generated in the matrix generation process 131 is executed. In the output vector generation process S231, three products are executed: a product of the input vector and the first row of the first matrix, a product of the input vector and the second row, and a product of the input vector and the third row. The product of the input vector and the first row is calculated as "00001100000000000000000910000000000000". The product of the input vector and the second row is calculated as "0000000000000000000000000000000". Additionally, the product of the input vector and the third row is calculated as "00000000000000000000000000000000000". The output vector will be a 33-column vector with the above three rows.
[0040] The above three products in the output vector generation process S23 can be processed in parallel, so the processing time can be shortened. For example, if a GPU (Graphics Processing Unit) capable of parallel processing is used in the output vector generation process S231, the three products can be processed in parallel. Therefore, the processing time of the output vector generation process S231 can be shortened to about 1 / 3 compared to the case of performing sequential processing.
[0041] Returning to Fig. 1, the search process S2 executes a determination process S24 after executing an output vector generation process S23. The determination process S24 is a process for determining the number of positive values of the elements of the output vector generated in the output vector generation process S23. The details of the determination process S24 will be described with reference to Fig. 3.
[0042] In FIG. 3, the judgment process S24 includes a first judgment process S241. The first judgment process S241 counts the number of positive values other than "0" in each row of the output vector of 3 rows and 33 columns generated in the output vector generation process S231. The judgment process S241 judges that the document hits the keyword when the number of positive values is 3, which is the number of characters of the keyword, and the order of the true values of the output vector generated in the output vector generation process S231 is the order of the elements in the first matrix generated in the matrix generation process 131. Here, the judgment of a hit is made when the number of positive values is 3, which is the number of characters of the keyword, and the order of the true values of the generated output vector is the order of the elements in the first matrix generated, so even if a hit is judged to be a hit, the keyword may not be included in the original text. For this reason, even if a hit is judged to be a hit in the first judgment process S241, the original text of the hit sentence is searched again by the keyword. If the keyword is not included in the original text as a result of the re-search, it is judged that there is no hit (rejection judgment). That is, a hit in this embodiment is a determination result indicating that the document to be searched is a target for re-search in the original text.
[0043] In the first judgment process S241, the judgment condition is whether or not the order of the true values of the generated output vector is the order of the elements in the generated first matrix. As described above, the order of the true values of this output vector is generated by the sequential number assigned in the sequential number assignment process S121. By using the order of the true values of the output vector as the order of the elements in the generated first matrix as the judgment condition, it is possible to obtain an effect that the possibility of making a rejection judgment before re-searching is increased compared to the case where this is not used as the judgment condition.
[0044] The first row of the output vector, "000011000000000000000091000000000000", has three positive values, "11", "9", and "10" (number of characters in the keyword = 3), and the order of "11" → "9" → "10" is the same as the order of "11" → "9" → "10" in "3567111216170000000018124910130000000000" of the first matrix generated in the matrix generation process 131. Therefore, in the first determination process S241, it can be determined that the document is a hit in the keyword.
[0045] Also, since the positive value of the second line of the output vector, "000000000000000000000000000000000", is 0 (less than 3), it can be determined in the first determination process S241 that the document is not a hit in terms of keywords (rejection determination). Furthermore, since the positive value of the third line of the output vector, "000000000000000000000000000000000", is 0 (less than 3), it can be determined that the document is a rejection in terms of keywords.
[0046] In the first processing method described above, the order of characters (first-appearing characters) in the documents to be searched is recorded in the generated matrix, and the order is also recorded in the output vector calculated by multiplying the matrix and the input vector in the hit document. Therefore, by determining the number of positive values and the order of the characters that became positive values, it is possible to perform a determination that is highly likely not to result in a rejection determination in a re-search.
[0047] In this embodiment, a case where an input vector is generated from a keyword is described. The input vector is composed of vector components indicating the order of the characters of the keyword and scalar components indicating the presence or absence of the characters of the keyword. However, as described above, only the scalar components are used to determine whether a document is a hit. Therefore, the input vector generation process may generate only the scalar components. In this case, the "input vector generation process" can be read as the "input scalar generation process".
[0048] In this embodiment, the output vector is described as the product of a matrix and an input vector. However, as described above, each row of the matrix has a vector component indicating the order of characters. Therefore, instead of a matrix, each row may be a vector, and the output vector may be calculated by multiplying the vector of each row and the input vector.
[0049] Next, a second implementation method of the character string generation process S11 will be described with reference to Fig. 4 and Fig. 5. Fig. 4 is a diagram showing an example of pre-search process S11 by the second processing method in the information processing device of the embodiment. Fig. 5 is a diagram showing an example of search process by the second processing method in the information processing device of the embodiment. The second processing method is a processing method that does not execute the sequential number assignment process S12 executed in the first processing method.
[0050] 4, the character string generation process S11 includes a leading character extraction process S113 and a leading character string generation process S114. The process of the leading character extraction process S113 is similar to the process of the leading character extraction process S111. Moreover, the process of the leading character string generation process S114 is similar to the process of the leading character string generation process S112. Therefore, a description of the leading character extraction process S113 and the leading character string generation process S114 will be omitted.
[0051] In Fig. 4, the second matrix generation process S132 is a process for generating a matrix (hereinafter referred to as the "second matrix") in which a numeric string indicating whether the characters contained in the sentences of the document are positive values included in the string generated in the start character string generation process S114 or negative values not included in the string are arranged for each sentence. Fig. 4 shows a case in which "1" is used if the numeric string is a positive value and "0" is used if the numeric string is a negative value. The second matrix does not include the consecutive numbers included in the first matrix. For this reason, the order of the characters extracted in the start character extraction process S113 is not recorded in the matrix generated in the matrix generation process S132.
[0052] In the matrix generation process S132, the first character "ha" in the character string "Harete ichi de suritomo mottanana. Today it's sunny and pleasant, yesterday it's all cloudy and cold, but the forecast is for light rain and worries" generated in the head character string generation process S114 is assigned the positive number "1" as the first character "ha" is included in the third position of the first sentence. The second character "re" is included in the fifth position of the first sentence, so the positive number "1" is assigned to "re". On the other hand, the ninth character "ri" is not included in the first sentence, so the negative number "0" indicating that it is not included in the character string is assigned to "ri". When this process is performed for all the character strings generated in the head character string generation process S114, a second numeric string consisting of 31 numbers is generated: "1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0." In the second matrix generation process S132, the same process is performed on the second sentence and the third sentence, thereby generating the first matrix of 3 rows and 33 columns as shown in the figure.
[0053] 5, the acquisition process S212 is similar to the acquisition process S211, and the input vector generation process S222 is similar to the input vector generation process S221. Therefore, the description of the acquisition process S212 and the input vector generation process S222 will be omitted.
[0054] In Fig. 5, the output vector generation process S23 includes an output vector generation process S232. In the output vector generation process S232, a first matrix with 3 rows and 33 columns generated in the matrix generation process 132 is multiplied with an input vector having 33 elements generated in the input vector generation process S222. In the output vector generation process S232, three products are executed: a product of the first row of the second matrix and the input vector, a product of the second row and the input vector, and a product of the third row and the input vector. The product of the first row and the input vector is calculated as "0000110000000000000000091000000000000". The product of the second row and the input vector is calculated as "0000000000000000000000000000000". Furthermore, the product of the third row and the input vector is calculated as "00000000000000000000000000000000000." The output vector will be a 3-row, 33-column vector consisting of the above three rows.
[0055] The determination process S24 includes a first determination process S242. The second determination process S242 counts the number of positive values whose elements are "1" in each row of the 3-row, 33-column output vector generated in the output vector generation process S232. If the number of positive values is three, the determination process S242 determines that the document is a hit for the keyword. On the other hand, if the number of positive values is less than three, the determination process S242 determines that the document is not a hit for the keyword (rejection determination).
[0056] In the second processing method, as described above, the order of characters (first-appearing characters) in the documents to be searched is not recorded in the generated matrix, and therefore the order is not recorded in the output vector calculated by multiplying the matrix and the input vector in the hit documents. Therefore, in the second processing method, there is a higher possibility that a re-search will result in a rejection judgment compared to the first processing method. However, in the second processing method, the sequential numbering process executed in the first processing method can be omitted, further reducing the load of the search pre-processing S1.
[0057] The information processing method described above can be executed in an information processing device described below. The software configuration of the information processing device will be described with reference to Fig. 6. Fig. 6 is a block diagram showing an example of the software configuration of the information processing device of the embodiment.
[0058] In FIG. 6, the information processing device 1 is communicably connected to a document database 2 and a user terminal 3 via a network 9. The document database 2 can store a plurality of documents to be searched. The documents stored in the document database are documents having a plurality of sentences, for example, patent documents. The user terminal 3 is a terminal operated by a user who uses the information processing device 1. The user terminal 3 has a search application 31. The search application 31 is an application that searches for documents stored in the document database 2 via the information processing device 1, and causes the information processing device 1 to execute the above-mentioned search process S2. The search application 31 may be an application that is dedicated to the process of the search process 2, or may be a general-purpose application such as a web browser. The network 9 is a wired or wireless network, for example, the Internet.
[0059] 6 shows an example of a connection destination of the information processing device 1, and does not limit the connection destination of the information processing device 1. For example, the information processing device 1 may be connected to a plurality of document databases 2 or a plurality of user terminals 3. Also, while FIG. 6 shows a case where the information processing device 1 and the document database 2 are connected via a network 9, the information processing device 1 and the document database 2 may be configured in an integrated device or system without the network 9.
[0060] The information processing device 1 has a character string generation unit 11, a sequential number assignment unit 12, a matrix generation unit 13, a keyword acquisition unit 14, an input vector generation unit 15, an output vector generation unit 16, a judgment unit 17, and a matrix storage unit 18. The information processing device 1 is a device that executes the information processing method described in Fig. 1 and the like. The character string generation unit 11, the sequential number assignment unit 12, the matrix generation unit 13, the keyword acquisition unit 14, the input vector generation unit 15, the output vector generation unit 16, the judgment unit 17, and the matrix storage unit 18 in the information processing device 1 will be described as functional modules realized by an information processing program (software) for executing information processing in this embodiment.
[0061] The character string generating unit 11 scans characters contained in a plurality of documents to be searched stored in a database from the beginning of the document and generates a character string for each type of character that appears first. The character string generating unit 11 executes the character string generating process S11 described in FIG.
[0062] The serial number assigning unit 12 assigns serial numbers to characters contained in a plurality of documents to be searched stored in a database for each sentence. The serial number assigning unit 12 executes the serial number assignment process S12 described with reference to FIG.
[0063] The matrix generating unit 13 generates a matrix in which, for each sentence in the documents to be searched, numeric strings indicating whether or not characters contained in the sentences in the documents to be searched stored in the database are contained in the strings generated by the string generating unit 11 are arranged. The matrix generating unit 13 executes the matrix generating process S13 described in FIG.
[0064] The keyword acquiring unit 14 acquires keywords to be searched for. The keyword acquiring unit 14 executes the keyword acquiring process S21 described with reference to FIG.
[0065] Input vector generation unit 15 generates an input vector having the size of a character string, with elements being true values when a character included in the keyword acquired by keyword acquisition unit 14 is included in the character string generated by character string generation unit 11. Input vector generation unit 15 executes the input vector generation process S22 described in FIG.
[0066] The output vector generation unit 16 generates an output vector by calculating the product of the input vector generated by the input vector generation unit 15 and the matrix generated by the matrix generation unit 13. The output vector generation unit 16 executes the output vector generation process S23 described in FIG.
[0067] The determination unit 17 determines the number of true values of the elements of the output vector generated by the output vector generation unit 16. The determination unit 17 executes the determination process S24 described with reference to FIG.
[0068] The matrix storage unit 18 stores the matrix generated by the matrix generation unit 13. The matrix storage unit 18 executes the matrix storage S14 described with reference to FIG.
[0069] Note that the above-mentioned functional units of the information processing device 1 are merely examples of the functional units of the information processing device 1, and do not limit the functions of the information processing device 1. For example, the information processing device 1 does not need to have all of the functional units described above, and may have only some of the functional units. The information processing device 1 may also have functions other than those described above. For example, the information processing device 1 may have an input function for inputting information, a display function for displaying information, a notification function for notifying the operating status of the device, etc.
[0070] As described above, each of the functional units of the information processing device 1 is described as being realized by software. However, at least one of the functional units of the information processing device 1 may be realized by hardware.
[0071] Furthermore, any of the above-mentioned functional units possessed by the information processing device 1 may be implemented by dividing one functional unit into multiple functional units. Furthermore, any two or more of the above-mentioned functional units possessed by the information processing device 1 may be implemented by integrating them into one functional unit. The information processing device 1 expresses each function possessed by the information processing device 1 as a respective functional block, and does not limit the physical configuration such as the number of program files. For example, each functional unit may be configured by a separate program file, or multiple functional units may be configured by one program file, or the like.
[0072] The information processing device 1 may be a device realized by one housing, or a system realized by multiple devices connected via a network or the like. For example, the information processing device 1 may be realized by another virtual device, such as a cloud service provided by a cloud computing system, for some or all of its functions. The information processing device 1 may be realized by another device, with at least one or more of the above-mentioned functional units. The information processing device 1 may be a general-purpose computer, such as a desktop PC, or a dedicated device with limited functions.
[0073] Next, a hardware configuration of the information processing device 1 will be described with reference to Fig. 7. Fig. 7 is a block diagram showing an example of a hardware configuration of the information processing device 1 in the embodiment.
[0074] The information processing device 1 includes a CPU (Central Processing Unit) 101, a RAM (Random Access Memory) 102, a ROM (Read Only Memory) 103, an I / O device 104, and a communication I / F (Interface) 105. The information processing device 1 is a device that executes the information processing program described in FIG.
[0075] The CPU 101 controls the information processing device 1 by executing an information processing program stored in the RAM 102 or the ROM 103. The information processing program is acquired, for example, from a recording medium on which the program is recorded or a program distribution server via a network, and installed in the ROM 103, and is read out and executed by the CPU 101.
[0076] The I / O device 104 has an operation input function and a display function (operation display function). The I / O device 104 is, for example, a touch panel. The touch panel enables the user of the information processing device 1 to input operations using a fingertip, a touch pen, or the like. The I / O device 104 in this embodiment can use a touch panel having an operation display function, but the I / O device 104 may have a display device having a display function and an operation input device having an operation input function separately. In that case, the display screen of the touch panel can be implemented as the display screen of the display device, and the operation of the touch panel can be implemented as the operation of the operation input device. The I / O device 104 may be realized in various forms such as a head-mounted type, a glasses type, or a wristwatch type display.
[0077] The communication I / F 105 is an I / F for communication. The communication I / F 105 executes short-distance wireless communication such as wireless LAN, wired LAN, infrared, etc. Although the figure illustrates only the communication I / F 105 as an I / F for communication, the information processing device 1 may have an I / F for each of a plurality of communication methods.
[0078] The above-mentioned various processes of the present embodiment may be performed by recording a program for realizing the functions constituting the device described in the present embodiment in a computer-readable recording medium, and reading and executing the program recorded in the recording medium into a computer system. The "computer system" referred to here may include hardware such as an OS and peripheral devices. In addition, if a WWW system is used, the "computer system" also includes a homepage providing environment (or display environment). In addition, the "computer-readable recording medium" refers to a storage device such as a flexible disk, a magneto-optical disk, a ROM, a writable non-volatile memory such as a flash memory, a portable medium such as a CD-ROM, or a hard disk built into a computer system.
[0079] Furthermore, the term "computer-readable recording medium" includes a memory that holds a program for a certain period of time, such as a volatile memory (e.g., DRAM (Dynamic Random Access Memory)) inside a computer system that becomes a server or a client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. The above-mentioned program may be transmitted from a computer system that stores the program in a storage device or the like to another computer system via a transmission medium, or by a transmission wave in the transmission medium. Here, the "transmission medium" that transmits the program refers to a medium that has a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. The above-mentioned program may also be a program for realizing part of the above-mentioned functions. Furthermore, the above-mentioned function may be realized in combination with a program already recorded in the computer system, that is, a so-called difference file (difference program).
[0080] Although an embodiment of the present invention has been described above with reference to the drawings, the specific configuration is not limited to this embodiment, and various modifications are also included within the scope that does not deviate from the spirit of the present invention. [Explanation of symbols]
[0081] 1. Information processing device 11 String generator 12 Serial numbering section 13 Matrix generator 14 Keyword Acquisition Section 15 Input vector generation unit 16 Output vector generator 17 Judgment section 18 Matrix storage 2 Document Database 3. User terminal 31 Search App 9 Network 101 CPU 102 RAM 103 ROM 104 I / O equipment 105 Communication I / F
Claims
1. An information processing apparatus for searching a plurality of search target documents stored in a database based on a search target keyword, comprising: a character string generating unit that scans characters included in the document and generates a character string in which characters that appear are not duplicated; a matrix generating unit that generates a matrix in which, for each sentence, a numeric string indicating whether or not a character included in a sentence of the document is included in the string generated by the string generating unit is arranged; A keyword acquisition unit that acquires the keyword; an input vector generation unit that generates an input vector having a size of the character string, the input vector having an element that is a true value when a character included in the keyword acquired by the keyword acquisition unit is included in the character string generated by the character string generation unit; an output vector generation unit that generates an output vector by multiplying the input vector generated by the input vector generation unit and the matrix generated by the matrix generation unit; a determination unit that determines the number of true values of the elements of the output vector generated by the output vector generation unit; An information processing device comprising:
2. A serial number assigning unit assigns serial numbers to characters included in the document for each sentence, The information processing apparatus according to claim 1 , wherein the matrix generating unit generates the matrix by arranging the number strings using the consecutive numbers assigned by the consecutive number assigning unit for each sentence.
3. 3. The information processing device according to claim 2, wherein the determination unit determines that the document is a hit for the keyword when the number of the true values is the number of characters of the keyword and the order of the true values is the order of elements in the matrix generated by the matrix generation unit.
4. The information processing apparatus according to claim 1 , wherein the determining unit determines that the entire text of the document is to be searched again for the keyword when the number of the true value is the number of characters of the keyword.
5. The computer An information processing method for searching a plurality of search target documents stored in a database based on a search target keyword, comprising: a character string generating step of scanning characters included in the document to generate a character string in which characters that appear do not overlap; a matrix generating step of generating a matrix in which, for each sentence, a numeric string indicating whether or not a character included in a sentence of the document is included in the character string generated in the character string generating step is arranged; a keyword acquisition step of acquiring the keyword; an input vector generating step of generating an input vector having a size of the character string, the element of which is set to a true value when a character included in the keyword acquired in the keyword acquiring step is included in the character string generated in the character string generating step; an output vector generating step of generating an output vector by multiplying the input vector generated in the input vector generating step and the matrix generated in the matrix generating step; a determination step of determining the number of true values of the elements of the output vector generated in the output vector generation step; An information processing method for performing the above.
6. On the computer, An information processing program for searching a plurality of search target documents stored in a database based on a search target keyword, comprising: a character string generation function that scans characters contained in the document and generates a character string in which characters that appear do not overlap; a matrix generating function for generating a matrix in which, for each sentence, a numeric string indicating whether or not a character included in a sentence of the document is included in the string generated by the string generating function is arranged; A keyword acquisition function for acquiring the keyword; an input vector generation function that generates an input vector having a size of the character string, the element of which is a true value when a character included in the keyword acquired by the keyword acquisition function is included in the character string generated by the character string generation function; an output vector generating function that generates an output vector by multiplying the input vector generated by the input vector generating function and the matrix generated by the matrix generating function; a determination function for determining the number of true values of the elements of the output vector generated in the output vector generation function; An information processing program that realizes this.
Citation Information
Patent Citations
Information processing device and information processing program
JP2016091354A
Sentence matching system
JP2019192195A
