Text input method, device, storage medium and electronic device
By obtaining information related to consulting events to generate motivations, and using the motivation-annotated corpus to search and sort candidate texts, the problems of low text input efficiency and accuracy in existing technologies are solved, and a more efficient and accurate text input experience is achieved.
Patent Information
- Application Number
- CN202210171668.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-02-24
AI Technical Summary
Existing text input methods generate a large number of candidate texts when the user inputs less text, resulting in low accuracy, and cannot generate candidate texts when the user does not input any text, resulting in low efficiency and affecting user experience.
By obtaining information related to the consulting event, the user's motivation is generated, and the motivation-annotated corpus is used to search for candidate texts. The texts are sorted and presented in combination with the scenarios related to the consulting event, which reduces the user's operation steps in the input box and improves the efficiency and accuracy of text input.
Providing accurate candidate text without the user having to enter text in the input box reduces the text input steps, improves the efficiency and accuracy of text input, and enhances the user experience.
Smart Images

Figure CN116701564B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information technology, and in particular to a text input method, a text input device, a storage medium, and an electronic device. Background Art
[0002] With the rapid development of internet technology, the e-commerce industry has also seen rapid growth. E-commerce systems include customer service systems, allowing users to establish a communication channel with customer service representatives and enter text messages to consult with them. As users enter their inquiry, the interface displays at least one candidate text for selection, simplifying text entry.
[0003] Currently, existing text input methods perform text matching in a corpus based on the text information entered by the user in an input box, thereby generating multiple candidate text information with high matching rates for the user to select, thereby enabling the user to quickly input text.
[0004] However, the above method generates a large number of candidate texts when the user inputs a small amount of text, resulting in low accuracy in providing text input to the user. On the other hand, when the user does not input text on the consultation interface, candidate texts cannot be generated, resulting in low text input efficiency and affecting the user experience. Summary of the Invention
[0005] The purpose of the present disclosure is to provide a text input method, a text input device, a storage medium and an electronic device, thereby at least to a certain extent solving the problem of low efficiency and low accuracy in providing text input to users in the prior art, which affects the user experience.
[0006] According to a first aspect of the present disclosure, a text input method is provided, comprising: responding to an operation of entering a consultation interface, obtaining information associated with a consultation event; generating a first motive based on the information associated with the consultation event; and responding to a first predetermined operation on the consultation interface, presenting at least one first candidate text on the consultation interface so as to perform current text input in combination with the at least one first candidate text; wherein the first candidate text is determined based on the first motive.
[0007] Optionally, the text input method further includes pre-marking the text in the corpus with motivations to generate a corpus with motivation annotations; searching for text corresponding to the first motive based on the corpus with motivation annotations; and determining at least one first candidate text based on the searched texts.
[0008] Optionally, at least one first candidate text is determined based on the found text, including sorting the found text in combination with scenarios related to the consulting event, and determining at least one first candidate text based on the sorting results.
[0009] Optionally, the text input method further includes responding to a user's operation on at least one first candidate text presented in the consultation interface, determining a first target candidate text from the at least one first candidate text; and performing current text input based on the first target candidate text.
[0010] Optionally, after the current text input is performed based on the first target candidate text, the process also includes generating a group of conversations based on the first target candidate text input by the user in the corpus in advance, and performing motivation annotation based on the conversations to generate motivation-annotated conversations; based on the motivation-annotated conversations, searching for conversations corresponding to the first motive, and performing sentence order annotation on the found conversations to generate sentence order-annotated conversations; based on the sentence order-annotated conversations, presenting at least one second candidate text on the consultation interface so as to perform the next text input in combination with the at least one second candidate text.
[0011] Optionally, the text input method also includes receiving information text input by the user on the consultation interface; generating a second motive based on the information text input on the consultation interface; presenting at least one third candidate text on the consultation interface, and performing current text input in combination with the at least one third candidate text; wherein the third candidate text is determined based on the second motive.
[0012] Optionally, the text input method further includes extending the information text to generate the extended information text; searching for a text corresponding to the second motive in the corpus based on the extended information text; and determining at least one third candidate text based on the searched text.
[0013] Optionally, the information text is expanded, including pre-marking the text in the corpus with motivations, generating a corpus with motivations marked, sentence splitting of the corpus with motivations marked, retaining target vocabulary, marking the word classes of the target vocabulary, and generating target vocabulary with word classes marked, where the target vocabulary is a phrase containing word classes; based on the second motivation, finding target vocabulary corresponding to the information text in the target vocabulary with word classes marked; and expanding the information text according to the found target vocabulary.
[0014] Optionally, determining at least one third candidate text based on the found text includes sorting the found text according to scenarios related to the consulting event, and determining at least one third candidate text based on the sorting results.
[0015] Optionally, the text input method further includes responding to a user's operation on at least one third candidate text presented in the consultation interface, determining a second target candidate text from the at least one third candidate text; and performing current text input based on the second target candidate text.
[0016] Optionally, after the current text input is performed based on the second target candidate text, the text input method also includes generating a group of conversations based on the second target candidate text input by the user in the corpus in advance, and performing motivation annotation based on the conversations to generate motivation-annotated conversations; based on the motivation-annotated conversations, searching for conversations corresponding to the second motive, and performing sentence order annotation on the found conversations to generate sentence order-annotated conversations; based on the sentence order-annotated conversations, determining at least one fourth candidate text, so as to perform the next text input in combination with the at least one fourth candidate text.
[0017] Optionally, after generating the second motive, the text input method further includes generating a motive for the next text input in combination with the second motive; based on the motive for the next text input, presenting at least one fifth candidate text on the consultation interface so as to combine the at least one fifth candidate text for the next text input.
[0018] According to a second aspect of the present disclosure, there is provided a text input device, comprising:
[0019] Specifically, the acquisition module can be used to respond to the operation of entering the consultation interface and obtain information associated with the consultation event; the generation module can be used to generate a first motive based on the information associated with the consultation event; the presentation module can be used to respond to the first predetermined operation for the consultation interface and present at least one first candidate text on the consultation interface so as to combine the at least one first candidate text for the current text input; wherein, the first candidate text is determined based on the first motive.
[0020] Optionally, the generation module is also used to pre-annotate the texts in the corpus with motivations to generate a corpus annotated with motivations; the search module uses the corpus annotated with motivations to find the text corresponding to the first motive; and the determination module is used to determine at least one first candidate text based on the found texts.
[0021] Optionally, the determination module is used to sort the found texts in combination with scenarios related to the consulting event, and determine at least one first candidate text according to the sorting result.
[0022] Optionally, the determination module is further configured to respond to a user's operation on at least one first candidate text presented in the consultation interface, determine a first target candidate text from the at least one first candidate text, and perform current text input based on the first target candidate text.
[0023] Optionally, the generation module is used to generate a group of conversations in advance based on the first target candidate text input by the user in the corpus, and to perform motivation annotation based on the conversations to generate motivation-annotated conversations; the generation module is also used to search for conversations corresponding to the first motive based on the motivation-annotated conversations, and to perform sentence order annotation on the found conversations to generate sentence order-annotated conversations; the display module is used to present at least one second candidate text on the consultation interface based on the sentence order-annotated conversations, so as to perform the next text input in combination with the at least one second candidate text.
[0024] Optionally, the device also includes a receiving module, which is used to receive information text input by the user on the consultation interface; the generating module is also used to generate a second motive based on the information text input on the consultation interface; the display module is also used to present at least one third candidate text on the consultation interface, and perform current text input in combination with at least one third candidate text; wherein, the third candidate text is determined based on the second motive.
[0025] Optionally, the generation module is used to extend the information text and generate the extended information text; the search module is used to search for text corresponding to the second motive in the corpus based on the extended information text; and the determination module is used to determine at least one third candidate text based on the searched text.
[0026] Optionally, the generation module is used to pre-mark the text in the corpus with motivations, generate a corpus with motivations marked, perform sentence splitting on the corpus with motivations marked, retain the target vocabulary, and mark the word classes of the target vocabulary to generate target vocabulary with word classes marked, where the target vocabulary is a phrase containing word classes; the search module is used to find the target vocabulary corresponding to the information text in the target vocabulary with word classes marked based on the second motivation; the generation module is used to expand the information text based on the found target vocabulary.
[0027] Optionally, the determination module is used to sort the found texts according to scenarios related to the consulting event, and determine at least one third candidate text according to the sorting result.
[0028] Optionally, the determination module is used to respond to a user operation on at least one third candidate text presented in the consultation interface, determine a second target candidate text from the at least one third candidate text; and perform current text input based on the second target candidate text.
[0029] Optionally, the generation module is used to generate a group of conversations in advance based on the second target candidate text input by the user in the corpus, and to perform motivation annotation based on the conversations to generate motivation-annotated conversations; the generation module is used to search for conversations corresponding to the second motive based on the motivation-annotated conversations, and to perform sentence order annotation on the found conversations to generate sentence order-annotated conversations; the determination module is used to determine at least one fourth candidate text based on the sentence order-annotated conversations, so as to combine the at least one fourth candidate text for the next text input.
[0030] Optionally, the generation module is used to generate a motivation for the next text input in combination with the second motivation; the display module is used to present at least one fifth candidate text on the consultation interface based on the motivation for the next text input, so as to combine the at least one fifth candidate text for the next text input.
[0031] According to a third aspect of the present disclosure, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned text input methods is implemented.
[0032] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any one of the above-mentioned text input methods by executing the executable instructions.
[0033] In the technical solutions provided by some embodiments of the present disclosure, in response to an operation of entering a consultation interface, information associated with the consultation event is obtained, and a first motivation is generated based on the information associated with the consultation event. In response to a first predetermined operation on the consultation interface, at least one first candidate text is presented on the consultation interface so that the current text input can be performed in combination with the at least one first candidate text. The first candidate text is determined based on the first motivation. The text input method provided by the present disclosure can obtain information associated with the consultation event, such as product status, purchase status, and consultation entry, after the user enters the consultation interface. Without the user having to enter any text in the consultation interface, the user can provide at least one candidate text for selection, thereby achieving the effect of text input. On the one hand, it avoids the problem in the prior art that candidate texts must be generated based on the text information entered by the user in the input box and then matched against a large corpus of text, thereby reducing the steps of user text input, improving the efficiency of text input, and providing users with a better text input experience. On the other hand, when the user enters less text, motivation inference can be performed based on the information associated with the consultation event, thereby avoiding the problem in the prior art that the candidate texts cannot be generated or are generated in large quantities, resulting in low accuracy, thereby improving the accuracy of text input provided to users.
[0034] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:
[0036] Figure 1 Schematically shows a system architecture diagram of a text input method according to an exemplary embodiment of the present disclosure;
[0037] Figure 2 A flowchart of a text input method according to an exemplary embodiment of the present disclosure is schematically shown;
[0038] Figure 3 Schematically illustrates a flowchart of determining a first candidate text based on a first motive according to an exemplary embodiment of the present disclosure;
[0039] Figure 4 Schematically illustrating a schematic diagram of displaying at least one first candidate text on a consultation interface according to an exemplary embodiment of the present disclosure;
[0040] Figure 5 Schematically showing a schematic diagram of displaying at least one first candidate text on another consultation interface according to an exemplary embodiment of the present disclosure;
[0041] Figure 6 Schematically shows a flowchart of generating a supervised sentence order model according to an exemplary embodiment of the present disclosure;
[0042] Figure 7 A schematic diagram of a process for generating a second candidate text according to an exemplary embodiment of the present disclosure is schematically shown;
[0043] Figure 8 Another flowchart schematically illustrates a text input method according to an exemplary embodiment of the present disclosure;
[0044] Figure 9 Schematically illustrates a process diagram of obtaining an unsupervised etymology expansion model according to an exemplary embodiment of the present disclosure;
[0045] Figure 10 Schematically shows a block diagram of a text input device according to an exemplary embodiment of the present disclosure;
[0046] Figure 11 Another block diagram schematically illustrates a text input device according to an exemplary embodiment of the present disclosure; and
[0047] Figure 12 A block diagram schematically illustrates an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0048] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or that other methods, components, devices, steps, etc. may be employed. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0049] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0050] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to actual circumstances.
[0051] The text input method provided by the embodiments of the present disclosure can be applied to human-computer interaction application scenarios that require text input, and in particular, to application scenarios where text input is performed on the consultation interface of an e-commerce application. For example: in a certain e-commerce system or application, a user can log in and enter the online customer service system integrated in the e-commerce system or application, and input text on the consultation interface to achieve the effect of problem consultation. In order to enable users to quickly input text on the consultation interface and save users time in text input, it is usually necessary to display at least one candidate text on the consultation interface for the user to select.
[0052] At present, the existing text input method requires the user to input text on the consultation interface, and then perform text matching in the corpus based on the input text, and prioritize it in combination with the scene features related to the consultation event to generate candidate text for the user to choose, thereby achieving the effect of text input. However, this method requires the user to input enough text before it can perform text matching in the corpus and present relatively accurate candidate text for the user to input text. When the user does not input text on the consultation interface, the consultation interface cannot present candidate text for the user to choose, resulting in low efficiency of text input; when the input text is small, a large number of candidate texts are matched in the corpus based on the input text and the scene features related to the consultation event, and accurate candidate text cannot be provided, resulting in low accuracy of text input.
[0053] In consideration of the aforementioned issues, exemplary embodiments of the present disclosure can first obtain information associated with the consultation event upon a user entering the consultation interface, and based on this information, generate the user's motivation for the consultation. If the user selects an input box but does not enter text, or enters text but the text entered is insufficient to obtain the motivation for the consultation, the system then determines at least one candidate text based on the generated motivation for the user to select and enter text.
[0054] For example, in an e-commerce app, a user's product list includes Item A and Item B. When the user selects Item A and enters the inquiry interface, the system first retrieves the inquiry entry, Item A's status, and purchase date. Item A's status can include purchase, logistics, or refund. If Item A is already purchased, purchased within one day, and no refund request has been initiated, it is presumed that the user's inquiry is motivated by inquiring about shipping times. When the user selects the input box or enters "something" in the input box, the inquiry interface presents options such as "When will it ship?" and "Why hasn't it shipped yet?" for the user to select and enter text.
[0055] Figure 1 This is a system architecture diagram of the text input method provided by the embodiment of the present disclosure, such as Figure 1 As shown, the system includes a terminal device 12, a server 14, and a database 16. A user can access a consultation interface through the terminal device 12, and the server 14 can obtain information associated with the consultation event and, based on this information, generate a user's motivation for consultation. When the server 14 detects that the user has clicked an input box on the consultation interface, it searches the database 16 for text related to the user's motivation for consultation and identifies at least one candidate text for the user to select.
[0056] It should be noted that the server 14 may be a single server or a server cluster consisting of multiple servers.
[0057] It should be understood that Figure 1 In the system architecture shown, the number of terminal devices 12, servers 14, and databases 16 is merely exemplary, and any greater or lesser number falls within the scope of protection of the present disclosure. Moreover, in the above-mentioned example operating scenario, the terminal device 12 may be, for example, a personal computer, a server, a PDA (Personal Digital Assistant), a notebook, or any other computing device with networking capabilities. The network for communication between the terminal device 12, the server 14, and the database 16 may include various types of wired and wireless networks, such as, but not limited to, the Internet, a local area network, wireless fidelity (Wireless Fidelity, WIFI), a wireless local area network (Wireless Local Area Networks, WLAN), a cellular communication network (General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), 2G / 3G / 4G / 5G cellular network), a satellite communication network, and the like.
[0058] The various steps of the text input method of the exemplary embodiment of the present disclosure can generally be performed by server 14. In this case, the following text input device can be configured within server 14. The server 14 can include a dedicated chip or be equipped with an independent GPU (Graphics Processing Unit). However, the solution of the present disclosure can also be implemented using a terminal device.
[0059] After understanding the system architecture of the present disclosure, Figure 2 The text input method of the present disclosure is described in detail.
[0060] Figure 2 The flowchart of the text input method according to the exemplary embodiment of the present disclosure is schematically shown. Figure 2 , the text input method may include the following steps:
[0061] S22. In response to the operation of entering the consultation interface, obtain information associated with the consultation event.
[0062] Among them, the information associated with the consultation event can be the consultation entrance, product status, purchase time, etc., and the product status can be purchase status, logistics status, refund status and other information.
[0063] It should be understood that the operation of entering the consultation interface can be clicking a button to enter the consultation interface, or sliding to enter the consultation interface, etc. The present disclosure does not impose any limitation on the operation of entering the consultation interface.
[0064] S24. Generate a first motivation based on information associated with the consulting event.
[0065] Among them, the first motivation is the user's consultation motivation when the user just enters the consultation interface and is inferred based on information associated with the consultation event.
[0066] Specifically, after obtaining information related to the consultation event, the server first digitizes this information and converts it into data for storage. This large amount of data is then used as a training sample dataset to establish a supervised consultation motivation model based on neural network model training. Finally, the supervised consultation motivation model is used to output the user's consultation motivation, thereby generating the first motivation. Supervision refers to obtaining an optimal model through existing training samples, and then using this model to map all inputs to corresponding outputs. The input of the supervised consultation motivation model is information related to the consultation event in data form, and the output is the first motivation.
[0067] The entire process of generating the first motivation based on information associated with a consultation event can be implemented in a real-time computing pipeline. As data associated with the consultation event passes through the pipeline, motivation identification results can be calculated in real time and cached in the user's consultation motivation cache. For example, a Flink-based real-time computing system can be used, which contains a trained neural network model that can quickly generate output results after inputting data.
[0068] S26. In response to a first predetermined operation on the consultation interface, present at least one first candidate text on the consultation interface so as to perform current text input in combination with the at least one first candidate text, wherein the first candidate text is determined based on the first motivation.
[0069] The first predetermined operation on the consultation interface is an operation that causes the consultation interface to enter text input mode or the user inputs a small amount of text, so the user's consultation motivation cannot be obtained. For example, the user enters "ah", "I", "you", "I want", etc. in the input box.
[0070] It should be understood that the present disclosure does not impose any restrictions on the specific operations for entering the text input mode. For example, a user may enter the text input mode by clicking on an input box or by double-clicking the screen.
[0071] Optionally, after responding to the first predetermined operation on the consultation interface, the first motive may be called in the consultation motivation cache, and the text corresponding to the first motive may be searched in the corpus, thereby generating at least one first candidate text for user selection.
[0072] In the technical solutions provided by some embodiments of the present disclosure, in response to an operation of entering a consultation interface, information associated with the consultation event is obtained, and a first motivation is generated based on the information associated with the consultation event. In response to a first predetermined operation on the consultation interface, at least one first candidate text is presented on the consultation interface so that the current text input can be performed in combination with the at least one first candidate text. The first candidate text is determined based on the first motivation. The text input method provided by the present disclosure can obtain information associated with the consultation event, such as product status, purchase status, and consultation entry, after the user enters the consultation interface. Without the user having to enter any text in the consultation interface, the user can provide at least one candidate text for selection, thereby achieving the effect of text input. On the one hand, it avoids the problem in the prior art that candidate texts must be generated based on the text information entered by the user in the input box and then matched against a large corpus based on the entered text, thereby reducing the steps of user text input, improving the efficiency of text input, and providing users with a better text input experience. On the other hand, when the user enters less text, motivation inference can be performed based on the information associated with the consultation event, thereby avoiding the problem in the prior art that the candidate texts cannot be generated or are generated in large quantities, resulting in low accuracy, and improving the accuracy of text input provided to users.
[0073] exist Figure 2 In order to better understand the process of determining the first candidate text based on the first motivation, we will combine Figure 3 For detailed explanation, Figure 3 The present invention is a flowchart for determining a first candidate text based on a first motive.
[0074] Optionally, in step S32, when the first candidate text is determined using the first motive, the texts in the corpus may be annotated with motives in advance to generate a corpus annotated with motives, and the text corresponding to the first motive may be found based on the corpus annotated with motives.
[0075] Specifically, before searching for texts corresponding to the first motive in the corpus, the corpus can be rebuilt in advance. First, all texts are retrieved from the online corpus at a specific time period, and each retrieved text is annotated with its motive. Then, texts with the same motive are grouped together. Finally, based on the rebuilt corpus, the text corresponding to the first motive is found.
[0076] For example, a corpus contains four texts: Text A: "Can I return goods?", Text B: "I want to return goods?", Text C: "When will the goods be shipped?", and Text D: "Can the goods be shipped today?" Motives are annotated for each of the four texts. The motivations for each text are, in order, return, return, delivery time, and delivery time. Therefore, Text A and Text B can be grouped together, while Text C and Text D can be grouped together. When determining the first candidate text based on the first motivation, if the first motivation is return, Text A and Text B can be identified as the texts corresponding to the first motivation.
[0077] In this method, by reconstructing the corpus by motivation grouping in advance, after determining the first motive, it is only necessary to search the text in the group corresponding to the first motive in the corpus, avoiding the process of searching in the entire corpus, thereby saving time in determining the first candidate text in the corpus and improving the efficiency of user text input based on the first candidate text.
[0078] Furthermore, in step S34, the found texts may be sorted in combination with scenarios related to the consulting event, and at least one first candidate text may be determined based on the sorting result.
[0079] Among them, the scenario related to the consultation event can be feature information related to the scenario, such as the store consulted, the type of product consulted, the return rate and praise rate of the consulted product, etc. The type of product consulted can be, for example, clothing attributes, food attributes, beauty attributes, etc.
[0080] Next, we will combine Figure 4 and Figure 5 An exemplary description is given of a manner of presenting at least one first candidate text on the consultation interface in response to a first predetermined operation on the consultation interface.
[0081] Figure 4 is a schematic diagram showing at least one first candidate text on the consultation interface. Figure 4 As shown, Figure 4 (a) The user slides the input box on the consultation interface to enter the text input mode. At this time, the first predetermined operation is to slide the input box and no text is entered. Figure 4 (a) and it will be displayed as follows Figure 4 The screen shown in (b) is a screen showing at least one first candidate text on the consultation interface.
[0082] Specifically, after finding the text corresponding to the first motivation, it is necessary to prioritize the found text based on the scenario related to the consultation event so that the first candidate text can be displayed on the consultation interface. For example, the corpus texts under the return motivation group include "Can I return it?", "This sweatshirt is of poor quality, I want to return it?", and "I want price protection." Considering the product associated with the consultation entry is a sweatshirt, the product type is clothing, and the return rate of the product store, the ranking results are "This sweatshirt is of poor quality, I want to return it?", "Can I return it?", and "I want price protection."
[0083] Figure 5 is another schematic diagram of displaying at least one first candidate text on the consultation interface. Figure 5 As shown, Figure 5 (a) The user clicks on the input box on the consultation interface and enters a small amount of text content. The content cannot obtain the user's consultation motivation. In this case, the first predetermined operation is to click on the input box and enter a small amount of text. Figure 5 (a) and it will be displayed as follows Figure 5 The screen shown in (b) is a screen showing at least one first candidate text on the consultation interface.
[0084] like Figure 5 As shown in (a), when the user clicks the input box and enters "I" in the input box, the text found based on the first motivation is searched in the corpus. When sorting the priorities, the scenarios related to the consulting event and the input "I" can be combined to sort them. The sorted results are as follows: Figure 5 As shown in (b). For example, the corpus texts under the return motivation group include "This sweatshirt is of poor quality, I want to return it for a refund" and "I want price protection." Considering the information such as the sweatshirt, the product type is clothing, and the store's return rate, the sorting results are "This sweatshirt is of poor quality, I want to return it for a refund" and "I want price protection."
[0085] In one possible implementation, when a user clicks on an input box and enters "I want," "I want" can be expanded using a word cluster. For example, "I want" can be expanded to "I can." The search scope for "I want" is "I want" and "I can." The corpus is then searched for text based on the first motive and the input "I want" and "I can." The text is then sorted.
[0086] The method of prioritizing the found texts in combination with scenarios related to consulting events can provide users with more accurate first candidate texts based on priority, so that users can quickly input text, thereby further improving the efficiency and accuracy of text input.
[0087] In step S36 , the system responds to the user's operation on at least one first candidate text presented in the consultation interface, determines a first target candidate text from the at least one first candidate text, and performs current text input based on the first target candidate text.
[0088] Optionally, the user may select a text from at least one first candidate text displayed on the consultation interface as the first target candidate text, and click on the first target candidate text to instantly send it to the communication system to complete the current text input.
[0089] At least one first candidate text is presented on the consultation interface so that the user can select a first target candidate text from the at least one presented first candidate text and send it out, helping the user to input text quickly, thereby improving the efficiency of text input and further enhancing the user experience.
[0090] In one possible implementation, after the current text input is performed based on the first target candidate text, a group of conversations are generated in advance based on the first target candidate text input by the user in the corpus, and motivation annotation is performed based on the conversations to generate motivation-annotated conversations. Based on the motivation-annotated conversations, conversations corresponding to the first motive are searched, and sentence order annotation is performed on the found conversations to generate sentence order-annotated conversations. Based on the sentence order-annotated conversations, at least one second candidate text is presented on the consultation interface so that the next text input can be performed in combination with the at least one second candidate text.
[0091] When the sentence order of the first target candidate text in the conversation is annotated, each first target candidate text will be assigned a sentence number. Before presenting at least one second candidate text, a neural network model needs to be trained based on the corpus in advance.
[0092] Specifically, for each user input of a first target candidate text, a set of conversations is generated in real time and uploaded to the corpus. A neural network model is trained on all conversations in the current corpus at specific intervals to generate a supervised sentence order model. This supervised sentence order model uses the first motive and sentence number of the current text input as input parameters and outputs the second candidate text for the next text input.
[0093] Figure 6 This is a flowchart for generating a supervised sentence order model. Figure 6 As shown, first in step S602, motivation annotations are performed on the first target candidate texts in the corpus, and the first target candidate texts that appear under the same motivation are grouped.
[0094] Secondly, in step S604, the first target candidate texts that appear in the same conversation within a group are clustered. After the clustering is completed, in step S606, the first target candidate texts in the same conversation are annotated with sentence order to generate sentence numbers. Among them, the sentence order annotation of the text can be used to distinguish the user's motivation, that is, the same sentence in different positions in the conversation expresses different user needs. For example, "Your clothes are of good quality" and "but they don't have my size" express not buying, "I want to buy" and "Your clothes are of good quality" express buying. The same sentence "Your clothes are of good quality" expresses different user needs.
[0095] Finally, in step S608, the neural network model is trained using the motivation and sentence number of the current first target candidate text as input parameters and the next sentence text as output, and a supervised sentence order model is generated in step S610.
[0096] After obtaining the supervised sentence order model, at least one second candidate text can be generated by taking the first motive of the current text input and the current text sentence number as input.
[0097] Figure 7 This is a schematic diagram of the process of automatically generating a second candidate text for the next text input after the current text input. Figure 7 As shown in (a), after the current text is input, the following will be displayed on the consultation interface: Figure 7 (b) The screen shown.
[0098] For example, in the corpus, the first target candidate text input by user A includes text A: "I want to buy this shirt", text B: "The quality is very good, I want to buy it", text C: "When will it be shipped", and text D: "What kind of express delivery should be sent". In this case, the motivations of the four texts are: buy, buy, ship, and ship. Therefore, text A and text B can be divided into the first group, and text C and text D can be divided into the second group. Figure 7 As shown in (a), when user B currently inputs the text "When will the goods be shipped?" and the sentence number is 1, the first motivation of the current text is shipping. Text C and text D are clustered, and the sentence number of text C is marked as 1, and the sentence number of text D is marked as 2. Then when user B sends "When will the goods be shipped?", the following is automatically generated. Figure 7 (b) “What kind of express delivery” as shown.
[0099] Taking the first motive of the current text input and the current text sentence number as input, at least one second candidate text is presented on the consultation interface so that the next text input can be combined with at least one second candidate text. This can reduce the user's text input operations, save user time, and further improve the efficiency of text input.
[0100] Next, we will combine Figure 8Schematically shows another flow chart of a text input method according to an exemplary embodiment of the present disclosure. Figure 8 FIG. 1 schematically shows another flow chart of a payment method according to an exemplary embodiment of the present disclosure. Figure 8 , another text input method may include the following steps:
[0101] S82. Receive information text input by the user in the consultation interface.
[0102] The user can enter text on the consultation interface, for example, by using buttons to enter text one by one, or by directly pasting copied text into the input box. There are no specific restrictions on the specific input method. This information text can accurately capture the user's motivation. For example, "I want to return a product."
[0103] S84. Generate a second motivation based on the information text inputted into the consultation interface.
[0104] The second motivation is the user inquiry motivation accurately determined based on the text input by the user. For example, if the information text input by the user is "I want to return the product", the second motivation is return.
[0105] Optionally, after obtaining the second motivation of the current user, the motivation for the next text input can be generated in combination with the second motivation. Based on the motivation for the next text input, at least one fifth candidate text can be presented on the consultation interface so that the next text input can be performed in combination with the at least one fifth candidate text.
[0106] First, the second motivation of the current text input in all the conversations in the corpus is used as a training sample, and a naive Bayes model is used for model training to obtain the motivation for the next text input.
[0107] Specifically, based on all conversations in the corpus, the motive of the current input text is used as the training sample for the model, and the motive of the next input text is used as the output parameter. The motive of the next input text is the motive with the highest probability.
[0108] Finally, after obtaining the user's second motivation, the naive Bayesian probability model is used to generate the motivation for the next text input and cache it in the user's consultation motivation cache. When the user completes the current input, the motivation for the next text input is used to search and sort the corpus, and the sorted fifth candidate text is presented on the consultation interface.
[0109] In this step, combining the second motivation to obtain the motivation for the next text input can solve the situation where the user's motivation changes, thereby accurately providing candidate texts to the user and improving the accuracy of text input.
[0110] S86. Present at least one third candidate text on the consultation interface, and perform the current text input in combination with at least one third candidate text, where the third candidate text is determined based on the second motivation.
[0111] In a possible implementation manner, when receiving the information text input by the user, first expand the information text to generate an expanded information text, and based on the expanded information text, search for the text corresponding to the second motivation in the corpus.
[0112] Optionally, pre-annotate the text in the corpus with motivations to generate a corpus with motivation annotations, split the sentences in the corpus with motivation annotations, retain the target vocabulary, and annotate the word classes of the target vocabulary to generate the target vocabulary with annotated word classes. The target vocabulary is a phrase containing word classes. Based on the second motivation, search for the target vocabulary corresponding to the information text in the target vocabulary with annotated word classes, and expand the information text according to the found target vocabulary.
[0113] Among them, before expanding the information text, the text in the corpus can be pre-split to generate word source clusters, so as to obtain an unsupervised word source expansion model. Unsupervised means that no training samples are required, but samples with similar characteristics are clustered.
[0114] Next, it will be combined with Figure 9 The process of obtaining the unsupervised word source expansion model will be described in detail.
[0115] As Figure 9 shown, first in step S902, all the text in the corpus is obtained at a specific time period, and the text in the corpus is annotated with motivations. The specific time can be one week, one month, etc., and no specific limit is set for the specific time.
[0116] Secondly, in step S904, the text in the corpus that has been annotated with motivations is split into sentences, and words or phrases without word classes such as "I", "of", "ah", etc. are removed, and the target vocabulary containing word classes is retained. In step S906, the word classes of the target vocabulary are annotated, and then in step S908, clustering is performed based on the annotated motivations and the target vocabulary with the same word classes to generate word source clusters. The words or phrases within the word source clusters can be replaced with each other. Finally, in step S910, an unsupervised word source expansion model is obtained based on the word source clusters. When the user inputs text on the consultation interface, the input text can be expanded according to the word source clusters in the unsupervised word source expansion model. [[ID=As shown, in the corpus, the texts under the price guarantee motivation include: "I want price guarantee," "I want price protection," and "Can I get a refund of the price difference?" "I want price guarantee" can be split into "I," "want," "price guarantee," and "ah," with "I" and "ah" being removed as non-word-part-of-word characters. "Want" is the intentional verb, and "price guarantee" is the verb group. "I want price protection" can be split into "I," "want," and "price protection," with "I" removed. "Want" is the intentional verb, and "price protection" is the verb group. "Can I get a refund of the price difference?" can be split into "can" and "refund the price difference," with "can" being the intentional verb and "refund the price difference" being the verb group. "Want" and "can" are clustered to form a group of word origins, while "price guarantee," "price protection," and "refund the price difference" are clustered to form a group of verb group word origins. When a user is typing "I want price guarantee," "I want price protection" and "can I get a refund of the price difference" can be expanded.
[0118] In this approach, word clustering is used to expand the user's input text into similar phrases, thereby expanding the scope of search within the corpus and improving the accuracy of text input. At the same time, using word clustering can reduce the redundancy caused by similar phrases, thereby saving storage space.
[0119] Secondly, the found texts are sorted according to scenarios related to the consulting event, and at least one third candidate text is determined based on the sorting result.
[0120] Specifically, the texts found in the corpus can be sorted according to the scenarios related to the consulting event. The sorting method can be from large to small or from small to large. The specific sorting method is not limited. At the same time, the optional implementation method of determining the third candidate text based on the sorting result can refer to Figure 4 and Figure 5 .
[0121] In this step, sorting the found texts can provide users with more accurate candidate texts in priority, thereby improving the accuracy of text input and enhancing the user experience.
[0122] Finally, in response to the user's operation on at least one third candidate text presented in the consultation interface, a second target candidate text is determined from the at least one third candidate text, and the current text input is performed based on the second target candidate text.
[0123] Optionally, the user can select a text from at least one third candidate text displayed on the consultation interface as the second target candidate text, and click on the second target candidate text to instantly send it to the communication system to complete the current text input.
[0124] On the consultation interface, the user selects a second target candidate text from at least one third candidate text presented and sends it out, which helps the user to input text quickly, thereby improving the efficiency of text input and further enhancing the user experience.
[0125] In the technical solutions provided by some embodiments of the present disclosure, by receiving the information text input by the user on the consultation interface, a second motivation is generated based on the information text input on the consultation interface, at least one third candidate text is presented on the consultation interface, and the current text input is performed in combination with the at least one third candidate text, wherein the third candidate text is determined based on the second motivation. In this way, more accurate candidate texts can be provided to the user in real time based on the text content input by the user and the determined second motivation, so that the user can quickly input text. This improves the efficiency and accuracy of the user's text input and further enhances the user experience.
[0126] After the current text input is completed, a group of conversations can be generated in advance based on the second target candidate text input by the user in the corpus, and motivation annotation can be performed based on the conversation to generate motivation-annotated conversations. Based on the motivation-annotated conversations, conversations corresponding to the second motive are searched, and sentence order annotation is performed on the found conversations to generate sentence order-annotated conversations. Based on the sentence order-annotated conversations, at least one fourth candidate text is determined so that the next text input can be performed in combination with the at least one fourth candidate text.
[0127] When the second target candidate text in the conversation is annotated with a sentence sequence, each second target candidate text will be given a sentence sequence number. With the second motivation and the sentence sequence number as input parameters, a supervised sentence sequence model pre-trained based on a neural network model is used to output at least one fourth candidate text for the next text input. One implementation method can refer to Figure 9 .
[0128] Based on the second motive of the current text input and the current text sentence number, at least one third candidate text is presented on the consultation interface, so that the user can use it in conjunction with the at least one third candidate text for the next text input. This can accurately recommend candidate texts to the user, while reducing the user's text input operations, saving users time, and further improving the efficiency and accuracy of text input.
[0129] It should be noted that although the steps of the method of the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all steps must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0130] Furthermore, this exemplary embodiment also provides a text input device.
[0131] Figure 10 Schematically shows a block diagram of a text input device according to an exemplary embodiment of the present disclosure. Figure 10 According to an exemplary embodiment of the present disclosure, the text input device 10 may include an acquisition module 101, a generation module 103, and a display module 105, wherein:
[0132] The acquisition module 101 can be used to respond to the operation of entering the consultation interface and obtain information associated with the consultation event; the generation module 103 can be used to generate a first motive based on the information associated with the consultation event; the display module 105 can be used to respond to the first predetermined operation on the consultation interface and present at least one first candidate text on the consultation interface so as to combine the at least one first candidate text for the current text input; wherein, the first candidate text is determined based on the first motive.
[0133] Furthermore, this exemplary embodiment also provides another text input device.
[0134] Figure 11 Schematically shows a block diagram of a text input device according to an exemplary embodiment of the present disclosure. Figure 11 According to an exemplary embodiment of the present disclosure, the text input device 11 may include a generating module 111, a displaying module 113, a searching module 115, a determining module 117, and a receiving module 119, wherein:
[0135] According to an exemplary embodiment of the present disclosure, the generation module 111 is also used to pre-annotate the text in the corpus with motivations to generate a corpus with motivation annotated; the search module 115 is used to find the text corresponding to the first motive based on the corpus with motivation annotated; the determination module 117 is used to determine at least one first candidate text based on the found text.
[0136] According to an exemplary embodiment of the present disclosure, the determination module 117 is configured to sort the searched texts in combination with scenarios related to the consulting event, and determine at least one first candidate text according to the sorting result.
[0137] According to an exemplary embodiment of the present disclosure, the determination module 117 is also used to respond to the user's operation on presenting at least one first candidate text in the consultation interface, determine a first target candidate text from the at least one first candidate text, and perform current text input based on the first target candidate text.
[0138] According to an exemplary embodiment of the present disclosure, the generation module 111 is used to generate a group of conversations in advance based on the first target candidate text input by the user in the corpus, and to perform motivation annotation based on the conversations to generate motivation-annotated conversations; the generation module 111 is also used to search for conversations corresponding to the first motive based on the motivation-annotated conversations, and to perform sentence order annotation on the found conversations to generate sentence order-annotated conversations; the display module 113 is used to present at least one second candidate text on the consultation interface based on the sentence order-annotated conversations, so as to perform the next text input in combination with the at least one second candidate text.
[0139] According to an exemplary embodiment of the present disclosure, the device also includes a receiving module 119, which is used to receive information text input by the user on the consultation interface; the generating module 111 is also used to generate a second motive based on the information text input on the consultation interface; the display module 113 is also used to present at least one third candidate text on the consultation interface, and perform current text input in combination with at least one third candidate text; wherein the third candidate text is determined based on the second motive.
[0140] According to an exemplary embodiment of the present disclosure, the generation module 111 is used to extend the information text and generate the extended information text; the search module 115 is used to search for the text corresponding to the second motive in the corpus based on the extended information text; the determination module 117 is used to determine at least one third candidate text based on the searched text.
[0141] According to an exemplary embodiment of the present disclosure, the generation module 111 is used to pre-mark the text in the corpus with motivations, generate a corpus with motivations marked, perform sentence splitting on the corpus with motivations marked, retain the target vocabulary, and mark the word classes of the target vocabulary to generate target vocabulary with word classes marked, where the target vocabulary is a phrase containing word classes; the search module 115 is used to find the target vocabulary corresponding to the information text in the target vocabulary with word classes marked based on the second motivation; the generation module 111 is used to expand the information text based on the found target vocabulary.
[0142] According to an exemplary embodiment of the present disclosure, the determination module 117 is configured to sort the searched texts according to scenarios related to the consulting event, and determine at least one third candidate text according to the sorting result.
[0143] According to an exemplary embodiment of the present disclosure, the determination module 117 is used to respond to the user's operation on presenting at least one third candidate text in the consultation interface, determine a second target candidate text from the at least one third candidate text; and perform current text input based on the second target candidate text.
[0144] According to an exemplary embodiment of the present disclosure, the generation module 111 is used to generate a group of conversations in advance based on the second target candidate text input by the user in the corpus, and to perform motivation annotation based on the conversations to generate motivation-annotated conversations; the generation module is used to search for conversations corresponding to the second motive based on the motivation-annotated conversations, and to perform sentence order annotation on the searched conversations to generate sentence order-annotated conversations; the determination module 117 is used to determine at least one fourth candidate text based on the sentence order-annotated conversations, so as to perform the next text input in combination with the at least one fourth candidate text.
[0145] According to an exemplary embodiment of the present disclosure, the generation module 111 is used to generate a motivation for the next text input in combination with the second motivation; the display module 113 is used to present at least one fifth candidate text on the consultation interface based on the motivation for the next text input, so as to combine the at least one fifth candidate text for the next text input.
[0146] In exemplary embodiments of the present disclosure, a computer-readable storage medium is also provided, on which is stored a program product capable of implementing the aforementioned methods of this specification. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product comprising program code. When the program product is executed on a terminal device, the program code is configured to cause the terminal device to execute the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present disclosure.
[0147] According to an embodiment of the present disclosure, a program product for implementing the above-mentioned method can be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0148] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0149] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0150] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0151] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0152] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0153] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure may be implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."
[0154] Refer to the following Figure 12 1 and 2 to describe the electronic device 900 according to this embodiment of the present disclosure. Figure 12 The electronic device 1200 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0155] like Figure 12As shown, electronic device 1200 is implemented as a general-purpose computing device. Components of electronic device 1200 may include, but are not limited to, the aforementioned at least one processing unit 1210, the aforementioned at least one storage unit 1220, a bus 1230 connecting various system components (including storage unit 1220 and processing unit 1210), and a display unit 1240.
[0156] The storage unit stores program codes, which can be executed by the processing unit 1210, so that the processing unit 1210 performs the steps described in the "Exemplary Method" section of the present specification according to various exemplary embodiments of the present disclosure. For example, the processing unit 1210 can perform the following steps: Figure 2 Steps S22 to S26 shown in FIG.
[0157] The storage unit 1220 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 12201 and / or a cache memory unit 12202 , and may further include a read-only memory unit (ROM) 12203 .
[0158] The storage unit 1220 may also include a program / utility 12204 having a set (at least one) of program modules 12205, such program modules 12205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0159] The bus 1230 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0160] The electronic device 1200 can also communicate with one or more external devices 1300 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1200, and / or any device that enables the electronic device 1200 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 1250. Furthermore, the electronic device 1200 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 1260. As shown, the network adapter 1260 communicates with other modules of the electronic device 1200 via a bus 1230. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 1200, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0161] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0162] Furthermore, the above-mentioned figures are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the above-mentioned figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0163] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0164] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.
[0165] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A text input method, characterized in that: include: In response to the operation of entering the consultation interface, information associated with the consultation event is obtained; generating a first motivation according to the information associated with the consulting event; In response to a first predetermined operation on the consultation interface, presenting at least one first candidate text on the consultation interface so as to perform current text input in combination with the at least one first candidate text; wherein the first candidate text is determined based on the first motivation; Preliminarily generating a set of conversations based on a first target candidate text input by a user in a corpus, and performing motivation annotation on the conversations to generate motivation-annotated conversations; Based on the motivation-annotated conversations, searching for conversations corresponding to the first motivation, and annotating the found conversations with sentence order to generate sentence-annotated conversations; According to the conversation after the sentence order annotation, at least one second candidate text is presented on the consultation interface so as to perform the next text input in combination with the at least one second candidate text.
2. The text input method according to claim 1, wherein: The text input method further includes: Pre-mark the texts in the corpus with motivations to generate a motivation-annotated corpus; Finding text corresponding to the first motivation based on the motivation-annotated corpus; At least one first candidate text is determined based on the found text.
3. The text input method according to claim 2, wherein: Determining the at least one first candidate text based on the searched text includes: The found texts are sorted in combination with scenarios related to the consulting event, and the at least one first candidate text is determined according to the sorting result.
4. The text input method according to claim 1, wherein: The text input method further includes: In response to a user's operation on at least one first candidate text presented in the consultation interface, determining a first target candidate text from the at least one first candidate text; Based on the first target candidate text, current text input is performed.
5. The text input method according to claim 1, wherein: The text input method further includes: Receiving information text input by the user on the consultation interface; generating a second motivation based on the information text inputted in the consultation interface; Presenting at least one third candidate text on the consultation interface, and performing current text input in combination with the at least one third candidate text; The third candidate text is determined based on the second motivation.
6. The text input method according to claim 5, characterized in that: The text input method further includes: Expanding the information text to generate extended information text; Based on the extended information text, searching for text corresponding to the second motive in a corpus; The at least one third candidate text is determined based on the searched text.
7. The text input method according to claim 6, characterized in that: Expand the information text to include: Preliminarily annotating text in a corpus with motivations to generate a motivation-annotated corpus, performing sentence splitting on the motivation-annotated corpus, retaining target words, and annotating the word classes of the target words to generate word-classified target words, wherein the target words are phrases containing word classes; Based on the second motivation, searching for a target vocabulary corresponding to the information text in the target vocabulary after the marked word class; The information text is expanded according to the searched target vocabulary.
8. The text input method according to claim 6, wherein: Determining the at least one third candidate text according to the found text includes: The found texts are sorted according to scenarios related to the consulting event, and the at least one third candidate text is determined based on the sorting result.
9. The text input method according to claim 5, characterized in that: The text input method further includes: In response to a user operation on at least one of the third candidate texts presented in the consultation interface, determining a second target candidate text from the at least one third candidate text; Based on the second target candidate text, current text input is performed.
10. The text input method according to claim 9, characterized in that: After performing current text input based on the second target candidate text, the text input method further includes: Preliminarily generating a set of conversations based on the second target candidate text input by the user in the corpus, and performing motivation annotation on the conversations to generate motivation-annotated conversations; Based on the motivation-annotated conversation, searching for conversations corresponding to the second motivation, and annotating the sentence order of the found conversations to generate sentence-annotated conversations; At least one fourth candidate text is determined based on the conversation after the sentence order is annotated, so as to perform the next text input in combination with the at least one fourth candidate text.
11. The text input method according to claim 5, characterized in that: After generating the second motive, the text input method further includes: Combining the second motivation, generating a motivation for the next text input; Based on the motivation for the next text input, at least one fifth candidate text is presented on the consultation interface so as to perform the next text input in combination with the at least one fifth candidate text.
12. A text input device, characterized in that: include: The acquisition module is used to respond to the operation of entering the consultation interface and obtain information associated with the consultation event; A generating module, configured to generate a first motivation according to the information associated with the consulting event; a display module configured to present at least one first candidate text on the consultation interface in response to a first predetermined operation on the consultation interface, so as to combine the at least one first candidate text for current text input; wherein the first candidate text is determined based on the first motivation; The generation module is further configured to generate a set of conversations in advance based on the first target candidate text input by the user in the corpus, and to perform motivation annotation based on the conversations to generate motivation-annotated conversations; The generating module is further configured to search for a conversation corresponding to the first motive based on the conversation annotated with the motive, and annotate the found conversation with sentence order to generate a conversation annotated with sentence order; The display module is further configured to present at least one second candidate text on the consultation interface according to the conversation after the sentence order annotation, so as to perform the next text input in combination with the at least one second candidate text.
13. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the text input method according to any one of claims 1 to 11 is implemented.
14. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to perform the text input method according to any one of claims 1 to 11 by executing the executable instructions.
Citation Information
Patent Citations
Input method editor
CN109478187A
Consultation result generation method and device, electronic equipment and storage medium
CN113658684A