CN111124151B - Intelligent text box input method and device - Google Patents
Intelligent text box input method and device Download PDFInfo
- Publication number
- CN111124151B CN111124151B CN201911422867.5A CN201911422867A CN111124151B CN 111124151 B CN111124151 B CN 111124151B CN 201911422867 A CN201911422867 A CN 201911422867A CN 111124151 B CN111124151 B CN 111124151B
- Authority
- CN
- China
- Prior art keywords
- input
- time interval
- time
- preset range
- text
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
- G06F3/0233—Character input methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Input From Keyboards Or The Like (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application discloses an intelligent text box input method. The input squareThe method comprises the following steps: setting a text input object; monitoring and capturing WM_CHAR information of an operating system; recording the time and time interval of each WM_CHAR message generation, and storing the time and time interval in a time array; calculating the data in the time array to obtain an average time interval t avg Maximum interval time t max Standard deviation t of time interval dev The method comprises the steps of carrying out a first treatment on the surface of the Determining the calculated average time interval t avg Maximum interval time t max Standard deviation t of time interval dev Whether falling within a preset range, wherein the preset range is changed according to the change of the initial set text input object; and when the content falls into the preset range, displaying the content in the text input box. The application solves the technical problem that the text input box in the prior art can only set two modes of forbidden input or allowed input. In addition, an intelligent text input device is also provided.
Description
Technical Field
The application relates to the technical field of computers, in particular to an intelligent text box input method and device with a man-machine recognition function.
Background
Text entry boxes are widely used. Text entry boxes typically have the ability to enter, edit, delete and display text content. A typical text entry box can only be set with two functions, allowing text to be entered or prohibiting text from being entered. But cannot automatically identify whether the content is entered manually or through a machine device such as a code scanner. If the machine input and the manual input are used simultaneously, data loss or human misoperation can easily be caused to input wrong data.
In the actual software development process, manual data input is sometimes forbidden, but data input through a code scanner and other devices needs to be supported. Existing text entry boxes can only be set to either disable entry or enable entry of both modes. If the forbidden input mode is set, not only manual input can not be performed, but also input can not be performed by devices such as a code scanner. If the mode is set to be input, the device such as a manual or code scanner can be input, but the device cannot be input manually or by a machine. Nor can it limit only manual input or only machine input data.
Therefore, it is necessary to provide a new text box design that can recognize whether a manual input or a machine input and take necessary control.
Disclosure of Invention
The application mainly aims to provide an intelligent text box input method and device, which are used for solving the problem that the manual input or the machine input cannot be distinguished in the related technology.
In order to achieve the above object, in a first aspect, an embodiment of the present application provides an intelligent text box input method.
The intelligent text box input method comprises the following steps:
setting a text input object;
monitoring and capturing WM_CHAR information of an operating system;
recording the time of each WM_CHAR message generation and the time interval of adjacent character generation, and storing the time in a time array;
calculating the data in the time array to obtain an average time interval t avg Maximum interval time t max Standard deviation t of time interval dev ;
Determining the calculated average time interval t avg Maximum interval time t max Standard deviation t of time interval dev Whether the text input object falls into a preset range or not, wherein the preset range is different according to the different text input objects which are initially set;
and when the content falls into the preset range, displaying the content in the text input box.
Alternatively, the text input object is one that allows only manual input, only machine input, or both manual and machine input.
Optionally, collecting time parameter information of manual input data and machine input data, and statistically analyzing average time interval range R of manual input avgh Maximum interval time range R maxh Standard deviation range R of time interval devh Average time interval range R of machine input avgm Maximum interval time range R maxm Standard deviation range R of time interval devm 。
Optionally, the method for judging whether the preset range is included is:
if the set text input object is that only manual input is allowed, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh JudgingIf the preset range is not met, the preset range is determined to be met;
if the set text input object is only allowed to be input by the machine, t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm Judging that the preset range is fallen into, otherwise, not falling into;
if the set text input object is the text input object allowing manual input and machine input, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh Or t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm And judging that the preset range is fallen into, otherwise, the preset range is not fallen into.
Optionally, the input data takes the carriage return character as an input end mark, and if a single character is input and the time interval between the carriage return character and the previous character is greater than 50ms, the input data is judged to be manually input;
if a plurality of characters are input and the average input time interval is greater than 50ms, determining that the characters are manually input;
if a plurality of characters are input and the maximum input time interval is greater than 100ms, determining that the characters are manually input;
if the number of the input characters is greater than 10, counting the standard deviation of the input time interval, and if the standard deviation value is greater than 15, considering the input time interval as manual input;
if the determination condition of the manual input is not satisfied, the machine input is automatically determined.
Optionally, the data which does not fall into the preset range is directly abandoned and an error report prompt is sent out.
Optionally, after monitoring and capturing the wm_char message of the operating system, identifying the content of the wm_char message is further included:
if the content is a valid character, recording the time of each WM_CHAR message generation and the time interval of adjacent character generation;
if the content is invalid character, the captured message is ignored.
Optionally, the valid characters include numbers 0-9 and uppercase letters A-Z, lowercase letters a-Z.
In a second aspect, an embodiment of the present application further provides an intelligent text box input device, including:
the setting module is used for setting a text input object;
the acquisition module is used for monitoring and capturing WM_CHAR information of the operating system, recording the time of each WM_CHAR information generation and the time interval of adjacent character generation, and storing the time intervals in a time array;
the processing module is used for calculating the data in the time array to obtain an average time interval t avg Maximum interval time t max Standard deviation t of time interval dev Judging whether the text input object falls into a preset range or not, wherein the preset range is different according to the different text input objects which are initially set;
and the execution display module is used for displaying the content in the text input box when the content falls into a preset range.
Optionally, the intelligent text box input device further comprises:
the identification module is used for identifying the content of the captured WM_CHAR message, and if the content is a valid character, recording the time of generating each WM_CHAR message and the time interval of generating adjacent characters; if the content is invalid character, the captured message is ignored.
In the intelligent text box input method and device provided by the embodiment of the application, the function limitation of different input objects is realized through setting the text input objects; and by determining the average time interval t of the captured operating system wm_char message avg Maximum interval time t max Standard deviation t of time interval dev Data to automatically identify the object to which the data is input; and further, the control of the input mode is realized, and the effectiveness and the correctness of the input data are improved. The technical problem that in the prior art, a text input box can only set two modes of forbidden input or allowed input is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application, are incorporated in and constitute a part of this specification. The drawings and their description are illustrative of the application and are not to be construed as unduly limiting the application. In the drawings:
FIG. 1 is a flow chart of a method of intelligent text box entry in accordance with a first embodiment of the present application;
FIG. 2 is a flow chart of a method of intelligent text box entry in accordance with a second embodiment of the present application;
FIG. 3 is a flow chart of a method of intelligent text box entry in accordance with a third embodiment of the present application;
FIG. 4 is a flow chart of a method of intelligent text box entry in accordance with a fourth embodiment of the present application;
FIG. 5 is a schematic diagram of the structure of an intelligent text box input device according to a first embodiment of the present application;
FIG. 6 is a schematic structural view of an intelligent text box input device according to a second embodiment of the present application;
FIG. 7 is a message generation timing diagram of a manual input in a smart text box input method according to an embodiment of the present application;
fig. 8 is a message generation timing diagram of machine input in the intelligent text box input method according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the application herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the present application, the terms "upper", "lower", "inner", "middle", "outer", "front", "rear", and the like indicate an azimuth or a positional relationship based on that shown in the drawings. These terms are only used to better describe the present application and its embodiments and are not intended to limit the scope of the indicated devices, elements or components to the particular orientations or to configure and operate in the particular orientations.
Also, some of the terms described above may be used to indicate other meanings in addition to orientation or positional relationships, for example, the term "upper" may also be used to indicate some sort of attachment or connection in some cases. The specific meaning of these terms in the present application will be understood by those of ordinary skill in the art according to the specific circumstances.
Furthermore, the terms "disposed," "connected," "configured," and "connected" are to be construed broadly. For example, "connected" may be in a fixed connection, a removable connection, or a unitary construction; may be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in internal communication between two devices, elements, or components. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art according to the specific circumstances.
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
Referring to fig. 1, as a first embodiment of the present application, an intelligent text box input method includes:
step S101, setting a text input object.
The text input object is set to allow only manual input, only machine input, or both manual and machine input, according to actual needs.
Step S102, monitoring and capturing a WM_CHAR message of the operating system.
Step S103, record the time of every WM_CHAR message generation and the time interval of adjacent character generation, store in a time array.
When a manual input or machine input mode is adopted, generating corresponding time T for each WM_CHAR message, and acquiring and storing the time data when the time interval generated by adjacent characters corresponds to T. And in the time T generated by one WM_CHAR message, recording a plurality of groups of time interval data to form a time array according to a plurality of time intervals T corresponding to the number of characters in the message.
Step S104, calculating the data in the time array to obtain an average time interval t avg Maximum interval time t max Standard deviation t of time interval dev 。
Calculating the average time interval t generated by each WM_CHAR message according to the time data acquired in step S103 avg Maximum interval time t max Standard deviation t of time interval dev As shown in fig. 7 and 8, assuming that the time interval between the generation of adjacent characters is t1, t2, t3, … …, tn, respectively, within the time of one wm_char message generation, the average time interval t avg = (t1+t2+t3+ … +tn)/n, maximum interval time t max =max (t 1, t2, t3, …, tn), standard deviation of time interval t dev =StdDev(t1,t2,t3,…tn)。
Step S105, determining the calculated average time interval t avg Maximum interval time t max Standard deviation t of time interval dev Whether the preset range is within the preset range or not, wherein the preset range is different according to the initial setting text input object.
The preset range is according to the initially set textThe input objects vary from one input object to another, and in particular, in some embodiments of the application, the predetermined range is obtained statistically. Collecting a large amount of time parameter information of manual input data and machine input data, and statistically analyzing an average time interval range R of manual input avgh Maximum interval time range R maxh Standard deviation range R of time interval devh Average time interval range R of machine input avgm Maximum interval time range R maxm Standard deviation range R of time interval devm 。
If the set text input object is that only manual input is allowed, the preset range is R avgh 、R maxh R is as follows devh The method comprises the steps of carrying out a first treatment on the surface of the If the set text input object is that only the machine is allowed to be input, the preset range is R avgm 、R maxm R is as follows devm The method comprises the steps of carrying out a first treatment on the surface of the If the set text input object is that manual input and machine input are allowed at the same time, the preset range is R avgh 、R maxh R is as follows devh Or R is avgm 、R maxm R is as follows devm 。
The method for judging whether the preset range is met is as follows:
when the set text input object is that only manual input is allowed, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh Judging that the preset range is fallen into, otherwise, not falling into;
when the set text input object is that only machine input is allowed, t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm Judging that the preset range is fallen into, otherwise, not falling into;
when the set text input object is to allow manual input and machine input, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh Or t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm And judging that the preset range is fallen into, otherwise, the preset range is not fallen into.
Preferably, the input data takes the carriage return character as an input end mark, and if a single character is input and the time interval between the carriage return character and the previous character is more than 50ms, the input data is judged to be manually input;
if a plurality of characters are input and the average input time interval is greater than 50ms, determining that the characters are manually input;
if a plurality of characters are input and the maximum input time interval is greater than 100ms, determining that the characters are manually input;
if the number of the input characters is greater than 10, counting the standard deviation of the input time interval, and if the standard deviation value is greater than 15, considering the input time interval as manual input;
if the determination condition of the manual input is not satisfied, the machine input is automatically determined.
And step S106, when the content falls into the preset range, displaying the content in the text input box. The content displayed is the captured wm_char message.
According to the input method of the text box, the function limitation on different input objects is realized through setting the text input objects, the input mode can be further subdivided, and only manual input or only machine input or both can be supported; and by determining the average time interval t of the captured operating system wm_char message avg Maximum interval time t max Standard deviation t of time interval dev The data is used for automatically identifying the object of the input data, so that the distinction between manual input and machine input is realized; and further, the control of the input mode is realized, and the effectiveness and the correctness of the input data are improved.
In the application, there is no special requirement on a specific manual input mode, a machine input device and the like, the application is not particularly limited, and any input mode which can be realized belongs to the protection scope of the application.
Referring to fig. 2, as a second embodiment of the present application, an intelligent text box input method further includes directly discarding data that does not fall within a preset range and sending an error report. The text input object is that only manual input is allowed, when calculatedAverage time interval t of collected wm_char messages avg Maximum interval time t max Standard deviation t of time interval dev Does not fall within the mean time interval range R of manual input avgh Maximum interval time range R maxh Standard deviation range R of time interval devh And when the collected WM_CHAR message is directly abandoned, the collected WM_CHAR message is not displayed in a text box, and meanwhile, an error prompt is sent out to draw the attention of a user. Through the error prompt, the possible misoperation behaviors of the user are reminded and avoided, and the occurrence of data input errors is prevented.
Referring to fig. 3, as a third embodiment of the present application, an intelligent text box input method includes:
in step S301, a text input object is set.
The text input object is set to allow only manual input, only machine input, or both manual and machine input, according to actual needs.
Step S302, monitoring and capturing a WM_CHAR message of the operating system.
Step S303, judging whether the captured WM_CHAR message is a valid character.
Specifically, in some embodiments of the present application, the significant characters include the digits 0-9 and the uppercase letters A-Z, lowercase letters a-Z. If the character is judged to be valid, continuing to step S304; if it is determined that the character is invalid, the captured message is ignored and the process returns to step S302, and the wm_char message is re-monitored and captured.
Step S304, record the time of every WM_CHAR message generation and the time interval of adjacent character generation, store in a time array.
When a manual input or machine input mode is adopted, generating corresponding time T for each WM_CHAR message, and acquiring and storing the time data when the time interval generated by adjacent characters corresponds to T. And in the time T generated by one WM_CHAR message, recording a plurality of groups of time interval data to form a time array according to a plurality of time intervals T corresponding to the number of characters in the message.
Step S305, calculating a time arrayData to derive an average time interval t avg Maximum interval time t max Standard deviation t of time interval dev 。
Step S306, determining the calculated average time interval t avg Maximum interval time t max Standard deviation t of time interval dev Whether the preset range is within the preset range or not, wherein the preset range is different according to the initial setting text input object.
The preset range varies according to the text input object initially set, and in particular, in some embodiments of the present application, the preset range is obtained statistically. Collecting a large amount of time parameter information of manual input data and machine input data, and statistically analyzing an average time interval range R of manual input avgh Maximum interval time range R maxh Standard deviation range R of time interval devh Average time interval range R of machine input avgm Maximum interval time range R maxm Standard deviation range R of time interval devm 。
If the set text input object is that only manual input is allowed, the preset range is R avgh 、R maxh R is as follows devh The method comprises the steps of carrying out a first treatment on the surface of the If the set text input object is that only the machine is allowed to be input, the preset range is R avgm 、R maxm R is as follows devm The method comprises the steps of carrying out a first treatment on the surface of the If the set text input object is that manual input and machine input are allowed at the same time, the preset range is R avgh 、R maxh R is as follows devh Or R is avgm 、R maxm R is as follows devm 。
The method for judging whether the preset range is met is as follows:
when the set text input object is that only manual input is allowed, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh Judging that the preset range is fallen into, otherwise, not falling into;
when the set text input object is that only machine input is allowed, t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm Judging that the preset range is fallen into, otherwise, not falling into;
when the set text input object is to allow manual input and machine input, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh Or t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm And judging that the preset range is fallen into, otherwise, the preset range is not fallen into.
Preferably, the input data takes the carriage return character as an input end mark, and if a single character is input and the time interval between the carriage return character and the previous character is more than 50ms, the input data is judged to be manually input;
if a plurality of characters are input and the average input time interval is greater than 50ms, determining that the characters are manually input;
if a plurality of characters are input and the maximum input time interval is greater than 100ms, determining that the characters are manually input;
if the number of the input characters is greater than 10, counting the standard deviation of the input time interval, and if the standard deviation value is greater than 15, considering the input time interval as manual input;
if the determination condition of the manual input is not satisfied, the machine input is automatically determined.
Step S307, when the content falls into the preset range, displaying the content in the text input box, wherein the displayed content is the captured WM_CHAR message; when the data does not fall into the preset range, the data is directly abandoned and an error report prompt is sent out.
Referring to fig. 4, as a fourth embodiment of the present application, an intelligent text box input method further includes determining whether a wm_char message is captured after listening and capturing the wm_char message of the operating system at step S302. If the wm_char message is captured, step S303 is performed to further determine whether the captured wm_char message is a valid character; if no WM_CHAR message is captured, return to step S302 to re-monitor and capture.
According to the intelligent text box input method, whether the WM_CHAR message is captured or not and whether the captured WM_CHAR message is a valid character or not are judged, irrelevant information which does not meet requirements can be shielded from the early stage of the process, the follow-up process is avoided, the data processing efficiency is improved, and the effectiveness and the correctness of input data are further improved.
The application also provides an intelligent text box input device. Referring to fig. 5, as a first embodiment of the smart text box input device of the present application, it includes:
and the setting module is used for setting the text input object.
In some embodiments of the application, the setup module may set the text input object to allow only manual input, only machine input, or both manual and machine input.
And the acquisition module is used for monitoring and capturing the WM_CHAR message of the operating system, recording the time of each WM_CHAR message generation and the time interval of adjacent character generation, and storing the time intervals in a time array.
The processing module is used for calculating the data in the time array to obtain an average time interval t avg Maximum interval time t max Standard deviation t of time interval dev And judging whether the text input object falls into a preset range, wherein the preset range is different according to the different text input objects which are initially set.
In some embodiments of the application, the processing module calculates an average time interval t for each WM_CHAR message generation avg Maximum interval time t max Standard deviation t of time interval dev . Assuming that the time interval between adjacent character generation is t1, t2, t3, … …, tn within one WM_CHAR message generation time, the average time interval t avg = (t1+t2+t3+ … +tn)/n, maximum interval time t max =max (t 1, t2, t3, …, tn), standard deviation of time interval t dev =StdDev(t1,t2,t3,…tn)。
The processing module then calculates the average time interval range R of the manual input according to the statistical mode avgh Maximum interval time range R maxh Standard deviation range R of time interval devh Average time interval of machine inputRange R avgm Maximum interval time range R maxm Standard deviation range R of time interval devm . The above ranges are preset ranges of the manual input object and the machine input object, respectively.
When the set text input object is that only manual input is allowed, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh The processing module judges that the preset range is included, otherwise the preset range is not included;
when the set text input object is that only machine input is allowed, t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm The processing module judges that the preset range is included, otherwise the preset range is not included;
when the set text input object is to allow manual input and machine input, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh Or t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm And the processing module judges that the preset range is included, otherwise, the preset range is not included.
Preferably, in some embodiments of the present application, the input data has a carriage return as an input end flag, and if a single character is input and the time interval between the carriage return and the previous character is greater than 50ms, it is determined that the input is manually performed;
if a plurality of characters are input and the average input time interval is greater than 50ms, determining that the characters are manually input;
if a plurality of characters are input and the maximum input time interval is greater than 100ms, determining that the characters are manually input;
if the number of the input characters is greater than 10, counting the standard deviation of the input time interval, and if the standard deviation value is greater than 15, considering the input time interval as manual input;
if the determination condition of the manual input is not satisfied, the machine input is automatically determined.
And the execution display module is used for displaying the content in the text input box when the content falls into a preset range.
Referring to fig. 6, as a second embodiment of the intelligent text box input device of the present application, the intelligent text box input device further comprises an identification module, wherein the identification module is used for identifying the content of the captured wm_char message, and if the content is a valid character, recording the time and time interval of each wm_char message generation; if the content is invalid, the captured message is ignored, and the acquisition module acquires a new message again.
According to the intelligent text box input device, the text input objects are set through the setting module, so that function limitation on different input objects is realized; and capturing the WM_CHAR message and judging the average time interval t of the WM_CHAR message of the operating system through the acquisition module and the processing module avg Maximum interval time t max Standard deviation t of time interval dev Whether the data falls into a preset range or not is judged, so that the object of the input data is automatically identified; and further, the control of the input mode is realized, and the effectiveness and the correctness of the input data are improved. The technical problem that in the prior art, a text input box can only set two modes of forbidden input or allowed input is solved.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims (7)
1. An intelligent text box input method, comprising:
setting a text input object, wherein the text input object is only allowed to be manually input, only allowed to be machine input or both the manual input and the machine input;
monitoring and capturing WM_CHAR information of an operating system;
recording the time of each WM_CHAR message generation and the time interval of adjacent character generation, and storing the time in a time array;
counting numbers in a time arrayFrom this, the average time interval t is derived avg Maximum interval time t max Standard deviation t of time interval dev ;
Determining the calculated average time interval t avg Maximum interval time t max Standard deviation t of time interval dev Whether the input data falls into a preset range or not, wherein the preset range is different according to different text input objects which are initially set, and the preset range is obtained by collecting time parameter information of manual input data and machine input data and statistically analyzing an average time interval range R of manual input avgh Maximum interval time range R maxh Standard deviation range R of time interval devh Average time interval range R of machine input avgm Maximum interval time range R maxm Standard deviation range R of time interval devm ;
The method for judging whether the preset range is met is as follows:
if the set text input object is that only manual input is allowed, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh Judging that the preset range is fallen into, otherwise, not falling into;
if the set text input object is only allowed to be input by the machine, t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm Judging that the preset range is fallen into, otherwise, not falling into;
if the set text input object is the text input object allowing manual input and machine input, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh Or t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm Judging that the preset range is fallen into, otherwise, not falling into;
and when the content falls into the preset range, displaying the content in the text input box.
2. The intelligent text box input method of claim 1, wherein:
the input data takes the carriage return character as an input end mark, and if a single character is input and the time interval between the carriage return character and the previous character is more than 50ms, the input data is judged to be manually input;
if a plurality of characters are input and the average input time interval is greater than 50ms, determining that the characters are manually input;
if a plurality of characters are input and the maximum input time interval is greater than 100ms, determining that the characters are manually input;
if the number of the input characters is greater than 10, counting the standard deviation of the input time interval, and if the standard deviation value is greater than 15, considering the input time interval as manual input;
if the determination condition of the manual input is not satisfied, the machine input is automatically determined.
3. The intelligent text box input method according to claim 1, wherein data which does not fall within a preset range is directly abandoned and an error prompt is sent out.
4. The intelligent text box entry method of claim 1, wherein after listening to and capturing the operating system wm_char message, further comprising identifying the content of the wm_char message:
if the content is a valid character, recording the time of each WM_CHAR message generation and the time interval of adjacent character generation;
if the content is invalid character, the captured message is ignored.
5. The intelligent text box entry method of claim 4, wherein the valid characters include digits 0-9 and uppercase letters a-Z, lowercase letters a-Z.
6. An intelligent text box input device, comprising:
a setting module for setting a text input object, wherein the text input object is only allowed to be manually input, only allowed to be machine input or allowed to be manually input and machine input simultaneously;
the acquisition module is used for monitoring and capturing WM_CHAR information of the operating system, recording the time of each WM_CHAR information generation and the time interval of adjacent character generation, and storing the time intervals in a time array;
the processing module is used for calculating the data in the time array to obtain an average time interval t avg Maximum interval time t max Standard deviation t of time interval dev Judging whether the input data falls into a preset range, wherein the preset range is different according to different text input objects which are initially set, and the preset range is obtained by collecting time parameter information of manual input data and machine input data and statistically analyzing an average time interval range R of manual input avgh Maximum interval time range R maxh Standard deviation range R of time interval devh Average time interval range R of machine input avgm Maximum interval time range R maxm Standard deviation range R of time interval devm ;
The method for judging whether the preset range is met is as follows:
if the set text input object is that only manual input is allowed, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh Judging that the preset range is fallen into, otherwise, not falling into;
if the set text input object is only allowed to be input by the machine, t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm Judging that the preset range is fallen into, otherwise, not falling into;
if the set text input object is the text input object allowing manual input and machine input, t avg ∈R avgh ,t max ∈R maxh ,t dev ∈R devh Or t avg ∈R avgm ,t max ∈R maxm ,t dev ∈R devm Judging that the preset range is fallen into, otherwise, not falling into;
and the execution display module is used for displaying the content in the text input box when the content falls into a preset range.
7. The smart text box input device of claim 6, wherein the device further comprises:
the identification module is used for identifying the content of the captured WM_CHAR message, and if the content is a valid character, recording the time of generating each WM_CHAR message and the time interval of generating adjacent characters; if the content is invalid character, the captured message is ignored.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911422867.5A CN111124151B (en) | 2019-12-30 | 2019-12-30 | Intelligent text box input method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911422867.5A CN111124151B (en) | 2019-12-30 | 2019-12-30 | Intelligent text box input method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111124151A CN111124151A (en) | 2020-05-08 |
CN111124151B true CN111124151B (en) | 2023-08-18 |
Family
ID=70507862
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911422867.5A Active CN111124151B (en) | 2019-12-30 | 2019-12-30 | Intelligent text box input method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111124151B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106295422A (en) * | 2016-08-09 | 2017-01-04 | 深圳市证通电子股份有限公司 | Keyboard scanning method and device |
US9619045B1 (en) * | 2014-04-28 | 2017-04-11 | Amazon Technologies, Inc. | User input source identification based on delayed input |
CN109725815A (en) * | 2019-01-09 | 2019-05-07 | 北京数衍科技有限公司 | The differentiating method of scanner and keyboard data input |
-
2019
- 2019-12-30 CN CN201911422867.5A patent/CN111124151B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9619045B1 (en) * | 2014-04-28 | 2017-04-11 | Amazon Technologies, Inc. | User input source identification based on delayed input |
CN106295422A (en) * | 2016-08-09 | 2017-01-04 | 深圳市证通电子股份有限公司 | Keyboard scanning method and device |
CN109725815A (en) * | 2019-01-09 | 2019-05-07 | 北京数衍科技有限公司 | The differentiating method of scanner and keyboard data input |
Also Published As
Publication number | Publication date |
---|---|
CN111124151A (en) | 2020-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11158143B2 (en) | Vehicle diagnostic method and device, and computer readable storage medium | |
CN112363943B (en) | Buried point setting method and device, computer equipment and storage medium | |
CN112311617A (en) | Configured data monitoring and alarming method and system | |
CN103390163B (en) | A kind of Post address automatic acquiring method | |
CN111143167B (en) | Alarm merging method, device, equipment and storage medium for multiple platforms | |
CN201413534Y (en) | Digitized transformation patrolling device | |
CN107295082A (en) | Running software processing method, apparatus and system | |
CN109298882A (en) | Management method, computer readable storage medium and the terminal device of interface | |
CN107590490A (en) | Unanimous vote face information acquisition method, device and the computer-readable recording medium of invoice | |
US20020075246A1 (en) | Method of voting based on the dual input data entry paradigm | |
KR102459894B1 (en) | Infants and young children development analysis system using an online observation journal that records the development history of infants and young children | |
CN105930313A (en) | Method and device for processing notification message | |
CN118115939A (en) | Alarm event processing method and device, nonvolatile storage medium and electronic equipment | |
CN111124151B (en) | Intelligent text box input method and device | |
CN111695445A (en) | Face recognition method, device, equipment and computer readable storage medium | |
CN110209575A (en) | Test document generation method, device, electronic equipment and storage medium | |
CN109767546B (en) | Quality checking and scheduling device and quality checking and scheduling method for valuable bills | |
CN210402409U (en) | Scanner capable of intelligently identifying votes | |
KR20150142459A (en) | Automated system and method of instrument index | |
CN113190458A (en) | Method and device for automatically analyzing buried point data, computer equipment and storage medium | |
CN111061609A (en) | Log monitoring method and system | |
CN218729094U (en) | Intelligent form information input query system | |
CN110866241A (en) | Evaluation model generation and equipment association method, device and storage medium | |
CN109684159A (en) | Method for monitoring state, device, equipment and the storage medium of distributed information system | |
CN104050470A (en) | Police fingerprint exemplary-case screening device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |