CN107608533A - A kind of Embedded Input Method of light-type - Google Patents

A kind of Embedded Input Method of light-type Download PDF

Info

Publication number
CN107608533A
CN107608533A CN201710737013.0A CN201710737013A CN107608533A CN 107608533 A CN107608533 A CN 107608533A CN 201710737013 A CN201710737013 A CN 201710737013A CN 107608533 A CN107608533 A CN 107608533A
Authority
CN
China
Prior art keywords
input method
input
embedded
light
user
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
CN201710737013.0A
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.)
Guangdong Yada Electric Co Ltd
Original Assignee
Guangdong Yada Electric 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 Guangdong Yada Electric Co Ltd filed Critical Guangdong Yada Electric Co Ltd
Priority to CN201710737013.0A priority Critical patent/CN107608533A/en
Publication of CN107608533A publication Critical patent/CN107608533A/en
Pending legal-status Critical Current

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

A kind of Embedded Input Method of light-type, including Chinese pinyin input, English input, symbol input, handwriting input, and soft keyboard input and quick retrieval are provided, effectively improve the reflection speed of input method;Input method is created using object thought, after use, by the release function of control, the memory headroom shared by input method control discharged, can effectively mitigate the nervous pressure of memory size;Write using the C language of standard, be not sent in any hardware platform, there is portability well, be particularly suitable for using in embedded system.The present invention has reaction speed fast, takes the advantages of Installed System Memory is few, and portability is high.

Description

