CN116149489A - Method, apparatus, computer device and storage medium for automatically generating dialogue content - Google Patents

Method, apparatus, computer device and storage medium for automatically generating dialogue content Download PDF

Info

Publication number
CN116149489A
CN116149489A CN202310082278.7A CN202310082278A CN116149489A CN 116149489 A CN116149489 A CN 116149489A CN 202310082278 A CN202310082278 A CN 202310082278A CN 116149489 A CN116149489 A CN 116149489A
Authority
CN
China
Prior art keywords
word
candidate
sentence
user
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310082278.7A
Other languages
Chinese (zh)
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Moore Threads Technology Co Ltd
Original Assignee
Moore Threads Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Moore Threads Technology Co Ltd filed Critical Moore Threads Technology Co Ltd
Priority to CN202310082278.7A priority Critical patent/CN116149489A/en
Publication of CN116149489A publication Critical patent/CN116149489A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • G06F3/0236Character input methods using selection techniques to select from displayed items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/247Thesauruses; Synonyms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to a method, apparatus, computer device and storage medium for automatically generating dialogue content. The method comprises the steps of inputting related text information of a user into a preset text generation model, obtaining and displaying at least one candidate sentence on a display interface, responding to a first triggering operation of a target sentence in the at least one candidate sentence, displaying at least one candidate word of the target sentence on the display interface, responding to a first selecting operation of the at least one candidate word, and generating a target text according to the selected candidate word and the target sentence. According to the method, the candidate sentences corresponding to the text pre-input by the user are generated by analyzing the related text information of the user, and then the candidate sentences are directly used as the text pre-input by the user to be displayed on the display interface.

Description

