HK40020407B - Method and device for transfering resource, storage medium and electronic equipment - Google Patents
Method and device for transfering resource, storage medium and electronic equipment Download PDFInfo
- Publication number
- HK40020407B HK40020407B HK42020010923.9A HK42020010923A HK40020407B HK 40020407 B HK40020407 B HK 40020407B HK 42020010923 A HK42020010923 A HK 42020010923A HK 40020407 B HK40020407 B HK 40020407B
- Authority
- HK
- Hong Kong
- Prior art keywords
- target
- account
- resource
- information
- blockchain
- Prior art date
Links
Description
技术领域Technical Field
本公开涉及信息安全技术领域,具体而言,涉及一种资源转移方法、资源转移装置、电子设备以及计算机可读存储介质。This disclosure relates to the field of information security technology, and more specifically, to a resource transfer method, a resource transfer device, an electronic device, and a computer-readable storage medium.
背景技术Background Technology
随着网络技术的发展,用户之间可以方便的基于网络进行交互,例如,用户可以基于网络进行资源转移,如电商交易,即将商品基于电商交易平台从第一用户转移至第二用户。With the development of network technology, users can easily interact with each other online. For example, users can transfer resources online, such as in e-commerce transactions, where goods are transferred from one user to another through an e-commerce platform.
但在目前的电商交易流程中,仍存在伪造商品来源、历史交易信息不实以及买方对卖方信任度有待提高等问题。因此,需要提供一种新的资源转移方法。However, current e-commerce transaction processes still suffer from problems such as falsified product origins, inaccurate historical transaction information, and a need to improve buyer trust in sellers. Therefore, a new method for resource transfer is needed.
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art.
发明内容Summary of the Invention
本公开实施例的目的在于提供一种资源转移方法、资源转移装置、电子设备以及计算机可读存储介质,进而可以在一定程度上改善资源转移过程中,存在伪造资源来源、历史交易信息不实以及买方对卖方信任度有待提高的问题。The purpose of this disclosure is to provide a resource transfer method, resource transfer device, electronic device, and computer-readable storage medium, which can improve, to a certain extent, the problems of falsified resource sources, inaccurate historical transaction information, and the need to improve the buyer's trust in the seller during the resource transfer process.
根据本公开的一个方面,提供一种基于区块链的资源转移方法,包括:According to one aspect of this disclosure, a blockchain-based resource transfer method is provided, comprising:
响应于第一账户的发布请求发布一密钥对中的公钥数据;In response to the first account's publish request, publish the public key data in a key pair;
获取与目标资源关联的区块链,所述区块链上的各区块均写入有所述目标资源的前一拥有者账户信息以及下一拥有者账户信息;Obtain the blockchain associated with the target resource, wherein each block on the blockchain contains the account information of the previous owner and the account information of the next owner of the target resource;
接收第二账户通过所述公钥数据加密的目标账户信息,并将所述目标账户信息发送至所述第一账户;Receive target account information encrypted by the second account using the public key data, and send the target account information to the first account;
响应于第一账户的转移请求将所述目标资源转移至目标账户;所述目标账户是通过所述密钥对中的私钥数据对所述目标账户信息解密得到;In response to a transfer request from the first account, the target resource is transferred to the target account; the target account is obtained by decrypting the target account information using the private key data in the key pair.
生成新的区块作为所述区块链的尾部区块,并将所述目标账户的信息写入所述尾部区块的前一区块作为所述下一拥有者账户信息、将所述第一账户的信息写入所述尾部区块作为所述前一拥有者账户信息。A new block is generated as the tail block of the blockchain, and the information of the target account is written into the block preceding the tail block as the next owner account information, and the information of the first account is written into the tail block as the previous owner account information.
根据本公开的一个方面,提供一种资源转移方法,所述方法应用于区块链系统,所述区块链系统包括区块链数据库、交易节点、资源提供节点和资源请求节点,所述方法包括:According to one aspect of this disclosure, a resource transfer method is provided, the method being applied to a blockchain system, the blockchain system including a blockchain database, transaction nodes, resource providing nodes, and resource requesting nodes, the method comprising:
所述交易节点响应于资源提供节点的发布请求发布一密钥对中的公钥数据;The transaction node responds to the resource provider node's publication request by publishing the public key data in a key pair;
所述交易节点从所述区块链数据库获取与目标资源关联的区块链,所述区块链上的各区块均写入有所述目标资源的前一拥有者账户信息以及下一拥有者账户信息;The transaction node obtains the blockchain associated with the target resource from the blockchain database. Each block on the blockchain contains the account information of the previous owner and the account information of the next owner of the target resource.
所述资源请求节点通过所述交易节点将利用所述公钥数据加密的目标节点信息发送至所述资源提供节点;The resource requesting node sends the target node information, encrypted using the public key data, to the resource providing node through the transaction node;
所述交易节点响应于资源提供节点的转移请求将所述目标资源转移至目标节点;所述目标节点是通过所述密钥对中的私钥数据对所述目标节点信息解密得到;The transaction node responds to the transfer request from the resource provider node by transferring the target resource to the target node; the target node is obtained by decrypting the target node information using the private key data in the key pair;
所述区块链数据库生成新的区块作为所述区块链的尾部区块,并将所述目标节点的信息写入所述尾部区块的前一区块作为所述下一拥有者账户信息、将所述资源提供节点的信息写入所述尾部区块作为所述前一拥有者账户信息。The blockchain database generates a new block as the tail block of the blockchain, and writes the information of the target node into the block preceding the tail block as the next owner account information, and writes the information of the resource providing node into the tail block as the previous owner account information.
在本公开的一种示例性实施例中,所述交易节点响应于资源提供节点的转移请求将所述目标资源转移至目标节点,包括:In one exemplary embodiment of this disclosure, the transaction node transfers the target resource to the target node in response to a transfer request from the resource providing node, including:
所述交易节点生成用于指示将所述目标资源转移至所述目标账户的资源转移条件的智能合约,并且当检测到符合所述智能合约指示的资源转移条件时,基于所述智能合约将所述目标资源转移至目标账户。The transaction node generates a smart contract that indicates the resource transfer conditions for transferring the target resource to the target account, and when the resource transfer conditions indicated by the smart contract are detected, the target resource is transferred to the target account based on the smart contract.
根据本公开的一个方面,提供一种资源转移装置,包括:According to one aspect of this disclosure, a resource transfer apparatus is provided, comprising:
公钥发布模块,用于响应于第一账户的发布请求发布一密钥对中的公钥数据;The public key publishing module is used to publish the public key data of a key pair in response to a publishing request from the first account;
区块链查询模块,用于获取与目标资源关联的区块链,所述区块链上的各区块均写入有所述目标资源的前一拥有者账户信息以及下一拥有者账户信息;The blockchain query module is used to obtain the blockchain associated with the target resource. Each block on the blockchain contains the account information of the previous owner and the account information of the next owner of the target resource.
目标账户获取模块,用于接收第二账户通过所述公钥数据加密的目标账户信息,并将所述目标账户信息发送至所述第一账户;The target account acquisition module is used to receive target account information encrypted by the second account using the public key data, and send the target account information to the first account;
资源转移模块,用于响应于第一账户的转移请求将所述目标资源转移至目标账户;所述目标账户是通过所述密钥对中的私钥数据对所述目标账户信息解密得到;The resource transfer module is used to transfer the target resource to the target account in response to a transfer request from the first account; the target account is obtained by decrypting the target account information using the private key data in the key pair;
区块维护模块,用于生成新的区块作为所述区块链的尾部区块,并将所述目标账户的信息写入所述尾部区块的前一区块作为所述下一拥有者账户信息、将所述第一账户的信息写入所述尾部区块作为所述前一拥有者账户信息。The block maintenance module is used to generate new blocks as the tail block of the blockchain, and to write the information of the target account into the block preceding the tail block as the next owner account information, and to write the information of the first account into the tail block as the previous owner account information.
在本公开的一种示例性实施例中,各所述区块均写入有所述目标资源的资源标识信息;区块链查询模块具体用于,根据接收到的输入资源标识进行查询,并将与所述输入资源标识一致的区块作为与目标资源关联的区块链上的区块。In one exemplary embodiment of this disclosure, each block is written with the resource identifier information of the target resource; the blockchain query module is specifically used to query according to the received input resource identifier, and to take the block that matches the input resource identifier as the block on the blockchain associated with the target resource.
在本公开的一种示例性实施例中,在获取与目标资源关联的区块链之后,所述装置还包括:In one exemplary embodiment of this disclosure, after acquiring the blockchain associated with the target resource, the apparatus further includes:
资源溯源模块,用于根据所述区块链上的各区块写入的前一拥有者账户信息向前遍历,并将遍历到的最后一个区块作为第一目标区块;以及根据所述第一目标区块的拥有者账户确定所述目标资源的来源。The resource tracing module is used to traverse backwards based on the previous owner account information written in each block on the blockchain, and take the last block traversed as the first target block; and to determine the source of the target resource based on the owner account of the first target block.
在本公开的一种示例性实施例中,在获取与目标资源关联的区块链之后,所述装置还包括:In one exemplary embodiment of this disclosure, after acquiring the blockchain associated with the target resource, the apparatus further includes:
所有权确认模块,用于根据所述区块链上的各区块写入的下一拥有者账户信息向后遍历,并将遍历到的最后一个区块作为第二目标区块;以及根据所述第二目标区块的拥有者账户与所述第一账户是否一致确定所述第一账户是否拥有所述目标资源。The ownership confirmation module is used to traverse backwards based on the next owner account information written in each block on the blockchain, and take the last block traversed as the second target block; and to determine whether the first account owns the target resource based on whether the owner account of the second target block is consistent with the first account.
在本公开的一种示例性实施例中,所述装置还包括:In one exemplary embodiment of this disclosure, the apparatus further includes:
令牌发放模块,用于在接收到所述第一账户的令牌获取请求后,确定所述第一账户是否拥有所述目标资源;以及在确定所述第一账户拥有所述目标资源时,通过第三方认证机构向所述第一账户发放随机生成的令牌信息,以便于所述第一账户将所述目标资源转移至目标账户时携带所述令牌信息。The token issuance module is used to determine whether the first account owns the target resource after receiving a token acquisition request from the first account; and when it is determined that the first account owns the target resource, to issue randomly generated token information to the first account through a third-party certification authority, so that the first account can carry the token information when transferring the target resource to the target account.
在本公开的一种示例性实施例中,所述令牌发放模块通过下述步骤确定所述第一账户是否拥有所述目标资源:根据所述区块链上的各区块写入的下一拥有者账户信息向后遍历,并将遍历到的最后一个区块作为第二目标区块;根据所述第二目标区块的拥有者账户与所述第一账户是否一致确定所述第一账户是否拥有所述目标资源。In one exemplary embodiment of this disclosure, the token issuance module determines whether the first account owns the target resource by the following steps: traversing backwards according to the next owner account information written in each block on the blockchain, and taking the last block traversed as the second target block; determining whether the first account owns the target resource based on whether the owner account of the second target block is consistent with the first account.
在本公开的一种示例性实施例中,资源转移模块通过下述步骤将所述目标资源转移至目标账户:生成用于指示将所述目标资源转移至所述目标账户的资源转移条件的智能合约;当检测到符合所述智能合约指示的资源转移条件时,基于所述智能合约将所述目标资源转移至目标账户。In one exemplary embodiment of this disclosure, the resource transfer module transfers the target resource to the target account through the following steps: generating a smart contract for indicating resource transfer conditions for transferring the target resource to the target account; and when the resource transfer conditions indicated by the smart contract are detected, transferring the target resource to the target account based on the smart contract.
在本公开的一种示例性实施例中,所述区块链上的各区块均写入有所述目标资源的特征信息;所述装置还包括:In one exemplary embodiment of this disclosure, each block on the blockchain is written with the characteristic information of the target resource; the apparatus further includes:
资源特征验证模块,用于对所述目标账户上传的资源特征信息与所述区块中写入的特征信息进行一致性验证,以确认所述目标账户获取的资源是否为所述目标资源。The resource feature verification module is used to verify the consistency between the resource feature information uploaded by the target account and the feature information written in the block, so as to confirm whether the resource obtained by the target account is the target resource.
在本公开的一种示例性实施例中,所述特征信息包括对所述目标资源的特征数据进行哈希转换得到的哈希特征信息。In one exemplary embodiment of this disclosure, the feature information includes hash feature information obtained by hashing the feature data of the target resource.
在本公开的一种示例性实施例中,所述装置还包括:In one exemplary embodiment of this disclosure, the apparatus further includes:
信息记录模块,用于在将所述目标资源转移至目标账户之后,通过所述智能合约将所述第一账户的资源转移信息记录至区块链网络;以及在接收到用于查询所述第一账户的资源转移历史记录的查询请求时,从所述区块链网络获取所述第一账户的资源转移信息作为查询结果。The information recording module is used to record the resource transfer information of the first account to the blockchain network through the smart contract after the target resource is transferred to the target account; and to obtain the resource transfer information of the first account from the blockchain network as the query result when a query request for querying the resource transfer history of the first account is received.
根据本公开的一个方面,提供一种电子设备,包括:处理器;以及存储器,用于存储所述处理器的可执行指令;其中,所述处理器配置为经由执行所述可执行指令来执行上述任意一项所述的方法。According to one aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method described in any of the preceding methods by executing the executable instructions.
根据本公开的一个方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一项所述的方法。According to one aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the preceding claims.
本公开示例性实施例可以具有以下部分或全部有益效果:The exemplary embodiments disclosed herein may have some or all of the following beneficial effects:
在本公开部分示例实施方式所提供的资源转移方法中,一方面,将目标资源的每一次转移过程中的关键信息均记录在区块链中,基于区块链的历史可溯源性和不可篡改性,可以在区块链上真实的记录目标资源的各个转移环节,且所有的记录均可以在区块链上进行溯源;而且,由于转移记录是由区块链中的众多节点设备共同进行维护,要进行转移记录的篡改,需要控制大多数的节点设备才能做到,因此可以确保生成的转移记录的公正性;进而可以避免出现伪造商品来源、历史交易信息不实等问题,避免了因为刷单或广告效果产生信息不对称性的效果,进而提升买方对卖方的信任度。另一方面,第一账户可以根据目标账户信息是否可以通过预留的私钥数据解密,判断第二账户是否是有获取目标资源需求的账户,从而实现了对真正存在资源需求用户的筛选;同时,即使其他人获取加密的目标账户信息,由于没有私钥数据,也无法对其进行解密,进而可以避免目标账户信息泄露的问题。In the resource transfer method provided in the exemplary embodiments of this disclosure, on the one hand, key information in each transfer process of the target resource is recorded in the blockchain. Based on the historical traceability and immutability of the blockchain, each transfer stage of the target resource can be truthfully recorded on the blockchain, and all records can be traced on the blockchain. Moreover, since the transfer records are jointly maintained by numerous node devices in the blockchain, tampering with the transfer records requires control of a majority of node devices, thus ensuring the fairness of the generated transfer records. This avoids problems such as falsifying the source of goods and inaccurate historical transaction information, and avoids information asymmetry caused by fraudulent orders or advertising effects, thereby increasing the buyer's trust in the seller. On the other hand, the first account can determine whether the second account has a need to acquire the target resource based on whether the target account information can be decrypted through the reserved private key data, thereby achieving the screening of users who truly have a need for resources. At the same time, even if others obtain the encrypted target account information, they cannot decrypt it without the private key data, thus avoiding the problem of target account information leakage.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
附图说明Attached Figure Description
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
图1示出了可以应用本公开实施例的一种资源转移方法及装置的示例性系统架构的示意图;Figure 1 illustrates a schematic diagram of an exemplary system architecture for a resource transfer method and apparatus to which embodiments of the present disclosure can be applied;
图2示意性示出了根据本公开的一个实施例的资源转移方法的流程图;Figure 2 schematically illustrates a flowchart of a resource transfer method according to an embodiment of the present disclosure;
图3示意性示出了根据本公开的一个实施例的区块数据结构图;Figure 3 schematically illustrates a block data structure diagram according to an embodiment of the present disclosure;
图4示意性示出了根据本公开的一个实施例的资源溯源过程图;Figure 4 schematically illustrates a resource tracing process according to an embodiment of the present disclosure;
图5示意性示出了根据本公开的一个实施例的所有权确认过程图;Figure 5 schematically illustrates an ownership confirmation process according to an embodiment of the present disclosure;
图6示意性示出了根据本公开的一个实施例的担保交易过程的交互流程图;Figure 6 schematically illustrates an interactive flowchart of a secured transaction process according to an embodiment of the present disclosure;
图7示意性示出了根据本公开的一个实施例的区块链图;Figure 7 schematically illustrates a blockchain diagram according to an embodiment of the present disclosure;
图8示意性示出了根据本公开的一个实施例的资源转移方法的流程图;Figure 8 schematically illustrates a flowchart of a resource transfer method according to an embodiment of the present disclosure;
图9示意性示出了根据本公开的一个实施例的资源转移方法的流程图;Figure 9 schematically illustrates a flowchart of a resource transfer method according to an embodiment of the present disclosure;
图10示意性示出了根据本公开的一个实施例中资源转移过程中的交互界面;Figure 10 schematically illustrates an interactive interface during a resource transfer process according to one embodiment of the present disclosure;
图11示意性示出了根据本公开的一个实施例的资源转移装置的框图;Figure 11 schematically illustrates a block diagram of a resource transfer apparatus according to an embodiment of the present disclosure;
图12示出了适于用来实现本公开实施例的电子设备的计算机系统的结构示意图。Figure 12 shows a schematic diagram of the structure of a computer system suitable for implementing an electronic device according to embodiments of the present disclosure.
具体实施方式Detailed Implementation
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本公开的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本公开的各方面变得模糊。Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and/or processor devices and/or microcontroller devices.
图1示出了可以应用本公开实施例的一种基于区块链资源转移方法以及资源转移装置的示例性应用环境的系统架构的示意图。Figure 1 illustrates a schematic diagram of a system architecture for an exemplary application environment in which an embodiment of the blockchain-based resource transfer method and resource transfer device can be applied.
区块链(Blockchain)是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层。Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying platform, a platform product and service layer, and an application service layer.
区块链底层平台可以包括用户管理、基础服务、智能合约以及运营监控等处理模块。其中,用户管理模块负责所有区块链参与者的身份信息管理,包括维护公私钥生成(账户管理)、密钥管理以及用户真实身份和区块链地址对应关系维护(权限管理)等,并且在授权的情况下,监管和审计某些真实身份的交易情况,提供风险控制的规则配置(风控审计);基础服务模块部署在所有区块链节点设备上,用来验证业务请求的有效性,并对有效请求完成共识后记录到存储上,对于一个新的业务请求,基础服务先对接口适配解析和鉴权处理(接口适配),然后通过共识算法将业务信息加密(共识管理),在加密之后完整一致的传输至共享账本上(网络通信),并进行记录存储;智能合约模块负责合约的注册发行以及合约触发和合约执行,开发人员可以通过某种编程语言定义合约逻辑,发布到区块链上(合约注册),根据合约条款的逻辑,调用密钥或者其它的事件触发执行,完成合约逻辑,同时还提供对合约升级注销的功能;运营监控模块主要负责产品发布过程中的部署、配置的修改、合约设置、云适配以及产品运行中的实时状态的可视化输出,例如:告警、监控网络情况、监控节点设备健康状态等。The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operational monitoring. The user management module is responsible for managing the identity information of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between user real identities and blockchain addresses (access management). Furthermore, under authorization, it monitors and audits transactions of certain real identities and provides risk control rule configuration (risk control audit). The basic services module is deployed on all blockchain node devices to verify the validity of business requests. After consensus is reached on valid requests, they are recorded in storage. For a new business request, the basic services first perform interface adaptation parsing and authentication (interface adaptation), and then encrypt the business information through a consensus algorithm (consensus management). After encryption, the data is transmitted completely and consistently to the shared ledger (network communication) and recorded and stored. The smart contract module is responsible for contract registration, issuance, triggering, and execution. Developers can define contract logic using a programming language and publish it to the blockchain (contract registration). According to the contract terms, the key or other events are invoked to trigger execution and complete the contract logic. It also provides functions for contract upgrades and cancellations. The operation monitoring module is mainly responsible for deployment, configuration modification, contract settings, cloud adaptation, and real-time status visualization output during product release, such as alarms, monitoring network conditions, and monitoring the health status of node devices.
平台产品服务层提供典型应用的基本能力和实现框架,开发人员可以基于这些基本能力,叠加业务的特性,完成业务逻辑的区块链实现。应用服务层提供基于区块链方案的应用服务给业务参与方进行使用。The platform's product service layer provides the basic capabilities and implementation frameworks for typical applications. Developers can leverage these basic capabilities, along with the specific characteristics of their business needs, to implement blockchain-based business logic. The application service layer provides blockchain-based application services to business stakeholders.
区块链网络是由众多节点共同组成的一个端到端的去中心化网络,每个节点都允许获得一份完整的数据库拷贝,节点之间基于一套共识机制来共同维护整个区块链。A blockchain network is an end-to-end decentralized network composed of numerous nodes. Each node is allowed to obtain a complete copy of the database, and the nodes work together to maintain the entire blockchain based on a consensus mechanism.
如图1所示,本示例实施方式中的系统架构100可以包括上述区块链网络的分布式节点101、102、103、104、105和106;除此之外,还可以包括终端设备107、108和109。各个分布式节点之间可以通过通信链路进行连接,比如可以通过有线通信链路或无线通信链路进行连接等,多个分布式节点共同组成了区块链网络。另一方面,用户可通过终端设备107、108和109由网络接入相应的节点。As shown in Figure 1, the system architecture 100 in this example embodiment may include distributed nodes 101, 102, 103, 104, 105, and 106 of the aforementioned blockchain network; in addition, it may also include terminal devices 107, 108, and 109. The distributed nodes can be connected via communication links, such as wired or wireless communication links, and multiple distributed nodes together form the blockchain network. On the other hand, users can access the corresponding nodes through the network via terminal devices 107, 108, and 109.
应该理解,图1中所示的分布式节点以及终端设备的数目仅仅是示意性的。根据实现需要,可以具有任意数目的分布式节点以及终端设备。It should be understood that the number of distributed nodes and terminal devices shown in Figure 1 is merely illustrative. Depending on implementation needs, any number of distributed nodes and terminal devices can be used.
在本公开的一个实施例中,分布式节点101(也可以是分布式节点102、103、104、105和106中的任意一个或多个)可以响应于第一账户的发布请求发布一密钥对中的公钥数据;获取与目标资源关联的区块链,所述区块链上的各区块均写入有所述目标资源的前一拥有者账户信息以及下一拥有者账户信息;接收第二账户通过所述公钥数据加密的目标账户信息,并将所述目标账户信息发送至所述第一账户;响应于第一账户的转移请求将所述目标资源转移至目标账户;所述目标账户是通过所述密钥对中的私钥数据对所述目标账户信息解密得到;以及生成新的区块作为所述区块链的尾部区块,并将所述目标账户的信息写入所述尾部区块的前一区块作为所述下一拥有者账户信息、将所述第一账户的信息写入所述尾部区块作为所述前一拥有者账户信息。In one embodiment of this disclosure, distributed node 101 (which may also be any one or more of distributed nodes 102, 103, 104, 105, and 106) may, in response to a publishing request from a first account, publish public key data in a key pair; acquire a blockchain associated with the target resource, wherein each block on the blockchain contains the previous owner account information and the next owner account information of the target resource; receive target account information encrypted by a second account using the public key data, and send the target account information to the first account; transfer the target resource to the target account in response to a transfer request from the first account; the target account is obtained by decrypting the target account information using the private key data in the key pair; and generate a new block as the tail block of the blockchain, and write the target account information into the block preceding the tail block as the next owner account information, and write the first account information into the tail block as the previous owner account information.
通过上述实施例所提供的资源转移方法中,一方面,将目标资源的每一次转移过程中的关键信息均记录在区块链中,基于区块链的历史可溯源性和不可篡改性,可以在区块链上真实的记录目标资源的各个转移环节,且所有的记录均可以在区块链上进行溯源;而且,由于转移记录是由区块链中的众多节点设备共同进行维护,要进行转移记录的篡改,需要控制大多数的节点设备才能做到,因此可以确保生成的转移记录的公正性;进而可以避免出现伪造商品来源、历史交易信息不实等问题,避免了因为刷单或广告效果产生信息不对称性的效果,进而提升买方对卖方的信任度。另一方面,第一账户可以根据目标账户信息是否可以通过预留的私钥数据解密,判断第二账户是否是有获取目标资源需求的账户,从而实现了对真正存在资源需求用户的筛选;同时,即使其他人获取加密的目标账户信息,由于没有私钥数据,也无法对其进行解密,进而可以避免目标账户信息泄露的问题。The resource transfer method provided in the above embodiments, on the one hand, records key information in each transfer process of the target resource in the blockchain. Based on the historical traceability and immutability of the blockchain, each transfer stage of the target resource can be truly recorded on the blockchain, and all records can be traced on the blockchain. Moreover, since the transfer records are jointly maintained by numerous node devices in the blockchain, tampering with the transfer records requires control of most of the node devices, thus ensuring the fairness of the generated transfer records. This avoids problems such as falsifying the source of goods and inaccurate historical transaction information, and avoids information asymmetry caused by fraudulent orders or advertising effects, thereby increasing the buyer's trust in the seller. On the other hand, the first account can determine whether the second account has a need to acquire the target resource based on whether the target account information can be decrypted through the reserved private key data, thus achieving the screening of users who truly have a need for resources. At the same time, even if others obtain the encrypted target account information, they cannot decrypt it without the private key data, thus avoiding the problem of target account information leakage.
需要说明的是,本公开实施例所提供的基于区块链的资源转移方法一般由区块链节点执行,相应地,基于区块链的资源转移装置一般设置于区块链节点中。举例而言,上述区块链系统可以包括区块链数据库、交易节点、资源提供节点和资源请求节点等节点;本示例实施方式中所提供的基于区块链的资源转移方法可以由交易节点执行,相应地,基于区块链的资源转移装置一般设置于交易节点中。It should be noted that the blockchain-based resource transfer method provided in this embodiment is generally executed by blockchain nodes, and correspondingly, the blockchain-based resource transfer device is generally located within the blockchain nodes. For example, the aforementioned blockchain system may include nodes such as a blockchain database, transaction nodes, resource providing nodes, and resource requesting nodes; the blockchain-based resource transfer method provided in this example embodiment can be executed by transaction nodes, and correspondingly, the blockchain-based resource transfer device is generally located within the transaction nodes.
下面,对本示例实施方式提供的一种基于区块链的资源转移方法进行更加详细的说明。参考图2所示,所述方法可以包括下述步骤S210至步骤S250。其中:The following provides a more detailed description of a blockchain-based resource transfer method provided in this example embodiment. Referring to Figure 2, the method may include the following steps S210 to S250. Wherein:
在步骤S210中,响应于第一账户的发布请求发布一密钥对中的公钥数据。In step S210, the public key data of a key pair is published in response to the publication request of the first account.
本示例实施方式中,被转移的资源可以为商品,所述商品可以为具有物理实体的商品,如电子设备、服装、食品、车辆等;所述商品也可以为不具有物理实体的商品,如电子书、电子文档资料、数字影像等。其中,资源转移的一个含义是,资源的所有权从第一账户移交至目标账户,如商品交易过程即资源转移过程的一种表现;但本示例实施方式中的资源转移表现形式并不以此为限。In this example implementation, the transferred resource can be a commodity. The commodity can be a physical entity, such as electronic devices, clothing, food, or vehicles; it can also be a non-physical entity, such as e-books, electronic documents, or digital images. One meaning of resource transfer is the transfer of ownership of the resource from a first account to a target account, such as a commodity transaction, which is a manifestation of resource transfer. However, the form of resource transfer in this example implementation is not limited to this.
以商品交易为例,第一账户即卖方如果希望出售某一商品(即目标资源),可以通过资源提供节点向交易节点发送发布请求;交易节点在接收到第一账户通过资源提供节点发送的发布请求之后,可以在区块链网络中发布将目标资源被请求出售的信息,例如将目标资源标记为待出售状态等;其他账户通过相应的节点接收该信息之后,即可得知目标资源处于待出售的状态。Taking commodity trading as an example, if the first account, i.e. the seller, wants to sell a certain commodity (i.e. the target resource), it can send a publishing request to the trading node through the resource providing node. After receiving the publishing request sent by the first account through the resource providing node, the trading node can publish the information that the target resource is requested to be sold in the blockchain network, such as marking the target resource as a pending sale. Other accounts can know that the target resource is in a pending sale state after receiving the information through the corresponding node.
进一步的,本示例实施方式中,第一账户在通过资源提供节点发布目标资源出售信息时,还可以通过资源提供节点生成一密钥对;本示例实施方式中,所述密钥对可以包括公钥数据和私钥数据;其中,私钥数据可以由第一账户自己保留;公钥数据可以和目标资源出售信息共同发布。本示例实施方式中,可以通过RSA加密算法生成所述密钥对。当然,在本公开的其他示例性实施例中,也可以通过如Cramer-Shoup加密算法、Elgamal加密算法或者椭圆曲线加密算法等其他方法生成所述密钥对。Furthermore, in this exemplary embodiment, when the first account publishes the target resource sale information through the resource providing node, it can also generate a key pair through the resource providing node. In this exemplary embodiment, the key pair may include public key data and private key data; wherein, the private key data may be retained by the first account itself; the public key data may be published together with the target resource sale information. In this exemplary embodiment, the key pair can be generated using the RSA encryption algorithm. Of course, in other exemplary embodiments of this disclosure, the key pair can also be generated using other methods such as the Cramer-Shoup encryption algorithm, the Elgamal encryption algorithm, or the elliptic curve encryption algorithm.
在步骤S220中,获取与目标资源关联的区块链,所述区块链上的各区块均写入有所述目标资源的前一拥有者账户信息、下一拥有者账户信息。In step S220, the blockchain associated with the target resource is obtained, and each block on the blockchain contains the previous owner's account information and the next owner's account information of the target resource.
本示例实施方式中,交易节点可以获取与目标资源关联的区块链,从而便于根据获取到的区块链对目标资源进行验证。本示例实施方式中,所述区块链可以由多个区块构成,进而通过区块的数据结构来存储每次资源转移过程中产生的数据。In this example implementation, the transaction node can obtain the blockchain associated with the target resource, thereby facilitating the verification of the target resource based on the obtained blockchain. In this example implementation, the blockchain can consist of multiple blocks, and the data generated during each resource transfer is stored through the data structure of the blocks.
举例而言,目标资源每发生一次转移,就会创建一个区块来记录交易数据;图3中示出了本示例实施方式中区块的一种数据结构300,该区块的数据结构包括块数据和交易流数据。其中,块数据可以用于记录区块的属性数据,例如可以通过资源标识信息(如商品ID)记录该区块对应于哪一资源;可以通过创建者账户信息记录该区块由哪一个账户创建;可以通过资源特征信息记录目标资源的属性特征等信息;此外,块数据还可以记录该区块的创建时间等其他信息。交易流数据可以用于记录与资源转移直接相关的信息,例如可以通过前一拥有者账户信息记录目标资源的前一个拥有者账户地址;可以通过下一拥有者账户信息记录目标资源的下一个拥有者账户地址;此外,交易流数据还可以记录交易金额等其他信息。For example, each time a target resource is transferred, a block is created to record transaction data. Figure 3 shows a data structure 300 of the block in this example embodiment. The block data structure includes block data and transaction flow data. The block data can be used to record the block's attribute data. For example, resource identification information (such as a product ID) can be used to record which resource the block corresponds to; the creator's account information can be used to record which account created the block; the attribute characteristics of the target resource can be recorded through resource feature information; in addition, the block data can also record other information such as the block's creation time. The transaction flow data can be used to record information directly related to the resource transfer. For example, the previous owner's account information can be used to record the address of the previous owner's account of the target resource; the next owner's account information can be used to record the address of the next owner's account of the target resource; in addition, the transaction flow data can also record other information such as the transaction amount.
基于上述区块结构,本示例实施方式中,交易节点可以根据接收到的输入资源标识进行查询,并将与所述输入资源标识一致的区块作为与目标资源关联的区块链上的区块。例如,用户可以通过输入窗口输入商品ID,交易节点在接收到商品ID之后,则可以根据该商品ID在区块链网络进行查询,以获取包括该商品ID的区块而构成与目标资源关联的区块链。因此基于本示例实施方式中的方法,可以快速的从海量交易数据中获取到目标商品的任意交易数据,从而提高了假货鉴别或者确定商品来源等过程中的查询效率。Based on the above block structure, in this example implementation, transaction nodes can query based on the received input resource identifier and use the block that matches the input resource identifier as a block on the blockchain associated with the target resource. For example, a user can input a product ID through an input window. After receiving the product ID, the transaction node can query the blockchain network based on the product ID to obtain a block containing that product ID, thus forming a blockchain associated with the target resource. Therefore, based on the method in this example implementation, arbitrary transaction data of the target product can be quickly obtained from massive transaction data, thereby improving the query efficiency in processes such as counterfeit identification or determining the source of goods.
进一步的,本示例实施方式中,还可以根据与目标资源关联的区块链确定所述目标资源的来源。举例而言,可以根据所述区块链上的各区块写入的前一拥有者账户信息向前遍历,并将遍历到的最后一个区块作为第一目标区块,进而可以根据所述第一目标区块的拥有者账户确定所述目标资源的来源。Furthermore, in this example embodiment, the source of the target resource can also be determined based on the blockchain associated with the target resource. For example, the blockchain can be traversed backward based on the previous owner account information written in each block, and the last block reached can be taken as the first target block. Then, the source of the target resource can be determined based on the owner account of the first target block.
例如,参考图4所示,所述区块链的一个区块中记载数据包括商品ID为国际移动设备识别码(International Mobile Equipment Identity,IMEI)123456780000123、区块创建者账户为Frank、商品特征信息为5f249e4edfd82d758683bf084bc4a979、前一拥有者账户为Ellen。因此,可以确定目标资源的前一拥有者账户为Ellen;同样的,可以根据前一拥有者账户Ellen创建的区块,确定目标资源的再前一拥有者账户为David;依次类推,直至遍历到的最后一个区块,并将遍历到的最后一个区块作为第一目标区块;第一目标区块的拥有者可以为制造商,其前一拥有者账户信息可能为空值(NULL);进而,可以根据第一目标区块的拥有者确定目标资源的制造商,进而得知所述目标资源的来源。上述遍历过程的起始区块可以是在区块链上随机选择的区块,也可以是区块链上某一指定的区块,本示例性实施例中对此不做特殊限定。For example, referring to Figure 4, a block in the blockchain records data including a product ID of International Mobile Equipment Identity (IMEI) 123456780000123, a block creator account of Frank, product feature information of 5f249e4edfd82d758683bf084bc4a979, and a previous owner account of Ellen. Therefore, it can be determined that the previous owner account of the target resource is Ellen; similarly, based on the block created by the previous owner account Ellen, the previous owner account of the target resource can be determined to be David; and so on, until the last block is traversed, and the last block traversed is taken as the first target block; the owner of the first target block can be the manufacturer, and its previous owner account information may be null (NULL); furthermore, the manufacturer of the target resource can be determined based on the owner of the first target block, thus revealing the source of the target resource. The starting block of the above traversal process can be a block randomly selected on the blockchain or a specific block on the blockchain. This exemplary embodiment does not impose any special limitations on this.
本示例实施方式中,还可以根据与目标资源关联的区块链确定所述第一账户是否拥有所述目标资源,即是否具备所述目标资源的所有权,也即确定第一账户是否有资格决定目标资源的转移。举例而言,可以根据所述区块链上的各区块写入的下一拥有者账户信息向后遍历,并将遍历到的最后一个区块作为第二目标区块;根据所述第二目标区块的拥有者账户与所述第一账户是否一致确定所述第一账户是否拥有所述目标资源。In this example implementation, it can also be determined whether the first account owns the target resource, i.e., whether it has ownership of the target resource, based on the blockchain associated with the target resource, or whether the first account is qualified to decide on the transfer of the target resource. For example, it can be traversed backwards based on the next owner account information written in each block on the blockchain, and the last block traversed is taken as the second target block; whether the first account owns the target resource is determined based on whether the owner account of the second target block is consistent with the first account.
例如,参考图5所示,所述区块链中一区块中记载的数据包括商品ID为国际移动设备识别码123456780000123、区块创建者账户为David、商品特征信息为5f249e4edfd82d758683bf084bc4a979、下一拥有者账户为Ellen。因此,可以确定目标资源的下一拥有者账户为Ellen;同样的,可以根据下一拥有者账户Ellen创建的区块,确定目标资源的再下一拥有者账户为Frank;依次类推,直至遍历到的最后一个区块,并将遍历到的最后一个区块作为第二目标区块;第二目标区块的拥有者可以目标资源的卖方账户,其下一拥有者账户信息可能为空值(NULL);进而,如果第二目标区块的拥有者账户与所述第一账户是同一账户,则可以确定所述第一账户拥有所述目标资源,进而确定第一账户有资格决定所述目标资源的转移。上述遍历过程的起始区块可以是在区块链上随机选择的区块,也可以是区块链上某一指定的区块,本示例性实施例中对此不做特殊限定。For example, referring to Figure 5, the data recorded in a block of the blockchain includes a product ID of International Mobile Equipment Identity 123456780000123, a block creator account of David, product feature information of 5f249e4edfd82d758683bf084bc4a979, and a next owner account of Ellen. Therefore, it can be determined that the next owner account of the target resource is Ellen; similarly, based on the block created by the next owner account Ellen, the next next owner account of the target resource can be determined to be Frank; and so on, until the last block traversed, and the last block traversed is taken as the second target block; the owner of the second target block can be the seller account of the target resource, and its next owner account information may be null (NULL); furthermore, if the owner account of the second target block is the same account as the first account, it can be determined that the first account owns the target resource, and thus the first account is qualified to decide the transfer of the target resource. The starting block of the above traversal process can be a block randomly selected on the blockchain or a specific block on the blockchain. This exemplary embodiment does not impose any special limitations on this.
在本公开的其他示例性实施例中,也可以使买方通过其他方式确定所述第一账户是否拥有所述目标资源。举例而言,交易节点在接收到所述第一账户的令牌获取请求后,可以通过上述过程或者其他方式自动确定所述第一账户是否拥有所述目标资源;在确定所述第一账户拥有所述目标资源时,通过第三方认证机构向所述第一账户发放随机生成的令牌信息(Token),以便于所述第一账户将所述目标资源转移至目标账户时携带所述令牌信息。In other exemplary embodiments of this disclosure, the buyer may also determine whether the first account owns the target resource through other means. For example, after receiving a token acquisition request from the first account, the transaction node may automatically determine whether the first account owns the target resource through the above process or other means; when it is determined that the first account owns the target resource, a randomly generated token is issued to the first account through a third-party certification authority, so that the first account carries the token when transferring the target resource to the target account.
目标账户在接收到该令牌信息之后,可以在上述第三方认证机构对令牌信息进行验证,如果验证无误,则说明第一账户确实具备所述目标资源的所有权;通过该方法,第三方认证机构可以获知卖方信息,但买方并无法获知卖方信息,因此可以使卖方在不对公众暴露其账户地址的情况下完成交易,实现了匿名销售,增强了对卖方个人信息的保护。此外,在本公开的其他示例性实施例中,也可以通过如数字签名或者数字证书等方式实现卖方的匿名,这同样属于本公开的保护范围。After receiving the token information, the target account can verify it with the aforementioned third-party authentication authority. If the verification is successful, it indicates that the first account indeed owns the target resource. Through this method, the third-party authentication authority can obtain the seller's information, but the buyer cannot. Therefore, the seller can complete the transaction without publicly disclosing their account address, achieving anonymous sales and enhancing the protection of the seller's personal information. Furthermore, in other exemplary embodiments of this disclosure, seller anonymity can also be achieved through methods such as digital signatures or digital certificates, which also fall within the scope of protection of this disclosure.
在步骤S230中,接收第二账户通过所述公钥数据加密的目标账户信息,并将所述目标账户信息发送至所述第一账户。In step S230, the target account information encrypted by the public key data by the second account is received, and the target account information is sent to the first account.
本示例实施方式中,如果第二账户(如买方)希望获取目标资源,可以首先通过上述步骤S220中的方法,基于交易节点获取的区块链,对目标资源的来源信息以及第一账户对于目标资源的所有权信息进行验证;在验证无误之后,则可以从交易节点获取第一账户发布的公钥数据,并通过公钥数据对用于接收目标资源的目标账户进行加密。本示例实施方式中,目标账户可以与第二账户为同一账户,也可以为第二账户指定的其他账户,本公开对此不做特殊限定。In this example implementation, if a second account (such as a buyer) wishes to acquire the target resource, it can first verify the source information of the target resource and the ownership information of the first account regarding the target resource based on the blockchain obtained by the transaction node, using the method described in step S220 above. After verification, it can obtain the public key data published by the first account from the transaction node and encrypt the target account used to receive the target resource using the public key data. In this example implementation, the target account can be the same account as the second account, or it can be another account designated by the second account; this disclosure does not impose any special limitations on this.
在利用所述公钥数据对目标账户信息加密之后,可以通过资源请求节点将其发送至交易节点;交易节点在接收到加密的目标账户信息之后,将其转发至资源提供节点。第二账户通过资源提供节点获取加密的目标账户信息之后,可以通过上述密钥对中的私钥数据进行解密,得到解密后的目标账户信息。本示例实施方式中,通过公钥数据对目标账户信息进行加密,仅可由第一账户通过私钥数据解密获取目标账户信息;因此,一方面,第一账户可以根据目标账户信息是否可以通过预留的私钥数据解密,判断第二账户是否是有获取目标资源需求的账户,从而实现了对真正存在资源需求用户的筛选;另一方面,即使其他人获取加密的目标账户信息,由于没有私钥数据,也无法对其进行解密,进而可以避免目标账户信息泄露的问题。After encrypting the target account information using the public key data, it can be sent to the transaction node through the resource request node. Upon receiving the encrypted target account information, the transaction node forwards it to the resource provider node. The second account, after obtaining the encrypted target account information through the resource provider node, can decrypt it using the private key data in the aforementioned key pair to obtain the decrypted target account information. In this example embodiment, the target account information is encrypted using public key data, and only the first account can decrypt it using the private key data to obtain the target account information. Therefore, on the one hand, the first account can determine whether the second account has a need for the target resource based on whether the target account information can be decrypted using the reserved private key data, thus achieving the screening of users who genuinely have resource needs. On the other hand, even if others obtain the encrypted target account information, they cannot decrypt it because they do not have the private key data, thereby avoiding the problem of target account information leakage.
在步骤S240中,响应于第一账户的转移请求将所述目标资源转移至目标账户。In step S240, the target resource is transferred to the target account in response to the transfer request from the first account.
为了提高资源转移过程的可靠性,增强买方对卖方信任度,本示例实施方式中,可以采用智能合约的方式实现担保交易,从而通过智能合约将担保交易的仲裁规则和结算规则写入区块链中使其不可篡改。例如,可以首先生成用于指示将所述目标资源转移至所述目标账户的资源转移条件的智能合约;当检测到符合所述智能合约指示的资源转移条件时,基于所述智能合约将所述目标资源转移至目标账户。To improve the reliability of the resource transfer process and enhance the buyer's trust in the seller, this example implementation can employ smart contracts to implement escrow transactions. This allows the arbitration and settlement rules of the escrow transaction to be written into the blockchain, making them immutable. For example, a smart contract can first be generated to indicate the resource transfer conditions for transferring the target resource to the target account. When the resource transfer conditions indicated by the smart contract are detected, the target resource is transferred to the target account based on the smart contract.
举例而言,图6示出了本示例实施方式中一种基于智能合约实现的担保交易过程。其中,在步骤S610中,第一账户如卖方可以向智能合约提供目标资源的定价信息。在步骤S620中,第二账户如买方可以通过智能合约获取目标资源的定价信息,并按照定价信息进行付款;其所支付款项暂存在智能合约的合约账户中进行担保。在步骤S630中,在智能合约的合约账户收到买方付款之后,可以通知第一账户发货。在步骤S640中,第一账户向上述目标账户提供目标资源。在步骤S650中,目标账户在收到目标资源之后,可以向智能合约发送确认收货信息。在一种示例性实施例中,智能合约在获取买方确认收货的信息之后即可将其合约账户中暂存的买方付款转发到第一账户中。For example, Figure 6 illustrates a smart contract-based escrow transaction process in this exemplary embodiment. In step S610, the first account, such as the seller, can provide pricing information for the target resource to the smart contract. In step S620, the second account, such as the buyer, can obtain the pricing information for the target resource through the smart contract and make payment according to the pricing information; the payment is temporarily held as collateral in the smart contract's contract account. In step S630, after receiving the buyer's payment, the smart contract's contract account can notify the first account to ship the goods. In step S640, the first account provides the target resource to the target account. In step S650, after receiving the target resource, the target account can send a confirmation of receipt to the smart contract. In an exemplary embodiment, after obtaining the buyer's confirmation of receipt, the smart contract can forward the buyer's payment temporarily held in its contract account to the first account.
在另一种示例性实施例中,第一账户在向目标账户提供目标资源时,还可以同时携带上述步骤S220中所述的令牌信息。进而,在步骤S650中,目标账户在收到目标资源之后,还可以将接收到的令牌信息上传至智能合约。进而,在步骤S660中,智能合约对所述目标账户上传的令牌信息进行验证,如果验证通过,则说明第一账户确实具备所述目标资源的所有权;否则,说明所述第一账户可能为非法商户。In another exemplary embodiment, when the first account provides the target resource to the target account, it may also simultaneously carry the token information described in step S220 above. Furthermore, in step S650, after receiving the target resource, the target account may upload the received token information to the smart contract. Then, in step S660, the smart contract verifies the token information uploaded by the target account. If the verification passes, it indicates that the first account indeed possesses ownership of the target resource; otherwise, it indicates that the first account may be an unauthorized merchant.
在又一种示例性实施例中,在步骤S650中,目标账户在收到目标资源之后,还可以获取收到的资源的资源特征信息,并将获取的资源特征信息上传至智能合约。进而,在步骤S660中,智能合约对所述目标账户上传的资源特征信息与所述区块中写入的特征信息进行一致性验证,以确认所述目标账户获取的资源是否为所述目标资源。In another exemplary embodiment, in step S650, after receiving the target resource, the target account can also obtain resource feature information of the received resource and upload the obtained resource feature information to the smart contract. Then, in step S660, the smart contract verifies the consistency between the resource feature information uploaded by the target account and the feature information written in the block to confirm whether the resource obtained by the target account is the target resource.
例如,目标资源可以为具有物理实体的商品,该商品的标签(如二维码标签或者RFID(Radio Frequency Identification,射频识别)标签等)中可以写入有商品的特征信息;在步骤S650中,可以通过扫描商品的标签读取到商品的特征信息;在步骤S660中,智能合约可以对目标账户读取到的商品的特征信息与所述区块中写入的特征信息进行一致性比对;如果一致,则说明目标账户获取的资源为所述目标资源,否则,目标账户获取的资源可能并非所述目标资源。如果所述目标资源不具有物理实体的商品,如数字商品,则上述特征信息也可以直接写入在数字商品的指定位置,且本示例性实施例中并不以此为限。For example, the target resource can be a product with a physical entity, and the product's label (such as a QR code label or an RFID (Radio Frequency Identification) label) can contain the product's characteristic information. In step S650, the product's characteristic information can be read by scanning the product's label. In step S660, the smart contract can perform a consistency comparison between the characteristic information of the product read by the target account and the characteristic information written in the block. If they match, it means that the resource obtained by the target account is the target resource; otherwise, the resource obtained by the target account may not be the target resource. If the target resource is not a product with a physical entity, such as a digital product, the aforementioned characteristic information can also be directly written into a designated location of the digital product, and this exemplary embodiment is not limited to this.
本示例实施方式中,上述特征信息可以包括对所述目标资源的特征数据进行哈希转换得到的哈希特征信息。例如,目标资源具有多个部件,所述目标资源的特征数据可以包括各个部件的唯一标识;则可以将各个部件的唯一标识进行哈希转换得到的目标资源的哈希特征信息。又例如,目标资源为数字商品,则直接对数字商品进行哈希转换,并将得到的哈希码作为目标资源的哈希特征信息等。In this example implementation, the aforementioned feature information may include hash feature information obtained by hashing the feature data of the target resource. For example, if the target resource has multiple components, the feature data of the target resource may include the unique identifier of each component; then the hash feature information of the target resource can be obtained by hashing the unique identifier of each component. As another example, if the target resource is a digital product, then the digital product is directly hashed, and the resulting hash code is used as the hash feature information of the target resource.
在步骤S670中,向目标账户通知上述验证结果。在步骤S680中,如果对目标资源以及第一账户验证通过,智能合约则可以将其合约账户中暂存的买方付款转发到第一账户中。此外,在本公开的其他示例性实施例中,智能合约也可以根据物流信息自主判断目标账户是否收到资源,并在逾期未收到目标账户的确认收货信息时,自动将其合约账户中暂存的买方付款转发到第一账户中;这同样属于本公开的保护范围。In step S670, the verification result is notified to the target account. In step S680, if the verification of the target resource and the first account is successful, the smart contract can forward the buyer's payment temporarily stored in its contract account to the first account. Furthermore, in other exemplary embodiments of this disclosure, the smart contract can also autonomously determine whether the target account has received the resource based on logistics information, and automatically forward the buyer's payment temporarily stored in its contract account to the first account if it does not receive confirmation of receipt from the target account within the stipulated time; this also falls within the scope of protection of this disclosure.
在步骤S250中,生成新的区块作为所述区块链的尾部区块,并将所述目标账户的信息写入所述尾部区块的前一区块作为所述下一拥有者账户信息、将所述第一账户的信息写入所述尾部区块作为所述前一拥有者账户信息。In step S250, a new block is generated as the tail block of the blockchain, and the information of the target account is written into the block preceding the tail block as the next owner account information, and the information of the first account is written into the tail block as the previous owner account information.
举例而言,参考图7所示,在第一账户Julia将目标资源转移给目标账户Kate之前,区块链的尾部区块的创建者账户为Julia,区块前一拥有者账户为Ellen、下一拥有者账户为空值(NULL)。在第一账户Julia将目标资源转移给目标账户Kate之后,可以生成新的区块作为区块链的尾部区块;在新生成的尾部区块中记载的数据包括商品ID为国际移动设备识别码123456780000123、区块创建者账户为Frank、商品特征信息为5f249e4edfd82d758683bf084bc4a979、前一拥有者账户为Julia、下一拥有者账户为空值(NULL)。同时,将目标账户Kate写入所述尾部区块的前一区块作为所述下一拥有者账户信息。For example, referring to Figure 7, before the first account Julia transfers the target resource to the target account Kate, the creator account of the tail block of the blockchain is Julia, the previous owner account is Ellen, and the next owner account is null (NULL). After the first account Julia transfers the target resource to the target account Kate, a new block can be generated as the tail block of the blockchain. The data recorded in the newly generated tail block includes the product ID as International Mobile Equipment Identity 123456780000123, the block creator account as Frank, the product feature information as 5f249e4edfd82d758683bf084bc4a979, the previous owner account as Julia, and the next owner account as null (NULL). At the same time, the target account Kate is written into the block preceding the tail block as the next owner account information.
此外,本示例实施方式中,在将所述目标资源转移至目标账户之后,还可以通过所述智能合约将所述第一账户的资源转移信息记录至区块链网络;进而,在接收到用于查询所述第一账户的资源转移历史记录的查询请求时,可以从所述区块链网络获取所述第一账户的资源转移信息作为查询结果。例如,买方可以根据卖方的账户信息,查询卖方过往的交易记录,从而实现对卖方的信用评估。在本公开的其他示例性实施例中,也可以通过训练好的机器学习模型或者其他方式基于卖方过往的交易记录,实现对卖方的信用评估,本示例性实施例中对此不做特殊限定。Furthermore, in this exemplary embodiment, after the target resource is transferred to the target account, the resource transfer information of the first account can be recorded to the blockchain network through the smart contract. Then, upon receiving a query request to inquire about the resource transfer history of the first account, the resource transfer information of the first account can be obtained from the blockchain network as the query result. For example, a buyer can query the seller's past transaction records based on the seller's account information, thereby achieving a credit assessment of the seller. In other exemplary embodiments of this disclosure, a credit assessment of the seller can also be achieved based on the seller's past transaction records using a trained machine learning model or other methods; this exemplary embodiment does not impose any special limitations on this approach.
下面,在又一实施例中,对本示例实施方式中的再一种资源转移方法进行说明。该资源转移方法应用于区块链系统,所述区块链系统包括区块链数据库、交易节点、资源提供节点和资源请求节点等。参考图8所述,所述方法可以包括下述步骤S810至步骤S850。其中:Next, in yet another embodiment, a further resource transfer method according to this example implementation will be described. This resource transfer method is applied to a blockchain system, which includes a blockchain database, transaction nodes, resource providing nodes, and resource requesting nodes, etc. Referring to FIG8, the method may include the following steps S810 to S850. Wherein:
在步骤S810中,所述交易节点响应于资源提供节点的发布请求发布一密钥对中的公钥数据。In step S810, the transaction node responds to the resource provider node's publication request by publishing the public key data in a key pair.
在步骤S820中,所述交易节点从所述区块链数据库获取与目标资源关联的区块链,所述区块链上的各区块均写入有所述目标资源的前一拥有者账户信息、下一拥有者账户信息。In step S820, the transaction node obtains the blockchain associated with the target resource from the blockchain database. Each block on the blockchain contains the previous owner's account information and the next owner's account information of the target resource.
举例而言,参考图9所示,以商品交易为例,买方901可以通过如图10所示的输入窗口在交易节点根据商品标识进行区块查询,从而获取与目标资源关联的区块链;进而可以根据与目标资源关联的区块链,进行商品溯源以及流通过程查询等操作;对应的操作过程已经在上述步骤S220中进行了详述,因此此处不再重复赘述。此外,买方还可以通过如图10所示的输入窗口在交易节点根据账户标识,查询输入的账户标识对应的账户的历史交易记录,从而对卖方进行信用评估。For example, referring to Figure 9, taking commodity transactions as an example, buyer 901 can use the input window shown in Figure 10 to query the block at the transaction node based on the commodity identifier, thereby obtaining the blockchain associated with the target resource; then, based on the blockchain associated with the target resource, operations such as commodity traceability and circulation process query can be performed; the corresponding operation process has been detailed in step S220 above, so it will not be repeated here. In addition, the buyer can also use the input window shown in Figure 10 to query the historical transaction records of the account corresponding to the input account identifier at the transaction node, thereby conducting a credit assessment of the seller.
在步骤S830中,所述资源请求节点通过所述交易节点将利用所述公钥数据加密的目标节点信息发送至所述资源提供节点。In step S830, the resource requesting node sends the target node information encrypted with the public key data to the resource providing node through the transaction node.
在步骤S840中,所述交易节点响应于资源提供节点的转移请求将所述目标资源转移至目标节点;所述目标节点是通过所述密钥对中的私钥数据对所述目标节点信息解密得到。举例而言,所述交易节点可以生成用于指示将所述目标资源转移至所述目标节点的资源转移条件的智能合约,并且当检测到符合所述智能合约指示的资源转移条件时,基于所述智能合约将所述目标资源转移至目标节点。In step S840, the transaction node, in response to a transfer request from the resource provider node, transfers the target resource to the target node; the target node is obtained by decrypting the target node information using the private key data in the key pair. For example, the transaction node can generate a smart contract indicating resource transfer conditions for transferring the target resource to the target node, and when resource transfer conditions indicated by the smart contract are detected, the target resource is transferred to the target node based on the smart contract.
此外,所述区块链系统还包括第三方认证机构;所述方法还可以包括:在确定所述资源提供节点拥有所述目标资源时,第三方认证机构向所述资源提供节点发放随机生成的令牌信息;所述资源提供节点将所述目标资源转移至目标节点时携带所述令牌信息。In addition, the blockchain system also includes a third-party certification authority; the method may further include: when it is determined that the resource providing node owns the target resource, the third-party certification authority issues randomly generated token information to the resource providing node; the resource providing node carries the token information when transferring the target resource to the target node.
在步骤S850中,所述区块链数据库生成新的区块作为所述区块链的尾部区块,并将所述目标节点的信息写入所述尾部区块的前一区块作为所述下一拥有者节点信息、将所述资源提供节点的信息写入所述尾部区块作为所述前一拥有者节点信息。In step S850, the blockchain database generates a new block as the tail block of the blockchain, and writes the information of the target node into the block preceding the tail block as the next owner node information, and writes the information of the resource provider node into the tail block as the previous owner node information.
在本公开示例性实施例提供的资源转移方法中,一方面,将目标资源的每一次转移过程中的关键信息均记录在区块链中,基于区块链的历史可溯源性和不可篡改性,可以在区块链上真实的记录目标资源的各个转移环节,且所有的记录均可以在区块链上进行溯源;而且,由于转移记录是由区块链中的众多节点设备共同进行维护,要进行转移记录的篡改,需要控制大多数的节点设备才能做到,因此可以确保生成的转移记录的公正性;进而可以避免出现伪造商品来源、历史交易信息不实等问题,避免了因为刷单或广告效果产生信息不对称性的效果,进而提升买方对卖方的信任度。另一方面,第一账户可以根据目标账户信息是否可以通过预留的私钥数据解密,判断第二账户是否是有获取目标资源需求的账户,从而实现了对真正存在资源需求用户的筛选;同时,即使其他人获取加密的目标账户信息,由于没有私钥数据,也无法对其进行解密,进而可以避免目标账户信息泄露的问题。再一方面,通过智能合约进行担保交易,可以进一步加速第一账户和第二账户之间的信任建立过程。In the resource transfer method provided by the exemplary embodiments of this disclosure, on the one hand, key information in each transfer process of the target resource is recorded in the blockchain. Based on the historical traceability and immutability of the blockchain, each transfer stage of the target resource can be truthfully recorded on the blockchain, and all records can be traced on the blockchain. Moreover, since the transfer records are jointly maintained by numerous node devices in the blockchain, tampering with the transfer records requires control of a majority of node devices, thus ensuring the fairness of the generated transfer records. This avoids problems such as falsifying the source of goods and inaccurate historical transaction information, and avoids information asymmetry caused by fraudulent orders or advertising effects, thereby increasing the buyer's trust in the seller. On the other hand, the first account can determine whether the second account has a need to acquire the target resource based on whether the target account information can be decrypted through the reserved private key data, thereby achieving the screening of users who truly have a need for resources. At the same time, even if others obtain the encrypted target account information, they cannot decrypt it without the private key data, thus avoiding the problem of target account information leakage. Furthermore, using smart contracts for escrow transactions can further accelerate the trust establishment process between the first and second accounts.
应当注意,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。It should be noted that although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and/or a step may be broken down into multiple steps.
进一步的,本示例实施方式中,还提供了一种资源转移装置。该资源转移装置可以应用于区块链中的节点。参考图11所示,该资源转移装置1100可以包括公钥发布模块1110、区块链查询模块1120、目标账户获取模块1130、资源转移模块1140以及区块维护模块1150。其中:Furthermore, this example embodiment also provides a resource transfer device. This resource transfer device can be applied to nodes in a blockchain. Referring to Figure 11, the resource transfer device 1100 may include a public key issuance module 1110, a blockchain query module 1120, a target account acquisition module 1130, a resource transfer module 1140, and a block maintenance module 1150. Wherein:
公钥发布模块1110可以用于响应于第一账户的发布请求发布一密钥对中的公钥数据;The public key publishing module 1110 can be used to publish the public key data in a key pair in response to a publishing request from the first account;
区块链查询模块1120可以用于获取与目标资源关联的区块链,所述区块链上的各区块均写入有所述目标资源的前一拥有者账户信息以及下一拥有者账户信息;The blockchain query module 1120 can be used to obtain the blockchain associated with the target resource, and each block on the blockchain contains the account information of the previous owner and the account information of the next owner of the target resource.
目标账户获取模块1130可以用于接收第二账户通过所述公钥数据加密的目标账户信息,并将所述目标账户信息发送至所述第一账户;The target account acquisition module 1130 can be used to receive target account information encrypted by the second account using the public key data, and send the target account information to the first account;
资源转移模块1140可以用于响应于第一账户的转移请求将所述目标资源转移至目标账户;所述目标账户是通过所述密钥对中的私钥数据对所述目标账户信息解密得到;The resource transfer module 1140 can be used to transfer the target resource to the target account in response to a transfer request from the first account; the target account is obtained by decrypting the target account information using the private key data in the key pair;
区块维护模块1150可以用于生成新的区块作为所述区块链的尾部区块,并将所述目标账户的信息写入所述尾部区块的前一区块作为所述下一拥有者账户信息、将所述第一账户的信息写入所述尾部区块作为所述前一拥有者账户信息。The block maintenance module 1150 can be used to generate new blocks as the tail block of the blockchain, write the information of the target account into the block preceding the tail block as the next owner account information, and write the information of the first account into the tail block as the previous owner account information.
在本公开的一种示例性实施例中,各所述区块均写入有所述目标资源的资源标识信息;区块链查询模块1120具体用于,根据接收到的输入资源标识进行查询,并将与所述输入资源标识一致的区块作为与目标资源关联的区块链上的区块。In one exemplary embodiment of this disclosure, each block is written with resource identifier information of the target resource; the blockchain query module 1120 is specifically used to query according to the received input resource identifier, and take the block that matches the input resource identifier as the block on the blockchain associated with the target resource.
在本公开的一种示例性实施例中,在获取与目标资源关联的区块链之后,所述装置还包括:In one exemplary embodiment of this disclosure, after acquiring the blockchain associated with the target resource, the apparatus further includes:
资源溯源模块可以用于根据所述区块链上的各区块写入的前一拥有者账户信息向前遍历,并将遍历到的最后一个区块作为第一目标区块;以及根据所述第一目标区块的拥有者账户确定所述目标资源的来源。The resource tracing module can be used to traverse backwards based on the previous owner account information written in each block on the blockchain, and take the last block traversed as the first target block; and determine the source of the target resource based on the owner account of the first target block.
在本公开的一种示例性实施例中,在获取与目标资源关联的区块链之后,所述装置还包括:In one exemplary embodiment of this disclosure, after acquiring the blockchain associated with the target resource, the apparatus further includes:
所有权确认模块可以用于根据所述区块链上的各区块写入的下一拥有者账户信息向后遍历,并将遍历到的最后一个区块作为第二目标区块;以及根据所述第二目标区块的拥有者账户与所述第一账户是否一致确定所述第一账户是否拥有所述目标资源。The ownership confirmation module can be used to traverse backwards based on the next owner account information written in each block on the blockchain, and take the last block traversed as the second target block; and determine whether the first account owns the target resource based on whether the owner account of the second target block is consistent with the first account.
在本公开的一种示例性实施例中,所述装置还包括:In one exemplary embodiment of this disclosure, the apparatus further includes:
令牌发放模块可以用于在接收到所述第一账户的令牌获取请求后,确定所述第一账户是否拥有所述目标资源;以及在确定所述第一账户拥有所述目标资源时,通过第三方认证机构向所述第一账户发放随机生成的令牌信息,以便于所述第一账户将所述目标资源转移至目标账户时携带所述令牌信息。The token issuance module can be used to determine whether the first account owns the target resource after receiving a token acquisition request from the first account; and when it is determined that the first account owns the target resource, to issue randomly generated token information to the first account through a third-party certification authority, so that the first account can carry the token information when transferring the target resource to the target account.
在本公开的一种示例性实施例中,所述令牌发放模块通过下述步骤确定所述第一账户是否拥有所述目标资源:根据所述区块链上的各区块写入的下一拥有者账户信息向后遍历,并将遍历到的最后一个区块作为第二目标区块;根据所述第二目标区块的拥有者账户与所述第一账户是否一致确定所述第一账户是否拥有所述目标资源。In one exemplary embodiment of this disclosure, the token issuance module determines whether the first account owns the target resource by the following steps: traversing backwards according to the next owner account information written in each block on the blockchain, and taking the last block traversed as the second target block; determining whether the first account owns the target resource based on whether the owner account of the second target block is consistent with the first account.
在本公开的一种示例性实施例中,资源转移模块1140通过下述步骤将所述目标资源转移至目标账户:生成用于指示将所述目标资源转移至所述目标账户的资源转移条件的智能合约;当检测到符合所述智能合约指示的资源转移条件时,基于所述智能合约将所述目标资源转移至目标账户。In one exemplary embodiment of this disclosure, the resource transfer module 1140 transfers the target resource to the target account through the following steps: generating a smart contract for indicating resource transfer conditions for transferring the target resource to the target account; and when the resource transfer conditions indicated by the smart contract are detected, transferring the target resource to the target account based on the smart contract.
在本公开的一种示例性实施例中,所述区块链上的各区块均写入有所述目标资源的特征信息;所述装置还包括:In one exemplary embodiment of this disclosure, each block on the blockchain is written with the characteristic information of the target resource; the apparatus further includes:
资源特征验证模块可以用于对所述目标账户上传的资源特征信息与所述区块中写入的特征信息进行一致性验证,以确认所述目标账户获取的资源是否为所述目标资源。The resource feature verification module can be used to verify the consistency between the resource feature information uploaded by the target account and the feature information written in the block, so as to confirm whether the resource obtained by the target account is the target resource.
在本公开的一种示例性实施例中,所述特征信息包括对所述目标资源的特征数据进行哈希转换得到的哈希特征信息。In one exemplary embodiment of this disclosure, the feature information includes hash feature information obtained by hashing the feature data of the target resource.
上述资源转移装置中各模块或单元的具体细节已经在对应的资源转移方法中进行了详细的描述,因此此处不再赘述。The specific details of each module or unit in the above-mentioned resource transfer device have been described in detail in the corresponding resource transfer method, so they will not be repeated here.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
图12示出了适于用来实现本公开实施例的电子设备的计算机系统的结构示意图。需要说明的是,图12示出的电子设备的计算机系统1200仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Figure 12 shows a schematic diagram of a computer system suitable for implementing embodiments of the present disclosure. It should be noted that the computer system 1200 of the electronic device shown in Figure 12 is merely an example and should not impose any limitations on the functionality and scope of the embodiments of the present disclosure.
如图12所示,计算机系统1200包括中央处理单元(CPU)1201,其可以根据存储在只读存储器(ROM)1202中的程序或者从存储部分1208加载到随机访问存储器(RAM)1203中的程序而执行各种适当的动作和处理。在RAM 1203中,还存储有系统操作所需的各种程序和数据。CPU 1201、ROM 1202以及RAM 1203通过总线1204彼此相连。输入/输出(I/O)接口1205也连接至总线1204。As shown in Figure 12, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1202 or programs loaded from storage section 1208 into random access memory (RAM) 1203. The RAM 1203 also stores various programs and data required for system operation. The CPU 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. An input/output (I/O) interface 1205 is also connected to bus 1204.
以下部件连接至I/O接口1205:包括键盘、鼠标等的输入部分1206;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1207;包括硬盘等的存储部分1208;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1209。通信部分1209经由诸如因特网的网络执行通信处理。驱动器1210也根据需要连接至I/O接口1205。可拆卸介质1211,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1210上,以便于从其上读出的计算机程序根据需要被安装入存储部分1208。The following components are connected to I/O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to I/O interface 1205 as needed. Removable media 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1210 as needed so that computer programs read from them can be installed into storage section 1208 as needed.
特别地,根据本公开的实施例,下文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分1209从网络上被下载和安装,和/或从可拆卸介质1211被安装。在该计算机程序被中央处理单元(CPU)1201执行时,执行本申请的方法和装置中限定的各种功能。在一些实施例中,计算机系统1200还可以包括AI(ArtificialIntelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。In particular, according to embodiments of this disclosure, the processes described below with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1209, and/or installed from removable medium 1211. When the computer program is executed by central processing unit (CPU) 1201, it performs various functions defined in the methods and apparatus of this application. In some embodiments, computer system 1200 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
需要说明的是,本公开所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium disclosed herein may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现,所描述的单元也可以设置在处理器中。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定。The units described in the embodiments of this disclosure can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the unit itself.
应当理解的是,本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的范围仅由所附的权利要求来限制。It should be understood that other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the scope of this disclosure is limited only by the appended claims.
Claims (15)
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK40020407A HK40020407A (en) | 2020-10-23 |
| HK40020407B true HK40020407B (en) | 2024-05-24 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110766406B (en) | Resource transfer method, resource transfer device, storage medium and electronic equipment | |
| JP6873270B2 (en) | Handling of transaction activities based on smart contracts in the blockchain Caution Methods and devices for protecting data | |
| JP6841911B2 (en) | Information protection systems and methods | |
| US12430639B2 (en) | Method, system, and computer-readable medium for secured multi-lateral data exchange over a computer network | |
| US11941588B2 (en) | Systems and methods for blockchain virtualization and scalability | |
| CN112383611B (en) | File evidence storing method and system based on block chain and server | |
| US10592985B2 (en) | Systems and methods for a commodity contracts market using a secure distributed transaction ledger | |
| US20190050854A1 (en) | Blockchain-based digital data exchange | |
| JP2023509340A (en) | Methods and systems for confirmation and transfer of property rights, electronic devices and storage media | |
| US20170221029A1 (en) | Blockchaining systems and methods for frictionless media | |
| US20170213210A1 (en) | Asset transfers using a multi-tenant transaction database | |
| CN108768933B (en) | Autonomous supervision digital identity authentication system on block chain platform | |
| JP7364238B2 (en) | Electronic trading systems, trading servers, verification servers, electronic trading methods and programs | |
| JP2001216198A (en) | Method and device for issuing use permit card | |
| JP7327480B2 (en) | Electronic trading system, trading management server, electronic trading method and program | |
| CN111709029A (en) | Data operation and privacy transaction method based on block chain and trusted computing network | |
| US11783011B1 (en) | Asset metadata oracle service for facilitating digital asset trading | |
| CN115619395B (en) | Blockchain-based data processing methods and related equipment | |
| US20240137280A1 (en) | Methods and systems for introducing self-contained intent functionality into decentralized computer networks | |
| US12432061B2 (en) | Content protection system | |
| CN110879876B (en) | System and method for issuing certificates | |
| CN113706261A (en) | Block chain-based power transaction method, device and system | |
| CN116860866A (en) | Block chain-based data sharing method, device, equipment and storage medium | |
| JP2023500260A (en) | Proxy mutual ledger authentication | |
| KR102664269B1 (en) | Platform for appliance based resource catalog |