Network configuration method, electronic device, storage medium and product

CN122699005APending Publication Date: 2026-09-04HEFEI PANTUM INTELLIGENT MFG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611078429.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-20
Publication Date
2026-09-04

AI Technical Summary

Technical Problem

因此,若打印设备在配网过程中仅依据SSID和密码进行接入,那么即使移动终端和打印设备均显示联网成功,也可能由于接入点不同、网关不同或网络层级不同而出现以下问题:由于打印设备误连到与移动终端不同的无线接入网络,导致移动终端无法在局域网中发现该打印设备;或者,由于打印设备接入子路由,而移动终端位于上级路由,导致广播发现机制失效;且在配网过程中,由于用户不知晓配网失败的原因,因此,容易将上述现象误判为打印设备故障或应用异常,从而降低使用体验

Benefits of technology

[0018]在本公开实施例提供的网络配置方法、电子设备、存储介质及产品中,移动终端向打印设备发送目标路由器的配网参数,其中,目标路由器为移动终端执行配网操作时所连接的无线网络,配网参数包括目标路由器的连接信息和标识信息;其中,打印设备在获取到配网参数之后,从扫描到的多个候选接入网络中确定出与标识信息匹配的候选接入网络为目标路由器的接入网络,并根据连接信息连接至目标路由器。通过上述处理方式,能够使得打印设备在扫描到多个名称相同的无线接入网络时,依据该标识信息匹配并连接至移动终端所接入的目标路由器,从而帮助有效防止打印设备错误地连接至其他名称相同但网络层级不同的无线网络,从而降低了打印设备误连错误接入点的概率,以及降低了用户重复配网、重复排障和售后支持的成本,进而提高打印设备的配网成功率、可通信率及用户使用体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122699005A_ABST
    Figure CN122699005A_ABST
Patent Text Reader

Abstract

The present disclosure provides a network configuration method, electronic equipment, storage medium and product, wherein the method comprises: sending a network configuration parameter of a target router to a printing device, wherein the target router is a wireless network connected by a mobile terminal when performing a network configuration operation, and the network configuration parameter comprises connection information and identification information of the target router; wherein the printing device determines, after obtaining the network configuration parameter, a candidate access network matching the identification information from a plurality of scanned candidate access networks as an access network of the target router, and connects to the target router according to the connection information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of Internet of Things (IoT) technology, and more specifically, to a network configuration method, electronic device, storage medium, and product. Background Technology

[0002] During the network configuration process for a printer, the mobile terminal sends the SSID (Service Set Identifier) ​​and corresponding password of the wireless network to the printer. The printer then connects to the corresponding wireless network based on the received information. However, in home and / or office scenarios, there are often multiple wireless routers with the same name. These routers may be connected to networks at different network levels, with different gateways or subnets. Therefore, if the printer connects based solely on the SSID and password during network configuration, even if both the mobile terminal and the printer show successful network connection, the following problems may occur due to different access points, gateways, or network levels: the printer may mistakenly connect to a different wireless access network than the mobile terminal, causing the mobile terminal to be unable to discover the printer in the local area network; or the printer may be connected to a sub-router while the mobile terminal is on a higher-level router, causing the broadcast discovery mechanism to fail. Furthermore, because users are unaware of the reason for the network configuration failure, they may easily misinterpret these phenomena as printer malfunctions or application anomalies, thus degrading the user experience. Summary of the Invention

[0003] This disclosure provides at least one network configuration method, electronic device, storage medium, and product.

[0004] In a first aspect, embodiments of this disclosure provide a network configuration method applied to a mobile terminal. The method includes: sending network configuration parameters of a target router to a printing device, wherein the target router is the wireless network connected to by the mobile terminal when performing network configuration operations, and the network configuration parameters include connection information and identification information of the target router; wherein, after obtaining the network configuration parameters, the printing device determines, from a plurality of scanned candidate access networks, a candidate access network that matches the identification information as the access network of the target router, and connects to the target router according to the connection information.

[0005] In an optional implementation, after the printing device is connected to the target router, the method further includes: when the printing device is detected to be offline in the local area network, if it is determined that the identification information of the router currently connected to the mobile terminal is inconsistent with that of the target router, and the access network name of the currently connected router is consistent with that of the target router, then it is determined whether the printing device supports remote printing function; if it is determined that the printing device supports remote printing function and the printing device has not enabled remote printing function, then a first prompt message to enable remote printing function is generated.

[0006] In one optional implementation, the method further includes: if it is determined that the printing device does not support remote printing, generating a second prompt message to prompt the user to modify the access network name of the currently connected router and / or the access network name of the target router.

[0007] In one optional implementation, the method further includes: after the printing device is connected to the target router, sending a test connection request to the printing device; if a response is received from the printing device within a preset time, it is determined that the communication link between the mobile terminal and the printing device has been successfully established; if no response is received within the preset time, it is determined that the communication link between the mobile terminal and the printing device has failed to be established.

[0008] In an optional implementation, the method further includes: when it is determined that the communication link between the mobile terminal and the printing device has failed to be established, obtaining the routing attribute information of the target router; determining a first repair strategy based on the routing attribute information; and executing the first repair strategy to disable the wireless terminal isolation strategy of the target router.

[0009] In one optional implementation, the method further includes: after disabling the wireless terminal isolation policy of the target router, re-detecting whether the mobile terminal and the printing device can communicate in the local area network; if it is determined that the mobile terminal and the printing device can communicate in the local area network, then it is determined that the communication link has been successfully established; if it is determined that the mobile terminal and the printing device cannot communicate in the local area network, then a second repair policy is determined, and the target router is repaired according to the second repair policy.

[0010] In one optional implementation, when the mobile terminal configures the printing device via hotspot network configuration, the method further includes: if the printing device is not found on the local area network, determining whether the router currently connected to the mobile terminal is consistent with the target router; if it is determined that the router currently connected to the mobile terminal is inconsistent with the target router, generating a third prompt message, wherein the third prompt message is used to prompt the user that there are multiple wireless networks with the same name.

[0011] Secondly, embodiments of this disclosure provide a network configuration method applied to a printing device. The method includes: obtaining network configuration parameters of a target router sent by a mobile terminal, wherein the target router is the wireless network connected to by the mobile terminal when performing network configuration operations, and the network configuration parameters include connection information and identification information of the target router; when multiple candidate access networks are scanned, determining the candidate access network that matches the identification information from the multiple candidate access networks as the access network of the target router; and connecting to the target router according to the connection information.

[0012] In an optional implementation, the method further includes: after determining that the communication link between the mobile terminal and the printing device has failed to be established, selecting a target candidate access network that matches the target indicators from multiple candidate access networks; wherein the target indicators include at least one of the following: access network identifier, gateway identifier, network segment identifier, signal strength, frequency band, historical connection success rate, and auxiliary channel establishment capability; switching to the target candidate access network and re-detecting whether the communication link between the mobile terminal and the printing device has been successfully established.

[0013] In one optional implementation, determining that the communication link between the mobile terminal and the printing device has failed includes: after connecting to the target router according to the connection information, if no test connection request is received from the mobile terminal within a preset time, then determining that the communication link between the mobile terminal and the printing device has failed.

