Equipment network distribution method and device, electronic equipment and storage medium
By finding the distributed network equipment and receiving their distribution network information, the intelligent device can adaptively connect to the target router, solving the problem of low manual distribution network efficiency in the existing technology, and achieving a more efficient distribution process.
Patent Information
- Application Number
- CN202411617278.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, smart device distribution network requires manual operation by users and is inefficient.
By searching for distributed network devices, establishing a communication connection, receiving and storing the first distribution network information, and adaptively connecting to the target router based on this information.
It eliminates complicated manual operations and improves the efficiency of smart device distribution network.
Smart Images

Figure CN119449511A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart devices, and in particular to a device network configuration method, device, electronic device and storage medium. Background Art
[0002] With the continuous development of smart home devices and Internet technology, more and more users are using various smart devices. When using a smart device for the first time, or changing a wireless LAN, or changing a wireless LAN password, it is necessary to configure the smart device to establish a connection with a router so that the smart device can access the wireless LAN used by the user. In the prior art, users are usually required to manually configure the network for smart devices, which is not smart enough and has a very low network configuration efficiency.
[0003] Therefore, there is an urgent need for a technical solution that can intelligently configure the network for smart devices. Summary of the invention
[0004] The present application provides a device network configuration method, apparatus, electronic device and storage medium to solve the problem in the prior art that users are usually required to manually configure the network for smart devices, which is not smart enough and has very low network configuration efficiency.
[0005] In a first aspect, the present application provides a device network configuration method, comprising:
[0006] Searching for a network-configured device, wherein the network-configured device is a device that has established a connection with the target router;
[0007] Establishing a communication connection with the network-configured device;
[0008] Receiving first network configuration information sent by the configured network device through the communication connection, wherein the first network configuration information is information used when the configured network device establishes a connection with the target router;
[0009] The target router is connected according to the first network configuration information.
[0010] In a possible implementation manner, searching for a network-configured device includes:
[0011] Obtaining a first broadcast message broadcast by at least one device to be confirmed;
[0012] For each device to be confirmed, determining whether a first broadcast message broadcast by the device to be confirmed includes a first identifier;
[0013] In a case where the first broadcast message broadcasted by the device to be confirmed includes the first identifier, it is determined that the device to be confirmed is a network-configured device.
[0014] In a possible implementation, the method further includes:
[0015] When the first broadcast message is not received or the first broadcast message broadcast by all the devices to be confirmed does not include the first identifier, sending a data request to a mobile terminal, wherein the mobile terminal stores first network configuration information for connecting to the target router;
[0016] The second network configuration information is received, which is returned by the mobile terminal based on the data request, and the target router is connected according to the second network configuration information.
[0017] In a possible implementation, the establishing a communication connection with the network-configured device includes:
[0018] Obtain a connection request data packet and a second identifier, wherein the second identifier is used to mark the current device as a device to be networked;
[0019] Encrypting the connection request data packet to obtain an encrypted data packet;
[0020] The encrypted data packet carrying the second identifier is sent to the configured device, so that the configured device performs verification based on the second identifier. After the verification passes, the encrypted data packet is decrypted to obtain a connection request data packet, and the device to be configured is connected based on the connection request data packet.
[0021] In a possible implementation manner, before searching for a network-configured device, the method further includes:
[0022] When the network device to be configured is disconnected from the target router, obtaining a pre-stored network name and a network password in a network module of the network device to be configured;
[0023] Reconnect the target router according to the network name and the network password;
[0024] In case the reconnection fails for a preset number of times, the step of searching for a network-connected device is performed.
[0025] In a possible implementation manner, after receiving the first network configuration information sent by the configured device through the communication connection, the method further includes:
[0026] The first network configuration information is stored in a network module, and the first network configuration information is written into a flash memory, so that the network module can reconnect to the target router according to the first network configuration information when it is restarted.
[0027] In a possible implementation manner, after connecting to the target router according to the first network configuration information, the method further includes:
[0028] Obtaining a third identifier and a preset broadcast duration, wherein the third identifier is used to indicate that the current device has been connected to the target router;
[0029] generating a second broadcast message according to the third identifier, and broadcasting the second broadcast message;
[0030] When the duration of broadcasting the second broadcast message reaches the preset broadcast duration, the broadcasting is terminated.
[0031] In a second aspect, the present application provides a device network configuration apparatus, including:
[0032] A search module, used to search for a network-configured device, wherein the network-configured device is a device that has established a connection with a target router;
[0033] An establishing module, used to establish a communication connection with the network-configured device;
[0034] A receiving module, configured to receive first network configuration information sent by the configured network device through the communication connection, wherein the first network configuration information is information used when the configured network device establishes a connection with the target router;
[0035] A connection module is used to connect to the target router according to the first network configuration information.
[0036] In a possible implementation, the search module includes:
[0037] An acquiring unit, configured to acquire a first broadcast message broadcast by at least one device to be confirmed;
[0038] A first determining unit, configured to determine, for each device to be confirmed, whether a first broadcast message broadcast by the device to be confirmed includes a first identifier;
[0039] A second determining unit is configured to determine that the device to be confirmed is a network-configured device when a first broadcast message broadcast by the device to be confirmed includes the first identifier.
[0040] In a possible implementation, the device further includes:
[0041] a request sending module, configured to send a data request to a mobile terminal when the first broadcast message is not received or the first broadcast message broadcast by all the devices to be confirmed does not include the first identifier, wherein the mobile terminal stores the first network configuration information for connecting to the target router;
[0042] The information receiving module is used to receive the second network configuration information returned by the mobile terminal based on the data request, and connect to the target router according to the second network configuration information.
[0043] In a possible implementation, the establishing module includes:
[0044] A first acquisition module, used to acquire a connection request data packet and a second identifier, wherein the second identifier is used to mark the current device as a device to be networked;
[0045] An encryption module, used for encrypting the connection request data packet to obtain an encrypted data packet;
[0046] A data packet sending module is used to send the encrypted data packet carrying the second identifier to the configured network device, so that the configured network device performs verification based on the second identifier, decrypts the encrypted data packet to obtain a connection request data packet after the verification passes, and connects to the to-be-configured network device based on the connection request data packet.
[0047] In a possible implementation, the device further includes:
[0048] A second acquisition module is used to acquire a pre-stored network name and a network password in a network module of the device to be configured when the device to be configured is disconnected from the target router;
[0049] A reconnection module, used for reconnecting the target router according to the network name and the network password;
[0050] The first execution module is used to execute the step of searching for the network-connected device when the reconnection fails for a preset number of times.
[0051] In a possible implementation, the device further includes:
[0052] The storage module is used to store the first network configuration information in the network module and write the first network configuration information into the flash memory, so that the network module can reconnect to the target router according to the first network configuration information when restarting.
[0053] In a possible implementation, the device further includes:
[0054] A third acquisition module, used to acquire a third identifier and a preset broadcast duration, wherein the third identifier is used to indicate that the current device is connected to the target router;
[0055] A generating module, configured to generate a second broadcast message according to the third identifier, and broadcast the second broadcast message;
[0056] The ending module is used to end the broadcast when the duration of broadcasting the second broadcast message reaches the preset broadcast duration.
[0057] In a third aspect, the present application provides a device, including: a processor and a memory, wherein the processor is used to execute a device network configuration program stored in the memory to implement the device network configuration method described in any one of the first aspects.
[0058] In a fourth aspect, the present application provides a storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the device network configuration method described in any one of the first aspects.
[0059] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application, first, searches for network-configured devices, wherein the network-configured devices are devices that have established a connection with the target router, then establishes a communication connection with the network-configured devices, and receives the first network configuration information sent by the network-configured devices through the communication connection, wherein the first network configuration information is the information used when the network-configured devices establish a connection with the target router, and finally, connects to the target router according to the first network configuration information. Through the technical solution of the present application, the device to be network-configured can obtain the first network configuration information from the network-configured device, and adaptively connect to the target router according to the first network configuration information, thus eliminating complicated manual operations and improving network configuration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0061] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0062] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0063] Figure 1 A flow chart of an embodiment of a device network configuration method provided in an embodiment of the present application;
[0064] Figure 2 A flowchart of another device network configuration method provided in an embodiment of the present application;
[0065] Figure 3A flowchart of another device network configuration method provided in an embodiment of the present application;
[0066] Figure 4 A block diagram of an embodiment of a device network configuration device provided in an embodiment of the present application;
[0067] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0069] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0070] In order to solve the technical problem in the prior art that users are usually required to manually configure the network for smart devices, which is not smart enough and has very low network configuration efficiency, the present application provides a device network configuration method, in which the device to be configured can obtain the first network configuration information from the configured device, and adaptively connect to the target router according to the first network configuration information, thereby eliminating complicated manual operations and improving the network configuration efficiency.
[0071] Figure 1 The flowchart of an embodiment of a device network configuration method provided in the present application embodiment. In one embodiment, the method is applied to the device to be configured. Figure 1 As shown, the method comprises the following steps:
[0072] Step 101: Search for a network-configured device, wherein the network-configured device is a device that has established a connection with a target router.
[0073] The embodiment of the present application provides a device network configuration method, and its application scenario is: a target location containing multiple smart devices, where multiple smart devices exist, and the protocols of each smart device (such as Bluetooth protocol, WiFi protocol, Matter protocol, etc.) are the same and can communicate with each other. For example, a home location contains televisions, refrigerators, air conditioners, washing machines and other devices, and an office location contains computers, projectors, refrigerators and other devices.
[0074] The device to be networked refers to the device in the target location that needs to establish a connection with the target router.
[0075] A configured device refers to a device in the target location that has established a connection with the target router.
[0076] In the embodiment of the present application, step 101 may include the following steps:
[0077] Step A1: obtaining a first broadcast message broadcast by at least one device to be confirmed;
[0078] Step A2: for each device to be confirmed, determining whether the first broadcast message broadcast by the device to be confirmed contains a first identifier;
[0079] Step A3: When the first broadcast message broadcast by the device to be confirmed includes the first identifier, determine that the device to be confirmed is a network-configured device.
[0080] For ease of understanding, steps A1 to A3 are described in a unified manner as follows:
[0081] The device to be confirmed can be any device in the target location.
[0082] In the application, when any device in the target location is successfully connected to the target router, the wifi module in the device will release a broadcast message, and the broadcast message will carry a first identifier for indicating that it has been successfully connected to the target router.
[0083] Taking the first broadcast message in hexadecimal data representation as an example, the data bit data3 in the broadcast data packet is used to indicate the network configuration status. Data3 is 00, which indicates unconfigured network, data3 is 01, which indicates configured network, and data3 is 02, which indicates switching the router for network configuration. Then, the first identifier is 01 or 02, that is, when data3 is 01 or data3 is 02, the corresponding device is a configured network device.
[0084] Based on this, in this implementation, when the network-to-be-connected device needs to establish a connection with the target router, it will monitor the broadcast through its own wifi module, and when it obtains the first broadcast message broadcast by any device (i.e., the device to be confirmed), it will parse the first broadcast message to determine whether it contains the first identifier, and if the first broadcast message broadcast by the device to be confirmed contains the first identifier, it will determine that the device to be confirmed is a network-connected device that has been connected to the target router. In this way, intelligent positioning of the network-connected device is achieved.
[0085] Step 102: Establish a communication connection with the network-connected device.
[0086] In the embodiment of the present application, after locating the network-configured device, the device to be configured can establish a communication connection with the network-configured device to facilitate subsequent acquisition of information from the network-configured device.
[0087] Specifically, step 102 may include the following steps:
[0088] Step B1, obtaining a connection request data packet and a second identifier, wherein the second identifier is used to mark the current device as a device to be networked;
[0089] Step B2, encrypting the connection request data packet to obtain an encrypted data packet;
[0090] Step B3: Send the encrypted data packet carrying the second identifier to the configured device, so that the configured device performs verification based on the second identifier. After the verification passes, decrypt the encrypted data packet to obtain a connection request data packet, and connect to the device to be configured based on the connection request data packet.
[0091] For ease of understanding, steps B1 to B3 are described in a unified manner as follows:
[0092] The second identifier is used to mark that the device needs to be connected back to the switching router, or that an unconfigured device needs to be connected, that is, it is used to mark the current device as a device to be configured.
[0093] Connection request data packet, used to request to establish a connection with a configured network device.
[0094] In the embodiment of the present application, the connection request data packet is first encrypted to obtain an encrypted data packet, and then the encrypted data packet carrying the second identifier is sent to the WiFi module of the networked device through its own WiFi module to request connection with the networked device. After the WiFi module of the networked device receives the encrypted data packet, it first verifies it according to the second identifier, and after the verification passes, it decrypts the encrypted data packet to obtain a connection request data packet, and finally, it connects to the WiFi module of the networked device to be configured based on the connection request data packet. In this way, the communication connection between the networked device to be configured and the networked device to be configured is realized.
[0095] Step 103: Receive first network configuration information sent by the network-configured device through the communication connection, wherein the first network configuration information is information used when the network-configured device establishes a connection with the target router.
[0096] The first network configuration information refers to ssid (wifi name) and password (wifi password).
[0097] In the embodiment of the present application, after the device to be networked is connected to the device already networked, the device already networked will transmit its own stored SSID and password to the WiFi module of the device to be networked.
[0098] In another embodiment of the present application, after step 103, the following steps may also be included:
[0099] The first network configuration information is stored in a network module, and the first network configuration information is written into a flash memory, so that the network module can reconnect to the target router according to the first network configuration information when it is restarted.
[0100] In this embodiment, after the WiFi module of the device to be configured receives the SSID and password, the WiFi module will store the SSID and password internally, and write the SSID and password into the internal flash (flash memory) of the WiFi module to ensure that the WiFi module can still search for the same SSID after restarting and use the previously stored password to reconnect.
[0101] In addition, in another embodiment of the present application, after step 103, the following steps may be included: disconnecting from the network-connected device, and closing the monitoring state.
[0102] In this implementation, after the WiFi module of the device to be networked obtains the SSID and password, it can disconnect from the WiFi module of the networked device and turn off the monitoring state, thereby reducing resource waste.
[0103] Step 104: Connect to the target router according to the first network configuration information.
[0104] In the embodiment of the present application, after the device to be networked receives the SSID and password sent by the networked device, it can establish a connection with the target router based on the SSID and password, thereby completing the network configuration process.
[0105] In another embodiment of the present application, the following steps may also be included:
[0106] When the first broadcast message is not received, or when the first broadcast messages broadcast by all devices to be confirmed do not include the first identifier, a data request is sent to a mobile terminal, wherein the mobile terminal stores first network configuration information for connecting to the target router; second network configuration information returned by the mobile terminal based on the data request is received, and the target router is connected according to the second network configuration information.
[0107] The mobile terminal stores the second network configuration information (ie, SSID and password) for connecting to the target router in advance. The second network configuration information may be sent to the mobile terminal for storage after a device in the target location connects to the target router, or may be pre-entered by the user.
[0108] In this embodiment, when the device to be networked has not received any first broadcast message, or when the first broadcast messages broadcast by all devices to be confirmed do not contain the first identifier, the device to be networked can send a data request to the mobile terminal, obtain the second network configuration information from the mobile terminal, and connect to the target router through the second network configuration information to complete the network configuration process.
[0109] In addition, in the above scheme, the broadcast content and interactive content between the WiFi modules of each device are encrypted, wherein the encryption processing methods include symmetric key encryption, asymmetric key encryption, message digest, digital signature, etc. In this way, the security of data transmission between devices can be improved.
[0110] The technical solution provided by the embodiment of the present application first searches for network-configured devices, wherein the network-configured devices are devices that have established a connection with a target router, then establishes a communication connection with the network-configured devices, and receives the first network configuration information sent by the network-configured devices through the communication connection, wherein the first network configuration information is the information used when the network-configured devices establish a connection with the target router, and finally connects to the target router according to the first network configuration information. Through the technical solution of the present application, the network-configured device can obtain the first network configuration information from the network-configured device, and adaptively connect to the target router according to the first network configuration information, thus eliminating complicated manual operations and improving network configuration efficiency.
[0111] Figure 2 A flowchart of another device network configuration method provided in an embodiment of the present application. Figure 2 The process shown in Figure 1 Based on the process shown, the following steps are included:
[0112] Step 201: when the network device to be configured is disconnected from the target router, obtaining a pre-stored network name and network password in the network module of the network device to be configured;
[0113] Step 202: reconnecting to the target router according to the network name and the network password;
[0114] Step 203: When the reconnection fails for a preset number of times, the step of searching for a network-connected device is performed.
[0115] For ease of understanding, steps 201 to 203 are described in a unified manner as follows:
[0116] In the embodiment of the present application, the network name and network password (i.e., SSID and password) are pre-stored in the network module (i.e., WiFi module) of the device to be configured. If the user changes the SSID or password of the WiFi without informing the WiFi module of the device to be configured in advance, the device to be configured will be disconnected from the target router. At this time, the WiFi module of the device to be configured will repeatedly use the pre-stored SSID and password to reconnect to the target router. If the connection cannot be successfully made after the preset number of connections, step 101-step 104 will be executed.
[0117] pass Figure 2 In the process shown, after the device is disconnected from the target router, it can first try to reconnect to the target router based on the network name and network password stored in its own wifi module. If the device still cannot connect to the target router after multiple connections, it will look for a networked device to reconnect, thereby achieving intelligent reconnection without the user's awareness, thereby improving the user experience.
[0118] Figure 3 A flowchart of another device network configuration method provided in an embodiment of the present application. Figure 3 The process shown in Figure 1 Based on the process shown, the following steps are included:
[0119] Step 301: Obtain a third identifier and a preset broadcast duration, wherein the third identifier is used to indicate that the current device has been connected to the target router;
[0120] Step 302: Generate a second broadcast message according to the third identifier, and broadcast the second broadcast message;
[0121] Step 303: When the duration of broadcasting the second broadcast message reaches the preset broadcast duration, end the broadcasting.
[0122] For ease of understanding, steps 301 to 303 are described in a unified manner as follows:
[0123] In the embodiment of the present application, after the device to be networked successfully connects to the target router, it becomes a networked device. At this time, the device can generate a second broadcast message according to the third identifier, and broadcast the second broadcast message with the third identifier to inform other devices that it has successfully connected to the target router, so as to facilitate other devices to be networked to connect to it when networked and request corresponding networked information. Moreover, if no device request is received when the broadcast reaches the preset broadcast duration, the broadcast is closed, thereby reducing power consumption.
[0124] pass Figure 3 In the process shown, after the network device to be configured successfully connects to the target router, it can broadcast the message that it has successfully connected to the target router to other devices, thereby assisting other network devices to be configured to connect to the target router. And the broadcast is turned off when the preset broadcast duration is reached, thereby achieving the requirement of reducing power consumption.
[0125] Figure 4 This is a block diagram of an embodiment of a device network configuration device provided in an embodiment of the present application. Figure 4 As shown, the device comprises:
[0126] A search module 41 is used to search for a network-configured device, wherein the network-configured device is a device that has established a connection with a target router;
[0127] Establishing module 42, used to establish a communication connection with the network-connected device;
[0128] A receiving module 43, configured to receive first network configuration information sent by the configured network device through the communication connection, wherein the first network configuration information is information used when the configured network device establishes a connection with the target router;
[0129] The connection module 44 is configured to connect to the target router according to the first network configuration information.
[0130] In a possible implementation, the search module includes:
[0131] An acquiring unit, configured to acquire a first broadcast message broadcast by at least one device to be confirmed;
[0132] A first determining unit, configured to determine, for each device to be confirmed, whether a first broadcast message broadcast by the device to be confirmed includes a first identifier;
[0133] A second determining unit is configured to determine that the device to be confirmed is a network-configured device when a first broadcast message broadcast by the device to be confirmed includes the first identifier.
[0134] In a possible implementation, the device further includes:
[0135] a request sending module, configured to send a data request to a mobile terminal when the first broadcast message is not received or the first broadcast message broadcast by all the devices to be confirmed does not include the first identifier, wherein the mobile terminal stores the first network configuration information for connecting to the target router;
[0136] The information receiving module is used to receive the second network configuration information returned by the mobile terminal based on the data request, and connect to the target router according to the second network configuration information.
[0137] In a possible implementation, the establishing module includes:
[0138] A first acquisition module, used to acquire a connection request data packet and a second identifier, wherein the second identifier is used to mark the current device as a device to be networked;
[0139] An encryption module, used for encrypting the connection request data packet to obtain an encrypted data packet;
[0140] A data packet sending module is used to send the encrypted data packet carrying the second identifier to the configured network device, so that the configured network device performs verification based on the second identifier, decrypts the encrypted data packet to obtain a connection request data packet after the verification passes, and connects to the to-be-configured network device based on the connection request data packet.
[0141] In a possible implementation, the device further includes:
[0142] A second acquisition module is used to acquire a pre-stored network name and a network password in a network module of the device to be configured when the device to be configured is disconnected from the target router;
[0143] A reconnection module, used for reconnecting the target router according to the network name and the network password;
[0144] The first execution module is used to execute the step of searching for the network-connected device when the reconnection fails for a preset number of times.
[0145] In a possible implementation, the device further includes:
[0146] The storage module is used to store the first network configuration information in the network module and write the first network configuration information into the flash memory, so that the network module can reconnect to the target router according to the first network configuration information when restarting.
[0147] In a possible implementation, the device further includes:
[0148] A third acquisition module, used to acquire a third identifier and a preset broadcast duration, wherein the third identifier is used to indicate that the current device is connected to the target router;
[0149] A generating module, configured to generate a second broadcast message according to the third identifier, and broadcast the second broadcast message;
[0150] The ending module is used to end the broadcast when the duration of broadcasting the second broadcast message reaches the preset broadcast duration.
[0151] The technical solution provided by the embodiment of the present application first searches for network-configured devices, wherein the network-configured devices are devices that have established a connection with a target router, then establishes a communication connection with the network-configured devices, and receives the first network configuration information sent by the network-configured devices through the communication connection, wherein the first network configuration information is the information used when the network-configured devices establish a connection with the target router, and finally connects to the target router according to the first network configuration information. Through the technical solution of the present application, the network-configured device can obtain the first network configuration information from the network-configured device, and adaptively connect to the target router according to the first network configuration information, thus eliminating complicated manual operations and improving network configuration efficiency.
[0152] like Figure 5 As shown, an embodiment of the present application provides a device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0153] Memory 113, used for storing computer programs;
[0154] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113 to implement the device network configuration method provided by any of the above method embodiments, including:
[0155] Searching for a network-configured device, wherein the network-configured device is a device that has established a connection with the target router;
[0156] Establishing a communication connection with the network-configured device;
[0157] Receiving first network configuration information sent by the configured network device through the communication connection, wherein the first network configuration information is information used when the configured network device establishes a connection with the target router;
[0158] The target router is connected according to the first network configuration information.
[0159] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the device network configuration method provided in any of the aforementioned method embodiments are implemented.
[0160] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0161] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0162] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0163] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A device network configuration method, characterized in that: Applied to the equipment to be networked, the method includes: Searching for a network-configured device, wherein the network-configured device is a device that has established a connection with the target router; Establishing a communication connection with the network-configured device; Receiving first network configuration information sent by the configured network device through the communication connection, wherein the first network configuration information is information used when the configured network device establishes a connection with the target router; The target router is connected according to the first network configuration information.
2. The method according to claim 1, characterized in that The searching for the network-configured device includes: Obtaining a first broadcast message broadcast by at least one device to be confirmed; For each device to be confirmed, determining whether a first broadcast message broadcast by the device to be confirmed includes a first identifier; In a case where the first broadcast message broadcasted by the device to be confirmed includes the first identifier, it is determined that the device to be confirmed is a network-configured device.
3. The method according to claim 2, characterized in that The method further comprises: When the first broadcast message is not received or the first broadcast message broadcast by all the devices to be confirmed does not include the first identifier, sending a data request to a mobile terminal, wherein the mobile terminal stores first network configuration information for connecting to the target router; The second network configuration information is received, which is returned by the mobile terminal based on the data request, and the target router is connected according to the second network configuration information.
4. The method according to claim 1, characterized in that: The establishing of a communication connection with the network-configured device includes: Obtain a connection request data packet and a second identifier, wherein the second identifier is used to mark the current device as a device to be networked; Encrypting the connection request data packet to obtain an encrypted data packet; The encrypted data packet carrying the second identifier is sent to the configured device, so that the configured device performs verification based on the second identifier. After the verification passes, the encrypted data packet is decrypted to obtain a connection request data packet, and the device to be configured is connected based on the connection request data packet.
5. The method according to claim 1, characterized in that Before searching for the network-connected device, the method further includes: When the network device to be configured is disconnected from the target router, obtaining a pre-stored network name and a network password in a network module of the network device to be configured; Reconnect the target router according to the network name and the network password; In case the reconnection fails for a preset number of times, the step of searching for a network-connected device is performed.
6. The method according to claim 1, characterized in that After receiving the first network configuration information sent by the network-configured device through the communication connection, the method further includes: The first network configuration information is stored in a network module, and the first network configuration information is written into a flash memory, so that the network module can reconnect to the target router according to the first network configuration information when it is restarted.
7. The method according to claim 1, characterized in that After connecting to the target router according to the first network configuration information, the method further includes: Obtaining a third identifier and a preset broadcast duration, wherein the third identifier is used to indicate that the current device has been connected to the target router; generating a second broadcast message according to the third identifier, and broadcasting the second broadcast message; When the duration of broadcasting the second broadcast message reaches the preset broadcast duration, the broadcasting is terminated.
8. A device for network distribution, characterized in that: Applied to the equipment to be networked, the device comprises: A search module, used to search for a network-configured device, wherein the network-configured device is a device that has established a connection with a target router; An establishing module, used to establish a communication connection with the network-configured device; A receiving module, configured to receive first network configuration information sent by the configured network device through the communication connection, wherein the first network configuration information is information used when the configured network device establishes a connection with the target router; A connection module is used to connect to the target router according to the first network configuration information.
9. A device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a device network configuration program stored in the memory to implement the device network configuration method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the device network configuration method described in any one of claims 1-7.
Citation Information
Patent Citations
Household electrical appliance network configuration method and system
CN108011726A
Network distribution method, device and system for intelligent equipment, electronic equipment and storage medium
CN112752324A
Terminal, terminal network distribution method and device, and storage medium
CN113573384A
Equipment network access method and device, electronic equipment and storage medium
CN116264682A
Cited By
A method and device for assisting portable device to perform network communication
CN119788512A