Recommendation result determination method and device

Through the dual-stage inverted index matching strategy and length penalty mechanism, the inaccuracy of recommendation results caused by voice input is solved, efficient and accurate determination of recommendation results is achieved, and user experience is improved.

CN119271908APending Publication Date: 2025-01-07CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411327278.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Due to recognition errors and accent differences, the accuracy of recommended results is poor, and the prior art is difficult to effectively solve.

Method used

The two-stage inverted index matching strategy is adopted. In the first stage, the alternative interest points are quickly filtered out from a large number of interest points through inverted indexes. In the second stage, the second stage is to generate subtext and construct a new inverted index for detailed matching, combined with length punishment The final matching result of the mechanism optimization.

Benefits of technology

It significantly improves the accuracy and efficiency of the recommended results, takes into account rapid screening and meticulous matching, and can effectively correct errors in voice input and improve user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271908A_ABST
    Figure CN119271908A_ABST
Patent Text Reader

Abstract

The invention discloses a recommendation result determination method and device, and relates to the technical field of natural language processing. A specific embodiment of the method comprises the following steps: determining a query text corresponding to a query request, and generating a target counting record corresponding to the query text; determining a first matching value of the query text and each point of interest according to the first inverted index corresponding to the plurality of points of interest and the target counting record; according to the first matching value corresponding to each interest point, determining at least one alternative interest point corresponding to the query text from the plurality of interest points; generating a plurality of sub-texts corresponding to each alternative interest point, and constructing a second inverted index corresponding to the plurality of sub-texts; determining a second matching value of the query text and each sub-text according to the second inverted index and the target counting record; and according to the second matching value corresponding to each sub-text, determining a recommendation result corresponding to the query text from the plurality of sub-texts. According to the embodiment, the accuracy of recommendation results can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a method and device for determining a recommendation result. Background Art

[0002] In daily life, people often need to search for specific points of interest, such as restaurants, banks, supermarkets, commodities, desired help, related instructions, etc. With the popularization of mobile Internet and smart devices, more and more users input query content through voice. However, voice input often leads to poor accuracy of recommendation results due to factors such as recognition errors and accent differences. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a method and device for determining a recommendation result, which can improve the accuracy of the recommendation result.

[0004] In a first aspect, an embodiment of the present invention provides a method for determining a recommendation result, comprising:

[0005] Determine a query text corresponding to the query request, and generate a target count record corresponding to the query text;

[0006] Determining a first matching value between the query text and each of the interest points according to the first inverted indexes corresponding to the plurality of interest points and the target count record;

[0007] Determining at least one candidate interest point corresponding to the query text from the plurality of interest points according to the first matching value corresponding to each of the interest points;

[0008] Generate a plurality of subtexts corresponding to each of the candidate interest points, and construct a second inverted index corresponding to the plurality of subtexts;

[0009] Determine a second matching value between the query text and each of the subtexts according to the second inverted index and the target count record;

[0010] According to the second matching value corresponding to each of the sub-texts, a recommendation result corresponding to the query text is determined from the multiple sub-texts.

[0011] Optionally, before determining the query text corresponding to the query request, the method further includes:

[0012] Get multiple points of interest;

[0013] For each of the interest points: preprocessing the interest point; constructing a first counting record corresponding to the preprocessed interest point; wherein the first counting record includes: a keyword and its frequency in the interest point;

[0014] According to the first counting records corresponding to the multiple interest points, a first inverted index corresponding to the multiple interest points is constructed; wherein the first inverted index includes multiple first index records, and the first index record includes: keywords, interest points where the keywords appear, and the word frequency of the keywords in the interest points.

[0015] Optionally, the type of the keyword is: fuzzy pinyin;

[0016] The constructing of the first count record corresponding to the preprocessed point of interest includes:

[0017] Determine a plurality of Chinese characters in the preprocessed points of interest, and determine a pinyin representation corresponding to each of the Chinese characters;

[0018] Combining the pinyin representations corresponding to the Chinese characters to generate a pinyin representation sequence;

[0019] For each pinyin representation in the pinyin representation sequence: in response to the pinyin representation meeting the fuzzy processing condition, performing fuzzy processing on the pinyin representation;

[0020] The pinyin representations and the number of times they appear in the pinyin representation sequence are combined to generate a first counting record corresponding to the interest point.

[0021] Optionally, the type of the keyword is: word;

[0022] The constructing of the first count record corresponding to the preprocessed point of interest includes:

[0023] determining a plurality of words in the preprocessed points of interest;

[0024] The words and the number of times they appear in the preprocessed interest point are combined to generate a first counting record corresponding to the interest point.

[0025] Optionally, the type of the keyword is: an initial letter string;

[0026] The constructing of the first count record corresponding to the preprocessed point of interest includes:

[0027] Determine a plurality of words in the preprocessed points of interest, and determine the first letter corresponding to each of the words;

[0028] Combining the first letters of the words to generate a string of first letters;

[0029] The initial character string and the preset weight are combined to generate a first counting record corresponding to the interest point.

[0030] Optionally, determining a first matching value between the query text and each of the interest points according to the first inverted index corresponding to the plurality of interest points and the target count record includes:

[0031] Determining at least one target word and a second word frequency of each target word in the query text from the target count record;

[0032] For each of the target words: determining whether the interest point includes the target word according to the first inverted index; in response to the interest point including the target word, determining a first word frequency of the target word in the interest point according to the first inverted index; determining a first matching value of the target word according to the type of the target word, the first word frequency corresponding to the target word, and the second word frequency corresponding to the target word;

[0033] According to the first matching value of each of the target words, a first matching value between the query text and the point of interest is determined.

[0034] Optionally, generating a plurality of subtexts corresponding to each of the candidate interest points includes:

[0035] Performing word segmentation processing on the candidate interest points to obtain multiple word segments;

[0036] At least one of the word segments is combined to generate a plurality of subtexts corresponding to the candidate interest points.

[0037] Optionally, constructing a second inverted index corresponding to the plurality of subtexts includes:

[0038] Constructing a second counting record corresponding to each of the sub-texts; wherein the second counting record includes: a keyword and its frequency in the sub-text;

[0039] According to the second counting record corresponding to each of the sub-texts, a second inverted index corresponding to the plurality of the sub-texts is constructed; wherein the second inverted index includes a plurality of second index records, and the second index record includes: a keyword, a sub-text in which the keyword appears, and a word frequency of the keyword in the sub-text.