[0014] In an optional implementation, the method further includes: when no candidate access network matching the identification information is determined from multiple candidate access networks, executing at least one of the following strategies: rescanning candidate access networks after a preset time period, returning a matching failure prompt message to the mobile terminal, selecting a target candidate access network from multiple candidate access networks for network connection, and re-performing the network configuration operation.

[0015] Thirdly, embodiments of this disclosure also provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.

[0016] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the first aspect or any possible implementation of the first aspect.

[0017] Fifthly, embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the first aspect described above, or any possible implementation of the first aspect.

[0018] In the network configuration method, electronic device, storage medium, and product provided in this disclosure, a mobile terminal sends network configuration parameters of a target router to a printing device. The target router is the wireless network that the mobile terminal connects to when performing network configuration operations. The network configuration parameters include the target router's connection information and identification information. After obtaining the network configuration parameters, the printing device determines the candidate access network matching the identification information from a list of scanned candidate access networks as the target router's access network and connects to the target router according to the connection information. This processing method enables the printing device to match and connect to the target router accessed by the mobile terminal based on the identification information when scanning multiple wireless access networks with the same name. This effectively prevents the printing device from mistakenly connecting to other wireless networks with the same name but different network layers, reducing the probability of the printing device mistakenly connecting to the wrong access point and lowering the costs of repeated network configuration, troubleshooting, and after-sales support for users. Ultimately, this improves the printing device's network configuration success rate, communication rate, and user experience.

[0019] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.

[0021] Figure 1 A flowchart of a network configuration method provided by an embodiment of this disclosure is shown; Figure 2 This diagram illustrates the effect of a display interface for a first prompt message provided in an embodiment of the present disclosure. Figure 3 This diagram illustrates the effect of a prompt display interface for activating a remote printing function according to an embodiment of the present disclosure. Figure 4 This diagram illustrates the effect of a display interface for a second prompt message provided in an embodiment of the present disclosure. Figure 5 This illustration shows a schematic diagram of the effect of displaying a reason prompt message in response to a triggering operation on a second prompt message, according to an embodiment of the present disclosure. Figure 6 A flowchart of another network configuration method provided by an embodiment of this disclosure is shown; Figure 7 A schematic diagram of a network configuration apparatus provided in an embodiment of this disclosure is shown; Figure 8 A schematic diagram of another network configuration apparatus provided by an embodiment of this disclosure is shown. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0023] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0024] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0025] To address the problem described above where a communication link cannot be established between a mobile terminal and a printing device due to different access points, gateways, or network layers, this application provides a network configuration method, an electronic device, a storage medium, and a product.

[0026] To facilitate understanding of this embodiment, a network configuration method disclosed in this disclosure will first be described in detail. The execution subject of the network configuration method provided in this disclosure is generally an electronic device with a certain computing power, such as a printing device or a mobile terminal. In some possible implementations, this network configuration method can be implemented by a processor calling computer-readable instructions stored in memory.

[0027] See Figure 1 The diagram shows a flowchart of a network configuration method provided in an embodiment of this disclosure. The method includes step S101, wherein: S101: Send the network configuration parameters of the target router to the printing device. The target router is the wireless network that the mobile terminal connects to when performing the network configuration operation. The network configuration parameters include the connection information and identification information of the target router.

[0028] After obtaining the network configuration parameters, the printing device identifies the candidate access network that matches the identification information from multiple scanned candidate access networks as the access network of the target router, and connects to the target router according to the connection information.

[0029] Here, the connection information includes the target router's SSID name and password, and the identification information is used by the printing device to determine the wireless network that matches the identification information when scanning multiple wireless access networks with the same name. Preferably, the identification information can be at least one of the following: the target router's MAC address, BSSID (Basic Service Set Identifier) ​​address, Mesh node identifier, channel frequency band combination, gateway address, device unique identifier, etc. The target router is the router that the mobile terminal connects to when performing network configuration operations on the printing device.

[0030] Specifically, after identifying the printer selected by the user, the mobile terminal enters a password field. It then retrieves the user-entered Wi-Fi password and simultaneously reads the SSID name and identification information (e.g., MAC address) of the currently connected target router. The mobile terminal sends the SSID name, password, and identification information as network configuration parameters to the printer. Specifically, the mobile terminal can configure the printer via a hotspot, sending configuration parameters through the access point (AP); alternatively, it can configure the printer via Bluetooth, sending configuration parameters through a Bluetooth connection.

[0031] After receiving the network configuration parameters, the printing device scans the surrounding wireless networks. When multiple candidate access networks are detected, it selects the candidate access network that matches the identification information (e.g., MAC address) of the target router as the target router's access network.

[0032] For example, suppose there are two wireless routers, AP1 and AP2, in a home environment. Both wireless routers are set with the same SSID name and password, where wireless router AP1 is the target router.

[0033] When configuring the printing device for network setup, the application in the mobile terminal reads the SSID name, password, and identification information (e.g., BSSID) of the wireless router AP1, and sends the above configuration parameters to the printing device via Bluetooth.

[0034] After receiving the network configuration parameters, the printing device scans the surrounding wireless access networks, thus obtaining multiple candidate access networks with the same SSID, such as the access networks of wireless routers AP1 and AP2. The printing device compares the BSSIDs of AP1 and AP2 with the BSSID of the target router. If the BSSID of wireless router AP1 matches the BSSID of the target router, the printing device establishes a wireless connection with wireless router AP1. Thus, the printing device accesses the same wireless access network as the mobile terminal, and the mobile terminal can discover the printing device and initiate a print job through the local area network discovery mechanism.

[0035] In one alternative approach, when the printing device scans multiple candidate access networks, it can also determine whether there is an access network with the same SSID name among the multiple candidate access networks. If it is determined that such an access network exists, the printing device can filter out the candidate access network that matches the identification information of the target router as the target router's access network. If it is determined that such an access network does not exist, the printing device can directly connect to the corresponding wireless network based on the connection information.

[0036] This processing method allows the mobile terminal to send network configuration parameters containing connection and identification information to the printing device. When the printing device scans for multiple wireless access networks with the same name, it can match and connect to the target router accessed by the mobile terminal based on the identification information. This effectively prevents the printing device from mistakenly connecting to other wireless networks with the same name but different network layers, thereby reducing the probability of the printing device mistakenly connecting to the wrong access point and reducing the cost of repeated network configuration, troubleshooting, and after-sales support for users. Ultimately, this improves the network configuration success rate, communication rate, and user experience of the printing device.

[0037] In an optional implementation, after the printing device is connected to the target router, the method further includes the following steps: S11: When the printing device is detected to be offline in the local area network, if it is determined that the identification information of the router currently connected to the mobile terminal is inconsistent with that of the target router, and the access network name of the currently connected router is consistent with that of the target router, then determine whether the printing device supports remote printing function. S12: If it is determined that the printing device supports remote printing function but the remote printing function is not enabled, generate the first prompt message to enable the remote printing function.

[0038] After the mobile terminal completes the network configuration of the printing device, the printing device can connect to the target router based on the connection information. When the mobile terminal finds that the printing device is online in the local area network, it can send a print job to the printing device.

[0039] However, if the printing device or mobile terminal switches to another router with the same name during subsequent use, causing the printing device to be offline on the local area network, the mobile terminal can determine whether the name of the currently connected router is consistent with the name and identification information of the target router. If it is determined that the access network name of the currently connected router is consistent with the access network name of the target router, but the identification information is inconsistent, then the mobile terminal will switch to connect to another router with the same name at the current moment.

[0040] To address this issue, the mobile terminal can further determine whether the printing device supports remote printing. If it determines that the printing device supports remote printing but it is not enabled, it generates a first prompt message to the user to enable the remote printing function. For example, ... Figure 2 As shown, the application's main page displays the first message, "Remote printing function is not enabled." When a user triggers this first message, the following is displayed: Figure 3 The interface shown includes the process of enabling the remote printing function. For example, the process includes "Please go to [APP Homepage] - [Printer Details] - [Remote Printing] - [Enable]". If it is determined that the printing device supports the remote printing function and that the remote printing function is enabled, a communication link can be established directly between the printing device and the cloud.

[0041] In this embodiment, if it is determined that the printing device does not support remote printing, a second prompt message is generated to prompt the user to modify the access network name of the currently connected router and / or the access network name of the target router. For example, such as Figure 4 As shown, the application's main page displays a second prompt message: "There are multiple Wi-Fi networks with the same name in the current network environment. Please change the network name you are connected to." When a user triggers this second prompt message, the following is displayed: Figure 5 The error message displayed reads, "Multiple Wi-Fi networks with the same name exist in the current network environment, causing a network identification conflict for the printing device." By displaying this error message, users can accurately understand the reason for the network configuration failure, reducing the need for repeated configuration operations, guiding them to quickly locate and resolve the problem, and improving the success rate of network configuration and user experience.

[0042] Specifically, when the mobile terminal determines that the printing device does not support remote printing, it means that the local area network (LAN) communication obstacle cannot be resolved via the cloud. In this case, the mobile terminal can determine that multiple wireless access networks with the same name exist in the current network environment, and that the router currently connected to the mobile terminal is not the same device as the target router recorded during network configuration. This causes the mobile terminal to be unable to find the printing device on the LAN. Therefore, the user needs to be prompted to change the access network name of the currently connected router and / or the target router to different names to eliminate name conflicts and allow the mobile terminal and printing device to access the same communicable network.

[0043] In the above embodiments, when the local area network goes offline due to the switching of the printing device or mobile terminal to another router with the same Wi-Fi name, a clear remedial path can be provided for the user. Users do not need to blindly check the printer hardware or repeatedly perform network configuration operations, which reduces troubleshooting time and improves the user experience.

[0044] In one optional implementation, when the mobile terminal detects that the printing device is offline in the local area network, if it is determined that the identification information of the router currently connected to the mobile terminal is consistent with the identification information of the target router, and the name of the currently connected router is consistent with the name of the target router, then it is determined that the network currently connected to the mobile terminal is the same network as the wireless network connected during network configuration, that is, the mobile terminal has not connected to the wrong network.

[0045] At this point, the mobile terminal can determine that the printer's offline status is likely due to the printer itself. For example, the printer may go offline due to a power outage, a malfunctioning Wi-Fi module, a system crash, or signal loss due to excessive distance from the router.

[0046] Based on the above assessment, the mobile terminal can generate device prompts to remind the user to check the power status and network connection status of the printing device. For example, the device prompt could be: "Please check if the printing device is working properly."

[0047] The above methods can help users quickly locate the root cause of the problem, further reduce troubleshooting time, and improve the user experience.

[0048] In this embodiment of the application, the method further includes the following steps: S21: After the printing device is connected to the target router, a test connection request is sent to the printing device; S22: If a response is received from the printing device within a preset time, it is determined that the communication link between the mobile terminal and the printing device has been successfully established. S23: If no response is received within the preset time, it is determined that the communication link between the mobile terminal and the printing device has failed to be established.

[0049] To avoid situations where the printer successfully connects to the network but cannot print, the printer does not immediately consider network configuration complete after establishing wireless network access. Instead, it performs a communication reachability verification between the mobile terminal and the printer. If the communication reachability verification passes, the communication link between the mobile terminal and the printer is considered successfully established; otherwise, the communication link is considered to have failed to establish.

[0050] In practice, after connecting to the target router, the printing device can send a network connection success message to the mobile terminal via Bluetooth or a hotspot. Upon receiving this message, the mobile terminal sends a test connection request to the printing device; upon receiving the test connection request, the printing device returns a response message to the mobile terminal. The mobile terminal determines whether the communication link between the mobile terminal and the printing device has been successfully established based on whether the printing device returns a response message and the delay in the response message's return. For example, if the mobile terminal successfully receives the response message within a preset time, the communication link between the mobile terminal and the printing device is considered successfully established; if the mobile terminal does not receive the response message within the preset time, the communication link between the mobile terminal and the printing device is considered to have failed to establish. In this case, a communication blockage can be determined between the mobile terminal and the printing device. This communication blockage may be caused by the following factors: the printing device mistakenly connects to a wireless network with the same name at a different level; the router where the printing device is located has NAT (Network Address Translation) enabled or client isolation enabled; the printing device's discovery protocol cannot propagate across subnets; the mobile terminal and the printing device are located in different VLANs (Virtual Local Area Networks) or different VLAN segments. In this embodiment, the preset time can be set according to actual needs, as long as it is feasible.

[0051] Here, the test connection request can be at least one of the following: LAN probe request, application layer handshake request, print service discovery request, heartbeat packet, and lightweight test print job. Specifically, the mobile terminal can send a LAN probe request to the printing device to detect network layer connectivity; the mobile terminal can initiate a TCP handshake with the service port of the printing device by sending an application layer handshake request to confirm transport layer connectivity; the mobile terminal can query the service status information of the printing device by sending a print service discovery request to confirm whether the application layer discovery protocol is reachable; the mobile terminal can periodically confirm the connection status between the mobile terminal and the printing device by sending a heartbeat packet to prevent the communication link from being interrupted due to idleness or NAT timeout; the mobile terminal can send print job data to the printing device by sending a lightweight test print job to verify whether the communication link is available.

[0052] In the above embodiments, by actively performing communication reachability verification after the printing device is connected to the network, the false success of network configuration (successful network connection but inability to print) can be effectively prevented, thereby improving the effectiveness and reliability of the network configuration results.

[0053] In this embodiment of the application, the method further includes the following steps: S31: When it is determined that the communication link between the mobile terminal and the printing device has failed to be established, obtain the routing attribute information of the target router; S32: Determine the first repair strategy based on the routing attribute information; S33: Execute the first repair strategy to disable the wireless terminal isolation policy of the target router.

[0054] If the printing device is connected to the target router, and the reachability verification between the printing device and the mobile terminal fails, it is determined that the communication link between the mobile terminal and the printing device has failed to be established.

