Summary of the invention
Fundamental purpose of the present invention is to provide a kind of finger prints processing device and control method and control device, and is single to solve finger prints processing device and host computer communication mode, the problem that use occasion is limited.
To achieve these goals, according to an aspect of the present invention, provide a kind of control method of finger prints processing device.
Control method according to finger prints processing device of the present invention comprises: obtain user fingerprints information by the first transmission channel; According to user fingerprints Information generation process information; The communication link sign that inquiry is default, wherein, the communication link sign comprises the first sign and the second sign, when the finger prints processing device is connected to host computer, the communication link flag set is the second sign, when the finger prints processing device received the host computer order, the communication link flag set was the first sign; When the communication link that inquires was masked as for first when sign, by the first transmission channel transmission process information to host computer; When the communication link that inquires is masked as the second sign, according to the keypad character coded format process information is encoded; And by the process information after the second transmission channel transfer encoding to host computer, wherein, the first transmission channel and the second transmission channel are the Different Logic transmission channel on the Same Physical transmission channel.
Further, before obtaining user fingerprints information by the first transmission channel, method also comprises: receive the fingerprint collecting order that host computer issues, wherein, obtaining user fingerprints information by the first transmission channel comprises: gather user fingerprints information according to fingerprint collecting order control fingerprint sensor; And obtain the user fingerprints information that fingerprint sensor collects by the first transmission channel.
Further, before obtaining user fingerprints information by the first transmission channel, whether method: detecting has the finger contact fingerprint sensor if also comprising, wherein, obtaining user fingerprints information by the first transmission channel comprises: when having detected the finger contact fingerprint sensor, the control fingerprint sensor gathers user fingerprints information; And obtain the user fingerprints information that fingerprint sensor collects by the first transmission channel.
Further, fingerprint sensor is connected with infrared detecting device, and before whether detection had the finger contact fingerprint sensor, the method also comprised: when infrared pick-up unit detected the user, the control fingerprint sensor was converted to mode of operation by park mode.
Further, comprise according to user fingerprints Information generation process information: judge that whether registered fingerprint quantity is less than default fingerprint amount threshold; When registered fingerprint quantity during less than default fingerprint amount threshold, user fingerprints information and registered fingerprint are compared; With comparison result as process information; And when registered fingerprint quantity during more than or equal to default fingerprint amount threshold, with user fingerprints information as process information.
Further, process information encoded according to the keypad character coded format comprise: when generating process information according to comparison result, standard according to keypad protocol is converted into ASCII character with comparison result, when user fingerprints information during as process information, user fingerprints information is carried out the Base64 coding, form character visible, and according to the standard of keypad protocol character visible is converted into ASCII character.
To achieve these goals, according to a further aspect in the invention, provide a kind of control device of finger prints processing device.
Control device according to finger prints processing device of the present invention comprises the first transmission channel and the second transmission channel, wherein, the first transmission channel and the second transmission channel are the Different Logic transmission channel on the Same Physical transmission channel, this control device also comprises: acquisition module is used for obtaining user fingerprints information by the first transmission channel; Generation module is used for according to user fingerprints Information generation process information; Enquiry module, be used for the default communication link sign of inquiry, wherein, the communication link sign comprises the first sign and the second sign, when the finger prints processing device is connected to host computer, the communication link flag set is the second sign, and when the finger prints processing device received the host computer order, the communication link flag set was the first sign; And coding module, be used for when the communication link that inquires is masked as the second sign, according to the keypad character coded format process information is encoded, wherein, when the communication link that inquires is masked as the first sign, the first transmission channel is used for transmission process information to host computer, and when the communication link that inquires was masked as the second sign, the process information after the second transmission channel is used for encoding transferred to host computer.
Further, this control device also comprises: receiver module, be used for before gathering user fingerprints information by the first transmission channel, receive the fingerprint collecting order that host computer issues, wherein, acquisition module comprises: first gathers submodule, is used for gathering user fingerprints information according to fingerprint collecting order control fingerprint sensor; And first obtain submodule, is used for obtaining user fingerprints information by the first transmission channel.
Further, this control device also comprises: detection module, be used for before gathering user fingerprints information by the first transmission channel, whether detect has the finger contact fingerprint sensor, wherein, acquisition module comprises: second gathers submodule, is used for when having detected the finger contact fingerprint sensor, and the control fingerprint sensor gathers user fingerprints information; And second obtain submodule, is used for obtaining user fingerprints information by the first transmission channel.
Further, generation module comprises: judge submodule, be used for judging that whether registered fingerprint quantity is less than default fingerprint amount threshold; The comparer module is used for when registered fingerprint quantity during less than default fingerprint amount threshold user fingerprints information and registered fingerprint being compared; First generates submodule, is used for comparison result as process information; And second generate submodule, be used for when registered fingerprint quantity during more than or equal to default fingerprint amount threshold, with user fingerprints information as process information.
Further, coding module comprises: the first coding submodule, be used for when according to comparison result generation process information, and according to the standard of keypad protocol comparison result is converted into ASCII character; And the second coding submodule, be used for when user fingerprints information during as process information user fingerprints information being carried out the Base64 coding, the formation character visible, and according to the standard of keypad protocol character visible is converted into ASCII character.
To achieve these goals, according to another aspect of the invention, provide a kind of finger prints processing device.
Finger prints processing device according to the present invention comprises the control device of any one finger prints processing device provided by the invention.
By the present invention, adopt the control method of the finger prints processing device that may further comprise the steps: obtain user fingerprints information by the first transmission channel; According to user fingerprints Information generation process information; The communication link sign that inquiry is default; When the communication link that inquires was masked as for first when sign, by the first transmission channel transmission process information to host computer; When the communication link that inquires is masked as the second sign, according to the keypad character coded format process information is encoded; And by the process information after the second transmission channel transfer encoding to host computer, wherein, the first transmission channel and the second transmission channel are the Different Logic transmission channel on the Same Physical transmission channel, by two logical transport passage work, communicate by letter to adapt to from different host computers, thereby can with the host exchanging data of shielding mass storage class USB mouth, again can with the host exchanging data of only supporting HID keyboard communication class USB mouth, solved the finger prints processing device and the host computer communication mode is single, the problem that use occasion is limited, and then reached the finger prints processing device and the host computer communication mode is flexible, applicable situation is not limited, can automatically adopt the effect of different communication methods according to different host computers.
Embodiment
Need to prove that in the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.Describe below with reference to the accompanying drawings and in conjunction with the embodiments the present invention in detail.
The finger prints processing device that this embodiment of paper provides.
Fig. 1 is the building-block of logic according to the finger prints processing device of the embodiment of the invention, and as shown in Figure 1, this finger prints processing device comprises CPU, power supply, USB mouth, acousto-optic hint device, sensor and infrared detector.
CPU is the control center of fingerprint treating apparatus; Power supply can be built-in electric storage device, also can connect outside civil power for power supply change-over device; The USB mouth is used for connecting host computer; The acousto-optic hint device is controlled by CPU, realizes the purposes such as alarm, duty prompting; Sensor has mode of operation and park mode, when being in mode of operation, the user's finger contacts sensor, CPU control sensor is finished the collection of finger print information, there is not within the predetermined time user's feeler, sensor is park mode by working mode change, detect the user when the finger prints processing device when being in park mode and infrared detector, CPU control sensor is converted to mode of operation by park mode, to carry out the preparation that gathers finger print information, by the switching of two kinds of mode of operations, can reach energy-saving and cost-reducing effect.Wherein come the mode of translative mode by the testing result of infrared detector, steering logic is simple, and can in time wake sensor before the user restrains fingerprint up.
Wherein, when the finger prints processing device is connected with host computer by the USB mouth, this host computer can be for supporting the main frame of non-large capacity class storage protocol USB mouth, for example support the computing machine of self-defined HID communication class USB mouth, this computing machine can be via sending instructions under the USB mouth, host computer can be resolved the report descriptor of HID equipment (also being the finger prints processing device) when enumerating, according to agreement and the HID device talk in the report descriptor, mainly be to realize the report descriptor according to the needs of own actual communication in self-defined HID equipment, reach the purpose with upper machine communication, some agreements that in the data of communication, can add oneself, for convenience of description, this embodiment is defined as first kind host computer with such host computer; For example support the USB mouth printer of HID keyboard communications protocol, this printer can receive the data of uploading via the USB mouth, but itself can not send instructions down, and equally for convenience of description, this embodiment is defined as the Equations of The Second Kind host computer with such host computer.
The finger prints processing device can adopt different mode of operations automatically according to the inhomogeneity host computer during to above-mentioned any host computer the transmission of data, and concrete steering logic is as follows:
Same Physical transmission channel at the USB mouth arranges two different logical transport passages, and wherein the first transmission channel is carried out data transmission based on the HID basic agreement, and the second transmission channel is as the master control passage, and this tunnels analogy HID keypad protocol is carried out data transmission.The finger prints processing device can be worked under two kinds of patterns, and a kind of is monitoring mode, and another kind is management mode, and wherein, monitoring mode is the mode of operation of acquiescence:
When monitoring mode moves, if the user restrains fingerprint and finger prints processing device when not receiving the instruction that host computer issues at sensor, obtain finger print information by the first transmission channel, then the recognizer program is processed finger print information according to default control algolithm and is obtained process information, process information is encoded according to the keypad character coding by coded program again, be converted into the coded message of keyboard format, process information after the second last transmission channel will be encoded is uploaded to the host computer of connection, can realize the data transmission of finger prints processing device and Equations of The Second Kind host computer under this pattern;
After if the finger prints processing device receives the instruction that host computer issues, the finger prints processing device is converted to the management mode operation by monitoring mode, when management mode is moved, after the instruction that issues according to the host computer that receives, obtain finger print information by the first transmission channel, then the recognizer program is processed finger print information with the instruction that issues according to default control algolithm and is obtained process information, last the first transmission channel is uploaded to the host computer of connection with process information, can realize the data transmission of finger prints processing device and first kind host computer under this pattern.
The finger prints processing device that adopts this embodiment to provide, by two logical transport passage work, communicate by letter to adapt to from different host computers, thereby can with the host exchanging data of shielding mass storage class USB mouth, access the USB interface of self-defined HID control mode, again can with the host exchanging data of supporting HID keyboard communication class USB mouth, access the USB interface of the HID control in the embedded main device, reached the finger prints processing device and the host computer communication mode is flexible, applicable situation is not limited, can automatically adopt the effect of different communication methods according to different host computers.
Secondly, introduce the control device of the finger prints processing device that this embodiment provides, need to prove, below any one control device all can be applicable to any one above-mentioned finger prints processing device.
Fig. 2 is the control device theory diagram according to the finger prints processing device of first embodiment of the invention, as shown in Figure 2, this control device comprises the first transmission channel 50, the second transmission channel 60, acquisition module 10, generation module 20, enquiry module 30 and coding module 40, wherein, the first transmission channel 50 and the second transmission channel 60 are the Different Logic transmission channel on the Same Physical transmission channel, the first transmission channel 50 can be carried out data transmission based on the HID basic agreement, and the second transmission channel 60 can be carried out data transmission based on the HID keypad protocol.
Acquisition module 10 is used for obtaining user fingerprints information by the first transmission channel 50, can be finished by fingerprint sensor the collection of finger print information, then acquisition module 10 gets access to finger print information via the first transmission channel 50, particularly, can carry out fingerprint by user's trigger sensor gathers automatically, also can carry out fingerprint collecting according to the instruction that host computer issues, the communication link sign is set as global variable in control device inside, when the finger prints processing device powers on, the communication link sign be initialised set be second the sign, when the finger prints processing device received the host computer order, the set of communication link sign was the first sign.
After getting access to user fingerprints information, generation module 20 is according to user fingerprints Information generation process information, can be according to the needs of environment for use, corresponding Processing Algorithm prestores in inside, user fingerprints information processed obtain process information, such as alignment algorithm of fingerprint etc., also can carry out according to the host computer order that receives the processing of finger print information.
After carrying out the finger print information processing, the default communication link sign of enquiry module 30 inquiries is to determine adopting which passage to carry out data transmission.
Do not receive the order of host computer when the finger prints processing device, automatically gather but carry out fingerprint by user's trigger sensor, this moment, the communication link sign still indicated for second of acquiescence, then coding module 40 is encoded to process information according to the keypad character coded format, so that the process information behind the coding meets the HID keypad protocol, the process information after then will encoding via the second transmission channel 60 transfers to host computer.
Receive the order of host computer when the finger prints processing device, carry out fingerprint collecting according to host computer instruction control sensor, this moment, the communication link sign was set to the first sign by the second sign of acquiescence, this host computer USB mouth is supported self-defined HID communications protocol, thereby can utilize the first transmission channel 50 directly process information to be transferred to host computer.
Adopt the control device of the finger prints processing device that this embodiment provides, by two logical transport passage work, communicate by letter to adapt to from different host computers, thereby can with the host exchanging data of shielding mass storage class USB mouth, access the USB interface of self-defined HID control mode, again can with the host exchanging data of only supporting HID keyboard communication class USB mouth, access the USB interface of the HID control in the embedded main device, reached the finger prints processing device and the host computer communication mode is flexible, applicable situation is not limited, can automatically adopt the effect of different communication methods according to different host computers.
Preferably, for Real-time Obtaining host computer type, control device shown in Figure 2 also comprises receiver module and detection module.Wherein, when the host computer of finger prints processing device connection is aforesaid first kind host computer, the user can be by host computer to finger prints processing device transmitting order to lower levels, for example carry out fingerprint register or fingerprint comparison finger print information need to be gathered the time as the user, input corresponding control command to host computer, host computer sends to the finger prints processing device with the fingerprint collecting order, and receiver module is used for receiving the fingerprint collecting order that host computer issues.After receiver module receives acquisition, first of acquisition module gathers submodule and gathers user fingerprints information according to fingerprint collecting order control fingerprint sensor, then first obtain submodule and obtain user fingerprints information by the first transmission channel, simultaneously, after receiving the order that host computer issues, the communication link sign is set to the first sign by the second sign of acquiescence, so that the first transmission channel is finished the data transmission with host computer.
When the host computer of finger prints processing device connection is aforesaid Equations of The Second Kind host computer, the user can't be by host computer to finger prints processing device transmitting order to lower levels, at this moment, the right-falling stroke sensor as long as the user press...withes one's finger, when detection module detects user's action, second of acquisition module gathers submodule control fingerprint sensor and gathers user fingerprints information, then second obtain submodule and obtain user fingerprints information by the first transmission channel, owing to do not receive the order that host computer issues, then the communication link sign still indicates for second of acquiescence, need to carry out to the data that will transmit the coding of keyboard format this moment, and the data upload after will encoding by the second transmission channel is to host computer.
Preferably, the generation module in the control device shown in Figure 2 comprises that judgement submodule, comparer module, first generate submodule and second and generate submodule.When obtaining process information according to finger print information, with registered fingerprint quantity in the finger prints processing device as Rule of judgment, to carry out different processing, wherein, judge that submodule judges that whether registered fingerprint quantity is less than default fingerprint amount threshold, when registered fingerprint quantity during less than default fingerprint amount threshold, user fingerprints information and registered fingerprint are compared, and then first generate submodule with comparison result as process information, when registered fingerprint quantity during more than or equal to default fingerprint amount threshold, do not carry out fingerprint comparison, second generate submodule directly with finger print information as process information.When the fingerprint that in registered fingerprint, obtains being complementary with user fingerprints information, also be that comparison result is comparison when correct, first generates submodule can get access to user ID corresponding to user fingerprints information, and user ID is uploaded to host computer as comparison result; When the fingerprint that in registered fingerprint, do not obtain being complementary with user fingerprints information, also be that comparison result is when comparing mistake, first generates submodule can generate the wrong corresponding information of comparison and be uploaded to host computer, and the fingerprint comparison device is by the wrong prompting of the information outputs such as sound, light, electricity comparison simultaneously.
Adopt the preferred embodiment, when registered fingerprint quantity more than or equal to default fingerprint amount threshold, the long low-response consuming time of comparing, do not carry out the comparison of fingerprint this moment in the finger prints processing device, but finger print information is directly sent to host computer, finished the comparison of fingerprint by host computer.The finger prints processing device only carries out fingerprint comparison in registered fingerprint quantity during less than default fingerprint amount threshold, thereby can export faster the fingerprint comparison result, avoids the finger prints processing device not have for a long time the problem of the poor user experience that response brings.
Further preferably, coding module 40 comprises the first coding submodule and the second coding submodule, wherein, when process information is comparison result, the first coding submodule is used for according to the standard of keypad protocol comparison result being converted into ASCII character, and when user fingerprints information during as process information, the second coding submodule is used for user fingerprints information is carried out the Base64 coding, form character visible, and according to the standard of keypad protocol character visible is converted into ASCII character.
Adopt this optimal way to finish information coding, if when carrying out fingerprint comparison in finger prints processing device inside, do not need to carry out the base64 coding, the ASCII coding of comparison result according to the keyboard of simulation returned, not comparison in device, to carry out online comparison right but user fingerprints information is sent to background server, at first to carry out the base64 coding to user fingerprints information, simulating keyboard carries out the ASCII coding again, coding step is simple, adopt different coding steps for different content, the coding processing speed is fast.
Synoptic diagram when the control device that Fig. 3 and Fig. 5 show respectively this second embodiment is operated in different mode, such as Fig. 3 or shown in Figure 5, the control device of this second embodiment comprise fingerprint collecting unit (also being acquisition module), finger prints processing unit, fingerprint comparison unit (the function combination of finger prints processing unit and fingerprint comparison unit is identical with the function of generation module in embodiment illustrated in fig. 2), storage unit, the first transmission channel, the second transmission channel, monitoring and scheduling unit (function of monitoring and scheduling unit and embodiment illustrated in fig. 2 in enquiry module).
Wherein, the fingerprint collecting unit is used for the collection of completing user finger print information; The finger prints processing unit is used for finishing carrying out the image processing process such as filtering to collecting finger print information; Finger print information after the fingerprint comparison unit is used for processing and the registered finger print information of storage are compared; Storage unit is used for storing registered finger print information; The effect of the first transmission channel and the second transmission channel all corresponding and embodiment illustrated in fig. 2 in transmission channel identical, repeat no more herein; The monitoring and scheduling unit is used for determining to adopt which passage and host computer to carry out data transmission.
The control device of this embodiment with the HID agreement as the basis, two transmission channel mode of operations have been designed, realize data transmission based on HID simulating keyboard agreement and HID custom protocol respectively, on the Same Physical transmission channel, realize two logical transport passages, and the formulation by mode of operation overcomes the main frame of the large storage protocol class device of shielding or the embedded main device of the support HID keypad protocol that initiatively do not send instructions down, can't use the problem of finger prints processing device.
Particularly, the difference of transmission channel when finishing data transmission, control device among this embodiment has two kinds of mode of operations, also be management mode and monitoring mode, the finger prints processing device that comprises this control device also should have these two kinds of mode of operations mutually, the mode of operation of acquiescence is monitoring mode, communication link sign (namely installing a specific global variable in the built-in type program) is defaulted as 0 in the device, when host computer sends instruction to the finger prints processing device, the communication link sign will be reset, and be set to 1 by 0.
As shown in Figure 3 and Figure 4, when host computer sends instructions under the finger prints processing device, data command will be issued in the first transmission channel, after treating apparatus detects the host computer instruction, this moment, the monitoring and scheduling unit read the communication link sign, and the sending mode switching command gives the second transmission channel, notified its mode of operation to do switching this moment, mode of operation is transferred to management mode, only have the first transmission channel and host computer to carry out data transmission.The finger prints processing device is resolved, process the host computer instruction, process corresponding operation, for example this instruction is for finishing fingerprint comparison, then the fingerprint comparison unit is when carrying out fingerprint comparison, be judged to be on-line working or off-line working by registered fingerprint quantity (also namely presetting the fingerprint amount threshold), for example the registered fingerprint quantitative value is defaulted as 100 pieces, this value can arrange in management mode, when registered fingerprint quantity equals 100 pieces in the device, realize online comparison, the fingerprint characteristic that the fingerprint collecting unit collects is uploaded, processed by the host computer comparison, otherwise will directly in device, finish comparison, return comparison result to host computer, reply to host computer.
Use for the convenience of the user, this device is supported respectively FPC and two kinds of semiconductor transducers of UPEK, and can increase infrared detection device detection human body approach and come trigger sensor to enter duty by dormant state.
As shown in Figure 5 and Figure 6, when control device works in monitoring mode, the finger prints processing device is to rely on the second transmission channel to finish to the data of host computer transmission, if when detecting the order that host computer issues, directly return the management mode operation, otherwise the finger prints processing device runs on park mode, carries out the detection of user's finger.When the user being arranged when sensor is restrained fingerprint, the fingerprint collecting unit gathers fingerprint image via the first transmission channel, and the feature that takes the fingerprint obtains finger print information, the monitoring and scheduling unit reads the communication link sign, control the first transmission channel finger print information is transferred to the second transmission channel, then whether the registered fingerprint quantity of monitoring and scheduling unit inspection surpasses default fingerprint amount threshold, also namely judge the relation of fingerprint register number and threshold value, when registered fingerprint quantity during more than or equal to default fingerprint amount threshold, first finger print information is at first carried out the Base64 coding and form character visible, be translated into the keyboard format coding according to the keypad character coding schedule afterwards, fingerprint characteristic information behind the coding directly is uploaded to host computer by the second transmission channel, reply to host computer, when registered fingerprint quantity during less than default fingerprint amount threshold, do the fingerprint characteristic comparison via the fingerprint comparison unit, when comparison is passed through, read user ID corresponding to user fingerprints information that comparison is passed through, and user ID is translated into keyboard format coding according to the keypad character coding schedule, comparison result behind the coding is returned to host computer, reply to host computer, obstructed out-of-date in comparison, point out comparison not pass through by forms such as acousto-optic-electrics to the user, and can send simultaneously the comparison failure information to host computer.
When control device works in management mode, can finish the setting of fingerprint register, fingerprint comparison and default fingerprint amount threshold; When control device works in monitoring mode, only can finish the comparison of fingerprint.
When carrying out fingerprint register, the finger prints processing device is connected on the computing machine, carry out the user fingerprints registration by management software tools.Click the user fingerprints registration in the management tool, host computer sends the fingerprint register instruction to the finger prints processing device, because receiving the order from host computer, communication link sign (types of variables is unsigned int) in the finger prints processing device is set to 1, behind this zone bit of monitoring and scheduling unit judges in the device, instruction is issued to the first transmission channel.The first transmission channel at first sending mode switching command is given the second transmission channel, notice mode of operation this moment is done switching, mode of operation is transferred to management mode, and namely the second transmission channel need not to carry out command operating, and all instruction process are finished dealing with by the first transmission channel.The first transmission channel is carried out fingerprint collecting according to the instruction of host computer after the pattern of finishing the work is switched, according to default fingerprint amount threshold in the device, determine whether the user fingerprints of registration need to be preserved in treating apparatus.
If registered fingerprint quantity equals default fingerprint amount threshold in the finger prints processing device, need not to preserve again the fingerprint of new user's registration in the finger prints processing device, then the finger prints processing device directly is uploaded to computing machine with user profile and finger print information, to be saved in the background server.If registered fingerprint quantity is less than default fingerprint amount threshold in the device, the finger print information of new user's registration not only will be safeguarded in background server, need in device, preserve simultaneously, after then the finger prints processing device is preserved the user fingerprints that collects, by the first transmission channel user profile and finger print information directly are uploaded to computing machine, this moment, the finger prints processing device moved under management mode, can be considered standard form HID fingerprint device.
When presetting the fingerprint amount threshold and arrange, the finger prints processing device is connected on the computing machine, finish the setting of default fingerprint amount threshold by the management software tools on the computing machine.The default fingerprint amount threshold of clicking in the management tool arranges, the host computer sending threshold value arranges instruction to the finger prints processing device, because receiving the order from host computer, communication link sign in the device is set to 1, behind this zone bit of monitoring and scheduling unit judges in the device, instruction is issued to the first transmission channel.The default fingerprint amount threshold that the first transmission channel will arrange writes among the Flash, and refreshes value corresponding in the internal memory.
When carrying out fingerprint comparison, there are following two kinds of working conditions:
The first, the fingerprint comparison under the management mode: the finger prints processing device is connected on the computing machine, carries out the user fingerprints comparison by management software tools.Click the user fingerprints comparison in the management tool, upper computer software sends the fingerprint comparison instruction to the finger prints processing device, because receiving the order from host computer, communication link sign in the device is set to 1, behind this zone bit of monitoring and scheduling unit judges in the device, instruction is issued to the first transmission channel.The first transmission channel at first sending mode switching command is given the second transmission channel, notify its this moment mode of operation do switching, mode of operation is transferred to management mode, and namely the second transmission channel need not to carry out command operating, and all instruction process are finished dealing with by the first transmission channel.The first transmission channel is carried out fingerprint collecting according to the fingerprint collecting instruction after the pattern of finishing the work is switched, according to the default fingerprint amount threshold of device, determine whether user fingerprints is compared in device.When if registered fingerprint quantity equals default fingerprint amount threshold in the device, device is uploaded to host computer with the user fingerprints information that collects, when if registered fingerprint quantity is less than default fingerprint amount threshold in the device, in device, the fingerprint characteristic of preservation in the finger print information that collects and the device is compared, comparison result is uploaded to host computer.This timer moves under management mode, can be considered standard form HID fingerprint device.
The second, the fingerprint comparison under the monitoring mode: the finger prints processing device is connected on the printer, and printer can't send instruction to device, and because not receiving the host computer order, the communication link sign in the device still is default value 0.The second transmission channel is waited for the finger print information that the first transmission channel collects, when finger contact is arranged to fingerprint sensor, the first transmission channel gathers finger print information, the finger print information that collects is sent to the second transmission channel, after the second transmission channel receives finger print information, at first whether the interior registered fingerprint quantity of judgment means is less than default fingerprint amount threshold, if registered fingerprint quantity is less than default fingerprint amount threshold in the device, carry out comparison in the device, comparison result information is uploaded to printer.If registered fingerprint quantity equals default fingerprint amount threshold in the device, device directly is uploaded to printer with finger print information, and the printer plug-in is transmitted through the network to background server with the feature of receiving and compares.When uploading information to printer, when if the information of uploading is finger print information, at first finger print information to be uploaded is carried out the Base64 coding, form character visible, standard according to keypad protocol transforms ASCII character with character visible afterwards, and the finger print information behind the coding is uploaded to printer the most at last; When if the information of uploading is comparison result information, only comparison result information is transformed ASCII character according to the standard of keypad protocol with character visible, the comparison result information after then will encoding is uploaded to printer.
At last, introduce the control method of the finger prints processing device that this embodiment provides, need to prove, need to prove, the control device of the finger prints processing device that can provide by the embodiment of the invention in the control method of the finger prints processing device of the embodiment of the invention is carried out, and the control device of the finger prints processing device of the embodiment of the invention also can be used for carrying out the control method of the finger prints processing device that the embodiment of the invention provides.
Fig. 7 is the control method process flow diagram according to the finger prints processing device of first embodiment of the invention, and as shown in Figure 7, the method comprises that following step S102 is to step S110.
Step S102: obtain user fingerprints information by the first transmission channel.
The finger prints processing device arranges the first transmission channel and the second transmission channel, and two transmission channels are the Different Logic transmission channel on the Same Physical transmission channel.Can be finished by fingerprint sensor the collection of finger print information, then get access to finger print information via the first transmission channel, particularly, can carry out fingerprint by user's trigger sensor gathers automatically, also can carry out fingerprint collecting according to the instruction that host computer issues, the communication link sign is set as global variable in control device inside, when the finger prints processing device is connected to host computer, the communication link sign is initialized to the second sign, when the finger prints processing device received the host computer order, the set of communication link sign was the first sign.
Step S104: according to user fingerprints Information generation process information.
After getting access to user fingerprints information, according to user fingerprints Information generation process information, can be according to the needs of environment for use, the corresponding Processing Algorithm that prestores in inside, user fingerprints information processed obtain process information, such as alignment algorithm of fingerprint etc., also can carry out according to the host computer order that receives the processing of finger print information.
Step S106: the communication link sign that inquiry is default, to determine adopting which passage to carry out data transmission.
Step S108: when the communication link that inquires was masked as for first when sign, by the first transmission channel transmission process information to host computer.
Step S110: when the communication link that inquires was masked as for second when sign, according to the keypad character coded format process information is encoded, and by the process information after the second transmission channel transfer encoding to host computer.
Do not receive the order of host computer when the finger prints processing device, automatically gather but carry out fingerprint by user's trigger sensor, this moment, the communication link sign still indicated for second of acquiescence, then process information is encoded according to the keypad character coded format by step S110, so that the process information behind the coding meets the HID keypad protocol, the process information after then will encoding via the second transmission channel transfers to host computer.Receive the order of host computer when the finger prints processing device, carry out fingerprint collecting according to host computer instruction control sensor, this moment, the communication link sign was set to the first sign by the second sign of acquiescence, this host computer is supported HID keyboard communication class USB mouth, thereby can utilize the first transmission channel directly process information to be transferred to host computer.
Adopt the control method of the finger prints processing device that this embodiment provides, by two logical transport passage work, communicate by letter to adapt to from different host computers, thereby can with the host exchanging data of shielding mass storage class USB mouth, access the USB interface of self-defined HID control mode, again can with the host exchanging data of only supporting the HID keypad protocol, access the USB interface of the HID keypad protocol in the embedded main device, reached the finger prints processing device and the host computer communication mode is flexible, applicable situation is not limited, can automatically adopt the effect of different communication methods according to different host computers.
Preferably, before step S102, this control method also comprises: receive the fingerprint collecting order that host computer issues, wherein, step S102 comprises according to fingerprint collecting order control fingerprint sensor collection user fingerprints information, obtains the user fingerprints information that fingerprint sensor collects by the first transmission channel.
Preferably, before step S102, whether this control method: detecting has the finger contact fingerprint sensor if also comprising, wherein, step S102 comprises when having detected the finger contact fingerprint sensor, the control fingerprint sensor gathers user fingerprints information, obtains the user fingerprints information that fingerprint sensor collects by the first transmission channel.
Preferably, fingerprint sensor is connected with infrared detecting device, and before whether detection had the finger contact fingerprint sensor, the method also comprises used infrared detecting device to carry out user's detection, when infrared pick-up unit detected the user, the control fingerprint sensor was converted to mode of operation by park mode.By the switching of two kinds of mode of operations, can reach the effect of saving power supply, wherein come the mode of translative mode by the testing result of infrared detector, steering logic is simple, and can in time wake sensor before the user restrains fingerprint up.
Preferably, step S104 comprises and judges that whether registered fingerprint quantity is less than default fingerprint amount threshold, when registered fingerprint quantity during less than default fingerprint amount threshold, user fingerprints information and registered fingerprint are compared, generate process information according to comparison result, when registered fingerprint quantity during more than or equal to default fingerprint amount threshold, directly finger print information is uploaded to host computer as process information.
Adopt the preferred embodiment, when registered fingerprint quantity more than or equal to default fingerprint amount threshold, the long low-response consuming time of comparing, do not carry out the comparison of fingerprint this moment in the finger prints processing device, but finger print information is directly sent to host computer, finished the comparison of fingerprint by host computer.The finger prints processing device only carries out fingerprint comparison in registered fingerprint quantity during less than default fingerprint amount threshold, thereby can export faster the fingerprint comparison result, avoids the finger prints processing device not have for a long time the problem of the poor user experience that response brings.
Further preferably, when process information is finger print information, in step S110, when process information is encoded according to the keypad character coded format, process information can be carried out first the Base64 coding, form character visible, then the standard according to keypad protocol is converted into ASCII character with character visible; When process information was comparison result information, in step S110, when process information was encoded according to the keypad character coded format, directly the standard according to keypad protocol was converted into ASCII character with comparison result.
Adopt this optimal way to finish information coding, if when carrying out fingerprint comparison in finger prints processing device inside, do not need to carry out the base64 coding, the ASCII coding of comparison result according to the keyboard of simulation returned, not comparison in device, to carry out online comparison right but user fingerprints information is sent to background server, at first to carry out the base64 coding to user fingerprints information, simulating keyboard carries out the ASCII coding again, coding step is simple, adopt different coding steps for different content, the coding processing speed is fast.
Fig. 8 is the control method process flow diagram according to the finger prints processing device of second embodiment of the invention, as shown in Figure 8, after the finger prints processing device connects host computer, at first the communication link sign is carried out initialization, then judge whether to receive the instruction of host computer, when receiving the host computer instruction, replacement communication link sign.After inquiring communication link sign and being reset, the first transmission channel receives instruction, and finger prints processing device entrance management work pattern is carried out the instruction that receives.If do not receive instruction, the communication link sign is the sign for giving tacit consent to still, then inquiring communication link identifies when not being reset, the finger prints processing device enters monitoring mode, whether detect this moment has fingerprint to restrain, if having fingerprint restrains, then gather the user fingerprints feature, and whether the interior current registered fingerprint quantity of judgment means is above presetting fingerprint register quantity, when surpassing when presetting fingerprint register quantity, the user fingerprints characteristic information that collects is processed by being uploaded to host computer by the second transmission channel, when not surpassing when presetting fingerprint register quantity, compare with registered fingerprint characteristic after the user fingerprints characteristic information that collects processed, and comparison result is back to host computer via the second transmission channel.
From above description, can find out, the present invention has realized following technique effect: by two logical transport passage work, communicate by letter to adapt to from different host computers, thereby can with the host exchanging data of shielding mass storage class USB mouth, access the USB interface of self-defined HID control mode, again can with the host exchanging data of only supporting HID keyboard communication class USB mouth, access the USB interface of the HID keypad protocol control in the embedded main device that initiatively do not send instructions down, finger prints processing device and host computer communication mode are flexible, applicable situation is not limited, can automatically adopt different communication methods according to different host computers.
Need to prove, can in the computer system such as one group of computer executable instructions, carry out in the step shown in the process flow diagram of accompanying drawing, and, although there is shown logical order in flow process, but in some cases, can carry out step shown or that describe with the order that is different from herein.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the memory storage and be carried out by calculation element, perhaps they are made into respectively each integrated circuit modules, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.