Input method, device and device for input
By obtaining the above information of the input string and adjusting the candidate word sequence, the problem that the candidate word display order does not match the user's intention in the prior art is solved, and higher input efficiency and accuracy are achieved.
Patent Information
- Application Number
- CN202110542553.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-18
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-05-18
AI Technical Summary
In the prior art, the display order of candidate words matches the user's intentions, which affects input efficiency and accuracy.
By obtaining the candidate word sequence corresponding to the current input string and obtaining the above information of the input string, the order of candidate words in the candidate word sequence is adjusted based on the above information, thereby improving the matching degree between the display order of candidate words and the user's intention.
By combining the above information of the input string to sort candidate words, a more accurate candidate words can be obtained in the context scenario, which improves the matching of the display order of candidate words with user intentions, and enhances input efficiency and accuracy.
Smart Images

Figure CN115373523B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to an input method, device, and a device for input. Background Art
[0002] With the development of computer technology, the word base of input method applications is becoming more and more abundant. The candidate column of the input method interface can display multiple candidate words for users to choose from.
[0003] In the prior art, after a user inputs a certain input string, the candidate words are usually arranged in an order based on their own frequency or historical screen frequency. This sorting method takes into account a relatively one-sided factor, resulting in the order in which the candidate words are displayed often failing to match the user's intention. Summary of the invention
[0004] The embodiments of the present application propose an input method, a device, and a device for input to solve the technical problem in the prior art that the display order of candidate words has a low degree of matching with user intention.
[0005] In a first aspect, an embodiment of the present application provides an input method, the method comprising: obtaining a candidate word sequence corresponding to a current input string; obtaining context information of the input string, and adjusting the order of candidate words in the candidate word sequence based on the context information; and based on the adjusted order, selecting at least one candidate word from the candidate word sequence for display.
[0006] In a second aspect, an embodiment of the present application provides an input device, comprising: an acquisition unit, configured to acquire a candidate word sequence corresponding to a current input string; a reordering unit, configured to acquire context information of the input string and adjust the order of candidate words in the candidate word sequence based on the context information; and a display unit, configured to select at least one candidate word from the candidate word sequence for display based on the adjusted order.
[0007] In a third aspect, an embodiment of the present application provides a device for input, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations: obtaining a candidate word sequence corresponding to a current input string; obtaining context information of the input string, and adjusting the order of candidate words in the candidate word sequence based on the context information; and selecting at least one candidate word from the candidate word sequence for display based on the adjusted order.
[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.
[0009] The input method, device and device for input provided by the embodiments of the present application obtain the candidate word sequence corresponding to the current input string, as well as the context information of the above-mentioned input string, and adjust the order of the candidate words in the candidate word sequence based on the context information, thereby selecting at least one candidate word from the candidate word sequence for display based on the adjusted order. Thus, the order of the candidate words in the candidate word sequence can be adjusted according to the context information of the input string, not only considering the candidate words themselves, but also combining the context information, so that a more accurate candidate word arrangement order can be obtained in the context scenario, which improves the matching degree between the display order of the candidate words and the user's intention. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0011] Figure 1 is a flow chart of an embodiment of an input method according to the present application;
[0012] Figure 2 is a flow chart of another embodiment of the input method according to the present application;
[0013] Figure 3 is a schematic structural diagram of an embodiment of an input device according to the present application;
[0014] Figure 4 is a schematic structural diagram of a device for input according to the present application;
[0015] Figure 5 It is a schematic diagram of the structure of the server in some embodiments of the present application. DETAILED DESCRIPTION
[0016] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0017] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0018] Please refer to Figure 1, which shows a process 100 of an embodiment of the input method according to the present application. The above input method can be run on various electronic devices, including but not limited to: servers, smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, car computers, desktop computers, set-top boxes, smart TVs, wearable devices, etc.
[0019] The input method application mentioned in the embodiment of the present application can support multiple input methods. Among them, the input method can be a coding method used to input various symbols into electronic devices such as computers and mobile phones. Users can use the input method application to conveniently input the required characters or strings into electronic devices. It should be noted that in the embodiment of the present application, in addition to supporting common Chinese input methods (such as pinyin input method, Wubi input method, Zhuyin input method, voice input method, handwriting input method, etc.), the input method can also support input methods of other languages (such as English input method, Japanese Hiragana input method, Korean input method, etc.), and no limitation is made on the input method and the language type of the input method.
[0020] The input method in this embodiment may include the following steps:
[0021] Step 101, obtaining a candidate word sequence corresponding to the current input string.
[0022] In this embodiment, the execution subject of the input method (such as the above-mentioned electronic device) can receive the input string currently input by the user in real time, and retrieve the candidate words of the input string from the word library (such as one or more word libraries such as the system word library, the user word library, and the cloud word library). Then, the retrieved candidate words can be sorted in a conventional manner to obtain a candidate word sequence. As an example, the user inputs the pinyin string "zuowei", and the candidate words in the candidate word sequence can be "zuowei", "zuowei", "zuowei", "zuowei", etc.
[0023] Here, the sorting method adopted for the candidate word sequence may include but is limited to at least one of the following: sorting by the frequency of the candidate words, sorting by the number of times the user has historically screened the candidate words, sorting by a combination of the frequency of the candidate words and the number of times the user has historically screened the candidate words, etc.
[0024] Here, the user can adopt any input method, such as encoding, voice, handwriting, etc. to input in the input method interface, which is not limited here. When inputting in the encoding method, it can include but is not limited to forms such as pinyin, Wubi, etc. Taking pinyin input as an example, the user can specifically adopt any one of multiple methods such as full pinyin, simple pinyin, and last-character simple pinyin for input.
[0025] Step 102: Obtain the context information of the input string, and adjust the order of the candidate words in the candidate word sequence based on the context information.
[0026] In this embodiment, the above-mentioned execution entity can first obtain the context information of the input string. The context information can be the content that was last put on the screen. For example, after the user puts "你" on the screen and inputs the pinyin string "hao". Then the current input string is "hao", and the context information of the current input string is "你".
[0027] After obtaining the context information, the above-mentioned execution entity can adjust the order of the candidate words in the candidate word sequence based on the context information. Here, the order of the current candidate words in the same historical input scenario (i.e., the same context information and the same input string) can be determined by statistically analyzing the historical input data of all users or users with similar characteristics to see if they are often put on the screen. For a certain candidate word, if the word is often put on the screen, the order of the candidate word can be moved forward to update the order of the candidate words in the candidate word sequence.
[0028] It can be understood that the original order of the candidate word sequence only considers the information of the candidate words themselves, such as sorting only according to the word frequency of the candidate words, or only according to the historical screen display times of the candidate words by the user, or sorting by combining the above two factors, etc. But this sorting result does not consider the context information. For example, the user has a relatively high historical screen display times for the character "郝". Therefore, regardless of whether there is no context (i.e., no context information) or there is context information, as long as the input string "hao" is input, the first candidate word is "郝". However, if the user intends to input "你好", after putting "你" on the screen and inputting "hao", if the first word is "郝", it not only violates the user's intention but also interferes with the user's input efficiency. Thus, by combining the context information to adjust the order of the candidate words in the candidate word sequence, this situation can be avoided, and the display order of the candidate words can better match the user's input intention.
[0029] In some alternative implementations, a common word library can be pre-established based on historical input data. Among them, common words can be determined in advance by statistical methods. For example, they can be determined based on one or more of word frequency, user demand probability, and word length. In the above example, the word "你好" is frequently used in various input scenarios, its word length meets the preset conditions, and the user demand probability is greater than a certain threshold, so this word can be used as a common word. While "你郝" is not frequently used in various input scenarios, so it is not used as a common word.
[0030] Under normal circumstances, the probability of a common word being selected for input by the user is greater than that of an uncommon word. Therefore, in the above example, the order of the character "好" in the candidate word sequence should be more forward than the order of the character "郝". Thus, based on the pre-established common word library, when it is determined that the current candidate word and the previous information form a common word, the candidate word sequence can be reordered based on this common word. The operation of reordering candidate words based on common words can be performed according to the following sub-steps S11 to S13:
[0031] Sub-step S11: Based on the pre-generated common word library, determine the target candidate word in the candidate word sequence that forms a common word with the previous information.
[0032] Here, the common word library can be obtained by statistically analyzing the historical input data of all users or a specific user set. For example, common words can be determined in advance based on the statistical information of words, so as to generate a common word library. The statistical information can include but is not limited to at least one of the following: word frequency, user demand probability, and word length. The above execution entity can splice the previous information with the candidate word, and perform string matching between the spliced word and the words in the common word library to determine the target candidate word in the candidate word sequence that forms a common word with the previous information.
[0033] Optionally, the common word library can be generated through the following steps:
[0034] The first step: Determine the candidate common words whose word frequency and word length meet the preset conditions. Among them, the preset conditions can be set as the word frequency being greater than a certain preset value and the word length being 2 or 3, etc., which are not specifically limited here.
[0035] The second step: Based on the historical input strings and historical previous information corresponding to each candidate common word, statistically analyze the user demand probability of each candidate common word in different input scenarios.
[0036] The input scenarios can be divided based on at least one of the following: word segmentation method, keyboard type, and input method. For example, each combination of word segmentation method, input method, and keyboard type can correspond to an input scenario. The above-mentioned word segmentation methods can include, but are not limited to, single-character segmentation, multi-character segmentation, etc. The above-mentioned input methods can include, but are not limited to, full spelling, simplified spelling, last-character simplified spelling, etc. The above-mentioned keyboard types can include, but are not limited to, 9-key keyboards, 26-key keyboards, etc.
[0037] In some examples, the input scenario can be determined based on both the word segmentation method (such as whether to input words in segmented form) and the input method (such as full spelling, simplified spelling, last-character simplified spelling, etc.). Based on the historical input string and historical context information, the word segmentation method and input method can be known, and thus the input scenario can be known.
[0038] In other examples, on the basis of the historical input string and historical context information, the keyboard type can be further combined to further subdivide the input scenario. For example, for the candidate common word "你好" (Hello), if a user enters the full spelling "nihao" on a 26-key keyboard, it can be regarded as an input scenario. If a user enters the simplified spelling "NH" on a 9-key keyboard, it can be regarded as another input scenario. If a user first screens "你" on a 26-key keyboard and then enters the full spelling "hao", it can be regarded as yet another input scenario.
[0039] Here, for each candidate common word, the user demand probability of the candidate common word in a certain input scenario can refer to the probability that the user screens the candidate common word in this input scenario. Specifically, it can be the ratio of the number of times the candidate common word is screened in this scenario to the total number of times all candidate words are screened in this scenario.
[0040] In some examples, when determining the user demand probabilities of each candidate common word in different input scenarios, each candidate common word can be used as the target word in turn and the following steps can be executed: First, based on the historical input string and historical context information of the target word, at least one input scenario of the target word is determined. Then, for each input scenario in the above-mentioned at least one input scenario, based on the number of times the target word is screened in this input scenario and the total number of screenings corresponding to this input scenario, the user demand probability of the target word in this input scenario is determined. Specifically, the ratio of the number of times the target word is screened in this input scenario to the total number of screenings corresponding to this input scenario (the total number of times all candidate words are screened in this scenario) can be used as the user demand probability of the target word in this input scenario.
[0041] Thirdly, based on the user demand probabilities, the candidate common words are screened to obtain a common word library. Here, the candidate common words can be screened according to pre-set rules.
[0042] As an example, candidate common words with a user demand probability greater than a preset value may be classified into a common word database.
[0043] As another example, the historical input string corresponding to each candidate common word can be obtained first. Then, for each historical input string obtained, the historical input scene corresponding to the historical input string is determined, and according to the number of candidate common words (which can be called hit words) hit by the historical input string and the historical input scene, a decision is made in a variety of situations. The details are as follows:
[0044] For each historical input string obtained, if the historical input string only hits one candidate common word (i.e., there is only one hit word), and in the historical input scenario corresponding to the historical input string, the user demand probability of the hit word is greater than a first preset value (such as 99%), then the hit word can be included in the common word library.
[0045] For each historical input string obtained, if the historical input string has only one hit word, and in the historical input scenario corresponding to the historical input string, the user demand probability of the hit word is greater than the second preset value (such as 50%), and at the same time, the user demand probability of the hit word in the historical input scenario is greater than the input scenario probability, then the hit word can be included in the common word database. Among them, the input scenario probability of the hit word in a certain historical input scenario can refer to the ratio of the number of times the hit word appears on the screen in the historical input scenario to the number of times the hit word appears on the screen in all corresponding input scenarios.
[0046] For each historical input string obtained, if the historical input string has at least two hit words, the first two hit words are selected in order of user demand probability from large to small. If the following three conditions are met at the same time, the hit word corresponding to the historical input string is deleted (that is, it is not used as the final common word and is not included in the common word library). If the following three conditions are not met at the same time, the two selected hit words can be included in the common word library. Condition 1: The user demand probability of the preferred hit word in the historical input scenario corresponding to the historical input string is less than the third preset value (such as 50%); Condition 2: The user demand probability of the preferred hit word in the historical input scenario corresponding to the historical input string is less than the input scenario probability; Condition 3: The sum of the user demand probabilities of the two selected hit words in the historical input scenario corresponding to the historical input string is less than the sum of the input scenario probabilities.
[0047] It should be pointed out that based on the user demand probability, other methods can also be used to screen the candidate common words, which will not be described here one by one.
[0048] Sub-step S12, based on the input string and the above information, determine the current input scenario. The method of determining the current input scenario can be found in the description of the common word word library generation step, which will not be repeated here.
[0049] Sub-step S13, based on the user demand probability of the common words corresponding to the target candidate words in the current input scenario, adjust the order of the target candidate words in the candidate word sequence. The user demand probability can be obtained in advance, and its calculation method can be referred to the description in the common word word library generation step, which will not be repeated here.
[0050] Here, the common word corresponding to the target candidate word is the common word formed by the target candidate word and the above information. Based on the user demand probability of the common word corresponding to the target candidate word in the current input scenario, the order of the target candidate word in the candidate word sequence can be adjusted in a variety of ways to achieve the adjustment of the order of the candidate words in the candidate word sequence.
[0051] As an example, the execution subject can determine the size of the order difference of the target candidate word moving forward based on the size of the user demand probability of the common word corresponding to the target candidate word in the current input scene. The larger the user demand probability, the larger the order difference of the target candidate word moving forward. The relationship between the user demand probability and the order difference of moving forward can be preset to adjust the order of common words.
[0052] As another example, each candidate word in the original candidate word sequence can have a score. The above-mentioned execution subject can first obtain the score of each candidate word in the candidate word sequence. Then, based on the user demand probability of the common words corresponding to the target candidate words in the current input scene, determine the priority of the target candidate words. Among them, the priority of the target candidate words can be the priority of the common words corresponding to it (i.e. the common words composed of the target candidate words and the above information) in the current input scene, and the priority of the common words in each input scene can be pre-set according to the size of the user demand probability of the common words in each input scene, and can also be set in combination with other factors at the same time, which is not limited here. After obtaining the priority of the target candidate words, the above-mentioned execution subject can update the score of the target candidate words based on the priority. In practice, if the score is smaller and the ranking is closer to the front, the score of the target candidate words can be reduced, so that the ranking of the target candidate words is moved forward. Specifically, the higher the priority, the more the score is reduced, so that the lower the score, the closer the ranking. Thus, the order of the target candidate words in the candidate word sequence can be made more forward relative to the original order, so that the candidate words in the candidate word sequence after the order is adjusted can better match the user's input intention.
[0053] Step 103: Based on the adjusted order, at least one candidate word is selected from the candidate word sequence for display.
[0054] In this embodiment, the execution subject selects at least one candidate word from the candidate word sequence for display based on the adjusted order. The number of candidate words displayed and the display style can be set as needed and are not specifically limited here.
[0055] The method provided by the above-mentioned embodiment of the present application obtains the candidate word sequence corresponding to the current input string, and then obtains the context information of the above-mentioned input string, and adjusts the order of the candidate words in the candidate word sequence based on the context information, thereby selecting at least one candidate word from the candidate word sequence for display based on the adjusted order. Thus, the order of the candidate words in the candidate word sequence can be adjusted according to the context information of the input string, not only considering the candidate words themselves, but also combining the context information, so that a more accurate candidate word arrangement order can be obtained in the context scenario, which improves the matching degree between the display order of the candidate words and the user's intention.
[0056] Further references Figure 2 , which shows a process 200 of another embodiment of an input method. The process 200 of the input method includes the following steps:
[0057] Step 201, obtaining a candidate word sequence corresponding to the current input string.
[0058] Step 201 in this embodiment can be found in Figure 1 The step 101 of the corresponding embodiment will not be described in detail here.
[0059] Step 202, obtaining context information of the input string.
[0060] Step 202 in this embodiment can be found in Figure 1 The step 102 of the corresponding embodiment will not be described in detail here.
[0061] Step 203: Determine the user behavior characteristics based on the input string and the above information.
[0062] In this embodiment, the execution subject of the input method can determine the user behavior characteristics based on the input string and the previous information. Here, the user behavior characteristics may include multiple pieces of information, such as but not limited to the input string, the previous information, the input time, etc. The user behavior characteristics may characterize the characteristics of the user's current input behavior.
[0063] Step 204: When the user behavior characteristics meet the preset reordering conditions, the order of the candidate words in the candidate word sequence is adjusted based on the above information.
[0064] In this embodiment, specific behavior characteristics may be stored in the above-mentioned execution subject. When the user behavior characteristics match the specific behavior characteristics, it can be considered that the user has an extreme preference for a certain word. At this time, it can be considered that the preset reordering condition is not met, and the subsequent steps of adjusting the order of candidate words in the candidate word sequence are no longer performed. Conversely, when the user behavior characteristics meet the preset reordering condition, the order of candidate words in the candidate word sequence can be adjusted based on the above information. The steps of adjusting the order of candidate words in the candidate word sequence based on the above information can be seen in Figure 1The step 102 of the corresponding embodiment will not be described in detail here.
[0065] As an example, in the historical input process, the user frequently inputs a fixed word, such as first displaying "you" on the screen, and then displaying "hao" on the screen by inputting the pinyin string "hao", the binary relationship between "you" and "hao" can be recorded, and this behavior feature can be recorded as a specific behavior feature. If the user displays "you" on the screen during this input process, and continues to input the pinyin string "hao", it is considered that the user's behavior feature matches the recorded feature, and it can be considered that the user has an extreme preference for inputting the word "youhao", so the subsequent steps of adjusting the order of candidate words in the candidate word sequence are no longer performed. Conversely, if the user's behavior feature does not match the recorded feature, the order of candidate words in the candidate word sequence can be adjusted based on the above information.
[0066] Step 205: Based on the adjusted order, at least one candidate word is selected from the candidate word sequence for display.
[0067] Step 205 in this embodiment can be found in Figure 1 The step 103 of the corresponding embodiment will not be described in detail here.
[0068] from Figure 2 It can be seen that Figure 1 Compared with the corresponding embodiment, the process 200 of the input method in this embodiment involves the step of determining whether to adjust the candidate words in the candidate word sequence based on the user behavior characteristics, thereby not performing the reordering when the reordering conditions are not met, thereby avoiding affecting the user's personalized input behavior due to the reordering.
[0069] Further references Figure 3 As an implementation of the methods shown in the above figures, the present application provides an embodiment of an input device, and the device embodiment is Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0070] like Figure 3 As shown, the input device 300 of the present embodiment includes: an acquisition unit 301, configured to acquire a candidate word sequence corresponding to a current input string; a reordering unit 302, configured to acquire context information of the input string, and adjust the order of the candidate words in the candidate word sequence based on the context information; and a display unit 303, configured to select at least one candidate word from the candidate word sequence for display based on the adjusted order.
[0071] In some optional implementations of the present embodiment, the above-mentioned reordering unit is further configured to: determine the user behavior characteristics based on the above-mentioned input string and the above-mentioned context information; when the above-mentioned user behavior characteristics meet the preset reordering conditions, adjust the order of the above-mentioned common words in the above-mentioned candidate word sequence based on the above-mentioned context information of the above-mentioned input string.
[0072] In some optional implementations of the present embodiment, the above-mentioned reordering unit is further configured to: determine the target candidate words in the above-mentioned candidate word sequence that constitute common words with the above-mentioned context information based on a pre-generated common word library; determine the current input scene based on the above-mentioned input string and the above-mentioned context information; and adjust the order of the above-mentioned target candidate words in the above-mentioned candidate word sequence based on the user demand probability of the common words corresponding to the above-mentioned target candidate words in the above-mentioned current input scene.
[0073] In some optional implementations of the present embodiment, the above-mentioned reordering unit is further configured to: obtain the score of each candidate word in the above-mentioned candidate word sequence; determine the priority of the above-mentioned target candidate word based on the user demand probability of the common word corresponding to the above-mentioned target candidate word in the above-mentioned current input scenario; based on the above-mentioned priority, update the score of the above-mentioned target candidate word; based on the updated score, adjust the order of the above-mentioned target candidate word in the above-mentioned candidate word sequence.
[0074] In some optional implementations of this embodiment, the common words in the common word database are determined based on statistical information of the words, and the statistical information includes at least one of the following: word frequency, user demand probability, and word length.
[0075] In some optional implementations of the present embodiment, the common word thesaurus is generated by the following steps: taking words whose frequency and length meet preset conditions as candidate common words, and counting the user demand probability of each candidate common word in different input scenarios based on the historical input strings and historical context information corresponding to each candidate common word; and screening the candidate common words based on the counted user demand probabilities to obtain a common word thesaurus.
[0076] In some optional implementations of this embodiment, the above-mentioned input scenarios are divided based on at least one of the following: word segmentation method, keyboard type, and input method; the above-mentioned input method includes at least one of the following: full spelling, abbreviated spelling, and last-character abbreviated spelling.
[0077] In some optional implementations of the present embodiment, the above-mentioned statistics on the user demand probability of each candidate common word in different input scenarios are based on the historical input string and historical contextual information corresponding to each candidate common word, including: taking each candidate common word as a target word, performing the following steps: determining at least one input scenario of the target word based on the historical input string and historical contextual information of the target word; for each of the at least one input scenario, determining the user demand probability of the target word in the input scenario based on the number of times the target word appears on the screen in the input scenario and the total number of times the target word appears on the screen corresponding to the input scenario.
[0078] The device provided by the above-mentioned embodiment of the present application obtains the candidate word sequence corresponding to the current input string, and then obtains the context information of the above-mentioned input string, and adjusts the order of the candidate words in the candidate word sequence based on the context information, thereby selecting at least one target candidate word from the candidate word sequence for display based on the adjusted order. Thus, the order of the candidate words in the candidate word sequence can be adjusted according to the context information of the input string, which not only considers the candidate words themselves, but also combines the context information, so that a more accurate candidate word arrangement order can be obtained in the context scenario, which improves the matching degree between the display order of the candidate words and the user's intention.
[0079] Figure 4 4 is a block diagram of an input device 400 according to an exemplary embodiment, and the device 400 may be a smart terminal or a server. For example, the device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0080] Reference Figure 4 , the device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0081] The processing component 402 generally controls the overall operation of the device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-described method. In addition, the processing component 402 may include one or more modules to facilitate interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
[0082] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, 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 disk or optical disk.
[0083] The power supply component 406 provides power to the various components of the device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 400.
[0084] The multimedia component 408 includes a screen that provides an output interface between the above-mentioned device 400 and the 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 can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The above-mentioned touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the above-mentioned touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0085] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the device 400 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0086] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as 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.
[0087] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of the components, such as the display and keypad of the device 400, the sensor assembly 414 can also detect the position change of the device 400 or a component of the device 400, the presence or absence of user contact with the device 400, the orientation or acceleration / deceleration of the device 400 and the temperature change of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0088] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 400 can 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 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0089] In an exemplary embodiment, the apparatus 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above method.
[0090] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of the device 400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0091] Figure 55 is a schematic diagram of the structure of the server in some embodiments of the present application. The server 500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 522 (for example, one or more processors) and a memory 532, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 542 or data 544. Among them, the memory 532 and the storage medium 530 can be short-term storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 522 can be configured to communicate with the storage medium 530 and execute a series of instruction operations in the storage medium 530 on the server 500.
[0092] The server 500 may also include one or more power supplies 526, one or more wired or wireless network interfaces 550, one or more input and output interfaces 558, one or more keyboards 556, and / or one or more operating systems 541, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0093] A non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a device (smart terminal or server), the device is able to execute an input method, which includes: obtaining a candidate word sequence corresponding to a current input string; obtaining context information of the input string, and adjusting the order of candidate words in the candidate word sequence based on the context information; and selecting at least one candidate word from the candidate word sequence for display based on the adjusted order.
[0094] Optionally, adjusting the order of candidate words in the candidate word sequence based on the above context information includes: determining user behavior characteristics based on the input string and the above context information; and adjusting the order of candidate words in the candidate word sequence based on the above context information when the user behavior characteristics meet preset reordering conditions.
[0095] Optionally, adjusting the order of candidate words in the candidate word sequence based on the above context information includes: determining target candidate words in the candidate word sequence that constitute common words with the above context information based on a pre-generated common word library; determining a current input scenario based on the input string and the above context information; and adjusting the order of the target candidate words in the candidate word sequence based on user demand probability of the common words corresponding to the target candidate words in the current input scenario.
[0096] Optionally, adjusting the order of the common words in the candidate word sequence based on the user demand probability includes: obtaining the score of each candidate word in the candidate word sequence; determining the priority of the target candidate word based on the user demand probability of the common words corresponding to the target candidate word in the current input scenario; updating the score of the target candidate word based on the priority; and adjusting the order of the target candidate word in the candidate word sequence based on the updated score.
[0097] Optionally, the common words in the common word database are determined based on statistical information of the words, and the statistical information includes at least one of the following: word frequency, user demand probability, and word length.
[0098] Optionally, the common word thesaurus is generated by the following steps: taking words whose frequency and length meet preset conditions as candidate common words, and based on the historical input strings and historical context information corresponding to each candidate common word, counting the user demand probability of each candidate common word in different input scenarios; based on the counted user demand probabilities, screening the candidate common words to obtain the common word thesaurus.
[0099] Optionally, the input scenario is divided based on at least one of the following: word segmentation method, keyboard type, input method; the input method includes at least one of the following: full spelling, abbreviated spelling, and last-character abbreviated spelling.
[0100] Optionally, based on the historical input strings and historical contextual information corresponding to each candidate common word, the user demand probability of each candidate common word in different input scenarios is counted, including: taking each candidate common word as a target word, and performing the following steps: based on the historical input string and historical contextual information of the target word, determining at least one input scenario of the target word; for each of the at least one input scenario, based on the number of times the target word appears on the screen in the input scenario and the total number of times the target word appears on the screen corresponding to the input scenario, determining the user demand probability of the target word in the input scenario.
[0101] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0102] It should be understood that the present application is not limited to the precise structures that have been 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 present application is limited only by the appended claims.
[0103] The above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
[0104] The above is a detailed introduction to an input method, a device and a device for input provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for a person skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An input method, characterized in that: The method comprises: Obtaining a candidate word sequence corresponding to the current input string; the candidate word sequence includes a plurality of candidate words arranged in sequence; Acquire context information of the input string, and adjust the order of candidate words in the candidate word sequence based on the context information; Based on the adjusted order, selecting at least one candidate word from the candidate word sequence for display; Wherein, adjusting the order of the candidate words in the candidate word sequence based on the above context information comprises: determining, based on a pre-generated common word word library, a target candidate word in the candidate word sequence that constitutes a common word with the above context information; Based on the input string and the above information, determine the current input scenario; Adjusting the order of the target candidate word in the candidate word sequence based on the user demand probability of the common word corresponding to the target candidate word in the current input scenario; The common word database is generated by the following steps: Words whose frequency and length meet preset conditions are selected as candidate common words, and the user demand probability of each candidate common word in different input scenarios is counted based on the historical input string and historical context information corresponding to each candidate common word; Determine a historical input scene corresponding to the historical input string; For each historical input string, the candidate common words are classified into the common word library according to the number of candidate common words hit by the historical input string and the historical input scenario, including the following three situations: If the historical input string only hits one candidate common word, and in the historical input scenario corresponding to the historical input string, the user demand probability of the candidate common word is greater than a first preset value, the candidate common word is included in the common word database; If the historical input string only hits one candidate common word, and in the historical input scenario corresponding to the historical input string, the user demand probability of the candidate common word is greater than the second preset value, and the user demand probability of the candidate common word is greater than the input scenario probability, then the candidate common word is included in the common word database; wherein the input scenario probability is the ratio of the number of times the hit word appears on the screen in the historical input scenario to the number of times the hit word appears on the screen in all corresponding input scenarios; If there are at least two candidate common words in the historical input string, the first two candidate common words are selected in order of the user demand probability of each candidate common word from large to small, and if the first two candidate common words do not meet three conditions at the same time, the first two candidate common words are included in the common word library; the three conditions include condition one, condition two and condition three, condition one is that the user demand probability of the preferred candidate common word is less than the third preset value, condition two is that the user demand probability of the preferred candidate common word is less than the input scenario probability, and condition three is that the sum of the user demand probabilities of the first two candidate common words is less than the sum of the input scenario probabilities.
2. The input method according to claim 1, characterized in that: The adjusting the order of the candidate words in the candidate word sequence based on the above context information further includes: Determining user behavior characteristics based on the input string and the above information; When the user behavior feature meets a preset reordering condition, the order of the candidate words in the candidate word sequence is adjusted based on the above context information.
3. The input method according to claim 1, characterized in that: The adjusting the order of the target candidate word in the candidate word sequence based on the user demand probability of the common word corresponding to the target candidate word in the current input scenario includes: Obtaining a score for each candidate word in the candidate word sequence; Determining the priority of the target candidate word based on the user demand probability of the common word corresponding to the target candidate word in the current input scenario; Based on the priority, updating the score of the target candidate word; Based on the updated score, the order of the target candidate word in the candidate word sequence is adjusted.
4. The input method according to claim 1, characterized in that: The commonly used words in the commonly used word database are determined based on statistical information of the words, and the statistical information includes at least one of the following: word frequency, user demand probability, and word length.
5. The input method according to claim 4, characterized in that: The input scenario is divided based on at least one of the following: word segmentation method, keyboard type, and input method; the input method includes at least one of the following: full spelling, simplified spelling, and last-character simplified spelling.
6. The input method according to claim 1, characterized in that: The method of calculating the user demand probability of each candidate common word in different input scenarios based on the historical input string and historical context information corresponding to each candidate common word includes: Take each candidate common word as the target word and perform the following steps: Determining at least one input scenario of the target word based on the historical input string and historical contextual information of the target word; For each of the at least one input scenario, based on the number of times the target word appears on the screen in the input scenario and the total number of times the target word appears on the screen corresponding to the input scenario, a user demand probability of the target word in the input scenario is determined.
7. An input device, characterized in that: The device comprises: An acquisition unit is configured to acquire a candidate word sequence corresponding to a current input string; the candidate word sequence includes a plurality of candidate words arranged in sequence; a sequence adjustment unit, configured to obtain context information of the input string, and adjust the order of the candidate words in the candidate word sequence based on the context information; a display unit, configured to select at least one candidate word from the candidate word sequence for display based on the adjusted order; Wherein, the sequencing unit is further configured to: Based on a pre-generated common word database, determining a target candidate word in the candidate word sequence that constitutes a common word with the above information; Based on the input string and the above information, determine the current input scenario; Adjusting the order of the target candidate word in the candidate word sequence based on the user demand probability of the common word corresponding to the target candidate word in the current input scenario; The common word database is generated by the following steps: Words whose frequency and length meet preset conditions are selected as candidate common words, and the user demand probability of each candidate common word in different input scenarios is counted based on the historical input string and historical context information corresponding to each candidate common word; Determine a historical input scene corresponding to the historical input string; For each historical input string, the candidate common words are classified into the common word library according to the number of candidate common words hit by the historical input string and the historical input scenario, including the following three situations: If the historical input string only hits one candidate common word, and in the historical input scenario corresponding to the historical input string, the user demand probability of the candidate common word is greater than a first preset value, the candidate common word is included in the common word database; If the historical input string only hits one candidate common word, and in the historical input scenario corresponding to the historical input string, the user demand probability of the candidate common word is greater than the second preset value, and the user demand probability of the candidate common word is greater than the input scenario probability, then the candidate common word is included in the common word database; wherein the input scenario probability is the ratio of the number of times the hit word appears on the screen in the historical input scenario to the number of times the hit word appears on the screen in all corresponding input scenarios; If there are at least two candidate common words in the historical input string, the first two candidate common words are selected in order of the user demand probability of each candidate common word from large to small, and if the first two candidate common words do not meet three conditions at the same time, the first two candidate common words are included in the common word library; the three conditions include condition one, condition two and condition three, condition one is that the user demand probability of the preferred candidate common word is less than the third preset value, condition two is that the user demand probability of the preferred candidate common word is less than the input scenario probability, and condition three is that the sum of the user demand probabilities of the first two candidate common words is less than the sum of the input scenario probabilities.
8. The input device according to claim 7, characterized in that: The sequencing unit is further configured to: Determining user behavior characteristics based on the input string and the above information; When the user behavior feature satisfies a preset reordering condition, the order of the common words in the candidate word sequence is adjusted based on the context information of the input string.
9. The input device according to claim 7, characterized in that: The sequencing unit is further configured to: Obtaining a score for each candidate word in the candidate word sequence; Determining the priority of the target candidate word based on the user demand probability of the common word corresponding to the target candidate word in the current input scenario; Based on the priority, updating the score of the target candidate word; Based on the updated score, the order of the target candidate word in the candidate word sequence is adjusted.
10. The input device according to claim 7, characterized in that: The commonly used words in the commonly used word database are determined based on statistical information of the words, and the statistical information includes at least one of the following: word frequency, user demand probability, and word length.
11. A device for input, characterized in that The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: Obtaining a candidate word sequence corresponding to the current input string; the candidate word sequence includes a plurality of candidate words arranged in sequence; Determine common words in the candidate word sequence, and adjust the order of the common words in the candidate word sequence based on the context information of the input string; Based on the adjusted order, selecting at least one candidate word from the candidate word sequence for display; Wherein, adjusting the order of the candidate words in the candidate word sequence based on the above context information comprises: determining, based on a pre-generated common word word library, a target candidate word in the candidate word sequence that constitutes a common word with the above context information; Based on the input string and the above information, determine the current input scenario; Adjusting the order of the target candidate word in the candidate word sequence based on the user demand probability of the common word corresponding to the target candidate word in the current input scenario; The common word database is generated by the following steps: Words whose frequency and length meet preset conditions are selected as candidate common words, and the user demand probability of each candidate common word in different input scenarios is counted based on the historical input string and historical context information corresponding to each candidate common word; Determine a historical input scene corresponding to the historical input string; For each historical input string, the candidate common words are classified into the common word library according to the number of candidate common words hit by the historical input string and the historical input scenario, including the following three situations: If the historical input string only hits one candidate common word, and in the historical input scenario corresponding to the historical input string, the user demand probability of the candidate common word is greater than a first preset value, the candidate common word is included in the common word database; If the historical input string only hits one candidate common word, and in the historical input scenario corresponding to the historical input string, the user demand probability of the candidate common word is greater than the second preset value, and the user demand probability of the candidate common word is greater than the input scenario probability, then the candidate common word is included in the common word database; wherein the input scenario probability is the ratio of the number of times the hit word appears on the screen in the historical input scenario to the number of times the hit word appears on the screen in all corresponding input scenarios; If there are at least two candidate common words in the historical input string, the first two candidate common words are selected in order of the user demand probability of each candidate common word from large to small, and if the first two candidate common words do not meet three conditions at the same time, the first two candidate common words are included in the common word library; the three conditions include condition one, condition two and condition three, condition one is that the user demand probability of the preferred candidate common word is less than the third preset value, condition two is that the user demand probability of the preferred candidate common word is less than the input scenario probability, and condition three is that the sum of the user demand probabilities of the first two candidate common words is less than the sum of the input scenario probabilities.
12. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Information input method and device, and device for information input
CN107291260A
Candidate sorting method and device and electronic equipment
CN109725736A