[0055] At this time, the mobile terminal can access the router management page or management interface corresponding to the target router, and obtain routing attribute information through the router management page or management interface; wherein, the routing attribute information includes at least one of the following: router manufacturer information, page feature information, and interface feature information.

[0056] Then, based on the routing attribute information, the mobile terminal determines the automated interaction strategy that matches the routing attribute information from the pre-set adaptation rule base, and uses the automated interaction strategy as the first repair strategy. The mobile terminal executes the first repair strategy to disable the target router's wireless terminal isolation strategy; the wireless terminal isolation strategy includes at least one of the following: AP (Access Point Isolation), client isolation, wireless isolation, or other equivalent isolation strategies.

[0057] Optionally, automated interaction strategies include: Execute script operations in the webpage view embedded in the mobile terminal. The script operations are used to perform the following steps in sequence: submit login information to the router management page to complete authentication, trigger page redirection of the router management page to locate the wireless settings page, locate the configuration item in the router management page corresponding to the wireless terminal isolation policy, perform a closing operation on the configuration item, uncheck the box operation or relax the policy operation. And / or, Call the target router's local management interface or configuration interface to submit a configuration modification request to the target router.

[0058] In this embodiment, after the mobile terminal detects that the printing device is connected to the network but the local area network is unreachable, it further uses gateway consistency comparison to locate the reason for the unreachability as the router side enabling a wireless terminal isolation policy. By accessing the router management interface or management interface, it automatically completes the adjustment of the isolation policy, thereby restoring the local area network communication between the mobile terminal and the printing device without the need for manual operation by the user.

[0059] In this embodiment of the application, the method further includes the following steps: S41: After disabling the wireless terminal isolation policy of the target router, re-detect whether the mobile terminal and the printing device can communicate in the local area network; S42: If it is determined that the mobile terminal and the printing device can communicate in the local area network, then the communication link is determined to be successfully established; S43: If it is determined that the mobile terminal and the printing device cannot communicate in the local area network, then determine the second repair strategy and perform repair on the target router in accordance with the second repair strategy.

[0060] After executing the first repair strategy, the mobile terminal can resend the test connection request to the printing device and determine whether the communication link between the mobile terminal and the printing device has been successfully established based on the response result.

[0061] When the mobile terminal receives the response information sent by the printing device within a preset time, the communication link is considered to have been successfully established.

[0062] When the response result indicates that the mobile terminal has not received a response from the printing device within a preset time, it is determined that the communication link has failed to establish. At this point, the mobile terminal determines and executes a second repair strategy. The second repair strategy includes at least one of the following: reconfiguring the network of the printing device, establishing an auxiliary channel with the printing device, or forwarding data between the mobile terminal and the printing device via a relay device. The auxiliary channel includes at least one of a Bluetooth channel, a hotspot direct connection channel, and a cloud-assisted channel. A Bluetooth channel refers to the mobile terminal sending a print job to the printing device via Bluetooth; a hotspot direct connection channel refers to the mobile terminal sending a print job to the printing device via a hotspot connection; and a cloud-assisted channel refers to the mobile terminal sending a print job to the printing device via the cloud.

[0063] In the above embodiments, when the first repair strategy fails to restore the local area network communication between the mobile terminal and the printing device, the mobile terminal can further execute the second repair strategy, thereby providing further remedial measures after the automatic repair strategy fails, and further improving the success rate of the distribution network.

[0064] In this embodiment of the application, when the mobile terminal configures the printing device via hotspot network configuration, the method further includes the following steps: S51: If no printing device is found on the local area network, determine whether the router currently connected to the mobile terminal is the same as the target router; S52: If it is determined that the router currently connected to the mobile terminal is inconsistent with the target router, a third prompt message is generated, which is used to prompt the user that there are multiple wireless networks with the same name.

[0065] Network configuration via hotspot from a mobile terminal refers to a network configuration method where the mobile terminal sends network configuration parameters to the printing device by connecting to the hotspot signal emitted by the printing device. In this method, the mobile terminal first connects to the hotspot signal emitted by the printing device and then sends network configuration parameters containing the target router's SSID, password, and identification information to the printing device through this hotspot channel.

[0066] After the printing device completes the connection with the target router based on the received network configuration parameters, it disconnects from the printing device hotspot and switches back to the wireless network corresponding to the target router so that it can search for and discover the printing device within the same local area network, thereby establishing a communication link.

[0067] If the mobile terminal fails to detect the printing device, it can be determined whether the currently connected router is the same as the target router. If they are different, it indicates that the mobile terminal has not switched back to the wireless network corresponding to the target router, but has switched to another router with the same name as the target router. In this case, a third prompt message is generated and displayed on the corresponding page of the application. This third prompt message informs the user that there are multiple wireless networks with the same name in the mobile terminal's network environment.

[0068] Here, the following methods can be used to determine whether the router currently connected to the mobile terminal is the same as the target router, specifically including: The system compares the identification information of the router currently connected to the mobile terminal with the identification information of the target router. If the identification information of the currently connected router is the same as that of the target router, the system determines that the router currently connected to the mobile terminal is consistent with the target router. If the identification information of the currently connected router is different from that of the target router, the system determines that the router currently connected to the mobile terminal is inconsistent with the target router.

[0069] If the mobile terminal detects the printing device, it can store the target router's SSID, password, and identification information for later use. For example, if the mobile terminal fails to detect the printing device later, it retrieves the identification information of the currently connected router and compares it with the stored target router's identification information. If they don't match but the wireless network name is the same, it's determined that the mobile terminal is connected to a different router with the same name than during network configuration, preventing communication with the printing device via the local area network. In this case, if the printing device supports remote printing, the user is prompted to enable remote printing to establish a communication link with the printing device through the cloud.

[0070] In this embodiment, to improve accuracy in multi-level routing scenarios, the network configuration parameters sent by the mobile terminal to the printing device may also include at least one of the following network topology identification information: the gateway address of the target router, the IP address of the target router, the subnet mask of the target router, the network segment identifier of the target router, the frequency band information of the target router, the channel number of the target router, and the network type identifier of the target router.

[0071] Specifically, after completing network connection based on connection and identification information, the printing device can obtain the network topology identification information of the wireless network it is currently connected to and compare it with the network topology identification information sent by the mobile terminal. Based on the comparison result, it determines whether the printing device has connected to a wireless network that is identical to or compatible with the mobile terminal. If it is determined that it has not connected to a matching or compatible wireless network, the user is prompted that the printing device has a network access error, requiring reconfiguration or the establishment of an auxiliary channel between the mobile terminal and the printing device. Auxiliary channels include: Bluetooth channel, hotspot direct connection channel, and cloud auxiliary channel. If it is determined that it has connected to a wireless network identical to or compatible with the mobile terminal, the communication link between the mobile terminal and the printing device is successfully established.

[0072] This processing method effectively identifies issues where network configuration succeeds but communication fails due to accessing different network layers in multi-level routing scenarios. When access is inconsistent, it provides auxiliary channels such as reconfiguration, Bluetooth, hotspot direct connection, and cloud assistance, reducing troubleshooting difficulty and improving network configuration success rate and communication availability.

