CN109725815B - Method for distinguishing data input of scanning gun and keyboard - Google Patents

Method for distinguishing data input of scanning gun and keyboard Download PDF

Info

Publication number
CN109725815B
CN109725815B CN201910020060.2A CN201910020060A CN109725815B CN 109725815 B CN109725815 B CN 109725815B CN 201910020060 A CN201910020060 A CN 201910020060A CN 109725815 B CN109725815 B CN 109725815B
Authority
CN
China
Prior art keywords
data
data input
keyboard
input
distinguishing
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
Application number
CN201910020060.2A
Other languages
Chinese (zh)
Other versions
CN109725815A (en
Inventor
李文哲
赵树新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Data Driven Technology Co ltd
Original Assignee
Beijing Data Driven Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Data Driven Technology Co ltd filed Critical Beijing Data Driven Technology Co ltd
Priority to CN201910020060.2A priority Critical patent/CN109725815B/en
Publication of CN109725815A publication Critical patent/CN109725815A/en
Application granted granted Critical
Publication of CN109725815B publication Critical patent/CN109725815B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a method for distinguishing various scanning guns from keyboard data input, which mainly adopts a data packet quantity distinguishing mode or a data packet interval distinguishing mode, and can also be assisted with a data format distinguishing mode to carry out secondary distinguishing on scanning gun data input after primary distinguishing by the data packet quantity distinguishing mode or the data packet interval distinguishing mode, and judges the data input with a keyboard input unique format as keyboard data input, wherein the data packet quantity distinguishing mode distinguishes the keyboard data input and the scanning gun data input according to the data packet quantity of the data input, and the data packet interval distinguishing mode distinguishes the keyboard data input and the scanning gun data input according to the time interval between data packets of the data input. The invention allows an application party to realize data differentiation on the intermediate layer filter driver without any modification on hardware, and can be used in upstream data acquisition and other occasions of the big data industry, so that the data acquisition is more accurate and the data classification is more definite.

Description

Method for distinguishing data input of scanning gun and keyboard
Technical Field
The invention relates to a distinguishing method for data input of a scanning gun and a keyboard.
Background
The scanning gun is a high-tech product with closely combined optical, mechanical, electronic, software application and other technologies, and is a third generation of main computer input equipment following a keyboard and a mouse. The scanning gun has the greatest benefit of replacing manual recording and is the main function of the scanning gun. To input a series of numbers, if a bar code is provided without a scanning gun, the manual input of the numbers is needed, if the numbers are long, the numbers are easy to be mistaken, if the numbers are pressed by the scanning gun, the numbers are determined, and the error rate is very low!
With the wider application range of the scanning gun, the applications brought by the scanning gun are more and more, and many applications are that different processing results are correspondingly made according to the scanning gun and the keyboard, but in order to facilitate the installation and the use of the code scanning gun, manufacturers can drive the code scanning gun to be the same as the keyboard, and do not distinguish the scanning gun input from the keyboard input, so that the applications of separately processing the scanning gun data and the keyboard data are limited.
Disclosure of Invention
The invention aims to realize the distinguishing of the data input of the scanning gun and the data input of the keyboard under the condition of not modifying hardware.
The technical scheme of the invention is as follows: a method for distinguishing scan gun from keyboard data input includes judging data input as keyboard data input when data packet number is keyboard input data packet number corresponding to data input, judging data input as scan gun data input when data packet number is less than keyboard input data packet number corresponding to data input.
A method for distinguishing scan gun from keyboard data input includes using time interval between data packets of data input to distinguish keyboard data input from scan gun data input, judging that said data input is keyboard data input when time interval between data packets is greater than distinguishing threshold of time interval, and judging that said data input is scan gun data input when time interval between data packets is less than distinguishing threshold of time interval.
The discrimination threshold for the time interval may be 40 ms.
A method for distinguishing a scan gun from a keyboard data input, wherein the keyboard data input and the scan gun data input are once distinguished according to the number of data packets of the data input, the data input is once judged as the keyboard data input when the number of data packets is the number of keyboard input data packets corresponding to the data input, the data input is once judged as the scan gun data input when the number of data packets is less than the number of keyboard input data packets corresponding to the data input, the data input once judged as the scan gun input is secondarily distinguished according to the data format, the data input twice in which a unique format (a format in which the scan gun data input does not exist) including the keyboard data input is judged as the keyboard data input, but the data input in which a unique input (an input character and a format and the like in which the scan gun additionally exists) is included is not judged as the keyboard data input in the secondary distinction, and inputting data which is determined as keyboard data input for the first time and is determined as keyboard data input for the second time as finally determined keyboard data input, and inputting data which is not determined as keyboard data input in the second time division as finally determined scanning gun data input.
A method for distinguishing a scan gun from a keyboard data input, wherein the keyboard data input and the scan gun data input are once distinguished according to a time interval between data packets of the data input, the data input is once judged as the keyboard data input when the time interval between the data packets is greater than a distinguishing threshold of the time interval, the data input is once judged as the scan gun data input when the time interval between the data packets is less than the distinguishing threshold of the time interval, the data input once judged as the scan gun data input is secondarily distinguished according to a data format, the data input twice in a unique format (a format in which the scan gun data input does not exist) in which the keyboard data input is included is judged as the keyboard data input, but the data input in a unique format (an input character and a format and the like in which the scan gun does not exist) in which the scan gun additionally exists is not judged as the keyboard data input in the secondary distinguishing, and inputting data which is determined as keyboard data input for the first time and is determined as keyboard data input for the second time as finally determined keyboard data input, and inputting data which is not determined as keyboard data input in the second time division as finally determined scanning gun data input.
The discrimination threshold for the time interval may typically be 40 ms.
For the above various distinguishing methods, it is preferable to set a filter driver between the application layer and the function driver to distinguish between the keyboard data input and the scan gun data input.
The invention has the beneficial effects that: by setting the filtering drive, according to different characteristics of scanning gun data input and keyboard data input, effective identification and distinguishing of the scanning gun data input and the keyboard data input are achieved, the data acquisition part is moved to the driving layer for analysis, then an analysis result is transmitted to the application layer, the driving layer belongs to the bottommost layer of data, so that the time for obtaining information is more prior and more accurate, and logical judgment such as keyboard keys is added, so that the data distinguishing accuracy in actual use reaches 100%, therefore, an application party can realize data distinguishing on the middle layer filtering drive without any modification on hardware. The invention can be used in upstream data acquisition of big data industry, so that the data acquisition is more accurate, the data classification is more definite, the key role is played for the following data analysis of big data, and the invention can also be used in other applications needing to distinguish the input of a scanning gun and the input of a keyboard.
Drawings
Fig. 1 is a drive architecture to which the present invention relates.
Detailed Description
Referring to fig. 1, the present invention relates to a method for accurately distinguishing scan gun data from keyboard data, and an application side can realize data distinguishing on a middle layer filter driver without any modification to hardware, and is used in any field where scan gun and keyboard data need to be distinguished.
The method for distinguishing the code scanning gun data from the keyboard data mainly comprises data packet distinguishing and data interval distinguishing, data format distinguishing can be set, various distinguishing modes are combined for use, and the success rate of distinguishing the code scanning gun data from the keyboard data in practice is 100%.
The windows subsystem sends an IO reading request to keyboard type equipment, the keyboard type equipment drives the keyboard type equipment to read keyboard input, data is filled in an IO request packet and returned to the subsystem, the keyboard data input and the scanning gun data input are distinguished by setting filtering drive, and the distinguished keyboard data input and the distinguished scanning gun data input can be identified according to the prior art.
The invention uses the number of data packets, the receiving interval of the data packets, the data format and other modes to distinguish the code scanning gun from the keyboard data. The data of the scanning gun is controlled by a drive, the data interval of each scanning input is relatively fixed, and the time interval is relatively short, but the judgment mode has larger time delay and higher error rate when the data is processed at an application layer. Then, the keyboard keys and other logic judgment are carried out, so that the data accuracy reaches 100%.
Examples of the various ways of differentiation:
1) data packet quantity distinguishing mode
For the same set of key "abc" inputs, if the keyboard is used for input, the subsystem needs to send 6 IO read requests to obtain, which are the first packet { a is pressed down }, the second packet { a is popped up }, the third packet { b is pressed down }, the fourth packet { b is popped up }, the fifth packet { c is pressed down } and the sixth packet { c is popped up }. And sweep yard rifle input, the subsystem only needs to send and read the request and just can acquire less than 6 IO, because IO buffer area size supports to read a plurality of buttons, but the number of reading at every turn is not fixed, can be three packets: { a press }, { a bounce, b press, b bounce, c press } and { c bounce }, or two packets: { a is pressed down } and { a is bounced, b is pressed down, b is bounced, c is pressed down, c is bounced }, therefore, data packets can be distinguished according to the number of data packets input by keyboard, when the number of data packets is the number of data packets input by keyboard, the data packets are judged as keyboard data, when the number of data packets is less than the number of data packets input by keyboard, the data packets are judged as scanning gun input, the reason for the difference is that the input speed of the scanning gun is high, and in practice, the distinguishing mode can obtain high enough accuracy.
2) Data packet interval distinguishing mode
When the subsystem reads the code scanning gun data, the time interval between every two packets is less than 40ms, and the keyboard is difficult to achieve the speed through manual normal input, so that the time interval between every two packets is less than 40ms and can be regarded as the input of the scanning gun, and the time interval between every two packets is more than 40ms and can be regarded as the input of the keyboard.
However, after testing, when the keyboard presses a plurality of keys simultaneously, the interval of each packet is less than 40ms, so it is preferable to combine this distinguishing and judging method with the data format distinguishing method to obtain higher precision.
3) Data format distinguishing mode
The input information of the code scanning equipment comprises characters, Shift and Enter, some code scanning equipment is additionally provided with an Ext extended key at the back, and the formats of input data of the code scanning equipment of different manufacturers are different and are mainly distinguished in capital characters. Such as a set of keys "Abc", format 1: { Shift press, a pop up, Shift pop up, b press, b pop up, c press down, c pop up }, format 2: (Shift press, a press, Shift pop, a pop, b press, b pop, c press, c pop), but the keys of a scanned code are all in full order, and there will not be a key press that does not lift or disorderly order, e.g., { a press, b press, c press, b pop, c pop, a pop } data format would only be keyboard input, and the scan gun input "abc" data format would only be { a press, a pop, b press, b pop, c press, c pop }. Therefore, it can be determined that there is a format in which one key is pressed and then the key is not lifted or lifted out of order (not immediately pressed) in the data packet as a keyboard input.
In addition, the last input button of the code scanning gun must be Enter. Therefore, it is possible to determine that the last input key is not Enter as a keyboard input.
The distinguishing method of the scanning gun and the keyboard input method can be carried out in any combination mode and arrangement sequence according to the distinguishing methods, and the distinguishing method can be obviously distinguished from the implemented distinguishing method and does not enter the subsequent distinguishing method any more.
The distinction can be made only in the way of the number of packets or only in the way of the packet time interval.
The data to be determined as the keyboard input in the first division is determined as the keyboard input, the rest of the data to be determined as the scanning gun input in the final determination is determined as the keyboard input, and the first division and the second division are determined as the keyboard input in the final determination. In the first distinguishing, the data judged as the keyboard input is marked with the keyboard input data, and the data not marked with the keyboard input in the first distinguishing is marked with the keyboard input data in the second distinguishing, and in the second distinguishing, the data judged as the keyboard input is marked with the keyboard input data, and the data not marked with the keyboard input data after the second distinguishing is marked with the scanning gun input data.
The data to be judged as the keyboard input in the first division is judged as the keyboard input, the rest of the data to be judged as the scanning gun input in the final judgment is judged as the keyboard input, and the first division is judged as the keyboard input and the second division is judged as the keyboard input in the final judgment. In the first distinguishing, the data judged as the keyboard input is marked with the keyboard input data, and the data not marked with the keyboard input in the first distinguishing is marked with the keyboard input data in the second distinguishing, and in the second distinguishing, the data judged as the keyboard input is marked with the keyboard input data, and the data not marked with the keyboard input data after the second distinguishing is marked with the scanning gun input data.
The technical means disclosed by the invention can be combined arbitrarily to form a plurality of different technical schemes except for special description and the further limitation that one technical means is another technical means.

