A network system, comprising at least two routing devices, wherein the at least two routing devices comprise one master device and at least one slave device; the master device is directly connected to a network side, and the at least one slave device is directly or indirectly connected to the master device; wherein the network system further comprises a to-be-connected device, wherein the to-be-connected device is configured to receive at least two first messages broadcast by the at least two routing devices; wherein each of the at least two first messages comprises a connectivity state and link quality, wherein the connectivity state is used to indicate a connectivity state between the routing device and the master device, and the link quality is used to indicate link quality of a link between the routing device and the master device, and wherein the to-be-connected device is configured to determine, based on the at least two first messages, at least two first-type routing devices in the at least two routing devices that have connectivity to the master device; the to-be-connected device is configured to obtain a wireless signal of each of the at least two first-type routing devices and measure a signal strength value between the to-be-connected device and each of the at least two first-type routing devices based on the obtained wireless signal; wherein the to-be-connected device is configured to calculate effective link quality between the to-be-connected device and each of the at least two first-type routing devices based on link quality in the first message broadcast by the respective first-type routing device and the measured signal strength value; and the to-be-connected device is configured to connect to one of the at least two first-type routing devices corresponding to the best calculated effective link quality. the master device is directly connected to a network side, and the at least one slave device is directly or indirectly connected to the master device; wherein the network system further comprises a to-be-connected device, wherein the to-be-connected device is configured to receive at least two first messages broadcast by the at least two routing devices; wherein each of the at least two first messages comprises a connectivity state and link quality, wherein the connectivity state is used to indicate a connectivity state between the routing device and the master device, and the link quality is used to indicate link quality of a link between the routing device and the master device, and wherein the to-be-connected device is configured to determine, based on the at least two first messages, at least two first-type routing devices in the at least two routing devices that have connectivity to the master device; the to-be-connected device is configured to obtain a wireless signal of each of the at least two first-type routing devices and measure a signal strength value between the to-be-connected device and each of the at least two first-type routing devices based on the obtained wireless signal; wherein the to-be-connected device is configured to calculate effective link quality between the to-be-connected device and each of the at least two first-type routing devices based on link quality in the first message broadcast by the respective first-type routing device and the measured signal strength value; and the to-be-connected device is configured to connect to one of the at least two first-type routing devices corresponding to the best calculated effective link quality.