[0073] See Figure 6 The diagram shows a flowchart of another network configuration method provided in this disclosure embodiment. The method includes steps S601 to S603, wherein: S601: Obtain the network configuration parameters of the target router sent by the mobile terminal. The target router is the wireless network that the mobile terminal connects to when performing the network configuration operation. The network configuration parameters include the connection information and identification information of the target router.

[0074] Here, the connection information includes the target router's SSID name and password, while the identification information is used by the printing device to uniquely identify the wireless network matching the identification information when scanning multiple wireless access networks with the same name. Preferably, the identification information can be the target router's MAC address, BSSID address, Mesh node identifier, channel frequency band combination, gateway address, device unique identifier, etc. The target router is the router that the mobile terminal connects to when performing network configuration operations on the printing device.

[0075] S602: When multiple candidate access networks are detected, the candidate access network that matches the identification information is selected as the access network of the target router.

[0076] S603: Connect to the target router based on the connection information.

[0077] After identifying the user-selected printing device, the mobile terminal enters a password field. It then retrieves the user-entered Wi-Fi password and simultaneously reads the SSID name and identification information of the currently connected target router. The mobile terminal sends the SSID name, password, and identification information as network configuration parameters to the printing device. Upon receiving the network configuration parameters, the printing device scans for surrounding wireless networks. When multiple candidate networks are detected, it selects the candidate network that matches the target router's identification information and connects to the target router based on the connection information.

[0078] In the above embodiments, the mobile terminal sends network configuration parameters containing connection information and identification information to the printing device. This enables the printing device to match and connect to the target router accessed by the mobile terminal when it scans multiple wireless access networks with the same name, based on the identification information. This effectively prevents the printing device from mistakenly connecting to other wireless networks with the same name but different network layers, thereby reducing the probability of the printing device mistakenly connecting to the wrong access point and reducing the cost of repeated network configuration, troubleshooting, and after-sales support for users. Ultimately, this improves the network configuration success rate, communication rate, and user experience of the printing device.

[0079] In this embodiment of the application, the method further includes the following steps: After determining that the communication link between the mobile terminal and the printing device has failed to be established, a target candidate access network matching the target indicators is selected from multiple candidate access networks. The target indicators include at least one of the following: access network identifier, gateway identifier, network segment identifier, signal strength, frequency band, historical connection success rate, and auxiliary channel establishment capability. Switch to the target candidate access network and re-check whether the communication link between the mobile terminal and the printing device has been successfully established.

[0080] To avoid situations where the printer successfully connects to the network but cannot print, the printer does not immediately consider network configuration complete after establishing wireless network access. Instead, it performs a communication reachability verification between the mobile terminal and the printer. If the communication reachability verification passes, the communication link between the mobile terminal and the printer is considered successfully established; otherwise, the communication link is considered to have failed to establish.

[0081] After determining that the communication link establishment has failed, the printing device can select a target candidate access network that matches the target index from multiple candidate access networks and access the target candidate access network; then, it re-detects whether the communication link between the mobile terminal and the printing device has been successfully established. The specific detection process is described in steps S21-S23 above, and will not be elaborated here.

[0082] In practice, the printing device can acquire information such as the access network identifier, gateway identifier, network segment identifier, signal strength, frequency band, historical connection success rate, and auxiliary channel establishment capability of each candidate access network. Then, it compares this information of each candidate access network with the access network identifier, gateway identifier, network segment identifier, signal strength, frequency band, historical connection success rate, and auxiliary channel establishment capability of the access network corresponding to the target router. This allows for the selection of candidate access networks that meet the following criteria: consistent access network identifier, consistent gateway identifier, consistent network segment identifier, signal strength meeting preset strength requirements, consistent frequency band, historical connection success rate meeting preset success rate requirements, and possess auxiliary channel establishment capability.

[0083] If there are multiple candidate access networks selected, they are ranked based on signal strength and / or historical connection success rate in the target indicators, so that the candidate access network with the highest signal strength and / or the highest historical connection success rate is determined as the target candidate access network.

[0084] If no candidate access network matching the target metric is found, a fourth prompt message is generated. This fourth prompt message informs the user that there is currently no available candidate access network and suggests that the user re-perform the network configuration operation or check the network environment.

[0085] In the above embodiments, after determining that the communication link between the printing device and the mobile terminal has failed to be established, the printing device re-selects the target access point from the available candidate access networks in the vicinity based on multiple indicators and switches to it, and re-verifies whether the link has been restored. This scheme enables the printing device to have autonomous repair capabilities and further improves the success rate of link restoration.

[0086] In this embodiment of the application, the above steps to determine that the communication link between the mobile terminal and the printing device has failed to be established include: After connecting to the target router based on the connection information, if no test connection request is received from the mobile terminal within a preset time, it is determined that the communication link between the mobile terminal and the printing device has failed to be established.

[0087] Specifically, after connecting to the target router, the printing device can send a network connection success message to the mobile terminal via Bluetooth or a hotspot. Upon receiving this message, the mobile terminal sends a test connection request to the printing device; after receiving the test connection request, the printing device returns response information to the mobile terminal.

[0088] After receiving the test connection request, the printing device returns a response message to the mobile terminal. If the mobile terminal receives the response message within a preset time, the communication link is considered to have been successfully established; if the mobile terminal does not receive the response message within the preset time, the communication link is considered to have failed to be established.

[0089] Accordingly, if the printing device does not receive a test connection request from the mobile terminal within a preset time after connecting to the target router, the printing device can determine that the communication link between the mobile terminal and the printing device has failed to be established. Afterwards, the printing device can select a target candidate access network from multiple candidate access networks that matches the target indicators for access, as described above, and will not be repeated here.

[0090] In this embodiment, the method further includes the following steps: When no candidate access network matching the identification information is found from multiple candidate access networks, at least one of the following strategies is executed: rescanning candidate access networks after a preset time period, returning a matching failure message to the mobile terminal, selecting the target candidate access network from multiple candidate access networks for network connection, or re-performing the network configuration operation.

[0091] In this embodiment of the application, after receiving the network configuration parameters sent by the mobile terminal, the printing device scans the surrounding candidate access networks and attempts to determine the candidate access network that matches the identification information in the network configuration parameters as the target router.

[0092] If none of the scanned candidate access networks matches the identification information, the printing device cannot complete the connection according to the target router specified in the network configuration parameters. In this case, the printing device will execute at least one of the following strategies to attempt to restore the network configuration process: Rescanning strategy: The printing device may fail to find the target access point within the current scanning cycle due to unstable signal at its current location or the target router not yet having started up. In this case, the printing device waits for a preset time (e.g., 10 seconds, 30 seconds, or 60 seconds) and then initiates a scan again to re-attempt to find candidate access networks that match the identification information. Failure notification strategy: The printing device sends a matching failure message to the mobile terminal via Bluetooth or hotspot to inform the mobile terminal that the target router cannot be found. After receiving the message, the mobile terminal can display corresponding prompts on its interface, such as "The specified router was not found. Please ensure that the router is powered on and within signal coverage," to guide the user in troubleshooting the network environment. Reconnection strategy: When an access point that precisely matches the identification information cannot be found, the printing device may select one of multiple candidate access networks as the target candidate access network for connection in the manner described in the above embodiments. Re-execute network configuration operation strategy: Printing devices can actively trigger the reconfiguration process.

