An input association method, an electronic device, and a storage medium

By combining the target entity lexicon, the first set corpus, and the second set corpus with word segmentation and synonym replacement, the problem of matching associated words when the input characters are ambiguous or have a small number of characters is solved, and rich and accurate associated words are provided, thus improving the user experience.

CN116069174BActive Publication Date: 2025-11-25MOBILE TECH COMPANY CHINA TRAVELSKY HLDG
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310144621.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2025-11-25
Estimated Expiration
2043-02-21

AI Technical Summary

Technical Problem

Existing input suggestion methods fail to match suggested words when the user's input is vague or too short, resulting in a poor user experience.

Method used

By acquiring the target string, we use the target entity lexicon, the first set corpus, and the second set corpus to perform associative word matching. We combine word segmentation, synonym replacement, and keyword extraction to perform associative word matching in multiple ways to enrich and accurately provide associative words.

Benefits of technology

It improves the richness and accuracy of suggested words matching when the input characters are fuzzy or have a small number of characters, thus enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116069174B_ABST
    Figure CN116069174B_ABST
Patent Text Reader

Abstract

The application provides an input association method, comprising: obtaining a target string of input; obtaining a plurality of target entity word banks; traversing the target entity word banks, and for a current target entity word bank, if the target string contains any entity word in the current target entity word bank, obtaining a fixed sentence corresponding to the entity word from the current target entity word bank as a current output result; obtaining a sentence starting with the target string from a first set corpus, and if a corresponding target sentence is obtained, taking the obtained target sentence as a second output result; performing word segmentation on the target string to obtain a word segmentation set; obtaining a sentence including each word in the word segmentation set from a second set corpus to obtain a corresponding sentence set; if the sentence set has an intersection, taking the sentence obtained from the intersection as a third output result; and outputting the output result. The application also provides an electronic device and a storage medium. The application can output as many association words as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent retrieval, and in particular to an input association method, electronic device, and storage medium. Background Technology

[0002] With the rapid development of internet technology, people are increasingly reliant on the internet to obtain the information they need. When users search for content using a search box, the search box typically searches for matching words in a pre-built dictionary of related words for each character entered. These matching words are then displayed in a list below the search box, allowing users to directly click on recommended words and find the desired content without needing to type further. However, existing input suggestion methods require users to input relatively complete characters to provide corresponding suggested words. Furthermore, due to limited corpora, there may be instances where no match is found, resulting in no suggested words being provided. When the user's input is ambiguous or too short, such as a single character, no corresponding suggested words will be provided, leading to poor applicability and a poor user experience. Summary of the Invention

[0003] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows:

[0004] This invention provides an input association method, which includes the following steps:

[0005] S100, obtain the input target string;

[0006] S200, obtain n target entity vocabularies; each target entity vocabulary contains several entity words and corresponding fixed sentences, any two target entity vocabularies correspond to different entity word categories, and entity words in the same target entity vocabulary correspond to the same entity word category;

[0007] S300: Traverse n target entity dictionaries. For the i-th target entity dictionary, if the target string contains any entity word from the i-th target entity dictionary, then retrieve the fixed phrase corresponding to that entity word from the i-th target entity dictionary as k. i There are several output results, where i ranges from 1 to n; (k1+k2+…+k i +…+k n The first output result is selected as the first output result; S400 is executed.

[0008] S400: Obtain a first target statement starting with the target string from the first set corpus. If the corresponding first target statement is obtained, use the obtained first target statement as the second output result and execute S500; otherwise, execute S500.

[0009] S500, the target string is segmented to obtain a segmentation set P = (P1, P2, ..., P...). j , ..., P m ), P j For the j-th word in P, j takes values ​​from 1 to m, where m is the number of words in P; if m > 1, execute S600; otherwise, execute S800.

[0010] S600, retrieves P from the second corpus. j The second target statement yields P. j The set of statements W j = (w j1 w j2 ,…,w jr ,…,w jh(j) ), w jr For W j The r-th second target statement in the context, where r ranges from 1 to h(j), and h(j) is W. j The number of second target statements in the text;

[0011] S700, if W1∩W2∩…∩W j ∩…∩W m ≠Null, W1∩W2∩…∩W j ∩…∩W m The obtained statement is used as the third output result, and S810 is executed; S800, at least a portion of the first output result and the second output result are used as the final output result and output;

