简体   繁体   English

区块链建模

[英]Modelisation of a blockchain

I would like to model a blockchain in UML.我想在 UML 中建模区块链。 Here are the requirements that I came up with:以下是我提出的要求:

  • User can transfer money用户可以转账
  • Money can be transferred from a bank account to a digital wallet钱可以从银行账户转移到数字钱包
  • Money can be transferred from a digital wallet to a bank account钱可以从数字钱包转移到银行账户
  • Money can be transferred to a user (from the contact list)可以将钱转给用户(从联系人列表中)
  • User can consult the balance of his portfolio用户可以查询其投资组合的余额

Here my UML class diagram:这是我的 UML 类图:

在此处输入图片说明

Since I am new to the blockchain technology, I would like to know: is this diagram correct?由于我是区块链技术的新手,我想知道:这个图是否正确? Did I miss something?我错过了什么?

I'm not a blockchain expert.我不是区块链专家。 However, I can give you feedback on your diagram:但是,我可以就你的图表给你反馈:

  • When you use verbs to label the association indicate the direction it should be read.当您使用动词来标记关联时,请指明应该阅读的方向。
  • Owner and Contact are Users (Specialization) OwnerContactUsers (专业化)
  • Users are organized in a hierarchy (One to many relation between users). Users按层次结构组织(用户之间的一对多关系)。 I'm not sure that this is your intent.我不确定这是你的意图。 I suppose that you wanted to indicate that an Owner can have several Contacts .我想你想表明一个Owner可以有几个Contacts
  • It is not clear what Money is: is it a all the money a user have ?尚不清楚Money是什么:它是用户拥有的全部资金吗? Or is it a blockchain entry (transaction) ?还是区块链入口(交易)? Make sure that the associations are in line with your definition.确保关联符合您的定义。
  • One Money instance can be transferred to several Bank Account .一个 Money 实例可以转移到多个Bank Account Not sure it's your intent.不确定这是你的意图。
  • Is it normal that a Wallet doesn't have a User or an Owner ? Wallet没有UserOwner是否正常?

In addition, I miss the following basic elements of the technology: the block, the chain fo blocks, the (decentralised) ledger(s), and the transactions ?此外,我错过了该技术的以下基本要素:区块、区块链、(去中心化的)账本和交易?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM