A system for cleaning communal facilities in a smart city based on an Internet of Things, comprising a user platform, a service platform, a management platform, a sensor network platform, and an object platform, wherein the management platform is configured to:
- obtain first cleanliness information of the communal facilities in a target area at a first time point, wherein the first time point is a time point when the communal facilities were cleaned for last time, and the first cleanliness information includes a first ash deposit degree score;
- obtain weather information, construction information, factory information, and traffic information of the target area during a target time period, wherein the target time period is a time period between the first time point and a second time point;
- determine second cleanliness information of the communal facilities at the second time point based on the first cleanliness information, the weather information, the construction information, the factory information, and the traffic information through a cleanliness assessment model;
- wherein the second cleanliness information includes a second ash deposit degree score, the cleanliness assessment model is a trained machine learning model, and the cleanliness assessment model includes at least a vectorization processing layer and a cleanliness assessment layer, wherein,
- inputs of the vectorization processing layer include the weather information, the construction information, the factory information, and the traffic information, and outputs of the vectorization processing layer include vector information;
- inputs of the cleanliness assessment layer include the vector information and the first cleanliness information, and outputs of the cleanliness determination layer include the second ash deposit degree score;
- the vectorization processing layer and the cleanliness assessment layer are obtained by joint training based on a large number of training samples with labels, the training samples include historical first clean information, historical weather information, historical construction information, historical factory information, and historical traffic information, and the labels include the second ash deposit degree score;
- wherein the joint training includes:
- inputting the large number of training samples to an initial vectorization processing layer;
- inputting an output of the initial vectorization processing layer to an initial cleanliness assessment layer;
- constructing a loss function based on the output of the initial cleanliness assessment layer and the labels, obtaining a trained vectorization processing layer and a trained cleanliness assessment layer by iteratively updating parameters of the initial vectorization processing layer and the initial cleanliness assessment layer based on the loss function until a first preset condition is satisfied, wherein the first preset condition is that the loss function is less than a threshold, converges, or a training period reaches a threshold;
- determine, based on the second cleanliness information, target cleanliness information of the communal facilities at the second time point, wherein the target cleanliness information includes a target ash deposit degree score;
- determine the communal facilities as target communal facilities when the target cleanliness information of the communal facilities satisfies a second preset condition, and determine cleaning instructions for cleaning the target communal facilities;
- and
- send the cleaning instructions to an object platform through a sensor network platform, wherein the object platform is configured to clean the target communal facilities.