[0012] S810, at least a portion of the first output result, the second output result, and the third output result are taken as the final output result and output. The present invention has at least the following beneficial effects:

[0013] The input association method provided in this invention first performs fixed-statement matching on the input string, then uses a first-defined corpus for matching. If no suitable association word is found, the string is segmented and then matched using a second-defined corpus. If no suitable association word is found, the string is replaced with synonyms and / or keywords are extracted. Based on the results of synonym replacement and / or keyword extraction, matching is then performed again from the second-defined corpus. By using multiple matching methods, the provided association words can be made as rich and accurate as possible, resulting in a better user experience. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 A flowchart of the input association method provided in an embodiment of the present invention. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] One embodiment of the present invention provides an input association method, such as... Figure 1 As shown, the method may include the following steps:

[0018] S100, obtain the input target string.

[0019] In this embodiment of the invention, the target string can be a string composed of all the characters entered by the user in the input box of the information providing website. For example, if the user enters the characters "China Southern Airlines delay", then the target string is "China Southern Airlines delay". As another example, if the user enters the characters "I want to go to Beijing", then the target string is "I want to go to Beijing".

[0020] S200, obtain n target entity vocabularies; each target entity vocabulary contains several entity words and corresponding fixed phrases, any two target entity vocabularies correspond to different entity word categories, and entity words in the same target entity vocabulary correspond to the same entity word category.

[0021] In this embodiment of the invention, n target entity thesauruses can be pre-stored in a server, which is a server that provides website communication connections with the set information. In one example, each target entity thesaurus may include an entity word table storing a number of entity words and a fixed statement table associated with the entity word table. In another example, each target entity thesaurus may include an entity word table storing a number of entity words and a number of fixed statement tables associated with the number of entity words. Preferably, to reduce storage resources, all fixed statements may be stored in the same table.

[0022] The categories and number of the target entity thesaurus can be set based on actual needs. In one illustrative embodiment, the target entity thesaurus can be a thesaurus related to aviation, for example, it can include entity thesaurus categories such as airlines, airports, and security checks. Those skilled in the art will understand that any method for constructing a target entity thesaurus falls within the protection scope of this invention.

[0023] S300: Traverse n target entity dictionaries. For the i-th target entity dictionary, if the target string contains any entity word from the i-th target entity dictionary, then retrieve the fixed phrase corresponding to that entity word from the i-th target entity dictionary as k. i There are several output results, where i ranges from 1 to n; (k1+k2+…+k i +…+k n The first output result is taken as the first output result; execute S400.

[0024] Specifically, for each target entity dictionary, each entity word in the target entity dictionary can be compared with the target string. If the target string contains any entity word from the target entity dictionary, the corresponding fixed statement is retrieved from the target entity dictionary as the first output result. Those skilled in the art may be aware that there may be cases where none of the entity words in the target entity dictionary are contained in the target string, meaning the fixed statement in the first output result may be null.

[0025] S400: Obtain a first target statement starting with the target string from the first set corpus. If the corresponding first target statement is obtained, the obtained first target statement is used as the second output result and S500 is executed; otherwise, S500 is executed directly.

[0026] In this embodiment of the invention, the first set corpus may be a prefix tree corpus, which may be an existing prefix tree corpus.

[0027] In this embodiment of the invention, the target statement is a statement whose intent is the same as or similar to that of the target string.

[0028] S500, the target string is segmented to obtain a segmentation set P = (P1, P2, ..., P...). j , ..., P m ), P j Let j be the j-th word in P, where j ranges from 1 to m, and m is the number of words in P. If m > 1, execute S600; otherwise, if m ≤ 1, execute S800.

[0029] S600, retrieves P from the second corpus. j The second target statement yields P. j The set of statements Wj = (w j1 w j2 , ..., w jr ,…,w jh(j) ), w jr For W j The r-th second target statement in the context, where r ranges from 1 to h(j), and h(j) is W. j The number of second target statements in the text.

[0030] In this embodiment of the invention, the corpus in the second set corpus may be the same as the corpus stored in the first set corpus, except that the storage method of the corpus is different, and it is an existing corpus.

[0031] S700, if W1∩W2∩…∩W j ∩…∩W m ≠ Null, meaning a set of m statements W1, W2, ..., W j ..., W m If there is an intersection between the statements, that is, if they contain the same statements, then W1∩W2∩…∩W j ∩…∩W m The obtained statement is used as the third output result, and S810 is executed.

