A method for data analysis, an electronic device, and a computer readable storage medium are provided. The method includes the following. A trip order is obtained. A smart contract is generated based on the trip order. Trip data uploaded by an on-board equipment is obtained. The smart contract is triggered based on the trip data and the trip order. Early-warning which corresponds to the smart contract is performed. According to implementations of the present disclosure, a smart contract for automatic early-warning can be generated based on a trip order of a passenger, and then the trip data of a vehicle can be obtained in real time. Whether an event that triggers the smart contract occurs (i.e., when there may be a security risk) is determined according to the real-time trip data and the trip order. If yes, the smart contract is triggered and the early-warning is performed. In this way, safety risks of passengers or drivers in the online car can be timely and effectively reduced.
展开▼