CN113703588A - Input method, input device and input device - Google Patents

Input method, input device and input device Download PDF

Info

Publication number
CN113703588A
CN113703588A CN202010432859.5A CN202010432859A CN113703588A CN 113703588 A CN113703588 A CN 113703588A CN 202010432859 A CN202010432859 A CN 202010432859A CN 113703588 A CN113703588 A CN 113703588A
Authority
CN
China
Prior art keywords
sentence
input
user
candidate
following
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
CN202010432859.5A
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 CN202010432859.5A priority Critical patent/CN113703588A/en
Publication of CN113703588A publication Critical patent/CN113703588A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The embodiment of the application discloses an input method, an input device and a device for inputting. An embodiment of the method comprises: selecting sentences meeting preset conditions from historical input contents of a user; storing the selected sentences into a first word stock; when the fact that the user has the input intention for any sentence in the first word stock is detected, the sentence with the input intention is used as a target sentence, and the content which is not displayed on the screen in the target sentence is used as a first candidate item to be prompted. This embodiment improves the input efficiency.

Description

Input method, input device and input device
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to an input method, an input device and an input device.
Background
With the development of computer technology, the functions of input method application are more and more abundant. When a user uses the input method application to input content, candidate words possibly associated with the words can be provided for the user according to the words input by the user, so that the input cost of the user is saved, and the input efficiency is improved.
However, in addition to words, users are often accustomed to entering personalized sentences, such as spoken buddhist in sentence form, and the like. The existing input method only supports prompting the next candidate word according to the word input by the user, if a sentence needs to be input, the sentence can be formed only by inputting the word by the user, and the input efficiency of the user is low.
Disclosure of Invention
The embodiment of the application provides an input method, an input device and a device for input, so that the input efficiency is improved.
In a first aspect, an embodiment of the present application provides an input method, where the method includes: selecting sentences meeting preset conditions from historical input contents of a user; storing the selected sentences into a first word stock; when the fact that the user has the input intention for any sentence in the first word stock is detected, the sentence with the input intention is used as a target sentence, and the content which is not displayed on the screen in the target sentence is used as a first candidate item to be prompted.
In a second aspect, an embodiment of the present application provides an input device, including: a selecting unit configured to select a sentence satisfying a preset condition from a history input content of a user; a first storing unit configured to store the selected sentence in a first lexicon; and the first prompting unit is configured to, when detecting that the user has an input intention for any sentence in the first word stock, take the sentence with the input intention as a target sentence, and prompt non-on-screen content in the target sentence as a first candidate.
In a third aspect, an embodiment of the present application provides an apparatus for input, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs are configured to be executed by the one or more processors and include instructions for: selecting sentences meeting preset conditions from historical input contents of a user; storing the selected sentences into a first word stock; when the fact that the user has the input intention for any sentence in the first word stock is detected, the sentence with the input intention is used as a target sentence, and the content which is not displayed on the screen in the target sentence is used as a first candidate item to be prompted.
In a fourth aspect, embodiments of the present application provide a computer-readable medium on which a computer program is stored, which when executed by a processor, implements the method as described in the first aspect above.
According to the input method and device and the input device, sentences meeting the preset conditions are selected from historical input contents of a user, then the selected sentences are stored in the first word stock, and therefore when the fact that the user has an input intention for any sentence in the first word stock is detected, the sentence with the input intention is used as a target sentence, and further the content which is not displayed on the screen in the target sentence is used as a first candidate item to be prompted. Therefore, when sentences need to be input, the sentences which need to be input by the user can be automatically detected, the user does not need to input words one by one, and the input efficiency is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a flow diagram of one embodiment of an input method according to the present application;
FIG. 2 is a schematic diagram of a sentence prompting process according to the present application;
FIG. 3 is a flow diagram of yet another embodiment of an input method according to the present application;
FIG. 4 is yet another schematic diagram of a sentence prompting process according to the present application;
FIG. 5 is a schematic diagram of an embodiment of an input device according to the present application;
FIG. 6 is a schematic diagram of a structure of an apparatus for input according to the present application;
FIG. 7 is a schematic diagram of a server in accordance with some embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Referring to FIG. 1, a flow 100 of one embodiment of an input method according to the present application is shown. The input method can be operated in various electronic devices including but not limited to: a server, a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop, a car computer, a desktop computer, a set-top box, an intelligent tv, a wearable device, and so on.
The input method application mentioned in the embodiment of the application can support various input methods. The input method may be an encoding method used for inputting various symbols to electronic devices such as computers and mobile phones, and a user may conveniently input a desired character or character string to the electronic devices using the input method application. It should be noted that, in the embodiment of the present application, in addition to the common chinese input method (such as pinyin input method, wubi input method, zhuyin input method, phonetic input method, handwriting input method, etc.), the input method may also support other languages (such as english input method, japanese hiragana input method, korean input method, etc.), and the input method and the language category of the input method are not limited at all.
The input method in this embodiment may include the following steps:
step 101, selecting sentences meeting preset conditions from historical input contents of a user.
In this embodiment, the execution subject of the input method (the electronic apparatus described above) may first acquire the history input content of the user. The history input content may be history content input by the user through an input method application. For example, may include, but is not limited to: words, sentences, symbols, expressions, etc. The user can input the current input information in any input mode. For example, the input method may be a pinyin, a wubi, a stroke, or other encoding input method, or may be a voice input method, and is not limited herein.
In one scenario, the input content of the user may be recorded by the execution entity in real time and stored locally, for example, in a data packet of the local input method application in the form of a log or the like. At this time, the execution subject may directly acquire the history input content from the local.
In another scenario, the user's input may be recorded in real-time and sent to the server. The server may be an input method server that provides support for input method applications. The input method server may be a cloud server or a physical server. The input method server can store the historical input contents of a large number of users and update the historical input contents of all the users in real time. At this time, the execution body may send a data acquisition request with a user tag to the server, so as to obtain the history input content of the user returned by the server. The cloud server is a simple and efficient computing service which is safe and reliable, and the processing capacity of the computing service can be elastically stretched, and the management mode of the computing service is simpler and more efficient than that of a physical server.
In this embodiment, after the history input content is acquired, the execution subject may analyze the history input content, and select a sentence satisfying a preset condition from the history input content. The preset conditions can be preset according to the needs. For example, a sentence with a frequency of occurrence greater than a predetermined frequency (e.g., 4 times) may be set, so that when the user inputs the same sentence multiple times, the sentence may be stored in the lexicon for presentation as a candidate in the future.
In practice, sentences in the historical input content can be identified by identifying punctuation marks, and then sentences in the historical input content can be selected. In identifying sentences, some punctuation marks may first be designated as punctuation marks, such as commas "," and periods ". "and the like. Then, for each piece of content in the history input content, the designated punctuation mark in the content can be identified according to the sequence of characters from left to right (namely the sequence of character input from first to last). And determining sentences in the content based on the identified designated punctuation marks.
Specifically, when the first designated punctuation mark is identified, the content preceding the punctuation mark and the punctuation mark may be combined into one sentence. For example, a piece of content is "welcome to contact whenever there is any problem. "after commas in the sentence are recognized", "after" any problem is found ", it is considered" one sentence ".
While continuing to recognize punctuation, content that follows the last specified punctuation and precedes the current specified punctuation and the current punctuation may be combined into one sentence. Continuing with the above example, periods are identified ". "thereafter, the content" welcome to connect "and period" that is after the last designated punctuation mark and before the current designated punctuation mark may be displayed. "combine into one sentence. The sentence is "welcome to contact at any time. "
It should be noted that, since some users are not used to input punctuation marks at the end of the last sentence, for example, only "if there is any problem, it is welcome to contact at any time" is input, therefore, if there is still a character string after the specified punctuation mark is recognized, but there is no specified punctuation mark in the character string after the specified punctuation mark, the content after the recognized specified punctuation mark can be directly regarded as a sentence, for example, "welcome to contact at any time".
It should also be noted that, since some users are used to input spaces or other characters between sentences to replace punctuation marks, such as "welcome to contact whenever there is any problem", sentences in each content may also be determined by recognizing spaces or other characters.
In addition, the user can also recognize sentences through the operation of the user in the scenes of instant messaging (such as chatting) and the like. For example, when a user inputs a content and then sends the content to an opposite user, the content may be considered as a sentence. In addition, the word number of the content can be limited, for example, after a user inputs a certain content, the content is sent to an opposite end user, and if the word number of the content is greater than the preset word number, the content can be considered as a sentence. The operation of the user is not limited to the sending operation, and may also be a determining operation, and the like, which is not described in detail in this embodiment.
Step 102, storing the selected sentence in a first lexicon.
In this embodiment, the execution body may store the selected sentence in the first lexicon. Because different users have different input habits, the first word stock can be an individualized user unary word stock, so that sentences input by the user habits can be recorded. In practice, each sentence recorded in the first lexicon can contain punctuation marks, so that a user does not need to input the punctuation marks, and the input efficiency is further improved.
The first thesaurus may be stored locally as a local thesaurus of the input method application in the execution subject, or may be stored in the server. The present embodiment is not limited.
And 103, when detecting that the user has an input intention for any sentence in the first lexicon, taking the sentence with the input intention as a target sentence, and prompting the non-on-screen content in the target sentence as a first candidate.
In this embodiment, the execution main body may obtain, in real time, content, such as a code string, a voice, and the like, input by the user through various input manners, and may detect, in real time, whether the user has an input intention for any sentence in the first thesaurus based on the content input by the user. When it is detected that the user has an input intention for any sentence in the first thesaurus, the execution subject may prompt the sentence in which the user has the input intention as a target sentence and non-on-screen content in the target sentence as a candidate (which may be referred to as a first candidate).
Specifically, the execution main body may detect whether the user has an input intention for a sentence in the first thesaurus by matching the content input by the user with the sentence. For example, if the encoded character string input by the user can correspond to a plurality of consecutive characters at the head of a sentence in the first lexicon (the number of characters is not limited), it can be assumed that the user has the input intention of the sentence.
By way of example, FIG. 2 shows a schematic diagram of a sentence prompting process. As shown in fig. 2, the user first enters the pinyin string "zhege" (or "zg", "zhg", etc.), at which time the word "this" may be presented. After the user screens the word of the candidate item 'this', the pinyin character 'k' is continuously input, and at this time, the content 'this' and 'k' input by the user is matched with the first three characters in the sentence 'this seems simple' recorded in the first lexicon. Thus, the user can be considered to have an input intention of "this seems simple" to the sentence.
Then, the sentence "this seems simple," the content that has not yet been displayed "seems simple," can be prompted as a candidate. Therefore, in the input process of the user, the content of the next sentence is associated by using the input previous sentence, the associated content meets the personalized input habit of the user, and the input efficiency is improved.
In this embodiment, after the non-on-screen content in the target sentence is used as the first candidate item for prompting, if it is detected that the user performs the on-screen operation on the first candidate item, the target sentence may be on-screen, so that the input efficiency of the user is improved.
In some optional implementation manners of this embodiment, the execution main body may further splice the content that is already displayed and the content that is not already displayed, and perform differentiated display. Continuing with the above example, the target sentence is "this seems simple," and after the user has screened the word "this," the pinyin character "k" continues to be entered. At this time, "this" and "are simply seen," spliced to the target sentence "this is simply seen," and the spliced sentence is presented in the candidate frame. Wherein, the ' and ' in the spliced sentence are simple to look ' and can be displayed in different styles. The difference between the two different styles can be embodied in terms of color, font size, etc. Thus, a complete sentence prediction experience can be brought to the user.
When the user clicks "this seems simple" in the candidate box, since the already-screened content "this" is already contained in the input box, only the "simple-looking" can be screened, thereby causing the target sentence "this seems simple" to be presented in the input box. In addition, when the user clicks "this seems simple", the already-displayed content "this" in the input box may also be directly replaced with "this seems simple". The target sentence "this seems simple" is presented in the input box.
According to the input method provided by the embodiment of the application, the sentences meeting the preset conditions are selected from the historical input contents of the user, then the selected sentences are stored in the first word stock, so that when the situation that the user has an input intention for any sentence in the first word stock is detected, the sentence with the input intention is used as a target sentence, and the content which is not displayed on the screen in the target sentence is used as a first candidate item to be prompted. Therefore, when sentences need to be input, the sentences which need to be input by the user can be automatically detected, the user does not need to input words one by one, and the input efficiency is improved.
With further reference to fig. 3, a flow 200 of yet another embodiment of an input method is shown. The process 300 of the input method includes the following steps:
in step 301, a sentence satisfying a preset condition is selected from the historical input content of the user.
Step 302, store the selected sentence in the first lexicon.
Steps 301 to 302 in this embodiment can refer to steps 101 to 102 in the embodiment shown in fig. 1, and are not described herein again.
Step 303, determining the context between the selected sentences, taking every two sentences with the context as a binary group, and storing the binary group in the second lexicon.
In this embodiment, the execution subject of the input method may analyze the historical input content to determine the context of the sentence. In practice, sentences before and after some punctuation marks (such as commas, ") are sentences with context. For example, a piece of input content of the user is "this seems simple and is complicated to implement. ". The sentence "this seems simple" before the comma and "the sentence after the comma" is complicated to implement. "has a contextual relationship. The sentence "is complex to implement. The "is the sentence" is a seemingly simple "following sentence.
In addition, the continuous pieces of content input by the user in multiple times can also be considered to have a contextual relationship. For example, the user first enters "off duty" to send to the peer user. Then inputting 'which people eat' and continuously sending to the opposite-end user. At this time, the sentence "out of work" can be considered to have a contextual relation with the sentence "which people go to eat".
In this embodiment, after determining the context between the selected sentences, each two sentences having the context may be regarded as a binary group, and the binary groups may be stored in the second thesaurus. The second thesaurus may be a binary thesaurus. The structure of the binary word stock can be realized by a word search tree or a multi-level index. In practice, if sentence a has a context relationship with sentence B, and sentence B is a lower sentence of sentence a, it can be represented as a- > B.
Optionally, since different users have different input habits, the second lexicon may be a personalized user binary lexicon, so that sentences input by the user habits can be recorded.
And 304, when detecting that the user has an input intention for any sentence in the first lexicon, taking the sentence with the input intention as a target sentence, and prompting the non-on-screen content in the target sentence as a first candidate item.
Step 304 in this embodiment can refer to step 103 in the embodiment shown in fig. 1, and is not described here again.
And 305, after detecting that the user performs screen-up operation on the first candidate item, selecting a following sentence of the target sentence from the second word bank, and prompting the following sentence as a second candidate item.
In this embodiment, since the second lexicon records the sentences having the context relationship, when it is detected that the user performs the screen-up operation on the first candidate, not only the first candidate may be subjected to screen-up, but also the following sentence of the target sentence may be selected from the second lexicon, and the following sentence may be prompted as a candidate (may be referred to as a second candidate). Therefore, the following sentence can be automatically associated and prompted under the condition of screen display or input of a certain sentence, namely, the content of the next sentence is associated by using the input previous sentence, and the input efficiency is improved. Meanwhile, the associated following sentences are obtained by statistics in the historical input of the user, so that the personalized input habit of the user is still met.
It should be noted that, if the following sentences of at least two target sentences are recorded in the second lexicon, some of the following sentences may be selected from the second lexicon to be prompted, and each of the following sentences may also be prompted, which is not limited in this embodiment.
In some optional implementation manners of this embodiment, the executing entity may further count the frequency of each sentence in the first thesaurus appearing in the history input content, and store the frequency of each sentence in the first thesaurus. In addition, the frequency of each binary group appearing in the historical input content can be counted, and the frequency of each binary group is stored in the second word bank.
Based on this, in some optional implementations of the present embodiment, the execution subject may select the following sentence of the target sentence from the second lexicon by:
in the first step, the frequency of the target sentence is inquired from the first word stock.
And secondly, inquiring candidate binary groups taking the target sentence as the upper sentence from the second word bank, and reading the frequency of each candidate binary group.
And thirdly, taking another sentence except the target sentence in each candidate binary group as a candidate sentence, and determining the conditional probability of each candidate sentence based on the frequency of the target sentence and the frequency of each candidate binary group.
Wherein, the conditional probability refers to the occurrence probability of an event under the condition that another event has occurred. Thus, the conditional probability of each candidate sentence is the probability that the candidate sentence is displayed as the next sentence when the target sentence is displayed as the previous sentence. For example, if the target sentence is denoted as a and the following sentence of the target sentence is denoted as B, the conditional probability may be denoted as P (B | a), P (B | a) ═ P (ab)/P (a). Where P (AB) is the probability of a doublet of A and B. P (A) is the probability of A. P (AB) may be read from the second thesaurus, and P (A) may be read from the first thesaurus.
And fourthly, selecting the following sentences of the target sentence from the candidate sentences based on the conditional probability of each candidate sentence. In practice, a preset number (e.g., 1 or 2) of candidate sentences may be selected as the following sentences in the descending order of the conditional probability. Alternatively, the candidate sentence with the highest conditional probability may be directly selected as the following sentence.
And selecting the following sentence by calculating the conditional probability of each candidate probability, wherein the prompted following sentence is more in line with the input habit of the user.
In some optional implementation manners of this embodiment, after the following sentence is used as the second candidate item to be prompted, if the execution main body detects that the user performs the screen-up operation on the second candidate item, the execution main body may perform the screen-up operation on the second candidate item, so that the user does not need to input a subsequent sentence, and the input efficiency of the user is further improved.
In some optional implementations of this embodiment, after the following sentence is used as the second candidate item to be prompted, if it is not detected that the user performs a screen-up operation on the second candidate item (for example, performs a screen-up operation on another candidate item, or directly inputs another content), it may be detected whether the user has an input intention on the following sentence. Upon detecting that the user has an input intent for the contextual sentence, the contextual sentence may be prompted as a second candidate. For the detection manner of the input intention, see the detection manner of the input intention of any sentence in the first lexicon in step 103 in the corresponding embodiment of fig. 1.
In some optional implementations of the embodiment, the executing body may detect whether the user has an input intention for a following sentence according to the following steps: firstly, the code character string of the user is acquired in real time. And if the code character string corresponds to at least one character at the head end of the following sentence, determining that the user has the input intention of the following sentence.
By way of example, FIG. 4 shows yet another schematic diagram of a sentence prompting process. As shown in fig. 4, after the sentence "this looks simple" is on the screen, the user inputs the code string "sh". The encoded string "sh" can be complex to implement with the following sentence ". The first character "real" in "corresponds, i.e. the first two characters of the code of the first character" real "are also" sh ". Thus, it may be determined that the user has "complexity to implement" for the following sentence. "is intended to be inputted.
According to the method provided by the embodiment of the application, after a certain sentence is displayed on the screen of the user, the following sentence of the sentence is automatically searched, so that the user does not need to input a subsequent sentence, the input efficiency of the user is further improved, and the prompted following sentence is obtained by analyzing the context relation based on the historical input content of the user, and therefore the input habit of the user is met.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present application provides an embodiment of an input device, which corresponds to the embodiment of the method shown in fig. 1, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the input device 500 according to the present embodiment includes: a selecting unit 501 configured to select a sentence satisfying a preset condition from the history input contents of the user; a first storing unit 502 configured to store the selected sentence in a first lexicon; a first prompting unit 503 configured to, when it is detected that the user has an input intention for any sentence in the first thesaurus, take the sentence with the input intention as a target sentence, and prompt non-on-screen content in the target sentence as a first candidate.
In some optional implementations of this embodiment, the apparatus further includes: a second storing unit configured to determine a context between the selected sentences, regard each two sentences having the context as a binary group, and store the binary groups in a second lexicon; and the second prompting unit is configured to select a following sentence of the target sentence from the second word stock and prompt the following sentence as a second candidate after detecting that the user performs a screen-up operation on the first candidate.
In some optional implementations of this embodiment, the apparatus further includes: a first statistic unit configured to count the frequency of occurrence of each sentence in the first lexicon in the historical input content, and store the frequency of each sentence in the first lexicon; and the second counting unit is configured to count the frequency of each two-tuple appearing in the historical input content and store the frequency of each two-tuple in the second word bank.
In some optional implementations of this embodiment, the second prompting unit is further configured to: inquiring the frequency of the target sentence from the first word stock; searching the candidate binary group with the target sentence as the upper sentence from the second word bank, and reading the frequency of each candidate binary group; taking another sentence except the target sentence in each candidate binary group as a candidate sentence, and determining the conditional probability of each candidate sentence based on the frequency of the target sentence and the frequency of each candidate binary group; and selecting the following sentence of the target sentence from the candidate sentences based on the conditional probability of each candidate sentence.
In some optional implementations of this embodiment, the apparatus further includes: a detection unit configured to detect whether the user has an input intention for the following sentence if it is not detected that the user performs an on-screen operation on the second candidate item; and when detecting that the user has the input intention of the following sentence, prompting the following sentence as a second candidate item.
In some optional implementations of this embodiment, the detecting unit is further configured to obtain, in real time, a code string of the user; and if the code character string corresponds to at least one character at the head end of the following sentence, determining that the user has the input intention of the following sentence.
In some optional implementations of the embodiment, each sentence recorded in the first thesaurus includes a punctuation mark.
In the apparatus provided in the above embodiment of the present application, sentences meeting preset conditions are selected from historical input contents of a user, and then the selected sentences are stored in the first lexicon, so that when it is detected that the user has an input intention for any sentence in the first lexicon, the sentence with the input intention is used as a target sentence, and further, non-on-screen contents in the target sentence are used as first candidate items to be prompted. Therefore, when sentences need to be input, the sentences which need to be input by the user can be automatically detected, the user does not need to input words one by one, and the input efficiency is improved.
Fig. 6 is a block diagram illustrating an apparatus 600 for inputting according to an exemplary embodiment, where the apparatus 600 may be an intelligent terminal or a server. For example, the apparatus 600 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. 6, apparatus 600 may include one or more of the following components: processing component 602, memory 604, power component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor component 614, and communication component 616.
The processing component 602 generally controls overall operation of the device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the apparatus 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply component 606 provides power to the various components of device 600. The power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 600.
The multimedia component 608 includes a screen that provides an output interface between the device 600 and a user as described above. 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 the touch or slide action but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 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 device 600 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, audio component 610 includes a Microphone (MIC) configured to receive external audio signals when apparatus 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 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 component 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor component 614 may detect an open/closed state of the device 600, the relative positioning of components, such as a display and keypad of the apparatus 600, the sensor component 614 may also detect a change in position of the apparatus 600 or a component of the apparatus 600, the presence or absence of user contact with the apparatus 600, orientation or acceleration/deceleration of the apparatus 600, and a change in temperature of the apparatus 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 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 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the apparatus 600 and other devices in a wired or wireless manner. The apparatus 600 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 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 604 comprising instructions, executable by the processor 620 of the apparatus 600 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.
Fig. 7 is a schematic diagram of a server in some embodiments of the present application. The server 700 may vary significantly depending on configuration or performance, and may include one or more Central Processing Units (CPUs) 722 (e.g., one or more processors) and memory 732, one or more storage media 730 (e.g., one or more mass storage devices) storing applications 742 or data 744. Memory 732 and storage medium 730 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 730 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Further, the central processor 722 may be configured to communicate with the storage medium 730, and execute a series of instruction operations in the storage medium 730 on the server 700.
The server 700 may also include one or more power supplies 726, one or more wired or wireless network interfaces 750, one or more input-output interfaces 758, one or more keyboards 756, and/or one or more operating systems 741, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of an apparatus (smart terminal or server), enable the apparatus to perform an input method, the method comprising: selecting sentences meeting preset conditions from historical input contents of a user; storing the selected sentences into a first word stock; when detecting that the user has an input intention for any sentence in the first word stock, taking the sentence with the input intention as a target sentence, and prompting the non-on-screen content in the target sentence as a first candidate item.
Optionally, the device being configured to execute the one or more programs by the one or more processors includes instructions for: determining the context relationship between the selected sentences, taking every two sentences with the context relationship as a binary group, and storing the binary groups into a second word bank; and after detecting that the user performs screen-up operation on the first candidate item, selecting a following sentence of the target sentence from the second lexicon, and prompting the following sentence as a second candidate item.
Optionally, the device being configured to execute the one or more programs by the one or more processors includes instructions for: counting the frequency of each sentence in the first word bank in the historical input content, and storing the frequency of each sentence in the first word bank; and counting the frequency of each two-tuple appearing in the historical input content, and storing the frequency of each two-tuple in the second lexicon.
Optionally, the selecting a following sentence of the target sentence from the second lexicon includes: inquiring the frequency of the target sentence from the first word bank; querying candidate binary groups with the target sentence as the upper sentence from the second word bank, and reading the frequency of each candidate binary group; taking another sentence except the target sentence in each candidate binary group as a candidate sentence, and determining the conditional probability of each candidate sentence based on the frequency of the target sentence and the frequency of each candidate binary group; selecting a following sentence of the target sentence from the candidate sentences based on the conditional probability of each candidate sentence.
Optionally, the device being configured to execute the one or more programs by the one or more processors includes instructions for: if the fact that the user performs screen-up operation on the second candidate item is not detected, whether the user has input intention on the following sentence is detected; when it is detected that the user has an input intention for the following sentence, prompting the following sentence as a second candidate.
Optionally, the detecting whether the user has an input intention for the following sentence includes: acquiring the coded character string of the user in real time; and if the code character string corresponds to at least one character at the head end of the following sentence, determining that the user has the input intention of the following sentence.
Optionally, each sentence recorded in the first thesaurus includes a punctuation mark.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.
The present application provides an input method, an input device and an input device, and the principles and embodiments of the present application are described herein using specific examples, and the descriptions of the above examples are only used to help understand the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, 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 application.

Claims (10)

1. An input method, characterized in that the method comprises:
selecting sentences meeting preset conditions from historical input contents of a user;
storing the selected sentences into a first word stock;
when detecting that the user has an input intention for any sentence in the first word stock, taking the sentence with the input intention as a target sentence, and prompting the non-on-screen content in the target sentence as a first candidate item.
2. The method of claim 1, wherein after selecting a sentence satisfying a preset condition from the user's historical input content, the method further comprises:
determining the context relationship between the selected sentences, taking every two sentences with the context relationship as a binary group, and storing the binary groups into a second word bank;
and after prompting by taking the non-on-screen content in the target sentence as a first candidate item, the method further comprises the following steps:
and after detecting that the user performs screen-up operation on the first candidate item, selecting a following sentence of the target sentence from the second lexicon, and prompting the following sentence as a second candidate item.
3. The method of claim 2, further comprising:
counting the frequency of each sentence in the first word bank in the historical input content, and storing the frequency of each sentence in the first word bank;
and counting the frequency of each two-tuple appearing in the historical input content, and storing the frequency of each two-tuple in the second lexicon.
4. The method of claim 3, wherein said selecting a following sentence of said target sentence from said second lexicon comprises:
inquiring the frequency of the target sentence from the first word bank;
querying candidate binary groups with the target sentence as the upper sentence from the second word bank, and reading the frequency of each candidate binary group;
taking another sentence except the target sentence in each candidate binary group as a candidate sentence, and determining the conditional probability of each candidate sentence based on the frequency of the target sentence and the frequency of each candidate binary group;
selecting a following sentence of the target sentence from the candidate sentences based on the conditional probability of each candidate sentence.
5. The method of claim 2, wherein after hinting the following sentence as a second candidate, the method further comprises:
if the fact that the user performs screen-up operation on the second candidate item is not detected, whether the user has input intention on the following sentence is detected;
when it is detected that the user has an input intention for the following sentence, prompting the following sentence as a second candidate.
6. The method of claim 5, wherein the detecting whether the user has an input intent for the following sentence comprises:
acquiring the coded character string of the user in real time;
and if the code character string corresponds to at least one character at the head end of the following sentence, determining that the user has the input intention of the following sentence.
7. The method of claim 1, wherein each sentence recorded in the first thesaurus comprises a punctuation mark.
8. An input device, the device comprising:
a selecting unit configured to select a sentence satisfying a preset condition from a history input content of a user;
a first storing unit configured to store the selected sentence in a first lexicon;
the first prompting unit is configured to, when detecting that the user has an input intention for any sentence in the first word stock, regard the sentence with the input intention as a target sentence, and prompt the non-on-screen content in the target sentence as a first candidate.
9. An apparatus for input, 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 the one or more processors, the one or more programs comprising instructions for:
selecting sentences meeting preset conditions from historical input contents of a user;
storing the selected sentences into a first word stock;
when detecting that the user has an input intention for any sentence in the first word stock, taking the sentence with the input intention as a target sentence, and prompting the non-on-screen content in the target sentence as a first candidate item.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202010432859.5A 2020-05-20 2020-05-20 Input method, input device and input device Pending CN113703588A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010432859.5A CN113703588A (en) 2020-05-20 2020-05-20 Input method, input device and input device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010432859.5A CN113703588A (en) 2020-05-20 2020-05-20 Input method, input device and input device

Publications (1)

Publication Number Publication Date
CN113703588A true CN113703588A (en) 2021-11-26

Family

ID=78645730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010432859.5A Pending CN113703588A (en) 2020-05-20 2020-05-20 Input method, input device and input device

Country Status (1)

Country Link
CN (1) CN113703588A (en)

Similar Documents

Publication Publication Date Title
CN107688399B (en) Input method and device and input device
CN107918496B (en) Input error correction method and device for input error correction
CN108304412B (en) Cross-language search method and device for cross-language search
CN107564526B (en) Processing method, apparatus and machine-readable medium
CN109471919B (en) Zero pronoun resolution method and device
CN107424612B (en) Processing method, apparatus and machine-readable medium
CN113936697B (en) Voice processing method and device for voice processing
CN112948565A (en) Man-machine conversation method, device, electronic equipment and storage medium
CN110795014B (en) Data processing method and device and data processing device
CN109144286B (en) Input method and device
CN113703588A (en) Input method, input device and input device
CN113407099A (en) Input method, device and machine readable medium
CN111103986A (en) User word stock management method and device and input method and device
CN108227952B (en) Method and system for generating custom word and device for generating custom word
CN112181163A (en) Input method, input device and input device
CN110716653B (en) Method and device for determining association source
CN112083811B (en) Candidate item display method and device
CN114442816A (en) Association prefetching method and device for association prefetching
CN115543099A (en) Input method, device and device for input
CN112306251A (en) Input method, input device and input device
CN115878829A (en) Input method, input device and input device
CN113805707A (en) Input method, input device and input device
CN115509371A (en) Key identification method and device for identifying keys
CN113885714A (en) Input method, apparatus and medium
CN113807082A (en) Target user determination method and device for determining target user

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