CN111683083A - Block chain user identity authentication method, device, equipment and medium - Google Patents

Block chain user identity authentication method, device, equipment and medium Download PDF

Info

Publication number
CN111683083A
CN111683083A CN202010506087.5A CN202010506087A CN111683083A CN 111683083 A CN111683083 A CN 111683083A CN 202010506087 A CN202010506087 A CN 202010506087A CN 111683083 A CN111683083 A CN 111683083A
Authority
CN
China
Prior art keywords
user
contract
address
kyc
verification
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.)
Granted
Application number
CN202010506087.5A
Other languages
Chinese (zh)
Other versions
CN111683083B (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.)
Chengdu Quality Starker Technology Co Ltd
Original Assignee
Chengdu Quality Starker 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 Chengdu Quality Starker Technology Co Ltd filed Critical Chengdu Quality Starker Technology Co Ltd
Priority to CN202010506087.5A priority Critical patent/CN111683083B/en
Publication of CN111683083A publication Critical patent/CN111683083A/en
Application granted granted Critical
Publication of CN111683083B publication Critical patent/CN111683083B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The invention discloses a block chain user identity verification method, a device, equipment and a medium, wherein a transaction request is obtained to obtain a user address and a contract address carried by the transaction request, all contract instructions corresponding to the contract address are obtained according to the contract address, when any node on a block chain sends the contract instructions and the user address to an Ethenhouse intelligent contract virtual machine in the block chain, the Ethenhouse intelligent contract virtual machine in the block chain executes the contract instructions, when the contract instructions are user KYC information verification instructions, precompiled contracts are called to obtain user KYC information based on the user address, so that verification of the user KYC information is completed, a verification result is obtained, legal security verification of the user identity is completed, and the security and the legitimacy of the block chain transaction are improved.

Description