A kind of Embedded Input Method of light-type
Technical field
The present invention relates to a kind of Embedded Input Method field, specially a kind of light-type Embedded Input Method.
Background technology
Input method is the coding method that various letter symbols are input into computer or miscellaneous equipment and used.Input method It is divided into the input methods such as encoding of chinese characters, English alphabet, digital coding.
At present, many Embedded Input Method platform dependents are strong, and the library file of calling system is more, are not easy to be transplanted to other Hardware platform.Traditional input method committed memory is big, the resource of embedded system be all it is relatively limited, it is running more at one In thread embedded system, it is usually intended to also run some system-level programs and other applications, it requires input Method is tried one's best, and committed memory is few, and overhead is small, and such multithreading embedded system just has more preferable Consumer's Experience.Response speed Degree and the standard for weighing a input method, if user clicks on a button, just retrieve entry, such efficiency gesture for several seconds The operation of system must be had a strong impact on.
In the epoch that computer nowadays and mobile phone are popularized, it is a it is light and handy, reaction speed is fast, transplantable intelligent input Method is particularly important.
The content of the invention
It is an object of the invention to overcome the deficiencies in the prior art, invent it is a it is light and handy, reaction speed is fast, transplantable Intelligent input method.
The technical solution adopted for the present invention to solve the technical problems is:A kind of Embedded Input Method of light-type is provided, The input method includes step:
S1, input method create and initialization, shows soft keyboard;
S2, corresponding input method is selected as needed, selectable input method includes Chinese pinyin input method, English input Method, symbol input method and hand-writing input method, if selection hand-writing input method, step jump to S6;
S3, English alphabet or symbol are chosen by software disk, or by hard manual inputting English letter or symbol, if input Method is Chinese pinyin input method, and step jumps to S5;
S4, output user choose or the English alphabet or symbol of input, step jump to step S9;
If S5, input method are Chinese pinyin input method, display user chooses or the content of input, and input method data bag is adopted With 2-level search mode, the entry after secondary index, quickly searched using dichotomy algorithm alternative corresponding to input character Entry, step jump to S7;
S6, program opening timing device timing scan handwriting area handwriting tracks, show the track in handwriting area, Coordinate value corresponding to the handwriting tracks of handwriting area is stored in array, and after user completes hand-written operation, track array is used as Ginseng is transmitted to person's handwriting recognition function to handle, and after recognition function performs completion, returns to out one group of alternative entry;
S7, user are selected according to the alternative entry of display;
The entry that S8, output user are chosen;
S9, completion once input.
Further, in addition to step S10, judge whether to exit input method, if so, then discharging input method resources, discharge The memory headroom that input method is opened up;Inputted next time if it is not, then waiting.
Further, the input method is created using Target-oriented thought.
Further, described Embedded Input Method is write using the C language of standard.
Further, in the step S6, the timer is opened after writing pencil is in lifting status, in timer Disconnected to be triggered to when coming, writing pencil is not depressed again, can conclude that user has completed hand-written operation.
Further, it is used to cut positioned at left side first row comprising 4 when the soft keyboard is in spelling input method state Change Chinese pinyin input, English input, symbol input, the button of handwriting input, positioned at intermediate region be used for spell Chinese character and Input 26 English alphabet buttons of English character, and the conventional punctuation mark positioned at the right and conventional function button; When the soft keyboard is in hand-writing input method state, 4 be used for switch Chinese pinyin input, English input, symbol input, it is hand-written The button of input is located at left side first row, and second is classified as Chinese, numeral, lowercase, uppercase type selecting button, the Three row are word candidate areas, and the 4th row are handwriting areas, and there are symbol input method and conventional function button in the right.
Further, when the input method is in Chinese pinyin input method status and inputted by hard manual, response OK keys will The Section 1 output of alternative entry.
Further, the soft keyboard, user's selection or the content of input and alternative entry are shown on the touchscreen.
Compared with prior art, the beneficial effects of the invention are as follows:Reaction speed is fast, and portable high, easily transplanting is different Embedded platform, take that Installed System Memory is few, can effectively mitigate the nervous pressure of memory size.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the present invention;
Fig. 2 is spelling input method Background used in the present invention;
Fig. 3 is hand-writing input method Background used in the present invention.
Embodiment
For the ease of the understanding of those skilled in the art, the present invention is made below in conjunction with the drawings and specific embodiments further It is described in detail.
A kind of Embedded Input Method of light-type, the establishment of the input method use Target-oriented thought, and input method is worked as Make a control, only dynamic creation goes out an input method control, using its control handle, input method could be operated, After use, the memory headroom shared by input method control can be discharged by the release function of control, mitigate memory size Nervous pressure.The input method is write using the C language of standard, is not sent in any hardware platform, has good portable Property, it is particularly suitable for using in embedded system.
Flow chart as shown in Figure 1, the input method include step:
S1, input method create and initialization, shows soft keyboard;
S2, corresponding input method is selected as needed, selectable input method includes Chinese pinyin input method, English input Method, symbol input method and hand-writing input method, if selection hand-writing input method, step jump to S6;
S3, English alphabet or symbol are chosen by software disk, or by hard manual inputting English letter or symbol, if input Method is Chinese pinyin input method, and step jumps to S5;
S4, output user choose or the English alphabet or symbol of input, step jump to step S9;
If S5, input method are Chinese pinyin input method, display user chooses or the content of input, and input method data bag is adopted With 2-level search mode, the entry after secondary index, quickly searched using dichotomy algorithm alternative corresponding to input character Entry, step jump to S7;
S6, program opening timing device timing scan handwriting area handwriting tracks, show the track in handwriting area, Coordinate value corresponding to the handwriting tracks of handwriting area is stored in array, and after user completes hand-written operation, track array is used as Ginseng is transmitted to person's handwriting recognition function to handle, and after recognition function performs completion, returns to out one group of alternative entry;
S7, user are selected according to the alternative entry of display;
The entry that S8, output user are chosen;
S9, completion once input;
S10, judge whether to exit input method, if so, then discharging input method resources, the internal memory that release input method is opened up is empty Between;Inputted next time if it is not, then waiting.
Wherein, the structure pointer of the establishment of the input method and initialization specially statement pIME input methods, and be it Internal memory is opened up, after initializing internal memory, returns to the pointer.Following operate is performed during initialization function:
(1) judge whether the region rect of input method is legal, if cross the border, be, return to false, otherwise into next Step.
(2) resource is read, and is obtained the keyboard picture of input method, is set a property.
Wherein, what the input method was responded and handled is hard manual, soft keyboard, and timer event, specifically response and place The operation of reason is as follows:
Hard manual:When the input method is in Chinese pinyin input method status and inputted by hard manual, response OK keys will be standby The Section 1 of entry is selected to export.If user is in spelling input method, it have input " ya ", alternative entry has that " 123 teeth 4 of pressure give as security 5 Bud ", then OK keys are pressed, " " should be output on screen.
Touch-screen:Region comparison is carried out to touchscreen events, sees which soft keyboard keys be click on, then according to difference Button, handle corresponding operating.In spelling input method, it have input " a ", program will be searched out with " a " from input method data " Ah eh breathes out a word used for translation Sha " to the data of beginning, is shown in alternative entry area, is selected for user.
Timer:Opened after writing pencil is in lifting status, when timer interruption is triggered to next, writing pencil is without again It is secondary to be depressed, it can conclude that user has completed hand-written operation.
Wherein, the soft keyboard, user's selection or the content of input and alternative entry are shown on the touchscreen.Soft keyboard shows The partial code of the function shown:Ctl_ShowImeBgPic(pIme);The partial code for the function that alternative entry is shown:Ctl_ ShowImeWord(pIme);The partial code for the function that the content of input is shown:Ctl_ShowImeInput(pIme).
Wherein, when input method exits, whether the memory headroom of background copy pCopyScr sensings is judged not for sky, if not The internal memory pointed to for sky, release pCopyScr, discharges input method resources, finally discharges the memory headroom that input method is opened up, and mitigates The nervous pressure of memory size.
Embodiment 1
When input method is Chinese pinyin input method, the interface of soft keyboard is located at the left side first as shown in Figure 2, comprising 4 Row are used to switch Chinese pinyin input, English input, symbol input, the button of handwriting input, positioned at being used for for intermediate region Spell Chinese character and input 26 English alphabet buttons of English character, and conventional punctuation mark positioned at the right and conventional Function button, if cross is to close soft keyboard, it is preceding delete, it is rear delete, and enter key.
Spelling input method needs input method data bag, and the text information of input method is all read from packet, phonetic data Include the coding of word and phrase corresponding to each phonetic in bag, read out the literal code to be exported from the inside, just can be Shown on screen, data packet format:One-level index (27*4 bytes)+secondary index (N*4 bytes)+entry 1+ entry 2+...+ words Bar N.
This input method data form is searched using secondary index, and first order index preserves 26 alphabetical first offset address, As character " a " points to " a " address of index, " ba " address of character " b " sensing index;What second level index pointed to is each same The address first address of one phonetic data, such as " a " of index point to entry, and " a Ah eh breathes out a word used for translation Sha and salted down the addresses of actinium Actinium " data, index " b " point to the address of entry " ba eight fathers are pulled out stops postscript bar fragrant plant " data, such form can quickly finds phonetic Entry.
User inputs " baa ", and program reads entry according to the following steps:
(1) " b " and " c " position are found by first order index, reads its value, if the value of " a " is x0aa, " b " Value be 0xbb, that is, the scope required to look up is between 0xaa~0xbb.
(2) in order to which the entry content that quick-searching goes out " baa ", program employ binary search algorithm, program is shown in as follows:
(3) when the flag variables of program are true, the entry content of user's input string has been successfully found, from mid+1 texts Entry end position is read in part position, reads entry content " baa is white and clean " from data file according to mid value.It is and each The data format of entry is:Phonetic+space (0x020)+word 1+ spaces (0x20)+..+ word N+ newlines (0x0d, 0x0a)
(4) according to the data format of entry, word 1, word 2 are stored in array.
Embodiment 2
When input method is hand-writing input method, the interface of soft keyboard as shown in Figure 3,4 be used for switch Chinese pinyin input, English input, symbol input, the button of handwriting input are located at left side first row;Second is classified as Chinese, numeral, lowercase, big Write female type selecting button;3rd row are word candidate areas, and after a hand-written complete Chinese character, candidate area can all have several The Chinese character of likeness in form, there is provided user is alternative, more can be fault-tolerant;4th row are handwriting areas, hand-written for user, and show hand-written rail in time Mark;Rightmost has symbol input method and conventional function button, such as deletion, space, carriage return.
The step of realizing of hand-writing input method is:
(1) user's handwriting tracks are stored in an array;
(2) track array often increases a subscript, is required for showing track, is exactly by when the coordinate of presubscript Value, is linked to be straight line between upper one lower target coordinate value;
(3) after felt pen is lifting status, opening timing device, when timer interruption arrives, felt pen is without again Pressure, is determined as user's hand-written completion;
(4) track array is passed into person's handwriting recognition function to be handled, after the completion of function performs, returns to one group of alternative word Bar.
Defining input method structure is as follows:
The operation principle and process for using of the present invention:When user uses input method, input method opens up memory headroom and initial Change, show soft keyboard.If user selects hand-writing input method, the hand-written track of user is stored into an array, and the track exists Shown in handwriting area, track array often increases a subscript, is required for showing track, is exactly by when the seat of presubscript It is linked to be straight line between scale value, with upper one lower target coordinate value, after felt pen is lifting status, opening timing device, in timing When device interrupts arrival, felt pen is not depressed again, is determined as user's hand-written completion, and track array is passed into person's handwriting knows Other function is handled, and after the completion of function performs, returns to one group of alternative entry;If user selects spelling input method, user passes through The content that soft keyboard is chosen or inputted by hard manual is shown on the touchscreen, and 2-level search side is used to the character of user's input Formula, fast positioning secondary index entry first address, the entry after secondary index, using dichotomy algorithm quickly search with it is defeated Enter alternative entry corresponding to character.Handwriting tracks or the content chosen by soft keyboard or inputted by hard manual are returned after processing The alternative entry returned is displayed on touch-screen, and user selects the entry oneself needed from alternative entry, and completion once inputs. If selection is symbol input method or English input method, the content that user is chosen by soft keyboard or inputted by hard manual is defeated Go out onto touch-screen.Now the changeable input method of user continues to input, and directly can also continue to input using current input method, if User's end of input, the resource of input method will be released, and then discharge the memory headroom that input method is opened up.
Above-described embodiment is the preferable implementation of the present invention, is not limited to the present invention, is not departing from this hair It is any obviously to replace within protection scope of the present invention on the premise of bright inventive concept.