Method, apparatus, computer device and storage medium for automatically generating dialogue content
Technical Field
The present invention relates to the field of natural language processing algorithms, and in particular, to a method, an apparatus, a computer device, and a storage medium for automatically generating dialogue content.
Background
With the development of computers and intelligent terminals, more and more scenes exist for inputting characters on the computers and the intelligent terminals.
Currently, in most scenes, word input is often performed by using a phrase mode when inputting words. For example, in an online text entry scenario, candidate words are presented for selection by a user primarily by virtue of the pinyin input by the user.
However, the above-described method for inputting characters using a phrase has a problem of low input efficiency.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, apparatus, computer device, and computer-readable storage medium for automatically generating dialogue content that can improve input efficiency.
In a first aspect, the present application provides a method of automatically generating dialog content. The method comprises the following steps:
inputting the related text information of the user into a preset text generation model to obtain and display at least one candidate sentence on a display interface;
responding to a first triggering operation of a target sentence in the at least one candidate sentence, and displaying at least one candidate word of the target sentence on the display interface;
And generating target text according to the selected candidate words and the target sentence in response to a first selection operation of the at least one candidate word.
In one embodiment, the responding to the first trigger operation on the target sentence in the at least one candidate sentence displays at least one candidate word of the target sentence on the display interface, and the method includes:
responding to a first triggering operation of the target sentence, and word segmentation is carried out on the target sentence to obtain and display each word of the target sentence on the display interface;
responding to a second selection operation of a target word in the words, and displaying at least one candidate word corresponding to the target word on the display interface; the candidate word is a paraphrase of the target word.
In one embodiment, the word segmentation is performed on the target sentence to obtain and display each word of the target sentence on the display interface, including:
inputting the target sentence into a preset word segmentation model to segment words, and obtaining each word of the target sentence; the word segmentation model is obtained by training an initial word segmentation model according to the historical text corpus of the user;
And displaying the words on the display interface.
In one embodiment, the responding to the second selection operation of the target word in the various words displays at least one candidate word corresponding to the target word on the display interface, including:
in response to the second selection operation, obtaining at least one candidate word of the target word;
determining the word sequence of each candidate word according to the word characteristics of the user; the word characteristics are determined according to the historical text corpus of the user;
and displaying each candidate word on the display interface according to the word sequence.
In one embodiment, the inputting the related text information of the user into a preset text generation model to obtain and display at least one candidate sentence on a display interface includes:
if the previous input information of the user is obtained in the current input scene, the previous input information is used as the related text information to be input into a preset text generation model, and at least one candidate sentence is obtained and displayed on a display interface;
and if the previous input information is not obtained in the current input scene, the historical input information of the user is used as the related text information to be input into a preset text generation model, and at least one candidate sentence is obtained and displayed on a display interface.
In one embodiment, the displaying at least one candidate sentence on the display interface includes:
sorting the candidate sentences according to the historical input habit characteristics of the user to obtain sentence sequences;
and displaying the candidate sentences on the display interface according to the sentence sequence.
In a second aspect, the present application also provides an apparatus for automatically generating dialog content. The device comprises:
the input module is used for inputting the related text information of the user into a preset text generation model, obtaining and displaying at least one candidate sentence on a display interface;
a first response module, configured to respond to a first triggering operation on a target sentence in the at least one candidate sentence, and display at least one candidate word of the target sentence on the display interface;
and the second response module is used for responding to the first selection operation of the at least one candidate word and generating target text according to the selected candidate word and the target sentence.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Inputting the related text information of the user into a preset text generation model to obtain and display at least one candidate sentence on a display interface;
responding to a first triggering operation of a target sentence in the at least one candidate sentence, and displaying at least one candidate word of the target sentence on the display interface;
and generating target text according to the selected candidate words and the target sentence in response to a first selection operation of the at least one candidate word.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
inputting the related text information of the user into a preset text generation model to obtain and display at least one candidate sentence on a display interface;
responding to a first triggering operation of a target sentence in the at least one candidate sentence, and displaying at least one candidate word of the target sentence on the display interface;
and generating target text according to the selected candidate words and the target sentence in response to a first selection operation of the at least one candidate word.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
inputting the related text information of the user into a preset text generation model to obtain and display at least one candidate sentence on a display interface;
responding to a first triggering operation of a target sentence in the at least one candidate sentence, and displaying at least one candidate word of the target sentence on the display interface;
and generating target text according to the selected candidate words and the target sentence in response to a first selection operation of the at least one candidate word.
The method, the device, the computer equipment, the storage medium and the computer program product for automatically generating dialogue content are characterized in that the related text information of a user is input into a preset text generation model, at least one candidate sentence is obtained and displayed on a display interface, at least one candidate word of a target sentence is displayed on the display interface in response to a first triggering operation of the target sentence in the at least one candidate sentence, and target text is generated according to the selected candidate word and the target sentence in response to a first selecting operation of the at least one candidate word. According to the method, the candidate sentences corresponding to the text pre-input by the user are generated by analyzing the related text information of the user, and then the candidate sentences are directly used as the text pre-input by the user to be displayed on the display interface; moreover, the candidate sentences obtained from the related text information of the user more accords with the language expression habit of the user, so that the text finally displayed on the display interface can more accord with the language habit of the user, and the experience of the user for inputting the text is further improved; in addition, in the process of generating the target text, candidate words are also provided to replace words in the target sentence, so that the user can conveniently modify the target sentence under the condition that the current target sentence fails to meet the use requirement of the user, and the flexibility and applicability of text input are improved.
Drawings
FIG. 1 is an internal block diagram of a computer device in one embodiment;
FIG. 2 is a flow diagram of a method of automatically generating dialog content in one embodiment;
FIG. 2A is a schematic diagram of a display interface in one embodiment;
FIG. 2B is a schematic diagram of a display interface in another embodiment;
FIG. 2C is a schematic diagram of a display interface in another embodiment;
FIG. 3 is a flow chart of one implementation of S102 in the embodiment of FIG. 2;
FIG. 4 is a flow chart of one implementation of S201 in the embodiment of FIG. 3;
FIG. 4A is a schematic diagram of a display interface in another embodiment;
FIG. 5 is a flow chart of one implementation of S202 in the embodiment of FIG. 3;
FIG. 5A is a schematic diagram of a display interface in another embodiment;
FIG. 6 is a flow chart of one implementation of S101 in the embodiment of FIG. 2;
FIG. 7 is a flow chart of another implementation of S101 in the embodiment of FIG. 2;
FIG. 8 is a flow chart of a method for automatically generating dialog content in another embodiment;
FIG. 9 is a flow chart of a method for automatically generating dialog content in another embodiment;
FIG. 10 is an exemplary diagram of a method of automatically generating dialog content in one embodiment;
FIG. 11 is a block diagram of an apparatus for automatically generating dialog content in one embodiment;
FIG. 12 is a block diagram of an apparatus for automatically generating dialog content in one embodiment;
FIG. 13 is a block diagram of an apparatus for automatically generating dialog content in one embodiment;
FIG. 14 is a block diagram of an apparatus for automatically generating dialog content in one embodiment;
fig. 15 is a block diagram of an apparatus for automatically generating dialog content in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The existing Chinese character input, especially online character input, is mainly realized by giving candidate words by means of full spelling, and then selecting corresponding words by a user. Specifically, when the candidate words are given by means of the full pinyin, the candidate words can be given according to the use frequency of the unused words under the same pinyin, or the candidate words can be given according to the input frequency of the words by the user, and then the candidate words can be given according to the collocation probability of the words. In summary, the existing text input process is a word-by-word input process, and mainly selects candidate words for input by means of collocation relations among words, so that input efficiency is extremely low. In order to solve the problem, the applicant finds that the existing input method does not consider the context relation of sentence level and does not assist in inputting from sentence level, so that the applicant fully excavates the context relation of sentences by using a deep generation technology from this aspect, and gives a method for automatically generating dialogue content from sentence level so as to improve text input efficiency, and the following embodiments specifically describe the method for automatically generating dialogue content described in the application.
The method for automatically generating the dialogue content provided by the embodiment of the application can be applied to the computer equipment shown in the figure 1. The computer device may be a terminal, and its internal structure may be as shown in fig. 1. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of automatically generating dialog content. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, as shown in fig. 2, a method for automatically generating dialogue content is provided, and the method is applied to the computer device in fig. 1 for illustration, and includes the following steps:
s101, inputting related text information of a user into a preset text generation model, and obtaining and displaying at least one candidate sentence on a display interface.
The related text information of the user can be chat information of the user and other users in a current chat scene or chat information of the user and other users in a historical chat scene; optionally, the related text information of the user may be information already input by the user in the current search box or text input box, or information historically input in the current search box or text input box; optionally, the related text information of the user may be some commonly used greetings or daily expressions, which are not limited in the embodiment of the present application.
The text generation model is trained based on sample related text information and initial text generation models of different users in advance and is used for analyzing language expression habits of the users according to the related text information, so that sentences conforming to the user expression habits can be generated, namely, the text generation model can generate sentences which possibly become to be input by the users on a display interface. Alternatively, the text generation model may be obtained based on an initial model training of a neural network, may be obtained based on an initial model training of machine learning, or may be a mathematical model constructed by statistically relevant text information, which is not limited herein.
A text entry box or search box 10 is included on the display interface (see schematic diagram as described in fig. 2A) in which text (any of words, terms, sentences) can be entered by the user; when a user inputs a text in the text input box 10 on the display interface, one or more candidate sentences corresponding to the text and an interface display box 20 where the candidate sentences are located can be displayed on the display interface at the same time, and a pull-down control is arranged in the interface display box where the candidate sentences are located, so that the user can conveniently execute pull-down operation, and the interface display box 20 is updated to display other candidate sentences; optionally, various functionality controls 40 are also included on the display interface for assisting the user in processing the entered text information. Optionally, a cursor 30 is also included on the display interface, the cursor 30 being used to track the user's input text. It will be appreciated that the display interface depicted in fig. 2A is merely illustrative and that the display content and form of the display interface is not limited herein.
In this embodiment, the display interface is displayed on the display screen of the computer device, and the user may input text in any position in the text input box or the search box of the display interface. When a user inputs text in a text input box or a search box or prepares to input text, the computer device may collect related text information of the user first, and input the related text information of the user into a preset text generation model to perform sentence prediction, so as to obtain one or more sentences which are in accordance with the language expression habit of the user, or obtain one or more sentences similar to the text input by the user, or obtain one or more sentences which the user may want to input. And then taking the obtained one or more sentences as candidate sentences, and displaying the candidate sentences at corresponding positions on the display interface, wherein the display positions can be the positions (such as the positions where the cursors are positioned) of the sentences to be input by the user or other positions of the display interface, and the positions can be predetermined by the computer equipment. Moreover, after the candidate sentence is displayed by the computer device, the display position of the candidate sentence can be moved according to the requirement of the user, for example, the user can change the display position of the candidate sentence by pulling the interface display frame where the candidate sentence is located on the display interface.
S102, responding to a first triggering operation of a target sentence in at least one candidate sentence, and displaying at least one candidate word of the target sentence on a display interface.
Wherein the target sentence is a sentence selected by the user among the plurality of candidate sentences. The first triggering operation may be an operation in which a user selects a target sentence among one or more candidate sentences. In practical application, the first triggering operation may be any operation of clicking, double clicking, sliding, long pressing, staying and the like performed on the display interface by using a mouse, or any operation of touching, clicking, double clicking, sliding, long pressing and the like by a user directly on the display interface; or, the operation of selecting the target sentence by the shortcut key such as up, down, left, right, carriage return and the like may be performed.
In this embodiment, when the computer device displays a candidate sentence on the display interface, the user may use the candidate sentence as a target sentence, and trigger a first trigger operation by executing any one of clicking, double clicking, sliding, long pressing, staying, and the like on the target sentence; optionally, when the computer device displays a plurality of candidate sentences on the display interface, the user may first select one sentence from the plurality of candidate sentences as a target sentence, and trigger the first triggering operation by performing any operation of clicking, double-clicking, sliding, long-pressing, staying, and the like on the target sentence.
After the user executes the first triggering operation, the computer equipment responds to the first triggering operation, gathers candidate words corresponding to each word in the target sentence from a cloud database or a local database, and then simultaneously displays the candidate words corresponding to each word in the target sentence on a display interface; optionally, the computer device may also display candidate words corresponding to one or several words in the target sentence on the display interface. The words of the candidate words to be displayed in the target sentence can be determined according to the selection of the user; or may be determined according to the attribute of the word itself, for example, only adjectives or verbs in the sentence are presented; it may also be determined based on the importance of the word in the sentence. It should be noted that, the number of candidate words corresponding to the words in the target sentence may be one or more, and when the number of candidate words is plural, the computer device may randomly sort and directly display the plural candidate words when displaying the candidate words corresponding to the words; optionally, the candidate words can be displayed after being sequenced according to the historical word habit of the user; optionally, the computer device may sort the plurality of candidate words in order of high-to-low similarity with the corresponding word, and then display the sorted candidate words on the display interface.
The display position of the candidate words can be determined by the computer device in advance according to actual application requirements, for example, according to experience degree of a user or from the aesthetic point of view of a display interface. For example, the display position of the candidate word may be a nearby area of the corresponding word (see the schematic diagram shown in fig. 2B), or a nearby area of the target sentence, or may even be any position of the display interface, which is not limited herein. The fonts or other attributes of the candidate words can also be determined in advance by the computer equipment according to actual application requirements, for example, in order to distinguish the candidate words from the target sentences, the fonts of the candidate words and the target sentences can be set to be different fonts; for another example, in order to distinguish the candidate word from the target sentence, the font color of the candidate word may be set to a different color from the font color of the target sentence. It should be noted that, after the computer device responds to the first triggering operation, it is explained that the user has determined the target sentence in the multiple candidate sentences, the corresponding computer device may also modify the font, color or size of the target sentence selected by the user, or underline the target sentence to distinguish other candidate sentences, so as to facilitate the user to view the target sentence.
S103, responding to a first selection operation of at least one candidate word, and generating target text according to the selected candidate word and the target sentence.
Wherein the target text is the text to be entered by the user in a text entry box or search box on the display interface. The first selection operation is an operation in which the user selects a word among one or more candidate words corresponding to each word. In practical application, the first selection operation may be any operation of clicking, double clicking, sliding, long pressing, staying and the like performed on the display interface by using a mouse, or any operation of touching, clicking, double clicking, sliding, long pressing and the like by a user directly on the display interface; alternatively, an operation may be performed by using a shortcut key such as enter, down key, space, etc.
In this embodiment, when the computer device displays a candidate word of a word in the target sentence on the display interface, the user may use the candidate word as a substitute word, and trigger the first selection operation by performing any one of clicking, double clicking, sliding, long pressing, staying, and the like on the substitute word; optionally, when the computer device displays a plurality of candidate words of a certain word in the target sentence on the display interface, the user may first select one word from the plurality of candidate words as a substitute word, and trigger the first selection operation by performing any one operation of clicking, double-clicking, sliding, long-pressing, staying, etc. on the substitute word; alternatively, the first selection operation may be triggered by a shortcut key such as a carriage return, a down key, or a space.
After the user performs the first selection operation, the computer equipment responds to the first selection operation, replaces the corresponding word in the target sentence with the candidate word selected by the user to update the target sentence, and finally takes the updated target sentence as the target text. It should be noted that, when the computer device displays the candidate word of a certain word in the target sentence on the display interface, the user may execute the first trigger operation to select the candidate word, or may not execute the first trigger operation, that is, may not select the candidate word. It should be noted that, after the computer device responds to the first selection operation, it is explained that the user has selected the replacement word among the plurality of candidate words, and then the corresponding computer device may also modify the font, color or size of the replacement word selected by the user, or underline the replacement word to distinguish other candidate words, so as to facilitate the user to view the replacement word.
Optionally, after the computer device obtains the target text, the target text may be displayed at the original position of the target sentence, and then determined by the user and displayed at the position where the user wants to input the text; optionally, after the target text is obtained, the computer device may also directly display the target text at a location where the user is to input the text. For example, referring to fig. 2C, the target sentence is "today's weather is good", and if the user selects the candidate word "today" to replace the corresponding word "today" and selects the candidate word "too good" to replace the corresponding word "good", the updated target sentence is "today's weather is too good". The target sentence is displayed at the position of the candidate sentence 1 in fig. 2C (not shown in fig. 2C), or the target sentence is displayed at the position of fig. 2C where the text is to be input, i.e., behind the cursor 30 in fig. 2C.
Optionally, in some scenarios, if there is a candidate sentence that meets the user requirement in the candidate sentences obtained according to the related text information of the user, the user may directly select the candidate sentence for outputting, that is, when there is a candidate sentence that the user can directly use in the recommended candidate sentences, the user may directly select for outputting without replacing the word therein.
According to the method for automatically generating the dialogue content, related text information of a user is input into a preset text generation model, at least one candidate sentence is obtained and displayed on a display interface, at least one candidate word of a target sentence is displayed on the display interface in response to a first triggering operation on the target sentence in the at least one candidate sentence, and target text is generated according to the selected candidate word and the target sentence in response to a first selecting operation on the at least one candidate word. According to the method, the candidate sentences corresponding to the text pre-input by the user are generated by analyzing the related text information of the user, and then the candidate sentences are directly used as the text pre-input by the user to be displayed on the display interface; moreover, the candidate sentences obtained from the related text information of the user more accords with the language expression habit of the user, so that the text finally displayed on the display interface can more accord with the language habit of the user, and the experience of the user for inputting the text is further improved; in addition, in the process of generating the target text, candidate words are also provided to replace words in the target sentence, so that the user can conveniently modify the target sentence under the condition that the current target sentence fails to meet the use requirement of the user, and the flexibility and applicability of text input are improved.
Optionally, after the target text is input on the display interface by the computer device, the target text can be stored, that is, relevant text information of the user is updated according to the target text, and then the text generation model is trained based on the new relevant text information so as to update the text generation model, so that the text can be output by using the updated text generation model when the user inputs the text in the next sentence input mode, the text can more conform to the term habit of the user, the user input requirement is greatly met, and the text input efficiency of the user is further improved.
In one embodiment, an implementation manner of the step S102 is provided, that is, the step S102 "in response to a first trigger operation on a target sentence in at least one candidate sentence, at least one candidate word of the target sentence is displayed on a display interface, as shown in fig. 3, including:
s201, responding to a first trigger operation of the target sentence, and segmenting the target sentence to obtain and display each word of the target sentence on a display interface.
In this embodiment, after the user performs the first trigger operation, the computer device responds to the first trigger operation, and in the response process, the computer device may first perform word segmentation display on the target sentence, and specifically may set spaces between each word in the target sentence, so as to separate each word of the target sentence; or setting each word in the target sentence to be different in color, font or size so as to separate each word of the target sentence; then or inserting a mark vertical line between each word in the target sentence so as to separate each word of the target sentence; and then or changing the arrangement sequence of the words in the target sentence so as to separate the words of the target sentence. When the computer device performs word segmentation on the target sentence, the segmented target sentence can be displayed at the original position of the target sentence, for example, in the interface schematic diagrams shown in fig. 2B and 2C, the sentence "today weather is good" is the target sentence, the target sentence is segmented, that is, spaces are set between the words in the target sentence, so as to obtain the segmented sentence "today weather is good-! And displaying the segmented sentence at the original position of the target sentence. Alternatively, the computer device may display the target sentence after word segmentation at other positions of the display interface, which is not limited thereto.
S202, at least one candidate word corresponding to the target word is displayed on a display interface in response to a second selection operation of the target word in each word.
Wherein the candidate word is a paraphrase of the target word. The target word is a word which is selected by a user in the target sentence and corresponds to the candidate word to be displayed, and the word can be any word in the target word. The second selection operation is an operation in which the user selects a target word among all the words constituting the target sentence. In practical application, the second selection operation may be any operation of clicking, double clicking, sliding, long pressing, staying, etc. performed on the display interface by the user using the mouse; or the user directly touches, clicks, double clicks, slides, presses, etc. any one of the operations on the display interface by hand; or, the operation may be triggered by a shortcut such as up, down, left, right, or enter.
In this embodiment, when the computer device performs word segmentation on the target sentence based on the foregoing steps to obtain the segmented target sentence, the user may select one word from any one of all the words that constitute the target sentence as the target word, and trigger the second selection operation by performing any operation such as clicking, double clicking, sliding, staying, etc. on the interface where the target word is located. After the user performs the second selection operation, the computer device responds to the second selection operation and gathers at least one candidate word corresponding to the target word from the cloud database or the local database, for example, gathers all the paraphrasing words of the target word as corresponding candidate words. And finally, displaying all candidate words corresponding to the target word on a display interface. It can be understood that when the candidate words corresponding to the target word are a plurality of, the computer device can randomly sort and directly display the plurality of candidate words when displaying the plurality of candidate words corresponding to the target word; optionally, the computer device may sort the plurality of candidate words according to a sequence from high to low in similarity with the target word, or sort the plurality of candidate words according to a sequence from high to low in use frequency of the words, and then display the sorted candidate words on the display interface.
According to the method, candidate words of the target sentence are displayed after word segmentation processing is carried out on the target sentence, so that misoperation caused by the fact that a user executes a second selection operation due to the fact that the distance between the words is too close can be avoided; and the user can conveniently select the target word from all words of the target sentence, namely, the second selection operation is conveniently triggered, so that the convenience of the user operation is greatly improved.
Further, in one embodiment, a method for word segmentation of a target sentence is provided, that is, "word segmentation of a target sentence is performed on a target sentence to obtain and display each word of a target sentence on a display interface" in S201, as shown in fig. 4, including:
s301, inputting the target sentence into a preset word segmentation model to segment words, and obtaining each word of the target sentence.
The word segmentation model is obtained by training an initial word segmentation model according to historical text corpus of a user and is used for segmenting the input sentences. After the computer equipment acquires the historical text corpus of the user, carrying out corresponding word segmentation labeling on part of the corpus in the historical text corpus, and then training based on the historical text corpus, the labeled historical text corpus and the initial word segmentation model to obtain the word segmentation model used in the method.
In this embodiment, after the user performs the first trigger operation, the computer device immediately responds to the first trigger operation, and in the response process, the computer device may first segment the target sentence, specifically may input the target sentence into the trained segmentation model for segmentation, where the segmentation model may directly output each word of the segmented target sentence. According to the method and the device, the target sentence is segmented through the word segmentation model, the efficient and accurate word segmentation effect can be achieved, moreover, the word segmentation model is obtained based on the historical text corpus training of the user, the word segmentation output by the word segmentation model accords with the language expression habit of the user, and the user can select candidate words based on the word segmentation conveniently.
S302, displaying each word on a display interface.
In this embodiment, after the target sentence is segmented, the target sentence may be displayed on the interface in various manners, for example, the words are separately displayed by setting spaces between the words in the input sentence; or the words are separately displayed in a mode of setting each word in the input sentence to be different in color, font or size; then or through inserting the mark vertical line between each word in the input sentence to separate and display the words; and then or the words in the input sentence are separated and arranged in different rows to separate and display the words, and the specific display mode can be determined by the computer equipment according to the actual application requirements.
After the computer equipment performs word segmentation on the target sentence, each word after word segmentation can be displayed at any position of a display interface; in order to improve the user experience, each word after word segmentation can be displayed at any position in a display area where a target sentence is located; more preferably, each word after word segmentation can be displayed at the original display position of the target sentence, for example, in the interface schematic diagrams as shown in fig. 2B and 2C, the sentence "today weather is good" is the target sentence, the word "today", "weather", "good" after word segmentation can be obtained after the target sentence is input into the word segmentation model, and the word after word segmentation is displayed at the original position of the target sentence instead of the original target sentence. Optionally, each word after word segmentation may be arranged and displayed according to the sequence of each word in the original target sentence, for example, each word after word segmentation in fig. 2B and 2C is arranged according to the ordering manner of each word in the target sentence "today", "weather", "really good"; alternatively, the words after word segmentation may be vertically arranged and displayed, for example, as shown in fig. 4A, where the words "today", "weather", "really good" after word segmentation are vertically arranged and displayed in the interface display area 20 where the target sentence "weather really good" is located.
Optionally, a manner of sorting and displaying candidate words is provided, that is, S202 "in response to the second selection operation of the target word in the respective words, at least one candidate word corresponding to the target word is displayed on the display interface", as shown in fig. 5, and the method includes:
s401, at least one candidate word of the target word is acquired in response to the second selection operation.
In this embodiment, when the computer device displays the target sentence on the display interface, the user may select one word from any one of all the words that constitute the target sentence as the target word, and trigger the second selection operation by performing any operation such as clicking, double clicking, sliding, and staying on the interface where the target word is located. When the user performs the second selection operation, the computer equipment immediately responds to the second selection operation and can collect the paraphrasing or similar words corresponding to the target word from the cloud database or the local database as candidate words; or inputting the target word into a trained word matching model to obtain at least one candidate word corresponding to the target word, wherein the word matching model is obtained by training in advance based on a large number of sample words and corresponding hyponyms or similar words.
S402, determining the word sequence of each candidate word according to the word characteristics of the user.
The word characteristics are determined according to the historical text corpus of the user. The user's word characteristics may characterize the user's word habits or word frequencies, i.e., the user's word habits or word frequencies are determined by analyzing the user's word characteristics. The computer device may be trained in advance based on the historical text corpus to obtain a word analysis model for analyzing the user's word features.
In this embodiment, when the computer device obtains at least one candidate word of the target word, a historical text corpus of the user may be obtained, and frequency analysis is performed on each word in the text corpus, so as to determine a frequency of use of each candidate word corresponding to the target word, determine a word feature of the user according to the frequency of use of each candidate word, and finally determine a word sequence of each candidate word according to the word feature of the user. For example, the computer device may rank the candidate words in order of higher frequency of use. Optionally, the computer device may also analyze the importance of each word in the text corpus, determine the word usage characteristics of the user according to the analysis result, and finally determine the word order of each candidate word according to the word usage characteristics of the user. Optionally, the computer device may also directly input the text corpus into a pre-trained word analysis model to perform word habit analysis of the user, obtain word features of the user, and determine word sequences of each candidate word based on the word features.
S403, displaying each candidate word on a display interface according to the word sequence.
In this embodiment, after the computer device obtains the ranked candidate terms, the ranked candidate terms may be directly displayed on the display interface, specifically, may be displayed at a position near the target sentence of the display interface, or may be displayed at any position of the display interface; optionally, after the computer device obtains the sorted candidate words, the sorted candidate words may be labeled sequentially, and then the labeled candidate words may be displayed on the display interface, specifically, may be displayed in a position near the target sentence of the display interface, or may be displayed in any position of the display interface. For example, referring to the interface schematic diagram shown in fig. 5A, the candidate words "climate" and "temperature" corresponding to the candidate word "weather" are displayed after being labeled sequentially; and the candidate words 'really good' and 'true bar' corresponding to the candidate words 'really good' are displayed after being marked in sequence. According to the method and the device for classifying the candidate words, the candidate words are ordered by analyzing the word characteristics of the user, so that the user can quickly determine the required candidate words, and further the text input efficiency is improved. In addition, each candidate word better accords with the word habit of the user, so that the target sentence finally determined based on the candidate word can better accord with the word habit of the user, and the experience of the user for inputting the text is further improved.
Optionally, after the target text is input on the display interface by the computer device, the target text may be stored, that is, the historical text corpus in the above embodiment is updated according to the target text, and then the word analysis model is trained based on the new historical text corpus, so as to update the word analysis model, so that when the user selects the candidate word next time, the candidate word is output by using the updated word analysis model, and the candidate word further accords with the term habit of the user, thereby greatly meeting the user input requirement and further improving the efficiency of inputting the text by the user.
In practical application, when a user inputs text in a text input box of a display interface, the computer device first obtains related text information of the user, where the related text information may be the previous input information of the user or may be the historical input information of the user, so for the two types of related text information, in one embodiment, an implementation manner of S101 is provided, that is, S101 "inputs the related text information of the user into a preset text generation model, and obtains and displays at least one candidate sentence" on the display interface, as shown in fig. 6, including:
S501, acquiring the previous input information in the current input scene; if the previous input information of the user is obtained in the current input scene, executing step S502; if no previous input information is acquired in the current input scene, step S503 is performed.
S502, the input information is used as related text information to be input into a preset text generation model, and at least one candidate sentence is obtained and displayed on a display interface.
The current input scene may be a chat scene between the user and other users, or a scene in which the user inputs text in a text input box or search box. The user's input information may include chat information of the user in the current chat scenario, for example, the user a and the user B perform text chat, and the user a's input information includes all chat information of the user a and the user B in the current chat; alternatively, the user's previous input information includes text information that the user has entered in a text input box or search box, for example, referring to the interface diagram shown in fig. 5A, user a enters the text "hello" in the text input box 10.
In this embodiment, a display interface is displayed on a display screen of a computer device, and a user may input text in a text input box or a search box of the display interface, or prepare to input text, that is, may start to perform information interaction with other users, enter a current input scene, and immediately collect chat information of the user in the current input scene, or collect text information that has been input by the user in the text input box or the search box, so as to obtain the input information of the user. The computer device may then input the user's previously entered information into a pre-trained word generation model for sentence prediction, resulting in one or more sentences that are more consistent with the user's usage habits, or resulting in one or more sentences that are similar to the text entered by the user, or resulting in one or more sentences that the user may want to enter. And then taking the obtained one or more sentences as candidate sentences, and displaying the candidate sentences at corresponding positions on a display interface. The embodiment provides two methods for predicting candidate sentences based on the current chat information and predicting the candidate sentences based on the text input in the search box, fully utilizes the existing sentence information about the user, and can improve the text input efficiency.
S503, the historical input information of the user is used as related text information to be input into a preset text generation model, and at least one candidate sentence is obtained and displayed on a display interface.
The historical input information of the user may include chat information of the user in a previous or historical chat scene, for example, the user a and the user B perform text chat or voice chat on a previous day, and the historical input information of the user a includes all chat information of the user a and the user B in the 24-hour chat; alternatively, the user's history input information includes text information that the user historically entered in the text input box or search box, for example, text information that the user a has entered in the text input box or search box within a week from the current point in time; alternatively, the user's historical input information includes some commonly used greetings or daily language.
In this embodiment, a display interface is displayed on a display screen of the computer device, and a user may input text in a text input box or a search box of the display interface, or prepare to input text, that is, may start to perform information interaction with other users, enter a current input scene, and immediately collect historical chat information of the user in the current input scene, or collect historical input information of the user in the text input box or the search box, and the latter collects some daily greetings or daily expressions to obtain the historical input information of the user. The computer device may then input the historical input information of the user into a pre-trained word generation model for sentence prediction, resulting in one or more sentences that are more consistent with the user's use in habit, or resulting in one or more sentences that are similar to the text entered by the user, or resulting in one or more sentences that the user may want to input. And then taking the obtained one or more sentences as candidate sentences, and displaying the candidate sentences at corresponding positions on a display interface. According to the embodiment, three methods for predicting candidate sentences based on historical chat information or predicting candidate sentences based on texts input in a search box or predicting candidate sentences based on common greetings or daily expressions are provided, historical sentence information about a user or common sentence information is fully utilized, candidate sentences which more accord with the expression habits of the user can be obtained, and further experience of inputting texts by the user is improved.
When the computer device executes step S101 in the embodiment of fig. 2 to obtain a plurality of candidate sentences, and before displaying the plurality of candidate sentences, the computer device may sort the plurality of candidate sentences, so in one embodiment, there is also provided a method for sorting the plurality of candidate sentences, that is, "displaying at least one candidate sentence on a display interface", as shown in fig. 7, the method includes:
s601, sorting the candidate sentences according to the historical input habit characteristics of the user to obtain sentence sequences.
The historical input habit characteristics are determined according to the historical text corpus of the user. The user's historical input habit characteristics may characterize the user's once-used word habit, e.g., analyze the user's word frequency of words as the word habit. The computer device may be trained in advance based on the historical text corpus to obtain a sentence analysis model for analyzing the historical input habit characteristics of the user.
In this embodiment, when the computer device obtains a plurality of candidate words, a historical text corpus of the user may be obtained, and frequency analysis is performed on each sentence in the text corpus, so as to determine the frequency of use of each candidate sentence, determine the historical input habit characteristics of the user according to the frequency of use of each candidate sentence, and finally determine the sentence sequence of each candidate sentence according to the historical input habit characteristics of the user. For example, the computer device may rank the candidate sentences in order of use frequency from high to low. Optionally, the computer device may analyze the importance of each sentence in the text corpus, determine the historical input habit characteristics of the user according to the analysis result, and finally determine the sentence sequence of each candidate sentence according to the historical input habit characteristics of the user. Optionally, the computer device may also input the text corpus into a pre-trained sentence analysis model to perform user sentence habit analysis, obtain a historical input habit feature of the user, and determine a word sequence of each candidate sentence based on the historical input habit feature.
S602, displaying each candidate sentence on a display interface according to the sentence sequence.
In this embodiment, after the computer device obtains the ordered candidate sentences, the ordered candidate sentences may be directly displayed on the display interface, and specifically may be displayed at a position where a text input box or a region near the search box is located, or may be displayed at any position on the display interface; optionally, after the computer device obtains the ordered candidate sentences, the ordered candidate sentences may be labeled sequentially, and then the labeled candidate sentences are displayed on the display interface, which may specifically be displayed at the position of the text input box or the area near the search box, or may be displayed at any position of the display interface. For example, see the interface diagram shown in fig. 2A, where the candidate sentences "weather today is good", "what do you have? "and" do you have time today? "display after sequential labeling". According to the method and the device for ordering the candidate sentences, the user is enabled to rapidly determine the needed candidate sentences by analyzing the historical input habit characteristics of the user, and therefore the text input efficiency is improved. In addition, each candidate sentence is more in line with the term habit of the user, so that the input text finally determined based on the candidate sentences is more in line with the term habit of the user, and the experience of the user for inputting the text is further improved.
The foregoing embodiments of fig. 2 to 7 are all directed to sentence input modes, that is, the user inputs text in a text input box of the display interface by using the method described in the foregoing embodiment of fig. 2 to 7, however, when a candidate sentence given on the display interface does not have a sentence capable of meeting the user's requirement, the computer device may directly go into the pinyin word input mode, so the method described in the foregoing embodiment of fig. 2, as shown in fig. 8, further includes the steps of:
s104, responding to a second triggering operation on the display interface, and switching from the sentence input mode to the pinyin word input mode.
S105, inputting target text on the display interface based on the pinyin word input mode.
Wherein the second triggering operation is an operation in which the user switches the text input mode. In practical applications, the second triggering operation may be any operation of clicking, double clicking, sliding, long pressing, etc. performed by the user on the display interface by using the mouse, or any operation of touching, clicking, double clicking, sliding, long pressing, etc. by hand directly on the display interface, for example, the computer device may set a control or button for corresponding mode conversion on the display interface, and the user may trigger the second triggering operation by using the mouse or any operation of clicking, double clicking, long pressing, double clicking, etc. by hand.
In this embodiment, when the candidate sentence displayed on the display interface fails to meet the user requirement or the user performs text input in advance using the pinyin word input mode, the user may trigger the second triggering operation on the display interface by executing any one of the operations of clicking, double clicking, sliding, long pressing, and the like. When the user executes the second trigger operation, the computer equipment immediately responds to the second trigger operation, and switches from the current sentence input mode to the pinyin word input mode, and inputs the text according to the conventional pinyin input method. Optionally, after the computer device inputs the target text according to the pinyin input method on the display interface, the target text can be stored, that is, relevant text information of the user is updated according to the target text, and then the text generation model is trained based on the new relevant text information so as to update the text generation model, so that the text can be output by using the updated text generation model when the user inputs the text in the next sentence input mode, the text can more conform to the term habit of the user, the user input requirement is greatly met, and the text input efficiency of the user is further improved.
In summary, all the above embodiments provide a text input method, as shown in fig. 9, which includes:
S601, the computer equipment acquires the previous input information of the user in the current input scene, if the previous input information is acquired in the current input scene, the step S602 is executed, and if the previous input information is not acquired in the current input scene, the step S603 is executed.
S602, the input information is input into a preset character generation model as related character information, and at least one candidate sentence is obtained and displayed on a display interface.
S603, the historical input information of the user is used as related text information to be input into a preset text generation model, and at least one candidate sentence is obtained and displayed on a display interface.
S604, responding to a first triggering operation of a target sentence in at least one candidate sentence, and inputting the target sentence into a preset word segmentation model to segment words to obtain each word of the target sentence.
The word segmentation model is obtained by training an initial word segmentation model according to historical text corpus of a user.
S605, each word is displayed on the display interface.
S606, at least one candidate word of the target word is obtained in response to the second selection operation of the target word in the words.
S607, determining the word sequence of each candidate word according to the word characteristics of the user; the word characteristics are determined according to the historical text corpus of the user.
And S608, displaying each candidate word on a display interface according to the word sequence.
S609, in response to a first selection operation of at least one candidate word, generating target text according to the selected candidate word and the target sentence.
And S610, storing the target text into a database to record user input.
S611, in the case that the target text does not meet the input requirement of the user, responding to the second triggering operation on the display interface, switching from the sentence input mode to the pinyin word input mode, and inputting and storing the target text on the display interface in the pinyin word input mode.
The above steps are described in the foregoing, and the detailed description is referred to the foregoing description, which is not repeated here.
Exemplary description of the text input method, see the example schematic diagram shown in fig. 10, in which the computer device inputs the previous input information "you do" to the text generation model, outputs three candidate sentences "you do", "how you do? The method comprises the steps that a user triggers a first trigger operation on a display interface, so that a target sentence 'you good, the weather today is good' in three candidate sentences is selected, the computer equipment inputs the selected candidate sentences into a word segmentation model to perform word segmentation processing to obtain segmented words corresponding to the selected candidate sentences, and then the computer equipment inputs the segmented words into a word analysis module to perform word feature analysis of the user to obtain candidate words corresponding to each word. In fig. 10, each candidate sentence is subjected to word segmentation, which is only illustrated, that is, in general, only the selected candidate word is subjected to word segmentation, and then a selection is made among the candidate words corresponding to the words after word segmentation to modify the selected candidate sentence. And finally taking the modified selected candidate sentence as a text pre-input on a display interface. When the text to be entered is determined, the text to be entered may be stored as a user input record. The computer equipment can train the character generation model and the word analysis model according to the new user input records so as to update the character generation model and the word analysis model in real time, so that the input text obtained based on the two models at the later stage accords with the word habit of the user, and the input experience of the user is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a device for automatically generating dialogue content for realizing the method for automatically generating dialogue content. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiment of the apparatus for automatically generating dialog content provided below may refer to the limitation of the method for automatically generating dialog content hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 11, there is provided an apparatus for automatically generating dialogue content, comprising:
the input module 11 is configured to input related text information of a user into a preset text generation model, obtain and display at least one candidate sentence on a display interface;
a first response module 12, configured to display at least one candidate word of a target sentence on the display interface in response to a first trigger operation on the target sentence in the at least one candidate sentence;
and the second response module 13 is used for responding to the first selection operation of the at least one candidate word and generating target text according to the selected candidate word and the target sentence.
In one embodiment, the first response module 12, as shown in fig. 12, includes:
a word segmentation unit 121, configured to perform word segmentation on the target sentence in response to a first trigger operation on the target sentence, so as to obtain and display each word of the target sentence on the display interface;
a first display unit 122, configured to display, on the display interface, at least one candidate word corresponding to a target word in the respective words in response to a second selection operation of the target word; the candidate word is a paraphrase of the target word.
In one embodiment, the word segmentation unit 121 is specifically configured to input the target sentence into a preset word segmentation model for word segmentation, obtain each word of the target sentence, and display each word on the display interface.
In one embodiment, the first display unit 122 is specifically configured to obtain at least one candidate word of the target word in response to the second selection operation, determine a word order of each candidate word according to the word characteristics of the user, and display each candidate word on the display interface according to the word order.
In one embodiment, the input module 11, as shown in fig. 13, includes:
a second display unit 111, configured to, when the previous input information of the user is obtained in the current input scene, input the previous input information as the related text information into a preset text generation model, obtain and display at least one candidate sentence on a display interface;
and a third display unit 112, configured to input, when the previous input information is not acquired in the current input scene, the historical input information of the user as the relevant text information into a preset text generation model, so as to obtain and display at least one candidate sentence on a display interface.
In one embodiment, the input module 11, as shown in fig. 14, includes:
a ranking unit 113, configured to rank each candidate sentence according to the history input habit characteristics of the user, so as to obtain a sentence sequence;
and a fourth display unit 114, configured to display each candidate sentence on the display interface according to the sentence sequence.
In one embodiment, the apparatus for automatically generating dialogue content, as shown in fig. 15, further includes:
a switching module 14, configured to switch from the sentence input mode to the pinyin-word input mode in response to a second triggering operation on the display interface.
The respective modules in the above-described apparatus for automatically generating dialog contents may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
Inputting the related text information of the user into a preset text generation model to obtain and display at least one candidate sentence on a display interface;
responding to a first triggering operation of a target sentence in the at least one candidate sentence, and displaying at least one candidate word of the target sentence on the display interface;
and generating target text according to the selected candidate words and the target sentence in response to a first selection operation of the at least one candidate word.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
inputting the related text information of the user into a preset text generation model to obtain and display at least one candidate sentence on a display interface;
responding to a first triggering operation of a target sentence in the at least one candidate sentence, and displaying at least one candidate word of the target sentence on the display interface;
and generating target text according to the selected candidate words and the target sentence in response to a first selection operation of the at least one candidate word.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
inputting the related text information of the user into a preset text generation model to obtain and display at least one candidate sentence on a display interface;
responding to a first triggering operation of a target sentence in the at least one candidate sentence, and displaying at least one candidate word of the target sentence on the display interface;
and generating target text according to the selected candidate words and the target sentence in response to a first selection operation of the at least one candidate word.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method of automatically generating dialog content, the method comprising:
inputting the related text information of the user into a preset text generation model to obtain and display at least one candidate sentence on a display interface;
responding to a first triggering operation of a target sentence in the at least one candidate sentence, and displaying at least one candidate word of the target sentence on the display interface;
And generating target text according to the selected candidate words and the target sentence in response to a first selection operation of the at least one candidate word.
2. The method of claim 1, wherein the displaying at least one candidate term of the target sentence on the display interface in response to a first trigger operation on a target sentence of the at least one candidate sentence comprises:
responding to a first triggering operation of the target sentence, and word segmentation is carried out on the target sentence to obtain and display each word of the target sentence on the display interface;
responding to a second selection operation of a target word in the words, and displaying at least one candidate word corresponding to the target word on the display interface; the candidate word is a paraphrase of the target word.
3. The method according to claim 2, wherein the word segmentation of the target sentence to obtain and display each word of the target sentence on the display interface includes:
inputting the target sentence into a preset word segmentation model to segment words, and obtaining each word of the target sentence; the word segmentation model is obtained by training an initial word segmentation model according to the historical text corpus of the user;
And displaying the words on the display interface.
4. A method according to claim 2 or 3, wherein said displaying, in response to a second selection operation of a target word of the respective words, at least one candidate word corresponding to the target word on the display interface comprises:
in response to the second selection operation, obtaining at least one candidate word of the target word;
determining the word sequence of each candidate word according to the word characteristics of the user; the word characteristics are determined according to the historical text corpus of the user;
and displaying each candidate word on the display interface according to the word sequence.
5. A method according to any one of claims 1-3, wherein inputting the related text information of the user into a preset text generation model, obtaining and displaying at least one candidate sentence on a display interface, comprises:
if the previous input information of the user is obtained in the current input scene, the previous input information is used as the related text information to be input into a preset text generation model, and at least one candidate sentence is obtained and displayed on a display interface;
And if the previous input information is not obtained in the current input scene, the historical input information of the user is used as the related text information to be input into a preset text generation model, and at least one candidate sentence is obtained and displayed on a display interface.
6. A method according to any one of claims 1-3, wherein displaying at least one candidate sentence on a display interface comprises:
sorting the candidate sentences according to the historical input habit characteristics of the user to obtain sentence sequences;
and displaying the candidate sentences on the display interface according to the sentence sequence.
7. An apparatus for automatically generating dialog content, the apparatus comprising:
the input module is used for inputting the related text information of the user into a preset text generation model, obtaining and displaying at least one candidate sentence on a display interface;
a first response module, configured to respond to a first triggering operation on a target sentence in the at least one candidate sentence, and display at least one candidate word of the target sentence on the display interface;
and the second response module is used for responding to the first selection operation of the at least one candidate word and generating target text according to the selected candidate word and the target sentence.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310082278.7A 2023-01-19 2023-01-19 Method, apparatus, computer device and storage medium for automatically generating dialogue content Pending CN116149489A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310082278.7A CN116149489A (en) 2023-01-19 2023-01-19 Method, apparatus, computer device and storage medium for automatically generating dialogue content

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310082278.7A CN116149489A (en) 2023-01-19 2023-01-19 Method, apparatus, computer device and storage medium for automatically generating dialogue content

