Information recommendation method and device based on Chinese character intelligent input, equipment and medium
Through the intelligent Chinese character input method, Chinese pinyin characters are obtained and strange character input mode is activated, candidate Chinese character sets are obtained, and text prediction model is used for intelligent expansion, which solves the efficiency problem of users when entering complex Chinese characters in artificial intelligence tools, and achieves rapid acquisition of recommended information.
Patent Information
- Application Number
- CN202510531054.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-22
AI Technical Summary
When a user enters Chinese characters into the input box of an artificial intelligence tool, when encountering complex Chinese characters and does not know their pinyin, he needs to use other tools to query the pinyin, resulting in a decrease in the entry efficiency.
Through the intelligent Chinese character input method, the current Chinese pinyin characters are obtained, the unfamiliar character input mode is activated, the candidate Chinese character character set is obtained, and the text prediction model is used for intelligent expansion to obtain recommended information.
Quickly complete complex Chinese character entry during user input, avoid affecting the entry of complete Chinese character strings and improve information recommendation efficiency.
Smart Images

Figure CN120353349A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing technology of artificial intelligence, and in particular to an information recommendation method, device, equipment and medium based on Chinese character intelligent input. Background Art
[0002] At present, artificial intelligence tools have been widely used in users' daily lives. Generally, when using artificial intelligence tools, users enter Chinese characters or English characters as prompt words in the corresponding input box to obtain the corresponding reply information of the artificial intelligence tool. Among them, when the user inputs: 1) forgetting the accurate pinyin of Chinese characters; 2) Chinese characters are too complex and do not know their accurate pinyin; 3) only knowing the information of common word or sentence formation, but not knowing their accurate pinyin; 4) it is inconvenient to switch the voice input mode in the current usage scenario, such as when the user has a voice defect, in order to query the pinyin of the Chinese character, the user needs to switch to other tools (such as search engines), and then edit the information related to the Chinese character (such as radicals, decomposition information, etc.), and finally query the pinyin of the Chinese character based on other tools to enable the user to complete the Chinese character input operation. The above process is used to realize the pinyin input of complex Chinese characters, which causes users to use other tools to query the pinyin of complex Chinese characters to ensure the entry of complete Chinese character strings, reducing the efficiency of users to quickly obtain recommended information through artificial intelligence tools. Summary of the invention
[0003] The embodiments of the present invention provide an information recommendation method, device, equipment and medium based on intelligent input of Chinese characters, aiming to solve the problem in the prior art that when a user encounters a complex Chinese character and does not know its pinyin during the process of inputting Chinese characters into the input box of an artificial intelligence tool, the user needs to use other tools to query the pinyin of the complex Chinese character to ensure the entry of a complete Chinese character string, which reduces the efficiency of the user in quickly obtaining recommended information through the artificial intelligence tool.
[0004] In a first aspect, an embodiment of the present invention provides an information recommendation method based on Chinese character intelligent input, which includes:
[0005] In response to the Chinese character intelligent input instruction, obtaining the current Chinese pinyin character corresponding to the Chinese character intelligent input instruction;
[0006] If it is determined that the current Chinese Pinyin character is the first preset character, then starting the unfamiliar character input mode;
[0007] Obtaining a current character string entered by a user, and obtaining a number of candidate Chinese characters corresponding to the current character string in a local Chinese character library, and forming a candidate Chinese character set;
[0008] Obtain the current Chinese character selection object of the user for the candidate Chinese character character set, and use the current Chinese character selection object as the current target Chinese character;
[0009] If an intelligent expansion instruction is detected, obtain the current context data corresponding to the current target Chinese character, and input the current target Chinese character and the current context data into a pre-trained text prediction model to obtain an intelligent expansion text corresponding to the current target Chinese character as the current recommended information.
[0010] In a second aspect, an information recommendation device based on intelligent Chinese character input according to an embodiment of the present invention further includes:
[0011] A Chinese pinyin character acquisition unit, configured to acquire the current Chinese pinyin character corresponding to the Chinese character intelligent input instruction in response to the Chinese character intelligent input instruction;
[0012] A rare Chinese character input mode startup unit, configured to start a rare Chinese character input mode if it is determined that the current Chinese pinyin character is a first preset character;
[0013] A candidate Chinese character character set acquisition unit, configured to acquire the current string input by the user, and acquire a plurality of candidate Chinese characters corresponding to the current string in a local Chinese character library, and form a candidate Chinese character character set;
[0014] A current target Chinese character acquisition unit, configured to acquire the current Chinese character selection object of the user for the candidate Chinese character character set, and use the current Chinese character selection object as the current target Chinese character;
[0015] An intelligent recommendation information acquisition unit, configured to, if an intelligent expansion instruction is detected, acquire the current context data corresponding to the current target Chinese character, and input the current target Chinese character and the current context data into a pre-trained text prediction model to obtain an intelligent expansion text corresponding to the current target Chinese character as the current recommended information.
[0016] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, and a computer program is stored on the memory, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, and the computer storage medium stores a computer program, and the computer program includes program instructions, and when the program instructions are executed by a processor, the method described in the first aspect can be implemented.
[0018] The embodiments of the present invention provide an information recommendation method, device, equipment and medium based on intelligent Chinese character input. The method includes: in response to an intelligent Chinese character input instruction, obtaining the current Chinese pinyin characters corresponding to the intelligent Chinese character input instruction; if it is determined that the current Chinese pinyin characters are the first preset characters, starting a rare character input mode; obtaining the current string input by the user, and obtaining a plurality of candidate Chinese character characters corresponding to the current string in the local Chinese character library, and forming a candidate Chinese character character set; obtaining the current Chinese character selection object of the user for the candidate Chinese character character set, and using the current Chinese character selection object as the current target Chinese character; if an intelligent expansion instruction is detected, obtaining the current context data corresponding to the current target Chinese character, and inputting the current target Chinese character and the current context data into a pre-trained text prediction model to obtain an intelligent expansion text corresponding to the current target Chinese character as the current recommended information. The embodiments of the present invention can more quickly complete the input of complex Chinese characters based on the rare character input mode during the process of the user inputting Chinese character text using pinyin, avoiding affecting the input of the current complete Chinese character string, so as to more quickly obtain the recommended information recommended by the system and related to the input Chinese character information. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 It is a schematic diagram of the application scenario of the information recommendation method based on intelligent Chinese character input provided by the embodiments of the present invention;
[0021] Figure 2 It is a schematic flowchart of the information recommendation method based on intelligent Chinese character input provided by the embodiments of the present invention;
[0022] Figure 3 It is a schematic sub-flowchart of the information recommendation method based on intelligent Chinese character input provided by the embodiments of the present invention;
[0023] Figure 4 It is a schematic sub-flowchart of the information recommendation method based on intelligent Chinese character input provided by the embodiments of the present invention;
[0024] Figure 5 It is a schematic sub-flowchart of the information recommendation method based on intelligent Chinese character input provided by the embodiments of the present invention;
[0025] Figure 6 It is a schematic sub-flowchart of the information recommendation method based on intelligent Chinese character input provided by the embodiments of the present invention;
[0026] Figure 7 Schematic block diagram of an information recommendation device based on intelligent Chinese character input provided by an embodiment of the present invention;
[0027] Figure 8 Schematic block diagram of a computer device provided by an embodiment of the present invention. Detailed implementation manners
[0028] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0029] It should be understood that when used in this specification and the appended claims, the terms "comprises" and "comprising" indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0030] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in this specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.
[0031] It should be further understood that the term " / and / " as used in this specification of the present invention and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0032] Please refer to both Figure 1 and Figure 2 where Figure 1 is a schematic diagram of the scenario of the information recommendation method based on intelligent Chinese character input according to an embodiment of the present invention, Figure 2 is a schematic flowchart of the information recommendation method based on intelligent Chinese character input provided by an embodiment of the present invention. As Figure 1 shown, the information recommendation method based on intelligent Chinese character input provided by an embodiment of the present invention is applied to the server 10, and the user terminal 20 is communicatively connected to the server 10.
[0033] As Figure 2 shown, the method includes the following steps S110-S150.
[0034] S110. In response to an intelligent Chinese character input instruction, obtain the current Chinese pinyin characters corresponding to the intelligent Chinese character input instruction.
[0035] In this embodiment, the technical solution is described with the server as the execution subject. An artificial intelligence tool is installed in the user terminal, and the artificial intelligence tool supports intelligent input of Chinese characters. When the user terminal uses the artificial intelligence tool, it is essentially accessing the server corresponding to the artificial intelligence tool. When the user opens the artificial intelligence tool to input text information as a prompt word, if the input box of the artificial intelligence tool also supports the opening of intelligent input of Chinese characters, it will detect in real time whether the user enters the input box of the artificial intelligence tool with a specific pinyin character as the starting character during the continuous pinyin character input process. Through this detection, it can be further determined whether the unfamiliar character input mode is enabled.
[0036] S120: If it is determined that the current Chinese Pinyin character is the first preset character, start an unfamiliar character input mode.
[0037] In this embodiment, the first preset character can be preset as v. When the user inputs v as the starting character into the input box of the artificial intelligence tool during the continuous pinyin character input process, the input interface of the artificial intelligence tool can prompt that the unfamiliar character input mode is about to be started. For example, when the user uses Chinese characters, although many Chinese characters are very common, the user does not know how to read them. For example, the user may know how to write the word "娲", but does not know how to read and spell it. When the user enters the first preset character, the letter v, the unfamiliar character input mode is started. By starting the unfamiliar character input mode in the above manner, it is convenient for users to operate quickly.
[0038] In one embodiment, after step S120, the method further includes:
[0039] The first input box and the second input box are correspondingly started according to the unfamiliar character input mode; wherein, the first input box is used to prompt and collect the decomposed Chinese character pinyin string of the unfamiliar Chinese character input by the user, and the second input box is used to prompt and collect the word-related characters and / or sentence-related characters of the unfamiliar Chinese character input by the user.
[0040] In this embodiment, after the unfamiliar character input mode has been activated, in order to facilitate the user to start entering information related to complex Chinese characters, at least the first input box and the second input box are activated correspondingly according to the unfamiliar character input mode, and the first input box and the second input box are displayed in different areas on the current user interaction interface of the user terminal. The user can be prompted to enter the decomposed Chinese character pinyin string of the unfamiliar Chinese character through a prompt message in the upper left corner area of the first input box (for example, the decomposed Chinese character pinyin character corresponding to the above example "娘" is kounv, or nvkou), and the user can also be prompted to enter the word-combination associated characters and / or sentence-combination associated characters through a prompt message in the upper left corner area of the second input box (for example, the word-combination associated characters corresponding to the above example "娘" is "囝", and the sentence-combination associated characters are "是上海对话的父小女孩的亲情称"). The user can complete the input of the complex Chinese character associated information by entering the corresponding information in at least one of the first input box and the second input box.
[0041] S130, obtaining a current character string input by a user, and obtaining a number of candidate Chinese characters corresponding to the current character string in a local Chinese character library, and forming a candidate Chinese character set.
[0042] In this embodiment, the current character string input by the user is detected based on the first input box and / or the second input box in the above example. When the input of the current character string is completed, the current character string can be used as input information or search conditions and a number of candidate Chinese characters corresponding to the current character string can be obtained in the local Chinese character library. After the above-mentioned several candidate Chinese characters form a candidate Chinese character set, several candidate Chinese characters in the candidate Chinese character set can be displayed separately in the display box on the user interaction interface of the user terminal.
[0043] In one embodiment, if Figure 3 As shown, step S130 includes:
[0044] S131, if it is detected that the current character string is extracted from the first input box, then obtaining a corresponding decomposed Chinese character pinyin character string, and using the decomposed Chinese character pinyin character string as a search condition to obtain a corresponding plurality of candidate Chinese characters in the Chinese character library;
[0045] S132. If it is detected that the current character string is extracted from the second input box, the corresponding word-combination associated characters and / or sentence-combination associated characters are obtained, and a number of corresponding candidate Chinese characters are obtained in the Chinese character library using the word-combination associated characters and / or sentence-combination associated characters.
[0046] In this embodiment, if it is detected that the current character string is extracted from the first input box, it means that the user inputs the decomposed Chinese character pinyin character string corresponding to the complex Chinese character to be input (such as kounv or nvkou in the above example). At this time, the decomposed Chinese character pinyin character string extracted from the first input box is first obtained, and the decomposed Chinese character pinyin character string is used as a search condition to obtain the corresponding candidate Chinese characters in the Chinese character library. For example, in order to improve the efficiency of data retrieval, a complex Chinese character library can be pre-set in the Chinese character library, and a plurality of uncommon Chinese characters are stored in the complex Chinese character library, and the decomposed Chinese character pinyin character string is pre-stored for each Chinese character in the complex Chinese character library (for example, in the complex Chinese character library, the decomposed Chinese character pinyin character string such as kounv, nvkou, goonv, and nvguo has been pre-stored), and then the decomposed Chinese character pinyin character string is used as a search condition in the complex Chinese character library to quickly retrieve and obtain a plurality of candidate Chinese characters.
[0047] If it is detected that the current character string is extracted from the second input box, it means that the user inputs the word-grouping associated characters and / or sentence-grouping associated characters corresponding to the complex Chinese characters to be input. For example, in the above example, the word-grouping associated characters corresponding to 少女 are 囝, and the sentence-grouping associated characters corresponding to 少女 are 小、是an affectionate name for little girls in Shanghai dialect. As long as the word-grouping associated characters extracted from the second input box are "囝", or the sentence-grouping associated characters extracted are "是an affectionate name for little girls in Shanghai dialect", the word-grouping associated characters and / or sentence-grouping associated characters can obtain the corresponding candidate Chinese characters in the Chinese character library. It can be seen that the above method can realize the use of the association information of complex Chinese characters to quickly obtain candidate Chinese characters that can be visually selected by users.
[0048] In one embodiment, if Figure 4 As shown, step S132 includes:
[0049] S1321: If it is determined that both the word-combination associated character and the sentence-combination associated character are non-null values, obtaining a first semantic vector corresponding to the word-combination associated character, and obtaining a second semantic vector corresponding to the sentence-combination associated character;
[0050] S1322, obtaining a complex Chinese character library in the Chinese character library, and obtaining an associated phrase semantic vector and an associated sentence semantic vector of each Chinese character in the complex Chinese character library;
[0051] S1323. If it is determined that the first similarity between the associated phrase semantic vector of the Chinese character and the first semantic vector exceeds a first preset similarity threshold, and the second similarity between the associated sentence semantic vector of the Chinese character and the second semantic vector exceeds a second preset similarity threshold, the corresponding Chinese character is obtained as a candidate Chinese character.
[0052] In this embodiment, if it is determined that both the word-grouping associated character and the sentence-grouping associated character are non-empty values, it means that the user has input both the word-grouping associated character and the sentence-grouping associated character in the second input box. At this time, the first semantic vector corresponding to the word-grouping associated character is first obtained, and the second semantic vector corresponding to the sentence-grouping associated character is obtained. After that, a complex Chinese character library is obtained as a sub-library in the Chinese character library (wherein the total number of Chinese characters included in the complex Chinese character library is less than the total number of Chinese characters included in the Chinese character library), and each Chinese character in the complex Chinese character library has pre-stored associated phrase semantic vectors and associated sentence semantic vectors. Finally, Chinese characters can be screened out in the complex Chinese character library, whose first similarity between the associated phrase semantic vector and the first semantic vector exceeds a first preset similarity threshold (e.g., the cosine similarity between the associated phrase semantic vector and the first semantic vector can be calculated as the similarity between the two), and whose second similarity between the associated sentence semantic vector and the second semantic vector exceeds a second preset similarity threshold (e.g., the cosine similarity between the associated sentence semantic vector and the second semantic vector can also be calculated as the similarity between the two), and Chinese characters that meet the above conditions are screened out as candidate Chinese characters. It can be seen that the above method can quickly determine the candidate Chinese characters of the current character string based on the similarity of the semantic vectors.
[0053] S140, obtaining the user's current Chinese character selection object for the candidate Chinese character set, and using the current Chinese character selection object as the current target Chinese character.
[0054] In this embodiment, when the user selects the current Chinese character selected object in the displayed candidate Chinese character set, the current Chinese character selected object selected by the user is used as the current target Chinese character. For example, still referring to the above example, the candidate Chinese character set includes the characters "娲" and "如", and the user selects the character "娲" from the above two characters, then the character "娲" is finally used as the current target Chinese character.
[0055] S150. If an intelligent expansion instruction is detected, current context data corresponding to the current target Chinese character is obtained, and the current target Chinese character and the current context data are input into a pre-trained text prediction model to obtain an intelligent expansion text corresponding to the current target Chinese character as current recommendation information.
[0056] In this embodiment, a pre-trained text prediction model (such as a convolutional neural network, a deep neural network, etc.) can be stored locally first, and the current context data corresponding to the current target Chinese character and the input text consisting of the current target Chinese character can be input into the text prediction model to obtain the intelligent expanded text corresponding to the current target Chinese character.
[0057] In one embodiment, if Figure 5As shown, step S150 includes:
[0058] S151. Obtain the current context data corresponding to the current target Chinese character, and obtain the current input text composed of the current context data and the current target Chinese character;
[0059] S152. Based on a pre-trained text domain classification model, obtain the text technology field corresponding to the current input text;
[0060] S153. Determine the target text sub-prediction model corresponding to the text technology field in the text prediction model including multiple text sub-prediction models;
[0061] S154. Input the current input text into the target text sub-prediction model to obtain the intelligent expanded text and use it as the current recommended information.
[0062] In this embodiment, in the dialog box of the artificial intelligence tool, the conversation range to which the current target Chinese character belongs can be obtained (for example, if the user has entered multiple sentences before the current target Chinese character and they belong to the same dialog box as the current target Chinese character, then the above multiple sentences serve as the current context data corresponding to the current target Chinese character), and the current context data corresponding to the current target Chinese character is determined based on this conversation range. After determining the current context data corresponding to the current target Chinese character, the current input text is composed of the current context data and the current target Chinese character. Then, the text technology field corresponding to the current input text can be obtained based on the text domain classification model first. After determining the text technology field corresponding to the current input text, the target text sub-prediction model corresponding to the text technology field can be determined from the text prediction model including multiple text sub-prediction models. The obtained target text sub-prediction model can be closer to the actual text needs of the user and perform text expansion according to the current input text, so as to obtain the intelligent expanded text and use it as the current recommended information.
[0063] In one embodiment, the text domain classification model is an intent recognition model. As Figure 6 shown, step S152 includes:
[0064] S1521. Obtain the current text feature vector of the current input text;
[0065] S1522. Input the current text feature vector into the intent recognition model to obtain the text technology field.
[0066] In this embodiment, in order to more accurately identify the text technical field corresponding to the current input text, the current text feature vector of the current input text can be input into the intention recognition model specifically adopted by the text field classification model, and the text technical field can be quickly identified through the intention recognition model.
[0067] Specifically, when constructing the intention recognition model, a tree-like classification structure can be established first (such as robot - robotic arm, artificial intelligence - large language processing, etc. The above examples are only for simple illustration, and the tree-like classification structure is more complex in actual implementation. For example, each large technical field corresponds to a tree node, and generally there are 3 - 10 sub-technical fields under this tree node), which is used as the technical field division system. Then, the classification model corresponding to this tree-like classification structure is trained in combination with the prepared training set, so as to obtain an intention recognition model that can recognize the text corresponding technical field. Moreover, after determining the text technical field corresponding to the current input text, the target text sub-prediction model corresponding to the text technical field is determined from the text prediction model including multiple text sub-prediction models. This is a model that is more suitable for text expansion of the current input text to obtain recommended information, and the obtained recommended information is more relevant to the technical field of the current input text.
[0068] In one embodiment, after step S140, it further includes:
[0069] If an intelligent recommendation instruction is detected, the approximate Chinese character characters and the pinyin string of the approximate Chinese character characters corresponding to the current target Chinese character are obtained.
[0070] In this embodiment, when the user needs to associate and learn approximate Chinese character characters for this current target Chinese character, the virtual button for recommending approximate Chinese characters on the user interaction interface of the artificial intelligence tool is pressed to generate an intelligent recommendation instruction, and then the approximate Chinese character characters and the pinyin string of the approximate Chinese character characters corresponding to the current target Chinese character are obtained based on the current target Chinese character in the Chinese character library. Specifically, any pinyin string of a Chinese character whose similarity to the pinyin string of the current target Chinese character exceeds the preset similarity threshold can be used as the pinyin string of the approximate Chinese character characters.
[0071] It can be seen that the embodiment of implementing this method can more quickly complete the input of complex Chinese characters based on the unfamiliar character input mode during the process of the user inputting Chinese character text using pinyin, avoiding affecting the input of the current complete Chinese character string, and thus can more quickly obtain the recommended information recommended by the system and related to the input Chinese character information.
[0072] Figure 7 It is a schematic block diagram of an information recommendation device based on intelligent Chinese character input provided by an embodiment of the present invention. As Figure 7As shown, corresponding to the above information recommendation method based on Chinese character intelligent input, the present invention also provides an information recommendation device 100 based on Chinese character intelligent input. The information recommendation device 100 based on Chinese character intelligent input includes a unit for executing the above information recommendation method based on Chinese character intelligent input. Figure 7 The information recommendation device 100 based on Chinese character intelligent input includes: a Chinese pinyin character acquisition unit 110, an unfamiliar character input mode activation unit 120, a candidate Chinese character set acquisition unit 130, a current target Chinese character acquisition unit 140 and an intelligent recommendation information acquisition unit 150.
[0073] The Chinese Pinyin character acquisition unit 110 is used to respond to the Chinese character intelligent input instruction and acquire the current Chinese Pinyin character corresponding to the Chinese character intelligent input instruction.
[0074] In this embodiment, the technical solution is described with the server as the execution subject. An artificial intelligence tool is installed in the user terminal, and the artificial intelligence tool supports intelligent input of Chinese characters. When the user terminal uses the artificial intelligence tool, it is essentially accessing the server corresponding to the artificial intelligence tool. When the user opens the artificial intelligence tool to input text information as a prompt word, if the input box of the artificial intelligence tool also supports the opening of intelligent input of Chinese characters, it will detect in real time whether the user enters the input box of the artificial intelligence tool with a specific pinyin character as the starting character during the continuous pinyin character input process. Through this detection, it can be further determined whether the unfamiliar character input mode is enabled.
[0075] The unfamiliar character input mode activation unit 120 is used to activate the unfamiliar character input mode if it is determined that the current Chinese pinyin character is the first preset character.
[0076] In this embodiment, the first preset character can be preset as v. When the user inputs v as the starting character into the input box of the artificial intelligence tool during the continuous pinyin character input process, the input interface of the artificial intelligence tool can prompt that the unfamiliar character input mode is about to be started. For example, when the user uses Chinese characters, although many Chinese characters are very common, the user does not know how to read them. For example, the user may know how to write the word "娲", but does not know how to read and spell it. When the user enters the first preset character, the letter v, the unfamiliar character input mode is started. By starting the unfamiliar character input mode in the above manner, it is convenient for users to operate quickly.
[0077] In one embodiment, the information recommendation device 100 based on Chinese character intelligent input further includes:
[0078] An input box activation unit is used to activate the first input box and the second input box according to the unfamiliar character input mode; wherein the first input box is used to prompt and collect the decomposed Chinese character pinyin string of the unfamiliar Chinese character input by the user, and the second input box is used to prompt and collect the word-related characters and / or sentence-related characters of the unfamiliar Chinese character input by the user.
[0079] In this embodiment, after the unfamiliar character input mode has been activated, in order to facilitate the user to start entering information related to complex Chinese characters, at least the first input box and the second input box are activated correspondingly according to the unfamiliar character input mode, and the first input box and the second input box are displayed in different areas on the current user interaction interface of the user terminal. The user can be prompted to enter the decomposed Chinese character pinyin string of the unfamiliar Chinese character through a prompt message in the upper left corner area of the first input box (for example, the decomposed Chinese character pinyin character corresponding to the above example "娲" is kounv, or nvkou), and the user can also be prompted to enter the word-combination associated character and / or sentence-combination associated character through a prompt message in the upper left corner area of the second input box (for example, the word-combination associated character corresponding to the above example "娘" is "囝", and the sentence-combination associated character is "是上海对话的父小女孩的亲情称"). The user can complete the input of the complex Chinese character associated information by entering the corresponding information in at least one of the first input box and the second input box.
[0080] The candidate Chinese character set acquisition unit 130 is used to acquire the current character string input by the user, and acquire a number of candidate Chinese characters corresponding to the current character string in the local Chinese character library to form a candidate Chinese character set.
[0081] In this embodiment, the current character string input by the user is detected based on the first input box and / or the second input box in the above example. When the input of the current character string is completed, the current character string can be used as input information or search conditions and a number of candidate Chinese characters corresponding to the current character string can be obtained in the local Chinese character library. After the above-mentioned several candidate Chinese characters form a candidate Chinese character set, several candidate Chinese characters in the candidate Chinese character set can be displayed separately in the display box on the user interaction interface of the user terminal.
[0082] In one embodiment, the candidate Chinese character set acquisition unit 130 is used to:
[0083] If it is detected that the current character string is extracted from the first input box, the corresponding decomposed Chinese character pinyin character string is obtained, and the decomposed Chinese character pinyin character string is used as a search condition to obtain a corresponding number of candidate Chinese characters in the Chinese character library;
[0084] If it is detected that the current character string is extracted from the second input box, the corresponding word-combination associated characters and / or sentence-combination associated characters are obtained, and a number of corresponding candidate Chinese characters are obtained in the Chinese character library using the word-combination associated characters and / or sentence-combination associated characters.
[0085] In this embodiment, if it is detected that the current character string is extracted from the first input box, it means that the user inputs the decomposed Chinese character pinyin character string corresponding to the complex Chinese character to be input (such as kounv or nvkou in the above example). At this time, the decomposed Chinese character pinyin character string extracted from the first input box is first obtained, and the decomposed Chinese character pinyin character string is used as a search condition to obtain the corresponding candidate Chinese characters in the Chinese character library. For example, in order to improve the efficiency of data retrieval, a complex Chinese character library can be pre-set in the Chinese character library, and a plurality of uncommon Chinese characters are stored in the complex Chinese character library, and the decomposed Chinese character pinyin character string is pre-stored for each Chinese character in the complex Chinese character library (for example, in the complex Chinese character library, the decomposed Chinese character pinyin character string such as kounv, nvkou, goonv, and nvguo has been pre-stored), and then the decomposed Chinese character pinyin character string is used as a search condition in the complex Chinese character library to quickly retrieve and obtain a plurality of candidate Chinese characters.
[0086] If it is detected that the current character string is extracted from the second input box, it means that the user inputs the word-grouping associated characters and / or sentence-grouping associated characters corresponding to the complex Chinese characters to be input. For example, in the above example, the word-grouping associated characters corresponding to 少女 are 囝, and the sentence-grouping associated characters corresponding to 少女 are 小、是an affectionate name for little girls in Shanghai dialect. As long as the word-grouping associated characters extracted from the second input box are "囝", or the sentence-grouping associated characters extracted are "是an affectionate name for little girls in Shanghai dialect", the word-grouping associated characters and / or sentence-grouping associated characters can obtain the corresponding candidate Chinese characters in the Chinese character library. It can be seen that the above method can realize the use of the association information of complex Chinese characters to quickly obtain candidate Chinese characters that can be visually selected by users.
[0087] In one embodiment, if it is detected that the current character string is extracted from the second input box, the corresponding word-combination associated characters and / or sentence-combination associated characters are obtained, and a number of corresponding candidate Chinese characters are obtained in the Chinese character library using the word-combination associated characters and / or sentence-combination associated characters, including:
[0088] If it is determined that both the word-grouping associated character and the sentence-grouping associated character are non-null values, obtaining a first semantic vector corresponding to the word-grouping associated character, and obtaining a second semantic vector corresponding to the sentence-grouping associated character;
[0089] Acquire a complex Chinese character library in the Chinese character library, and acquire an associated phrase semantic vector and an associated sentence semantic vector of each Chinese character in the complex Chinese character library;
[0090] If it is determined that the first similarity between the associated phrase semantic vector of a Chinese character and the first semantic vector exceeds a first preset similarity threshold, and the second similarity between the associated sentence semantic vector of the Chinese character and the second semantic vector exceeds a second preset similarity threshold, the corresponding Chinese character is obtained as a candidate Chinese character.
[0091] In this embodiment, if it is determined that both the word-grouping associated character and the sentence-grouping associated character are non-empty values, it means that the user has input both the word-grouping associated character and the sentence-grouping associated character in the second input box. At this time, the first semantic vector corresponding to the word-grouping associated character is first obtained, and the second semantic vector corresponding to the sentence-grouping associated character is obtained. After that, a complex Chinese character library is obtained as a sub-library in the Chinese character library (wherein the total number of Chinese characters included in the complex Chinese character library is less than the total number of Chinese characters included in the Chinese character library), and each Chinese character in the complex Chinese character library has pre-stored associated phrase semantic vectors and associated sentence semantic vectors. Finally, Chinese characters can be screened out in the complex Chinese character library, whose first similarity between the associated phrase semantic vector and the first semantic vector exceeds a first preset similarity threshold (e.g., the cosine similarity between the associated phrase semantic vector and the first semantic vector can be calculated as the similarity between the two), and whose second similarity between the associated sentence semantic vector and the second semantic vector exceeds a second preset similarity threshold (e.g., the cosine similarity between the associated sentence semantic vector and the second semantic vector can also be calculated as the similarity between the two), and Chinese characters that meet the above conditions are screened out as candidate Chinese characters. It can be seen that the above method can quickly determine the candidate Chinese characters of the current character string based on the similarity of the semantic vectors.
[0092] The current target Chinese character acquisition unit 140 is used to acquire the current Chinese character selected by the user for the candidate Chinese character set, and use the current Chinese character selected as the current target Chinese character.
[0093] In this embodiment, when the user selects the current Chinese character selected object in the displayed candidate Chinese character set, the current Chinese character selected object selected by the user is used as the current target Chinese character. For example, still referring to the above example, the candidate Chinese character set includes the characters "娲" and "如", and the user selects the character "娲" from the above two characters, then the character "娲" is finally used as the current target Chinese character.
[0094] The intelligent recommendation information acquisition unit 150 is configured to, if an intelligent expansion instruction is detected, acquire the current context data corresponding to the current target Chinese character, and input the current target Chinese character and the current context data into a pre-trained text prediction model to obtain an intelligent expansion text corresponding to the current target Chinese character as the current recommendation information.
[0095] In this embodiment, a pre-trained text prediction model (such as a convolutional neural network, a deep neural network, etc.) can be stored locally in advance. The input text composed of the acquired current context data corresponding to the current target Chinese character and the current target Chinese character is input into the text prediction model, and then an intelligent expansion text corresponding to the current target Chinese character can be obtained.
[0096] In one embodiment, the intelligent recommendation information acquisition unit 150 is configured to:
[0097] Acquire the current context data corresponding to the current target Chinese character, and acquire the current input text composed of the current context data and the current target Chinese character;
[0098] Acquire the text technical field corresponding to the current input text based on a pre-trained text field classification model;
[0099] Determine a target text sub-prediction model corresponding to the text technical field in the text prediction model including multiple text sub-prediction models;
[0100] Input the current input text into the target text sub-prediction model to obtain the intelligent expansion text and use it as the current recommendation information.
[0101] In this embodiment, the dialogue range to which the current target Chinese character belongs can be obtained in the dialogue box of the artificial intelligence tool (for example, if the user has entered multiple sentences before the current target Chinese character and they belong to the same dialogue box as the current target Chinese character, then the above multiple sentences serve as the current context data corresponding to the current target Chinese character), and the current context data corresponding to the current target Chinese character is determined based on this dialogue range. After determining the current context data corresponding to the current target Chinese character, the current input text is composed of the current context data and the current target Chinese character. Then, the text technical field corresponding to the current input text can be acquired based on the text field classification model first. After determining the text technical field corresponding to the current input text, the target text sub-prediction model corresponding to the text technical field can be determined from the text prediction model including multiple text sub-prediction models. The obtained target text sub-prediction model can be closer to the actual text needs of the user and perform text expansion according to the current input text, so as to obtain the intelligent expansion text and use it as the current recommendation information.
[0102] In one embodiment, the text domain classification model is an intent recognition model. Obtaining the text technical field corresponding to the current input text based on the pre-trained text domain classification model includes:
[0103] Obtain the current text feature vector of the current input text;
[0104] Input the current text feature vector into the intent recognition model to obtain the text technical field.
[0105] In this embodiment, in order to more accurately identify the text technical field corresponding to the current input text, the current text feature vector of the current input text can be input into the intent recognition model specifically adopted by the text domain classification model, and the text technical field can be quickly identified through the intent recognition model.
[0106] Specifically, when constructing the intent recognition model, a tree-like classification structure can be established first (such as robot - robotic arm, artificial intelligence - large language processing, etc. The above examples are only for simple illustration, and the tree-like classification structure is more complex in actual implementation. For example, each large technical field corresponds to a tree node, and there are generally 3 - 10 sub-technical fields under this tree node) as the technical field division system, and then the classification model corresponding to this tree-like classification structure is trained in combination with the prepared training set to obtain an intent recognition model that can identify the text corresponding technical field. Moreover, after determining the text technical field corresponding to the current input text, the target text sub-prediction model determined from the text prediction model including multiple text sub-prediction models and corresponding to the text technical field is a model more suitable for text expansion of the current input text to obtain recommended information, and the obtained recommended information is more relevant to the technical field of the current input text.
[0107] In one embodiment, the information recommendation device 100 based on intelligent Chinese character input further includes:
[0108] An intelligent recommendation unit, if an intelligent recommendation instruction is detected, obtain approximate Chinese character characters and approximate Chinese character pinyin strings corresponding to the current target Chinese character.
[0109] In this embodiment, when the user needs to learn approximate Chinese character characters associated with the current target Chinese character, press the virtual button for recommending approximate Chinese characters on the user interface of the artificial intelligence tool to generate an intelligent recommendation instruction, and then obtain approximate Chinese character characters and approximate Chinese character pinyin strings corresponding to the current target Chinese character from the Chinese character library based on the current target Chinese character. Specifically, any Chinese character pinyin string with a similarity exceeding a preset similarity threshold to the Chinese character pinyin string of the current target Chinese character can be used as the approximate Chinese character pinyin string.
[0110] It can be seen that the embodiments of implementing this device can more quickly complete the input of complex Chinese characters based on the unfamiliar character input mode during the process of a user inputting Chinese character text using pinyin, avoiding affecting the input of the current complete Chinese character string, and thus can more quickly obtain the recommended information recommended by the system and related to the input Chinese character information.
[0111] The above-mentioned information recommendation device based on intelligent Chinese character input can be implemented in the form of a computer program, and this computer program can run on a computer device as shown in Figure 8 the following.
[0112] Please refer to Figure 8 , Figure 8 which is a schematic block diagram of a computer device provided by an embodiment of the present invention. This computer device integrates any one of the information recommendation devices based on intelligent Chinese character input provided by the embodiments of the present invention.
[0113] Referring to Figure 8 , the computer device 400 includes a processor 402, a memory, and a network interface 405 connected through a system bus 401. Among them, the memory may include a storage medium 403 and an internal memory 404.
[0114] The storage medium 403 can store an operating system 4031 and a computer program 4032. This computer program 4032 includes program instructions, and when these program instructions are executed, the processor 402 can be made to execute an information recommendation method based on intelligent Chinese character input.
[0115] The processor 402 is used to provide computing and control capabilities to support the operation of the entire computer device.
[0116] The internal memory 404 provides an environment for the operation of the computer program 4032 in the storage medium 403. When this computer program 4032 is executed by the processor 402, the processor 402 can be made to execute the above-mentioned information recommendation method based on intelligent Chinese character input.
[0117] The network interface 405 is used for network communication with other devices. Those skilled in the art can understand that Figure 8 the structure shown in
[0118] is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0119] It should be understood that in the embodiments of the present invention, the processor 402 may be a central processing unit (CPU), and the processor 402 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0120] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, and the storage medium is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0121] Therefore, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, where the computer program includes program instructions. When the program instructions are executed by the processor, the processor is caused to execute the information recommendation method based on intelligent Chinese character input as described above.
[0122] The storage medium may be various computer-readable storage media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disc that can store program codes.
[0123] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.
[0124] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0125] The steps in the method embodiments of the present invention can be adjusted, combined, and deleted according to actual needs. The units in the device embodiments of the present invention can be combined, divided, and deleted according to actual needs. In addition, the functional units in each embodiment of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.
[0127] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. An information recommendation method based on intelligent Chinese character input, characterized in that, Including: In response to a Chinese character intelligent input instruction, obtain the current Chinese pinyin characters corresponding to the Chinese character intelligent input instruction; If it is determined that the current Chinese pinyin characters are the first preset characters, start the unfamiliar character input mode; Obtain the current string entered by the user, and obtain several candidate Chinese character characters corresponding to the current string in the local Chinese character library, and form a candidate Chinese character character set; Obtain the current Chinese character selection object of the user for the candidate Chinese character character set, and use the current Chinese character selection object as the current target Chinese character; If an intelligent expansion instruction is detected, obtain the current context data corresponding to the current target Chinese character, and input the current target Chinese character and the current context data into a pre-trained text prediction model to obtain an intelligent expansion text corresponding to the current target Chinese character as the current recommended information.
2. The method according to claim 1, wherein After the step of if it is determined that the current Chinese pinyin characters are the first preset characters, start the unfamiliar character input mode, the method further includes: Correspondingly start a first input box and a second input box according to the unfamiliar character input mode; wherein, the first input box is used to prompt and collect the disassembled Chinese character pinyin string input by the user for an unfamiliar Chinese character, and the second input box is used to prompt and collect the word association characters and / or sentence association characters input by the user for the unfamiliar Chinese character.
3. The method according to claim 2, wherein The obtaining several candidate Chinese character characters corresponding to the current string in the local Chinese character library includes: If it is detected that the current string is extracted from the first input box, obtain the corresponding disassembled Chinese character pinyin string, and use the disassembled Chinese character pinyin string as a retrieval condition to obtain several corresponding candidate Chinese character characters in the Chinese character library; If it is detected that the current string is extracted from the second input box, obtain the corresponding word association characters and / or sentence association characters, and use the word association characters and / or sentence association characters to obtain several corresponding candidate Chinese character characters in the Chinese character library.
4. The method according to claim 3, characterized in that, The obtaining several candidate Chinese character characters corresponding to the word association characters and / or sentence association characters in the Chinese character library includes: If it is determined that both the word association characters and the sentence association characters are non-null values, obtain the first semantic vector corresponding to the word association characters, and obtain the second semantic vector corresponding to the sentence association characters; Obtain the complex Chinese character library in the Chinese character library, and obtain the associated word semantic vector and associated sentence semantic vector of each Chinese character in the complex Chinese character library; If it is determined that the first similarity between the associated word semantic vector of a Chinese character and the first semantic vector exceeds the first preset similarity threshold, and the second similarity between the associated sentence semantic vector of the Chinese character and the second semantic vector exceeds the second preset similarity threshold, obtain the corresponding Chinese character as a candidate Chinese character character.
5. The method according to claim 1, wherein The inputting the current target Chinese character and the current context data into a pre-trained text prediction model to obtain an intelligent expansion text corresponding to the current target Chinese character as the current recommended information includes: Obtain the current context data corresponding to the current target Chinese character, and obtain the current input text composed of the current context data and the current target Chinese character; Based on a pre-trained text domain classification model, obtain the text technical field corresponding to the current input text; Determine the target text sub-prediction model corresponding to the text technical field in the text prediction model including multiple text sub-prediction models; Input the current input text into the target text sub-prediction model to obtain the intelligent expanded text and use it as the current recommended information.
6. The method according to claim 5, wherein The text domain classification model is an intent recognition model; the obtaining of the text technical field corresponding to the current input text based on a pre-trained text domain classification model includes: Obtain the current text feature vector of the current input text; Input the current text feature vector into the intent recognition model to obtain the text technical field.
7. The method according to claim 1, characterized in that, After the step of obtaining the user's current Chinese character selection object for the candidate Chinese character set and using the current Chinese character selection object as the current target Chinese character, the method further includes: If an intelligent recommendation instruction is detected, obtain the approximate Chinese characters corresponding to the current target Chinese character and the approximate Chinese character pinyin string.
8. An information recommendation device based on intelligent Chinese character input, characterized in that, Include: A Chinese pinyin character acquisition unit, configured to, in response to a Chinese character intelligent input instruction, acquire the current Chinese pinyin character corresponding to the Chinese character intelligent input instruction; A unfamiliar character input mode activation unit, configured to activate the unfamiliar character input mode if it is determined that the current Chinese pinyin character is a first preset character; A candidate Chinese character set acquisition unit, configured to acquire the current string entered by the user, and acquire several candidate Chinese characters corresponding to the current string in the local Chinese character library, and form a candidate Chinese character set; A current target Chinese character acquisition unit, configured to acquire the user's current Chinese character selection object for the candidate Chinese character set and use the current Chinese character selection object as the current target Chinese character; An intelligent recommendation information acquisition unit, configured to, if an intelligent expansion instruction is detected, obtain the current context data corresponding to the current target Chinese character, and input the current target Chinese character and the current context data into a pre-trained text prediction model to obtain the intelligent expanded text corresponding to the current target Chinese character as the current recommended information.
9. A computer device, characterized in that, The computer device includes a memory and a processor, and a computer program is stored on the memory. When the processor executes the computer program, it implements the information recommendation method based on Chinese character intelligent input according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by the processor, the information recommendation method based on Chinese character intelligent input according to any one of claims 1-7 can be implemented.