CN110858099B - Candidate word generation method and device - Google Patents

Candidate word generation method and device Download PDF

Info

Publication number
CN110858099B
CN110858099B CN201810948159.4A CN201810948159A CN110858099B CN 110858099 B CN110858099 B CN 110858099B CN 201810948159 A CN201810948159 A CN 201810948159A CN 110858099 B CN110858099 B CN 110858099B
Authority
CN
China
Prior art keywords
candidate
word
user
emotion
candidate words
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.)
Active
Application number
CN201810948159.4A
Other languages
Chinese (zh)
Other versions
CN110858099A (en
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.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development 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 Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201810948159.4A priority Critical patent/CN110858099B/en
Publication of CN110858099A publication Critical patent/CN110858099A/en
Application granted granted Critical
Publication of CN110858099B publication Critical patent/CN110858099B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • 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/0237Character input methods using prediction or retrieval techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses a candidate word generation method and a candidate word generation device, wherein the method comprises the following steps: acquiring the above words in real time and obtaining candidate words; determining a user emotion category according to the above; and screening the candidate words according to the emotion categories of the users to obtain candidate words to be output. By using the method and the device, the accuracy of the candidate words can be improved, and the user input experience is improved.

Description

Candidate word generation method and device
Technical Field
The invention relates to the field of input methods, in particular to a candidate word generation method and device.
Background
The input method is a coding method for inputting various symbols into electronic equipment, and is an indispensable tool for human beings to make a lane with the electronic equipment. In order to increase the input speed, most of the existing input methods have an associative memory function, that is, after inputting a Chinese character or a word, the input method automatically recommends a candidate word or word.
Some existing input methods predict words in the user input process, predict the next word to be input by the user and provide the word to the user, so as to facilitate the user input. The existing method for word prediction by using the input method mainly utilizes large-scale corpus data, uses a traditional ngram statistical model or a deep learning model to learn a language model, and then utilizes the models to find the text words with the highest probability according to the information such as the above and the input environment.
Although the method is convenient for users to input to a certain extent, the current model is difficult to perceive overlong above, so that a prediction result of breaking sense often appears. For example, the user inputs "the dishes made by you" and the input method at present only gives candidate words such as "bad taste", "good taste" and the like according to the "the dishes made by you" above, and obviously "bad taste" is not a reasonable candidate word here, and such candidate words not only mask other candidate words expressing the favorable emotion, such as praise, stick and the like, but also bring poor experience to the user.
Disclosure of Invention
The embodiment of the invention provides a candidate word generation method and device, which are used for improving the accuracy of candidate words and improving the user input experience.
Therefore, the invention provides the following technical scheme:
a method of candidate word generation, the method comprising:
acquiring the above words in real time and obtaining candidate words;
determining a user emotion category according to the above;
and screening the candidate words according to the emotion categories of the users to obtain candidate words to be output.
Preferably, the above is any one of the following: text, speech, pictures.
Preferably, the method further comprises: pre-constructing an emotion recognition model;
the determining the user emotion category according to the above comprises:
extracting the text information;
and obtaining the emotion category of the user by using the text information and the emotion recognition model.
Preferably, the emotion recognition model is a deep learning model; the extracting the text information includes: acquiring the word sequence corresponding to the above, and determining word vectors of words in the word sequence; or alternatively
The emotion recognition model is an SVM or a decision tree; the extracting the text information includes: and acquiring the word sequence corresponding to the word sequence, and determining the ID of each word in the word sequence.
Preferably, said determining a user emotion category according to the above further comprises:
acquiring auxiliary information, wherein the auxiliary information comprises any one or more of the following: current environmental information, location information, user body information;
and obtaining the emotion category of the user by using the text information, the auxiliary information and the emotion recognition model.
Preferably, the method further comprises:
obtaining candidate scores of candidate words;
the step of screening the candidate words according to the emotion categories of the users, wherein the step of obtaining the candidate words to be output comprises the following steps:
according to the emotion category of the user, the candidate score of the candidate word is adjusted, and the final score of the candidate word is obtained;
and determining candidate words to be output according to the final score.
Preferably, the step of adjusting the candidate score of the candidate word according to the emotion category of the user to obtain a final score of the candidate word includes:
determining emotion scores of the candidate words according to the emotion categories of the users;
and carrying out weighted summation on the candidate score of the candidate word and the emotion score to obtain the final score of the candidate word.
Preferably, the step of adjusting the candidate score of the candidate word according to the emotion category of the user to obtain a final score of the candidate word includes:
determining the weight of the candidate score of each candidate word according to the emotion category of the user;
and calculating the final score of the candidate word according to the candidate score of the candidate word and the weight of the candidate word.
Preferably, the determining the candidate word to be output according to the final score includes:
selecting a set number of candidate words as candidate words to be output according to the sequence from high to low of the final score; or alternatively
And selecting the candidate words with the final score larger than the set threshold value as candidate words to be output.
Preferably, the screening the candidate words according to the emotion category of the user, to obtain candidate words to be output includes:
and selecting the candidate word corresponding to the emotion category from the candidate words as the candidate word to be output.
Preferably, the method further comprises:
pre-establishing a candidate word list corresponding to different emotion categories;
the selecting the candidate word corresponding to the emotion category from the candidate words comprises:
and selecting a candidate word corresponding to the emotion category from the candidate words according to the list.
Preferably, the method further comprises:
and carrying out personalized training on the emotion recognition model according to the historical input information, and updating the emotion recognition model.
A candidate word generation device, the device comprising:
the above acquisition module is used for acquiring the above in real time and obtaining candidate words;
the candidate word acquisition module is used for acquiring candidate words;
the emotion recognition module is used for determining emotion categories of the user according to the above;
and the screening module is used for screening the candidate words according to the emotion categories of the users to obtain candidate words to be output.
Preferably, the above is any one of the following: text, speech, pictures.
Preferably, the apparatus further comprises: the model construction module is used for constructing an emotion recognition model in advance;
the emotion recognition module includes:
a text processing unit for extracting the text information;
and the identification unit is used for obtaining the emotion category of the user by utilizing the text information and the emotion identification model.
Preferably, the emotion recognition model is a deep learning model, and the text processing unit is specifically configured to obtain the word sequence corresponding to the above, and determine a word vector of each word in the word sequence; or alternatively
The emotion recognition model is a classification model; the text processing unit is specifically configured to obtain the word sequence corresponding to the above, and determine an ID of each word in the word sequence.
Preferably, the emotion recognition module further includes:
an auxiliary information acquisition unit configured to acquire auxiliary information including: current environmental information and/or location information;
the recognition unit is specifically configured to obtain a user emotion category by using the text information, the auxiliary information and the emotion recognition model.
Preferably, the candidate word obtaining module is further configured to obtain a candidate score of each candidate word;
the screening module comprises:
the score adjustment module is used for adjusting the candidate score of the candidate word according to the emotion category of the user to obtain the final score of the candidate word;
and the candidate word output module is used for determining candidate words to be output according to the final score.
Preferably, the score adjustment module includes:
the emotion score determining unit is used for determining emotion scores of the candidate words according to the emotion categories of the users;
and the first calculation unit is used for carrying out weighted summation on the candidate score of the candidate word and the emotion score to obtain the final score of the candidate word.
Preferably, the score adjustment module includes:
the weight determining unit is used for determining the weight of the candidate score of each candidate word according to the emotion category of the user;
and the second calculation unit is used for calculating the final score of the candidate word according to the candidate score of the candidate word and the weight thereof.
Preferably, the candidate word output module is specifically configured to select a set number of candidate words as candidate words to be output according to a sequence from high to low of the final score; or selecting the candidate words with the final scores larger than the set threshold value as candidate words to be output.
Preferably, the screening module is specifically configured to select, as the candidate word to be output, a candidate word corresponding to the emotion category from the candidate words.
Preferably, the apparatus further comprises:
the candidate word list establishing module is used for establishing candidate word lists corresponding to different emotion categories in advance;
and the screening module selects candidate words corresponding to the emotion category from the candidate words according to the list.
Preferably, the apparatus further comprises:
the information recording module is used for recording history input information;
and the model updating module is used for carrying out personalized training on the emotion recognition model by utilizing the historical input information and updating the emotion recognition model.
A computer device, comprising: one or more processors, memory;
the memory is configured to store computer-executable instructions and the processor is configured to execute the computer-executable instructions to implement the methods described above.
A readable storage medium having stored thereon instructions that are executed to implement the method described previously.
According to the candidate word generation method and device, the emotion of the user is identified based on the above information, each candidate word is screened according to the identified emotion type of the user, and the candidate word conforming to the current mood of the user is preferentially provided for the user, so that the candidate word provided for the user is more accurate, the user input efficiency is improved, and the user input experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present invention, and other drawings may be obtained according to these drawings for a person having ordinary skill in the art.
FIG. 1 is a flow chart of a candidate word generation method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a candidate word generating device according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a specific application structure of a candidate word generating device according to an embodiment of the present invention;
FIG. 4 is a block diagram illustrating an apparatus for a candidate word generation method, according to an example embodiment;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the solution of the embodiment of the present invention better understood by those skilled in the art, the embodiment of the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
Aiming at the problem that when the existing input method generates candidate words, associated candidates which are not related to the content really want to be expressed are generated, the embodiment of the invention provides a candidate word generation method and device, which are used for analyzing the above to obtain emotion categories of users and screening each candidate word by utilizing the emotion categories to obtain the candidate words to be output.
As shown in fig. 1, a flowchart of a candidate word generating method according to an embodiment of the present invention includes the following steps:
and step 101, acquiring the above words in real time and obtaining candidate words.
The above may also be different for different input devices and input modes, for example, the above may be text, voice, or picture. In addition, according to different application scenarios, the context may be user input, existing context, context of peer interaction, and the like.
The candidate word may be a candidate word generated by an existing input method, and for different input methods, rules, etc. for generating the candidate word may be different, which is not limited in the embodiments of the present invention. No matter what kind of input method is used to generate candidate words, the candidate words can be further screened by the following scheme of the invention, so that the candidate words which are more matched with the above can be obtained.
Step 102, determining the emotion category of the user according to the above.
Specifically, a model-based method may be employed to construct in advance an emotion recognition model, which may employ a deep learning model such as DNN (Deep Neural Networks, deep neural network), CNN (Convolutional Neural Network ), etc., or other conventional classification model such as SVM (Support Vector Machine ), decision tree, etc. The training process of the model may employ conventional techniques and will not be described in detail herein.
When the emotion recognition model is used for recognizing the emotion of the user based on the above, the above is required to be preprocessed, the text information in the above is extracted, then the text information is input into the emotion recognition model, and the emotion category of the user is obtained according to the output of the model. For example, when the user emotion classification adopts a deep learning model, the word sequence in the above is required to be acquired first, then the word vector of each word in the word sequence is determined, the word vector is input into the deep learning model, and the user emotion classification can be obtained according to the output of the emotion recognition model. For another example, when the emotion recognition model adopts other classification models, it is also necessary to first obtain the word sequence in the above text, then determine the ID of each word in the word sequence to obtain an ID sequence, and input the ID sequence into the classification model to obtain the emotion classification of the user.
The user emotions can be classified into positive, negative and other three categories, and of course can be subdivided, such as positive emotions: happy and hobbies; negative emotions are: sadness, anxiety, anger, etc.
In practical application, the word sequence in the text can be obtained by word segmentation processing on the text, such as word segmentation method based on character string matching, word segmentation method based on understanding, word segmentation method based on statistics, and the like; or by recording the words entered by the user. Of course, for other non-text forms of the text, the text information in the text may be obtained first, and then word segmentation may be performed on the text information to obtain a corresponding word sequence. For example, for the image form of the text, image recognition technology can be used to obtain the corresponding text; for the context of speech form, speech recognition techniques may be utilized to obtain the corresponding text.
And step 103, screening the candidate words according to the emotion categories of the users to obtain candidate words to be output.
There may be multiple screening methods when screening the candidate words.
For example, according to the emotion category of the user, a candidate word corresponding to the emotion category in the candidate words may be selected as a candidate word to be output. Specifically, a list of candidate words corresponding to different emotion categories may be pre-established, and candidate words corresponding to the emotion categories among the candidate words are selected according to the list.
For another example, a candidate score based on each candidate word currently input can be obtained, and the candidate score of the candidate word is adjusted according to the emotion category of the user to obtain a final score of the candidate word; and then determining candidate words to be output according to the final score.
There may be various ways of adjusting the candidate score of the candidate word, such as:
the method comprises the following steps of: the mode is as follows: firstly, determining the emotion score of each candidate word according to the emotion category of the user, for example, determining the part-of-speech score of each candidate word according to the strength of the corresponding relation between each candidate word and the identified emotion category of the user, wherein the part-of-speech score is higher when the corresponding relation is stronger; and then, carrying out weighted summation on the candidate score of the candidate word and the emotion score to obtain the final score of the candidate word.
Another way is: firstly, determining according to the emotion type of the user a weight of candidate scores for each candidate word; and then according to the candidate score of the candidate word and calculating the weight to obtain the final score of the candidate word. For example, for the identified emotion category of the user, the weight of the candidate word related to the emotion category is set to 1; the weights of the other candidate words are set to 0.5.
After the final score of each candidate word is obtained through calculation, a set number of candidate words can be selected as candidate words to be output according to the sequence from high to low of the final score; or selecting the candidate words with the final scores larger than the set threshold value as candidate words to be output.
According to the candidate word generation method provided by the embodiment of the invention, the emotion of the user is identified based on the above information, and each candidate word is screened according to the identified emotion category of the user, so that more accurate candidate words are provided for the user, the user input efficiency is improved, and the user input experience is improved.
For example, when a user inputs "he is doing wrong, i am very" candidate words such as "happy", "like", "injured", etc. are generated according to the existing input method. By using the method of the embodiment of the invention, firstly, the obtained above is used for judging that the user expresses more emotion which is difficult to pass, but not happy emotion, so that the ranking of candidate words such as 'injury' and 'difficult to pass' is more advanced, and the associative candidates such as 'happy' and 'like' are filtered or ranked later after screening treatment.
For another example, in a scenario where user a and user B are talking through a chat tool, when user a inputs "hello loving, i good" through voice, candidate words such as "afraid", "wounding", "like" are generated according to the existing input method. By using the method of the embodiment of the invention, the voice is firstly subjected to voice recognition to obtain the text, and the text is used for judging that the user expresses more positive emotion rather than negative emotion, so that the candidates such as like expressing the positive emotion are filtered or ranked later after screening treatment.
In another embodiment of the method of the present invention, when a user inputs, factors such as input environment may also have a certain influence on the user input, so that in another embodiment of the method of the present invention, when a emotion recognition model is constructed and the emotion recognition of the user is performed by using the model, some other factors may be considered as auxiliary information, for example, the auxiliary information may include any one or more of the following: current environmental information, location information, user body information. The environmental information may include, for example: temperature, climate, etc. The user body information may include, for example: body temperature, movement state, current input speed, etc. Specifically, the auxiliary information is acquired, and the emotion classification of the user is obtained by using the text information, the auxiliary information and the emotion recognition model. The auxiliary information can be obtained by calling an application program interface provided by the input application or can be obtained by a third party APP.
Because different users may have different input habits, in another embodiment of the method of the present invention, historical input information, such as candidate words selected by the user each time, may also be recorded, and the recorded historical input information is used to perform personalized training on the emotion recognition model, so as to update the emotion recognition model. Specifically, the historical input information recorded each time can be used as a training sample, and after the training sample reaches a certain number, the new sample is used for retraining on the basis of the original emotion recognition model parameters, so that a personalized emotion recognition model which is more matched with the user is obtained. In the subsequent input, the updated emotion recognition model is utilized to recognize the emotion of the user, so that the recognition result is more accurate, further, the candidate words provided for the user have higher matching degree with the text, the accuracy of the candidate words is further improved, and the input efficiency of the user is improved.
Correspondingly, the embodiment of the invention also provides a candidate word generating device, which can be integrated in user equipment, wherein the user equipment can be a notebook, a computer, a PAD, a mobile phone and the like. When the user performs input operation, the user can use the physical keyboard or the virtual keyboard on the touch screen of the user equipment.
Fig. 2 is a schematic structural diagram of a candidate word generating device according to an embodiment of the present invention.
In this embodiment, the apparatus comprises:
a context acquisition module 201, configured to acquire a context in real time;
a candidate word obtaining module 202, configured to obtain a candidate word;
a mood recognition module 203, configured to determine a mood category of the user according to the above;
and a screening module 204, configured to screen the candidate words according to the emotion classification of the user, so as to obtain candidate words to be output.
The above may also be different for different input devices and input modes, for example, the above may be text, voice, or picture. In addition, according to different application scenarios, the context may be user input, existing context, context of peer interaction, and the like.
The candidate word may be a candidate word generated by an existing input method, and for different input methods, rules, etc. for generating the candidate word may be different, which is not limited in the embodiments of the present invention. No matter what kind of input method is used to generate candidate words, the candidate words can be further screened by the following scheme of the invention, so that the candidate words which are more matched with the above can be obtained.
The emotion recognition module 203 may specifically recognize the emotion classification of the user in a model-based manner.
The model may be pre-built by a model building block, which may be a stand-alone block or may be integrated into the device as part of the device of the present invention.
In practical applications, the emotion recognition model may employ a deep learning model, such as DNN, CNN, etc., or a conventional classification model, such as SVM, decision tree, etc. The training process of the model may employ conventional techniques and will not be described in detail herein.
Based on a pre-constructed emotion recognition model, when the emotion recognition module 203 determines the emotion type of the user based on the above, the above needs to be preprocessed, the text information of the above is extracted, then the text information is input into the emotion recognition model, and the emotion type of the user is obtained according to the output of the model. Accordingly, one specific structure of the emotion recognition module 203 may include: a text processing unit and a recognition unit. Wherein:
the text processing unit is used for extracting the text information;
the recognition unit is used for obtaining the emotion category of the user by using the text information and the emotion recognition model.
For different models, the text processing unit needs to obtain different text information, for example, when the emotion recognition model is a deep learning model, the text processing unit needs to obtain the word sequence corresponding to the text, and determine word vectors of words in the word sequence; when the emotion recognition model is a traditional classification model, the text processing unit needs to acquire the word sequence corresponding to the text, and determines the ID of each word in the word sequence. Accordingly, the recognition unit needs to input word vectors of words in the word sequence into a deep learning model to obtain a user emotion category, or input IDs of words in the word sequence into the traditional classification model to obtain a user emotion category.
For the text form of the text, the text processing unit can obtain a word sequence corresponding to the text of the text by performing word segmentation on the text; for other forms of the above, corresponding text can be obtained by utilizing a corresponding recognition technology, and then word segmentation processing is carried out to obtain a word sequence. If the text is input by the user, the word sequence corresponding to the text can be obtained by recording each word input by the user.
Further, the emotion recognition module 203 may further include: an auxiliary information acquisition unit configured to acquire auxiliary information including any one or more of: current environmental information, location information, etc., user body information. Correspondingly, the recognition unit can obtain the emotion category of the user by using the text information, the auxiliary information and the emotion recognition model. In this case, the above auxiliary information needs to be considered in constructing the emotion recognition model.
In practice, the screening module 204 may have a plurality of screening methods when screening the candidate words.
For example, in a specific embodiment, a candidate word having the same part of speech information as the part of speech information of the next word may be selected as the candidate word to be output.
As another example, as shown in FIG. 3, in another embodiment, the candidate word acquisition module 202 is further configured to acquire a candidate score for each candidate word.
Accordingly, in this embodiment, the screening module 204 includes: a score adjustment module 241 and a candidate word output module 242. Wherein:
the score adjustment module 241 is configured to adjust a candidate score of the candidate word according to the emotion category of the user, so as to obtain a final score of the candidate word;
the candidate word output module 242 is configured to determine a candidate word to be output according to the final score.
In practical applications, the score adjustment module 241 may also adjust the candidate score of the candidate word in a variety of ways.
For example, one specific implementation of the score adjustment module 241 may include: and the emotion score determination unit and the first calculation unit. Wherein: the emotion score determining unit is used for determining emotion scores of candidate words according to the emotion categories of the users; and the first computing unit is used for carrying out weighted summation on the candidate score of the candidate word and the emotion score to obtain the final score of the candidate word.
For another example, another specific implementation of the score adjustment module 241 may include: and a weight determining unit and a second calculating unit. Wherein: the weight determining unit is used for determining the weight of the candidate score of each candidate word according to the emotion category of the user; the second calculation unit is used for calculating the final score of the candidate word according to the candidate score of the candidate word and the weight thereof.
The candidate word output module 242 may specifically select a set number of candidate words as candidate words to be output according to the order of the final scores from high to low; or selecting the candidate words with the final scores larger than the set threshold value as candidate words to be output.
According to the candidate word generating device provided by the embodiment of the invention, the emotion type of the user is determined based on the acquired above information, and each candidate word is screened according to the emotion type of the user, so that more accurate candidate words are provided for the user, the user input efficiency is further improved, and the user input experience is improved.
Since different users may have different input habits, in another embodiment of the apparatus of the present invention, the apparatus may further include: an information recording module and a model updating module (not shown). The information recording module is used for recording history input information; the model updating module is used for performing personalized training on the emotion recognition model by utilizing the historical input information recorded by the information recording module and updating the emotion recognition model. Specifically, the historical input information recorded each time can be used as a training sample, and after the training sample reaches a certain number, the new sample is used for retraining on the basis of the original emotion recognition model parameters, so that a personalized emotion recognition model which is more matched with the user is obtained.
Accordingly, in the input process of the subsequent user, the updated emotion recognition model is utilized to recognize the emotion of the user, so that the recognition result is more accurate, further, the candidate words provided for the user have higher matching degree with the text, the accuracy of the candidate words is further improved, and the input efficiency of the user is improved.
It should be noted that, in practical application, the method and apparatus of the present invention may be applied to various input methods, and may be applied to any input method, such as pinyin input, wubi input, voice input, or other input methods.
Fig. 4 is a block diagram illustrating an apparatus 800 for a candidate word generation method, according to an example embodiment. For example, apparatus 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 4, apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the apparatus 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing element 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen between the device 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the apparatus 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also detect a change in position of the apparatus 800 or one component of the apparatus 800, the presence or absence of user contact with the apparatus 800, an orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices, either in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication part 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of apparatus 800 to perform the above-described key-miss-touch error correction method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
The invention also provides a non-transitory computer readable storage medium, which when executed by a processor of a mobile terminal, causes the mobile terminal to perform all or part of the steps in the method embodiments of the invention described above.
Fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention. The server 1900 may vary considerably in configuration or performance and may include one or more central processing units (Central Processing Units, CPU) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) that store applications 1942 or data 1944. Wherein the memory 1932 and storage medium 1930 may be transitory or persistent. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Still further, a central processor 1922 may be provided in communication with a storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input/output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, and the like.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A method of generating a candidate word, the method comprising:
acquiring the above words in real time and obtaining candidate words;
extracting the text information; acquiring auxiliary information, wherein the auxiliary information comprises any one or more of the following: current environmental information, location information, user body information;
pre-constructing an emotion recognition model, recording historical input information, wherein the historical input information comprises candidate words selected by a user each time, taking the recorded historical input information each time as a training sample, and re-training by using the training sample on the basis of pre-constructed emotion recognition model parameters after the training sample reaches a certain number to obtain a personalized emotion recognition model matched with the user;
obtaining emotion categories of the user by using the text information, the auxiliary information and the personalized emotion recognition model corresponding to the user;
obtaining candidate scores of candidate words;
determining part-of-speech scores of the candidate words according to the strength of the corresponding relation between each candidate word and the identified emotion category of the user, wherein the part-of-speech score is higher when the corresponding relation is stronger;
weighting and summing the candidate score of the candidate word and the part-of-speech score to obtain a final score of the candidate word;
and determining candidate words to be output according to the final score.
2. The method according to claim 1, wherein the above is any one of the following: text, speech, pictures.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the emotion recognition model is a deep learning model; the extracting the text information includes: acquiring the word sequence corresponding to the above, and determining word vectors of words in the word sequence; or alternatively
The emotion recognition model is an SVM or a decision tree; the extracting the text information includes: and acquiring the word sequence corresponding to the word sequence, and determining the ID of each word in the word sequence.
4. The method of claim 1, wherein the determining candidate words to be output according to the final score comprises:
selecting a set number of candidate words as candidate words to be output according to the sequence from high to low of the final score; or alternatively
And selecting the candidate words with the final score larger than the set threshold value as candidate words to be output.
5. A candidate word generation device, the device comprising:
the above acquisition module is used for acquiring the above in real time and obtaining candidate words;
the candidate word acquisition module is used for acquiring candidate words;
the emotion recognition module is used for extracting the text information; acquiring auxiliary information, wherein the auxiliary information comprises any one or more of the following: current environmental information, location information, user body information; pre-constructing an emotion recognition model, recording historical input information, wherein the historical input information comprises candidate words selected by a user each time, taking the recorded historical input information each time as a training sample, and re-training by using the training sample on the basis of pre-constructed emotion recognition model parameters after the training sample reaches a certain number to obtain a personalized emotion recognition model matched with the user; obtaining emotion categories of the user by using the text information, the auxiliary information and the personalized emotion recognition model corresponding to the user;
the screening module is used for determining part-of-speech scores of the candidate words according to the strength of the corresponding relation between each candidate word and the identified emotion category of the user, wherein the part-of-speech score is higher when the corresponding relation is stronger; weighting and summing the candidate score of the candidate word and the part-of-speech score to obtain a final score of the candidate word; and determining candidate words to be output according to the final score.
6. The apparatus of claim 5, wherein the foregoing is any one of: text, speech, pictures.
7. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the emotion recognition model is a deep learning model, and the text processing unit is specifically used for acquiring the word sequence corresponding to the text and determining word vectors of words in the word sequence; or alternatively
The emotion recognition model is a classification model; the text processing unit is specifically configured to obtain the word sequence corresponding to the above, and determine an ID of each word in the word sequence.
8. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the candidate word output module is specifically configured to select a set number of candidate words as candidate words to be output according to a sequence from high to low of the final score; or selecting the candidate words with the final scores larger than the set threshold value as candidate words to be output.
9. A computer device, comprising: one or more processors, memory;
the memory is for storing computer executable instructions and the processor is for executing the computer executable instructions to implement the method of any one of claims 1 to 4.
10. A readable storage medium having stored thereon instructions that are executed to implement the method of any of claims 1 to 4.
CN201810948159.4A 2018-08-20 2018-08-20 Candidate word generation method and device Active CN110858099B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810948159.4A CN110858099B (en) 2018-08-20 2018-08-20 Candidate word generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810948159.4A CN110858099B (en) 2018-08-20 2018-08-20 Candidate word generation method and device