[0093] In practice, the above strategies can be implemented individually or in combination as needed. For example, the printing device can prioritize the rescanning strategy. If the target access point is still not matched after rescanning, at least one of the following strategies can be implemented: a failure notification strategy, a reconnection strategy, and a re-execution of the network configuration operation strategy. This will improve the network configuration success rate through multiple means.

[0094] In the above embodiments, when the printing device cannot match the target router specified in the network configuration parameters, it can reduce the risk of network configuration process termination due to failure of a single strategy by performing multiple strategies such as rescanning, returning a prompt to the mobile terminal, selecting other candidate access points according to priority, or re-performing the network configuration operation. This improves the network configuration success rate of the printing device and reduces the number of times users have to repeat the operation due to network configuration failure.

[0095] As described above, the present invention has at least the following beneficial effects: When multiple routers or multiple access networks use the same SSID and the same password, by sending network configuration parameters containing the target router's identification information to the printing device, the printing device can accurately match and access the target router consistent with the mobile terminal, helping to reduce the probability of the printing device mistakenly connecting to the wrong access point and improving the subsequent LAN discovery and printing success rate; by adding network topology identification and communication reachability verification, it effectively solves the problem of "successful network connection but inability to communicate" in scenarios such as multi-level routing and subnet isolation; when the communication link fails to be established, the printing device can automatically reselect the access network or establish a backup communication channel by establishing an auxiliary channel, improving the system's adaptability in complex networks; at the same time, the mobile terminal can automatically access the router management interface, match the automated interaction scheme according to the manufacturer information, and disable AP isolation or equivalent isolation policies, restoring communication without manual operation by the user. The combined effect of these methods upgrades the traditional printing equipment network configuration from "statically distributing network parameters" to an intelligent network configuration solution that "perceives network topology and establishes effective communication links," reducing the cost of repeated network configuration and troubleshooting for users, and improving the success rate of network configuration, the communication rate, and the user experience.

[0096] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0097] Based on the same inventive concept, this disclosure also provides a network configuration device corresponding to the network configuration method. Since the principle of the device in this disclosure for solving the problem is similar to the network configuration method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0098] Reference Figure 7 The diagram shown is a schematic representation of a network configuration device provided in an embodiment of this disclosure. The device includes: a transmitting unit 71; wherein, The sending unit is used to send the network configuration parameters of the target router to the printing device. The target router is the wireless network that the mobile terminal connects to when performing the network configuration operation. The network configuration parameters include the connection information and identification information of the target router. After obtaining the network configuration parameters, the printing device identifies the candidate access network that matches the identification information from multiple scanned candidate access networks as the access network of the target router, and connects to the target router according to the connection information.

[0099] In one possible implementation, the device is further configured to: after the printing device is connected to the target router, when it is detected that the printing device is offline in the local area network, if it is determined that the identification information of the router currently connected to the mobile terminal is inconsistent with that of the target router, and the access network name of the currently connected router is consistent with that of the target router, then determine whether the printing device supports remote printing function; if it is determined that the printing device supports remote printing function and the printing device has not enabled remote printing function, then generate a first prompt message to enable remote printing function.

[0100] In one possible implementation, the device is further configured to: if it is determined that the printing device does not support remote printing, generate a second prompt message to prompt the user to modify the access network name of the currently connected router and / or the access network name of the target router.

[0101] In one possible implementation, the device is further configured to: send a test connection request to the printing device after the printing device is connected to the target router; if a response is received from the printing device within a preset time, it is determined that the communication link between the mobile terminal and the printing device has been successfully established; if no response is received within the preset time, it is determined that the communication link between the mobile terminal and the printing device has failed to be established.

[0102] In one possible implementation, the device is further configured to: when it is determined that the communication link between the mobile terminal and the printing device has failed to be established, obtain routing attribute information of the target router; determine a first repair strategy based on the routing attribute information; and execute the first repair strategy to disable the wireless terminal isolation strategy of the target router.

[0103] In one possible implementation, the device is further configured to: after disabling the wireless terminal isolation policy of the target router, re-detect whether the mobile terminal and the printing device can communicate in the local area network; if it is determined that the mobile terminal and the printing device can communicate in the local area network, then determine that the communication link has been successfully established; if it is determined that the mobile terminal and the printing device cannot communicate in the local area network, then determine a second repair strategy and perform repair on the target router according to the second repair strategy.

[0104] In one possible implementation, the device is further configured to: when the mobile terminal configures the printing device via a hotspot network, if the printing device is not found on the local area network, determine whether the router currently connected to the mobile terminal is consistent with the target router; if it is determined that the router currently connected to the mobile terminal is inconsistent with the target router, generate a third prompt message, wherein the third prompt message is used to prompt the user that there are multiple wireless networks with the same name.

[0105] Reference Figure 8The diagram shown illustrates another network configuration device provided in this embodiment of the present disclosure. The device includes: an acquisition unit 81, a determination unit 82, and a connection unit 83; wherein, The acquisition unit 81 is used to acquire the network configuration parameters of the target router sent by the mobile terminal. The target router is the wireless network that the mobile terminal connects to when performing the network configuration operation. The network configuration parameters include the connection information and identification information of the target router. The determining unit 82 is used to determine, when multiple candidate access networks are scanned, the candidate access network that matches the identification information from the multiple candidate access networks as the access network of the target router; Connection unit 83 is used to connect to the target router according to the connection information.

[0106] In one possible implementation, the device is further configured to: after determining that the communication link between the mobile terminal and the printing device has failed to be established, select a target candidate access network that matches the target indicators from multiple candidate access networks; wherein the target indicators include at least one of the following: access network identifier, gateway identifier, network segment identifier, signal strength, frequency band, historical connection success rate, and auxiliary channel establishment capability; switch to the target candidate access network and re-detect whether the communication link between the mobile terminal and the printing device has been successfully established.

[0107] In one possible implementation, the device is further configured to: after connecting to the target router according to the connection information, if no test connection request is received from the mobile terminal within a preset time, determine that the communication link between the mobile terminal and the printing device has failed to be established.

[0108] In one possible implementation, the device is further configured to: when no candidate access network matching the identification information is determined from multiple candidate access networks, execute at least one of the following strategies: rescan the candidate access networks after a preset time period, return a matching failure prompt message to the mobile terminal, select a target candidate access network from multiple candidate access networks for network connection, and re-execute the network configuration operation.

[0109] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0110] This disclosure also provides a method for configuring wireless peripherals on a network. This method is applicable to terminal devices searching for, identifying, and binding surrounding wireless peripherals. The terminal device can be an electronic device with wireless communication capabilities, such as a smartphone, tablet, or personal computer. The wireless peripheral can be an external device supporting short-range wireless communication, such as smart home devices (e.g., smart bulbs, smart sockets, smart speakers), wearable devices (e.g., smartwatches, Bluetooth headsets), or office peripherals (e.g., wireless printers, wireless projectors).

