Disclosure of Invention
The embodiment of the specification provides a fingerprint input method, device and medium based on a blockchain, which are used for solving the technical problems in the prior art that the fingerprint input security is low.
The embodiment of the specification adopts the following technical scheme:
a blockchain-based fingerprint entry method, the method comprising:
receiving first fingerprint information from a user terminal when fingerprint input operation is performed;
determining an input sequence number of the first fingerprint information under the condition that the first fingerprint information is not input for the first time;
determining whether other fingerprint information of which the input sequence number is before the input sequence number of the first fingerprint information is received before the first fingerprint information from the user terminal is received according to the input sequence number of the first fingerprint information;
Wherein the other fingerprint information is the fingerprint information which is written into the fingerprint template set before the first fingerprint information;
before receiving first fingerprint information from a user terminal, receiving other fingerprint information with an input sequence number before the input sequence number of the first fingerprint information, writing the first fingerprint information into the fingerprint template set, and writing the first fingerprint information into the blockchain for storage.
Optionally, determining whether other fingerprint information with an entry sequence number preceding the entry sequence number of the first fingerprint information is received before receiving the first fingerprint information from the user terminal is implemented based on a corresponding smart contract deployed in the blockchain.
Optionally, before entering the first fingerprint information into the set of fingerprint templates, the method further comprises:
It is determined whether a time interval between receiving the first fingerprint information and the other fingerprint information is less than a respective preset threshold.
Optionally, the other fingerprint information is written into the blockchain after being written into the fingerprint template set.
Optionally, before entering the first fingerprint information into the set of fingerprint templates, the method further comprises:
it is determined whether the received other fingerprint information matches other fingerprint information in the blockchain.
Optionally, the method further comprises the steps of receiving an input request from a user terminal before inputting the first fingerprint information in the case that the first fingerprint information is input for the first time, wherein the input request comprises an input password;
And writing the first fingerprint information into the blockchain under the condition that the input password is consistent with the preset password.
Optionally, the method further comprises writing the input sequence number of the first fingerprint information into the blockchain for storage.
Optionally, the first fingerprint information is image information.
A blockchain-based fingerprint entry device, comprising:
At least one processor, and
A memory communicatively coupled to the at least one processor, wherein,
The memory stores instructions executable by the at least one processor, the instructions are executable by the at least one processor to enable the at least one processor to:
receiving first fingerprint information from a user terminal when fingerprint input operation is performed;
determining an input sequence number of the first fingerprint information under the condition that the first fingerprint information is not input for the first time;
determining whether other fingerprint information of which the input sequence number is before the input sequence number of the first fingerprint information is received before the first fingerprint information from the user terminal is received according to the input sequence number of the first fingerprint information;
Wherein the other fingerprint information is the fingerprint information which is written into the fingerprint template set before the first fingerprint information;
before receiving first fingerprint information from a user terminal, receiving other fingerprint information with an input sequence number before the input sequence number of the first fingerprint information, writing the first fingerprint information into the fingerprint template set, and writing the first fingerprint information into the blockchain for storage.
A non-volatile computer storage medium storing computer executable instructions for blockchain-based fingerprint entry, the computer executable instructions configured to:
receiving first fingerprint information from a user terminal when fingerprint input operation is performed;
determining an input sequence number of the first fingerprint information under the condition that the first fingerprint information is not input for the first time;
determining whether other fingerprint information of which the input sequence number is before the input sequence number of the first fingerprint information is received before the first fingerprint information from the user terminal is received according to the input sequence number of the first fingerprint information;
Wherein the other fingerprint information is the fingerprint information which is written into the fingerprint template set before the first fingerprint information;
before receiving first fingerprint information from a user terminal, receiving other fingerprint information with an input sequence number before the input sequence number of the first fingerprint information, writing the first fingerprint information into the fingerprint template set, and writing the first fingerprint information into the blockchain for storage.
The above-mentioned at least one technical scheme that the embodiment of the specification adopted can achieve the following beneficial effects that under the condition that the input fingerprint is received, the input sequence number of the input fingerprint can be determined, whether the fingerprint information before the input sequence number of the input fingerprint is input is confirmed according to the input sequence number, only under the condition that the input is available, the input fingerprint can be written into the fingerprint template set, the safety of fingerprint input is improved, the loss caused by the safety problem of fingerprint input is effectively avoided, and the user experience is improved. And the entered fingerprint is written into the blockchain for storage, so that the fingerprint information can be prevented from being tampered, and the security is reduced.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art without the exercise of inventive faculty, are intended to be within the scope of the application, based on the embodiments in the specification.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
Fig. 1 is a flowchart of a blockchain-based fingerprint entry method according to an embodiment of the present disclosure. As shown in fig. 1, the fingerprint input method based on the blockchain provided in the embodiment of the present specification specifically includes the following steps:
s101, when fingerprint input operation is carried out, first fingerprint information from a user terminal is received.
In some embodiments of the application, the first fingerprint information may be image information. Of course, the first fingerprint information may be other types of information.
When the fingerprint input operation is performed, step S101 may be performed after receiving the fingerprint input request message of the user terminal.
S102, determining an input sequence number of the first fingerprint information under the condition that the first fingerprint information is not input for the first time.
Before step S102, it is first determined whether the first fingerprint information is first entered, where first entry refers to that the device that entered the fingerprint has not entered the fingerprint before.
The entry sequence number of the first fingerprint information may be determined only if the first fingerprint information is not entered for the first time. For example, the first fingerprint information is the third fingerprint information entered by the device that entered the fingerprint.
In some embodiments of the present application, in the case where the first fingerprint information is first entered, before entering the first fingerprint information, receiving an entry request from the user terminal, the entry request including an entry password;
and under the condition that the input password is consistent with the preset password, writing the first fingerprint information into the fingerprint template set and the blockchain respectively.
Through the scheme, the security of first fingerprint input can be ensured.
In order to further ensure the security of the first fingerprint input, the input password may be encrypted to obtain an encrypted input fingerprint and then sent.
S103, determining whether other fingerprint information of which the input sequence number is before the input sequence number of the first fingerprint information is received before the first fingerprint information from the user terminal is received according to the input sequence number of the first fingerprint information.
Wherein the other fingerprint information is fingerprint information that has been written into the set of fingerprint templates before the first fingerprint information.
In some embodiments of the application, determining whether other fingerprint information having an entry sequence number preceding the entry sequence number of the first fingerprint information is received before receiving the first fingerprint information from the user terminal is based on a corresponding smart contract deployed in the blockchain.
S104, before receiving the first fingerprint information from the user terminal, receiving other fingerprint information with the input serial number before the input serial number of the first fingerprint information, writing the first fingerprint information into a fingerprint template set, and writing the first fingerprint information into a blockchain for storage.
To further secure fingerprint entry, in some embodiments of the present application, prior to entering the first fingerprint information into the set of fingerprint templates, the steps of:
it is determined whether a time interval between the received first fingerprint information and the received other fingerprint information is less than a corresponding preset threshold.
Through the above scheme, S104 is executed again when the time interval between the first fingerprint information and the other fingerprint information is smaller than the corresponding preset threshold.
The time interval between the first fingerprint information and the other fingerprint information may be a time interval between the first fingerprint information and the first other fingerprint information received in the other fingerprint information.
In some embodiments of the application, after other fingerprint information is written into the fingerprint template set, the fingerprint information is respectively written into the blockchain, so that the fingerprint information is not easy to tamper, and the security of fingerprint input is improved.
In some embodiments of the application, prior to entering the first fingerprint information into the set of fingerprint templates, the method further comprises:
other fingerprint information received is determined to match other fingerprint information in the blockchain.
Before the first fingerprint information is input into the fingerprint template set, the received other fingerprint information needs to be confirmed, whether the received other fingerprint information is matched with other fingerprint information in the blockchain is determined, and the first fingerprint information can be input into the fingerprint template set only under the matching condition.
In some embodiments of the present application, the entry sequence number of the first fingerprint information is written into the blockchain for storage.
For example, the first fingerprint information is the third fingerprint entered by the device for entering the fingerprint, and then the first fingerprint and the second fingerprint entered by the device need to be entered before the first fingerprint is entered, so that the first fingerprint information can be written into the fingerprint template set, that is, the first fingerprint information represents that the entering is successful.
Based on the technical scheme, the input sequence number of the input fingerprint can be determined under the condition that the input fingerprint is received, whether the fingerprint information before the input sequence number of the input fingerprint is input is confirmed according to the input sequence number, the input fingerprint can be written into the fingerprint template set only under the condition that the input is performed, the safety of fingerprint input is improved, the loss caused by the safety problem of fingerprint input is effectively avoided, and the user experience is improved. And the entered fingerprint is written into the blockchain for storage, so that the fingerprint information can be prevented from being tampered, and the security is reduced.
Based on the same thought, some embodiments of the present application also provide a device and a non-volatile computer storage medium corresponding to the above method.
Fig. 2 is a schematic structural diagram of a blockchain-based fingerprint input device according to an embodiment of the present disclosure, as shown in fig. 2, where the device includes:
At least one processor, and
A memory communicatively coupled to the at least one processor, wherein,
The memory stores instructions executable by the at least one processor, the instructions are executable by the at least one processor to enable the at least one processor to:
receiving first fingerprint information from a user terminal when fingerprint input operation is performed;
determining an input sequence number of the first fingerprint information under the condition that the first fingerprint information is not input for the first time;
determining whether other fingerprint information of which the input sequence number is before the input sequence number of the first fingerprint information is received before the first fingerprint information from the user terminal is received according to the input sequence number of the first fingerprint information;
Wherein the other fingerprint information is the fingerprint information which is written into the fingerprint template set before the first fingerprint information;
before receiving first fingerprint information from a user terminal, receiving other fingerprint information with an input sequence number before the input sequence number of the first fingerprint information, writing the first fingerprint information into the fingerprint template set, and writing the first fingerprint information into the blockchain for storage.
Some embodiments of the application provide a non-volatile computer storage medium corresponding to the blockchain-based fingerprint entry of fig. 1, storing computer-executable instructions configured to:
receiving first fingerprint information from a user terminal when fingerprint input operation is performed;
determining an input sequence number of the first fingerprint information under the condition that the first fingerprint information is not input for the first time;
determining whether other fingerprint information of which the input sequence number is before the input sequence number of the first fingerprint information is received before the first fingerprint information from the user terminal is received according to the input sequence number of the first fingerprint information;
Wherein the other fingerprint information is the fingerprint information which is written into the fingerprint template set before the first fingerprint information;
before receiving first fingerprint information from a user terminal, receiving other fingerprint information with an input sequence number before the input sequence number of the first fingerprint information, writing the first fingerprint information into the fingerprint template set, and writing the first fingerprint information into the blockchain for storage.
The embodiments of the present application are described in a progressive manner, and the same and similar parts of the embodiments are all referred to each other, and each embodiment is mainly described in the differences from the other embodiments. In particular, for the apparatus and medium embodiments, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the section of the method embodiments being relevant.
The devices and media provided in the embodiments of the present application are in one-to-one correspondence with the methods, so that the devices and media also have similar beneficial technical effects as the corresponding methods, and since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media are not repeated here.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.