[0032] S800 takes at least a portion of the first output result and the second output result as the final output result and outputs it.

[0033] S810, at least a portion of the first output result, the second output result, and the third output result are taken as the final output result and output. In this embodiment of the invention, the output result can be displayed on the user's display screen.

[0034] If the output only includes the second output result, then N statements can be selected from the target statements obtained in S400, for example, randomly selected, as the output result, where N is the set number of output statements, which can be set according to actual needs. Those skilled in the art will understand that if the number of target statements obtained from S400 is less than N, then all obtained target statements can be used as the output result.

[0035] If the output includes a first output and a second output, the first output includes A1 fixed statements, and the second output includes A2 statements, where A1 + A2 = N, and N is the set number of outputs. A1 and A2 can be set according to actual needs. The A1 fixed statements can be derived from pairs (k1 + k2 + ... + k...). i +…+k nThe first output result is selected from the deduplicated output results, for example, randomly. The two statements can be selected from the target statements obtained from S400, for example, randomly. Those skilled in the art will understand that if the total number of statements in the first and second output results is less than N, then the first and second output results can be used as the output results.

[0036] If the output includes a first output, a second output, and a third output, then the first output may include B1 fixed statements, the second output may include B2 statements, and the third output may include B3 statements, where B1 + B2 + B3 = N. B1, B2, and B3 can be set according to actual needs. Those skilled in the art will understand that if the total number of statements in the first, second, and third outputs is less than N, then all three outputs can be used as output.

[0037] The input association method provided in this embodiment can match as many associated words as possible by using three databases: a target entity lexicon, a first set corpus, and a second set corpus.

[0038] In another embodiment of the present invention, S700 further includes: if W1∩W2∩…∩W j ∩…∩W m =Null, that is, a set of m statements W1, W2, ..., W j ..., W m If there is no overlap, meaning there are no identical statements, then perform the following steps:

[0039] S710, obtain P j Alternative words, based on P j And the corresponding alternative words, forming P j The word combination PB j =(P j P j1 P j2 ,…,P jx ,…, P jf(j) ), P jx For P j The xth replacement word, where x ranges from 1 to f(j), and f(j) is P. j The number of alternative words.

[0040] In an embodiment of the present invention, P j The alternative word is with P j Words with similar meanings, for example, "delay" is a substitute for "late," and "China Southern Airlines" or "China Eastern Airlines" are substitutes for "China Southern Airlines." j Alternative words can be obtained based on a preset alternative word list.

[0041] S720, based on PB1, PB2, ..., PB j , ..., PB m Obtain H combined word segmentation sets PC = (PC1, PC2, ..., PC...) s , ..., PC H ), the s-th combined word segmentation set PC s =(PC s1 PC s2 , ..., PC sj , ..., PC sm ), PC sj For PC s The j-th word in the process, PC sj ∈PB j And PC s ≠ P, meaning any combination of word segments includes PB1, PB2, ..., PB j , ..., PB m Each word in each word combination, and any two combinations have different word sets, and PC does not include P; execute S730; s takes values ​​from 1 to H.

[0042] In this embodiment of the invention, based on PB1, PB2, ..., PB j , ..., PB m H combination word sets can be obtained based on existing permutation and combination methods, i.e. H=f(1)*f(2)*…*f(j)*…*f(m)-1.