Claims (2)

1. A method for distinguishing scan gun from keyboard data input includes judging data input to be keyboard data input when data packet number is keyboard input data packet number corresponding to data input, judging data input to be scan gun data input when data packet number is less than keyboard input data packet number corresponding to data input, setting filter driver between application layer and function driver to distinguish keyboard data input from scan gun data input, identifying distinguished keyboard data input and scan gun data input and transmitting it to application layer.
2. A method for distinguishing a scan gun from a keyboard data input, the keyboard data input and the scan gun data input are once distinguished according to the number of data packets of the data input, the data input is judged as the keyboard data input once when the number of data packets is the number of keyboard input data packets corresponding to the data input, the data input is judged as the scan gun data input once when the number of data packets is less than the number of keyboard input data packets corresponding to the data input, the data input which is judged as the scan gun input once is secondarily distinguished according to the data format, the data input which is an exclusive format and contains the keyboard data input is secondarily judged as the keyboard data input secondarily, but the data input which contains the exclusive input added by the scan gun is not judged as the keyboard data input in the secondary distinguishing, the data input which is judged as the keyboard data input once and is secondarily judged as the keyboard data input finally judged, and taking the data input which is not judged as the keyboard data input in the secondary distinguishing as the finally judged scanning gun data input, setting a filtering driver between the application layer and the function driver to distinguish the keyboard data input from the scanning gun data input, identifying the distinguished keyboard data input and scanning gun data input, and transmitting the identified keyboard data input and scanning gun data input to the application layer.
CN201910020060.2A 2019-01-09 2019-01-09 Method for distinguishing data input of scanning gun and keyboard Active CN109725815B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910020060.2A CN109725815B (en) 2019-01-09 2019-01-09 Method for distinguishing data input of scanning gun and keyboard

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910020060.2A CN109725815B (en) 2019-01-09 2019-01-09 Method for distinguishing data input of scanning gun and keyboard

