A data processing method, comprising: obtaining a state vector set of an intelligent device, wherein the state vector set comprises at least one pose vector of the intelligent device and/or at least one landmark characteristic vector of an environment in which the intelligent device is located, and the at least one pose vector and/or the at least one landmark characteristic vector are/is used to locate the intelligent device and map the environment in which the intelligent device is located; determining a first linearized constraint equation, wherein the first linearized constraint equation is a linearized constraint representation of the at least one pose vector and/or the at least one landmark characteristic vector; determining a first state vector, wherein the first state vector is a to-be-marginalized state vector in the state vector set; marginalizing the first state vector in the first linearized constraint equation to obtain a second linearized constraint equation, wherein the second linearized constraint equation represents a linearized constraint relationship of second state vectors, and the second state vector is a state vector other than the first state vector in the state vector set; determining an objective function for maximum likelihood estimation of the state vector based on the second linearized constraint equation; and optimizing the at least one pose vector and/or the at least one landmark characteristic vector based on the objective function, to output a track of the intelligent device and a map of the environment in which the intelligent device is located; the method characterized in: determining an information matrix Σ based on the objective function, wherein the information matrix is used to optimize and update the second state vector; and constructing a new constraint term based on the optimized and updated second state vector, wherein the constraint term is used to constrain a linearized constraint equation established during next data processing; and performing graph optimization on the second state vector and updating the second state vector as x ^ u ⊕ = x ̃ u + x ^ u, and constructing a prior constraint for next graph optimization based on the obtained information matrix, wherein the prior constraint is added to an entire pose graph as a new constraint for next data processing, wherein the prior constraint is: ‖ X u − X u ⊕ ^ ‖ ∑ − 1 2 wherein x̃ u is an error vector of a to-be-preserved state vector, x̂ u is a previous estimate of the to-be-preserved state vector, and x ^ u ⊕ is an updated estimate of the to-be-preserved state vector. obtaining a state vector set of an intelligent device, wherein the state vector set comprises at least one pose vector of the intelligent device and/or at least one landmark characteristic vector of an environment in which the intelligent device is located, and the at least one pose vector and/or the at least one landmark characteristic vector are/is used to locate the intelligent device and map the environment in which the intelligent device is located; determining a first linearized constraint equation, wherein the first linearized constraint equation is a linearized constraint representation of the at least one pose vector and/or the at least one landmark characteristic vector; determining a first state vector, wherein the first state vector is a to-be-marginalized state vector in the state vector set; marginalizing the first state vector in the first linearized constraint equation to obtain a second linearized constraint equation, wherein the second linearized constraint equation represents a linearized constraint relationship of second state vectors, and the second state vector is a state vector other than the first state vector in the state vector set; determining an objective function for maximum likelihood estimation of the state vector based on the second linearized constraint equation; and optimizing the at least one pose vector and/or the at least one landmark characteristic vector based on the objective function, to output a track of the intelligent device and a map of the environment in which the intelligent device is located; the method characterized in: determining an information matrix Σ based on the objective function, wherein the information matrix is used to optimize and update the second state vector; and constructing a new constraint term based on the optimized and updated second state vector, wherein the constraint term is used to constrain a linearized constraint equation established during next data processing; and performing graph optimization on the second state vector and updating the second state vector as x ^ u ⊕ = x ̃ u + x ^ u, and constructing a prior constraint for next graph optimization based on the obtained information matrix, wherein the prior constraint is added to an entire pose graph as a new constraint for next data processing, wherein the prior constraint is: ‖ X u − X u ⊕ ^ ‖ ∑ − 1 2 wherein x̃ u is an error vector of a to-be-preserved state vector, x̂ u is a previous estimate of the to-be-preserved state vector, and x ^ u ⊕ is an updated estimate of the to-be-preserved state vector.