This invention discloses a data cleaning method, apparatus, electronic device, and storage medium, relating to the field of
data processing technology or other related fields. The method includes: receiving a data cleaning request submitted by a user and
parsing the request to obtain N cleaning tasks, each corresponding to a preset cleaning rule. Each cleaning task includes at least a task
object field, task execution conditions, and task execution order, where N is a positive integer. For each cleaning task, a filter template is matched according to the preset cleaning rule, and filter entity code is generated by combining the filter template, task
object field, and task execution conditions. According to the task execution order, the N filter entity codes are organized into a chained execution structure to generate chained execution code. The chained execution code is injected into an execution engine, and the execution engine is run to obtain the data cleaning result. This invention solves the technical problem of low efficiency in traditional data
cleaning methods in related technologies.