Publications (2)

Publication Number Publication Date
CN109725815A CN109725815A (en) 2019-05-07
CN109725815B true CN109725815B (en) 2021-02-23

Family

ID=66298941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910020060.2A Active CN109725815B (en) 2019-01-09 2019-01-09 Method for distinguishing data input of scanning gun and keyboard

Country Status (1)

Country Link
CN (1) CN109725815B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532210B (en) * 2019-08-07 2021-10-22 北京数衍科技有限公司 Bridging method for safely acquiring data of any output device of operating system
CN111045529B (en) * 2019-12-13 2024-01-26 金蝶智慧科技(深圳)有限公司 Data input method, system and related equipment
CN111124151B (en) * 2019-12-30 2023-08-18 杭州涂鸦信息技术有限公司 Intelligent text box input method and device
CN111626073A (en) * 2020-05-29 2020-09-04 浙江百世技术有限公司 Optimization method for code scanning gun identification
CN112068218A (en) * 2020-09-14 2020-12-11 北京数衍科技有限公司 Self-adaptive detection method and device for pedestrian steps

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1310397A (en) * 2000-02-24 2001-08-29 英业达股份有限公司 Computer keyboard testing method
CN1430814A (en) * 2000-06-02 2003-07-16 汤姆森特许公司 Prevention of incompatable keyboard selections from being entered during power initilization
CN1941634A (en) * 2005-09-30 2007-04-04 英群企业股份有限公司 Keyboard
CN1979387A (en) * 2005-12-06 2007-06-13 迅杰科技股份有限公司 Keyboard device with direction-pointing function and method
CN201114285Y (en) * 2007-08-01 2008-09-10 胡平 Telephone possessing character bar-code input recognition and automatic dial function
CN104423559A (en) * 2013-09-09 2015-03-18 陕西易云网络科技有限公司 Method for carrying out function operation on computer by using bar code

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8341303B2 (en) * 2008-06-30 2012-12-25 Intel Corporation Asymmetrical universal serial bus communications
CN101943948B (en) * 2009-07-07 2012-11-14 扬智科技股份有限公司 Keyboard scanning device and keyboard scanning method
CN106020665B (en) * 2016-05-16 2019-03-29 联想(北京)有限公司 A kind of information control method, apparatus and system
CN106293132B (en) * 2016-08-17 2019-03-05 飞天诚信科技股份有限公司 A kind of method and keyboard filter driving improving keyboard input correctness

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1310397A (en) * 2000-02-24 2001-08-29 英业达股份有限公司 Computer keyboard testing method
CN1430814A (en) * 2000-06-02 2003-07-16 汤姆森特许公司 Prevention of incompatable keyboard selections from being entered during power initilization
CN1941634A (en) * 2005-09-30 2007-04-04 英群企业股份有限公司 Keyboard
CN1979387A (en) * 2005-12-06 2007-06-13 迅杰科技股份有限公司 Keyboard device with direction-pointing function and method
CN201114285Y (en) * 2007-08-01 2008-09-10 胡平 Telephone possessing character bar-code input recognition and automatic dial function
CN104423559A (en) * 2013-09-09 2015-03-18 陕西易云网络科技有限公司 Method for carrying out function operation on computer by using bar code

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JAVA读取USB扫描枪;杨尚川;《https://www.oschina.net/code/snippet_121944_14940》;20121030;1-11 *

