A smart contract recommendation method and device
A technology of smart contracts and recommended methods, applied in the field of blockchain, can solve the problems of lack of adaptability of smart contracts, poor experience of blockchain platforms, and low utilization of massive data on blockchain platforms.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0051]For ease of understanding, see figure 1 , Embodiment 1 of a smart contract recommendation method provided by this application, including:
[0052] Step 101. Construct a user contract matrix according to the preset transaction records, and the user contract matrix is used to record the number of smart contract calls of the user.
[0053] The preset transaction records are obtained by the blockchain recording the transaction process between nodes, including transaction details such as transaction node identity, transaction amount, digital signature, and the number of transactions in the blockchain. The preset transaction records in this embodiment of the application mainly refer to the relationship between the user and the invoked smart contract, that is, the number of times the user invokes the smart contract.
[0054] Each row of the user contract matrix refers to the number of times the same user calls different smart contracts, and each column refers to the number o...
Embodiment 2
[0064] For ease of understanding, see figure 2 , the present application provides a second embodiment of a smart contract recommendation method, including:
[0065] Step 201. Construct a user contract matrix according to the preset transaction records, and the user contract matrix is used to record the number of smart contract calls of the user.
[0066] This operation step is similar to the process of step 101 and will not be repeated here.
[0067] Step 202: Calculate the angle between any two row vectors in the user contract matrix in the Euclidean space, and obtain the user similarity between the two users corresponding to the two row vectors.
[0068] Euclidean space is a special metric space that plays a role in the definition of manifolds including Euclidean and non-Euclidean geometries.
[0069] When the preset similarity is user similarity, the similarity between two users is calculated. Specifically, firstly, any two row vectors are obtained from the user contra...
Embodiment 3
[0077] For ease of understanding, see image 3 , the present application also provides a third embodiment of a smart contract recommendation method, including:
[0078] Step 301. Construct a user contract matrix according to the preset transaction records, and the user contract matrix is used to record the number of smart contract calls of the user.
[0079] This operation step is similar to the process of step 101 and will not be repeated here.
[0080] Step 302, calculate the angle between any two column vectors in the user contract matrix in the Euclidean space, and obtain the smart contract similarity between the two smart contracts corresponding to the two column vectors.
[0081] When the preset similarity is the similarity of smart contracts, the calculation is the similarity between two smart contracts. Specifically, firstly, any two column vectors are obtained from the user contract matrix, and one column represents a smart contract that is used by different Recor...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