[0040] Optionally, determining the second matching value between the query text and each of the subtexts according to the second inverted index and the target count record includes:

[0041] Determining at least one target word and a second word frequency of each target word in the query text from the target count record;

[0042] For each of the target words: determining whether the subtext contains the target word according to the second inverted index; in response to the subtext containing the target word, determining the third word frequency of the target word in the subtext according to the second inverted index; determining the second matching value of the target word according to the type of the target word, the third word frequency corresponding to the target word, and the second word frequency corresponding to the target word;

[0043] According to the second matching value of each target word, a second matching value between the query text and the subtext is determined.

[0044] Optionally, determining a recommendation result corresponding to the query text from the plurality of subtexts according to the second matching value corresponding to each subtext includes:

[0045] Determining the length difference between each of the subtexts and the query text;

[0046] According to the second matching value and the length difference corresponding to each of the sub-texts, a recommendation result corresponding to the query text is determined from the multiple sub-texts.

[0047] In a second aspect, an embodiment of the present invention provides a device for determining a recommendation result, including:

[0048] A record generation module, used to determine the query text corresponding to the query request, and generate a target count record corresponding to the query text;

[0049] A first determination module, configured to determine a first matching value between the query text and each of the interest points according to a first inverted index corresponding to the plurality of interest points and the target count record;

[0050] A first matching module, configured to determine at least one candidate interest point corresponding to the query text from the plurality of interest points according to the first matching value corresponding to each of the interest points;

[0051] An index building module, used to generate a plurality of subtexts corresponding to each of the candidate interest points, and to build a second inverted index corresponding to the plurality of subtexts;

[0052] A second matching module, configured to determine a second matching value between the query text and each of the subtexts according to the second inverted index and the target count record;

[0053] The result determination module is used to determine the recommendation result corresponding to the query text from the multiple sub-texts according to the second matching value corresponding to each sub-text.

[0054] Optionally, the index building module is further used to:

[0055] Get multiple points of interest;

[0056] For each of the interest points: preprocessing the interest point; constructing a first counting record corresponding to the preprocessed interest point; wherein the first counting record includes: a keyword and its frequency in the interest point;

[0057] According to the first counting records corresponding to the multiple interest points, a first inverted index corresponding to the multiple interest points is constructed; wherein the first inverted index includes multiple first index records, and the first index record includes: keywords, interest points where the keywords appear, and the word frequency of the keywords in the interest points.

[0058] In a third aspect, an embodiment of the present invention provides an electronic device, including:

[0059] one or more processors;

[0060] A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.

[0061] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the above embodiments.

[0062] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which implements the method described in any of the above embodiments when executed by a processor.

[0063] One embodiment of the above invention has the following advantages or beneficial effects: a two-stage matching process is implemented using an inverted index. The inverted index of the first stage is used for rough recall, and candidate points of interest are quickly screened out from a large number of points of interest while minimizing the omission of potential matches. The second stage performs a more detailed matching process on the recall results of the first stage, and determines the final recommendation results by generating multiple subtexts and reconstructing the inverted indexes of multiple word texts. This two-stage matching strategy takes into account both efficiency and accuracy, and can significantly improve the accuracy of recommendation results.

[0064] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0066] Figure 1 is a flowchart of a method for determining a recommendation result provided by the first embodiment of the present invention;

[0067] Figure 2 is a flowchart of a method for generating an inverted index provided by the second embodiment of the present invention;

[0068] Figure 3 is a flow chart of a method for determining a matching value of two texts provided in a third embodiment of the present invention;

[0069] Figure 4 is a structural schematic diagram of a device for determining a recommendation result provided by an embodiment of the present invention;

[0070] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0071] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0072] The acquisition, transmission, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0073] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0074] Figure 1 FIG. 1 is a flow chart of a method for determining a recommendation result provided by the first embodiment of the present invention. Figure 1 As shown, the method includes:

[0075] Step 101: determine the query text corresponding to the query request, and generate a target count record corresponding to the query text.

[0076] The query request can be input by the user through language, and the query text corresponding to the query request is determined through natural language processing technology. The query request is used to obtain relevant information about restaurants, banks, supermarkets, commodities, etc., or to obtain desired help, related instructions, etc.

[0077] The target count record includes: keywords and their frequency in the point of interest. The frequency indicates the number of times the keyword appears in the query text. The query text can be preprocessed, and the preprocessed query text can be segmented to obtain multiple keywords, and the frequency of each keyword in the query text can be determined. Combine each keyword and its corresponding frequency to generate a target count record.

[0078] Step 102: Determine a first matching value between the query text and each interest point according to the first inverted index and target count records corresponding to the plurality of interest points.

[0079] The points of interest are matched to the query request. If the query request is for obtaining information about restaurants, the points of interest are the names of multiple restaurants in the target area. If the query request is for obtaining information about banks, the points of interest are the names of multiple banks in the target area.

[0080] The first inverted index includes multiple first index records, and the first index records include: keywords, points of interest where the keywords appear, and the frequency of the keywords in the points of interest. The keywords in the first inverted index are keywords extracted from multiple points of interest. If a keyword appears in multiple points of interest, the first index record of the keyword stores the points of interest where the keyword appears, and the frequency of the keyword in each point of interest.

[0081] Step 103: Determine at least one candidate interest point corresponding to the query text from the multiple interest points according to the first matching value corresponding to each interest point.

[0082] A first number of interest points with the largest first matching values ​​may be selected as candidate interest points, or interest points with first matching values ​​exceeding a first preset value may be selected as candidate interest points.

[0083] Step 104: Generate multiple subtexts corresponding to each candidate interest point, and construct a second inverted index corresponding to the multiple subtexts.

[0084] The second inverted index includes multiple second index records, which include: keywords, subtexts where the keywords appear, and the word frequency of the keywords in the subtexts. The keywords in the second inverted index are keywords extracted from multiple subtexts. If a keyword appears in multiple subtexts, the second index record of the keyword stores the subtexts where the keyword appears and the word frequency of the keyword in each subtext.

[0085] Step 105: Determine a second matching value between the query text and each subtext according to the second inverted index and the target count record.

[0086] Step 106: Determine a recommendation result corresponding to the query text from the multiple sub-texts according to the second matching value corresponding to each sub-text.

[0087] The second number of sub-texts with the second largest matching value can be selected as the recommended result. Alternatively, sub-texts with a second matching value exceeding a second preset value can be selected as the recommended result. The recommended result is displayed, and a selection instruction from the user for the recommended result is received. The sub-text corresponding to the selection instruction is determined as the query result corresponding to the query request.