[0111] The network distribution method in this embodiment includes the following steps: Step S101: Start a full-area scan.

[0112] After the network configuration function is activated, the terminal performs a full-area scan in parallel using the first wireless scanning channel, the second wireless scanning channel, and the LAN scanning channel to collect device information of surrounding wireless peripherals. The first and second wireless scanning channels are scalable short-range wireless network configuration channels, compatible with one or more wireless communication protocols including Bluetooth, WiFi hotspot, UWB, NFC, ZigBee, and Mesh. The LAN scanning channel is used to discover wireless peripherals already connected to the current LAN. Based on the scan results, the terminal categorizes and labels the wireless peripherals according to their communication modes, allowing for the differentiation of peripherals with different communication modes in the display list.

[0113] Step S102: Determine the display strategy based on the scan results.

[0114] If the full-domain scan identifies the first-mode wireless peripheral first, the terminal closes the second-mode wireless scanning channel and displays the first-mode wireless peripheral and LAN peripheral in the display list; if the user selects a target peripheral, the binding process is executed; if the user selects an instruction to add other peripherals, the first-mode scanning channel is closed, the second wireless scanning channel is opened to search for devices, and the second-mode wireless peripheral and LAN peripheral are displayed in the display list.

[0115] If the full-area scan prioritizes the identification of the second-mode wireless peripheral, the terminal closes the first-mode wireless scanning channel and displays the second-mode wireless peripheral and LAN peripheral in the display list; if the user selects a target peripheral, the binding process is executed; if the user selects an instruction to add other peripherals, the second-mode scanning channel is closed, the first wireless scanning channel is opened to search for devices, and the first-mode wireless peripheral and LAN peripheral are displayed in the display list.

[0116] If both the first-mode and second-mode wireless peripherals are detected during the full-area scan, the terminal will prioritize displaying either the first-mode or second-mode wireless peripheral, along with LAN peripherals, in the display list according to a preset priority strategy. If the user selects a target peripheral, the binding process will be executed; if the user selects an instruction to add other peripherals, the scanning channel corresponding to the currently prioritized mode will be closed, and another scanning channel will be opened to search for devices, displaying the other-mode wireless peripheral and LAN peripheral in the display list.

[0117] Step S103: Backup distribution network processing.

[0118] If no wireless peripheral is detected during the full-area scan, the terminal closes all scanning channels and redirects to the model scanning page. After the user obtains the peripheral model through scanning, the terminal matches the corresponding native communication mode of the peripheral according to the pre-stored database and enables the corresponding scanning channel to perform targeted device search to complete network configuration and binding.

[0119] In this embodiment, "first-mode wireless peripheral" and "second-mode wireless peripheral" are relative concepts, referring to peripheral types using different wireless communication protocols, and corresponding to peripherals searched through the first and second wireless scanning channels, respectively. For example, in one specific application scenario, the first mode could be Bluetooth mode and the second mode could be WiFi hotspot mode; in another application scenario, the first mode could be UWB mode and the second mode could be ZigBee mode. Those skilled in the art can flexibly configure the specific communication protocol types corresponding to the first and second modes according to actual needs, and this embodiment does not impose specific limitations.

[0120] Preferably, the preset priority strategy can be set based on factors such as connection stability, transmission rate, power consumption level, or user's historical usage frequency. For example, when both Bluetooth peripherals and WiFi hotspot peripherals are present, the Bluetooth peripheral can be displayed first.

[0121] Preferably, the local area network peripheral is displayed alongside the first mode wireless peripheral and the second mode wireless peripheral in the display list, and can be distinguished by different visual identifiers so that users can quickly identify peripherals discovered by different communication channels.

[0122] This disclosure also provides another method for configuring wireless peripherals, which adopts a core technical architecture of dual-mode independent search, tab switching, and model scanning as a fallback. This embodiment sets up two independently operable and subsequently expandable wireless peripheral configuration modes, referred to as the first wireless peripheral configuration mode and the second wireless peripheral configuration mode, respectively.

[0123] The network distribution method in this embodiment includes the following steps: Step S201: The first wireless peripheral device performs parallel retrieval on the network and local area network.

[0124] After the user clicks the search button on the page, the system initiates the default first wireless peripheral network configuration mode search logic, simultaneously triggering the local area network search mechanism. Both searches are performed in parallel, jointly scanning for available wireless peripheral smart devices in the vicinity. The first wireless peripheral network configuration mode search is responsible for discovering nearby wireless peripherals through short-range wireless communication protocols (such as Bluetooth, WiFi hotspots, etc.); the local area network search mechanism is responsible for discovering wireless peripherals already connected to the current local area network. The results of the parallel searches are summarized and presented in the same display list.

[0125] Step S202: Switch to the second wireless peripheral network configuration mode for retrieval.

[0126] When the first wireless peripheral network configuration mode fails to find the target device, or when the user needs to change the network configuration method, the user can switch to the second wireless peripheral network configuration mode on the current network configuration page. During the switch, there is no need to exit the network configuration process or restart the page; the system automatically terminates the search task of the first wireless peripheral network configuration mode and immediately starts the dedicated device search logic for the second wireless peripheral network configuration mode. After the switch is complete, the display list refreshes, showing the wireless peripherals and LAN peripherals discovered by the second wireless peripheral network configuration mode.

[0127] In this step, users can switch the network configuration mode by clicking the mode tab or the switch button on the page. The operation is convenient and does not require returning to the previous page to select again.

[0128] Step S203: Scan the model number and add it.

[0129] If the target device is not found during the search process in either the first or second wireless peripheral network configuration mode, the user can complete fallback network configuration using the "Scan Model Add" function on the page. Specifically, after clicking the "Scan Model Add" button, the terminal uses its camera to scan the model barcode / QR code on the peripheral device's body or instruction manual to obtain the peripheral device's model information. The terminal then matches the obtained model information with the corresponding native communication mode and network configuration parameters of the peripheral device in a pre-stored database. After a successful match, the terminal uses the corresponding scanning channel to perform a targeted device search, completing the binding and network configuration with the peripheral device.

[0130] In this embodiment, the first wireless peripheral network configuration mode and the second wireless peripheral network configuration mode can each correspond to different wireless communication protocols. For example, the first wireless peripheral network configuration mode corresponds to the Bluetooth protocol, and the second wireless peripheral network configuration mode corresponds to the WiFi hotspot protocol. The two modes are independent of each other, each maintaining its own independent scanning channel and search logic, and do not interfere with each other.

[0131] Preferably, during the mode switching process in step S202, before terminating the first wireless peripheral network configuration mode search task, the system can save the list of currently discovered devices so that when the user switches back to the original mode, the search status can be quickly restored without rescanning.

[0132] This disclosure also provides another method for configuring wireless peripherals, which adopts a core technical architecture of active retrieval for network configuration, dedicated QR code scanning, and a scanning wizard for network configuration. The two configuration modes are implemented differently: the first wireless peripheral configuration mode supports active retrieval and LAN discovery; the second wireless peripheral configuration mode disables active device search capabilities, relying solely on model QR code identification, guiding the printing of a Wi-Fi wizard page, and then completing device binding and network configuration by scanning the QR code on the wizard page.

