CN110858099A - Candidate word generation method and device - Google Patents

Candidate word generation method and device Download PDF

Info

Publication number
CN110858099A
CN110858099A CN201810948159.4A CN201810948159A CN110858099A CN 110858099 A CN110858099 A CN 110858099A CN 201810948159 A CN201810948159 A CN 201810948159A CN 110858099 A CN110858099 A CN 110858099A
Authority
CN
China
Prior art keywords
emotion
candidate
user
word
text
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.)
Granted
Application number
CN201810948159.4A
Other languages
Chinese (zh)
Other versions
CN110858099B (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

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
    • 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 text in real time and obtaining candidate words; determining a user emotion category according to the above; and screening the candidate words according to the user emotion categories to obtain candidate words to be output. By the method and the device, the accuracy of the candidate words can be improved, and the input experience of the user 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 interaction between human beings and the electronic equipment. In order to accelerate the input speed, most of the existing input methods have an associative memory function, namely after a Chinese character or a word is input, the input method can automatically recommend the candidate character or word.
In some existing input methods, word prediction is performed in the input process of a user, and a word to be input next by the user is predicted and provided for the user, so that the user can input the word conveniently. The method for predicting words by using the existing input method mainly comprises the steps of utilizing large-scale corpus data, utilizing a traditional ngram statistical model or a deep learning model to learn a language model, and then utilizing the models to find out the next words with the maximum probability according to information such as the above and the input environment.
Although the method is convenient for the user to input to a certain extent, the current model is difficult to perceive the overlong text, so that the predication result of the sense of breaking the rules often appears. For example, a user inputs 'dishes made by you and good in color, flavor and taste', most of the existing input methods only give out 'bad eating' and 'good eating' to wait for word selection according to the 'dishes made by you', and obviously 'bad eating' is not a reasonable candidate word here, so that the candidate word not only covers other candidate words expressing favorable emotion, such as favorable, excellent and the like, but also brings 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 input experience of a user.
Therefore, the invention provides the following technical scheme:
a candidate word generation method, the method comprising:
acquiring the text in real time and obtaining candidate words;
determining a user emotion category according to the above;
and screening the candidate words according to the user emotion categories to obtain candidate words to be output.
Preferably, the above is any one of: text, voice, picture.
Preferably, the method further comprises: pre-constructing an emotion recognition model;
the determining the user emotion category according to the above includes:
extracting the text information of the above text;
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 above text information comprises: acquiring the word sequence corresponding to the word sequence, and determining word vectors of all words in the word sequence; or
The emotion recognition model is an SVM or a decision tree; the extracting the above text information comprises: and acquiring the word sequence corresponding to the word sequence, and determining the ID of each word in the word sequence.
Preferably, the determining the 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 environment information, position information, user body information;
and obtaining the emotion type of the user by using the text information, the auxiliary information and the emotion recognition model.
Preferably, the method further comprises:
acquiring candidate scores of the candidate words;
the screening of the candidate words according to the user emotion categories to obtain candidate words to be output comprises:
adjusting the candidate score of the candidate word according to the user emotion category to obtain the final score of the candidate word;
and determining candidate words to be output according to the final scores.
Preferably, the adjusting the candidate score of the candidate word according to the user emotion category to obtain the final score of the candidate word includes:
determining the emotion score of each candidate word according to the emotion category of the user;
and carrying out weighted summation on the candidate score of the candidate word and the emotion score to obtain a final score of the candidate word.
Preferably, the adjusting the candidate score of the candidate word according to the user emotion category to obtain the 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 to obtain 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 of the final scores from high to low; or
And selecting the candidate words with the final scores larger than the set threshold value as the candidate words to be output.
Preferably, the screening the candidate words according to the user emotion categories to obtain candidate words to be output includes:
and selecting a candidate word corresponding to the emotion category in the candidate words as a candidate word to be output.
Preferably, the method further comprises:
pre-establishing a candidate word list corresponding to different emotion categories;
the selecting a candidate word of the candidate words corresponding to the emotion category 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 performing personalized training on the emotion recognition model according to historical input information, and updating the emotion recognition model.
An apparatus for candidate word generation, the apparatus comprising:
the device comprises an upper text acquisition module, a candidate word acquisition module and a candidate word acquisition module, wherein the upper text acquisition module is used for acquiring an upper text in real time and acquiring a candidate word;
the candidate word acquisition module is used for acquiring candidate words;
the emotion recognition module is used for determining the emotion category of the user according to the emotion information;
and the screening module is used for screening the candidate words according to the user emotion categories to obtain candidate words to be output.
Preferably, the above is any one of: text, voice, picture.
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 recognition unit is used for obtaining the emotion type of the user by utilizing the text information and the emotion recognition 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 text, and determine a word vector of each word in the word sequence; or
The emotion recognition model is a classification model; the text processing unit is specifically configured to acquire the word sequence corresponding to the above text, 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, the auxiliary information including: current environmental information and/or location information;
the recognition unit is specifically configured to obtain the 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 includes:
the score adjusting module is used for adjusting the candidate scores of the candidate words according to the user emotion categories to obtain the final scores of the candidate words;
and the candidate word output module is used for determining candidate words to be output according to the final scores.
Preferably, the score adjusting module includes:
the emotion score determining unit is used for determining the emotion score of each candidate word according to the emotion type of the user;
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 a final score of the candidate word.
Preferably, the score adjusting 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 to obtain 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 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 word with the final score larger than the set threshold value as the candidate word to be output.
Preferably, the screening module is specifically configured to select a candidate word corresponding to the emotion category from the candidate words as a candidate word to be output.
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 a candidate word 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 historical 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 method described above.
A readable storage medium having stored thereon instructions which are executed to implement the foregoing method.
According to the candidate word generation method and device provided by the embodiment of the invention, the emotion of the user is identified based on the information, the candidate words are screened according to the emotion types of the user obtained through identification, and the candidate words meeting the current mood of the user are preferentially provided for the user, so that the candidate words provided for the user are more accurate, the input efficiency of the user is improved, and the input experience of the user is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or technical solutions in the prior art, the drawings needed to be used 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 can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a flowchart of a candidate generation method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a candidate word generating apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a specific application of a candidate generation apparatus according to an embodiment of the present invention;
FIG. 4 is a block diagram illustrating an apparatus for a candidate word generation method in accordance with an exemplary embodiment;
fig. 5 is a schematic structural diagram of a server in an embodiment of the present invention.
Detailed Description
In order to make the technical field of the invention better understand the scheme of the embodiment of the invention, the embodiment of the invention is further described in detail with reference to the drawings and the implementation mode.
Aiming at the problem that the existing input method can generate an associative candidate irrelevant to the content really wanting to express when generating a candidate word, the embodiment of the invention provides a candidate word generation method and a candidate word generation device.
As shown in fig. 1, it is a flowchart of a candidate word generating method according to an embodiment of the present invention, and the method includes the following steps:
step 101, the above text is obtained in real time and candidate words are obtained.
The above form may also be different for different input devices and input modes, for example, the above form may be text, voice, or picture. In addition, the above may be user input, existing above, above of opposite-end interaction, and the like, according to different application scenarios.
The candidate word may be a candidate word generated by an existing input method, and the method and rule for generating the candidate word may be different for different input methods, and the embodiment of the present invention is not limited herein. No matter what kind of input method generates the candidate words, the candidate words are further screened by the subsequent scheme of the invention, and the candidate words which are more matched with the above text can be obtained.
Step 102, determining the emotion type of the user according to the above.
Specifically, a model-based method may be adopted to pre-construct an emotion recognition model, and the emotion recognition model may adopt a Deep learning model, such as DNN (Deep Neural Networks), CNN (Convolutional Neural Networks), and the like, or other conventional classification models, such as SVMs (Support Vector machines), decision trees, and the like. The training process of the model may employ conventional techniques, which are not described in detail herein.
When the emotion recognition model is used for recognizing the user emotion based on the above text, the above text needs to be preprocessed, the text information in the above text is extracted, then the text information is input into the emotion recognition model, and the user emotion category is obtained according to the output of the model. For example, when the emotion classification of the user adopts a deep learning model, the word sequence in the text needs to be obtained 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 emotion classification of the user can be obtained according to the output of the emotion recognition model. For another example, when the emotion recognition model adopts other classification models, the word sequence in the above text needs to be obtained first, then the ID of each word in the word sequence is determined to obtain an ID sequence, and the ID sequence is input into the classification model to obtain the emotion category of the user.
The user emotion can be divided into three types of positive emotion, negative emotion and other three types, and can be subdivided, for example, the positive emotion includes: happy and fond; negative emotions are: sadness, anxiety, anger, etc.
In practical applications, the word sequence in the above text may be obtained by performing word segmentation processing on the text in the above text, such as a word segmentation method based on character string matching, a word segmentation method based on understanding, a word segmentation method based on statistics, and the like; or by recording words entered by the user. Of course, for the above text in other non-text forms, the text information in the above text can be obtained first, and then the word segmentation processing is performed on the text information to obtain the corresponding word sequence. For example, for the above image form, the corresponding text can be obtained by using an image recognition technology; for the above of the speech form, the corresponding text can be obtained by using the speech recognition technology.
And 103, screening the candidate words according to the emotion categories of the users to obtain candidate words to be output.
When the candidate words are screened, various screening methods can be provided.
For example, a candidate word corresponding to the emotion category in the candidate words may be selected as a candidate word to be output according to the user emotion category. Specifically, a candidate word list corresponding to different emotion categories may be established in advance, and a candidate word corresponding to the emotion category in the candidate words may be selected according to the list.
For another example, candidate scores of candidate words based on current input may be obtained, and the candidate scores of the candidate words may be adjusted according to the user emotion categories to obtain final scores of the candidate words; and then determining candidate words to be output according to the final scores.
When the candidate score of the candidate word is adjusted, there may be a plurality of adjustment manners, such as:
one way is as follows: determining emotion scores of the candidate words according to the emotion categories of the users, for example, determining part-of-speech scores of the candidate words according to the strength of corresponding relations between the candidate words and the emotion categories of the users obtained by recognition, wherein the stronger the corresponding relations, the higher the part-of-speech scores are; and then carrying out weighted summation on the candidate score of the candidate word and the emotion score to obtain a final score of the candidate word.
In another mode: determining the weight of candidate scores of all candidate words according to the emotion categories of the users; and then calculating to obtain the final score of the candidate word according to the candidate score of the candidate word and the weight of the candidate word. For example, for the recognized 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 scores of the candidate words are obtained through calculation, a set number of candidate words can be selected as candidate words to be output according to the sequence of the final scores from high to low; or selecting the candidate word with the final score larger than the set threshold value as the candidate word 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 information, and each candidate word is screened according to the emotion type of the user obtained through identification, so that more accurate candidate words are provided for the user, the input efficiency of the user is further improved, and the input experience of the user is improved.
For example, when the user inputs "he is wrong and i am very good", the user can generate "happy", "happy" and "sad" waiting for word selection according to the existing input method. By using the method of the embodiment of the invention, the obtained information is used for judging that the emotion of the user expressing 'difficult' is more rather than the emotion of 'happy', so that after the screening processing, the ranking of 'hurry to heart', 'difficult' waiting for word selection is earlier, and the associated candidates such as 'happy', 'favorite' and the like are filtered or ranked later.
For another example, in a scenario where the user a and the user B have a conversation via a chat tool, when the user a inputs "you are lovely and i are good" by voice, a "afraid", "worrisome", and "like" waiting word selection may be generated according to an existing input method. By using the method of the embodiment of the invention, the voice is firstly identified to obtain the text, and the text is used for judging that the user expresses more positive emotions rather than negative emotions, so that the candidates such as 'liking' expressing positive emotions are ranked earlier, and the candidates such as 'fear' and 'hurry' are filtered or ranked later after screening processing.
In the method of the present invention, when the emotion recognition model is constructed and the emotion of the user is recognized by using the emotion recognition 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 environment information, location information, user body information. The environment information may include, for example: temperature, climate, etc. The user body information may include, for example: body temperature, motion state, current input speed, etc. Specifically, the auxiliary information is acquired, and the user emotion classification is obtained by using the text information, the auxiliary information and the emotion recognition model. The auxiliary information may be obtained by calling an application program interface provided by the input application, or may be obtained by a third party APP.
Since 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 samples reach a certain number, the training samples are retrained by using new samples on the basis of the original emotion recognition model parameters, so that the personalized emotion recognition model more matched with the user is obtained. In subsequent input, the updated emotion recognition model is used for recognizing the emotion of the user, so that the recognition result is more accurate, 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 a physical keyboard or a virtual keyboard on a touch screen of user equipment.
Fig. 2 is a schematic structural diagram of a candidate word generating apparatus according to an embodiment of the present invention.
In this embodiment, the apparatus comprises:
an above obtaining module 201, configured to obtain the above in real time;
a candidate word obtaining module 202, configured to obtain a candidate word;
the emotion recognition module 203 is used for determining the emotion category of the user according to the above information;
and the screening module 204 is configured to screen the candidate words according to the user emotion categories to obtain candidate words to be output.
The above form may also be different for different input devices and input modes, for example, the above form may be text, voice, or picture. In addition, the above may be user input, existing above, above of opposite-end interaction, and the like, according to different application scenarios.
The candidate word may be a candidate word generated by an existing input method, and the method and rule for generating the candidate word may be different for different input methods, and the embodiment of the present invention is not limited herein. No matter what kind of input method generates the candidate words, the candidate words are further screened by the subsequent scheme of the invention, and the candidate words which are more matched with the above text can be obtained.
The emotion recognition module 203 may specifically recognize the emotion type of the user in a model-based manner.
The model can be pre-constructed by a model construction module, and the model construction module can be used as an independent module or can be integrated in the device as a part of the device.
In practical applications, the emotion recognition model may adopt a deep learning model, such as DNN, CNN, etc., or adopt a traditional classification model, such as SVM, decision tree, etc. The training process of the model may employ conventional techniques, which are not described in detail herein.
Based on a pre-constructed emotion recognition model, when the emotion recognition module 203 determines the emotion category of the user based on the above text information, the above text information needs to be pre-processed, the text information is extracted, and then the text information is input into the emotion recognition model, so that the emotion category 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;
and the identification unit is used for obtaining the emotion type of the user by utilizing the text information and the emotion identification 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 above text, and determine a word vector of each word 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 above text and determine the ID of each word in the word sequence. Correspondingly, the recognition unit needs to input the word vector of each word in the word sequence into a deep learning model to obtain the emotion category of the user, or input the ID of each word in the word sequence into the conventional classification model to obtain the emotion category of the user.
For the text in the text form, the text processing unit may perform word segmentation processing on the text to obtain a word sequence corresponding to the text; for the above text in other forms, corresponding recognition technology can be used to obtain corresponding text, and then word segmentation processing is performed to obtain word sequences. If the word sequence is the word sequence input by the user, the word sequence corresponding to the word sequence can be obtained by recording each word input by the user.
Further, the emotion recognition module 203 may further include: an auxiliary information obtaining unit, configured to obtain auxiliary information, where the auxiliary information includes any one or more of: current environmental information, location information, etc., user body information. Accordingly, the recognition unit may obtain the user emotion classification by using the text information, the auxiliary information, and the emotion recognition model. In this case, the emotion recognition model is constructed by taking the above-mentioned auxiliary information into consideration.
In practical applications, the filtering module 204 may have a plurality of filtering modes when filtering the candidate words.
For example, in a specific embodiment, a candidate word with the same part of speech as the part of speech information of the next word in the candidate words may be selected as the candidate word to be output.
For another example, as shown in fig. 3, in another embodiment, the candidate word obtaining module 202 is further configured to obtain a candidate score of 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 adjusting module 241 is configured to adjust the candidate score of the candidate word according to the user emotion category 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 adjusting module 241 may also adjust the candidate score of the candidate word in various ways.
For example, one specific implementation of the score adjusting module 241 may include: an emotion score determination unit and a first calculation unit. Wherein: the emotion score determining unit is used for determining the emotion score of each candidate word according to the emotion category of the user; the first calculation unit is used for performing weighted summation on the candidate score of the candidate word and the emotion score to obtain a final score of the candidate word.
For another example, another specific implementation of the score adjusting module 241 may include: a weight determination unit and a second calculation 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; and the second calculating unit is used for calculating to obtain the final score of the candidate word according to the candidate score of the candidate word and the weight of the candidate word.
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 score from high to low; or selecting the candidate word with the final score larger than the set threshold value as the candidate word to be output.
The candidate word generation device provided by the embodiment of the invention determines the emotion category of the user based on the acquired information, and screens each candidate word according to the emotion category of the user, so that more accurate candidate words are provided for the user, the input efficiency of the user is further improved, and the input experience of the user 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 historical input information; the model updating module is used for performing personalized training on the emotion recognition model by using 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 samples reach a certain number, the training samples are retrained by using new samples on the basis of the original emotion recognition model parameters, so that the personalized emotion recognition model more matched with the user is obtained.
Correspondingly, in the subsequent input process of the user, the emotion of the user is identified by using the updated emotion identification model, so that the identification result is more accurate, 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.
In practical application, the method and the device of the present invention can be applied to various input methods, and can be applied to 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 in accordance with an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can 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 operation at the device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile 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 disks.
Power component 806 provides power to the various components of 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 that provides an output interface between the device 800 and a user. 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 an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating 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 a focal length and optical zoom capability.
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 apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also 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 keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the 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 a component of the apparatus 800, the presence or absence of user contact with the apparatus 800, orientation or acceleration/deceleration of the apparatus 800, and a change in temperature of the apparatus 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object 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 gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices 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 an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications 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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the key press false touch correction method described above is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The present invention also provides a non-transitory computer readable storage medium having instructions which, when executed by a processor of a mobile terminal, enable the mobile terminal to perform all or part of the steps of the above-described method embodiments of the present invention.
Fig. 5 is a schematic structural diagram of a server in an embodiment of the present invention. The server 1900, which may vary widely in configuration or performance, may include one or more Central Processing Units (CPUs) 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. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the 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, etc.
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 will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A candidate word generation method, comprising:
acquiring the text in real time and obtaining candidate words;
determining a user emotion category according to the above;
and screening the candidate words according to the user emotion categories to obtain candidate words to be output.
2. The method of claim 1, further comprising: pre-constructing an emotion recognition model;
the determining the user emotion category according to the above includes:
extracting the text information of the above text;
and obtaining the emotion category of the user by using the text information and the emotion recognition model.
3. The method of claim 2, wherein said determining a user emotion classification from the above further comprises:
acquiring auxiliary information, wherein the auxiliary information comprises any one or more of the following: current environment information, position information, user body information;
and obtaining the emotion type of the user by using the text information, the auxiliary information and the emotion recognition model.
4. The method of claim 1, further comprising:
acquiring candidate scores of the candidate words;
the screening of the candidate words according to the user emotion categories to obtain candidate words to be output comprises:
adjusting the candidate score of the candidate word according to the user emotion category to obtain the final score of the candidate word;
and determining candidate words to be output according to the final scores.
5. The method of claim 1, wherein the screening the candidate words according to the user emotion categories to obtain candidate words to be output comprises:
and selecting a candidate word corresponding to the emotion category in the candidate words as a candidate word to be output.
6. The method of claim 1, further comprising:
and performing personalized training on the emotion recognition model according to historical input information, and updating the emotion recognition model.
7. An apparatus for generating candidate words, the apparatus comprising:
the device comprises an upper text acquisition module, a candidate word acquisition module and a candidate word acquisition module, wherein the upper text acquisition module is used for acquiring an upper text in real time and acquiring a candidate word;
the candidate word acquisition module is used for acquiring candidate words;
the emotion recognition module is used for determining the emotion category of the user according to the emotion information;
and the screening module is used for screening the candidate words according to the user emotion categories to obtain candidate words to be output.
8. The apparatus of claim 7, further comprising: 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 recognition unit is used for obtaining the emotion type of the user by utilizing the text information and the emotion recognition model.
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 6.
10. A readable storage medium having stored thereon instructions that are executed to implement the method of any of claims 1 to 6.
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 true CN110858099A (en) 2020-03-03
CN110858099B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818841A (en) * 2021-01-29 2021-05-18 北京搜狗科技发展有限公司 Method and related device for recognizing user emotion

Citations (12)

* 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
US20160004299A1 (en) * 2014-07-04 2016-01-07 Intelligent Digital Avatars, Inc. Systems and methods for assessing, verifying and adjusting the affective state of a user
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
US20180153422A1 (en) * 2016-12-01 2018-06-07 Panasonic Intellectual Property Management Co., Ltd. Biological information detection apparatus that includes a light source projecting a near-infrared pattern onto an object and an imaging system including first photodetector cells detecting near-infrared wavelength light and second photodetector cells detecting visible wavelength light
CN108255316A (en) * 2018-01-23 2018-07-06 广东欧珀移动通信有限公司 Dynamic adjusts method, electronic device and the computer readable storage medium of emoticon

Patent Citations (12)

* 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
US20160004299A1 (en) * 2014-07-04 2016-01-07 Intelligent Digital Avatars, Inc. Systems and methods for assessing, verifying and adjusting the affective state of a user
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
US20180153422A1 (en) * 2016-12-01 2018-06-07 Panasonic Intellectual Property Management Co., Ltd. Biological information detection apparatus that includes a light source projecting a near-infrared pattern onto an object and an imaging system including first photodetector cells detecting near-infrared wavelength light and second photodetector cells detecting visible wavelength light
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
CHI JUNG KIM: "Actual Emotion and False Emotion Classification by Physiological Signal", 《2015 8TH INTERNATIONAL CONFERENCE ON SIGNAL PROCESSING, IMAGE PROCESSING AND PATTERN RECOGNITION (SIP)》, 14 March 2016 (2016-03-14), pages 21 - 24 *
辛丽苹: "潮汕语言输入法及语言信息分析的研究", 《★中国优秀硕士学位论文全文数据库 (信息科技辑)》, vol. 2006, no. 12, 15 December 2006 (2006-12-15), pages 084 - 306 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818841A (en) * 2021-01-29 2021-05-18 北京搜狗科技发展有限公司 Method and related device for recognizing user emotion

Also Published As

Publication number Publication date
CN110858099B (en) 2024-04-12

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
US11138422B2 (en) Posture detection method, apparatus and device, and storage medium
CN108038102B (en) Method and device for recommending expression image, terminal and storage medium
EP3171279A1 (en) Method and device for input processing
CN111210844B (en) Method, device and equipment for determining speech emotion recognition model and storage medium
CN107291260B (en) Information input method and device for inputting information
CN109961791B (en) Voice information processing method and device and electronic equipment
CN107291704B (en) Processing method and device for processing
CN107564526B (en) Processing method, apparatus and machine-readable medium
US11335348B2 (en) Input method, device, apparatus, and storage medium
CN110764627B (en) Input method and device and electronic equipment
CN111382748A (en) Image translation method, device and storage medium
CN108241614B (en) Information processing method and device, and device for information processing
CN112784151B (en) Method and related device for determining recommended information
CN110858099B (en) Candidate word generation method and device
CN112631435A (en) Input method, device, equipment and storage medium
CN110968246A (en) Intelligent Chinese handwriting input recognition method and device
CN111831132A (en) Information recommendation method and device and electronic equipment
CN110908523A (en) Input method and device
CN111292743B (en) Voice interaction method and device and electronic equipment
CN115146633A (en) Keyword identification method and device, electronic equipment and storage medium
CN113901832A (en) Man-machine conversation method, device, storage medium and electronic equipment
CN109144286A (en) A kind of input method and device

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