[0088] In the solution of the embodiment of the present invention, a two-stage matching process is implemented using an inverted index. The inverted index in the first stage is used for rough recall, and potential matching items are quickly screened out from a large number of points of interest on the premise of尽可能 not遗漏 potential matching items. In the second stage, more detailed matching processing is performed on the recall result of the first stage. By generating multiple sub-texts and reconstructing the inverted index of multiple sub-texts, the final recommended result is determined. This two-stage matching strategy takes into account both efficiency and accuracy, and can significantly improve the accuracy of the recommended result.

[0089] Figure 2 is a schematic flowchart of a method for generating an inverted index provided by the second embodiment of the present invention, as Figure 1 shown, the method includes:

[0090] Step 201: Obtain multiple points of interest.

[0091] Step 202: For each point of interest: preprocess the point of interest; construct a first count record corresponding to the preprocessed point of interest; where the first count record includes: keywords and their word frequencies in the point of interest.

[0092] The preprocessing may include: removing invalid characters, removing spaces, word segmentation processing, etc.

[0093] Step 203: Construct a first inverted index corresponding to multiple points of interest according to the first count records corresponding to the multiple points of interest.

[0094] Among them, the first inverted index includes multiple first index records, and the first index record includes: keywords, the points of interest where the keywords appear, and the word frequencies of the keywords in the points of interest. Each point of interest generates a first count record. The first index record is the result of integrating the count information of the keywords in the first count records of multiple points of interest.

[0095] For example, if the point of interest 1 is: China Postal Savings, its corresponding first index record is: ['中': 1, '国': 1, '邮': 1, '政': 1, '储': 1, '蓄': 1]. If the point of interest 2 is: Bank of China, its corresponding first index record is: ['中': 1, '国': 1, '银': 1, '行': 1]. Then the first inverted index constructed based on the point of interest 1 and the point of interest 2 includes:

[0096] 'China': ID1: 1; ID2: 1;

[0097] 'Post': ID1: 1; ID2: 1;

[0098] 'Savings': ID1: 1;

[0099] 'Bank': ID1: 1;

[0100] 'Deposit': ID1: 1;

[0101] 'Saving': ID1: 1;

[0102] 'Silver': ID2: 1;

[0103] 'Bank': ID2: 1;

[0104] Among them, ID1 is the identifier of interest point 1, and ID2 is the identifier of interest point 2. From the above first inverted index, it can be seen that 'China' appears once in interest point 1 and once in interest point 2. 'Post' only appears once in interest point 1.

[0105] In an embodiment of the present invention, the type of the keyword is: fuzzy pinyin; constructing the first count record corresponding to the preprocessed interest point includes: determining multiple Chinese characters in the preprocessed interest point, and determining the pinyin representation corresponding to each Chinese character; combining the pinyin representations corresponding to each Chinese character to generate a pinyin representation sequence; for each pinyin representation in the pinyin representation sequence: in response to the pinyin representation meeting the fuzzy processing condition, performing fuzzy processing on the pinyin representation; combining each pinyin representation and the number of times it appears in the pinyin representation sequence to generate the first count record corresponding to the interest point.

[0106] Performing word segmentation on the preprocessed interest point to obtain multiple Chinese characters, and determining the pinyin representation corresponding to each Chinese character. There is no tone in the pinyin representation. Fuzzy processing is used to process multiple pinyin representations that are prone to confusion into the same pinyin representation. For example, sh and s are uniformly processed as s, and yin and ying are uniformly processed as ying. zheng, zhen, zeng, and zen are uniformly processed as zeng. In the case of dialect or non-standard pronunciation, the solution of the embodiment of the present invention can also accurately identify the query content.

[0107] For example, the pinyin representation of '中' is 'zhong', and after fuzzy processing, it becomes 'zong'. The pinyin representation of '银' is 'yin', and after fuzzy processing, it becomes 'ying'. Given an interest point: the business office of the Postal Savings Bank of China in Xilai Town, when the type of keyword is fuzzy pinyin, the first count record of this interest point is: ['zeng': 2, 'ying': 2, 'zong': 1, 'guo': 1, 'you': 1, 'cu': 1, 'xu': 1, 'hang': 1, 'xi': 1, 'lai': 1, 'ye': 1,'suo': 1]. Among them, 'zeng' corresponds to '政' and '镇' respectively. Therefore, the word frequency of 'zeng' in the interest point is 2.

[0108] In one embodiment of the present invention, the type of keyword is: words; constructing the first count record corresponding to the preprocessed interest point includes: determining multiple words in the preprocessed interest point; combining each word and the number of times it appears in the preprocessed interest point to generate the first count record corresponding to the interest point.

[0109] Performing word segmentation on the interest point to obtain multiple words in the interest point. In a preferred embodiment of the present application, the interest point can be split into a sequence of English letters and / or individual Chinese characters. Chinese characters are the same as Chinese words. Its purpose is to be able to determine the pinyin representation of each Chinese character in subsequent steps and split the input text according to rules.

[0110] For example, given an interest point: the business office of the Postal Savings Bank of China in Xilai Town, when the type of keyword is words, the first count record of this interest point is: ['中': 1, '国': 1, '邮': 1, '政': 1, '储': 1, '蓄': 1, '银': 1, '行': 1, '西': 1, '来': 1, '镇': 1, '营': 1, '业': 1, '所': 1].

[0111] Different from the existing word segmentation method based on a fixed dictionary, the embodiment of the present invention adopts a custom word segmentation module. This module splits the text into a sequence of English letters and / or individual Chinese characters, which can not only effectively process the text input mixed with Chinese and English, but also convert the entire input text into pinyin representation and perform fuzzy processing. This is particularly crucial for dealing with problems such as unclear pronunciation and dialects in voice input. By considering the fuzziness of pinyin, the embodiment of the present invention can also more effectively match the variants generated due to inaccurate speech recognition, thereby improving the fault tolerance rate of search and user satisfaction.

[0112] In one embodiment of the present invention, the type of keyword is: initial letter string; constructing the first counting record corresponding to the preprocessed interest point, including: determining multiple words in the preprocessed interest point, and determining the initial letter corresponding to each word; combining the initial letters corresponding to each word to generate an initial letter string; combining the initial letter string and preset weights to generate the first counting record corresponding to the interest point.

