




技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种数据处理方法、区块链节点设备及存储介质。The present application relates to the field of computer technology, and in particular, to a data processing method, a blockchain node device and a storage medium.
背景技术Background technique
分散式的应用程序(Decentralized Application,DAPP)是指应用程序分布在区块链中的不同区块链节点设备上,依赖底层区块链平台和共识机制共同完成任务的应用。在区块链网络中,用户可以通过付费的方式使用区块链节点设备上运行的DAPP的链上服务,也就是说,用户在使用区块链节点设备上运行的DAPP的链上服务之前,需要向DAPP的开发者支付一定的费用。Decentralized Application (DAPP) refers to applications in which applications are distributed on different blockchain node devices in the blockchain and rely on the underlying blockchain platform and consensus mechanism to jointly complete tasks. In the blockchain network, users can use the on-chain services of the DAPP running on the blockchain node device by paying, that is to say, before the user uses the on-chain service of the DAPP running on the blockchain node device, A certain fee needs to be paid to the developer of the DAPP.
在区块链网络中,如何能够免费使用DAPP的链上服务成为目前的研究热点。In the blockchain network, how to use DAPP's on-chain services for free has become a current research hotspot.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供了一种数据处理方法、区块链节点设备及存储介质,可免费使用分散式的应用程序向特定用户提交的交易数据提供链上服务。The embodiments of the present invention provide a data processing method, a block chain node device and a storage medium, which can provide on-chain services to transaction data submitted by a specific user by using a distributed application program for free.
第一方面,本发明实施例提供了一种数据处理方法,该方法应用于区块链节点设备,所述区块链节点设备为区块链网络中的区块链节点设备,所述区块链节点设备运行有分散式的应用程序,所述方法包括:In a first aspect, an embodiment of the present invention provides a data processing method, which is applied to a blockchain node device, where the blockchain node device is a blockchain node device in a blockchain network, and the block chain node device is a blockchain node device in a blockchain network. The chain node device runs a decentralized application, and the method includes:
接收交易数据,以及关于所述交易数据的身份信息;receive transaction data, and identification information about said transaction data;
对所述身份信息进行校验,得到校验结果;Verifying the identity information to obtain a verification result;
若校验结果指示校验成功,则通过所述分散式的应用程序对所述交易数据提供链上服务。If the verification result indicates that the verification is successful, an on-chain service is provided for the transaction data through the distributed application program.
第二方面,本发明实施例提供了一种区块链节点设备,该区块链节点设备包括处理器和存储器,所述处理器和所述存储器连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器被配置用于调用所述程序指令,执行第一方面所述的方法。In a second aspect, an embodiment of the present invention provides a blockchain node device, the blockchain node device includes a processor and a memory, the processor is connected to the memory, wherein the memory is used to store a computer program , the computer program includes program instructions, and the processor is configured to invoke the program instructions to perform the method of the first aspect.
第三方面,本发明实施例提供了一种数据处理装置,该装置包括:In a third aspect, an embodiment of the present invention provides a data processing device, the device comprising:
接收单元,用于接收交易数据,以及关于所述交易数据的身份信息;a receiving unit for receiving transaction data and identity information about the transaction data;
校验单元,用于对所述身份信息进行校验,得到校验结果;a verification unit, configured to verify the identity information to obtain a verification result;
服务单元,用于若校验结果指示校验成功,则通过所述分散式的应用程序对所述交易数据提供链上服务。A service unit, configured to provide an on-chain service to the transaction data through the distributed application program if the verification result indicates that the verification is successful.
第四方面,本发明实施例提供了一种计算机可读存储介质,用于储存为第一节点设备所用的计算机程序指令,其包含用于执行上述第一方面所涉及的程序。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium for storing computer program instructions used by a first node device, including a program for executing the above-mentioned first aspect.
通过实施本发明,区块链节点设备接收交易数据,以及关于所述交易数据的身份信息,对所述身份信息进行校验,得到校验结果,若校验结果指示校验成功,则通过所述分散式的应用程序对所述交易数据提供链上服务,可免费使用分散式的应用程序向特定用户提交的交易数据提供链上服务。By implementing the present invention, the block chain node device receives transaction data and identity information about the transaction data, verifies the identity information, and obtains a verification result. If the verification result indicates that the verification is successful, the The decentralized application provides on-chain services for the transaction data, and the decentralized application can be used for free to provide on-chain services to transaction data submitted by specific users.
附图说明Description of drawings
为了更清楚地说明本发明实施例或背景技术中的技术方案,下面将对本发明实施例或背景技术中所需要使用的附图进行说明。In order to more clearly describe the technical solutions in the embodiments of the present invention or the background technology, the accompanying drawings required in the embodiments or the background technology of the present invention will be described below.
图1为本发明实施例提供的一种数据处理系统的架构示意图;FIG. 1 is a schematic diagram of the architecture of a data processing system according to an embodiment of the present invention;
图2为本发明实施例提供的一种数据处理方法的流程示意图;2 is a schematic flowchart of a data processing method according to an embodiment of the present invention;
图3为本发明实施例提供的另一种数据处理方法的流程示意图;3 is a schematic flowchart of another data processing method provided by an embodiment of the present invention;
图4为本发明实施例提供的一种区块链节点设备的结构示意图;FIG. 4 is a schematic structural diagram of a blockchain node device according to an embodiment of the present invention;
图5为本发明实施例提供的一种数据处理装置的结构示意图。FIG. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention.
具体实施方式Detailed ways
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
目前,在区块链网络中,用户可以通过付费的方式使用区块链节点设备上运行的DAPP的链上服务,也就是说,用户在使用区块链节点设备上运行的DAPP的链上服务之前,需要向DAPP的开发者支付一定的费用。那么在此基础上,如何通过他人代付的方式免费使用DAPP的链上服务成为目前的研究热点。At present, in the blockchain network, users can use the on-chain services of DAPPs running on blockchain node devices by paying, that is, users can use the on-chain services of DAPPs running on blockchain node devices. Before, it was necessary to pay a certain fee to the developer of the DAPP. So on this basis, how to use DAPP's on-chain services for free through payment by others has become a current research hotspot.
请参见图1,图1是本发明实施例公开的一种数据处理系统的架构示意图。如图1所示,该数据处理系统包括至少一个区块链节点设备,上述至少一个区块链节点设备组成区块链网络。其中,区块链网络中的任一区块链节点设备都可以运行智能合约,以对获取到的交易数据提供链上服务。具体实现过程中,区块链节点设备接收到交易数据,以及关于所述交易数据的身份信息之后,可以对身份信息进行校验,得到校验结果,若校验结果指示校验成功,则通过所述分散式的应用程序对所述交易数据提供链上服务;若校验结果指示校验失败,则拒绝通过所述分散式的应用程序对所述交易数据提供链上服务,例如删除该交易数据以及该身份信息。Please refer to FIG. 1. FIG. 1 is a schematic structural diagram of a data processing system disclosed in an embodiment of the present invention. As shown in FIG. 1 , the data processing system includes at least one blockchain node device, and the above-mentioned at least one blockchain node device constitutes a blockchain network. Among them, any blockchain node device in the blockchain network can run a smart contract to provide on-chain services for the acquired transaction data. In the specific implementation process, after the blockchain node device receives the transaction data and the identity information about the transaction data, it can verify the identity information to obtain the verification result. If the verification result indicates that the verification is successful, the The decentralized application provides on-chain services to the transaction data; if the verification result indicates that the verification fails, refuse to provide on-chain services to the transaction data through the decentralized application, for example, delete the transaction data and this identifying information.
可选的,该数据处理系统还可以包括用户设备,用户设备可与区块链节点设备进行交互,以对区块链节点设备中的预设数据库进行更新。可选的,用户设备还可与区块链节点设备进行交互,以向区块链节点设备发送虚拟资源。其中,用户设备可以为代付方,即代用户向区块链节点设备支付费用的一方。Optionally, the data processing system may further include user equipment, and the user equipment can interact with the blockchain node device to update the preset database in the blockchain node device. Optionally, the user equipment can also interact with the blockchain node device to send virtual resources to the blockchain node device. Among them, the user equipment can be the payer, that is, the party that pays the blockchain node equipment on behalf of the user.
示例性的,交易数据可以包括区块查询请求和高度,那么链上服务可以为根据高度查区块。另一示例性的,交易数据可以包括交易流水信息,那么链上服务可以为将该交易流水信息进行上链。需要说明的是,上述仅为示例,并不构成对本发明实施例的限定,例如交易数据可以包括哈希,那么链上服务可以为根据该哈希获取明文,等等。Exemplarily, the transaction data may include block query requests and heights, and the on-chain service may be to search blocks according to the heights. In another example, the transaction data may include transaction flow information, and the on-chain service may be to upload the transaction flow information to the chain. It should be noted that the above is only an example, and does not constitute a limitation to the embodiments of the present invention. For example, the transaction data may include a hash, and the on-chain service may be to obtain plaintext according to the hash, and so on.
区块链是一种分布式数据存储、共识机制和加密算法等计算机技术的新型应用模式,其本质上是一个去中心化的数据库;区块链可由多个借由密码学串接并保护内容的串连交易记录(又称区块)构成,用区块链所串接的分布式账本能让多方有效记录交易,且可永久查验此交易(不可篡改)。Blockchain is a new application mode of computer technology such as distributed data storage, consensus mechanism and encryption algorithm. It is essentially a decentralized database; blockchain can be connected by multiple cryptography and protect the content. It consists of a series of transaction records (also known as blocks), and the distributed ledger connected by the blockchain allows multiple parties to effectively record transactions, and this transaction can be permanently checked (it cannot be tampered with).
其中,共识机制是指区块链网络中实现不同节点之间建立信任、获取权益的数学算法,共识机制是区块链网络各节点共同认可的一种数学算法,共识机制中的共识算法包括但不限于工作量证明(Proof of Work,PoW)算法、权益证明(Proof of Stake,PoS)算法、授权权益证明(Delegated Proof of Stake,DPoS)算法、实用拜占庭容错(PracticalByzantine Fault Tolerance,PBFT)算法等。Among them, the consensus mechanism refers to the mathematical algorithm that realizes the establishment of trust between different nodes and the acquisition of rights and interests in the blockchain network. The consensus mechanism is a mathematical algorithm recognized by all nodes in the blockchain network. The consensus algorithm in the consensus mechanism includes but Not limited to Proof of Work (PoW) algorithm, Proof of Stake (PoS) algorithm, Delegated Proof of Stake (DPoS) algorithm, Practical Byzantine Fault Tolerance (PBFT) algorithm, etc. .
在本申请的数据处理过程中,区块链网络中的任一区块链节点设备都存储有智能合约,它们可以通过运行智能合约对交易数据提供链上服务。其中,智能合约是一种旨在以信息化方式传播、验证或执行合同的计算机协议,允许在没有第三方的情况下进行可信交易,这些交易可追踪且不可逆转。一个智能合约是一套以数字形式定义的承诺,包括合约参与方可以在上面执行这些承诺的协议,是一段写在区块链上的代码。本发明实施例中的智能合约可以理解为DAPP。In the data processing process of this application, any blockchain node device in the blockchain network stores a smart contract, and they can provide on-chain services for transaction data by running the smart contract. Among them, a smart contract is a computer protocol designed to disseminate, verify or execute a contract in an informative manner, allowing trusted transactions without a third party, which are traceable and irreversible. A smart contract is a set of commitments defined in digital form, including an agreement on which contract participants can execute these commitments, and is a piece of code written on the blockchain. The smart contract in the embodiment of the present invention can be understood as DAPP.
基于上述描述,本申请实施例提出一种如图2所示的数据处理方法,该数据处理方法可以包括以下步骤S201-S203:Based on the above description, an embodiment of the present application proposes a data processing method as shown in FIG. 2 , and the data processing method may include the following steps S201-S203:
S201:区块链节点设备接收交易数据,以及关于所述交易数据的身份信息。S201: The blockchain node device receives transaction data and identity information about the transaction data.
其中,关于该交易数据的身份信息可以用于指示发送该交易数据的发送者身份,身份信息可以包括账号信息或者设备标识等。Wherein, the identity information about the transaction data may be used to indicate the identity of the sender sending the transaction data, and the identity information may include account information or device identification.
例如,区块链节点设备中运行的DAPP仅向VIP用户提供免费链上服务,那么用户在终端中通过即时通讯应用的账号信息登录之后,可以通过终端向区块链节点设备发送交易数据以及该账号信息,区块链节点设备可以基于该账号信息判断该用户是否为VIP用户,若该用户为VIP用户,则区块链节点设备通过该DAPP对所述交易数据提供链上服务。For example, the DAPP running in the blockchain node device only provides free on-chain services to VIP users. After logging in with the account information of the instant messaging application in the terminal, the user can send transaction data and this information to the blockchain node device through the terminal. Account information, the blockchain node device can determine whether the user is a VIP user based on the account information. If the user is a VIP user, the blockchain node device provides on-chain services to the transaction data through the DAPP.
又如,区块链节点设备中运行的DAPP仅向企业A的员工提供免费链上服务,那么用户在终端中通过员工的账号信息登录之后,可以通过终端向区块链节点设备发送交易数据以及该账号信息,区块链节点设备可以基于该账号信息判断该用户是否为企业A的员工,若该用户为企业A的员工,则区块链节点设备通过该DAPP对所述交易数据提供链上服务。For another example, the DAPP running in the blockchain node device only provides free on-chain services to the employees of enterprise A. After logging in through the employee's account information in the terminal, the user can send transaction data and data to the blockchain node device through the terminal. With the account information, the blockchain node device can determine whether the user is an employee of enterprise A based on the account information. If the user is an employee of enterprise A, the blockchain node device provides the transaction data on-chain through the DAPP. Serve.
又如,区块链节点设备中运行的DAPP仅向目标设备标识对应的设备发送的交易数据提供免费链上服务,那么设备向区块链节点设备发送交易数据以及该设备的设备标识,区块链节点设备可以基于该设备标识判断该设备是否为目标设备标识对应的设备,若该设备为目标设备标识对应的设备,则区块链节点设备通过该DAPP对所述交易数据提供链上服务。For another example, the DAPP running in the blockchain node device only provides free on-chain services to the transaction data sent by the device corresponding to the target device ID, then the device sends the transaction data and the device ID of the device to the blockchain node device. The chain node device can judge whether the device is the device corresponding to the target device ID based on the device ID. If the device is the device corresponding to the target device ID, the blockchain node device provides on-chain services for the transaction data through the DAPP.
在一种实现方式中,区块链节点设备接收到的交易数据可以是用户输入的,也可以是用户通过终端发送至区块链节点设备的,具体不受本申请实施例的限定。In an implementation manner, the transaction data received by the blockchain node device may be input by the user, or may be sent by the user to the blockchain node device through a terminal, which is not specifically limited by the embodiments of this application.
S202:区块链节点设备对所述身份信息进行校验,得到校验结果。S202: The blockchain node device verifies the identity information to obtain a verification result.
在一种实现方式中,区块链节点设备可以将所述账号信息与预设数据库中的至少一个账号信息进行比较,若所述预设数据库中存在所述账号信息,则生成第一校验结果,所述第一校验结果指示校验成功。若所述预设数据库中不存在所述账号信息,则生成第二校验结果,所述第二校验结果指示校验失败。In an implementation manner, the blockchain node device may compare the account information with at least one account information in a preset database, and generate a first check if the account information exists in the preset database As a result, the first verification result indicates that the verification is successful. If the account information does not exist in the preset database, a second verification result is generated, and the second verification result indicates that the verification fails.
在一种实现方式中,区块链节点设备将所述账号信息与预设数据库中的至少一个账号信息进行比较之前,还可以接收用户设备发送的数据库更新信息,所述数据库更新信息包括目标账号信息,然后根据所述目标账号信息对所述预设数据库中的至少一个账号信息进行更新,得到更新后的数据库。进一步的,区块链节点设备可以将所述账号信息与更新后的数据库中的至少一个账号信息进行比较。In an implementation manner, before the blockchain node device compares the account information with at least one account information in the preset database, it may also receive database update information sent by the user equipment, where the database update information includes the target account number information, and then update at least one account information in the preset database according to the target account information to obtain an updated database. Further, the blockchain node device may compare the account information with at least one account information in the updated database.
例如,用户A成为VIP用户之后,用户设备可以将该用户的账号信息发送给区块链节点设备,以便区块链节点设备将该账号信息新增至预设数据库中。For example, after user A becomes a VIP user, the user device can send the user's account information to the blockchain node device, so that the blockchain node device can add the account information to the preset database.
又如,用户B从企业A离职,用户设备可以将用户B的账号信息发送给区块链节点设备,以便区块链节点设备从预设数据库中删除用户B的账号信息。For another example, when user B leaves company A, the user device can send user B's account information to the blockchain node device, so that the blockchain node device deletes user B's account information from the preset database.
在一种实现方式中,数据库更新信息还可以包括目标账号信息的数字签名,该数字签名是用户设备使用用户设备的私钥对目标账号信息进行签名得到的。区块链节点设备接收用户设备发送的数据库更新信息之后,还可以使用所述用户设备的公钥对所述数字签名进行验签,若验签通过,则触发执行所述根据所述目标账号信息对所述预设数据库中的至少一个账号信息进行更新,得到更新后的数据库。In an implementation manner, the database update information may further include a digital signature of the target account information, where the digital signature is obtained by signing the target account information by the user equipment using the private key of the user equipment. After the blockchain node device receives the database update information sent by the user equipment, it can also use the public key of the user equipment to verify the digital signature. Update at least one account information in the preset database to obtain an updated database.
S203:若校验结果指示校验成功,则区块链节点设备通过所述分散式的应用程序对所述交易数据提供链上服务。S203: If the verification result indicates that the verification is successful, the blockchain node device provides on-chain services for the transaction data through the distributed application program.
在本申请实施例中,区块链节点设备接收交易数据,以及关于所述交易数据的身份信息,对所述身份信息进行校验,得到校验结果,若校验结果指示校验成功,则区块链节点设备通过所述分散式的应用程序对所述交易数据提供链上服务,可免费使用DAPP向特定用户提交的交易数据提供链上服务。In the embodiment of this application, the blockchain node device receives transaction data and identity information about the transaction data, verifies the identity information, and obtains a verification result. If the verification result indicates that the verification is successful, then The blockchain node device provides on-chain services to the transaction data through the decentralized application program, and can use the DAPP to provide on-chain services for transaction data submitted to specific users for free.
请参见图3,图3为本申请实施例在图2所示的实施例基础上提出的另一种数据处理方法,该数据处理方法可以包括但不限于:S301-S305。Please refer to FIG. 3 . FIG. 3 is another data processing method proposed by an embodiment of the present application based on the embodiment shown in FIG. 2 . The data processing method may include but not limited to: S301-S305.
S301:区块链节点设备接收交易数据,以及关于所述交易数据的身份信息。S301: The blockchain node device receives transaction data and identity information about the transaction data.
本发明实施例中的步骤S301具体可参见上述实施例中步骤S201的描述,本发明实施例不再赘述。For details of step S301 in this embodiment of the present invention, reference may be made to the description of step S201 in the foregoing embodiment, which is not repeated in this embodiment of the present invention.
S302:区块链节点设备对所述身份信息进行校验,得到校验结果。S302: The blockchain node device verifies the identity information to obtain a verification result.
本发明实施例中的步骤S302具体可参见上述实施例中步骤S202的描述,本发明实施例不再赘述。For details of step S302 in this embodiment of the present invention, reference may be made to the description of step S202 in the foregoing embodiment, which is not repeated in this embodiment of the present invention.
S303:区块链节点设备获取关于所述交易数据的虚拟资源。S303: The blockchain node device acquires virtual resources about the transaction data.
区块链节点设备获取到的关于所述交易数据的虚拟资源,可以是用户提交给区块链节点设备的,也可以是用户设备提交给区块链节点设备的。The virtual resource about the transaction data obtained by the blockchain node device may be submitted by the user to the blockchain node device, or may be submitted by the user device to the blockchain node device.
例如,用户设备向区块链节点设备发送数字资源,以便区块链节点设备根据预设兑换比例将该数字资源对应的虚拟资源发送给用户设备。用户设备可以将该虚拟资源发送给各个用户(例如VIP用户或员工等)。在用户向区块链节点设备发送交易数据时,可以将关于所述交易数据的虚拟资源发送给区块链节点设备。For example, the user equipment sends the digital resource to the blockchain node device, so that the blockchain node device sends the virtual resource corresponding to the digital resource to the user device according to the preset exchange ratio. The user equipment can send the virtual resource to various users (eg, VIP users or employees, etc.). When the user sends transaction data to the blockchain node device, the virtual resource about the transaction data can be sent to the blockchain node device.
又如,用户设备向区块链节点设备发送数字资源,以便区块链节点设备根据预设兑换比例将该数字资源对应的虚拟资源发送给用户设备。在用户向区块链节点设备发送交易数据之后,区块链节点设备可以向用户设备请求关于该交易数据的虚拟资源,进而用户设备可以将关于该交易数据的虚拟资源发送给区块链节点设备。For another example, the user equipment sends the digital resource to the blockchain node device, so that the blockchain node device sends the virtual resource corresponding to the digital resource to the user device according to the preset exchange ratio. After the user sends the transaction data to the blockchain node device, the blockchain node device can request the user device for virtual resources related to the transaction data, and then the user device can send the virtual resource related to the transaction data to the blockchain node device. .
S304:区块链节点设备对所述交易数据进行分析,以确定对所述交易数据提供链上服务所需的第一虚拟资源量。S304: The blockchain node device analyzes the transaction data to determine the first virtual resource amount required to provide on-chain services for the transaction data.
区块链节点设备可以对交易数据进行分析,确定关于该交易数据的业务需求,进而基于业务需求确定需要对交易数据提供的链上服务,基于确定的链上服务确定该链上服务所需的第一虚拟资源量。The blockchain node device can analyze the transaction data, determine the business requirements for the transaction data, and then determine the on-chain services that need to be provided for the transaction data based on the business requirements, and determine the on-chain services based on the determined on-chain services. The first virtual resource amount.
在一种实现方式中,区块链节点设备通过DAPP对所述交易数据提供链上服务之前,可以获取关于所述交易数据的虚拟资源,对所述交易数据进行分析,以确定对所述交易数据提供链上服务所需的第一虚拟资源量。In an implementation manner, before the blockchain node device provides on-chain services for the transaction data through DAPP, it can obtain virtual resources about the transaction data, and analyze the transaction data to determine whether the transaction data is appropriate for the transaction. The data provides the first virtual resource amount required for the on-chain service.
在一种实现方式中,区块链节点设备获取关于所述交易数据的虚拟资源之前,可以接收用户设备的设备标识。基于此,区块链节点设备获取关于所述交易数据的虚拟资源的方式可以为:区块链节点设备向所述设备标识对应的用户设备发送第一虚拟资源获取请求,并接收所述用户设备响应所述第一虚拟资源获取请求发送的所述虚拟资源。In an implementation manner, the blockchain node device may receive the device identification of the user equipment before acquiring the virtual resource about the transaction data. Based on this, the manner in which the blockchain node device acquires the virtual resource related to the transaction data may be: the blockchain node device sends a first virtual resource acquisition request to the user equipment corresponding to the device identifier, and receives the user equipment The virtual resource sent in response to the first virtual resource acquisition request.
在一种实现方式中,区块链节点设备获取关于所述交易数据的虚拟资源之前,还可以接收用户设备发送的第二虚拟资源获取请求,所述第二虚拟资源获取请求携带第二虚拟资源量,若检测到所述用户设备将所述第二虚拟资源量对应的数字资源由所述用户设备的管理账户转移至所述区块链节点设备的关联账户,则向所述用户设备发送数量为所述第二虚拟资源量的虚拟资源。In an implementation manner, before acquiring the virtual resource related to the transaction data, the blockchain node device may also receive a second virtual resource acquisition request sent by the user equipment, where the second virtual resource acquisition request carries the second virtual resource If it is detected that the user equipment transfers the digital resources corresponding to the second virtual resource amount from the management account of the user equipment to the associated account of the blockchain node device, send the number to the user equipment is the virtual resource of the second virtual resource amount.
S305:若校验结果指示校验成功,且虚拟资源的虚拟资源量大于或等于所述第一虚拟资源量,则区块链节点设备通过所述分散式的应用程序对所述交易数据提供链上服务。S305: If the verification result indicates that the verification is successful, and the virtual resource amount of the virtual resource is greater than or equal to the first virtual resource amount, the blockchain node device provides a chain for the transaction data through the distributed application program on service.
在本申请实施例中,区块链节点设备接收交易数据,以及关于所述交易数据的身份信息,对所述身份信息进行校验,得到校验结果,若校验结果指示校验成功,且获取到的虚拟资源的虚拟资源量大于或等于第一虚拟资源量,则区块链节点设备通过所述分散式的应用程序对所述交易数据提供链上服务,可通过代付的方式免费使用DAPP向特定用户提交的交易数据提供链上服务。In the embodiment of the present application, the blockchain node device receives transaction data and identity information about the transaction data, verifies the identity information, and obtains a verification result. If the verification result indicates that the verification is successful, and If the virtual resource amount of the acquired virtual resource is greater than or equal to the first virtual resource amount, the blockchain node device provides on-chain services for the transaction data through the distributed application program, which can be used for free by means of payment. DAPP provides on-chain services to transaction data submitted by specific users.
请参见图4,图4是本发明实施例提供的一种区块链节点设备的结构示意图,该节点设备40包括处理器401、存储器402、通信接口403,所述处理器401、所述存储器402、所述通信接口403通过一条或多条通信总线连接。Please refer to FIG. 4. FIG. 4 is a schematic structural diagram of a blockchain node device provided by an embodiment of the present invention. The
处理器401被配置为支持区块链节点设备执行图2或图3所示实施例中区块链节点设备相应的功能。该处理器401可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP),硬件芯片或者其任意组合。The
存储器402用于存储程序代码等。存储器402可以包括易失性存储器(volatilememory),例如随机存取存储器(random access memory,RAM);存储器402也可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器402还可以包括上述种类的存储器的组合。The
通信接口403用于接收和发送数据,例如,通信接口403用于接收交易数据,以及关于所述交易数据的身份信息。The
在本发明实施例中,该区块链节点设备40可以包括多个通信接口,其中,用于发送数据的通信接口和用于接收数据的通信接口可以不为同一个通信接口。In this embodiment of the present invention, the
处理器401可以调用存储器402中存储的程序代码以执行以下操作:
通过通信接口403接收交易数据,以及关于所述交易数据的身份信息;Receive transaction data through
对所述身份信息进行校验,得到校验结果;Verifying the identity information to obtain a verification result;
若校验结果指示校验成功,则通过所述分散式的应用程序对所述交易数据提供链上服务。If the verification result indicates that the verification is successful, an on-chain service is provided for the transaction data through the distributed application program.
在一种实现方式中,所述身份信息包括账号信息;In one implementation, the identity information includes account information;
所述处理器401在对所述身份信息进行校验,得到校验结果时,具体可以执行如下操作:When the
将所述账号信息与预设数据库中的至少一个账号信息进行比较;comparing the account information with at least one account information in a preset database;
若所述预设数据库中存在所述账号信息,则生成第一校验结果,所述第一校验结果指示校验成功;If the account information exists in the preset database, a first verification result is generated, and the first verification result indicates that the verification is successful;
若所述预设数据库中不存在所述账号信息,则生成第二校验结果,所述第二校验结果指示校验失败。If the account information does not exist in the preset database, a second verification result is generated, and the second verification result indicates that the verification fails.
在一种实现方式中,处理器401将所述账号信息与预设数据库中的至少一个账号信息进行比较之前,还可以执行如下操作:In an implementation manner, before the
通过通信接口403接收用户设备发送的数据库更新信息,所述数据库更新信息包括目标账号信息;Receive database update information sent by the user equipment through the
根据所述目标账号信息对所述预设数据库中的至少一个账号信息进行更新,得到更新后的数据库;Update at least one account information in the preset database according to the target account information to obtain an updated database;
所述处理器401在将所述账号信息与预设数据库中的至少一个账号信息进行比较时,具体可以执行如下操作:When comparing the account information with at least one account information in the preset database, the
将所述账号信息与更新后的数据库中的至少一个账号信息进行比较。The account information is compared with at least one account information in the updated database.
在一种实现方式中,所述数据库更新信息还包括所述目标账号信息的数字签名;In an implementation manner, the database update information further includes a digital signature of the target account information;
所述处理器401通过通信接口403接收用户设备发送的数据库更新信息之后,还可以执行如下操作:After receiving the database update information sent by the user equipment through the
使用所述用户设备的公钥对所述数字签名进行验签;Verifying the digital signature using the public key of the user equipment;
若验签通过,则触发执行所述根据所述目标账号信息对所述预设数据库中的至少一个账号信息进行更新,得到更新后的数据库。If the signature verification is passed, the execution of the updating of at least one account information in the preset database according to the target account information is triggered to obtain an updated database.
在一种实现方式中,所述处理器401通过所述分散式的应用程序对所述交易数据提供链上服务之前,还可以执行如下操作:In an implementation manner, before the
获取关于所述交易数据的虚拟资源;obtain virtual resources about the transaction data;
对所述交易数据进行分析,以确定对所述交易数据提供链上服务所需的第一虚拟资源量;Analyzing the transaction data to determine a first virtual resource amount required to provide on-chain services to the transaction data;
若所述虚拟资源的虚拟资源量大于或等于所述第一虚拟资源量,则触发执行所述通过所述分散式的应用程序对所述交易数据提供链上服务。If the virtual resource amount of the virtual resource is greater than or equal to the first virtual resource amount, triggering the execution of the providing on-chain service for the transaction data through the distributed application program.
在一种实现方式中,所述处理器401获取关于所述交易数据的虚拟资源之前,还可以执行如下操作:In an implementation manner, before the
通过通信接口403接收用户设备的设备标识;receiving the device identification of the user equipment through the
所述处理器401在获取关于所述交易数据的虚拟资源时,具体可以执行如下操作:When acquiring the virtual resource about the transaction data, the
通过通信接口403向所述设备标识对应的用户设备发送第一虚拟资源获取请求;Send a first virtual resource acquisition request to the user equipment corresponding to the device identifier through the
通过通信接口403接收所述用户设备响应所述第一虚拟资源获取请求发送的所述虚拟资源。The virtual resource sent by the user equipment in response to the first virtual resource acquisition request is received through the
在一种实现方式中,所述处理器401获取关于所述交易数据的虚拟资源之前,还可以执行如下操作:In an implementation manner, before the
通过通信接口403接收用户设备发送的第二虚拟资源获取请求,所述第二虚拟资源获取请求携带第二虚拟资源量;receiving a second virtual resource acquisition request sent by the user equipment through the
若检测到所述用户设备将所述第二虚拟资源量对应的数字资源由所述用户设备的管理账户转移至所述区块链节点设备的关联账户,则向所述用户设备发送数量为所述第二虚拟资源量的虚拟资源。If it is detected that the user equipment transfers the digital resources corresponding to the second virtual resource amount from the management account of the user equipment to the associated account of the blockchain node device, the amount sent to the user equipment is the The virtual resource of the second virtual resource amount.
请参见图5,图5是本发明实施例提供的一种数据处理装置的结构示意图,所述数据处理装置可以设置在区块链节点设备中,所述数据处理装置50可以包括:Please refer to FIG. 5. FIG. 5 is a schematic structural diagram of a data processing apparatus provided by an embodiment of the present invention. The data processing apparatus may be set in a blockchain node device, and the
接收单元501,用于接收交易数据,以及关于所述交易数据的身份信息;a receiving
校验单元502,用于对所述身份信息进行校验,得到校验结果;A
服务单元503,用于若校验结果指示校验成功,则通过所述分散式的应用程序对所述交易数据提供链上服务。The
在一种实现方式中,所述身份信息包括账号信息;In one implementation, the identity information includes account information;
所述校验单元502对所述身份信息进行校验,得到校验结果,包括:The
将所述账号信息与预设数据库中的至少一个账号信息进行比较;comparing the account information with at least one account information in a preset database;
若所述预设数据库中存在所述账号信息,则生成第一校验结果,所述第一校验结果指示校验成功;If the account information exists in the preset database, a first verification result is generated, and the first verification result indicates that the verification is successful;
若所述预设数据库中不存在所述账号信息,则生成第二校验结果,所述第二校验结果指示校验失败。If the account information does not exist in the preset database, a second verification result is generated, and the second verification result indicates that the verification fails.
在一种实现方式中,所述接收单元501将所述账号信息与预设数据库中的至少一个账号信息进行比较之前,还可以接收用户设备发送的数据库更新信息,所述数据库更新信息包括目标账号信息;In an implementation manner, before the receiving
所述装置还可以包括更新单元504;The apparatus may further include an
更新单元504,用于根据所述目标账号信息对所述预设数据库中的至少一个账号信息进行更新,得到更新后的数据库;an
所述校验单元502将所述账号信息与预设数据库中的至少一个账号信息进行比较,包括:The
将所述账号信息与更新后的数据库中的至少一个账号信息进行比较。The account information is compared with at least one account information in the updated database.
在一种实现方式中,所述数据库更新信息还包括所述目标账号信息的数字签名;In an implementation manner, the database update information further includes a digital signature of the target account information;
所述校验单元502,还用于在接收单元501接收用户设备发送的数据库更新信息之后,使用所述用户设备的公钥对所述数字签名进行验签,若验签通过,则触发所述更新单元504根据所述目标账号信息对所述预设数据库中的至少一个账号信息进行更新,得到更新后的数据库。The
在一种实现方式中,所述装置还可以包括确定单元505;In an implementation manner, the apparatus may further include a determining
确定单元505,用于在服务单元503通过所述分散式的应用程序对所述交易数据提供链上服务之前,获取关于所述交易数据的虚拟资源,对所述交易数据进行分析,以确定对所述交易数据提供链上服务所需的第一虚拟资源量,若所述虚拟资源的虚拟资源量大于或等于所述第一虚拟资源量,则触发所述更新单元504通过所述分散式的应用程序对所述交易数据提供链上服务。The determining
在一种实现方式中,接收单元501,还用于在确定单元505获取关于所述交易数据的虚拟资源之前,接收用户设备的设备标识;In an implementation manner, the receiving
所述确定单元505获取关于所述交易数据的虚拟资源,包括:The determining
向所述设备标识对应的用户设备发送第一虚拟资源获取请求;sending a first virtual resource acquisition request to the user equipment corresponding to the device identifier;
接收所述用户设备响应所述第一虚拟资源获取请求发送的所述虚拟资源。The virtual resource sent by the user equipment in response to the first virtual resource acquisition request is received.
在一种实现方式中,接收单元501,还用于在确定单元505获取关于所述交易数据的虚拟资源之前,接收用户设备发送的第二虚拟资源获取请求,所述第二虚拟资源获取请求携带第二虚拟资源量;In an implementation manner, the receiving
所述装置还可以包括发送单元506;The apparatus may further include a sending
发送单元506,用于若检测到所述用户设备将所述第二虚拟资源量对应的数字资源由所述用户设备的管理账户转移至所述区块链节点设备的关联账户,则向所述用户设备发送数量为所述第二虚拟资源量的虚拟资源。The sending
本发明实施例提出的上述数据处理装置所包括的各个单元的具体实现可参考前述各实施例中相关内容的描述,在此不赘述,并且,图5所示的数据处理装置中的各个模块可以分别或全部合并为一个或若干个另外的模块来构成,或者其中的某个(些)模块还可以再拆分为功能上更小的多个模块来构成,这可以实现同样的操作,而不影响本申请的实施例的技术效果的实现。上述模块是基于逻辑功能划分的,在实际应用中,一个模块的功能也可以由多个模块来实现,或者多个模块的功能由一个模块实现。在本申请的其它实施例中,也可以包括其它模块,在实际应用中,这些功能也可以由其它模块协助实现,并且可以由多个模块协作实现,本申请不做限定。For the specific implementation of each unit included in the above-mentioned data processing apparatus proposed in the embodiment of the present invention, reference may be made to the description of the relevant content in the foregoing embodiments, which is not repeated here, and each module in the data processing apparatus shown in FIG. 5 may be Respectively or all of them are combined into one or several other modules to form, or some module(s) can be further split into multiple modules with smaller functions, which can achieve the same operation without The realization of the technical effects of the embodiments of the present application is affected. The above modules are divided based on logical functions. In practical applications, the function of one module may also be implemented by multiple modules, or the functions of multiple modules may be implemented by one module. In other embodiments of the present application, other modules may also be included. In practical applications, these functions may also be implemented with the assistance of other modules, and may be implemented by cooperation of multiple modules, which is not limited in this application.
本发明实施例还提供一种计算机可读存储介质,可以用于存储图2或图3所示实施例中区块链节点设备所用的计算机软件指令,其包含用于执行上述实施例中为区块链节点设备所设计的程序。Embodiments of the present invention further provide a computer-readable storage medium, which can be used to store computer software instructions used by the blockchain node device in the embodiment shown in FIG. 2 or FIG. The program designed by the block chain node device.
上述计算机可读存储介质包括但不限于快闪存储器、硬盘、固态硬盘。The above-mentioned computer-readable storage medium includes, but is not limited to, flash memory, hard disk, and solid-state disk.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention. should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010100861.2ACN111260475B (en) | 2020-02-18 | 2020-02-18 | Data processing method, block link point equipment and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010100861.2ACN111260475B (en) | 2020-02-18 | 2020-02-18 | Data processing method, block link point equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN111260475Atrue CN111260475A (en) | 2020-06-09 |
| CN111260475B CN111260475B (en) | 2025-07-08 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010100861.2AActiveCN111260475B (en) | 2020-02-18 | 2020-02-18 | Data processing method, block link point equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN111260475B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112101919A (en)* | 2020-09-16 | 2020-12-18 | 财付通支付科技有限公司 | Data processing method and device, electronic equipment and storage medium |
| CN113191754A (en)* | 2021-04-26 | 2021-07-30 | 飞呗科技有限公司 | Game equipment transaction method, device, equipment and system based on block chain |
| CN113609470A (en)* | 2021-07-05 | 2021-11-05 | 中国银行股份有限公司 | Data processing method, node, equipment and storage medium based on block chain |
| CN117762679A (en)* | 2023-11-14 | 2024-03-26 | 安徽交控信息产业有限公司 | Method and system for checking data of under-chain lane based on block chain technology |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109272380A (en)* | 2018-08-30 | 2019-01-25 | 腾讯科技(深圳)有限公司 | Method, device, device and storage medium for trading virtual pet goods |
| CN109391612A (en)* | 2018-08-17 | 2019-02-26 | 杭州微链区块链科技有限公司 | A kind of identification confirmation system and method based on block chain |
| CN109714348A (en)* | 2018-12-29 | 2019-05-03 | 百度在线网络技术(北京)有限公司 | Permission processing method, device, equipment and the medium realized based on block chain |
| US20190188657A1 (en)* | 2017-12-19 | 2019-06-20 | Mastercard International Incorporated | Method and system for outside guarantees for a blockchain transaction |
| CN109936569A (en)* | 2019-02-21 | 2019-06-25 | 领信智链(北京)科技有限公司 | A kind of decentralization digital identity login management system based on ether mill block chain |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20190188657A1 (en)* | 2017-12-19 | 2019-06-20 | Mastercard International Incorporated | Method and system for outside guarantees for a blockchain transaction |
| CN109391612A (en)* | 2018-08-17 | 2019-02-26 | 杭州微链区块链科技有限公司 | A kind of identification confirmation system and method based on block chain |
| CN109272380A (en)* | 2018-08-30 | 2019-01-25 | 腾讯科技(深圳)有限公司 | Method, device, device and storage medium for trading virtual pet goods |
| CN109714348A (en)* | 2018-12-29 | 2019-05-03 | 百度在线网络技术(北京)有限公司 | Permission processing method, device, equipment and the medium realized based on block chain |
| CN109936569A (en)* | 2019-02-21 | 2019-06-25 | 领信智链(北京)科技有限公司 | A kind of decentralization digital identity login management system based on ether mill block chain |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112101919A (en)* | 2020-09-16 | 2020-12-18 | 财付通支付科技有限公司 | Data processing method and device, electronic equipment and storage medium |
| CN112101919B (en)* | 2020-09-16 | 2024-04-12 | 财付通支付科技有限公司 | Data processing method and device, electronic equipment and storage medium |
| CN113191754A (en)* | 2021-04-26 | 2021-07-30 | 飞呗科技有限公司 | Game equipment transaction method, device, equipment and system based on block chain |
| CN113609470A (en)* | 2021-07-05 | 2021-11-05 | 中国银行股份有限公司 | Data processing method, node, equipment and storage medium based on block chain |
| CN113609470B (en)* | 2021-07-05 | 2024-03-22 | 中国银行股份有限公司 | Block chain-based data processing method, node, equipment and storage medium |
| CN117762679A (en)* | 2023-11-14 | 2024-03-26 | 安徽交控信息产业有限公司 | Method and system for checking data of under-chain lane based on block chain technology |
| Publication number | Publication date |
|---|---|
| CN111260475B (en) | 2025-07-08 |
| Publication | Publication Date | Title |
|---|---|---|
| CN111163182B (en) | Block chain-based device registration method and apparatus, electronic device, and storage medium | |
| US11917088B2 (en) | Integrating device identity into a permissioning framework of a blockchain | |
| KR20220160021A (en) | Low Trust Privilege Access Management | |
| CN111260475A (en) | A data processing method, block chain node device and storage medium | |
| CN112087502B (en) | Method, device and equipment for processing request and storage medium | |
| WO2022166637A1 (en) | Blockchain network-based method and apparatus for data processing, and computer device | |
| KR102050007B1 (en) | System and method for supporting external interface based on block chain | |
| CN110599095A (en) | Dangerous waste treatment method based on block chain network and node of block chain network | |
| CN110084600B (en) | Processing and verifying method, device, equipment and medium for resolution transaction request | |
| WO2023005500A1 (en) | Cross-chain transaction processing method and apparatus, electronic device, and storage medium | |
| CN111769956B (en) | Service processing method, device, equipment and medium | |
| CN111598575A (en) | Business process control method and device, electronic equipment and readable storage medium | |
| CN111488372A (en) | A data processing method, device and storage medium | |
| CN110213250B (en) | Data processing method and terminal equipment | |
| CN110738502B (en) | A bill processing method, device and storage medium device | |
| CN111325585B (en) | Asset transfer method, device and computer readable storage medium | |
| JP2022525551A (en) | Preventing erroneous transmission of copies of data records to distributed ledger systems | |
| CN114266680A (en) | Block chain-based electronic contract signing method, device and system | |
| CN110347750A (en) | Data processing method and device based on block chain | |
| CN113282671A (en) | Claims settlement method and device based on block chain and electronic equipment | |
| CN110662210B (en) | Secondary or repeated mobile phone number identification method, system and equipment based on block chain | |
| CN109992298B (en) | Examination and approval platform expansion method and device, examination and approval platform and readable storage medium | |
| EP4365808A1 (en) | Data verification method and apparatus | |
| KR20230094920A (en) | Blockchain Network System for Blockchain Service Provider and Method for Blockchain Service Provider | |
| CN117196615A (en) | Cross-blockchain transaction method, device, equipment and storage medium |
| 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 |