Block chain user identity authentication method, device, equipment and medium
Technical Field
The invention relates to the technical field of block chain data processing, in particular to a method, a device, equipment and a medium for verifying user identity of a block chain.
Background
The blockchain technology is also called as distributed book technology, and is a decentralized distributed database technology, wherein each piece of data in a blockchain is broadcast to blockchain nodes of the whole network, each blockchain node has full and consistent data, the blockchain nodes execute transactions such as transfer and data storage by sending the transactions, and accounting nodes in the blockchain collect the transactions in the blockchain in a transaction pool, execute the transactions, and package the transactions into blocks and spread the transactions into the blockchain after executing the transactions. Anyone can issue transactions on the blockchain, and the existing blockchain technology only carries out security and legal verification on the transaction process and does not carry out legal and safe verification on the identity of a user, so that the transactions on the blockchain still have security and legal risks.
Disclosure of Invention
The block chain technology of the technical problem to be solved by the invention only carries out security and legal verification on the transaction process, and does not carry out legal and safe verification on the user identity, so that the transaction on the block chain still has security and legal risks. Therefore, a method, a device, equipment and a medium for verifying and identifying the identity of a blockchain user are provided, and the identity of the user is verified legally and safely so as to improve the safety and legality of blockchain transaction.
The invention is realized by the following technical scheme:
a method for verifying user identity in a block chain comprises the following steps executed by the block chain:
acquiring a transaction request, wherein the transaction request carries a user address and a contract address;
acquiring all contract instructions corresponding to the contract address according to the contract address;
when any node on the block chain sends the contract instruction and the user address to an Ethernet intelligent contract virtual machine in the block chain, the Ethernet intelligent contract virtual machine in the block chain executes the contract instruction, and when the contract instruction is a user KYC information verification instruction, a precompiled contract is called to obtain user KYC information based on the user address so as to complete verification of the user KYC information and obtain a verification result.
Further, the invoking the precompiled contract based on the user address obtains the KYC information of the user to complete the verification of the KYC information of the user, and obtaining a verification result includes:
calling the precompiled contract to enable the precompiled contract to obtain a user address and a KYC verification expression based on a user KYC information verification instruction, and inquiring a database according to the user address to obtain user KYC information;
the KYC information of the user is verified through the KYC regular expression, and when the KYC information of the user meets the KYC verification expression, a verification result is that the verification is passed;
and when the KYC information of the user does not meet the KYC verification expression, the verification result is that the verification is not passed.
Further, the pre-compiled contract acquires a user address and a KYC verification expression based on a user KYC information verification instruction, and comprises the following steps:
the pre-compiled contract obtains input parameters transmitted by the inline assembly based on the KYC information verification instruction of the user, and extracts a user address and a KYC verification expression from the input parameters.
Further, the extracting the user address and the KYC verification expression from the input parameters includes:
extracting a corresponding address byte array from the input parameters based on a preset address byte extraction bit, and carrying out hexadecimal conversion on the address byte array to obtain a user address;
and extracting a corresponding expression byte array from the input parameters based on a preset expression byte extraction bit, and performing character string conversion on the expression byte array to obtain a KYC verification expression.
Further, the address byte extraction bits include an address byte start bit and an address byte end bit;
the extracting a corresponding address byte array from the input parameters based on preset address byte extraction bits includes:
and extracting the corresponding byte from the input parameter as an address byte array based on the address byte start bit and the address byte end bit.
Further, the expression byte extraction bits comprise an expression byte start bit and a KYC length bit;
the extracting a corresponding expression byte array from the input parameters based on the preset expression byte extraction bits includes:
acquiring an expression byte termination bit based on the expression byte start bit and the KYC length bit;
and extracting corresponding bytes from the input parameters as an expression byte array based on the expression byte start bit and the expression byte end bit.
Further, the verifying the KYC information of the user through the KYC rule expression includes:
and verifying the KYC information of the user by calling a rule engine to execute the KYC rule expression.
A blockchain user authentication apparatus, comprising:
a transaction request obtaining module, configured to obtain a transaction request, where the transaction request carries a user address and a contract address;
the contract instruction acquisition module is used for acquiring all contract instructions corresponding to the contract address according to the contract address;
and the user KYC information verification module is used for executing the contract instruction by the Ethernet intelligent contract virtual machine in the block chain when any node on the block chain sends the contract instruction and the user address to the Ethernet intelligent contract virtual machine in the block chain, and calling a precompiled contract to obtain the user KYC information based on the user address when the contract instruction is the user KYC information verification instruction so as to complete verification of the user KYC information and obtain a verification result.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the blockchain user authentication method when executing the computer program.
A computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, implements the blockchain user authentication method described above.
According to the block chain user identity verification method, the block chain user identity verification device, the block chain user identity verification equipment and the block chain user identity verification medium, a user address and a contract address carried by a transaction request are obtained through obtaining the transaction request, all contract instructions corresponding to the contract address are obtained according to the contract address, when any node on the block chain sends the contract instructions and the user address to an intelligent Ethernet contract virtual machine in the block chain, the intelligent Ethernet contract virtual machine in the block chain executes the contract instructions, when the contract instructions are user KYC information verification instructions, pre-compiled contracts are called to obtain user KYC information based on the user address, verification of the user KYC information is completed, a verification result is obtained, legal security verification of the user identity is completed, and security and legitimacy of block chain transactions are improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:
fig. 1 is a flowchart of a block chain user authentication method according to the present invention.
Fig. 2 is a specific flowchart of step S30 in fig. 1.
FIG. 3 is a flowchart illustrating a block chain user authentication method according to an embodiment of the present invention.
Fig. 4 is a specific flowchart of step S312 in fig. 3.
Fig. 5 is a schematic structural diagram of a block chain user authentication device according to the present invention.
FIG. 6 is a schematic diagram of the computer apparatus of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not meant to limit the present invention.
Example 1
The invention provides a block chain user identity authentication method which can be applied to different computer equipment, wherein the computer equipment comprises but is not limited to various personal computers, notebook computers, smart phones and tablet computers.
As shown in fig. 1, the present invention provides a method for verifying user identity in a blockchain, which comprises the following steps performed by the blockchain:
s10: a transaction request is obtained, wherein the transaction request carries a user address and a contract address.
Wherein a transaction request refers to a request for a transaction submitted by a user to the blockchain. The transaction request includes a user address and a contract address. The user address refers to an identifier for uniquely representing the user identity, such as 0 Xaaaa. A contract address refers to an address, such as 0X1234, used to uniquely represent a contract transaction.
Specifically, a user A and a user B carry out transaction on the blockchain, the user A writes a contract transaction with a KYC verification expression to be issued on the blockchain, and the user B needs to execute the contract transaction issued by the user A, so that a transaction request is submitted to the blockchain.
The KYC verification expression in the present embodiment refers to an expression for authenticating a user who performs a contract transaction, such as international china, country of residence china, sex male or female, and frozen non.
S20: and acquiring all contract instructions corresponding to the contract addresses according to the contract addresses.
Wherein the contract instructions refer to contract code written in a contract method. Including but not limited to transfers and cash-outs.
S30: when any node on the block chain sends a contract instruction and a user address to an Ethernet intelligent contract virtual machine in the block chain, the Ethernet intelligent contract virtual machine in the block chain executes the contract instruction, and when the contract instruction is a user KYC information verification instruction, a precompiled contract is called to obtain user KYC information based on the user address so as to complete verification of the user KYC information and obtain a verification result.
Wherein, the user KYC information refers to information for representing the user identity, including but not limited to the country of residence, gender and transaction freeze condition of the user.
Specifically, when any node on the block chain sends a contract instruction and a user address to an intelligent Ethernet house contract virtual machine in the block chain, the intelligent Ethernet house contract virtual machine in the block chain executes the contract instruction, when the contract instruction is a KYC information verification instruction of a user, a pre-compiled contract is called to obtain KYC information of the user based on the user address so as to complete verification of the KYC information of the user, a verification result is obtained, when the verification result is that verification is passed, the identity of the user who executes the contract transaction meets the requirement of the user who issues the contract transaction, and the user is a legal user and can execute a subsequent transaction process; and when the verification result is that the verification fails, the identity of the user executing the contract transaction does not meet the requirement of the user issuing the contract transaction, and the user is an illegal user and cannot execute a subsequent transaction process.
Step S10-step S30, a user address, a contract address and a contract method carried by a transaction request are obtained by obtaining the transaction request, all contract instructions corresponding to the contract address are obtained according to the contract address, when any node on the block chain sends the contract instructions and the user address to an Ethenhouse intelligent contract virtual machine in the block chain, the Ethenhouse intelligent contract virtual machine in the block chain executes the contract instructions, when the contract instructions are user KYC information verification instructions, a precompiled contract is called to obtain user KYC information based on the user address, verification of the user KYC information is completed, a verification result is obtained, legal safety verification of the user identity is completed, and safety and legitimacy of block chain transaction are improved.
Further, as shown in fig. 2, in step S30, invoking the precompiled contract to obtain the user KYC information based on the user address, so as to complete verification of the user KYC information, and obtaining a verification result, where the method includes:
s31: calling a precompiled contract to enable the precompiled contract to obtain a user address and a KYC verification expression based on a user KYC information verification instruction, and inquiring a database according to the user address to obtain user KYC information.
Further, the precompiled contract obtains input parameters transmitted by the inline assembly based on a KYC information verification instruction of the user, and extracts a user address and a KYC verification expression from the input parameters.
Specifically, the precompiled contract obtains input parameters transmitted by the inline assembly based on a KYC information verification instruction of a user, and extracts a user address and a KYC verification expression from the input parameters according to preset byte extraction bits. The preset byte extraction bit refers to a preset byte bit for extracting the user address and the KYC verification expression from the input parameters.
S32: and verifying the KYC information of the user through the KYC regular expression, wherein when the KYC information of the user meets the KYC verification expression, the verification result is that the verification is passed.
Further, after the KYC regular expression and the user KYC information are obtained, the KYC regular expression is executed by calling a rule engine, and the user KYC information is verified.
S33: and when the KYC information of the user does not meet the KYC verification expression, the verification result is that the verification is not passed.
Specifically, after the KYC regular expressions and the user KYC information are obtained, each expression in the KYC regular expressions verifies the corresponding user KYC information, when the user KYC information meets all expressions in the KYC verification expressions, the verification result is that the verification is passed, and when the user KYC information does not meet at least one expression in the KYC verification expressions, the verification result is that the verification is not passed.
Further, if the verification result bit corresponding to the user who executes the contract transaction is not verified, the user who executes the contract transaction is an illegal user, an illegal transaction behavior exists, and if the user who issues the contract transaction wants to execute the contract transaction continuously, the KYC verification rule of the user who executes the contract transaction can be updated, that is, the KYC verification expression is updated, so that the contract transaction is executed continuously.
Further, as shown in fig. 3, extracting the user address and KYC verification expression from the input parameters includes:
s311: and extracting a corresponding address byte array from the input parameters based on preset address byte extraction bits, and carrying out hexadecimal conversion on the address byte array to obtain the user address.
Wherein, the address byte extraction bit refers to the byte bit which is preset and used for extracting the user address from the input parameter.
Specifically, after the pre-compiling synthesis is performed, according to the address byte extraction bits, the corresponding array is extracted from the input parameters as the address byte array, and the address byte array is subjected to hexadecimal conversion as the user address. Wherein, the address byte array refers to an array extracted from the input parameters according to the byte extraction bits and used as the user address.
Further, the address byte fetch bits include an address byte start bit and an address byte end bit.
Wherein the address byte start bit refers to the start bit of the address byte fetch bit. The address byte end bit refers to the end bit of the address byte fetch bit. If the start bit of the address byte is 33 bits and the end bit of the address byte is 64 bits, the bytes corresponding to the 33 rd bit to 64 th bit in the input parameter are the address byte array.
Specifically, based on the address byte start bit and the address byte end bit, the corresponding byte is extracted from the input parameters as an address byte array.
S312: and extracting a corresponding expression byte array from the input parameters based on a preset expression byte extraction bit, and performing character string conversion on the expression byte array to obtain a KYC verification expression.
The expression byte extraction bits refer to byte bits which are preset and used for extracting the KYC verification expression from the input parameters.
Specifically, after the pre-compiling synthesis is performed, according to the expression byte extraction bits, the corresponding array is extracted from the input parameters as the expression byte array, and the expression byte array is converted as the user address. The expression byte array refers to an array extracted from the input parameters according to byte extraction bits and used as a KYC verification expression.
Further, the KYC verification expression comprises a character string and a hexadecimal array, wherein the character string in the KYC verification expression is obtained from the input parameter through an expression byte start bit and an expression byte end bit, and is obtained through character string conversion, the expression byte start bit refers to a start bit of an expression byte extraction bit, and the expression byte end bit refers to an end bit of the expression byte extraction bit. The expression byte extraction bits refer to byte bits which are set in advance and used for extracting the KYC verification expression from the input parameters. The hexadecimal array is obtained from the input parameters through a length byte start bit and a length byte end bit, and is obtained through hexadecimal conversion, wherein the length byte start bit refers to the start bit of the length extraction bit, and the length byte end bit refers to the end bit of the length extraction bit. The KYC length bit refers to a byte bit used for verifying the length of the expression by KYC, and specifically, the KYC length bit is a hexadecimal array in this embodiment. As shown in fig. 4, in step S312, extracting a corresponding expression byte array from the input parameters based on the preset expression byte extraction bits includes:
s3121: and acquiring an expression byte termination bit based on the expression byte start bit and the KYC length bit.
Specifically, the expression byte end bit is a byte bit corresponding to the start bit of the expression byte plus KYC length bit. If the length byte start bit is 97 th bit and the length byte end bit is 128 th bit, the byte array obtained by hexadecimal conversion of a plurality of bytes corresponding to the 97 th bit to the 128 th bit is KYC length. If the expression byte start bit is 129 th bit, the expression byte end bit is 161 th bit obtained by adding the expression byte start bit 129 th bit and KYC length bit 32 th bit.
S3122: and extracting the corresponding bytes from the input parameters as an expression byte array based on the expression byte start bit and the expression byte end bit.
Specifically, after the expression byte start bit and the expression byte end bit are acquired, the corresponding byte is extracted from the input parameter as an expression byte array based on the expression byte start bit and the expression byte end bit.
The method comprises the steps of obtaining a user address, a contract address and a contract method carried by a transaction request by obtaining the transaction request, obtaining all contract instructions corresponding to the contract address according to the contract address, and executing the contract instructions by the Ethernet intelligent contract virtual machine in the block chain when any node on the block chain sends the contract instructions and the user address to the Ethernet intelligent contract virtual machine in the block chain. When the contract instruction is a user KYC information verification instruction, a precompiled contract is called to obtain input parameters transmitted by the inline assembly, a user address is extracted from input layer parameters according to an address byte extraction bit, a KYC verification expression is obtained according to an expression byte extraction bit, then the user KYC information is obtained based on the user address by precompiling the contract, the KYC verification expression is executed through a rule engine to complete verification of the user KYC information, a verification result is obtained to complete legal safety verification of user identity, and safety and legality of block chain transaction are improved.
Example 2
As shown in fig. 5, the difference between this embodiment and embodiment 1 is that a block chain user authentication apparatus includes:
the transaction request obtaining module 10 is configured to obtain a transaction request, where the transaction request carries a user address and a contract address.
And the contract instruction obtaining module 20 is configured to obtain all contract instructions corresponding to the contract addresses according to the contract addresses.
The user KYC information verification module 30 is configured to, when any node on the block chain sends the contract instruction and the user address to the intelligent Etherhouse contract virtual machine in the block chain, execute the contract instruction by the intelligent Etherhouse contract virtual machine in the block chain, and when the contract instruction is the user KYC information verification instruction, call a precompiled contract to obtain the user KYC information based on the user address, so as to complete verification of the user KYC information and obtain a verification result.
Further, the user KYC information verification module 30 includes a precompiled contract execution unit, a first verification unit, and a second verification unit.
And the pre-compilation contract execution unit is used for calling the pre-compilation contract so as to enable the pre-compilation contract to obtain a user address and a KYC verification expression based on the user KYC information verification instruction, and inquiring the database according to the user address to obtain the user KYC information.
The first verification unit is used for verifying the KYC information of the user through the KYC regular expression, and when the KYC information of the user meets the KYC verification expression, the verification result is that the verification is passed.
Further, the first verification unit is also used for verifying the KYC information of the user by calling a rule engine to execute a KYC rule expression.
And the second verification unit is used for judging that the verification result is verification failure when the KYC information of the user does not meet the KYC verification expression.
Further, the precompiled contract execution unit further comprises an input parameter extraction unit.
And the parameter extraction unit is used for pre-compiling the contract, acquiring input parameters transmitted by the inline assembly based on a KYC information verification instruction of the user, and extracting the user address and the KYC verification expression from the input parameters.
Further, the parameter extraction unit includes a user address acquisition unit and a KYC verification expression acquisition unit.
And the user address acquisition unit is used for extracting a corresponding address byte array from the input parameters based on the preset address byte extraction bits and carrying out hexadecimal conversion on the address byte array to obtain the user address.
And the KYC verification expression acquisition unit is used for extracting a corresponding expression byte array from the input parameters based on preset expression byte extraction bits, and performing character string conversion on the expression byte array to obtain the KYC verification expression.
Further, the user address obtaining unit is further configured to extract a corresponding byte from the input parameter as an address byte array based on the address byte start bit and the address byte end bit.
Further, the KYC verification expression obtaining unit includes an expression byte termination bit obtaining unit and an expression byte array obtaining unit.
And the expression byte termination bit acquisition unit is used for acquiring an expression byte termination bit based on the expression byte start bit and the KYC length bit.
And the expression byte array obtaining unit is used for extracting corresponding bytes from the input parameters based on the expression byte start bit and the expression byte end bit to serve as the expression byte array.
For specific limitations of the block chain user authentication, reference may be made to the above limitations of the block chain user authentication method, which are not described herein again. Each module in the block chain user authentication may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Example 3
The embodiment provides a computer device, which may be a server, and the internal structure diagram of the computer device may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a computer readable storage medium, an internal memory. The computer readable storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the computer-readable storage medium. The database of the computer device is used for storing data involved in the blockchain user authentication method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a block chain user authentication method.
The present embodiment provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the block chain user authentication method in the foregoing embodiments when executing the computer program, for example, steps 10 to S30 shown in fig. 1, or steps shown in fig. 2 to fig. 4, and are not described again here to avoid repetition. Alternatively, the processor, when executing the computer program, implements the functions of the modules/units of the blockchain user authentication apparatus in the above embodiments, such as the functions of the modules 10 to 30 shown in fig. 5. To avoid repetition, further description is omitted here.
Example 4
In this embodiment, a computer-readable storage medium is provided, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the block chain user authentication method in the foregoing embodiments, for example, steps S10 to S30 shown in fig. 1, or steps shown in fig. 2 to fig. 4, which are not repeated herein to avoid repetition. Alternatively, the processor, when executing the computer program, implements the functions of the modules/units in this embodiment of the block chain user authentication apparatus, such as the functions of the modules 10 to 30 shown in fig. 5. To avoid repetition, further description is omitted here.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for verifying user identity in a block chain is characterized by comprising the following steps executed by the block chain:
acquiring a transaction request, wherein the transaction request carries a user address and a contract address;
acquiring all contract instructions corresponding to the contract address according to the contract address;
when any node on the block chain sends the contract instruction and the user address to an Ethernet intelligent contract virtual machine in the block chain, the Ethernet intelligent contract virtual machine in the block chain executes the contract instruction, and when the contract instruction is a user KYC information verification instruction, a precompiled contract is called to obtain user KYC information based on the user address so as to complete verification of the user KYC information and obtain a verification result.
2. The method as claimed in claim 1, wherein the invoking of the precompiled contract obtains KYC information of the user based on the user address to complete verification of the KYC information of the user, and obtaining the verification result includes:
calling the precompiled contract to enable the precompiled contract to obtain a user address and a KYC verification expression based on a user KYC information verification instruction, and inquiring a database according to the user address to obtain user KYC information;
the KYC information of the user is verified through the KYC regular expression, and when the KYC information of the user meets the KYC verification expression, a verification result is that the verification is passed;
and when the KYC information of the user does not meet the KYC verification expression, the verification result is that the verification is not passed.
3. The method as claimed in claim 2, wherein the pre-compiled contract is based on a user KYC information verification instruction to obtain a user address and a KYC verification expression, and includes:
the pre-compiled contract obtains input parameters transmitted by the inline assembly based on the KYC information verification instruction of the user, and extracts a user address and a KYC verification expression from the input parameters.
4. The method as claimed in claim 3, wherein said extracting the user address and the KYC verification expression from the input parameters comprises:
extracting a corresponding address byte array from the input parameters based on a preset address byte extraction bit, and carrying out hexadecimal conversion on the address byte array to obtain a user address;
and extracting a corresponding expression byte array from the input parameters based on a preset expression byte extraction bit, and performing character string conversion on the expression byte array to obtain a KYC verification expression.
5. The method of claim 4, wherein the address byte extraction bits comprise an address byte start bit and an address byte end bit;
the extracting a corresponding address byte array from the input parameters based on preset address byte extraction bits includes:
and extracting the corresponding byte from the input parameter as an address byte array based on the address byte start bit and the address byte end bit.
6. The method as claimed in claim 4, wherein the expression byte extraction bits comprise expression byte start bits and KYC length bits;
the extracting a corresponding expression byte array from the input parameters based on the preset expression byte extraction bits includes:
acquiring an expression byte termination bit based on the expression byte start bit and the KYC length bit;
and extracting corresponding bytes from the input parameters as an expression byte array based on the expression byte start bit and the expression byte end bit.
7. The method of claim 2, wherein said verifying KYC information of the user through said KYC regular expression comprises:
and verifying the KYC information of the user by calling a rule engine to execute the KYC rule expression.
8. A blockchain user authentication apparatus, comprising:
a transaction request obtaining module, configured to obtain a transaction request, where the transaction request carries a user address and a contract address;
the contract instruction acquisition module is used for acquiring all contract instructions corresponding to the contract address according to the contract address;
and the user KYC information verification module is used for executing the contract instruction by the Ethernet intelligent contract virtual machine in the block chain when any node on the block chain sends the contract instruction and the user address to the Ethernet intelligent contract virtual machine in the block chain, and calling a precompiled contract to obtain the user KYC information based on the user address when the contract instruction is the user KYC information verification instruction so as to complete verification of the user KYC information and obtain a verification result.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the blockchain user authentication method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the blockchain user authentication method according to any one of claims 1 to 7.
CN202010506087.5A 2020-06-05 2020-06-05 Block chain user identity authentication method, device, equipment and medium Active CN111683083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010506087.5A CN111683083B (en) 2020-06-05 2020-06-05 Block chain user identity authentication method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010506087.5A CN111683083B (en) 2020-06-05 2020-06-05 Block chain user identity authentication method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111683083A true CN111683083A (en) 2020-09-18
CN111683083B CN111683083B (en) 2022-07-08