Also Published As

Publication number Publication date
CN109725815A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN109725815B (en) Method for distinguishing data input of scanning gun and keyboard
US6738519B1 (en) Character recognition apparatus
KR100625755B1 (en) Character recognition apparatus, character recognition method, medium processing method and computer readable recording medium having character recognition program
JPS5955574A (en) Mark sheet reader
US7925082B2 (en) Information processing apparatus, information processing method, computer readable medium, and computer data signal
CN112182577A (en) Android malicious code detection method based on deep learning
CN1207924C (en) Method for testing face by image
CN109684803A (en) Man-machine verification method based on gesture sliding
CN108764352A (en) Duplicate pages content detection algorithm and device
EP0549505A2 (en) Method of and apparatus for optical character recognition based on geometric and color attribute hypothesis testing
US4277775A (en) Character recognition system
CN100357957C (en) Character recognition apparatus and method for recognizing characters in image
US4623935A (en) Picture extracting apparatus
WO2024078394A1 (en) Image quality evaluation method and apparatus, and electronic device, storage medium and program product
CN111046770B (en) Automatic labeling method for photo archive characters
US6862370B2 (en) Image detecting method, image detecting system, program, and recording medium for image detection
EP0096717B1 (en) Method and apparatus for recognizing an unknown character
US3713097A (en) Test bit pattern generator for pattern recognition machines
US5835625A (en) Method and apparatus for optical character recognition utilizing proportional nonpredominant color analysis
US20050094861A1 (en) Positional synchronization in a multivoting character recognition environment
US20030123730A1 (en) Document recognition system and method using vertical line adjacency graphs
CN114185785A (en) Natural language processing model test case reduction method for deep neural network
AU613013B2 (en) Data acquisition control method and system for a hand held reader
CN111401484A (en) Verification code identification method and system based on target detection method
CN1327193A (en) Method for detecting keyboard array short circuit

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