[0113] The preset weight can be set as needed, such as 1, 2, etc. The first letter in the first letter string can be capitalized to distinguish it from the pinyin representation. For example, if the point of interest is: Xilai Town Business Office of China Postal Savings Bank, then when the keyword type is the first letter string, the first count record of the point of interest is: ['ZGYZCXYHXLZYYS': 1].

[0114] In the process of constructing the first counting record corresponding to the preprocessed point of interest, it can be constructed according to different keyword types. Keyword types may include: fuzzy pinyin, words and initial letter strings, etc. In a preferred embodiment of the present invention, the first counting record is constructed by fuzzy pinyin, words and initial letter strings, so that the content of the first counting record is more comprehensive and accurate, and the final recommendation effect is better.

[0115] For example, the point of interest is: Xilai Town Branch of China Postal Savings Bank. When the types of keywords are: fuzzy pinyin, words and initial letter strings, the keywords are sorted according to the frequency of the words, and the first count record of the point of interest is: ['zeng': 2, 'ying': 2, 'zhong': 1, 'guo': 1, 'you': 1, 'zheng': 1, 'chu': 1, 'xu': 1, 'yin': 1, 'xing': 1, 'xi': 1, 'lai': 1, 'zhen': 1, 'ying': 1, 'ye': 1, 'suo': 1, 'zong': 1, 'guo': 1, 'you': 1, 'cu': 1, 'xu': 1, 'hang': 1, 'xi': 1, 'lai': 1, 'zhen': 1, 'ying': 1, 'ye': 1, 'suo': 1, 'ZGYZCXYHXLZYYS': 1].

[0116] Figure 3 FIG. 1 is a flow chart of a method for determining a matching value of two texts provided in a third embodiment of the present invention. Figure 3 As shown, the method includes:

[0117] Step 301: Determine at least one target word and a second word frequency of each target word in the query text from the target count record of the query text.

[0118] The target count record is constructed in the same manner as the first count record. The target count record can be obtained by replacing the interest point in the first count record construction method with the query text.

[0119] Step 302: For each target word: determine whether the interest point contains the target word according to the first inverted index.

[0120] The first inverted index includes a plurality of first index records, which include: keywords, points of interest where the keywords appear, and the frequency of the keywords in the points of interest. The first index record is the result of integrating the counting information of the keywords in the plurality of points of interest.

[0121] If the first inverted index does not include the first index record corresponding to the target word, or the first index record corresponding to the target word does not include information corresponding to the point of interest identifier, it is determined that the point of interest does not include the target word.

[0122] If the first inverted index contains a first index record corresponding to the target word, and the first index record corresponding to the target word contains information corresponding to the point of interest identifier, it is determined that the point of interest contains the target word.

[0123] Step 303: In response to the target word being included in the interest point, determine a first word frequency of the target word in the interest point according to the first inverted index.

[0124] The first word frequency of the target word in the point of interest is determined according to the information corresponding to the point of interest identifier in the first index record corresponding to the target word.

[0125] Step 304: Determine a first matching value of the target word according to the type of the target word, the first word frequency corresponding to the target word, and the second word frequency corresponding to the target word.

[0126] A calculation rule or calculation model corresponding to each target word type is preset in the system. The calculation rule or the calculation model takes the first word frequency corresponding to the target word and the second word frequency corresponding to the target word as input, and outputs the first matching value of the target word.

[0127] As an implementable method, the smaller of the first word frequency and the second word frequency is used as the basic score. If the type of the target word is fuzzy pinyin, the basic score is multiplied by the first coefficient to obtain the first matching value of the target word. If the type of the target word is a word, the length of the target word is multiplied by the second coefficient to obtain the first matching value of the target word. If the type of the target word is an initial letter string, the basic score is multiplied by the third coefficient to obtain the first matching value of the target word.

[0128] Step 305: Determine the first matching value between the query text and the point of interest according to the first matching value of each target word.

[0129] The statistical value of the first matching value of each target word can be selected as the first matching value between the query text and the interest point. The statistical value can include: the sum, the quotient of the sum and the number of target words, the maximum value, the mean value, the minimum value, the mode, etc.

[0130] The solution of the embodiment of the present invention provides a method for determining the degree of matching between two texts. The counting record construction method provided in the embodiment of the present invention is used to construct the counting records corresponding to the two texts. Then, according to the type of the target word, the first word frequency corresponding to the target word and the second word frequency corresponding to the target word, the first matching value of the target word is determined, thereby obtaining the matching value of the two texts. The method can quickly determine the interest points with a high degree of matching with the query text from multiple interest points.

[0131] In one embodiment of the present invention, generating multiple subtexts corresponding to each candidate interest point includes: performing word segmentation processing on the candidate interest point to obtain multiple word segments; and combining at least one word segment to generate multiple subtexts corresponding to the candidate interest point.

[0132] First, split the candidate interest points into multiple participles, combine at least one participle, and obtain multiple subtexts. For example, if the candidate interest point is: China Post West Gate, then the participles include: China, Post, West Gate, and the subtexts may include: China, Post, West Gate, China Post, Post West Gate, China Post West Gate, etc.

[0133] In one embodiment of the present invention, constructing a second inverted index corresponding to a plurality of sub-texts includes: constructing a second counting record corresponding to each sub-text; wherein the second counting record includes: a keyword and its word frequency in the sub-text; constructing a second inverted index corresponding to a plurality of sub-texts according to the second counting record corresponding to each sub-text; wherein the second inverted index includes a plurality of second index records, and the second index record includes: a keyword, a sub-text in which the keyword appears, and the word frequency of the keyword in the sub-text.

[0134] The second inverted index is constructed in the same way as the first inverted index. Figure 2 By replacing the points of interest in the inverted index construction method with subtexts, a second inverted index corresponding to multiple subtexts can be obtained.

[0135] In one embodiment of the present invention, the second matching value between the query text and each sub-text is determined according to the second inverted index and the target count record, including: determining at least one target word and the second term frequency of each target word in the query text from the target count record; for each target word: determining whether the sub-text contains the target word according to the second inverted index; in response to the sub-text containing the target word, determining the third term frequency of the target word in the sub-text according to the second inverted index; determining the second matching value of the target word according to the type of the target word, the third term frequency corresponding to the target word and the second term frequency corresponding to the target word; and determining the second matching value between the query text and the sub-text according to the second matching value of each target word.

[0136] The second matching value is determined in the same way as the first matching value. Figure 3 The second matching value between the query text and the subtext can be obtained by replacing the first inverted index in the method for determining the matching value of two texts with the second inverted index.