Family

ID=72435035

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010506087.5A Active CN111683083B (en) 2020-06-05 2020-06-05 Block chain user identity authentication method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111683083B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113805889A (en) * 2021-08-27 2021-12-17 成都质数斯达克科技有限公司 Intelligent contract calling execution method, device, equipment and readable storage medium
CN114827175A (en) * 2021-01-18 2022-07-29 成都质数斯达克科技有限公司 Registration method, electronic device and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375317A (en) * 2016-08-31 2017-02-01 北京明朝万达科技股份有限公司 Block chain-based big data security authentication method and system
EP3396612A1 (en) * 2017-04-24 2018-10-31 BlockSettle AB Method and system for creating a user identity
CN109347868A (en) * 2018-11-27 2019-02-15 咪咕文化科技有限公司 A kind of Information Authentication method, apparatus and storage medium
TW201909013A (en) * 2017-07-14 2019-03-01 中華電信股份有限公司 System and method for identity verification and privacy protection in public blockchain
CN109583184A (en) * 2018-10-09 2019-04-05 阿里巴巴集团控股有限公司 Auth method and device and electronic equipment
CN109615386A (en) * 2018-11-28 2019-04-12 优钱付(浙江)信息科技有限公司 KYC anti money washing method, apparatus, equipment and the medium of recurrent wrIting block chain
US10298396B1 (en) * 2015-11-10 2019-05-21 Wells Fargo Bank, N.A. Identity management service via virtual passport
CN110533402A (en) * 2019-08-22 2019-12-03 珠海得分金融科技有限公司 A kind of book keeping operation common recognition method and system of heterogeneous system
CN110692228A (en) * 2019-03-01 2020-01-14 阿里巴巴集团控股有限公司 Method and equipment for protecting transaction activity sensitive data based on intelligent contracts in blockchain
CN110971649A (en) * 2018-09-28 2020-04-07 南山人寿保险股份有限公司 System for verifying identity and confirming insurance transaction based on block chain

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10298396B1 (en) * 2015-11-10 2019-05-21 Wells Fargo Bank, N.A. Identity management service via virtual passport
CN106375317A (en) * 2016-08-31 2017-02-01 北京明朝万达科技股份有限公司 Block chain-based big data security authentication method and system
EP3396612A1 (en) * 2017-04-24 2018-10-31 BlockSettle AB Method and system for creating a user identity
TW201909013A (en) * 2017-07-14 2019-03-01 中華電信股份有限公司 System and method for identity verification and privacy protection in public blockchain
CN110971649A (en) * 2018-09-28 2020-04-07 南山人寿保险股份有限公司 System for verifying identity and confirming insurance transaction based on block chain
CN109583184A (en) * 2018-10-09 2019-04-05 阿里巴巴集团控股有限公司 Auth method and device and electronic equipment
CN109347868A (en) * 2018-11-27 2019-02-15 咪咕文化科技有限公司 A kind of Information Authentication method, apparatus and storage medium
CN109615386A (en) * 2018-11-28 2019-04-12 优钱付(浙江)信息科技有限公司 KYC anti money washing method, apparatus, equipment and the medium of recurrent wrIting block chain
CN110692228A (en) * 2019-03-01 2020-01-14 阿里巴巴集团控股有限公司 Method and equipment for protecting transaction activity sensitive data based on intelligent contracts in blockchain
CN110533402A (en) * 2019-08-22 2019-12-03 珠海得分金融科技有限公司 A kind of book keeping operation common recognition method and system of heterogeneous system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
肖?: "区块链技术在金融业KYC监管中的应用", 《上海立信会计金融学院学报》 *
董贵山等: "基于区块链的身份管理认证研究", 《计算机科学》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827175A (en) * 2021-01-18 2022-07-29 成都质数斯达克科技有限公司 Registration method, electronic device and readable storage medium
CN114827175B (en) * 2021-01-18 2023-08-22 成都质数斯达克科技有限公司 Registration method, electronic device, and readable storage medium
CN113805889A (en) * 2021-08-27 2021-12-17 成都质数斯达克科技有限公司 Intelligent contract calling execution method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN111683083B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN102393857B (en) Method and system for local call based on web page
CN110535971B (en) Interface configuration processing method, device, equipment and storage medium based on block chain
CN111683083B (en) Block chain user identity authentication method, device, equipment and medium
CN109656778B (en) Data acquisition method and device, computer equipment and storage medium
CN108365958B (en) Account login verification method and device, computer equipment and storage medium
US10142308B1 (en) User authentication
CN110955448A (en) Intelligent contract separation method, contract processing method, apparatus, device and medium
CN109413153B (en) Data crawling method and device, computer equipment and storage medium
CN110083384B (en) Application programming interface creating method and device
CN109144487B (en) Method, device, computer equipment and storage medium for developing business of parts
CN112491930B (en) System risk dynamic monitoring method, system, computer equipment and storage medium
CN110795171A (en) Service data processing method and device, computer equipment and storage medium
CN112528201A (en) Method and device for calling third-party platform, computer equipment and storage medium
CN113779545A (en) Data cross-process sharing method, terminal equipment and computer readable storage medium
CN112527835A (en) Authentication request processing method and device based on cache and related equipment
CN112016122A (en) Webpage data processing method and device, computer equipment and storage medium
CN110223075B (en) Identity authentication method and device, computer equipment and storage medium
CN111125748A (en) Judgment method and device for unauthorized query, computer equipment and storage medium
CN111597537B (en) Block chain network-based certificate issuing method, related equipment and medium
CN106789877A (en) A kind of validating vulnerability system based on sandbox
CN109815202B (en) Log editing method and related device
CN113010894A (en) Data processing method and device and computer readable storage medium
CN110460585B (en) Equipment identity identification method and device, computer equipment and storage medium
CN105187391A (en) APP, method and system for allowing APP to log into network access point and server
CN114924783A (en) Interface calling method, device, equipment and storage medium of application program

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