[0133] The network distribution method in this embodiment includes the following steps: Step S301: The first wireless peripheral device is configured to actively search the local area network.

[0134] After the user clicks the search button on the page, the system initiates the search logic of the first wireless peripheral network configuration mode and activates the local area network (LAN) search mechanism to scan for nearby wireless peripheral smart devices in parallel. The first wireless peripheral network configuration mode actively sends scan signals, receives response information from nearby peripherals, and displays the discovered peripherals in the list. The LAN search mechanism then discovers peripherals already connected to the current LAN. The results of both search methods are summarized and displayed on the same interface.

[0135] Step S302: Second wireless peripheral network configuration mode dedicated QR code scanning wizard network configuration process.

[0136] After switching to the second wireless peripheral network configuration mode tab, this page lacks an active search function and cannot discover devices by scanning for nearby signals. Network configuration in the second wireless peripheral network configuration mode can only be completed through the following dedicated process: (1) Scan device model. Users can obtain peripheral model information by scanning the model mark on the peripheral device body or instruction manual with the terminal camera.

[0137] (2) Guide the printing of the Wi-Fi wizard page. Based on the obtained peripheral model information, the terminal sends a wizard page printing instruction to the peripheral, guiding the peripheral to print a wizard page containing Wi-Fi network configuration information. The wizard page carries a network configuration QR code, which encodes the network configuration parameter information of the peripheral.

[0138] (3) Scan the wizard QR code. The user scans the QR code on the wizard page with the terminal. The terminal parses the QR code to obtain the network configuration parameters and establishes a connection with the peripheral device based on the network configuration parameters to complete the device binding and network configuration.

[0139] In this embodiment, the first wireless peripheral network configuration mode is suitable for peripheral types that support active broadcasting and responding to scan requests (such as Bluetooth peripherals, WiFi peripherals, etc.), while the second wireless peripheral network configuration mode is suitable for peripheral types that do not support active broadcasting or require a more secure network configuration method (such as some printers, specialized industrial equipment, etc.). The two modes can be switched via a tab, and users can select the appropriate network configuration mode according to the actual peripheral type.

[0140] Preferably, in step S302, if the peripheral device does not support printing, the printing wizard page can be replaced by directly displaying the network configuration QR code on the peripheral device's display screen. The user can complete the network configuration by scanning the QR code on the display screen.

[0141] Preferably, the QR code on the wizard page is dynamically generated, with a different QR code generated for each network configuration request. The QR code is also time-sensitive and automatically expires after the expiration date, thereby improving the security of the network configuration.

[0142] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

[0143] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the network configuration method described in the above-described method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.

[0144] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the network configuration method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0145] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0146] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0147] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0148] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0149] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0150] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A network configuration method, characterized in that, Applied to a mobile terminal, the method includes: Send the network configuration parameters of the target router to the printing device, wherein the target router is the wireless network that the mobile terminal connects to when performing the network configuration operation, and the network configuration parameters include the connection information and identification information of the target router; After obtaining the network configuration parameters, the printing device determines the candidate access network that matches the identification information from multiple scanned candidate access networks as the access network of the target router, and connects to the target router according to the connection information.

2. The method according to claim 1, characterized in that, After the printing device is connected to the target router, the method further includes: When the printing device is detected to be offline in the local area network, if it is determined that the identification information of the router currently connected to the mobile terminal is inconsistent with that of the target router, and the access network name of the currently connected router is consistent with that of the target router, then it is determined whether the printing device supports remote printing function. If it is determined that the printing device supports remote printing and the remote printing function is not enabled, a first prompt message to enable the remote printing function is generated.

3. The method according to claim 2, characterized in that, The method further includes: If it is determined that the printing device does not support remote printing, a second prompt message is generated to prompt the user to modify the access network name of the currently connected router and / or the access network name of the target router.

4. The method according to claim 1, characterized in that, The method further includes: After the printing device is connected to the target router, a test connection request is sent to the printing device; If a response is received from the printing device within a preset time, it is determined that the communication link between the mobile terminal and the printing device has been successfully established. If the response information is not received within the preset time, it is determined that the communication link between the mobile terminal and the printing device has failed to be established.

5. The method according to claim 4, characterized in that, The method further includes: When it is determined that the communication link between the mobile terminal and the printing device has failed to be established, the routing attribute information of the target router is obtained; Based on the routing attribute information, a first repair strategy is determined; The first repair strategy is executed to disable the wireless terminal isolation policy of the target router.

6. The method according to claim 5, characterized in that, The method further includes: After disabling the wireless terminal isolation policy of the target router, re-detect whether the mobile terminal and the printing device can communicate in the local area network; If it is determined that the mobile terminal and the printing device can communicate in the local area network, then the communication link is determined to have been successfully established. If it is determined that the mobile terminal and the printing device cannot communicate in the local area network, a second repair strategy is determined, and the target router is repaired according to the second repair strategy.

7. The method according to claim 1, characterized in that, When the mobile terminal configures the printing device via a hotspot network, the method further includes: If the printing device is not found on the local area network, then determine whether the router currently connected to the mobile terminal is the same as the target router; If it is determined that the router currently connected to the mobile terminal is different from the target router, a third prompt message is generated, wherein the third prompt message is used to prompt the user that there are multiple wireless networks with the same name.

8. A network configuration method, characterized in that, Applied to a printing device, the method includes: Obtain the network configuration parameters of the target router sent by the mobile terminal, wherein the target router is the wireless network that the mobile terminal connects to when performing the network configuration operation, and the network configuration parameters include the connection information and identification information of the target router; When multiple candidate access networks are detected, the candidate access network that matches the identification information is determined from the multiple candidate access networks as the access network of the target router; Connect to the target router based on the connection information.

9. The method according to claim 8, characterized in that, The method further includes: After determining that the communication link between the mobile terminal and the printing device has failed to be established, a target candidate access network matching the target indicator is selected from the plurality of candidate access networks; wherein, the target indicator includes at least one of the following: access network identifier, gateway identifier, network segment identifier, signal strength, frequency band, historical connection success rate, and auxiliary channel establishment capability; Switch to the target candidate access network and re-detect whether the communication link between the mobile terminal and the printing device has been successfully established.

10. The method according to claim 9, characterized in that, The determination that the communication link between the mobile terminal and the printing device has failed includes: After connecting to the target router according to the connection information, if no test connection request is received from the mobile terminal within a preset time, it is determined that the communication link between the mobile terminal and the printing device has failed to be established.

11. The method according to claim 8, characterized in that, The method further includes: When no candidate access network matching the identification information is determined from the plurality of candidate access networks, at least one of the following strategies is executed: rescanning the candidate access networks after a preset time period, returning a matching failure prompt message to the mobile terminal, selecting a target candidate access network from the plurality of candidate access networks for network connection, and re-performing the network configuration operation.

12. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the network configuration method as described in any one of claims 1 to 11.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the network configuration method as described in any one of claims 1 to 11.

14. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the network configuration method as described in any one of claims 1 to 11.