Publications (2)

Publication Number Publication Date
CN110858099A CN110858099A (en) 2020-03-03
CN110858099B true CN110858099B (en) 2024-04-12

Family

ID=69635827

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810948159.4A Active CN110858099B (en) 2018-08-20 2018-08-20 Candidate word generation method and device

Country Status (1)

Country Link
CN (1) CN110858099B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113589953B (en) * 2020-04-30 2024-07-26 北京搜狗科技发展有限公司 Information display method and device and electronic equipment
CN115437510A (en) * 2022-09-23 2022-12-06 联想(北京)有限公司 Data display method and device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101581978A (en) * 2008-05-12 2009-11-18 欧姆龙株式会社 Character input program, character input device, and character input method
CN102915731A (en) * 2012-10-10 2013-02-06 百度在线网络技术(北京)有限公司 Method and device for recognizing personalized speeches
CN103076892A (en) * 2012-12-31 2013-05-01 百度在线网络技术(北京)有限公司 Method and equipment for providing input candidate items corresponding to input character string
CN103544246A (en) * 2013-10-10 2014-01-29 清华大学 Method and system for constructing multi-emotion dictionary for internet
KR101534141B1 (en) * 2014-08-05 2015-07-07 성균관대학교산학협력단 Rationale word extraction method and apparatus using genetic algorithm, and sentiment classification method and apparatus using said rationale word
CN104866091A (en) * 2015-03-25 2015-08-26 百度在线网络技术(北京)有限公司 Method and device for outputting audio-effect information in computer equipment
CN106527752A (en) * 2016-09-23 2017-03-22 百度在线网络技术(北京)有限公司 Method and device for providing input candidate items
CN107807920A (en) * 2017-11-17 2018-03-16 新华网股份有限公司 Construction method, device and the server of mood dictionary based on big data
CN107943789A (en) * 2017-11-17 2018-04-20 新华网股份有限公司 Mood analysis method, device and the server of topic information
CN108255316A (en) * 2018-01-23 2018-07-06 广东欧珀移动通信有限公司 Dynamic adjusts method, electronic device and the computer readable storage medium of emoticon

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3164806A1 (en) * 2014-07-04 2017-05-10 Intelligent Digital Avatars, Inc. Systems and methods for assessing, verifying and adjusting the affective state of a user
CN116269261A (en) * 2016-12-01 2023-06-23 松下知识产权经营株式会社 Biological information processing method and biological information processing system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101581978A (en) * 2008-05-12 2009-11-18 欧姆龙株式会社 Character input program, character input device, and character input method
CN102915731A (en) * 2012-10-10 2013-02-06 百度在线网络技术(北京)有限公司 Method and device for recognizing personalized speeches
CN103076892A (en) * 2012-12-31 2013-05-01 百度在线网络技术(北京)有限公司 Method and equipment for providing input candidate items corresponding to input character string
CN103544246A (en) * 2013-10-10 2014-01-29 清华大学 Method and system for constructing multi-emotion dictionary for internet
KR101534141B1 (en) * 2014-08-05 2015-07-07 성균관대학교산학협력단 Rationale word extraction method and apparatus using genetic algorithm, and sentiment classification method and apparatus using said rationale word
CN104866091A (en) * 2015-03-25 2015-08-26 百度在线网络技术(北京)有限公司 Method and device for outputting audio-effect information in computer equipment
CN106527752A (en) * 2016-09-23 2017-03-22 百度在线网络技术(北京)有限公司 Method and device for providing input candidate items
CN107807920A (en) * 2017-11-17 2018-03-16 新华网股份有限公司 Construction method, device and the server of mood dictionary based on big data
CN107943789A (en) * 2017-11-17 2018-04-20 新华网股份有限公司 Mood analysis method, device and the server of topic information
CN108255316A (en) * 2018-01-23 2018-07-06 广东欧珀移动通信有限公司 Dynamic adjusts method, electronic device and the computer readable storage medium of emoticon

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Actual Emotion and False Emotion Classification by Physiological Signal;Chi Jung Kim;《2015 8th International Conference on Signal Processing, Image Processing and Pattern Recognition (SIP)》;20160314;21-24 *
潮汕语言输入法及语言信息分析的研究;辛丽苹;《★中国优秀硕士学位论文全文数据库 (信息科技辑)》;20061215;第2006年卷(第12期);F084-306 *

Also Published As

Publication number Publication date
CN110858099A (en) 2020-03-03

Similar Documents

Publication Publication Date Title
CN109871896B (en) Data classification method and device, electronic equipment and storage medium
CN106774970B (en) Method and device for sorting candidate items of input method
CN107291690B (en) Punctuation adding method and device and punctuation adding device
CN109961791B (en) Voice information processing method and device and electronic equipment
CN111984749B (en) Interest point ordering method and device
CN107564526B (en) Processing method, apparatus and machine-readable medium
CN108803890B (en) Input method, input device and input device
CN110874145A (en) Input method and device and electronic equipment
CN107291704B (en) Processing method and device for processing
CN107274903B (en) Text processing method and device for text processing
CN107291260B (en) Information input method and device for inputting information
CN111210844B (en) Method, device and equipment for determining speech emotion recognition model and storage medium
CN111753091A (en) Classification method, classification model training method, device, equipment and storage medium
CN110968246A (en) Intelligent Chinese handwriting input recognition method and device
CN110858099B (en) Candidate word generation method and device
CN112579767A (en) Search processing method and device for search processing
CN110908523B (en) Input method and device
CN109901726B (en) Candidate word generation method and device and candidate word generation device
CN112836026B (en) Dialogue-based inquiry method and device
CN112331194A (en) Input method and device and electronic equipment
CN114067334B (en) Handwriting track recognition method and device, electronic equipment and storage medium
CN113589954B (en) Data processing method and device and electronic equipment
CN113901832A (en) Man-machine conversation method, device, storage medium and electronic equipment
CN109388252B (en) Input method and device
CN114115550A (en) Method and device for processing association candidate

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
GR01 Patent grant
GR01 Patent grant