The emergence of computer network technology has changed people's consumption patterns.At present,people purchase goods mainly through the network platform,which makes many changes in people's payment methods,and presents diversified features.The behavior of people purchasing goods through the internet platform has led to many types of electronic money,of which the most representative electronic currency is bitcoin.The so-called bitcoin,refers to the computer encryption algorithm technology to achieve currency trading and circulation,it has its own digital currency system,people use bitcoin payment,because it has been encrypted settings,while simplifying the payment operation flow,Therefore,in many electronic money,Bitcoin has become the most important electronic trading currency.The topic of the thesis is the application of block chain technology in a website,which billing functionality is based on smart contract belongs to the Ethereum.The billing functionality in the whole website is a chosen module to use blockchain technology,because the blockchain is untampered or hard to tamper and traceability.Users can pay with ETH directly depending on the Ethereum,rather than paying through banks or payment channels.Meanwhile,the website can have its token in the next step.In the process of searching,the billing functionality was analyzed and designed in detail.It is composed of 5 parts,which are DBot,billing,register,proxy,consumer.Every part has its own smart contract.The core is proxy part.The functionality calls AI services under the blockchain and bills on the blockchain,it get through the whole processing.The framework of front end is dva,and the server side is express,which is based on Node.js.The front and back are separated.Database is mysql.There is a searching service based on solr and a server to create index and applying searching request based on Java.This can improve user experience because users can search AI services with keywords which they are interested.The whole website is divded into login functionality,user center,AI server center,billing functionality which is based on the blockchain technology.The web3.js is chose to communicate with smart contract.In the development of smart contract,we used truffle.Finally,we build a private blockchain in the 100 M Lan,The TPS can reach 6 to 24 per second with single miner.The thesis developed the AI Market website which based on blockchain technology,the process contains theoretical basis,requirement analysis,overall design,detailed design and experiment.The website connects both sides of AI and blockchain,it expresses AI is services.It provides some new exploration abount the application of the blockchain technology,and lay the foundation for cross-chain value transfer. |