A computer-implemented method for access control of contract data in a distributed system with distributed consensus, wherein the distributed system comprises a contract generator, a validation server, a first storage device storing a database and a second storage device providing a distributed ledger, wherein at the contract generator, the method comprising:
- receiving digital contract data from a first electronic device via a network;
- determining a permission setting for accessing contract content associated with the digital contract data based on the digital contract data, and setting the permission setting associated with the digital contract data to the validation server via the network;
- obtaining a validation link for validating the permission setting associated with the digital contract data from the validation server via the network;
- generating digital contract information for the digital contract data according to partial content of the digital contract data and the validation link;
- and
- storing the digital contract information in the distributed ledger of the second storage device,
- wherein accessing of a complete content of the digital contract data is controlled based on the validation link,
- wherein the method further comprises:
- receiving, at the validation server, an accessing request from a second electronic device for retrieving the digital contract information corresponding to the digital contract data from the distributed ledger via the network;
- obtaining, at the validation server, the validation link from the digital contract information;
- performing, at the validation server, a permission validation process to determine whether the second electronic device has the permission to read the digital contract data using the validation link;
- in response to determining that the second electronic device has no permission to read the digital contract data, rejecting, at the validation server, the accessing request from the second electronic device;
- and
- in response to determining that the second electronic device has the permission to read the digital contract data, generating, at the validation server, the complete content of the digital contract data based on a digital contract template associated with the digital contract data from the database and the partial content of the digital contract data and transmitting the complete content of the digital contract data to the second electronic device.