A data processing method, applied to a multi-head management scenario in a Software Defined Network, SDN, wherein the multi-head management scenario is a scenario in which a forwarder in the Software Defined Network is managed by a plurality of management devices, and the method comprises: sending (301, 401), by a first management device in the plurality of management devices, wherein the first management device is an SDN controller, a lock instruction to the forwarder, wherein the lock instruction is used to instruct the forwarder to switch to a locked state, and the locked state is a state in which the forwarder is controlled only by the first management device; performing (302, 403), by the first management device, difference comparison between target data and corresponding data to obtain a comparison result, wherein the target data is data on the first management device, and the corresponding data is data that is on the forwarder and that corresponds to the target data; and synchronizing (303, 404), by the first management device, the target data with the corresponding data if the first management device determines, by using the comparison result, that the target data and the corresponding data do not match, so that the target data matches the corresponding data; wherein: the performing, by the first management device, difference comparison between target data and corresponding data to obtain a comparison result comprises: obtaining, by the first management device, each feature of the target data and each corresponding feature of the corresponding data; and comparing, by the first management device, each feature of the target data with each corresponding feature of the corresponding data to obtain the comparison result; wherein the feature is interface management feature data, or quality of service feature data; wherein the obtaining, by the first management device, each feature of the target data and each corresponding feature of the corresponding data comprises: obtaining, by the first management device, each feature of the target data and each corresponding feature of the corresponding data based on a yang data model or a tree structure. sending (301, 401), by a first management device in the plurality of management devices, wherein the first management device is an SDN controller, a lock instruction to the forwarder, wherein the lock instruction is used to instruct the forwarder to switch to a locked state, and the locked state is a state in which the forwarder is controlled only by the first management device; performing (302, 403), by the first management device, difference comparison between target data and corresponding data to obtain a comparison result, wherein the target data is data on the first management device, and the corresponding data is data that is on the forwarder and that corresponds to the target data; and synchronizing (303, 404), by the first management device, the target data with the corresponding data if the first management device determines, by using the comparison result, that the target data and the corresponding data do not match, so that the target data matches the corresponding data; wherein: the performing, by the first management device, difference comparison between target data and corresponding data to obtain a comparison result comprises: obtaining, by the first management device, each feature of the target data and each corresponding feature of the corresponding data; and comparing, by the first management device, each feature of the target data with each corresponding feature of the corresponding data to obtain the comparison result; wherein the feature is interface management feature data, or quality of service feature data; wherein the obtaining, by the first management device, each feature of the target data and each corresponding feature of the corresponding data comprises: obtaining, by the first management device, each feature of the target data and each corresponding feature of the corresponding data based on a yang data model or a tree structure. obtaining, by the first management device, each feature of the target data and each corresponding feature of the corresponding data; and comparing, by the first management device, each feature of the target data with each corresponding feature of the corresponding data to obtain the comparison result; wherein the feature is interface management feature data, or quality of service feature data; wherein the obtaining, by the first management device, each feature of the target data and each corresponding feature of the corresponding data comprises: obtaining, by the first management device, each feature of the target data and each corresponding feature of the corresponding data based on a yang data model or a tree structure.