Publications (1)

Publication Number Publication Date
CN116149489A true CN116149489A (en) 2023-05-23

Family

ID=86355740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310082278.7A Pending CN116149489A (en) 2023-01-19 2023-01-19 Method, apparatus, computer device and storage medium for automatically generating dialogue content

Country Status (1)

Country Link
CN (1) CN116149489A (en)

Similar Documents

Publication Publication Date Title
CN105229631A (en) The collection of reading content, follow the tracks of and present
EP3142018A1 (en) Method and system for providing translation information
CN111666740A (en) Flow chart generation method and device, computer equipment and storage medium
US20190258700A1 (en) System and method of highlighting influential samples in sequential analysis
CN112699303A (en) Medical information intelligent pushing system and method based on 5G message
CN110691028B (en) Message processing method, device, terminal and storage medium
WO2020123689A1 (en) Suggesting text in an electronic document
US20200342164A1 (en) Passively suggesting text in an electronic document
CN110162191A (en) A kind of expression recommended method, device and storage medium
CN111159431A (en) Knowledge graph-based information visualization method, device, equipment and storage medium
CN110347314A (en) A kind of content displaying method, device, storage medium and computer equipment
CN111475632A (en) Question processing method and device, electronic equipment and storage medium
CN112908328B (en) Device control method, system, computer device and storage medium
JP6457058B1 (en) Intellectual property system, intellectual property support method and intellectual property support program
CN114222000A (en) Information pushing method and device, computer equipment and storage medium
CN117332766A (en) Flow chart generation method, device, computer equipment and storage medium
CN116149489A (en) Method, apparatus, computer device and storage medium for automatically generating dialogue content
CN116187353A (en) Translation method, translation device, computer equipment and storage medium thereof
CN109710751A (en) Intelligent recommendation method, apparatus, equipment and the storage medium of legal document
CN115114518A (en) Search processing method and device, computer equipment and storage medium
CN114090002A (en) Front-end interface construction method and device, electronic equipment and storage medium
CN115248891A (en) Page display method and device, electronic equipment and storage medium
CN113655895A (en) Information recommendation method and device applied to input method and electronic equipment
CN113010072A (en) Searching method and device, electronic equipment and readable storage medium
CN109656549B (en) Construction method and device of monitoring system, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination