CN111240497A - Method and device for inputting through input method and electronic equipment - Google Patents

Method and device for inputting through input method and electronic equipment Download PDF

Info

Publication number
CN111240497A
CN111240497A CN202010044379.1A CN202010044379A CN111240497A CN 111240497 A CN111240497 A CN 111240497A CN 202010044379 A CN202010044379 A CN 202010044379A CN 111240497 A CN111240497 A CN 111240497A
Authority
CN
China
Prior art keywords
voice packet
input information
target voice
searching
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010044379.1A
Other languages
Chinese (zh)
Inventor
王姣
刘家琛
吴声暖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202010044379.1A priority Critical patent/CN111240497A/en
Publication of CN111240497A publication Critical patent/CN111240497A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

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

Abstract

The embodiment of the invention provides a method, a device and electronic equipment for inputting through an input method, wherein the method comprises the following steps: acquiring input information; searching a target voice packet matched with the input information; displaying the target voice packet; the user can directly select the required voice packet from the displayed voice packets without switching the current input method keyboard interface to the voice panel for selection, and searching from a large number of voice packets, so that the operation is simple; the input efficiency of the user is greatly improved, and the input experience of the user is improved.

Description

Method and device for inputting through input method and electronic equipment
Technical Field
The invention relates to the technical field of input methods, in particular to a method and a device for inputting through an input method and electronic equipment.
Background
With the development of computer technology, electronic devices such as mobile phones and tablet computers are more and more popular, and great convenience is brought to life, study and work of people. These electronic devices are typically installed with an input method application (abbreviated as input method) so that a user can input information using the input method.
In order to increase the interest of input, the input method increases the function of a voice packet; the user can select the required voice packet and send to the opposite terminal. However, when the user selects the required voice packet, the user needs to switch from the input method keyboard to the voice panel to select the voice packet, and the operation is complicated; and the voice packets in the voice panel are more, so that the user needs to spend longer time to search the required voice packets from the voice panel, and the input efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a method for inputting through an input method, which aims to solve the problems of complex operation and low input efficiency when a voice packet is input at present.
Correspondingly, the embodiment of the invention also provides a device for inputting through the input method and electronic equipment, which are used for ensuring the realization and application of the method.
In order to solve the above problem, an embodiment of the present invention discloses a method for inputting through an input method, which specifically includes: acquiring input information; searching a target voice packet matched with the input information; and displaying the target voice packet.
Optionally, when the input information is voice data, the searching for the target voice packet matching the input information includes: performing voice recognition on the voice data, and determining a corresponding voice recognition result; performing semantic analysis on the voice recognition result to determine a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
Optionally, when the input information is an expression, the searching for the target voice packet matched with the input information includes: analyzing the expression and determining the expression content corresponding to the expression; and searching a target voice packet matched with the expression content.
Optionally, when the input information is a text, the searching for the target voice packet matching the input information includes: performing semantic analysis on the input information to determine a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
Optionally, when the input information is a text, the searching for the target voice packet matching the input information includes: performing word segmentation on the input information to obtain corresponding word segmentation segments; matching the word segmentation segments with a pre-stored word list, wherein the word list comprises keywords of a voice packet; and searching a target voice packet matched with the input information from the candidate voice packets corresponding to the keywords matched with the word segmentation.
Optionally, the searching for the target voice packet matching the input information from the candidate voice packets corresponding to the keywords matching the word segmentation, includes: respectively calculating semantic similarity between the description text of each candidate voice packet and the input information, and respectively calculating text similarity between the keywords of each candidate voice packet and the input information; for each candidate voice packet, performing weighted calculation on the semantic similarity and the text similarity corresponding to the candidate voice packet according to a preset weight, and determining a recommendation score corresponding to the candidate voice packet; and selecting the first N candidate voice packets with the highest recommendation score as target voice packets, wherein N is a positive integer.
Optionally, after the presenting the target voice packet, the method further includes: and receiving a sending instruction, and sending a target voice packet corresponding to the sending instruction to an opposite terminal in a voice message mode.
Optionally, after the presenting the target voice packet, the method further includes: receiving an audition instruction, and playing a target voice packet corresponding to the audition instruction; or receiving a replacing instruction and replacing the currently displayed target voice packet.
Optionally, the method further comprises: after the input information is acquired, searching a target expression matched with the input information; and after the target voice packet is displayed, receiving a mode switching instruction, and switching to display the target expression from displaying the target voice packet.
Optionally, the method further comprises: and when the target voice packet matched with the input information is not found, generating a target voice packet based on the input information.
Optionally, the target voice packet matching the input information is searched by at least one of the following methods: searching a target voice packet matched with the input information from pre-stored voice packets; and searching based on the input information, and determining a corresponding target voice packet.
The embodiment of the invention also discloses a device for inputting through the input method, which specifically comprises the following steps: the acquisition module is used for acquiring input information; the first searching module is used for searching the target voice packet matched with the input information; and the display module is used for displaying the target voice packet.
Optionally, the first lookup module includes: the first voice packet searching submodule is used for carrying out voice recognition on the voice data and determining a corresponding voice recognition result when the input information is the voice data; performing semantic analysis on the voice recognition result to determine a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
Optionally, the first lookup module includes: the second voice packet searching submodule is used for analyzing the expression when the input information is the expression and determining the expression content corresponding to the expression; and searching a target voice packet matched with the expression content.
Optionally, the first lookup module includes: the third voice packet searching submodule is used for performing semantic analysis on the input information when the input information is a text and determining a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
Optionally, the first lookup module includes: the fourth voice packet searching submodule is used for segmenting the input information to obtain corresponding segmented word segments when the input information is a text; matching the word segmentation segments with a pre-stored word list, wherein the word list comprises keywords of a voice packet; and searching a target voice packet matched with the input information from the candidate voice packets corresponding to the keywords matched with the word segmentation.
Optionally, the fourth voice packet searching sub-module is configured to calculate semantic similarity between the description text of each candidate voice packet and the input information, and calculate text similarity between the keyword of each candidate voice packet and the input information; for each candidate voice packet, performing weighted calculation on the semantic similarity and the text similarity corresponding to the candidate voice packet according to a preset weight, and determining a recommendation score corresponding to the candidate voice packet; and selecting the first N candidate voice packets with the highest recommendation score as target voice packets, wherein N is a positive integer.
Optionally, the apparatus further comprises: and the sending module is used for receiving a sending instruction after the target voice packet is displayed, and sending the target voice packet corresponding to the sending instruction to an opposite terminal in a voice message mode.
Optionally, the apparatus further comprises: the audition module is used for receiving an audition instruction after the target voice packet is displayed, and playing the target voice packet corresponding to the audition instruction; and the replacing module is used for receiving a replacing instruction after the target voice packet is displayed and replacing the currently displayed target voice packet.
Optionally, the apparatus further comprises: the second searching module is used for searching a target expression matched with the input information after the input information is acquired; and the switching module is used for receiving a mode switching instruction after the target voice packet is displayed, and switching to display the target expression from displaying the target voice packet.
Optionally, the apparatus further comprises: and the voice packet generating module is used for generating a target voice packet based on the input information when the target voice packet matched with the input information is not found.
Optionally, the first lookup module includes: a fifth voice packet searching submodule, configured to search a target voice packet matched with the input information from pre-stored voice packets; and the sixth voice packet searching submodule is used for searching based on the input information and determining a corresponding target voice packet.
The embodiment of the invention also discloses a readable storage medium, and when the instructions in the storage medium are executed by a processor of the electronic equipment, the electronic equipment can execute the method for inputting through the input method according to any one of the embodiments of the invention.
An embodiment of the present invention also discloses an electronic device, including a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by one or more processors, and the one or more programs include instructions for: acquiring input information; searching a target voice packet matched with the input information; and displaying the target voice packet.
Optionally, when the input information is voice data, the searching for the target voice packet matching the input information includes: performing voice recognition on the voice data, and determining a corresponding voice recognition result; performing semantic analysis on the voice recognition result to determine a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
Optionally, when the input information is an expression, the searching for the target voice packet matched with the input information includes: analyzing the expression and determining the expression content corresponding to the expression; and searching a target voice packet matched with the expression content.
Optionally, when the input information is a text, the searching for the target voice packet matching the input information includes: performing semantic analysis on the input information to determine a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
Optionally, when the input information is a text, the searching for the target voice packet matching the input information includes: performing word segmentation on the input information to obtain corresponding word segmentation segments; matching the word segmentation segments with a pre-stored word list, wherein the word list comprises keywords of a voice packet; and searching a target voice packet matched with the input information from the candidate voice packets corresponding to the keywords matched with the word segmentation.
Optionally, the searching for the target voice packet matching the input information from the candidate voice packets corresponding to the keywords matching the word segmentation, includes: respectively calculating semantic similarity between the description text of each candidate voice packet and the input information, and respectively calculating text similarity between the keywords of each candidate voice packet and the input information; for each candidate voice packet, performing weighted calculation on the semantic similarity and the text similarity corresponding to the candidate voice packet according to a preset weight, and determining a recommendation score corresponding to the candidate voice packet; and selecting the first N candidate voice packets with the highest recommendation score as target voice packets, wherein N is a positive integer.
Optionally, after the presenting the target voice package, further comprising instructions for: and receiving a sending instruction, and sending a target voice packet corresponding to the sending instruction to an opposite terminal in a voice message mode.
Optionally, after the presenting the target voice package, further comprising instructions for: receiving an audition instruction, and playing a target voice packet corresponding to the audition instruction; or receiving a replacing instruction and replacing the currently displayed target voice packet.
Optionally, further comprising instructions for: after the input information is acquired, searching a target expression matched with the input information; and after the target voice packet is displayed, receiving a mode switching instruction, and switching to display the target expression from displaying the target voice packet.
Optionally, further comprising instructions for: and when the target voice packet matched with the input information is not found, generating a target voice packet based on the input information.
Optionally, the target voice packet matching the input information is searched by at least one of the following methods: searching a target voice packet matched with the input information from pre-stored voice packets; and searching based on the input information, and determining a corresponding target voice packet.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the input method can automatically search and display the target voice packet matched with the input information according to the acquired input information; the user can directly select the required voice packet from the displayed voice packets without switching the current input method keyboard interface to the voice panel for selection, and searching from a large number of voice packets, so that the operation is simple; the input efficiency of the user is greatly improved, and the input experience of the user is improved.
Drawings
FIG. 1 is a flow chart of the steps of one embodiment of a method of inputting via an input method of the present invention;
FIG. 2 is a schematic diagram of a voice packet presentation interface according to an embodiment of the present invention;
FIG. 3 is a flow chart of steps of an alternative embodiment of a method of inputting via an input method of the present invention;
FIG. 4 is a flow chart of steps of yet another alternative embodiment of a method of inputting via an input method of the present invention;
FIG. 5 is a flow chart illustrating steps of an alternative embodiment of a method for inputting via an input method of the present invention;
FIG. 6 is a flow chart illustrating steps of an alternative embodiment of a method for inputting via an input method of the present invention;
FIG. 7 is a flow chart illustrating steps of an alternative embodiment of a method for inputting via an input method of the present invention;
FIG. 8 is a diagram of another voice packet presentation interface according to an embodiment of the present invention;
FIG. 9 is a flowchart illustrating the steps of an alternative embodiment of a method for inputting via an input method;
FIG. 10 is a block diagram of an embodiment of an apparatus for inputting via an input method according to the present invention;
FIG. 11 is a block diagram of an alternative embodiment of an apparatus for inputting via an input method of the present invention;
FIG. 12 illustrates a block diagram of an electronic device for inputting via an input method, in accordance with an exemplary embodiment;
fig. 13 is a schematic structural diagram of an electronic device for inputting through an input method according to another exemplary embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
One of the core ideas of the embodiment of the invention is that the matched voice packet is actively recommended to the user based on the input information of the user, manual searching by the user is not needed, and the input efficiency of the user is improved.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a method for inputting through an input method according to the present invention is shown, which may specifically include the following steps:
and 102, acquiring input information.
In the embodiment of the invention, in the process of inputting by using the input method, the input method can acquire the input information of the user, and then recommend the voice packet for the user based on the input information. The input information may refer to information related to input, such as input content (for example, information that is not displayed and information that is displayed), input environment information, interaction information, and the like, which is not limited in this embodiment of the present invention. In addition, the input information may include various types, such as text input through an input method keyboard, voice data input through voice, and an expression input through an expression panel, and the like, which is not limited in this embodiment of the present invention.
A voice packet may include voice data of at least one sentence, and the sentence may include various types, such as a movie, a tv drama, a popular sentence, a celebrity language, a voice mimicry, and the like, which is not limited by the embodiment of the present invention.
And step 104, searching a target voice packet matched with the input information.
In an implementation manner of the embodiment of the present invention, the client of the input method may store a plurality of voice packets in advance, and then directly search, from the plurality of voice expression packets stored in advance, a voice packet (which may be referred to as a target voice packet subsequently) matching the input information.
In another implementation manner of the embodiment of the present invention, a server of an input method may search for a target voice packet matching the input information; the client of the input method generates a voice packet recommendation request according to the input information and sends the voice packet recommendation request to a server of the input method; and after receiving the voice packet recommendation request, the server of the input method searches a target voice packet according to the voice packet recommendation request and returns the target voice packet to the client of the input method.
The embodiment of the invention does not limit whether the client of the input method searches the target voice packet or the server of the input method searches the target voice packet.
In the embodiment of the invention, the target voice packet matched with the input information can be searched by matching the input information with the description information of the voice packet. One or more target voice packets can be found.
The description information may refer to information for describing a voice packet, and may include multiple types, such as description text, keywords, and the like of the voice packet, which is not limited in this embodiment of the present invention.
And 106, displaying the target voice packet.
In the embodiment of the present invention, the target voice packet may be displayed on a keyboard of an input method, or the target voice packet may be displayed in a designated area of an application program where the input method is currently located. When a plurality of target voice packets are found, the plurality of target voice packets can be displayed; the manner of displaying the multiple target voice packets may include multiple manners, such as displaying according to the matching degree of each target voice packet and the input information, for example, displaying according to the frequency of use of each target voice packet by the network users, and the like, which is not limited in this embodiment of the present invention.
When a user needs to send a voice packet, the user can directly select the needed voice packet to send to the opposite terminal; the current input method keyboard interface is not required to be switched to a voice panel for selection, and a large number of voice packets are not required to be searched, so that the operation is simple, and the input efficiency of a user is greatly improved.
As an example of the present invention, after the user screens "like you", the input method may acquire information "like you" that the user has already screened, and use it as input information. Then, a target voice packet matched with the input information 'like you' can be searched, for example, a voice packet corresponding to 'poor, hearty feeling o' and 'little fool me like you' can be searched; and presents the target voice packet as shown in fig. 2. The user can select the required voice packet from the displayed target voice packets and send the voice packet to the opposite terminal.
In summary, in the embodiment of the present invention, the input method may automatically search for and display the target voice packet matched with the input information according to the obtained input information; the user can directly select the required voice packet from the displayed voice packets without switching the current input method keyboard interface to the voice panel for selection, and searching from a large number of voice packets, so that the operation is simple; the input efficiency of the user is greatly improved, and the input experience of the user is improved.
In the following, how to search for a target voice packet matching the input information is described by taking an example in which a client of an input method directly searches for the target voice packet.
In an optional embodiment of the invention, the input information may comprise at least one of the following types: text, voice data, and emotions. When the types of the input information are different, the modes for searching the matched target voice packet can be different; the following describes a manner of searching for a matching target voice packet for different types of input information.
Now, taking the input information as a text as an example, how to search for a target voice packet matching the input information is described. When the input information is a text, a method for searching for a target voice packet matching the input information may be as follows:
referring to fig. 3, a flowchart illustrating steps of an alternative embodiment of the method for inputting through an input method according to the present invention is shown, which may specifically include the following steps:
step 302, acquiring input information; wherein the input information is text.
And step 304, performing word segmentation on the input information to obtain corresponding word segmentation segments.
And step 306, matching the word segmentation segments with a pre-stored word list, wherein the word list comprises keywords corresponding to the voice packet.
In the embodiment of the present invention, a method for collecting voice packets in advance may be as follows: historical input information of the users in the whole network is obtained in advance, and the high-frequency words of the users in the whole network are determined according to the historical input information of the users in the whole network. And then collecting voice packets matched with the high-frequency words of each user and description texts corresponding to the voice packets from the whole network, and storing the voice packets matched with the high-frequency words of each user and the description texts corresponding to the voice packets in a client of the input method. The description text may refer to a statement corresponding to the voice data in the voice packet, for example, the description text corresponding to the voice packet "poor, cardiac feeling o" is "poor, cardiac feeling o"; the description text of the corresponding voice packet is 'Xiao Sha me likes you' and 'Xiao Sha me likes you'.
In an optional embodiment of the present invention, one way to determine the voice packets matching with the high-frequency words of the user may be to determine the semantics of each voice packet; for each user high-frequency word, matching the user high-frequency word with the semantics of each voice packet, and determining the voice packet with high matching degree as the voice packet matched with the user high-frequency word. Wherein, one user high frequency word can correspond to at least one voice packet.
In the embodiment of the invention, aiming at each voice packet, the corresponding high-frequency words of the user can be used as the keywords of the voice packet; and generating a word list by adopting the collected keywords of all the voice packets, and storing the word list in the client of the input method, so that the client of the subsequent input method can perform primary screening on the voice packets according to the keywords and the input information in the word list, and the efficiency of searching for the target voice packet is improved.
In the embodiment of the present invention, a method for primarily screening a voice packet according to the keyword and the input information in the vocabulary may be that the input content in the input information is subjected to word segmentation processing, for example, a word segmentation tool is used to segment words, so as to obtain a word segmentation segment corresponding to the input content. And then matching each word segmentation segment with each keyword in a word list respectively, and searching whether the keyword matched with the word segmentation segment exists or not. When the keywords matching with at least one word segmentation segment are found from the word list, the voice packet corresponding to the keywords matching with the word segmentation segment can be determined as a candidate voice packet. For example, the input content is "baby, i love you", the input content may be segmented to obtain corresponding segmentation segments of "baby" and "i love you". Then respectively matching the baby and the I love you with a pre-stored word list; if the keyword "i love you" exists in the vocabulary, the keyword matched with the at least one word segmentation segment can be determined to be found from the vocabulary, and then the voice packet corresponding to the "i love you" can be determined as a candidate voice packet. If the keyword 'baby' exists in the word list, the keyword matched with at least one word segmentation segment can be determined to be found from the word list, and then the voice packet corresponding to the 'baby' can be determined to be a candidate voice packet. Of course, if keywords "i love you" and "baby" exist in the vocabulary, it may be determined that the keyword matching with the at least one word segmentation is found from the vocabulary, and then both the voice packet corresponding to "i love you" and the expression packet corresponding to "baby" may be determined as candidate voice packets.
Of course, the user may also record the voice packet by self-definition and set the corresponding keyword. After the user self-defines and records the voice packet and sets the corresponding keyword, the client of the input method can store the voice packet recorded by the user self-defining on one hand. On the other hand, the client of the input method can judge whether the pre-stored word list has the key word corresponding to the self-defined recorded voice packet, and if the key word does not exist in the word list, the key word can be added into the word list; if the keyword exists in the word list, the association between the keyword in the word list and the self-defined recorded voice packet can be established. And then candidate voice packets can be searched from the voice packets collected from the whole network and/or the user-defined recorded voice packets subsequently, so that the personalized requirements of the user can be better met.
And 308, searching a target voice packet matched with the input information from the candidate voice packets corresponding to the keywords matched with the word segmentation.
In this step 308, reference may be made to the following step 308-2-step 308-6:
and 308-2, respectively calculating the semantic similarity between the description text of each candidate voice packet and the input information, and respectively calculating the text similarity between the keywords of each candidate voice packet and the input information.
And 308-4, carrying out weighted calculation on the semantic similarity and the text similarity corresponding to each candidate voice packet according to a preset weight, and determining a recommendation score corresponding to the candidate voice packet.
And 308-6, selecting the first N candidate voice packets with the highest recommended score as target voice packets, wherein N is a positive integer.
In the embodiment of the present invention, in order to improve the accuracy of the searched target voice packet, semantic similarity between the description text of each candidate voice packet and the input information may be respectively calculated, and text similarity between the keyword of each candidate voice packet and the input information may be respectively calculated. Then, for each candidate voice packet, performing weighted calculation on the semantic similarity and the text similarity of the candidate voice packet and the input information according to preset weight, and determining a recommendation score corresponding to the candidate voice packet. Wherein the preset weight may include: the semantic weight corresponding to the semantic similarity and the text weight corresponding to the text similarity may be set as required, for example, the semantic weight and the text weight may be set as a keyword weight of 1:1, which is not limited in this embodiment of the present invention. And performing weighted calculation on the semantic similarity and the text similarity by calculating the sum of the semantic similarity and the semantic weight product and the text similarity and the text weight product to obtain the recommendation score of the candidate voice packet. Then, sorting the candidate voice packets according to the recommended scores of the candidate voice packets, such as descending sorting; and then, selecting the first N candidate voice packets with the highest recommended score as target voice packets, where N is a positive integer and may be set as required, and the embodiment of the present invention is not limited to this.
And 310, displaying the target voice packet.
In an example of the present invention, when the target voice packet includes a plurality of target voice packets, the presentation order of each target voice packet may be determined according to the recommended score of the target voice packet, for example, the target voice packets may be sorted in descending order according to the recommended score; and then displaying the target voice packets according to the display sequence.
In summary, in the embodiment of the present invention, when the input information is a text, the input method may perform word segmentation on the input information to obtain a corresponding word segmentation segment; matching the word segmentation segments with keywords in a pre-stored word list, and searching and displaying a target voice packet matched with the input information from candidate voice packets corresponding to the keywords matched with the word segmentation segments; and then carry out preliminary screening to the voice packet through the vocabulary that prestores, look for the target voice packet in the candidate voice packet that obtains from preliminary screening again, can improve the efficiency of looking for the target voice packet, further improve user's input efficiency.
Secondly, in the embodiment of the present invention, semantic similarity between the description text corresponding to each candidate voice packet and the input information, and text similarity between the keywords corresponding to each candidate voice packet and the input information may be respectively calculated, and then, for each candidate voice packet, the semantic similarity and the text similarity corresponding to the candidate voice packet are weighted according to a preset weight to determine a recommendation score corresponding to the candidate voice packet; and then, the first N candidate voice packets with the highest recommendation score are selected as target voice packets, so that the voice packets with high similarity to the input information are provided for the user, and the accuracy of voice packet recommendation is improved.
When the input information is text, another way to find a target voice packet matching the input information may be as follows:
referring to fig. 4, a flowchart illustrating steps of another alternative embodiment of the method for inputting through an input method according to the present invention is shown, which may specifically include the following steps:
step 402, acquiring input information; wherein the input information is text.
And 404, performing semantic analysis on the input information to determine a corresponding semantic analysis result.
And 406, searching a target voice packet matched with the semantic analysis result.
In the embodiment of the present invention, a method for collecting voice packets in advance may be as follows: the method comprises the steps of collecting a plurality of voice packets and description texts corresponding to the voice packets from the whole network in advance, and storing the collected voice packets and the description texts corresponding to the voice packets in a client of an input method. The client of the subsequent input method can directly search the target voice packet matched with the input information according to the description text of each voice packet.
In an implementation manner of the embodiment of the present invention, when the input information includes input content, input environment information, and interaction information, semantic analysis may be performed on the input content in combination with the input environment information and the interaction information to determine a corresponding semantic analysis result.
In an implementation manner of the embodiment of the present invention, when the input information includes input environment information and interactive information, it may be determined that an opposite end information that is not replied by a home end user in the interactive information; and then according to the input environment information and other information (which may refer to information other than the opposite-end information which is not replied by the local-end user) in the interactive information, performing semantic analysis on the opposite-end information which is not replied by the local-end user in the interactive information, and determining a corresponding semantic analysis result.
In the embodiment of the invention, after a client of an input method determines a semantic analysis result corresponding to input information, the semantic similarity between the semantic analysis result of the input information and a pre-stored description text corresponding to each voice packet can be calculated; then, the first M voice packets with the highest semantic similarity may be selected as the target voice packet. Wherein M is a positive integer, which may be specifically set as required, and this is not limited in the embodiment of the present invention.
As an example of the present invention, in a chat scenario, the input content is "the lowest price of the whole network", and semantic analysis is performed on the input content in combination with the interactive information and the input environment information to determine that the corresponding semantic analysis result is "cut price". Then, semantic similarity between the description text of each pre-stored voice packet and the semantic analysis result can be calculated, and the first 2 voice packets with the highest semantic similarity are selected as target voice packets; for example, the two speech packets with the highest semantic similarity: the voice packet corresponding to the ' one-click bar ' and the ' boss are cheaper, and the voice packet corresponding to the ' bar ' cannot be lowered any more; the two voice packets may be considered the target voice packet.
And step 408, displaying the target voice packet.
This step 408 is similar to the step 310 described above and will not be described herein again.
In summary, in the embodiment of the present invention, when the input information is a text, the input method performs semantic analysis according to the acquired input information, and then searches for and displays a target expression package matched with the input information based on a semantic analysis result; compared with the embodiment that the candidate voice packets are screened out through the keywords and then the target voice packet is selected from the candidate voice packets, the embodiment of the invention can avoid filtering the voice packets which are related to the input information semanteme through the keywords but are not matched with the participle segments of the input information, and improves the comprehensiveness of the recommended target voice packet.
Now, taking the input information as the voice data as an example, how to search for the target voice packet matching the input information will be described.
Referring to fig. 5, a flowchart illustrating steps of another alternative embodiment of the method for inputting through an input method according to the present invention is shown, which may specifically include the following steps:
step 502, obtaining input information, wherein the input information is voice data.
And step 504, performing voice recognition on the voice data, and determining a corresponding voice recognition result.
In the embodiment of the invention, when the input information is voice data, a voice packet with similar semantics with the voice data can be searched to be used as a target voice packet.
In an example of the present invention, the voice data may be subjected to voice recognition, for example, a voice recognition model, a voice recognizer, or the like is used for performing voice recognition, and a corresponding voice recognition result is determined; then, based on the speech recognition result, a matching target speech packet can be found, and refer to steps 506-508:
step 506, performing semantic analysis on the voice recognition result to determine a corresponding semantic analysis result.
And step 508, searching a target voice packet matched with the semantic analysis result.
The steps 506-508 are similar to the steps 404-406, and are not described herein again.
As an example of the present invention, voice data whose input information is "haha, too happy" is input; then, after the voice recognition is carried out through the voice data and the semantic analysis is carried out on the voice recognition result, the semantic analysis result corresponding to the input information can be determined to be 'happy'. Then, semantic similarity between the description text of each pre-stored voice packet and the semantic analysis result can be calculated, and the first 2 voice packets with the highest semantic similarity are selected as target voice packets; for example, the two speech packets with the highest semantic similarity: in the cartoon, the corresponding speech segment and laugh segment are shown by the word "haha", laughing me. The two speech packets may then be determined as the target speech packet.
And step 510, displaying the target voice packet.
Step 510 is similar to step 310 described above, and is not described herein again.
In summary, in the embodiment of the present invention, when the input information is voice data, the input method may perform voice recognition on the voice data, determine a corresponding voice recognition result, and then perform semantic analysis on the voice recognition result, and determine a corresponding semantic analysis result; searching and displaying a target voice packet matched with the semantic analysis result; and then recommend the voice packet similar to the voice data input for the user, and the input fun is improved.
Now, taking the input information as an example, how to find the target voice packet matching the input information is described.
Referring to fig. 6, a flowchart illustrating steps of another alternative embodiment of the method for inputting through an input method according to the present invention is shown, which may specifically include the following steps:
step 602, obtaining input information, wherein the input information is an expression.
Step 604, analyzing the expression and determining the expression content corresponding to the expression.
Step 606, searching a target voice packet matched with the expression content.
In the embodiment of the invention, when the input information is the expression, a target voice packet matched with the expression can be recommended to a user; wherein the expression includes but is not limited to: emoji (emoji) expressions, pictorial expressions and text-to-face.
In the embodiment of the invention, the expression can be analyzed to determine the expression content corresponding to the expression, wherein the expression content can refer to the meaning of expression, such as emoji expression of laugh, the corresponding expression content can be happy, and the expression content corresponding to the character "(. about A ▽ ^) can also be happy.
In the embodiment of the invention, the client of the input method can calculate the semantic similarity between the expression content of the expression and the corresponding description text of each pre-stored voice packet; then, the first X voice packets with the highest semantic similarity may be selected as the target voice packet. Wherein X is a positive integer, which may be specifically set as required, and this is not limited in this embodiment of the present invention.
As an example of the present invention, when the input information is an expression of "applause", the client of the input method may analyze the corresponding expression content: clapping, the first 5 applause segments with the highest semantic similarity can be used as the target voice packet, for example, applause segments with high recognition of classical movies. For another example, the input information is a "ghost face" expression, and the client of the input method may analyze the corresponding expression content: it is noted that the first 3 odd-sound segments with the highest semantic similarity may be used as the target speech packet.
And 608, displaying the target voice packet.
This step 608 is similar to the step 310 described above, and will not be described herein again.
In summary, in the embodiment of the present invention, when the input information is an expression, the input method may analyze the expression, determine the expression content corresponding to the expression, and then search for and display the target voice packet matching the expression content; and then recommend the voice packet matched with the expression input by the user for the user, thereby improving the input pleasure.
Certainly, in a chat scenario, when the opposite-end information is received and the local-end user does not input, the acquired input information may be interactive information; then according to the steps 304-308, 404-406, 504-508, or 606-606, for the opposite end information which is not replied by the local end user in the interactive information, a matched target voice packet is searched, and then the voice packet for replying is recommended for the user. For example, the peer-to-peer information that the home terminal user does not reply in the acquired interaction information: "Do you are puppies, speak nothing"; various loving puppy beep voice packets may be determined as the target voice packet.
In the following, how to search for a target voice packet matching the input information will be described by taking the example that a server of the input method searches for the target voice packet.
Referring to fig. 7, a flowchart illustrating steps of another alternative embodiment of the method for inputting through an input method according to the present invention is shown, which may specifically include the following steps:
step 702, the client of the input method obtains input information.
Step 704, the client generates a voice packet recommendation request according to the input information.
Step 706, the client sends the voice packet recommendation request to a server of an input method.
In the embodiment of the invention, when the server of the input method searches the target voice packet, the client of the input method can directly generate the voice packet recommendation request according to the input information no matter the input information is text, voice data, expression or other types of information after acquiring the input information. The voice packet recommendation request may then be sent to a server of the input method, instructing the server of the input method to find a target voice packet matching the input information.
In an example of the present invention, when the input information is a text, the client of the input method may further perform steps 304-306; and when the keyword matched with at least one word segmentation segment is found, generating a voice packet recommendation request according to the input information and the keyword matched with at least one word segmentation segment of the input information.
Step 708, the server extracts input information from the voice packet recommendation request, and searches for a target voice packet matching the input information.
In the embodiment of the present invention, the server of the input method may also collect the voice packet in advance according to the above steps 304-306 or 404-406, and store the voice packet in the server; and then searching a target voice packet matched with the input information from the pre-stored voice packets.
When the input information is a text, if the client of the input method is a voice packet recommendation request directly generated according to the input information, the server can extract the input information from the voice packet recommendation request; looking up the target voice packet matching the input information may then be accomplished, referring to steps 404-406. If the client of the input method generates a voice packet recommendation request according to the input information and the keyword matched with the at least one word segmentation segment of the input information, the server can extract the input information and the keyword matched with the at least one word segmentation segment of the input information from the voice packet recommendation request; referring then to step 308, a search for a target voice packet that matches the input information may be accomplished.
When the input information is voice data, the server can extract corresponding voice data from the voice packet recommendation request; looking up the target voice packet matching the input information may then be accomplished with reference to steps 504-508.
When the input information is the expression, the server can extract the corresponding expression from the voice packet recommendation request; referring to steps 604-606, a search for a target voice packet matching the input information may then be performed.
In an embodiment of the present invention, the server may also obtain the input information after receiving the voice packet recommendation request without collecting the voice packet in advance; and then searching in the whole network based on the input information to determine a matched target voice packet. The semantic similarity between the description text corresponding to each voice packet in the whole network and the input information can be calculated respectively; and then selecting the first Y voice packets with the highest semantic similarity as target voice packets. The Y is a positive integer, which may be specifically set as required, and this is not limited in the embodiment of the present invention.
Step 710, the server returns the target voice packet to the client.
And 712, the client displays the target voice packet.
In summary, in the embodiment of the present invention, a client of an input method may obtain input information, generate a voice packet recommendation request according to the input information, and send the voice packet recommendation request to a server; after receiving the voice packet recommendation request, the server may extract the input information from the voice packet recommendation request, then search for a target voice packet matching the input information, and return the target voice packet to the client; displaying the target voice packet by the client; and then look for the target voice packet through the server, improve the efficiency of looking for of target voice packet, can be quick recommend for the user to further improve user's input efficiency, improve user's input experience.
Secondly, in the embodiment of the present invention, the server of the input method may perform a search based on the input information to determine a corresponding target voice packet; and then, a more comprehensive voice packet can be recommended and updated for the user, and the input experience of the user is further improved.
In the embodiment of the present invention, the N, M, X and Y may be the same or different, and the embodiment of the present invention is not limited to this.
In an optional embodiment of the present invention, the user may perform an audition operation on the target voice packet, and accurately select a desired voice packet from the displayed target voice packets by auditing the target voice packet. After the user executes the audition operation, the input method can receive the audition instruction and play the target voice packet corresponding to the audition instruction. The audition operation may be a click operation for a set position, the set position may include multiple types, a position corresponding to the audition button in the display area corresponding to each target voice packet may also be a position other than the send button in the display area corresponding to each target voice packet, which is not limited in the embodiment of the present invention.
In an optional embodiment of the present invention, when it is determined that the target voice packet currently displayed does not meet the user requirement, the user may perform a replacement operation such as a sliding operation; correspondingly, the input method can receive the replacing instruction and replace the currently displayed target voice packet so as to facilitate the user to check more target voice packets.
In an optional embodiment of the present invention, when it is determined that the target voice packet currently displayed meets the user requirement, the user may perform a sending operation on the target voice packet meeting the requirement, for example, click a sending button in the display area corresponding to the target voice packet meeting the requirement, as shown in fig. 8. Correspondingly, the input method may receive a sending instruction, and send a target voice packet corresponding to the sending instruction to the opposite end in a voice message manner. The sending of the target voice packet corresponding to the sending instruction to the opposite end in the form of a voice message may refer to sending the target voice packet corresponding to the sending instruction to the opposite end in the form of sending the voice message by the application program where the input method is currently located.
Certainly, after the input information is acquired, the input method can recommend the matched voice packet for the user based on the input information, and can also recommend other matched information for the user based on the input information, so that more kinds of information can be provided for the user to select, and the input efficiency of the user is further improved. The following description takes the input method as an example to recommend other matched information to the user as the expression.
Referring to FIG. 9, a flowchart illustrating steps of yet another alternative embodiment of a method for inputting via an input method of the present invention is shown.
And step 902, acquiring input information.
In the embodiment of the present invention, after the input method obtains the input information, on one hand, step 904 may be executed to search for a matched expression; on the other hand, step 910 can be executed to find a matching voice packet; and then the user can conveniently switch and select between the voice packet and the expression.
Wherein, the embodiment of the present invention does not limit the execution sequence of step 904 and step 910.
And step 904, searching a target expression matched with the input information.
In the embodiment of the invention, expressions can be collected in advance, and corresponding keywords are labeled for each expression; and then, the input information is matched with the keywords of each expression, and the expression matched with the input information is searched, and the expression can be called a target expression subsequently.
Of course, in the embodiment of the present invention, the client of the input method may search the target expression matched with the input information from the pre-stored expressions. Or the server of the input method may search for a target voice packet matching the input information from pre-stored voice packets, or perform a search based on the input information to determine a corresponding target expression, which is not limited in this embodiment of the present invention.
Step 906, judging whether the target expression matched with the input information is found.
In the embodiment of the invention, a target expression matched with the input information may exist, or a target expression matched with the input information may not exist; thus, after step 904 is performed, a determination may be made as to whether a target expression matching the input information is found. When the target expression matching the input information is found, step 918 may be performed; when a target expression matching the input information is not found, step 908 may be performed.
And 908, generating a target expression based on the input information.
In the embodiment of the invention, when the target expression matched with the input information is not found, the input information can be adopted to generate the expression, so that the target expression is obtained.
And step 910, searching a target voice packet matched with the input information.
Step 912, judging whether the target voice packet matched with the input information is found.
In the embodiment of the invention, a target voice packet matched with the input information may exist, or a target voice packet matched with the input information may not exist; therefore, after step 910 is executed, determining whether a target voice packet matching the input information is found may be performed. When a target voice packet matching the input information is found, step 916 may be performed; when a target voice package matching the input information is not found, step 914 may be performed.
And 914, generating a target voice packet based on the input information.
In the embodiment of the invention, when the target voice packet matched with the input information is not found, the input information can be adopted to generate the voice packet to obtain the target voice packet.
And step 916, displaying the target voice packet.
In the embodiment of the invention, after the target voice packet matched with the input information is found, or the target voice packet is generated based on the input information, the target voice packet can be directly displayed.
Step 918, receiving a mode switching instruction, and switching to display the target expression from displaying the target voice package.
In one embodiment of the invention, in order to facilitate the switching and selection of the user among various types of recommendation information, the input method can provide the switching function of the voice packet and the expression based on the setting of the user; for example, mode-switching buttons such as the "emoticon" button and the "voice" button shown in fig. 8 may be presented on the input method keyboard interface. When the target voice package is currently displayed, if the user wants to input an expression, a mode switching operation may be performed, for example, a mode switching button such as an "expression" button in fig. 8 is clicked; correspondingly, the input method can receive a mode switching instruction, and the target expression is switched to be displayed by displaying the target voice packet. When the target expression is currently displayed, if the user wants to input a voice packet, a mode switching operation may be performed, for example, clicking a mode switching button, such as a "voice" button in fig. 8; the input method can receive a mode switching instruction, and the target voice packet is displayed by switching the target expression.
In the embodiment of the invention, when the target voice packet cannot be generated based on the input information, the target expression can be directly displayed for the user to select. The user can execute the screen-on operation according to the target expression, the input method can receive the corresponding screen-on instruction, and then the target expression corresponding to the screen-on instruction is displayed on the screen or sent to the opposite terminal. Of course, when the target voice package cannot be generated based on the input information and the target expression cannot be generated based on the input information, the recommendation may not be made for the user.
In summary, in the embodiment of the present invention, after the input method obtains the input information, the input method may search for the target voice packet matching the input information, and search for the target expression matching the input information; when the target voice packet matched with the input information is found, the target voice packet can be displayed so that a user can select the voice packet. When the user needs to input the expression, mode switching operation can be executed, correspondingly, the input method can receive a mode switching instruction, and the target speech packet is switched to display the target expression so that the user can select the expression; the user can conveniently switch and select among various types of recommendation information, and the input efficiency of the user is further improved; and the input experience of the user is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 10, a block diagram of an embodiment of the apparatus for inputting through an input method according to the present invention is shown, and specifically, the apparatus may include the following modules:
an obtaining module 1002, configured to obtain input information;
a first searching module 1004, configured to search for a target voice packet matching the input information;
a display module 1006, configured to display the target voice packet.
Referring to fig. 11, a block diagram of an alternative embodiment of the apparatus for inputting via an input method of the present invention is shown.
In an alternative embodiment of the present invention, the first lookup module 1004 includes:
the first voice packet searching sub-module 10042 is configured to, when the input information is voice data, perform voice recognition on the voice data, and determine a corresponding voice recognition result; performing semantic analysis on the voice recognition result to determine a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
In an alternative embodiment of the present invention, the first lookup module 1004 includes:
the second voice packet searching sub-module 10044 is configured to, when the input information is an expression, analyze the expression and determine an expression content corresponding to the expression; and searching a target voice packet matched with the expression content.
In an alternative embodiment of the present invention, the first lookup module 1004 includes:
the third voice packet searching sub-module 10046 is configured to, when the input information is a text, perform semantic analysis on the input information, and determine a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
In an alternative embodiment of the present invention, the first lookup module 1004 includes:
the fourth voice packet searching sub-module 10048 is configured to, when the input information is a text, perform word segmentation on the input information to obtain a corresponding word segmentation segment; matching the word segmentation segments with a pre-stored word list, wherein the word list comprises keywords of a voice packet; and searching a target voice packet matched with the input information from the candidate voice packets corresponding to the keywords matched with the word segmentation.
In an optional embodiment of the present invention, the fourth voice packet searching sub-module 10048 is configured to respectively calculate semantic similarities between the description texts of the candidate voice packets and the input information, and respectively calculate text similarities between the keywords of the candidate voice packets and the input information; for each candidate voice packet, performing weighted calculation on the semantic similarity and the text similarity corresponding to the candidate voice packet according to a preset weight, and determining a recommendation score corresponding to the candidate voice packet; and selecting the first N candidate voice packets with the highest recommendation score as target voice packets, wherein N is a positive integer.
In an optional embodiment of the present invention, the apparatus further comprises:
a sending module 1008, configured to receive a sending instruction after the target voice packet is displayed, and send the target voice packet corresponding to the sending instruction to an opposite end in a voice message manner.
In an optional embodiment of the present invention, the apparatus further comprises:
the audition module 1010 is configured to receive an audition instruction after the target voice packet is displayed, and play the target voice packet corresponding to the audition instruction;
a replacing module 1012, configured to receive a replacing instruction after the target voice packet is displayed, and replace the currently displayed target voice packet.
In an optional embodiment of the present invention, the apparatus further comprises:
the second searching module 1014 is configured to search for a target expression matched with the input information after the input information is acquired;
the switching module 1016 is configured to receive a mode switching instruction after the target voice packet is displayed, and switch the display of the target voice packet to the display of the target expression.
In an optional embodiment of the present invention, the method further comprises:
a voice packet generating module 1018, configured to generate a target voice packet based on the input information when the target voice packet matching the input information is not found.
In an alternative embodiment of the present invention, the first lookup module 1004 includes:
a fifth voice packet searching sub-module 100410, configured to search, from pre-stored voice packets, a target voice packet matching the input information;
and a sixth voice packet searching sub-module 100412, configured to perform searching based on the input information, and determine a corresponding target voice packet.
In summary, in the embodiment of the present invention, the input method may automatically search for and display the target voice packet matching the input information according to the acquired input information; the user can directly select the required voice packet from the displayed voice packets without switching the current input method keyboard interface to the voice panel for selection, and searching from a large number of voice packets, so that the operation is simple; the input efficiency of the user is greatly improved, and the input experience of the user is improved.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Fig. 12 is a block diagram illustrating a structure of an electronic device 1200 for inputting through an input method according to an example embodiment. For example, the electronic device 1200 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. 12, electronic device 1200 may include one or more of the following components: a processing component 1202, a memory 1204, a power component 1206, a multimedia component 1208, an audio component 1210, an input/output (I/O) interface 1212, a sensor component 1214, and a communications component 1216.
The processing component 1202 generally controls overall operation of the electronic device 1200, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 1202 may include one or more processors 1220 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 1202 can include one or more modules that facilitate interaction between the processing component 1202 and other components. For example, the processing component 1202 can include a multimedia module to facilitate interaction between the multimedia component 1208 and the processing component 1202.
The memory 1204 is configured to store various types of data to support operation at the device 1200. Examples of such data include instructions for any application or method operating on the electronic device 1200, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1204 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.
The power component 1206 provides power to the various components of the electronic device 1200. Power components 1206 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic device 1200.
The multimedia component 1208 comprises a screen providing an output interface between the electronic device 1200 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 1208 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 1200 is in an operation 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.
Audio component 1210 is configured to output and/or input audio signals. For example, the audio assembly 1210 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 1200 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 1204 or transmitted via the communication component 1216. In some embodiments, audio assembly 1210 further includes a speaker for outputting audio signals.
The I/O interface 1212 provides an interface between the processing component 1202 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 1214 includes one or more sensors for providing various aspects of state assessment for the electronic device 1200. For example, the sensor assembly 1214 may detect an open/closed state of the device 1200, the relative positioning of components, such as a display and keypad of the electronic device 1200, the sensor assembly 1214 may also detect a change in the position of the electronic device 1200 or a component of the electronic device 1200, the presence or absence of user contact with the electronic device 1200, orientation or acceleration/deceleration of the electronic device 1200, and a change in the temperature of the electronic device 1200. The sensor assembly 1214 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 1214 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 1214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communications component 1216 is configured to facilitate communications between the electronic device 1200 and other devices in a wired or wireless manner. The electronic device 1200 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 section 1214 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1214 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 electronic device 1200 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 1204 comprising instructions, executable by the processor 1220 of the electronic device 1200 to perform the above-described method 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.
A non-transitory computer readable storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a method of inputting through an input method, the method comprising: acquiring input information; searching a target voice packet matched with the input information; and displaying the target voice packet.
Optionally, when the input information is voice data, the searching for the target voice packet matching the input information includes: performing voice recognition on the voice data, and determining a corresponding voice recognition result; performing semantic analysis on the voice recognition result to determine a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
Optionally, when the input information is an expression, the searching for the target voice packet matched with the input information includes: analyzing the expression and determining the expression content corresponding to the expression; and searching a target voice packet matched with the expression content.
Optionally, when the input information is a text, the searching for the target voice packet matching the input information includes: performing semantic analysis on the input information to determine a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
Optionally, when the input information is a text, the searching for the target voice packet matching the input information includes: performing word segmentation on the input information to obtain corresponding word segmentation segments; matching the word segmentation segments with a pre-stored word list, wherein the word list comprises keywords of a voice packet; and searching a target voice packet matched with the input information from the candidate voice packets corresponding to the keywords matched with the word segmentation.
Optionally, the searching for the target voice packet matching the input information from the candidate voice packets corresponding to the keywords matching the word segmentation, includes: respectively calculating semantic similarity between the description text of each candidate voice packet and the input information, and respectively calculating text similarity between the keywords of each candidate voice packet and the input information; for each candidate voice packet, performing weighted calculation on the semantic similarity and the text similarity corresponding to the candidate voice packet according to a preset weight, and determining a recommendation score corresponding to the candidate voice packet; and selecting the first N candidate voice packets with the highest recommendation score as target voice packets, wherein N is a positive integer.
Optionally, after the presenting the target voice packet, the method further includes: and receiving a sending instruction, and sending a target voice packet corresponding to the sending instruction to an opposite terminal in a voice message mode.
Optionally, after the presenting the target voice packet, the method further includes: receiving an audition instruction, and playing a target voice packet corresponding to the audition instruction; or receiving a replacing instruction and replacing the currently displayed target voice packet.
Optionally, the method further comprises: after the input information is acquired, searching a target expression matched with the input information; and after the target voice packet is displayed, receiving a mode switching instruction, and switching to display the target expression from displaying the target voice packet.
Optionally, the method further comprises: and when the target voice packet matched with the input information is not found, generating a target voice packet based on the input information.
Optionally, the target voice packet matching the input information is searched by at least one of the following methods: searching a target voice packet matched with the input information from pre-stored voice packets; and searching based on the input information, and determining a corresponding target voice packet.
Fig. 13 is a schematic structural diagram of an electronic device 1300 for inputting through an input method according to another exemplary embodiment of the present invention. The electronic device 1300 may be a server, which may vary widely depending on configuration or performance, and may include one or more Central Processing Units (CPUs) 1322 (e.g., one or more processors) and memory 1332, one or more storage media 1330 (e.g., one or more mass storage devices) storing application programs 1342 or data 1344. Memory 1332 and storage medium 1330 may be, among other things, transitory or persistent storage. The program stored on the storage medium 1330 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a server. Still further, central processor 1322 may be disposed in communication with storage medium 1330, executing a sequence of instruction operations in storage medium 1330 on a server.
The server may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input-output interfaces 1358, one or more keyboards 1356, and/or one or more operating systems 1341 such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
An electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors the one or more programs including instructions for: acquiring input information; searching a target voice packet matched with the input information; and displaying the target voice packet.
Optionally, when the input information is voice data, the searching for the target voice packet matching the input information includes: performing voice recognition on the voice data, and determining a corresponding voice recognition result; performing semantic analysis on the voice recognition result to determine a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
Optionally, when the input information is an expression, the searching for the target voice packet matched with the input information includes: analyzing the expression and determining the expression content corresponding to the expression; and searching a target voice packet matched with the expression content.
Optionally, when the input information is a text, the searching for the target voice packet matching the input information includes: performing semantic analysis on the input information to determine a corresponding semantic analysis result; and searching a target voice packet matched with the semantic analysis result.
Optionally, when the input information is a text, the searching for the target voice packet matching the input information includes: performing word segmentation on the input information to obtain corresponding word segmentation segments; matching the word segmentation segments with a pre-stored word list, wherein the word list comprises keywords of a voice packet; and searching a target voice packet matched with the input information from the candidate voice packets corresponding to the keywords matched with the word segmentation.
Optionally, the searching for the target voice packet matching the input information from the candidate voice packets corresponding to the keywords matching the word segmentation, includes: respectively calculating semantic similarity between the description text of each candidate voice packet and the input information, and respectively calculating text similarity between the keywords of each candidate voice packet and the input information; for each candidate voice packet, performing weighted calculation on the semantic similarity and the text similarity corresponding to the candidate voice packet according to a preset weight, and determining a recommendation score corresponding to the candidate voice packet; and selecting the first N candidate voice packets with the highest recommendation score as target voice packets, wherein N is a positive integer.
Optionally, after the presenting the target voice package, further comprising instructions for: and receiving a sending instruction, and sending a target voice packet corresponding to the sending instruction to an opposite terminal in a voice message mode.
Optionally, after the presenting the target voice package, further comprising instructions for: receiving an audition instruction, and playing a target voice packet corresponding to the audition instruction; or receiving a replacing instruction and replacing the currently displayed target voice packet.
Optionally, further comprising instructions for: after the input information is acquired, searching a target expression matched with the input information; and after the target voice packet is displayed, receiving a mode switching instruction, and switching to display the target expression from displaying the target voice packet.
Optionally, further comprising instructions for: and when the target voice packet matched with the input information is not found, generating a target voice packet based on the input information.
Optionally, the target voice packet matching the input information is searched by at least one of the following methods: searching a target voice packet matched with the input information from pre-stored voice packets; and searching based on the input information, and determining a corresponding target voice packet.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method for inputting through an input method, the device for inputting through an input method and the electronic equipment provided by the invention are described in detail, specific examples are applied in the text to explain the principle and the implementation of the invention, and the description of the examples is only used for helping understanding the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method of inputting via an input method, comprising:
acquiring input information;
searching a target voice packet matched with the input information;
and displaying the target voice packet.
2. The method of claim 1, wherein when the input information is voice data, the searching for the target voice packet matching the input information comprises:
performing voice recognition on the voice data, and determining a corresponding voice recognition result;
performing semantic analysis on the voice recognition result to determine a corresponding semantic analysis result;
and searching a target voice packet matched with the semantic analysis result.
3. The method of claim 1, wherein when the input information is an emotion, the searching for the target voice packet matching the input information comprises:
analyzing the expression and determining the expression content corresponding to the expression;
and searching a target voice packet matched with the expression content.
4. The method of claim 1, wherein when the input information is text, the searching for the target voice packet matching the input information comprises:
performing semantic analysis on the input information to determine a corresponding semantic analysis result;
and searching a target voice packet matched with the semantic analysis result.
5. The method of claim 1, wherein when the input information is text, the searching for the target voice packet matching the input information comprises:
performing word segmentation on the input information to obtain corresponding word segmentation segments;
matching the word segmentation segments with a pre-stored word list, wherein the word list comprises keywords of a voice packet;
and searching a target voice packet matched with the input information from the candidate voice packets corresponding to the keywords matched with the word segmentation.
6. The method according to claim 5, wherein the searching for the target voice packet matching the input information from the candidate voice packets corresponding to the keywords matching the participle segment comprises:
respectively calculating semantic similarity between the description text of each candidate voice packet and the input information, and respectively calculating text similarity between the keywords of each candidate voice packet and the input information;
for each candidate voice packet, performing weighted calculation on the semantic similarity and the text similarity corresponding to the candidate voice packet according to a preset weight, and determining a recommendation score corresponding to the candidate voice packet;
and selecting the first N candidate voice packets with the highest recommendation score as target voice packets, wherein N is a positive integer.
7. The method according to claim 1, wherein after said presenting the target voice packet, the method further comprises:
and receiving a sending instruction, and sending a target voice packet corresponding to the sending instruction to an opposite terminal in a voice message mode.
8. An apparatus for inputting by an input method, comprising:
the acquisition module is used for acquiring input information;
the first searching module is used for searching the target voice packet matched with the input information;
and the display module is used for displaying the target voice packet.
9. An electronic device comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors the one or more programs including instructions for:
acquiring input information;
searching a target voice packet matched with the input information;
and displaying the target voice packet.
10. A readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of inputting via an input method as recited in any of method claims 1-7.
CN202010044379.1A 2020-01-15 2020-01-15 Method and device for inputting through input method and electronic equipment Pending CN111240497A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010044379.1A CN111240497A (en) 2020-01-15 2020-01-15 Method and device for inputting through input method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010044379.1A CN111240497A (en) 2020-01-15 2020-01-15 Method and device for inputting through input method and electronic equipment

Publications (1)

Publication Number Publication Date
CN111240497A true CN111240497A (en) 2020-06-05

Family

ID=70864059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010044379.1A Pending CN111240497A (en) 2020-01-15 2020-01-15 Method and device for inputting through input method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111240497A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782896A (en) * 2020-07-03 2020-10-16 深圳市壹鸽科技有限公司 Text processing method and device after voice recognition and terminal
CN113157966A (en) * 2021-03-15 2021-07-23 维沃移动通信有限公司 Display method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202204A (en) * 2016-06-24 2016-12-07 维沃移动通信有限公司 The lookup method of a kind of voice document and mobile terminal
CN106570106A (en) * 2016-11-01 2017-04-19 北京百度网讯科技有限公司 Method and device for converting voice information into expression in input process
CN109582768A (en) * 2018-11-23 2019-04-05 北京搜狗科技发展有限公司 A kind of text entry method and device
CN110472223A (en) * 2018-05-10 2019-11-19 北京搜狗科技发展有限公司 A kind of input configuration method, device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202204A (en) * 2016-06-24 2016-12-07 维沃移动通信有限公司 The lookup method of a kind of voice document and mobile terminal
CN106570106A (en) * 2016-11-01 2017-04-19 北京百度网讯科技有限公司 Method and device for converting voice information into expression in input process
CN110472223A (en) * 2018-05-10 2019-11-19 北京搜狗科技发展有限公司 A kind of input configuration method, device and electronic equipment
CN109582768A (en) * 2018-11-23 2019-04-05 北京搜狗科技发展有限公司 A kind of text entry method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782896A (en) * 2020-07-03 2020-10-16 深圳市壹鸽科技有限公司 Text processing method and device after voice recognition and terminal
CN111782896B (en) * 2020-07-03 2023-12-12 深圳市壹鸽科技有限公司 Text processing method, device and terminal after voice recognition
CN113157966A (en) * 2021-03-15 2021-07-23 维沃移动通信有限公司 Display method and device and electronic equipment
CN113157966B (en) * 2021-03-15 2023-10-31 维沃移动通信有限公司 Display method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN105426152B (en) The display methods and device of barrage
US20170154104A1 (en) Real-time recommendation of reference documents
EP3852044A1 (en) Method and device for commenting on multimedia resource
CN108227950B (en) Input method and device
CN108038102B (en) Method and device for recommending expression image, terminal and storage medium
CN110232137B (en) Data processing method and device and electronic equipment
CN110598098A (en) Information recommendation method and device and information recommendation device
CN108073606B (en) News recommendation method and device for news recommendation
CN110955821B (en) Recommendation method, recommendation device and readable medium
CN112508612B (en) Method for training advertisement creative generation model and generating advertisement creative and related device
CN110764627B (en) Input method and device and electronic equipment
CN111046210A (en) Information recommendation method and device and electronic equipment
CN111240497A (en) Method and device for inputting through input method and electronic equipment
CN110110204A (en) A kind of information recommendation method, device and the device for information recommendation
CN110244860B (en) Input method and device and electronic equipment
CN110728981A (en) Interactive function execution method and device, electronic equipment and storage medium
CN111629270A (en) Candidate item determination method and device and machine-readable medium
CN105302335B (en) Vocabulary recommends method and apparatus and computer readable storage medium
CN110895558B (en) Dialogue reply method and related device
CN111831132A (en) Information recommendation method and device and electronic equipment
CN112784151A (en) Method and related device for determining recommendation information
CN112631435A (en) Input method, device, equipment and storage medium
CN112465555B (en) Advertisement information recommending method and related device
CN113589949A (en) Input method and device and electronic equipment
CN112214114A (en) Input method and device and electronic equipment

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