CN111835884B - 用于区块链的虚拟地址生成方法 - Google Patents

用于区块链的虚拟地址生成方法 Download PDF

Info

Publication number
CN111835884B
CN111835884B CN202010668866.5A CN202010668866A CN111835884B CN 111835884 B CN111835884 B CN 111835884B CN 202010668866 A CN202010668866 A CN 202010668866A CN 111835884 B CN111835884 B CN 111835884B
Authority
CN
China
Prior art keywords
data
virtual address
contract
address
token
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010668866.5A
Other languages
English (en)
Other versions
CN111835884A (zh
Inventor
马昊伯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Chuangsihuiquan Technology Co.,Ltd.
Original Assignee
Beijing Haopu Information And Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Haopu Information And Technology Co ltd filed Critical Beijing Haopu Information And Technology Co ltd
Priority to CN202010668866.5A priority Critical patent/CN111835884B/zh
Publication of CN111835884A publication Critical patent/CN111835884A/zh
Application granted granted Critical
Publication of CN111835884B publication Critical patent/CN111835884B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/321Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
    • H04L9/3213Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Engineering (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

本发明提供一种用于区块链的虚拟地址生成方法,其特征在于通过合约地址数据和令牌数据计算生成,其具体生成步骤为:对合约地址数据和令牌数据式化预处理;将区块链系统内合约地址A和由令牌数据进行哈希运算得到的字节类型数据T进行拼接后,得到定长字节类型数据(A,T),对拼接后数据进行哈希预算Hash(A,T),最终生成的定长字节类型数据可作为虚拟地址。本发明得到的虚拟地址是独一无二的。交易行为会产生唯一的交易Id,投票行为会产生唯一的投票Id等等,在此类场景下利用Id作为令牌数据,而合约处理相应业务逻辑时可以为该行为产生一个唯一的Virtual Address。该Virtual Address可以理解为某个业务在这个合约上的映射,该业务涉及到款项可以安全地使用这个虚拟地址来管理。

Description

用于区块链的虚拟地址生成方法
技术领域
本发明涉及虚拟地址领域,尤其涉及一种用于区块链的虚拟地址生成方法。
背景技术
AElf区块链使用Account模型,即无论是用户还是合约,都拥有Address,言下之意实际上我们使用Address做为用户或合约的唯一标识。
而除此之外,出于扩展合约功能的目的,每一个合约可以基于自己的 Address,加上任意的Hash值,得到无数个只有该合约能够操作的抽象的Address。即,某个合约使用自己的Address和一个Hash生成的地址,称之为 Virtual Address,即虚拟地址。
在AElf区块链中的转账方法为对MultiToken合约发送Transfer交易,并在该交易的参数中传入接收方和代币种类、数额等。一次转账行为涉及发送方和接收方,二者都以Address作为标识。在这个场景中,前面提到的合约通过自己的Address和某个Hash生成的Virtual Address,与普通的对应于一个用户或一个合约的Address并无二致,能够作为转账行为的任意一方。而由于 Virtual Address被实现为只能由生成它的合约亲自来操控,这就为该合约完全独立地保管每一笔业务、或者每一个用户的相关资金提供了可能。
在经济活动中,合约需要对用户的token进行操作,如果开发者在自己的合约中直接对用户的address进行操作,会增加用户所持token被转移的风险,给用户账户安全带来隐患。
发明内容
根据以上技术问题,本发明提供一种用于区块链的虚拟地址生成方法,其特征在于通过合约地址数据和令牌数据计算生成,其具体生成步骤为:
一、对合约地址数据和令牌数据格式化预处理;
选取区块链系统内合约地址,合约地址为定长的数据结构,将原始合约地址数据转换为字节数据结构A;
二、由于业务门类的区别,对不同类型的令牌数据进行哈希运算得到定长的字节类型数据T;
三、将上述预处理的数据拼接后得到定长字节类型数据(A,T),对拼接后数据进行哈希预算Hash(A,T),最终生成的定长字节类型数据可作为虚拟地址;其中使用哈希算法为SHA256。
所述合约地址数据是区块链系统中智能合约的标识数据,唯一性且无法更改。
所述令牌数据是指针对不同业务门类提供的用来生成虚拟地址的自定义数据,不同令牌数据代表不同业务逻辑,具有不同含义。
本发明的有益效果为:本发明得到的虚拟地址是独一无二的。一次交易行为会产生唯一的交易Id,一次投票行为会产生唯一的投票Id,等等,且无论交易Id和投票Id都是Hash值,处理相应逻辑的合约可以为该行为产生一个唯一的Virtual Address。该VirtualAddress可以理解为某个业务在这个合约上的映射,该业务涉及到款项可以安全地使用这个虚拟地址来管理。本申请方法使用时用户根据不同的业务,使用不同的虚拟地址,管理数据及业务逻辑,有效规避数据安全风险。
根据虚拟地址的定义,每个虚拟地址都必须使用确定的合约地址用来计算生成。
附图说明
图1为本发明实施例2示意图。
具体实施方式
实施例1
用于区块链的虚拟地址生成方法,所述虚拟地址通过合约地址数据和令牌数据计算生成,其具体生成步骤为:
1对合约地址数据和令牌数据格式化预处理;
2选取区块链系统内合约地址,合约地址为定长的数据结构,将原始合约地址数据转换为字节数据结构A;
3由于业务门类的区别,对不同类型的令牌数据进行哈希运算得到定长的字节类型数据T;
4将上述预处理的数据拼接后得到定长字节类型数据(A,T),对拼接后数据进行哈希预算Hash(A,T),最终生成的定长字节类型数据可作为虚拟地址;其中使用哈希算法为SHA256。
实施例2
本申请生成的虚拟地址在资产转移中的应用:
使用CentreAssetManagement(中心资产管理)合约进行资产转移时,User A (使用者A)首先调用创建持有人CreateHolder生成一个Holder,这里Holder 可以理解为是一个小交易所,其中保存了参与交易的人员信息,以及交易规则。相关交易人通过该交易所进行令牌token的转移。每一次转移token,都会根据其转移的行为(如holderId、token类别)生成一个对应的虚拟地址Virtual Address。用户将该token转入这个合约地址virtualaddress,交易所通过 virtual address完成最后的操作。如下图1所示;
其具体操作方法为:
(1)用户调用MultiToken合约中的Transfer将token转入至virtual address。
(2)用户通过调用CentreAssetManagement合约的接口完成将token转移到User B的address上。
实施例3
本申请生成的虚拟地址在分红中的应用:
合约可以被看作一个对象,同样合约也可以根据其需要生成virtual address。
在分红相关的经济活动中,对于各轮分红,根据其schemeid和分红信息生成virtual address,用该地址存放资金池,活动到期后释放资金池。将各期的资金池存放在自己的virtual address中,可以将不同活动资金池有效隔离开。
以上显示和描述了本发明的基本原理和主要特征和本发明的优点。本发明提到的各个部件为现有领域常见技术,本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下,本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。本发明要求保护范围由所附的权利要求书及其等效物界定。

Claims (3)

1.一种用于区块链的虚拟地址生成方法,其特征在于通过合约地址数据和令牌数据计算生成,其具体生成步骤为:
一、对数据进行合约地址数据和令牌数据格式化预处理;
二、选取区块链系统内合约地址,合约地址为定长的数据结构,将原始合约地址数据转换为字节数据结构A;
三、由于业务门类的区别,对不同类型的令牌数据进行哈希运算得到定长的字节类型数据T;
四、将上述预处理的数据拼接后得到定长字节类型数据(A,T),对拼接后数据进行哈希预算Hash(A,T),最终生成的定长字节类型数据可作为虚拟地址;其中使用哈希算法为SHA256。
2.按照权利要求1所述的一种用于区块链的虚拟地址生成方法,其特征在于所述合约地址数据是区块链系统中智能合约的标识数据,唯一性且无法更改。
3.按照权利要求1所述的一种用于区块链的虚拟地址生成方法,其特征在于所述令牌数据是指针对不同业务门类提供的用来生成虚拟地址的自定义数据,不同令牌数据代表不同业务逻辑,具有不同含义。
CN202010668866.5A 2020-07-13 2020-07-13 用于区块链的虚拟地址生成方法 Active CN111835884B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010668866.5A CN111835884B (zh) 2020-07-13 2020-07-13 用于区块链的虚拟地址生成方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010668866.5A CN111835884B (zh) 2020-07-13 2020-07-13 用于区块链的虚拟地址生成方法

Publications (2)

Publication Number Publication Date
CN111835884A CN111835884A (zh) 2020-10-27
CN111835884B true CN111835884B (zh) 2022-11-04

Family

ID=72899863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010668866.5A Active CN111835884B (zh) 2020-07-13 2020-07-13 用于区块链的虚拟地址生成方法

Country Status (1)

Country Link
CN (1) CN111835884B (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900497B (zh) * 2022-05-09 2023-09-26 上海极豆科技有限公司 一种标识序号生成方法、装置、电子设备及存储介质

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729568A (zh) * 2009-12-11 2010-06-09 北京交通大学 使用令牌机制保障源地址真实性的安全接入系统及方法
CN101753635A (zh) * 2008-12-17 2010-06-23 华为技术有限公司 Ipv6地址配置方法和系统
CN102143036A (zh) * 2010-06-07 2011-08-03 华为技术有限公司 前缀发送方法、前缀指定方法以及相应设备
CN108694575A (zh) * 2018-06-13 2018-10-23 深圳前海微众银行股份有限公司 基于区块链的转账验证方法、装置及存储介质
CN108694668A (zh) * 2018-06-15 2018-10-23 腾讯科技(深圳)有限公司 数字资产交易方法、装置、介质以及设备
CN109040341A (zh) * 2018-08-27 2018-12-18 深圳前海益链网络科技有限公司 智能合约地址生成方法、装置、计算机设备及可读存储介质
CN110061838A (zh) * 2019-04-28 2019-07-26 广州大学 一种dns资源记录的去中心化存储系统及其实现、信息检索方法
US10373129B1 (en) * 2018-03-05 2019-08-06 Winklevoss Ip, Llc System, method and program product for generating and utilizing stable value digital assets
CN110913031A (zh) * 2019-11-15 2020-03-24 西安居正知识产权运营管理有限公司 一种IPv6网络地址配置方法
CN111357001A (zh) * 2017-09-20 2020-06-30 斯吾普知识产权控股有限责任公司 用于帐户登录、账户创建和用于无密码交易的安全的基于电子邮件的认证

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10785168B2 (en) * 2019-07-15 2020-09-22 Alibaba Group Holding Limited Allocating virtual resource based on block chain

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101753635A (zh) * 2008-12-17 2010-06-23 华为技术有限公司 Ipv6地址配置方法和系统
CN101729568A (zh) * 2009-12-11 2010-06-09 北京交通大学 使用令牌机制保障源地址真实性的安全接入系统及方法
CN102143036A (zh) * 2010-06-07 2011-08-03 华为技术有限公司 前缀发送方法、前缀指定方法以及相应设备
CN111357001A (zh) * 2017-09-20 2020-06-30 斯吾普知识产权控股有限责任公司 用于帐户登录、账户创建和用于无密码交易的安全的基于电子邮件的认证
US10373129B1 (en) * 2018-03-05 2019-08-06 Winklevoss Ip, Llc System, method and program product for generating and utilizing stable value digital assets
CN108694575A (zh) * 2018-06-13 2018-10-23 深圳前海微众银行股份有限公司 基于区块链的转账验证方法、装置及存储介质
CN108694668A (zh) * 2018-06-15 2018-10-23 腾讯科技(深圳)有限公司 数字资产交易方法、装置、介质以及设备
CN109040341A (zh) * 2018-08-27 2018-12-18 深圳前海益链网络科技有限公司 智能合约地址生成方法、装置、计算机设备及可读存储介质
CN110061838A (zh) * 2019-04-28 2019-07-26 广州大学 一种dns资源记录的去中心化存储系统及其实现、信息检索方法
CN110913031A (zh) * 2019-11-15 2020-03-24 西安居正知识产权运营管理有限公司 一种IPv6网络地址配置方法

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A Blockchain-based decentralized system to ensure the transparency of organic;B. M. A L. Basnayake;《Smart Computing and Systems Engineering》;20191231;103-107 *
区块链中的隐私保护技术;翟社平等;《西安邮电大学学报》;20180910(第05期);97-104 *
基于区块链的个人隐私保护机制;章宁等;《计算机应用》;20171010;2789-2793 *

Also Published As

Publication number Publication date
CN111835884A (zh) 2020-10-27

Similar Documents

Publication Publication Date Title
CN110706114B (zh) 一种基于区块链的违约资产处理方法、装置及电子设备
US11544794B2 (en) Claim settlement method and apparatus employing blockchain technology
EP3591510B1 (en) Method and device for writing service data in block chain system
JP6646764B2 (ja) ブロックチェーンを介して決定性有限オートマン(dfa)を実施するシステム及び方法
CN109863719B (zh) 用于通过区块链控制转移的方法和系统
CN110009489B (zh) 基于区块链的资产转移方法及装置、电子设备
CN110765200B (zh) 一种基于区块链的资产申购方法、装置及电子设备
CN110147990B (zh) 基于区块链的缴费代扣签约方法及装置、电子设备
CN111539731A (zh) 基于区块链的联邦学习方法及装置和电子设备
US20190035015A1 (en) Method and apparatus for obtaining a stable credit score
CN108694589A (zh) 一种基于区块链的资产监控方法
CN111737654A (zh) 基于区块链的侵权检测方法及装置、电子设备
CN111667270A (zh) 基于区域的数字货币使用方法、装置及电子设备
CN110008716A (zh) 区块链交易方法及装置、电子设备、存储介质
CN112035504B (zh) 基于区块链的物品码生成方法、物权转移方法及装置
CN110827145A (zh) 基于区块链智能合约的处理方法和系统
CN111667273A (zh) 基于区域与主体的数字货币使用方法、装置及电子设备
CN112837149A (zh) 一种企业信贷风险的识别方法和装置
CN111835884B (zh) 用于区块链的虚拟地址生成方法
CN110443612B (zh) 一种基于区块链的报销费用分割方法、装置及电子设备
CN111667271A (zh) 基于区域与时间的数字货币使用方法、装置及电子设备
CN110009492A (zh) 区块链交易方法及装置、电子设备、存储介质
CN116703555A (zh) 一种预警方法、装置、电子设备及计算机可读介质
CN111666345A (zh) 金融衍生品交易信息共享的方法与分布式系统及电子终端
Chang et al. Exploring blockchain technology for capital markets: A case of angel fund

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221130

Address after: 100000 360, Floor 3, Building 148, No. 13, Jiuxianqiao Road, Chaoyang District, Beijing

Patentee after: Beijing Lingzhi Technology Co.,Ltd.

Address before: Room 20007, unit 1701, 20th floor, building 8, Jianguomenwai street, Chaoyang District, Beijing

Patentee before: BEIJING HAOPU INFORMATION AND TECHNOLOGY CO.,LTD.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240523

Address after: Building 2, 1st Floor, No. 283 North Fourth Ring Middle Road, Haidian District, Beijing, 100000 RMB

Patentee after: Beijing Chuangsihuiquan Technology Co.,Ltd.

Country or region after: China

Address before: 100000 360, Floor 3, Building 148, No. 13, Jiuxianqiao Road, Chaoyang District, Beijing

Patentee before: Beijing Lingzhi Technology Co.,Ltd.

Country or region before: China