With the rapid development of mobile applications and the explosive growth of online interactive modes,online social networks have completely changed people’s social and work patterns,and people are increasingly relying on online social networks.However,traditional online social networks mostly adopt a centralized storage mechanism,providing various social services through a central server,which brings many privacy issues.At the same time,existing online social networks that consider stranger social scenarios mostly lack a trustworthy identity management mechanism,and the reason for incentivizing online social networks to set up identity management mechanisms is mostly for dating purposes,and their recommendation algorithms are mostly based on user location information,which undoubtedly limits people’s ability to expand their social circles.In this paper,we conduct research around blockchain technology and the similarity measurement method of node structure in ego networks.The main research contents of this paper are as follows:First,aiming at the privacy and trust issues in online social networks,this paper designs a blockchain-based online social network and implements a trustworthy identity management mechanism.Specifically,the blockchain-based online social network is decentralized,which makes blockchain as a social service provider trustworthy,registration review mechanism and operation traceability mechanism can ensure the credibility of users participating in the online social network.The credibility of service providers and users supports the credibility of the identity management mechanism.At the same time,considering the storage bottleneck of the blockchain,this paper combines IPFS(Inter Planetary File System)to implement a large-scale data offchain storage method,improving the storage scalability of the blockchain.Second,aiming at the similarity measurement problem of node structure,considering the performance bottleneck of existing similarity measurement algorithms and the performance issues in applying them to blockchain-based online social networks.Based on the designed blockchain online social network,this paper proposes a similarity measurement algorithm based on ego networks.Firstly,the algorithm clusters the ego network to obtain subgraphs with different levels of importance to the central node.Then,two measurement methods based on node degree and node edge are used to approximate the graph edit distance.Finally,the obtained distances are used to sort the nodes in descending order.Specifically,the algorithm based on node degree calculates the difference in the degree between nodes in different subgraphs as the distance between two graphs.The algorithm based on node edge calculates the difference in the number of nodes and edges between different subgraphs as the distance between two graphs.Finally,a large amount of real dataset is uploaded to the blockchain and experiments are conducted to verify the accuracy and efficiency of the algorithm.Third,this paper combines the above two research contents to implement a blockchain-based online social network system.The main functional modules of the system are displayed and explained page by page,and functional testing is conducted to demonstrate its usability. |