[0137] In one embodiment of the present invention, based on the second matching value corresponding to each sub-text, the recommendation result corresponding to the query text is determined from multiple sub-texts, including: determining the length difference between each sub-text and the query text; based on the second matching value and length difference corresponding to each sub-text, determining the recommendation result corresponding to the query text from multiple sub-texts.

[0138] Determine the text length corresponding to the query text, calculate the absolute value of the length difference between the subtext and the query text, and obtain the length ratio of the absolute value to the text length. The weighted sum of the second matching value of the subtext and the length ratio is determined as the recommendation value of the text.

[0139] According to the recommendation value of each text, the recommendation result corresponding to the query text is determined from multiple sub-texts. Specifically, a preset number of sub-texts with the largest recommendation values ​​can be selected as the recommendation result. Sub-texts with recommendation values ​​exceeding a preset value can also be selected as the recommendation result, etc.

[0140] The solution of the embodiment of the present invention introduces a two-stage inverted index structure for processing voice input searches in large-scale life interest point data. The first-stage inverted index performs a rough recall based on the number of occurrences of characters and fuzzy pinyins, with the aim of quickly screening out candidate items from a large data set while minimizing the omission of potential matches. The second-stage inverted index performs more detailed matching and error correction on these recall results, by generating all possible subtexts and reconstructing the inverted index to find word frequency similarities, and introducing a length penalty mechanism to optimize the final matching results. This two-stage strategy takes into account both efficiency and accuracy, and significantly improves the matching effect of voice search.

[0141] The embodiment of the present invention introduces a length penalty mechanism in the second stage of inverted index matching, which adjusts the matching score by considering the length difference between the query text and the candidate subtext. Under the condition that all other conditions are the same, the subtext with a length closer to the query text will be given priority. This effectively solves the "best match" problem existing in traditional matching algorithms, that is, the tendency to select long entries containing more keywords, so that the matching results are more in line with the actual needs of users.

[0142] In order to make the solution of the embodiment of the present invention easier to understand. The embodiment of the present invention also provides a recommendation system, which consists of the following main parts: a corpus collection module, a custom word segmentation module, an inverted index construction module, and a query processing module. The workflow of the system is as follows:

[0143] Corpus collection module: This module first receives the original corpus containing a large number of life interest points. The interest points of these corpora can be filled in by merchants themselves or maintained manually. For example, there are 2 interest points. Interest point 1 is: Xilai Town Business Office of China Postal Savings Bank. Interest point 2 is: Airfield Management Department of Beijing Capital International Airport Co., Ltd.

[0144] Custom word segmentation module: Set a regular expression that matches all sequences of English letters or single Chinese characters. Its purpose is to segment the input text according to these rules in subsequent steps.

[0145] Word segmentation, split the input query text according to the regular expression defined above. This step will retain all matched English words and single Chinese characters, and remove whitespace characters.

[0146] Generate Pinyin and Fuzzy Pinyin Representation. Convert the entire input text into Pinyin representation. First, there is a table of common fuzzy Pinyin, such as sh and s, ch and c, and there is also a Chinese character-Pinyin table. Get the Pinyin list of the text by looking up the table, then fuzzify each Pinyin, and finally return the processed Pinyin list and its combination of capitalized first letters.

[0147] The result of fuzzy processing of point of interest 1 is: ['zhong', 'guo', 'you', 'zheng', 'chu', 'xu', 'yin', 'xing', 'xi', 'lai', 'zhen', 'ying', 'ye', 'suo', 'ZGYZCXYHXLZYYS'].

[0148] The result of POI 2 after fuzzy processing is: ['bei', 'jing', 'capital', 'country', 'international', 'airport', 'airport', 'share', 'limited', 'company', 'flight', 'region', 'management', 'ministry', 'bei', 'jing', 'sou', 'du', 'guo', 'ji', 'ji', 'cang', 'gu', 'feng', 'you', 'xiang', 'gong', 'si', 'fei', 'xing', 'qu', 'guang', 'li', 'bu', 'BJSDGJJCGFYXGSFXQGLB'].

[0149] Query processing module: converts the user's query request into query text through the speech recognition system.

[0150] In the first stage of the inverted index construction module, each interest point is segmented by a custom word segmenter, and its pinyin and fuzzy pinyin representation are generated. Based on the preprocessed interest points, the first inverted index is constructed, considering only the number of occurrences of characters and fuzzy pinyin to roughly recall the interest points containing the most relevant characters. First, all interest points are segmented using the word segmentation module, and the segmentation results are counted to construct the first counting record.

[0151] The first count record of point of interest 1 is: {'zeng':2,'ying':2,'zhong':1,'guo':1,'you':1,'zheng':1,'chu':1,'xu':1,'yin':1,'hang':1,'xi':1,'lai':1,'zhen':1,'ying':1,'ye':1,'suo':1,'zong':1,'guo':1,'you':1,'cu':1,'xu':1,'hang':1,'xi':1,'lai':1,'ye':1,'suo':1,'ZGYZCXYHXLZYYS':1}.

[0152] The first count record of POI 2 is: {'ji': 2, 'bei': 1, 'jing': 1, 'capital': 1, 'capital': 1, 'national': 1, 'international': 1, 'airport': 1, 'field': 1, 'share': 1, 'share': 1, 'owned': 1, 'limited': 1, 'company': 1, 'company': 1, 'fly': 1, 'line': 1, 'district': 1, 'management': 1, 'management': 1, 'ministration': 1, 'bei': 1, 'jing': 1} , 'sou':1, 'du':1, 'guo':1, 'cang':1, 'gu':1, 'feng':1, 'you':1, 'xiang':1, 'gong':1, 'si':1, 'fei':1, 'xing':1, 'qu':1, 'guang':1, 'li':1, 'bu':1, 'BJSDGJJCGFYXGSFXQGLB':1}.

[0153] When the query text input by the user is: "Bank xi zenn cheng lai business office", the query text is segmented to obtain the target count record: {'ying': 2, 'yin': 1, 'xing': 1, 'xi': 1, 'zenn': 1, 'cheng': 1, 'lai': 1, 'ying': 1, 'ye': 1, 'suo': 1, 'YHXZCLYYS': 1}. Using the above target count record, determine the first matching value of all interest points in the first inverted library, the specific steps are as follows:

[0154] Step 1: Traverse each target word and its frequency in the target count record.

[0155] Step 2: If the target word is not in the first inverted index, skip the word.

[0156] Step 3: If the target word is in the first inverted index, obtain the first index record of the target word in the first inverted index, and traverse all interest points related to the target word and the word frequency in these interest points.

[0157] Step 4: Calculate the basic score. If the first term frequency of the target word in the point of interest is less than the second term frequency in the query document, use the first term frequency in the point of interest as the basic score; otherwise, use the second term frequency in the query document as the basic score.

[0158] Step 5: Determine the first matching value according to the type of the target word. If the target word type is fuzzy pinyin, multiply the basic score by 0.5 to get the first matching value. If the word is an initial character string, multiply the basic score by 1.5 to get the first matching value. Otherwise, multiply the basic score by the word length to get the first matching value.

[0159] Step 6: Update the first matching value of each interest point.

[0160] Step 7: Sorting and selection: Use the stacking function to sort from high to low according to the first matching value, and select the k points of interest with the highest scores, where k is a natural number.

[0161] Step 8: Return results: According to the sorted list of interest points, get the corresponding interest points from the original corpus, as well as their indexes and scores, and finally return this information as a list. Each element in the list is a tuple containing the matching interest point, the index of the interest point in the corpus, and the score of the document.

[0162] Step 9: Take all the original corpora with the highest scores as the recall results and proceed to the next step.

[0163] The main purpose of the first stage of matching is to recall as much and complete original corpus as possible. Therefore, only the word frequency is considered, not the inverse word frequency.

[0164] For example, the query text is: "Bank Xizenn Chenglai Business Office". The first matching values ​​of interest points 1 and 2 are: [('China Postal Savings Bank Xilai Town Business Office', 11.0), ('Beijing Capital International Airport Co., Ltd. Airfield Management Department', 1)]}. The highest score is 11 points, that is, the recall result for the next step is: 'China Postal Savings Bank Xilai Town Business Office'.

[0165] In the second stage of the inverted index construction module, the results of the first stage recall are carefully processed to generate all possible sub-texts, build a new second inverted index, and optimize the matching by searching through word frequency similarity and introducing a length penalty mechanism.

[0166] The results of the first phase of recall will be used for index construction in the second phase. The recalled points of interest are re-segmented to generate all possible subtexts, and a new second inverted index is constructed based on the segmentation results. Then, this index is used to find the word frequency similarity, and finally the length difference is used as a penalty to determine the recommendation result.

[0167] In the above example, the recall result of the first stage screening is: 'China Postal Savings Bank Xilai Town Branch', then all sub-texts generated include: 'Savings Bank', 'Postal Savings Bank Xilai', 'Savings Bank Xilai Town Branch', 'Xilai Town Branch', 'China Post', 'Bank Xilai', 'Bank', 'China Postal Savings Bank Xilai', 'Savings Bank Xilai Town', 'China Postal Savings', 'China Postal Savings Bank', 'Town Branch', 'Town', 'Town Branch', 'China Postal Savings Bank Xilai Town Branch' ,'Postal Savings Bank of China Xilai Town','Bank Xilai Town','Bank Xilai Town Business Office','Bank Xilai Town Business','Xilai Town','China','Xilai Town Business','Postal Savings Bank Xilai Town Business Office','Xilai','Postal Savings Bank of China Xilai Town Business Office','Business','Savings Bank Xilai Town Business','Postal Savings Bank','Savings Bank Xilai','Postal Savings Bank Xilai Town','Savings','Postal Savings Bank Xilai Town','Postal','Postal Savings','Business Office'.

[0168] Build a second inverted index for all subtexts according to the steps of creating the first inverted index. Determine the second matching value corresponding to each subtext. Score and sort according to the second matching value and length difference. If the second matching values ​​are the same, sort by length difference. The shorter the length difference and the higher the second matching value of the subtext, the higher the recommendation value, and the optimal interest point retrieval recommendation can be obtained. The recommendation results include: subtext and its corresponding recommendation value. For the above example, the recommendation results are as follows:

[0169] ('Savings Bank Xilai Town Branch', 11.0),

[0170] ('Bank Xilai Town Branch', 11.0),

[0171] ('Postal Savings Bank Xilai Town Branch', 11.0),

[0172] ('China Postal Savings Bank Xilai Town Branch', 11.0),

[0173] ('China Postal Savings Bank Xilai Town Business', 9.5),

[0174] ('Bank Xilai Town Business', 9.5),

[0175] ('Savings Bank Xilai Town Business', 9.5),

[0176] ('Postal Savings Bank Xilai Town Business', 9.5),

[0177] ('Xilai Town Business Office', 8.0),

[0178] ('Postal Savings Bank Comes West', 6.5).

[0179] The two-stage inverted index structure and custom word segmentation method adopted in the embodiment of the present invention significantly reduce the difficulty of implementation compared to methods such as deep learning models that require a large amount of data training and high computing power support. Thanks to its efficient use of existing technologies and resources, such as regular expression processing, pinyin conversion and simple statistical methods, there is no need for complex algorithm design or large-scale parameter optimization. In addition, this solution has strong scalability and is easy to integrate into existing search systems, which facilitates system upgrades without the need to reconstruct the entire system, saving development costs and time.

[0180] In the application scenario of voice input search, users expect to get an instant response. The solution provided by the embodiment of the present invention achieves fast error correction and precise matching through a carefully designed two-stage inverted index. The rough recall in the first stage quickly narrows the search scope. The detailed matching in the second stage is performed within a limited candidate set, which greatly reduces the amount of calculation, thereby ensuring the speed of error correction processing. The introduction of the length penalty mechanism further optimizes the search efficiency, reduces the interference of irrelevant results by adjusting the matching score, and enables the system to lock the most appropriate search results more quickly.

[0181] By processing pinyin and its fuzzy pinyin, and considering the penalty mechanism of length difference, the scheme of the embodiment of the present invention can effectively correct errors in voice input and improve the accuracy of search results. This is of great significance for improving user experience and user satisfaction. Even in the case of non-standard pronunciation caused by dialects or accents, the scheme of the embodiment of the present invention can also show good error correction ability, further expanding the coverage of application scenarios.

[0182] To sum up, the solution of the embodiment of the present invention not only improves the efficiency and accuracy of life interest point retrieval through low implementation difficulty and fast error correction characteristics, but also provides users with a smoother and more satisfactory search experience, and has significant application value and market potential in related technical fields.

[0183] Figure 4 FIG. 1 is a schematic diagram of a structure of a device for determining a recommendation result provided by an embodiment of the present invention. Figure 4 As shown, the device comprises:

[0184] The record generation module 401 is used to determine the query text corresponding to the query request and generate a target count record corresponding to the query text;

[0185] A first determination module 402, configured to determine a first matching value between the query text and each interest point according to the first inverted index and target count records corresponding to the plurality of interest points;

[0186] A first matching module 403, configured to determine at least one candidate interest point corresponding to the query text from the plurality of interest points according to the first matching value corresponding to each interest point;

[0187] An index building module 404 is used to generate a plurality of subtexts corresponding to each candidate interest point, and to build a second inverted index corresponding to the plurality of subtexts;

[0188] A second matching module 405 is used to determine a second matching value between the query text and each subtext according to the second inverted index and the target count record;

[0189] The result determination module 406 is used to determine the recommendation result corresponding to the query text from the multiple sub-texts according to the second matching value corresponding to each sub-text.

[0190] Optionally, the index building module 404 is further configured to:

[0191] Get multiple points of interest;

[0192] For each point of interest: preprocessing the point of interest; constructing a first counting record corresponding to the preprocessed point of interest; wherein the first counting record includes: a keyword and its frequency in the point of interest;

[0193] According to the first counting records corresponding to the multiple interest points, a first inverted index corresponding to the multiple interest points is constructed; wherein the first inverted index includes multiple first index records, and the first index record includes: keywords, interest points where the keywords appear, and word frequencies of the keywords in the interest points.

[0194] Optionally, the type of keyword is: fuzzy pinyin;

[0195] The index building module 404 is specifically used for:

[0196] Determine a plurality of Chinese characters in the preprocessed points of interest, and determine a pinyin representation corresponding to each Chinese character;

[0197] Combining the pinyin representations corresponding to the Chinese characters to generate a pinyin representation sequence;

[0198] For each pinyin representation in the pinyin representation sequence: in response to the pinyin representation meeting the fuzzy processing condition, fuzzy processing is performed on the pinyin representation;

[0199] Each pinyin representation and the number of times it appears in the pinyin representation sequence are combined to generate a first count record corresponding to the interest point.

[0200] Optionally, the type of keyword is: word;

[0201] The index building module 404 is specifically used for:

[0202] determining a plurality of words in the preprocessed points of interest;

[0203] Each word and the number of times it appears in the preprocessed interest point are combined to generate a first count record corresponding to the interest point.

[0204] Optionally, the keyword type is: initial letter string;

[0205] The index building module 404 is specifically used for:

[0206] Determine a plurality of words in the preprocessed interest point, and determine the first letter corresponding to each word;

[0207] Combine the first letters of each word to generate a string of first letters;

[0208] The first character string and the preset weight are combined to generate the first count record corresponding to the point of interest.

[0209] Optionally, the first matching module 403 is specifically configured to:

[0210] Determining at least one target word and a second word frequency of each target word in the query text from the target count record;

[0211] For each target word: determining whether the target word is included in the point of interest according to the first inverted index; in response to the point of interest including the target word, determining a first word frequency of the target word in the point of interest according to the first inverted index; determining a first matching value of the target word according to the type of the target word, the first word frequency corresponding to the target word, and the second word frequency corresponding to the target word;

[0212] According to the first matching value of each target word, the first matching value between the query text and the point of interest is determined.

[0213] Optionally, the index building module 404 is specifically used for:

[0214] Perform word segmentation on the candidate interest points to obtain multiple word segments;

[0215] At least one word segment is combined to generate multiple subtexts corresponding to the candidate interest points.

[0216] Optionally, the index building module 404 is specifically used for:

[0217] Constructing a second counting record corresponding to each sub-text; wherein the second counting record includes: a keyword and its frequency in the sub-text;

[0218] According to the second counting record corresponding to each sub-text, a second inverted index corresponding to the plurality of sub-texts is constructed; wherein the second inverted index includes a plurality of second index records, and the second index record includes: a keyword, a sub-text in which the keyword appears, and a word frequency of the keyword in the sub-text.

[0219] Optionally, the second matching module 405 is specifically configured to:

[0220] Determining at least one target word and a second word frequency of each target word in the query text from the target count record;

[0221] For each target word: determine whether the sub-text contains the target word according to the second inverted index; in response to the sub-text containing the target word, determine the third word frequency of the target word in the sub-text according to the second inverted index; determine the second matching value of the target word according to the type of the target word, the third word frequency corresponding to the target word, and the second word frequency corresponding to the target word;

[0222] The second matching value between the query text and the subtext is determined according to the second matching value of each target word.

[0223] Optionally, the result determination module 406 is specifically configured to:

[0224] Determine the length difference between each subtext and the query text;

[0225] According to the second matching value and the length difference value corresponding to each subtext, a recommendation result corresponding to the query text is determined from the multiple subtexts.

[0226] An embodiment of the present invention provides an electronic device, including:

[0227] one or more processors;

[0228] The storage device is used to store one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the method of any of the above embodiments.

[0229] An embodiment of the present invention provides a computer program product, including a computer program. When the computer program is executed by a processor, the method for determining a recommendation result in the embodiment of the present invention is implemented.

[0230] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0231] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0232] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0233] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0234] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0235] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0236] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor, for example, they may be described as: an information determination module, an appeal word generation module, a script generation module, an appeal word update module, and a script optimization module. Among them, the names of these modules do not constitute a limitation on the modules themselves in certain circumstances. For example, the information determination module may also be described as a "module that receives operation and maintenance prompt information and determines the execution information corresponding to the operation and maintenance prompt information."

[0237] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0238] Determine a query text corresponding to the query request, and generate a target count record corresponding to the query text;

[0239] Determining a first matching value between the query text and each of the interest points according to the first inverted indexes corresponding to the plurality of interest points and the target count record;

[0240] Determining at least one candidate interest point corresponding to the query text from the plurality of interest points according to the first matching value corresponding to each of the interest points;

[0241] Generate a plurality of subtexts corresponding to each of the candidate interest points, and construct a second inverted index corresponding to the plurality of subtexts;

[0242] Determine a second matching value between the query text and each of the subtexts according to the second inverted index and the target count record;

[0243] According to the second matching value corresponding to each of the sub-texts, a recommendation result corresponding to the query text is determined from the multiple sub-texts.

[0244] According to the technical solution of the embodiment of the present invention, a two-stage matching process is implemented using an inverted index. The inverted index of the first stage is used for rough recall, and candidate points of interest are quickly screened out from a large number of points of interest while minimizing the omission of potential matches. The second stage performs a more detailed matching process on the recall results of the first stage, and determines the final recommendation results by generating multiple subtexts and reconstructing the inverted indexes of multiple subtexts. This two-stage matching strategy takes into account both efficiency and accuracy, and can significantly improve the accuracy of recommendation results.