Claims (8)

  1. A kind of 1. Embedded Input Method of light-type, it is characterised in that:The input method includes step:
    S1, input method create and initialization, shows soft keyboard;
    S2, select corresponding input method as needed, selectable input method include Chinese pinyin input method, English input method, Symbol input method and hand-writing input method, if selection hand-writing input method, step jump to S6;
    S3, English alphabet or symbol chosen by software disk, or by hard manual inputting English letter or symbol, if input method is Chinese pinyin input method, step jump to S5;
    S4, output user choose or the English alphabet or symbol of input, step jump to step S9;
    If S5, input method are Chinese pinyin input method, display user chooses or the content of input, and two are used to input method data bag Level retrieval mode, the entry after secondary index, alternative entry corresponding to input character is quickly searched using dichotomy algorithm, Step jumps to S7;
    S6, program opening timing device timing scan handwriting area handwriting tracks, show the track in handwriting area, hand-written Coordinate value corresponding to the handwriting tracks in region is stored in array, and after user completes hand-written operation, track array passes as ginseng is entered Handled to person's handwriting recognition function, after recognition function performs completion, return to out one group of alternative entry;
    S7, user are selected according to the alternative entry of display;
    The entry that S8, output user are chosen;
    S9, completion once input.
  2. A kind of 2. Embedded Input Method of light-type according to claim 1, it is characterised in that:Also include step S10, sentence It is disconnected whether to exit input method, if so, input method resources are then discharged, the memory headroom that release input method is opened up;If it is not, under then waiting Once input.
  3. A kind of 3. Embedded Input Method of light-type according to claim 2, it is characterised in that:The input method uses face Created to object thought.
  4. A kind of 4. Embedded Input Method of light-type according to claim 2, it is characterised in that:Described embedded input Method is write using the C language of standard.
  5. A kind of 5. Embedded Input Method of light-type according to claim 2, it is characterised in that:In the step S6, institute State timer to open after writing pencil is in lifting status, when timer interruption is triggered to next, writing pencil is not pressed again Under, it can conclude that user has completed hand-written operation.
  6. A kind of 6. Embedded Input Method of light-type according to claim 1-5, it is characterised in that:The soft keyboard is in Inputted during spelling input method state comprising 4 positioned at left side first row for switching Chinese pinyin, English inputs, symbol is defeated Enter, the button of handwriting input, 26 English alphabet buttons for being used to spell Chinese character and input English character positioned at intermediate region, And the conventional punctuation mark positioned at the right and conventional function button;When the soft keyboard is in hand-writing input method state, 4 It is individual be used for switch Chinese pinyin input, English input, symbol input, the button of handwriting input be located at left side first row, secondary series For Chinese, numeral, lowercase, uppercase type selecting button, the 3rd row are word candidate areas, and the 4th row are hand-written areas There are symbol input method and conventional function button in domain, the right.
  7. A kind of 7. Embedded Input Method of light-type according to claim 6, it is characterised in that:During the input method is in When literary spelling input method state is inputted by hard manual, response OK keys export the Section 1 of alternative entry.
  8. A kind of 8. Embedded Input Method of light-type according to claim 7, it is characterised in that:The soft keyboard, user The content and alternative entry of selection or input are shown on the touchscreen.