[0043] S730, obtains PC from the second setting corpus. sj The third target statement, to obtain PC sj The statement set WC sj =(wc 1 sj wc 2 sj , ..., wc u sj , ..., wc f(sj) sj wc u sj For WC sj The u-th third target statement in the context, where u takes values ​​from 1 to f(sj), and f(sj) is WC. sj The number of third target statements in the text.

[0044] S740, Obtain the result set of the target statement T = (T1, T2, ..., T...). s ,…,T H The result T of the s-th target statement s =(WCs1 ∩WC s2 ∩…∩WC sj ∩…∩WC sm If there is at least one target statement result that is not null in T, that is, there is at least one target statement result that includes a statement, then the target statement result that is not null will be used as the fourth output result, and S900 will be executed.

[0045] In a preferred embodiment of the present invention, using the result of a target statement that is not null as the fourth output result may include:

[0046] If the combined word segmentation set corresponding to the target statement result that is not null in T includes the words in P, then the third target statement is obtained from the combined word segmentation set that includes the words in P as the fourth output result. That is, the statement is preferentially obtained from the combined word segmentation set that includes the words in P as the fourth output result. More preferably, the statement is obtained from the combined word segmentation set that contains the most words in P as the fourth output result.

[0047] S900 takes at least a portion of the first output result, the second output result, and the fourth output result as the final output result and outputs it.

[0048] In this embodiment, if the output results include a first output result, a second output result, and a fourth output result, then the first output result may include C1 fixed statements, the second output result may include C2 statements, and the fourth output result may include C3 statements, where C1 + C2 + C3 = N. C1, C2, and C3 can be set according to actual needs. Those skilled in the art will understand that if the total number of statements in the first, second, and fourth output results is less than N, then all three output results can be used as the output results.

[0049] The input association method provided in this embodiment first performs word matching by using a target entity lexicon and a first set corpus. Then, it performs word segmentation on the target string and performs word matching using a second set corpus. When no word matching is found by word segmentation, the words in the target string are replaced with alternative words, and the second set corpus is used for matching based on the replaced words. Compared with the previous embodiment, it can further match as many words as possible.

[0050] In another embodiment of the present invention, S740 further includes: if T is Null, that is, the result of any target statement is Null and does not include statements, then the following steps are performed:

[0051] S741, retrieve the keywords in P.

[0052] In this embodiment of the invention, the keywords are words obtained from word segmentation in P according to preset rules. In one illustrative embodiment, keywords in P can be obtained based on existing word importance, for example, keywords in P can be obtained based on information entropy. Those skilled in the art will know that obtaining keywords through information entropy is existing technology.

[0053] S742, retrieve the third target statement corresponding to the keyword from the second set corpus, and use the retrieved fourth target statement as the fifth output result, then execute S1000.

[0054] S1000, take at least a portion of the first output result, the second output result, and the fifth output result as the final output result, and output them.

[0055] In another embodiment of the present invention, S740 further includes: if T is Null, execute S743.

[0056] S743, based on the set keyword table, obtain the keywords in P; execute S744.

[0057] The keyword list can be an existing keyword list, which is stored in advance on the server.

[0058] In this embodiment of the invention, if P includes a word from a set keyword list, that word is used as a keyword of P. If P includes two or more words from the set keyword list, in one example, a word can be randomly selected as a keyword of P; in another example, the word with the highest information entropy can be selected as a keyword of P.

[0059] S744: Obtain the fifth target statement corresponding to the keyword in P from the second set corpus, and use the obtained fifth target statement as the fifth output result, then execute S1001.

[0060] S1001, take at least a portion of the first output result, the second output result, and the fifth output result as the final output result, and output them.

[0061] In one embodiment of the present invention, in S743, if P does not include any keyword in the set keyword table, S1001 can be executed directly, except that the fifth output result is Null at this time.

[0062] In another embodiment of the present invention, in S743, if P does not include any keyword from the set keyword list, then S745 can be executed:

[0063] S745, retrieve keywords from P based on word importance, then execute S744.

[0064] In this embodiment, if the output results include a first output result, a second output result, and a fifth output result, then the first output result may include D1 fixed statements, the second output result includes D2 statements, and the fifth output result includes D3 statements, where D1 + D2 + D3 = N. D1, D2, and D3 can be set based on actual needs. Those skilled in the art will understand that if the total number of statements in the first, second, and fourth output results is less than N, then all three output results can be used as the output results.

[0065] The input association method provided in this embodiment first performs associated word matching using a target entity lexicon and a first set corpus. Then, it performs word segmentation on the target string and performs associated word matching using a second set corpus. If no associated word is matched by word segmentation, the words in the target string are replaced with alternative words, and the second set corpus is used for matching based on the replaced words. If no associated word is matched, the keyword in the target string is used for matching. Compared with the previous embodiment, this method can match as many associated words as possible.

[0066] In another embodiment of the present invention, S700 further includes: if W1∩W2∩…∩W j ∩…∩W m If the value is null, then perform the following steps:

[0067] S711, retrieve the keywords in P.

[0068] In this embodiment of the invention, keywords in P can be obtained based on existing word importance, for example, keywords in P can be obtained based on information entropy. Those skilled in the art will know that obtaining keywords through information entropy is a prior art technique.

[0069] S712, retrieve the sixth target statement corresponding to the keyword in P from the second set corpus, and use the retrieved sixth target statement as the fourth output result, then execute S820.

[0070] S820 takes at least a portion of the first output result, the second output result, and the fourth output result as the final output result and outputs it.

[0071] In another embodiment of the present invention, S700 further includes: if W1∩W2∩…∩W j ∩…∩W m =Null, then execute S713.

[0072] S713, based on the set keyword table, obtain the keywords in P; execute S714.

[0073] The keyword list can be an existing keyword list, which is stored in advance on the server.

[0074] In this embodiment of the invention, if P includes a word from a set keyword list, that word is used as a keyword of P. If P includes two or more words from the set keyword list, in one example, a word can be randomly selected as a keyword of P; in another example, the word with the highest information entropy can be selected as a keyword of P.

[0075] S714, retrieve the sentences corresponding to the keywords from the second set corpus, and use the retrieved sentences as the fourth output result, then execute S820;

[0076] S820 takes at least a portion of the first output result, the second output result, and the fourth output result as output results and outputs them.

[0077] In one embodiment of the present invention, in S713, if P does not include any keyword in the set keyword table, S820 can be executed directly, except that the fifth output result is Null at this time.

[0078] In another embodiment of the present invention, in S713, if P does not include any keyword from the set keyword list, then S715 can be executed:

[0079] S715, retrieve keywords from P based on word importance, and execute S714.

[0080] In this embodiment, if the output results include a first output result, a second output result, and a fourth output result, then the first output result may include C1 fixed statements, the second output result may include C2 statements, and the fourth output result may include C3 statements, where C1 + C2 + C3 = N. C1, C2, and C3 can be set according to actual needs. Those skilled in the art will understand that if the total number of statements in the first, second, and fourth output results is less than N, then all three output results can be used as the output results.

[0081] In this embodiment, if W1∩W2∩…∩W j ∩…∩W m =Null, then keyword matching is used, which has the same effect as the aforementioned example of matching using alternative words, and can further match as many related words as possible.

[0082] In another embodiment of the present invention, S100 is replaced by:

[0083] S110, obtain the length L of the target string. If L > L0, execute S200; otherwise, execute S300. L0 is a set length, which can be set according to actual needs. In an illustrative embodiment, L0 is 2 characters or 3 characters, preferably 3 characters.

[0084] In this embodiment, fixed statement matching is only performed when the length of the target string is greater than L0. Compared with the previous embodiment, this can save matching time and improve matching efficiency.

[0085] Embodiments of the present invention also provide a non-transitory computer-readable storage medium that can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiments.

[0086] Embodiments of the present invention also provide an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0087] Embodiments of the present invention also provide a computer program product including program code, which, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described above in various exemplary embodiments of the present invention.

[0088] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of this invention is defined by the appended claims.

Claims

1. An input association method, characterized in that, The method includes the following steps: S100, obtain the input target string; S200, obtain n target entity vocabularies; each target entity vocabulary contains several entity words and corresponding fixed sentences, any two target entity vocabularies correspond to different entity word categories, and entity words in the same target entity vocabulary correspond to the same entity word category; S300: Traverse n target entity dictionaries. For the i-th target entity dictionary, if the target string contains any entity word from the i-th target entity dictionary, then retrieve the fixed phrase corresponding to that entity word from the i-th target entity dictionary as k. i There are several output results, where i ranges from 1 to n; (k1+k2+…+k i +…+k n The first output result is selected as the first output result; S400 is executed. S400: Obtain a first target statement starting with the target string from the first set corpus. If a corresponding first target statement is obtained, use the obtained first target statement as the second output result and execute S500. Otherwise, execute S500; S500, the target string is segmented to obtain a segmentation set P = (P1, P2, ..., P...). j , ..., P m ), P j For the j-th word in P, j takes values ​​from 1 to m, where m is the number of words in P; if m > 1, execute S600; Otherwise, execute S800; S600, retrieves P from the second corpus. j The second target statement yields P. j The set of statements W j = (w j1 w j2 ,…,w jr ,…,w jh(j) ), w jr For W j The r-th second target statement in the context, where r ranges from 1 to h(j), and h(j) is W. j The number of second target statements in the text; S700, if W1∩W2∩…∩W j ∩…∩W m ≠Null, W1∩W2∩…∩W j ∩…∩W m The obtained statement is used as the third output result, and S810 is executed; S800, take at least a portion of the first output result and the second output result as the final output result, and output it; S810 takes at least a portion of the first output result, the second output result, and the third output result as the final output result and outputs it.

2. The method according to claim 1, characterized in that, S700 also includes: if W1∩W2∩…∩W j ∩…∩W m If the value is null, then perform the following steps: S710, obtain P j Alternative words, based on P j And the corresponding alternative words, forming P j The word combination PB j =(P j P j1 P j2 ,…,P jx ,…, P jf(j) ), P jx For P j The xth replacement word, where x ranges from 1 to f(j), and f(j) is P. j The number of alternative words; S720, based on PB1, PB2, ..., PB j , ..., PB m Obtain H combined word segmentation sets PC = (PC1, PC2, ..., PC...) s , ..., PC H ), the s-th combined word segmentation set PC s =(PC s1 PC s2 , ..., PC sj , ..., PC sm ), PC sj For PC s The j-th word in the process, PC sj ∈PB j And PC s ≠P; Execute S730; The value of s is from 1 to H, H=f(1)*f(2)*…*f(j)*…*f(m)-1; S730, obtains PC from the second setting corpus. sj The third target statement, to obtain PC sj The statement set WC sj =(wc 1 sj wc 2 sj , ..., wc u sj , ..., wc f(sj) sj wc u sj For WC sj The u-th third target statement in the context, where u takes values ​​from 1 to f(sj), and f(sj) is WC. sj The number of third target statements in the text; S740, Obtain the result set of the target statement T = (T1, T2, ..., T...). s ,…,T H The result T of the s-th target statement s =(WC s1 ∩WC s2 ∩…∩WC sj ∩…∩WC sm If at least one target statement in T has a non-Null result, then the non-Null target statement result is used as the fourth output result, and S900 is executed. S900 takes at least a portion of the first output result, the second output result, and the fourth output result as the final output result and outputs it.

3. The method according to claim 2, characterized in that, The results of target statements that are not null are included as the fourth output: If the combined word segmentation set corresponding to the target statement result that is not null in T includes the word segmentation in P, then the third target statement is obtained from the combined word segmentation set that includes the word segmentation in P as the fourth output result.

4. The method according to claim 2, characterized in that, S740 also includes: if T is null, execute S741; S741, Obtain keywords from P; the keywords are words obtained from word segmentation in P according to preset rules; S742, retrieve the fourth target statement corresponding to the keyword from the second set corpus, and use the retrieved fourth target statement as the fifth output result, then execute S1000; S1000, take at least a portion of the first output result, the second output result, and the fifth output result as the final output result, and output them.

5. The method according to claim 2, characterized in that, S740 also includes: if T is null, execute S743; S743, Based on the set keyword list, obtain the keywords in P; execute S744; S744, Obtain the fifth target statement corresponding to the keywords in P from the second set corpus, and use the obtained fifth target statement as the fifth output result, execute S1001; S1001, take at least a portion of the first output result, the second output result, and the fifth output result as the final output result, and output them.

6. The method according to claim 1, characterized in that, S700 also includes: if W1∩W2∩…∩W j ∩…∩W m If the value is null, then perform the following steps: S711, Obtain keywords from P; the keywords are words obtained from word segmentation in P according to preset rules; S712, retrieve the sixth target statement corresponding to the keyword in P from the second set corpus, and use the retrieved sixth target statement as the fourth output result, then execute S820; S820 takes at least a portion of the first output result, the second output result, and the fourth output result as the final output result and outputs it.

7. The method according to claim 1, characterized in that, In S800, the first output result includes A1 fixed statements, the second output result includes A2 first target statements, A1+A2=N, and N is the set number of output statements; In S810, the first output includes B1 fixed statements, the second output includes B2 first target statements, and the third output includes B3 second target statements. B1+B2+B3 =N.

8. The method according to claim 1, characterized in that, The first corpus is a prefix tree corpus.

9. A non-transitory computer-readable storage medium, wherein the storage medium stores at least one instruction or at least one program segment, characterized in that, The at least one instruction or the at least one program segment is loaded and executed by the processor to implement the method as described in any one of claims 1-8.

10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.

Citation Information

Patent Citations

  • Input association method for civil aviation intelligent question and answer, electronic equipment and storage medium

    CN115840510A