[0245] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for determining a recommendation result, characterized in that: include: Determine a query text corresponding to the query request, and generate a target count record corresponding to the query text; Determining a first matching value between the query text and each of the interest points according to the first inverted indexes corresponding to the plurality of interest points and the target count record; Determining at least one candidate interest point corresponding to the query text from the plurality of interest points according to the first matching value corresponding to each of the interest points; Generate a plurality of subtexts corresponding to each of the candidate interest points, and construct a second inverted index corresponding to the plurality of subtexts; Determine a second matching value between the query text and each of the subtexts according to the second inverted index and the target count record; According to the second matching value corresponding to each of the sub-texts, a recommendation result corresponding to the query text is determined from the multiple sub-texts.

2. The method according to claim 1, characterized in that Before determining the query text corresponding to the query request, the method further includes: Get multiple points of interest; For each of the interest points: preprocessing the interest point; constructing a first counting record corresponding to the preprocessed interest point; wherein the first counting record includes: a keyword and its frequency in the interest point; According to the first counting records corresponding to the multiple interest points, a first inverted index corresponding to the multiple interest points is constructed; wherein the first inverted index includes multiple first index records, and the first index record includes: keywords, interest points where the keywords appear, and the word frequency of the keywords in the interest points.

3. The method according to claim 2, characterized in that The types of the keywords are: fuzzy pinyin; The constructing of the first count record corresponding to the preprocessed point of interest includes: Determine a plurality of Chinese characters in the preprocessed points of interest, and determine a pinyin representation corresponding to each of the Chinese characters; Combining the pinyin representations corresponding to the Chinese characters to generate a pinyin representation sequence; For each pinyin representation in the pinyin representation sequence: in response to the pinyin representation meeting the fuzzy processing condition, performing fuzzy processing on the pinyin representation; The pinyin representations and the number of times they appear in the pinyin representation sequence are combined to generate a first counting record corresponding to the interest point.

4. The method according to claim 2, characterized in that: The types of keywords are: words; The constructing of the first count record corresponding to the preprocessed point of interest includes: determining a plurality of words in the preprocessed points of interest; The words and the number of times they appear in the preprocessed interest point are combined to generate a first counting record corresponding to the interest point.

5. The method according to claim 2, characterized in that: The type of the keyword is: initial letter string; The constructing of the first count record corresponding to the preprocessed point of interest includes: Determine a plurality of words in the preprocessed points of interest, and determine the first letter corresponding to each of the words; Combining the first letters of the words to generate a string of first letters; The initial character string and the preset weight are combined to generate a first counting record corresponding to the interest point.

6. The method according to claim 1, characterized in that The determining, according to the first inverted indexes corresponding to the plurality of interest points and the target count records, a first matching value between the query text and each of the interest points includes: Determining at least one target word and a second word frequency of each target word in the query text from the target count record; For each of the target words: determining whether the interest point includes the target word according to the first inverted index; in response to the interest point including the target word, determining a first word frequency of the target word in the interest point according to the first inverted index; determining a first matching value of the target word according to the type of the target word, the first word frequency corresponding to the target word, and the second word frequency corresponding to the target word; According to the first matching value of each of the target words, a first matching value between the query text and the point of interest is determined.

7. The method according to claim 1, characterized in that The generating of a plurality of subtexts corresponding to each of the candidate interest points includes: Performing word segmentation processing on the candidate interest points to obtain multiple word segments; At least one of the word segments is combined to generate a plurality of subtexts corresponding to the candidate interest points.

8. The method according to claim 1, characterized in that The step of constructing a second inverted index corresponding to the plurality of subtexts includes: Constructing a second counting record corresponding to each of the sub-texts; wherein the second counting record includes: a keyword and its frequency in the sub-text; According to the second counting record corresponding to each of the sub-texts, a second inverted index corresponding to the plurality of the sub-texts is constructed; wherein the second inverted index includes a plurality of second index records, and the second index record includes: a keyword, a sub-text in which the keyword appears, and a word frequency of the keyword in the sub-text.

9. The method according to claim 1, characterized in that: The determining, according to the second inverted index and the target count record, a second matching value between the query text and each of the subtexts includes: Determining at least one target word and a second word frequency of each target word in the query text from the target count record; For each of the target words: determining whether the subtext contains the target word according to the second inverted index; in response to the subtext containing the target word, determining the third word frequency of the target word in the subtext according to the second inverted index; determining the second matching value of the target word according to the type of the target word, the third word frequency corresponding to the target word, and the second word frequency corresponding to the target word; According to the second matching value of each target word, a second matching value between the query text and the subtext is determined.

10. The method according to claim 1, characterized in that The step of determining a recommendation result corresponding to the query text from the plurality of subtexts according to the second matching value corresponding to each of the subtexts includes: Determining the length difference between each of the subtexts and the query text; According to the second matching value and the length difference corresponding to each of the sub-texts, a recommendation result corresponding to the query text is determined from the multiple sub-texts.

11. A device for determining a recommendation result, characterized in that: include: A record generation module, used to determine the query text corresponding to the query request, and generate a target count record corresponding to the query text; A first determination module, configured to determine a first matching value between the query text and each of the interest points according to a first inverted index corresponding to the plurality of interest points and the target count record; A first matching module, configured to determine at least one candidate interest point corresponding to the query text from the plurality of interest points according to the first matching value corresponding to each of the interest points; An index building module, used to generate a plurality of subtexts corresponding to each of the candidate interest points, and to build a second inverted index corresponding to the plurality of subtexts; A second matching module, configured to determine a second matching value between the query text and each of the subtexts according to the second inverted index and the target count record; The result determination module is used to determine the recommendation result corresponding to the query text from the multiple sub-texts according to the second matching value corresponding to each sub-text.

12. The device according to claim 11, characterized in that The index building module is also used to: Get multiple points of interest; For each of the interest points: preprocessing the interest point; constructing a first counting record corresponding to the preprocessed interest point; wherein the first counting record includes: a keyword and its frequency in the interest point; According to the first counting records corresponding to the multiple interest points, a first inverted index corresponding to the multiple interest points is constructed; wherein the first inverted index includes multiple first index records, and the first index record includes: keywords, interest points where the keywords appear, and the word frequency of the keywords in the interest points.

13. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 10.

14. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.