CN201710737013.0A 2017-08-24 2017-08-24 A kind of Embedded Input Method of light-type Pending CN107608533A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710737013.0A CN107608533A (en) 2017-08-24 2017-08-24 A kind of Embedded Input Method of light-type

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710737013.0A CN107608533A (en) 2017-08-24 2017-08-24 A kind of Embedded Input Method of light-type

Publications (1)

Publication Number Publication Date
CN107608533A true CN107608533A (en) 2018-01-19

Family

ID=61064634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710737013.0A Pending CN107608533A (en) 2017-08-24 2017-08-24 A kind of Embedded Input Method of light-type

Country Status (1)

Country Link
CN (1) CN107608533A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897440A (en) * 2020-06-18 2020-11-06 许昌许继软件技术有限公司 Chinese pinyin input method for embedded Linux system
CN113515226A (en) * 2021-05-12 2021-10-19 南京铉盈网络科技有限公司 Soft keyboard based on integrated input method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661335A (en) * 2009-09-22 2010-03-03 北京中科智网传媒技术有限公司 Chinese character input method applicable to embedded type platform and system
CN101710258A (en) * 2009-12-23 2010-05-19 福州星网视易信息系统有限公司 Embedded device simple input method
CN104199671A (en) * 2014-09-15 2014-12-10 武汉精伦软件有限公司 Implementing method for easy-to-transplant small graphic system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661335A (en) * 2009-09-22 2010-03-03 北京中科智网传媒技术有限公司 Chinese character input method applicable to embedded type platform and system
CN101710258A (en) * 2009-12-23 2010-05-19 福州星网视易信息系统有限公司 Embedded device simple input method
CN104199671A (en) * 2014-09-15 2014-12-10 武汉精伦软件有限公司 Implementing method for easy-to-transplant small graphic system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897440A (en) * 2020-06-18 2020-11-06 许昌许继软件技术有限公司 Chinese pinyin input method for embedded Linux system
CN111897440B (en) * 2020-06-18 2024-08-13 许昌许继软件技术有限公司 Chinese phonetic input method for embedded Linux system
CN113515226A (en) * 2021-05-12 2021-10-19 南京铉盈网络科技有限公司 Soft keyboard based on integrated input method

Similar Documents

Publication Publication Date Title
US6970599B2 (en) Chinese character handwriting recognition system
WO2022083751A1 (en) Keyboard having new key position layout, and input method of same applied to electronic device
CN100334529C (en) Reduced keyboard disambiguating system
US5889888A (en) Method and apparatus for immediate response handwriting recognition system that handles multiple character sets
US9026428B2 (en) Text/character input system, such as for use with touch screens on mobile phones
US10073536B2 (en) Virtual keyboard input for international languages
US8583440B2 (en) Apparatus and method for providing visual indication of character ambiguity during text entry
JP2007133884A5 (en)
CN101393506A (en) Input methods for device having multi-language environment
CN102314319B (en) Touch control input method, device and system
KR20100043009A (en) Character input device
CN102422245A (en) Input method editor
CN102902486A (en) Pinyin slide input method and system for main and auxiliary keyboards
CN103970467A (en) Multi-input-method handwriting recognition system and method
US20110063225A1 (en) User Interface for Handheld Electronic Devices
CN107608533A (en) A kind of Embedded Input Method of light-type
CN105183183B (en) A kind of sound shape of square seedling text, which combines, rapidly inputs coding and its optimization method
KR20140018436A (en) System for inputting information utilizing word prediction and method thereof
KR20090035409A (en) Character input device
CN104834392B (en) A kind of Chinese character input method of stroke dynamic group word
KR100862242B1 (en) Words retrieving method
CN102156616B (en) Touch screen key-writing input method
CN104503598A (en) 12-grid main letter guiding input method
CN105426109A (en) Method for inputting characters in sliding manner
KR20120080474A (en) Method for inputting character by a manner of drawing line

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180119

RJ01 Rejection of invention patent application after publication