CN110891299A - Network distribution method and device, electronic equipment and storage medium - Google Patents
Network distribution method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN110891299A CN110891299A CN201911121797.XA CN201911121797A CN110891299A CN 110891299 A CN110891299 A CN 110891299A CN 201911121797 A CN201911121797 A CN 201911121797A CN 110891299 A CN110891299 A CN 110891299A
- Authority
- CN
- China
- Prior art keywords
- router
- network
- connection
- information
- key
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/02—Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
- H04W84/10—Small scale networks; Flat hierarchical networks
- H04W84/12—WLAN [Wireless Local Area Networks]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本公开是关于一种配网方法及装置、电子设备及存储介质。所述方法包括:根据预定存储的第一网络标识,与路由器建立第一连接;基于所述第一连接,从所述路由器获取第二网络标识;基于所述第二网络标识,建立与所述路由器的第二连接,以通过所述第二连接与第二设备进行交互。通过该方法,无需用户手动配网,提升了配网过程的智能性;且用于入网以使得第一设备可与第二设备进行信息交互的第二网络标识通过路由器发送,提升了配网过程的安全性。
The present disclosure relates to a distribution network method and device, an electronic device and a storage medium. The method includes: establishing a first connection with a router according to a predetermined stored first network identifier; acquiring a second network identifier from the router based on the first connection; establishing a connection with the router based on the second network identifier a second connection of the router to interact with the second device through the second connection. Through this method, the user does not need to manually configure the network, which improves the intelligence of the network distribution process; and the second network identifier used for accessing the network so that the first device can exchange information with the second device is sent through the router, which improves the network distribution process. security.
Description
技术领域technical field
本公开涉及物联网技术领域,尤其涉及一种配网方法及装置、电子设备及存储介质。The present disclosure relates to the technical field of the Internet of Things, and in particular, to a network distribution method and device, an electronic device, and a storage medium.
背景技术Background technique
物联网是新一代信息技术的重要组成部分,也是“信息化”时代的重要发展阶段。顾名思义,物联网就是物物相连的互联网。这有两层意思:其一,物联网的核心和基础仍然是互联网,是在互联网基础上的延伸和扩展的网络;其二,其用户端延伸和扩展到了任何物品与物品之间,进行信息交换和通信,也就是物物相息。物联网通过智能感知、识别技术与普适计算等通信感知技术,广泛应用于网络的融合中,也因此被称为继计算机、互联网之后世界信息产业发展的第三次浪潮。The Internet of Things is an important part of the new generation of information technology, and it is also an important development stage in the "informationization" era. As the name suggests, the Internet of Things is the Internet of things connected. This has two meanings: First, the core and foundation of the Internet of Things is still the Internet, which is an extended and expanded network based on the Internet; Exchange and communication, that is, things go hand in hand. The Internet of Things is widely used in the integration of networks through communication perception technologies such as intelligent perception, identification technology and ubiquitous computing.
基于物联网技术的发展,出现了各种物联网设备,无线上网(Wireless Fidelity,Wi-Fi)模块已经是物联网设备的标准配置。比如,大部分的智能空调、智能空气净化器都配置了Wi-Fi模块。Based on the development of the Internet of Things technology, various Internet of Things devices have appeared, and the Wireless Fidelity (Wi-Fi) module has become a standard configuration of the Internet of Things devices. For example, most smart air conditioners and smart air purifiers are equipped with Wi-Fi modules.
发明内容SUMMARY OF THE INVENTION
本公开提供一种配网方法及装置、电子设备及存储介质。The present disclosure provides a network distribution method and device, an electronic device and a storage medium.
根据本公开实施例的第一方面,提供一种配网方法,应用于第一设备中,包括:According to a first aspect of the embodiments of the present disclosure, there is provided a network distribution method, which is applied to a first device, including:
根据预定存储的第一网络标识,与路由器建立第一连接;establishing a first connection with the router according to the predetermined stored first network identifier;
基于所述第一连接,从所述路由器获取第二网络标识;obtaining a second network identifier from the router based on the first connection;
基于所述第二网络标识,建立与所述路由器的第二连接,以通过所述第二连接与第二设备进行交互。Based on the second network identification, a second connection with the router is established to interact with a second device through the second connection.
可选的,所述方法还包括:Optionally, the method further includes:
接收无线信号;receive wireless signals;
检测所述无线信号的信号强度是否满足信号强度条件;Detecting whether the signal strength of the wireless signal satisfies the signal strength condition;
所述根据预定存储的第一网络标识,与路由器建立第一连接,包括:The establishing the first connection with the router according to the predetermined stored first network identifier includes:
响应于所述信号强度满足所述信号强度条件,根据所述预定存储的第一网络标识,与所述路由器建立所述第一连接。In response to the signal strength satisfying the signal strength condition, the first connection is established with the router according to the predetermined stored first network identifier.
可选的,所述方法还包括:Optionally, the method further includes:
基于所述第一连接与所述路由器协商密钥获得第一密钥和与第一密钥配对使用的第二密钥;Obtaining a first key and a second key paired with the first key based on negotiating a key with the router based on the first connection;
所述基于所述第一连接,从所述路由器获取第二网络标识,包括:The obtaining a second network identifier from the router based on the first connection includes:
基于所述第一连接,接收所述路由器根据所述第一密钥加密后的第二网络标识和密码信息;Based on the first connection, receiving the second network identifier and password information encrypted by the router according to the first key;
所述方法还包括:The method also includes:
利用协商的所述第一密钥或所述第二密钥解密所述加密后的第二网络标识和密码信息。Decrypt the encrypted second network identification and password information using the negotiated first key or the second key.
可选的,所述基于所述第一连接,从所述路由器获取第二网络标识,包括:Optionally, the obtaining a second network identifier from the router based on the first connection includes:
基于所述第一连接,向所述路由器发送设备信息;sending device information to the router based on the first connection;
接收所述路由器基于接收到的配网许可信息而发送的所述第二网络标识;其中,所述配网许可信息是服务器接收到所述路由器发送的所述设备信息后反馈的。The second network identifier sent by the router based on the received network configuration permission information is received; wherein, the network configuration permission information is fed back by the server after receiving the device information sent by the router.
根据本公开实施例的第二方面,提供一种配网方法,应用于路由器中,包括:According to a second aspect of the embodiments of the present disclosure, there is provided a network distribution method, which is applied to a router, including:
根据预定存储的第一网络标识,与第一设备建立第一连接;establishing a first connection with the first device according to the predetermined stored first network identifier;
基于所述第一连接,向所述第一设备发送第二网络标识;sending a second network identifier to the first device based on the first connection;
基于所述第二网络标识,建立与所述第一设备的第二连接,以传输所述第一设备和第二设备之间的交互信息。Based on the second network identification, a second connection with the first device is established to transmit interaction information between the first device and the second device.
可选的,所述根据预定存储的第一网络标识,与第一设备建立第一连接,包括:Optionally, establishing the first connection with the first device according to the predetermined stored first network identifier includes:
响应于接收的无线信号强度满足信号强度条件,与所述第一设备建立所述第一连接。The first connection is established with the first device in response to the received wireless signal strength satisfying a signal strength condition.
可选的,所述基于所述第一连接,向所述第一设备发送第二网络标识,包括:Optionally, the sending a second network identifier to the first device based on the first connection includes:
基于所述第一连接,接收所述第一设备发送的设备信息;Based on the first connection, receive device information sent by the first device;
向连接所述路由器的服务器发送所述设备信息;sending the device information to the server connected to the router;
接收所述服务器根据所述设备信息反馈的配网许可信息;Receive the distribution network license information fed back by the server according to the device information;
根据所述配网许可信息,向所述第一设备发送所述第二网络标识。The second network identifier is sent to the first device according to the network distribution permission information.
可选的,所述方法还包括:Optionally, the method further includes:
基于所述第一连接与所述第一设备协商密钥获得第一密钥和与第一密钥配对使用的第二密钥;Obtaining a first key and a second key paired with the first key by negotiating a key with the first device based on the first connection;
所述基于所述第一连接,向所述第一设备发送第二网络标识,包括:The sending a second network identifier to the first device based on the first connection includes:
基于所述第一连接,向所述第一设备发送利用所述第一密钥加密后的第二网络标识和密码信息;Based on the first connection, sending the second network identifier and password information encrypted with the first key to the first device;
所述基于所述第二网络标识,建立与所述第一设备的所述第二连接,包括:The establishing the second connection with the first device based on the second network identifier includes:
基于解密后的所述第二网络标识和所述密码信息,建立与所述第一设备的所述第二连接;其中,解密后的所述第二网络标识和所述密码信息为所述第一设备利用所述第一密钥或所述第二密钥解密而获得。The second connection with the first device is established based on the decrypted second network identifier and the password information; wherein the decrypted second network identifier and the password information are the first Obtained by a device decrypted using the first key or the second key.
根据本公开实施例的第三方面,提供一种配网方法,应用于服务器中,包括:According to a third aspect of the embodiments of the present disclosure, there is provided a network distribution method, which is applied to a server, including:
接收路由器发送的第一设备的设备信息并转发给第三设备;其中,所述设备信息为所述路由器和所述第一设备基于预定存储的第一网络标识建立第一连接后发送;Receive the device information of the first device sent by the router and forward it to a third device; wherein, the device information is sent after the router and the first device establish a first connection based on a predetermined stored first network identifier;
接收所述第三设备根据所述设备信息发送的设备信息确认指令;receiving a device information confirmation instruction sent by the third device according to the device information;
根据所述设备信息确认指令,向所述路由器发送配网许可信息;其中,所述配网许可信息用于所述路由器向所述第一设备发送第二网络标识,所述第二网络标识用于所述第一设备与所述路由器建立第二连接,以传输所述第一设备和第二设备之间的交互信息。According to the device information confirmation instruction, send network distribution permission information to the router; wherein, the network distribution permission information is used by the router to send a second network identifier to the first device, and the second network identifier is used for A second connection is established between the first device and the router to transmit interaction information between the first device and the second device.
根据本公开实施例的第四方面,提供一种配网装置,应用于第一设备中,包括:According to a fourth aspect of the embodiments of the present disclosure, there is provided a network distribution device, which is applied to the first device and includes:
第一建立模块,配置为根据预定存储的第一网络标识,与路由器建立第一连接;a first establishment module, configured to establish a first connection with the router according to the predetermined stored first network identifier;
第一获取模块,配置为基于所述第一连接,从所述路由器获取第二网络标识;a first obtaining module, configured to obtain a second network identifier from the router based on the first connection;
第二建立模块,配置为基于所述第二网络标识,建立与所述路由器的第二连接,以通过所述第二连接与第二设备进行交互。The second establishing module is configured to establish a second connection with the router based on the second network identifier, so as to interact with the second device through the second connection.
可选的,所述装置还包括:Optionally, the device further includes:
第一接收模块,配置为接收无线信号;a first receiving module, configured to receive wireless signals;
检测模块,配置为检测所述无线信号的信号强度是否满足信号强度条件;a detection module, configured to detect whether the signal strength of the wireless signal satisfies the signal strength condition;
所述第一建立模块,具体配置为响应于所述信号强度满足所述信号强度条件,根据所述预定存储的第一网络标识,与所述路由器建立所述第一连接。The first establishing module is specifically configured to, in response to the signal strength satisfying the signal strength condition, establish the first connection with the router according to the predetermined stored first network identifier.
可选的,所述装置还包括:Optionally, the device further includes:
第一密钥协商模块,配置为基于所述第一连接与所述路由器协商密钥获得第一密钥和与第一密钥配对使用的第二密钥;a first key negotiation module, configured to negotiate a key with the router based on the first connection to obtain a first key and a second key paired with the first key;
第二获取模块,配置为基于所述第一连接,接收所述路由器根据所述第一密钥加密后的第二网络标识和密码信息;a second obtaining module, configured to receive, based on the first connection, the second network identifier and password information encrypted by the router according to the first key;
解密模块,配置为利用所述第一密钥或所述第二密钥解密所述加密后的第二网络标识和密码信息。A decryption module, configured to decrypt the encrypted second network identification and password information by using the first key or the second key.
可选的,所述第一获取模块,具体配置为基于所述第一连接,向所述路由器发送设备信息;接收所述路由器基于接收到的配网许可信息而发送的所述第二网络标识;其中,所述配网许可信息是服务器接收到所述路由器发送的所述设备信息后反馈的。Optionally, the first obtaining module is specifically configured to send device information to the router based on the first connection; and receive the second network identifier sent by the router based on the received network configuration permission information. ; wherein, the network distribution permission information is fed back by the server after receiving the device information sent by the router.
根据本公开实施例的第五方面,提供一种配网装置,应用于路由器中,包括:According to a fifth aspect of the embodiments of the present disclosure, there is provided a network distribution device, which is applied to a router, including:
第三建立模块,配置为根据预定存储的第一网络标识,与第一设备建立第一连接;a third establishment module, configured to establish a first connection with the first device according to the predetermined stored first network identifier;
第一发送模块,配置为基于所述第一连接,向所述第一设备发送第二网络标识;a first sending module, configured to send a second network identifier to the first device based on the first connection;
第四建立模块,配置为基于所述第二网络标识,建立与所述第一设备的第二连接,以传输所述第一设备和第二设备之间的交互信息。The fourth establishing module is configured to establish a second connection with the first device based on the second network identifier, so as to transmit the interaction information between the first device and the second device.
可选的,所述第三建立模块,具体配置为响应于接收的无线信号强度满足信号强度条件,与所述第一设备建立所述第一连接。Optionally, the third establishing module is specifically configured to establish the first connection with the first device in response to the received wireless signal strength satisfying a signal strength condition.
可选的,所述第一发送模块,具体配置为基于所述第一连接,接收所述第一设备发送的设备信息;向连接所述路由器的服务器发送所述设备信息;接收所述服务器根据所述设备信息反馈的配网许可信息;根据所述配网许可信息,向所述第一设备发送所述第二网络标识。Optionally, the first sending module is specifically configured to receive device information sent by the first device based on the first connection; send the device information to a server connected to the router; The network distribution permission information fed back by the device information; according to the network distribution permission information, the second network identifier is sent to the first device.
可选的,所述装置还包括:Optionally, the device further includes:
第二密钥协商模块,配置为基于所述第一连接与所述第一设备协商密钥获得第一密钥和与第一密钥配对使用的第二密钥;A second key negotiation module, configured to negotiate a key with the first device based on the first connection to obtain a first key and a second key paired with the first key;
第二发送模块,配置为基于所述第一连接,向所述第一设备发送利用所述第一密钥加密后的第二网络标识和密码信息;a second sending module, configured to send the second network identifier and password information encrypted with the first key to the first device based on the first connection;
所述第四建立模块,具体配置为基于解密后的所述第二网络标识和所述密码信息,建立与所述第一设备的所述第二连接;其中,解密后的所述第二网络标识和所述密码信息为所述第一设备利用所述第一密钥或所述第二密钥解密而获得。The fourth establishment module is specifically configured to establish the second connection with the first device based on the decrypted second network identifier and the password information; wherein the decrypted second network The identification and the cryptographic information are obtained by the first device decrypting with the first key or the second key.
根据本公开实施例的第六方面,提供一种配网装置,应用于服务器中,包括:According to a sixth aspect of the embodiments of the present disclosure, there is provided a network distribution device, which is applied to a server and includes:
第二接收模块,配置为接收路由器发送的第一设备的设备信息并转发给第三设备;其中,所述设备信息为所述路由器和所述第一设备基于预定存储的第一网络标识建立第一连接后发送;The second receiving module is configured to receive the device information of the first device sent by the router and forward it to the third device; wherein the device information is that the router and the first device establish a first network identifier based on a predetermined stored first network identifier. Send after a connection;
第三接收模块,配置为接收所述第三设备根据所述设备信息发送的设备信息确认指令;a third receiving module, configured to receive a device information confirmation instruction sent by the third device according to the device information;
第三发送模块,配置为根据所述设备信息确认指令,向所述路由器发送配网许可信息;其中,所述配网许可信息用于所述路由器向所述第一设备发送第二网络标识,所述第二网络标识用于所述第一设备与所述路由器建立第二连接,以传输所述第一设备和第二设备之间的交互信息。The third sending module is configured to send network distribution permission information to the router according to the device information confirmation instruction; wherein, the network distribution permission information is used by the router to send the second network identifier to the first device, The second network identifier is used for the first device to establish a second connection with the router to transmit interaction information between the first device and the second device.
根据本公开实施例的第七方面,提供一种电子设备,包括:According to a seventh aspect of the embodiments of the present disclosure, there is provided an electronic device, comprising:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,所述处理器被配置为执行如上述第一方面、第二方面或第三方面中所述的配网方法。Wherein, the processor is configured to execute the network distribution method as described in the first aspect, the second aspect or the third aspect.
根据本公开实施例的第八方面,提供一种存储介质,包括:According to an eighth aspect of the embodiments of the present disclosure, there is provided a storage medium, comprising:
当所述存储介质中的指令由第一设备的处理器执行时,使得第一设备能够执行如上述第一方面中所述的配网方法;或,当所述存储介质中的指令由路由器的处理器执行时,使得路由器能够执行如上述第二方面中所述的配网方法;或,当所述存储介质中的指令由服务器的处理器执行时,使得服务器能够执行如上述第三方面中所述的配网方法。When the instructions in the storage medium are executed by the processor of the first device, the first device is enabled to execute the network distribution method described in the first aspect; or, when the instructions in the storage medium are executed by the router's When executed by the processor, the router can execute the network distribution method described in the second aspect; or, when the instructions in the storage medium are executed by the processor of the server, the server can execute the method described in the third aspect. The described distribution method.
本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
在本公开的实施例中,通过在路由器和第一设备中预定存储第一网络标识,第一设备基于第一网络标识来确定第一设备待连接的目标路由器并建立第一连接,以通过第一连接自动获得第二网络标识用于配网,实现通过路由器中转第一设备和第二设备之间的交互信息,该过程中,无需用户手动操作,因而提升了配网的智能化程度;且,用于配网的第二网络标识基于第一连接,由第一设备从路由器接收,而无需第一设备基于云端广播后接收,因而能提升配网过程中的安全性。In the embodiment of the present disclosure, by pre-storing the first network identifier in the router and the first device, the first device determines the target router to which the first device is to be connected based on the first network identifier and establishes the first connection, so as to pass the first network identifier. One connection automatically obtains the second network identifier for network distribution, and realizes the transfer of interactive information between the first device and the second device through the router. In this process, no manual operation by the user is required, thus improving the intelligence of the distribution network; and , the second network identifier for network distribution is received by the first device from the router based on the first connection, without the need for the first device to receive after broadcast based on the cloud, thus improving the security in the network distribution process.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.
图1是本公开实施例示出的一种配网方法流程图一。FIG. 1 is a flow chart 1 of a network distribution method according to an embodiment of the present disclosure.
图2是本公开实施例示出的一种配网方法流程图二。FIG. 2 is a second flowchart of a network distribution method according to an embodiment of the present disclosure.
图3是本公开实施例示出的一种配网方法流程图三。FIG. 3 is a third flowchart of a network distribution method according to an embodiment of the present disclosure.
图4是本公开实施例中的一种配网方法的交互流程图一。FIG. 4 is an interaction flow chart 1 of a network distribution method in an embodiment of the present disclosure.
图5是本公开实施例中的一种配网方法的交互流程图二。FIG. 5 is a second interaction flowchart of a network distribution method in an embodiment of the present disclosure.
图6是本公开实施例中的一种配网方法的交互流程示例图一。FIG. 6 is an example diagram 1 of an interaction flow of a network distribution method in an embodiment of the present disclosure.
图7是本公开实施例中的一种配网方法中流程示例图。FIG. 7 is an exemplary flowchart of a network distribution method in an embodiment of the present disclosure.
图8是根据一示例性实施例示出的一种配网装置图一。Fig. 8 is Fig. 1 of a network distribution device according to an exemplary embodiment.
图9是根据一示例性实施例示出的一种配网装置图二。FIG. 9 is a second diagram of a network distribution device according to an exemplary embodiment.
图10是根据一示例性实施例示出的一种配网装置图三。Fig. 10 is Fig. 3 of a distribution network device according to an exemplary embodiment.
图11是根据一示例性实施例示出的一种第一设备的框图。Fig. 11 is a block diagram of a first device according to an exemplary embodiment.
图12是根据一示例性实施例示出的一种路由器的框图。Fig. 12 is a block diagram of a router according to an exemplary embodiment.
图13是根据一示例性实施例示出的一种服务器的框图。Fig. 13 is a block diagram of a server according to an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as recited in the appended claims.
图1是本公开实施例示出的一种配网方法流程图一,应用于第一设备中,如图1所示,配网方法包括以下步骤:FIG. 1 is a flow chart 1 of a network distribution method shown in an embodiment of the present disclosure, which is applied to a first device. As shown in FIG. 1 , the network distribution method includes the following steps:
S11、根据预定存储的第一网络标识,与路由器建立第一连接。S11. Establish a first connection with the router according to the predetermined stored first network identifier.
S12、基于第一连接,从路由器获取第二网络标识。S12. Based on the first connection, obtain a second network identifier from the router.
S13、基于第二网络标识,建立与路由器的第二连接,以通过第二连接与第二设备进行交互。S13. Establish a second connection with the router based on the second network identifier, so as to interact with the second device through the second connection.
在本公开的实施例中,第一设备是指需要和其他设备交互信息的物联网设备,包括可自动移动或不可自动移动的智能家居设备等,例如:扫地机器人、智能音箱或智能电视。In the embodiments of the present disclosure, the first device refers to an IoT device that needs to exchange information with other devices, including smart home devices that can move or cannot move automatically, such as a cleaning robot, a smart speaker, or a smart TV.
以物联网设备中包括Wi-Fi模块为例,物联网设备基于Wi-Fi模块和其他设备交互信息。例如,智能音箱基于内置的Wi-Fi模块和管理智能家居设备的手机端交互信息;或,智能音箱基于内置的Wi-Fi模块和智能电视交互信息。Taking the Wi-Fi module included in the IoT device as an example, the IoT device exchanges information with other devices based on the Wi-Fi module. For example, a smart speaker is based on a built-in Wi-Fi module and manages the information on the mobile phone of smart home devices; or, a smart speaker is based on a built-in Wi-Fi module and interacts with a smart TV.
在本公开的实施例中,网络标识包括服务集标识(Service Set Identifier,SSID),SSID用来区分不同的网络。SSID可以是一个局域网的名称,只有设置为名称相同SSID的值的设备间才能在所在的局域网内互相通信。本公开实施例中,第一网络标识可以是第一SSID。In the embodiment of the present disclosure, the network identifier includes a service set identifier (Service Set Identifier, SSID), and the SSID is used to distinguish different networks. The SSID can be the name of a local area network. Only devices with the same SSID name can communicate with each other in the local area network. In this embodiment of the present disclosure, the first network identifier may be the first SSID.
在步骤S11中,预定存储的第一网络标识不仅存储在第一设备中,还存储在路由器中,因此第一设备基于预定存储的第一网络标识即可与路由器建立第一连接,该路由器可理解为目标路由器。In step S11, the predetermined stored first network identifier is not only stored in the first device, but also stored in the router, so the first device can establish a first connection with the router based on the predetermined stored first network identifier, and the router can It is understood as the target router.
在一些实施例中同一厂家或品牌的路由器和设备可预先存储相同的第一网络标识。In some embodiments, routers and devices of the same manufacturer or brand may pre-store the same first network identifier.
需要说明的是,第一网络标识可以是在第一设备和路由器出厂前,事先烧录到第一设备和路由器中的信息。作为实现信息中转的路由器,预定存储于其中的第一网络标识可隐藏,即不对外广播,因此除第一设备以外的其他未预先存储该第一网络标识的设备无法搜索到该第一网络标识并基于该第一网络标识连网,也就是对于未预先存储该第一网络标识的设备来说不可见。当然,第一网络标识也可以不隐藏,除第一设备以外的其他设备可通过第一网络标识连网。但需要强调的是,第一网络标识在本公开实施例中的作用主要是为了方便第一设备确定目标路由器,并基于目标路由获取第一设备配网所需的信息。It should be noted that the first network identifier may be information pre-programmed into the first device and the router before the first device and the router leave the factory. As a router that implements information transfer, the first network identifier that is scheduled to be stored therein can be hidden, that is, not broadcast to the outside world. Therefore, other devices other than the first device that do not pre-store the first network identifier cannot search for the first network identifier. The network is connected based on the first network identifier, that is, it is invisible to devices that do not store the first network identifier in advance. Of course, the first network identifier may not be hidden, and other devices other than the first device may be connected to the network through the first network identifier. However, it should be emphasized that the role of the first network identifier in the embodiment of the present disclosure is mainly to facilitate the first device to determine the target router, and to obtain the information required by the first device for network configuration based on the target route.
在一种实施例中,第一设备的配网方法还包括:In an embodiment, the network distribution method for the first device further includes:
接收无线信号;receive wireless signals;
检测无线信号的信号强度是否满足信号强度条件;Detect whether the signal strength of the wireless signal meets the signal strength condition;
步骤S11包括:Step S11 includes:
响应于信号强度满足信号强度条件,根据预定存储的第一网络标识,与路由器建立第一连接。In response to the signal strength satisfying the signal strength condition, the first connection is established with the router according to the predetermined stored first network identifier.
其中,满足信号强度条件包括:第一设备接收到的无线信号的信号强度最大或信号强度大于预定强度阈值。Wherein, satisfying the signal strength condition includes: the signal strength of the wireless signal received by the first device is the maximum or the signal strength is greater than a predetermined strength threshold.
在该实施例中,第一设备可能会接收到由不同路由器广播的无线信号,而不同路由器还可能具有相同的第一网络标识,因此第一设备在确定要连接的路由器时,可根据信号强度和预定存储的第一网络标识共同决定待连接的目标路由器。In this embodiment, the first device may receive wireless signals broadcast by different routers, and different routers may also have the same first network identifier. Therefore, when determining the router to be connected to, the first device can The target router to be connected is determined together with the predetermined stored first network identifier.
以智能家居场景,第一设备是智能音箱为例,通常智能音箱需要连接位于同一家居环境中的路由器,智能音箱和该路由器的距离,相对于智能音箱和其他家居环境中的路由器的距离较近,因此第一设备接收的位于同一家居环境中的路由器发送的无线信号的信号强度会相对于非同一家居环境中的路由器发送的无线信号的信号强度较大。例如,邻居家也有存储了第一网络标识的路由器,而由于智能音箱与邻居家的距离较远,所以智能音箱接收到的无线信号的强度不会是最大的。因此第一设备选择信号强度最大的无线接入点,再基于预定存储的第一网络标识和路由器连接,能提升配网的正确性。Taking the smart home scenario as an example, the first device is a smart speaker. Usually, a smart speaker needs to be connected to a router located in the same home environment. The distance between the smart speaker and the router is closer than the distance between the smart speaker and routers in other home environments. Therefore, the signal strength of the wireless signal sent by the router located in the same home environment and received by the first device will be greater than the signal strength of the wireless signal sent by the router in a different home environment. For example, the neighbor's house also has a router that stores the first network identifier, and because the smart speaker is far away from the neighbor's house, the strength of the wireless signal received by the smart speaker will not be the greatest. Therefore, the first device selects the wireless access point with the highest signal strength, and then connects with the router based on the predetermined stored first network identifier, which can improve the correctness of the network distribution.
在该实施中,第一设备响应于无线信号强度满足信号强度条件,根据预定存储的第一网络标识,与路由器建立第一连接,包括:In this implementation, in response to the wireless signal strength meeting the signal strength condition, the first device establishes the first connection with the router according to the predetermined stored first network identifier, including:
第一设备响应于无线信号强度满足信号强度条件,根据预定存储的第一网络标识向路由器发送第一连接请求;In response to the wireless signal strength meeting the signal strength condition, the first device sends a first connection request to the router according to the predetermined stored first network identifier;
接收路由器根据第一连接请求分配的互联网协议地址;receiving the Internet Protocol address assigned by the router according to the first connection request;
根据互联网协议地址建立与路由器间的第一连接通道。The first connection channel with the router is established according to the Internet Protocol address.
在该实施例中,第一设备响应于无线信号强度满足信号强度条件,并根据预定存储的第一网络标识向路由器发送第一连接请求后,当路由器确认第一连接请求中所携带的第一网络标识和自身存储的网络标识相同时,则给第一设备分配互联网协议地址(Internet Protocol Address,IP地址),基于该IP地址和路由器建立第一连接通道,即完成和路由器的第一连接。In this embodiment, after the first device sends a first connection request to the router according to the predetermined stored first network identifier in response to the wireless signal strength meeting the signal strength condition, when the router confirms the first connection request carried in the first connection request When the network identifier is the same as the network identifier stored by itself, an Internet Protocol Address (IP address) is allocated to the first device, and a first connection channel is established with the router based on the IP address, that is, the first connection with the router is completed.
在步骤S12中,基于建立的第一连接,第一设备即可从路由器获取第二网络标识。第二网络标识可以是第二SSID,与第一SSID不同。In step S12, based on the established first connection, the first device can obtain the second network identifier from the router. The second network identification may be a second SSID, different from the first SSID.
在一种实施例中,步骤S12包括:In one embodiment, step S12 includes:
基于第一连接,向路由器发送设备信息;Based on the first connection, send device information to the router;
基于接收到的配网许可信息而发送的所述第二网络标识;其中,所述配网许可信息是服务器接收到路由器发送的设备信息后反馈的。The second network identifier is sent based on the received network configuration permission information; wherein, the network configuration permission information is fed back by the server after receiving the device information sent by the router.
在该实施例中,第一设备基于第一连接,向路由器发送设备信息,设备信息至少包括第一设备的设备标识,还可包括设备类型、设备名称等。第一设备将设备信息发送给路由器,以通过路由器将设备信息发送给服务器,由服务器再发送给手机端,以方便用户基于手机端的应用(Application,App)确定第一设备是否是需要配网的设备。在路由器收到手机端的App发送的配网许可信息后,第一设备才会接收到路由器发送的第二网络标识。In this embodiment, the first device sends device information to the router based on the first connection, where the device information at least includes a device identifier of the first device, and may also include a device type, a device name, and the like. The first device sends the device information to the router, so that the device information is sent to the server through the router, and then the server sends the device information to the mobile terminal, so that the user can determine whether the first device needs to be networked based on the application (Application, App) on the mobile terminal. equipment. The first device will not receive the second network identifier sent by the router until the router receives the network configuration permission information sent by the App on the mobile phone.
例如,第一设备是智能音箱,智能音箱基于和路由器建立第一连接后,将自身的设备类型(Model)和设备标识(Device Identifier,DID)传给路由器。路由器将包括设备类型和DID的设备信息上传到管理路由器的服务器,而用户手机中用于管理智能设备的APP中即可显示设备信息。用户基于设备类型和设备标识,确定是自家还没配网的智能音箱时,则基于在APP中的操作,通过服务器向路由器发送配网许可信息,路由器在收到配网许可信息之后再发送第二网络标识。For example, the first device is a smart speaker, and after establishing the first connection with the router, the smart speaker transmits its own device type (Model) and device identifier (Device Identifier, DID) to the router. The router uploads the device information including the device type and DID to the server that manages the router, and the device information can be displayed in the APP used to manage the smart device in the user's mobile phone. When the user determines that it is a smart speaker that has not yet been configured based on the device type and device identification, based on the operation in the APP, the server sends the network configuration permission information to the router, and the router sends the first network configuration permission information after receiving the network configuration permission information. 2. Network ID.
可以理解的是,在该实施例中,第一设备基于第一连接,向路由器发送设备信息,以通过路由器将设备信息上传到服务器以使用户确认,在接收到服务器的配网许可信息后才会收到路由器的第二网络标识,通过基于用户参与的配网认证的过程,提升了配网的安全性。It can be understood that, in this embodiment, the first device sends device information to the router based on the first connection, so as to upload the device information to the server through the router for confirmation by the user, and only after receiving the network distribution permission information from the server. The second network identifier of the router will be received, and the security of the distribution network will be improved through the process of network distribution authentication based on user participation.
在步骤S13中基于第二网络标识,第一设备即可和路由器建立第二连接,并基于第二连接通过路由器,与第二设备进行交互。In step S13, based on the second network identifier, the first device can establish a second connection with the router, and interact with the second device through the router based on the second connection.
需要说明的是,在本公开的实施例中,不同于第一网络标识主要用于第一设备确定目标路由器,并基于目标路由获得第一设备配网所需的配网信息,该配网信息至少包括第二网络标识。第二网络标识主要用于第一设备连接所确定的目标路由器所支持的网络,以能通过目标路由器实现和其他设备之间交互信息。It should be noted that, in the embodiments of the present disclosure, different from the first network identifier, which is mainly used by the first device to determine the target router, and obtain the network distribution information required by the first device for network distribution based on the target route, the network distribution information At least the second network identifier is included. The second network identifier is mainly used for the first device to connect to the network supported by the determined target router, so that information can be exchanged with other devices through the target router.
其中,第二设备可以是不同于第一设备的智能设备,例如智能手机或智能电视。Wherein, the second device may be a smart device different from the first device, such as a smart phone or a smart TV.
在一种基于软路由实现配网的方法中,智能硬件在通电起机后处于无线访问接入点(Wireless Access Point,AP)模式,而手机处于无线终端(Station,STA)模式,因而手机连接智能硬件的Ap组成局域网,手机与智能硬件建立基于套接字(Socket)接口的通信,将所要连接的路由器的SSID和密码发送给智能硬件,智能硬件收到SSID和密码后切换为无线终端模式,并连接收到的SSID。In a method for network distribution based on soft routing, the smart hardware is in the wireless access point (AP) mode after being powered on, and the mobile phone is in the wireless terminal (Station, STA) mode, so the mobile phone is connected to The AP of the smart hardware forms a local area network. The mobile phone and the smart hardware establish communication based on the socket interface, and send the SSID and password of the router to be connected to the smart hardware. The smart hardware switches to the wireless terminal mode after receiving the SSID and password. , and connect the received SSID.
在基于软路由实现配网的方法中,智能硬件即为本公开的第一设备,手机需要先找到智能硬件的AP,而智能硬件获取的路由器配网信息(SSID和密码)是基于手机用户手动输入到手机并通过手机发送的,且手机在将配网信息发送给智能硬件后还需手动重新切换回路由器的AP。可以理解的是,该过程中,配网的智能性较差。而本公开中,通过在路由器和第一设备中预定存储第一网络标识,基于第一网络标识来确定第一设备待连接的目标路由器并建立第一连接,以通过第一连接自动获得第二网络标识用于配网,实现通过路由器中转第一设备和第二设备之间的交互信息,该过程中,无需用户手动操作,因而提升了配网的智能化程度。In the method for network distribution based on soft routing, the intelligent hardware is the first device of the present disclosure, the mobile phone needs to find the AP of the intelligent hardware first, and the router network distribution information (SSID and password) obtained by the intelligent hardware is based on the manual operation of the mobile phone user. Input to the mobile phone and send it through the mobile phone, and the mobile phone needs to manually switch back to the AP of the router after sending the network configuration information to the smart hardware. It is understandable that in this process, the intelligence of the distribution network is poor. In the present disclosure, the first network identifier is pre-stored in the router and the first device, the target router to which the first device is to be connected is determined based on the first network identifier, and the first connection is established, so as to automatically obtain the second network through the first connection. The network identifier is used for network distribution to realize the transfer of interactive information between the first device and the second device through the router. In this process, manual operation by the user is not required, thus improving the intelligence of the distribution network.
在一种基于一键配置实现配网的方法中,智能设备开机处于监听(monitor)模式,可以抓取空中的广播包。手机连接Wi-Fi路由器,手机App发送带有该路由器经过加密的SSID和密码的用户数据报协议(User Datagram Protocol,UDP)广播包,智能设备的Wi-Fi模块收到经过加密的手机发送的广播包后,解密出来可以连接的SSID和密码,将连接模式从监听模式切换为无线终端模式,主动连接路由器,并连接云端,上报设备状态信息。In a method for network distribution based on one-key configuration, the smart device is turned on in a monitor mode, and can capture broadcast packets in the air. The mobile phone is connected to the Wi-Fi router, the mobile app sends a User Datagram Protocol (UDP) broadcast packet with the encrypted SSID and password of the router, and the Wi-Fi module of the smart device receives the encrypted data sent by the mobile phone. After broadcasting the packet, decrypt the SSID and password that can be connected, switch the connection mode from monitoring mode to wireless terminal mode, actively connect to the router, connect to the cloud, and report device status information.
在基于一键配置实现配网的方法中,智能设备即为本公开的第一设备,由于智能设备开机处于监听模式,所有信息的都要监听,因此智能设备的处理器的负载比较大,可能无法保证配网的成功率,且由于配网信息通过手机APP广播发送,容易被窃取,因此安全性差。而本公开中,用于配网的第二网络标识基于建立的和路由器间的第一连接,由路由器发送,无需第一设备基于云端广播后接收,能提升安全性。In the method for realizing network distribution based on one-key configuration, the smart device is the first device of the present disclosure. Since the smart device is turned on and is in the monitoring mode, all information must be monitored. Therefore, the load on the processor of the smart device is relatively large, which may The success rate of the distribution network cannot be guaranteed, and because the distribution network information is broadcast through the mobile phone APP, it is easy to be stolen, so the security is poor. In the present disclosure, the second network identifier used for network distribution is sent by the router based on the first connection established with the router, and does not need to be received by the first device based on cloud broadcast, which can improve security.
在一种实施例中,第一设备的配网方法还包括:In an embodiment, the network distribution method for the first device further includes:
基于第一连接与路由器协商密钥获得第一密钥和与第一密钥配对使用的第二密钥;negotiating a key with the router based on the first connection to obtain a first key and a second key paired with the first key;
第一设备基于第一连接,从路由器获取第二网络标识,包括:The first device obtains the second network identifier from the router based on the first connection, including:
基于第一连接,接收路由器根据第一密钥加密后的第二网络标识和密码信息;Based on the first connection, receive the second network identifier and password information encrypted by the router according to the first key;
所述方法还包括:The method also includes:
利用第一密钥或第二密钥解密加密后的第二网络标识和密码信息。The encrypted second network identification and password information are decrypted using the first key or the second key.
在该实施例中,第一设备从路由器不仅获取第二网络标识,还获得与第二网络标识匹配的密码信息,第一设备基于第一网络标识和路由器建立连接之后,还可与路由器协商密钥,对待接收的第二网络标识和密码信息进行加密,以进一步提升安全性。第一设备在与路由器协商密钥时,可采用对称加密的方式,那么加密密钥和解密密钥相同,都为第一密钥;还可采用非对称加密的方式,那么加密密钥和解密密钥不相同,第一密钥为加密密钥,第二密钥为解密密钥。本公开实施例对加密方式不做具体限制。In this embodiment, the first device not only obtains the second network identifier from the router, but also obtains password information matching the second network identifier. After establishing a connection with the router based on the first network identifier, the first device can also negotiate a password with the router. key, and encrypt the second network identification and password information to be received, so as to further improve the security. When the first device negotiates the key with the router, it can use the symmetric encryption method, then the encryption key and the decryption key are the same, and both are the first key; the asymmetric encryption method can also be used, then the encryption key and the decryption key are the same. The keys are different, the first key is the encryption key, and the second key is the decryption key. The embodiments of the present disclosure do not specifically limit the encryption method.
相对于一键配置实现配网的方法中,加密密钥和解密密钥为预定存储的密钥,本公开通过路由器和第一设备协商,可协商生成不同的加密密钥和解密密钥,因此,能进一步提升安全性。Compared with the one-key configuration method for network distribution, the encryption key and the decryption key are predetermined stored keys. In the present disclosure, through negotiation between the router and the first device, different encryption keys and decryption keys can be negotiated to generate different encryption keys and decryption keys. , which can further improve security.
可以理解的是,在本公开的实施例中,通过在路由器和第一设备中预定存储第一网络标识,第一设备基于第一网络标识来确定第一设备待连接的目标路由器并建立第一连接,以通过第一连接自动获得第二网络标识用于配网,实现通过路由器中转第一设备和第二设备之间的交互信息,该过程中,无需用户手动操作,因而提升了配网的智能化程度;且,用于配网的第二网络标识基于第一连接,从路由器接收,而无需第一设备基于云端广播后接收,因而能提升配网过程中的安全性。It can be understood that, in the embodiment of the present disclosure, by pre-storing the first network identifier in the router and the first device, the first device determines the target router to which the first device is to be connected and establishes the first network identifier based on the first network identifier. connection, so as to automatically obtain the second network identifier for network distribution through the first connection, and realize the transfer of interactive information between the first device and the second device through the router. In this process, no manual operation by the user is required, thus improving the distribution network. In addition, the second network identifier used for network distribution is received from the router based on the first connection, without the need for the first device to receive after broadcast based on the cloud, thus improving the security in the network distribution process.
图2是本公开实施例示出的一种配网方法流程图二,应用于路由器中,如图2所示,配网方法包括以下步骤:FIG. 2 is a second flow chart of a network distribution method shown in an embodiment of the present disclosure, which is applied to a router. As shown in FIG. 2 , the network distribution method includes the following steps:
S21、根据预定存储的第一网络标识,与第一设备建立第一连接。S21. Establish a first connection with the first device according to the predetermined stored first network identifier.
S22、基于第一连接,向第一设备发送第二网络标识。S22. Based on the first connection, send the second network identifier to the first device.
S23、基于第二网络标识,建立与第一设备的第二连接,以传输第一设备和第二设备之间的交互信息。S23. Based on the second network identifier, establish a second connection with the first device to transmit interaction information between the first device and the second device.
路由器是连接两个或多个网络的硬件设备,在网络间起网关的作用,在不同设备间中转信息。在本公开的实施例中,路由器中事先存储了第一网络标识,第一电子设备中也事先存储了第一网络标识,因此路由器可基于预定存储的第一网络标识与第一设备建立第一连接。A router is a hardware device that connects two or more networks. It acts as a gateway between the networks and transfers information between different devices. In the embodiment of the present disclosure, the router stores the first network identifier in advance, and the first electronic device also stores the first network identifier in advance. Therefore, the router can establish the first network identifier with the first device based on the predetermined stored first network identifier. connect.
需要说明的是,预定存储于路由器中的第一网络标识可隐藏,即不对外广播,因此除第一设备以外的其他设备无法搜索到第一网络标识并基于第一网络标识连网。当然,第一网络标识也可以不隐藏,除第一设备以外的其他设备可通过第一网络标识连网。但需要强调的是,第一网络标识在本公开实施例中的作用主要是为了方便路由器给第一设备提供配网所需的信息。It should be noted that the first network identifier predetermined to be stored in the router can be hidden, that is, not broadcast to the outside world, so other devices other than the first device cannot search for the first network identifier and connect to the network based on the first network identifier. Of course, the first network identifier may not be hidden, and other devices other than the first device may be connected to the network through the first network identifier. However, it should be emphasized that the role of the first network identifier in the embodiment of the present disclosure is mainly to facilitate the router to provide the first device with information required for network distribution.
在一种实施例中,路由器的配网方法还包括:In one embodiment, the method for configuring a router's network further includes:
响应于接收的无线信号强度满足信号强度条件,与第一设备建立第一连接。A first connection is established with the first device in response to the received wireless signal strength satisfying the signal strength condition.
在该实施例中,路由器和第一设备基于预定协议进行通信,路由器也会接收由第一设备发送的无线信号,当路由器判断无线信号的强度满足信号强度条件时,才与第一设备建立第一连接。In this embodiment, the router communicates with the first device based on a predetermined protocol, and the router also receives the wireless signal sent by the first device. When the router determines that the strength of the wireless signal satisfies the signal strength condition, it establishes the first device with the first device. a connection.
在该实施例中,路由器可能会接收到不同设备的连接请求信号,而不同设备的连接请求信号中还可能携带有相同的第一网络标识,因此路由器在确定允许接入的第一设备时,可根据信号强度和预定存储的第一网络标识共同决定待连接的第一设备。当然,为减少路由器确定第一设备的过程,路由器中也可隐藏第一网络标识。In this embodiment, the router may receive connection request signals from different devices, and the connection request signals of different devices may also carry the same first network identifier. Therefore, when the router determines the first device that is allowed to access, The first device to be connected may be jointly determined according to the signal strength and the predetermined stored first network identifier. Certainly, in order to reduce the process of determining the first device by the router, the first network identifier may also be hidden in the router.
在该实施中,路由器响应于接收的无线信号强度满足信号强度条件,与第一设备建立第一连接,包括:In this implementation, the router establishes the first connection with the first device in response to the received wireless signal strength satisfying the signal strength condition, including:
响应于无线信号强度满足信号强度条件,接收第一设备根据预定存储的第一网络标识发送的第一连接请求;In response to the wireless signal strength meeting the signal strength condition, receiving a first connection request sent by the first device according to the predetermined stored first network identifier;
根据第一连接请求,为第一设备分配互联网协议地址;assigning an internet protocol address to the first device according to the first connection request;
根据互联网协议地址建立与第一设备间的第一连接通道。Establish a first connection channel with the first device according to the Internet Protocol address.
在一种实施例中,步骤S22包括:In one embodiment, step S22 includes:
基于第一连接,接收第一设备发送的设备信息;Based on the first connection, receive device information sent by the first device;
向连接路由器的服务器发送设备信息;Send device information to the server connected to the router;
接收服务器根据设备信息反馈的配网许可信息;Receive the distribution network license information fed back by the server according to the device information;
根据配网许可信息,向第一设备发送第二网络标识。According to the distribution network permission information, the second network identifier is sent to the first device.
在该实施例中,路由器会接收到第一设备传来的设备信息,并将设备信息发送给服务器,由服务器再发送给手机端,以方便用户基于手机端的App确定第一设备是否是需要配网的设备,路由器在收到服务器反馈的配网许可信息后,才向第一设备发送第二网络标识。In this embodiment, the router will receive the device information from the first device, and send the device information to the server, which will then send it to the mobile phone, so that the user can determine whether the first device needs to be configured based on the App on the mobile phone. The router sends the second network identifier to the first device only after receiving the network distribution permission information fed back by the server.
可以理解的是,在该实施例中,路由器基于第一连接接收第一设备的设备信息,并上传到服务器以使用户确认,在接收到服务器的配网许可信息后才向第一设备发送第二网络标识,通过基于用户参与的配网认证的过程,提升了配网的安全性。It can be understood that, in this embodiment, the router receives the device information of the first device based on the first connection, uploads it to the server for confirmation by the user, and sends the first device to the first device only after receiving the network distribution permission information from the server. Second, the network identification improves the security of the distribution network through the process of distribution network authentication based on user participation.
在一种实施例中,路由器的配网方法还包括:In one embodiment, the method for configuring a router's network further includes:
基于第一连接与第一设备协商密钥获得第一密钥和与第一密钥配对使用的第二密钥;Negotiating a key with the first device based on the first connection to obtain a first key and a second key paired with the first key;
所述基于第一连接,向第一设备发送第二网络标识,包括:The sending the second network identifier to the first device based on the first connection includes:
基于第一连接,向第一设备发送利用第一密钥加密后的第二网络标识和密码信息;Based on the first connection, sending the second network identifier and password information encrypted with the first key to the first device;
所述基于第二网络标识,建立与第一设备的第二连接,包括:The establishing a second connection with the first device based on the second network identifier includes:
基于解密后的第二网络标识和密码信息,建立与第一设备的第二连接;其中,解密后的第二网络标识和密码信息为第一设备利用协商的第一密钥或第二密钥解密而获得。Establish a second connection with the first device based on the decrypted second network identifier and password information; wherein the decrypted second network identifier and password information are the first key or second key negotiated by the first device using obtained by decryption.
在该实施例中,路由器不仅向第一设备发送第二网络标识,还发送与第二网络标识匹配的密码信息,基于第一网络标识和第一设备建立连接之后,还可与第一设备协商密钥,对待发送的第二网络标识和密码信息进行加密,以进一步提升安全性。In this embodiment, the router not only sends the second network identifier to the first device, but also sends password information matching the second network identifier. After establishing a connection with the first device based on the first network identifier, the router can also negotiate with the first device. The encryption key is used to encrypt the second network identification and password information to be sent, so as to further improve the security.
可以理解的是,在本公开的实施例中,通过在路由器和第一设备中预定存储第一网络标识,路由器基于第一网络标识来和第一设备建立第一连接,以通过第一连接发送第二网络标识给第一设备配网,并中转第一设备和第二设备之间的交互信息。该过程中,无需用户手动操作,因而提升了配网的智能化程度;且,路由器基于第一连接将用于配网的第二网络标识直接发送给第一设备,而无需第一设备基于云端广播后接收,因而能提升配网过程中的安全性。It can be understood that, in the embodiment of the present disclosure, by pre-storing the first network identifier in the router and the first device, the router establishes a first connection with the first device based on the first network identifier, so as to send the data through the first connection. The second network identifier assigns a network to the first device, and relays the interaction information between the first device and the second device. In this process, no manual operation by the user is required, thus improving the intelligence of the distribution network; and the router directly sends the second network identifier for network distribution to the first device based on the first connection, without the need for the first device to be based on the cloud It is received after broadcasting, which can improve the security in the process of distribution network.
图3是本公开实施例示出的一种配网方法流程图三,应用于服务器中,如图3所示,配网方法包括以下步骤:Fig. 3 is a flow chart 3 of a network distribution method shown in an embodiment of the present disclosure, which is applied to a server. As shown in Fig. 3, the network distribution method includes the following steps:
S31、接收路由器发送的第一设备的设备信息并转发给第三设备;其中,设备信息为路由器和第一设备基于预定存储的第一网络标识建立第一连接后发送。S31: Receive the device information of the first device sent by the router and forward it to the third device; wherein the device information is sent after the router and the first device establish a first connection based on a predetermined stored first network identifier.
S32、接收第三设备根据设备信息发送的设备信息确认指令。S32: Receive a device information confirmation instruction sent by the third device according to the device information.
S33、根据设备信息确认指令,向路由器发送配网许可信息;其中,配网许可信息用于路由器向所述第一设备发送第二网络标识,第二网络标识用于第一设备与路由器建立第二连接,以传输第一设备和第二设备之间的交互信息。S33. Send the network distribution permission information to the router according to the device information confirmation instruction; wherein, the network distribution permission information is used by the router to send the second network identifier to the first device, and the second network identifier is used by the first device and the router to establish the first network identifier. The second connection is used to transmit the interaction information between the first device and the second device.
在该实施例中,服务器参与配网过程,第三设备包括手机,服务器在接收到路由器发送的设备信息后,将设备信息发送给手机端,以方便用户基于手机端的应用确定第一设备是否是需要配网的设备。服务器在收到手机端的应用发送的确认消息后,会向路由器发送配网许可信息,以让路由器向第一设备发送第二网络标识,实现配网。In this embodiment, the server participates in the network distribution process, and the third device includes a mobile phone. After receiving the device information sent by the router, the server sends the device information to the mobile phone, so as to facilitate the user to determine whether the first device is a mobile phone based on the application on the mobile phone. Equipment that needs to be networked. After receiving the confirmation message sent by the application on the mobile phone, the server will send the network distribution permission information to the router, so that the router can send the second network identifier to the first device to realize network distribution.
图4是本公开实施例中的一种配网方法的交互流程图一,如图4所示,应用于第一设备和路由器中的配网方法包括如下步骤:FIG. 4 is an interaction flow chart 1 of a network distribution method in an embodiment of the present disclosure. As shown in FIG. 4 , the network distribution method applied to the first device and the router includes the following steps:
S41、第一设备根据预定存储的第一网络标识,与路由器建立第一连接。S41. The first device establishes a first connection with the router according to the predetermined stored first network identifier.
S42、路由器向第一设备发送第二网络标识。S42. The router sends the second network identifier to the first device.
S43、第一设备基于第二网络标识,建立与路由器的第二连接,以通过第二连接与第二设备进行交互。S43. The first device establishes a second connection with the router based on the second network identifier, so as to interact with the second device through the second connection.
可以理解的是,在本公开的实施例中,通过在路由器和第一设备中预定存储第一网络标识,路由器和第一设备基于第一网络标识来建立第一连接,以使得路由器通过第一连接发送第二网络标识给第一设备配网,并中转第一设备和第二设备之间的交互信息。该过程中,无需用户手动操作,因而提升了配网的智能化程度;且,用于配网的第二网络标识是由路由器直接发送给第一设备,而无需第一设备基于云端广播后接收,因而能提升配网过程中的安全性。It can be understood that, in the embodiment of the present disclosure, by pre-storing the first network identifier in the router and the first device, the router and the first device establish the first connection based on the first network identifier, so that the router passes the first network identifier. The connection sends the second network identifier to the first device for network configuration, and relays the interaction information between the first device and the second device. In this process, there is no need for manual operation by the user, thus improving the intelligence of the distribution network; and the second network identifier used for the distribution network is directly sent by the router to the first device, without the need for the first device to receive it after broadcasting based on the cloud , which can improve the security in the distribution network process.
图5是本公开实施例中的一种配网方法的交互流程图二,如图5所示,应用于第一设备、路由器和服务器中的配网方法包括如下步骤:FIG. 5 is an interaction flow chart 2 of a network distribution method in an embodiment of the present disclosure. As shown in FIG. 5 , the network distribution method applied to the first device, the router, and the server includes the following steps:
S51、第一设备根据预定存储的第一网络标识,与路由器建立第一连接。S51. The first device establishes a first connection with the router according to the predetermined stored first network identifier.
S52、第一设备基于第一连接将设备信息发送给路由器。S52. The first device sends the device information to the router based on the first connection.
S53、路由器将设备信息发送给服务器。S53, the router sends the device information to the server.
S54、服务器根据设备信息向路由器发送配网许可信息。S54, the server sends the network distribution permission information to the router according to the device information.
S55、路由器根据配网许可信息向第一设备发送第二网络标识。S55. The router sends the second network identifier to the first device according to the network distribution permission information.
S56、第一设备基于第二网络标识,建立与路由器的第二连接,以通过第二连接与第二设备进行交互。S56. The first device establishes a second connection with the router based on the second network identifier, so as to interact with the second device through the second connection.
可以理解的是,在本公开的实施例中,通过在路由器和第一设备中预定存储第一网络标识,路由器和第一设备基于第一网络标识来建立第一连接,且服务器参与配网过程,会向路由器发送配网许可信息,以让路由器接收到配网许可信息后基于第一连接向第一设备发送第二网络标识,实现配网。该过程中,无需用户手动操作,因而提升了配网的智能化程度;且,用于配网的第二网络标识是由路由器直接发送给第一设备,而无需第一设备基于云端广播后接收,云端仅参与第一设备的确认,因而能提升配网过程中的安全性。It can be understood that, in the embodiment of the present disclosure, by pre-storing the first network identifier in the router and the first device, the router and the first device establish the first connection based on the first network identifier, and the server participates in the network distribution process. , the network configuration permission information will be sent to the router, so that the router will send the second network identifier to the first device based on the first connection after receiving the network configuration permission information, so as to realize the network configuration. In this process, there is no need for manual operation by the user, thus improving the intelligence of the distribution network; and the second network identifier used for the distribution network is directly sent by the router to the first device, without the need for the first device to receive it after broadcasting based on the cloud , the cloud only participates in the confirmation of the first device, which can improve the security in the distribution network process.
图6是本公开实施例中的一种配网方法的交互流程示例图一,如图6所示,应用于第一设备、路由器和服务器中的配网方法包括如下步骤:FIG. 6 is an example diagram of an interaction flow of a network distribution method in an embodiment of the present disclosure. As shown in FIG. 6 , the network distribution method applied to the first device, the router, and the server includes the following steps:
S61、第一设备基于隐藏SSID连接路由器。S61. The first device connects to the router based on the hidden SSID.
在该实施例中,隐藏SSID即第一网络标识。In this embodiment, the SSID, that is, the first network identifier, is hidden.
S62、第一设备将设备类型和设备标识发送给路由器。S62. The first device sends the device type and the device identifier to the router.
在该实施例中,设备类型和设备标识即属于第一设备的设备信息。In this embodiment, the device type and the device identifier are device information belonging to the first device.
S63、路由器将设备类型和设备标识发送给服务器。S63, the router sends the device type and the device identifier to the server.
S64、服务器接收用户的设备信息确认指令,并向路由器发送配网许可信息。S64, the server receives the device information confirmation instruction of the user, and sends the network distribution permission information to the router.
S65、路由器和第一设备协商密钥。S65, the router and the first device negotiate a key.
S66、路由器将工作SSID和密码加密发送给第一设备。S66, the router encrypts the working SSID and password to the first device.
在该实施例中,工作SSID即第二网络标识,密码即是与第二网络标识匹配的密码信息。In this embodiment, the working SSID is the second network identifier, and the password is password information matching the second network identifier.
S67、第一设备连接工作SSID,向服务器发送设备信息,完成绑定。S67. The first device connects to the working SSID, sends device information to the server, and completes the binding.
第一设备连接工作SSID,向服务器发送设备信息,即通过路由器实现信息交互。The first device is connected to the working SSID, and sends device information to the server, that is, information exchange is realized through the router.
可以理解的是,在本公开的实施例中,通过在路由器和第一设备中预定存储的隐藏SSID,路由器和第一设备基于隐藏SSID来建立第一连接,且服务器参与配网过程,会向路由器发送配网许可信息,以让路由器接收到配网许可信息后基于第一连接向第一设备发送工作SSID,实现配网。该过程中,无需用户手动操作,因而提升了配网的智能化程度;且,用于配网的第二网络标识是由路由器直接发送给第一设备,而无需第一设备基于云端的广播而接收,云端仅参与第一设备的确认,因而能提升配网过程中的安全性。It can be understood that, in the embodiment of the present disclosure, through the hidden SSID pre-stored in the router and the first device, the router and the first device establish the first connection based on the hidden SSID, and the server participates in the network distribution process, and will send a message to the router and the first device. The router sends the network distribution permission information, so that the router sends the working SSID to the first device based on the first connection after receiving the network distribution permission information, so as to realize the network distribution. In this process, there is no need for manual operation by the user, thus improving the intelligence of the distribution network; and, the second network identifier used for the distribution network is directly sent by the router to the first device, without the need for the first device to be broadcast based on the cloud. After receiving, the cloud only participates in the confirmation of the first device, which can improve the security in the process of distribution network.
图7是本公开实施例中的一种配网方法的流程示例图,如图7所示,应用于第一设备、路由器和服务器中的配网方法包括如下步骤:FIG. 7 is an exemplary flowchart of a network distribution method in an embodiment of the present disclosure. As shown in FIG. 7 , the network distribution method applied to the first device, the router, and the server includes the following steps:
S71、第一设备连接隐藏SSID。S71. The first device connects to hide the SSID.
在该实施例中,隐藏SSID即第一网络标识。In this embodiment, the SSID, that is, the first network identifier, is hidden.
S72、第一设备获取路由器分配的互联网协议地址。S72. The first device obtains the Internet Protocol address allocated by the router.
S73、第一设备将设备类型和设备标识发送给路由器。S73. The first device sends the device type and the device identifier to the router.
在该实施例中,设备类型和设备标识即属于第一设备的设备信息。In this embodiment, the device type and the device identifier are device information belonging to the first device.
S74、路由器将设备类型和设备标识上报给手机。S74, the router reports the device type and the device identification to the mobile phone.
S75、手机根据设备类型和设备标识接收确认是否配网的信息,若是,执行步骤S76A;若否,执行步骤S76B。S75. The mobile phone receives the information confirming whether to configure the network according to the device type and the device identifier. If yes, go to step S76A; if not, go to step S76B.
在该实施例中,手机和服务器进行连接,手机中安装有应用,手机应用基于服务器的支持而执行操作。手机应用接收到确认配网的信息后,会将信息同步到服务器,服务器将配网许可信息发送给路由器。In this embodiment, the mobile phone is connected to the server, an application is installed in the mobile phone, and the mobile phone application performs operations based on the support of the server. After receiving the information confirming the network distribution, the mobile application will synchronize the information to the server, and the server will send the network distribution permission information to the router.
S76A、路由器和第一设备协商密钥,继续执行步骤S77。S76A, the router and the first device negotiate a key, and continue to step S77.
S76B、等待接收确认是否配网的信息。S76B, waiting to receive information confirming whether to configure the network.
S77、路由器将工作SSID和密码加密发送给第一设备。S77, the router encrypts the working SSID and password to the first device.
在该实施例中,工作SSID即第二网络标识,密码即是与第二网络标识匹配的密码信息。In this embodiment, the working SSID is the second network identifier, and the password is password information matching the second network identifier.
S78、第一设备连接工作SSID,向服务器发送设备信息,完成绑定。S78. The first device connects to the working SSID, sends device information to the server, and completes the binding.
可以理解的是,在本公开的实施例中,通过在路由器和第一设备中预定存储的隐藏SSID,路由器和第一设备基于隐藏SSID来建立第一连接,且服务器参与配网过程,会向路由器发送配网许可信息,以让路由器接收到配网许可信息后基于第一连接向第一设备发送工作SSID,实现配网。该过程中,无需用户手动操作,因而提升了配网的智能化程度;且,用于配网的第二网络标识是由路由器直接发送给第一设备,而无需第一设备基于云端的广播而接收,云端仅参与第一设备的确认,因而能提升配网过程中的安全性。It can be understood that, in the embodiment of the present disclosure, through the hidden SSID pre-stored in the router and the first device, the router and the first device establish the first connection based on the hidden SSID, and the server participates in the network distribution process, and will send a message to the router and the first device. The router sends the network distribution permission information, so that the router sends the working SSID to the first device based on the first connection after receiving the network distribution permission information, so as to realize the network distribution. In this process, there is no need for manual operation by the user, thus improving the intelligence of the distribution network; and, the second network identifier used for the distribution network is directly sent by the router to the first device, without the need for the first device to be broadcast based on the cloud. After receiving, the cloud only participates in the confirmation of the first device, which can improve the security in the process of distribution network.
图8是根据一示例性实施例示出的一种配网装置图一,应用于第一设备中,参照图8,该配网装置包括:FIG. 8 is a diagram 1 of a network distribution device according to an exemplary embodiment, which is applied to a first device. Referring to FIG. 8 , the network distribution device includes:
第一建立模块101,配置为根据预定存储的第一网络标识,与路由器建立第一连接;The first establishment module 101 is configured to establish a first connection with the router according to the predetermined stored first network identifier;
第一获取模块102,配置为基于所述第一连接,从所述路由器获取第二网络标识;a first obtaining module 102, configured to obtain a second network identifier from the router based on the first connection;
第二建立模块103,配置为基于所述第二网络标识,建立与所述路由器的第二连接以通过所述第二连接与第二设备进行交互。The second establishing module 103 is configured to establish a second connection with the router based on the second network identifier to interact with the second device through the second connection.
可选的,所述装置还包括:Optionally, the device further includes:
第一接收模块104,配置为接收无线信号;The first receiving module 104 is configured to receive wireless signals;
检测模块105,配置为检测所述无线信号的信号强度是否满足信号强度条件;The detection module 105 is configured to detect whether the signal strength of the wireless signal satisfies the signal strength condition;
所述第一建立模块101,具体配置为响应于所述信号强度满足所述信号强度条件,根据所述预定存储的第一网络标识,与所述路由器建立所述第一连接。The first establishing module 101 is specifically configured to, in response to the signal strength satisfying the signal strength condition, establish the first connection with the router according to the predetermined stored first network identifier.
可选的,所述装置还包括:Optionally, the device further includes:
第一密钥协商模块106,配置为基于所述第一连接与所述路由器协商密钥获得第一密钥和与第一密钥配对使用的第二密钥;a first key negotiation module 106, configured to negotiate a key with the router based on the first connection to obtain a first key and a second key paired with the first key;
第二获取模块107,配置为基于所述第一连接,接收所述路由器根据所述第一密钥加密后的第二网络标识和密码信息;The second obtaining module 107 is configured to receive, based on the first connection, the second network identifier and password information encrypted by the router according to the first key;
解密模块108,配置为利用所述第一密钥或所述第二密钥解密所述加密后的第二网络标识和密码信息。The decryption module 108 is configured to decrypt the encrypted second network identification and password information by using the first key or the second key.
可选的,所述第一获取模块102,具体配置为基于所述第一连接,向所述路由器发送设备信息;接收所述路由器基于接收到的配网许可信息而发送的所述第二网络标识;其中,所述配网许可信息是服务器接收到所述路由器发送的所述设备信息后反馈的。Optionally, the first obtaining module 102 is specifically configured to send device information to the router based on the first connection; receive the second network sent by the router based on the received network configuration permission information. Wherein, the network distribution license information is fed back by the server after receiving the device information sent by the router.
图9是根据一示例性实施例示出的一种配网装置图二,应用于路由器中,参照图9,该配网装置包括:Fig. 9 shows Fig. 2 of a network distribution device according to an exemplary embodiment, which is applied to a router. Referring to Fig. 9, the network distribution device includes:
第三建立模块201,配置为根据预定存储的第一网络标识,与第一设备建立第一连接;The third establishment module 201 is configured to establish a first connection with the first device according to the predetermined stored first network identifier;
第一发送模块202,配置为基于所述第一连接,向所述第一设备发送第二网络标识;a first sending module 202, configured to send a second network identifier to the first device based on the first connection;
第四建立模块203,配置为基于所述第二网络标识,建立与所述第一设备的第二连接,以传输所述第一设备和第二设备之间的交互信息。The fourth establishing module 203 is configured to establish a second connection with the first device based on the second network identifier, so as to transmit the interaction information between the first device and the second device.
可选的,所述第三建立模块201,具体配置为响应于接收的无线信号强度满足信号强度条件,与所述第一设备建立所述第一连接。Optionally, the third establishing module 201 is specifically configured to establish the first connection with the first device in response to the received wireless signal strength satisfying a signal strength condition.
可选的,所述第一发送模块202,具体配置为基于所述第一连接,接收所述第一设备发送的设备信息;向连接所述路由器的服务器发送所述设备信息;接收所述服务器根据所述设备信息反馈的配网许可信息;根据所述配网许可信息,向所述第一设备发送所述第二网络标识。Optionally, the first sending module 202 is specifically configured to, based on the first connection, receive device information sent by the first device; send the device information to a server connected to the router; receive the server According to the network distribution permission information fed back by the device information; and according to the network distribution permission information, send the second network identifier to the first device.
可选的,所述装置还包括:Optionally, the device further includes:
第二密钥协商模块204,配置为基于所述第一连接与所述第一设备协商密钥获得第一密钥和与第一密钥配对使用的第二密钥;A second key negotiation module 204, configured to negotiate a key with the first device based on the first connection to obtain a first key and a second key paired with the first key;
第二发送模块205,配置为基于所述第一连接,向所述第一设备发送利用协商的第一密钥加密后的第二网络标识和密码信息;The second sending module 205 is configured to send the second network identifier and password information encrypted with the negotiated first key to the first device based on the first connection;
所述第四建立模块203,具体配置为基于解密后的所述第二网络标识和所述密码信息,建立与所述第一设备的所述第二连接;其中,解密后的所述第二网络标识和所述密码信息为所述第一设备利用所述第一密钥或所述第二密钥解密而获得。The fourth establishment module 203 is specifically configured to establish the second connection with the first device based on the decrypted second network identifier and the password information; wherein the decrypted second The network identifier and the password information are obtained by the first device decrypting with the first key or the second key.
图10是根据一示例性实施例示出的一种配网装置图三,应用于服务器中,参照图10,该配网装置包括:FIG. 10 is a diagram 3 of a network distribution device according to an exemplary embodiment, which is applied to a server. Referring to FIG. 10 , the network distribution device includes:
第二接收模块301,配置为接收路由器发送的第一设备的设备信息并转发给第三设备;其中,所述设备信息为所述路由器和所述第一设备基于预定存储的第一网络标识建立第一连接后发送;The second receiving module 301 is configured to receive the device information of the first device sent by the router and forward it to a third device; wherein, the device information is established by the router and the first device based on a predetermined stored first network identifier Sent after the first connection;
第三接收模块302,配置为接收所述第三设备根据所述设备信息发送的设备信息确认指令;A third receiving module 302, configured to receive a device information confirmation instruction sent by the third device according to the device information;
第三发送模块303,配置为根据所述设备信息确认指令,向所述路由器发送配网许可信息;其中,所述配网许可信息用于所述路由器向所述第一设备发送第二网络标识,所述第二网络标识用于所述第一设备与所述路由器建立第二连接,以传输所述第一设备和第二设备之间的交互信息。The third sending module 303 is configured to send network distribution permission information to the router according to the device information confirmation instruction; wherein, the network distribution permission information is used by the router to send the second network identifier to the first device , the second network identifier is used for the first device to establish a second connection with the router, so as to transmit the interaction information between the first device and the second device.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
图11是根据一示例性实施例示出的一种第一设备的框图。例如,第一设备700可以是智能音箱等。Fig. 11 is a block diagram of a first device according to an exemplary embodiment. For example, the
参照图11,第一设备700可以包括以下一个或多个组件:处理组件702,存储器704,电源组件706,多媒体组件708,音频组件710,输入/输出(I/O)的接口712,传感器组件714,以及通信组件716。11, the
处理组件702通常控制装置700的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件702可以包括一个或多个处理器720来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件702可以包括一个或多个模块,便于处理组件702和其他组件之间的交互。例如,处理组件702可以包括多媒体模块,以方便多媒体组件708和处理组件702之间的交互。The
存储器704被配置为存储各种类型的数据以支持在装置700的操作。这些数据的示例包括用于在装置700上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器704可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件706为装置700的各种组件提供电力。电力组件806可以包括电源管理系统,一个或多个电源,及其他与为装置700生成、管理和分配电力相关联的组件。
多媒体组件708包括在所述装置700和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件708包括一个前置摄像头和/或后置摄像头。当装置700处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件710被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当装置700处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件716发送。在一些实施例中,音频组件710还包括一个扬声器,用于输出音频信号。
I/O接口712为处理组件702和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/
传感器组件714包括一个或多个传感器,用于为装置700提供各个方面的状态评估。例如,传感器组件714可以检测到装置700的打开/关闭状态,组件的相对定位,例如所述组件为装置700的显示器和小键盘,传感器组件714还可以检测装置700或装置700一个组件的位置改变,用户与装置700接触的存在或不存在,装置700方位或加速/减速和装置700的温度变化。传感器组件714可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件714还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件714还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件716被配置为便于装置700和其他设备之间有线或无线方式的通信。装置700可以接入基于通信标准的无线网络,如Wi-Fi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件716经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件716还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置700可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment,
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器704,上述指令可由装置700的处理器720执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as a
一种非临时性计算机可读存储介质,当所述存储介质中的指令由终端的处理器执行时,使得终端能够执行控制方法,所述方法包括:A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a terminal, enabling the terminal to execute a control method, the method comprising:
根据预定存储的第一网络标识,与路由器建立第一连接;establishing a first connection with the router according to the predetermined stored first network identifier;
基于所述第一连接,从所述路由器获取第二网络标识;obtaining a second network identifier from the router based on the first connection;
基于所述第二网络标识,建立与所述路由器的第二连接,以通过所述第二连接与第二设备进行交互。Based on the second network identification, a second connection with the router is established to interact with a second device through the second connection.
图12是根据一示例性实施例示出的一种路由器的框图。参照图12,路由器800包括:处理器801、通信接口802和存储器803,其中Fig. 12 is a block diagram of a router according to an exemplary embodiment. 12, the
处理器801通常控制路由器的总体操作。The
通信接口802可以使路由器通过网络与其他终端或服务器通信。The
存储器803配置为存储由处理器501可执行的指令和应用,还可以缓存待处理器801以及路由器中各模块待处理或已经处理的数据,可以通过闪存(FLASH)或随机访问存储器(Random Access Memory,RAM)实现。The memory 803 is configured to store the instructions and applications executable by the processor 501, and can also cache the data to be processed or processed by each module in the
一种非临时性计算机可读存储介质,当所述存储介质中的指令由路由器的处理器执行时,使得路由器能够执行控制方法,所述方法包括:A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a router, enabling the router to execute a control method, the method comprising:
根据预定存储的第一网络标识,与第一设备建立第一连接;establishing a first connection with the first device according to the predetermined stored first network identifier;
基于所述第一连接,向所述第一设备发送第二网络标识;sending a second network identifier to the first device based on the first connection;
基于所述第二网络标识,建立与所述第一设备的第二连接,以传输所述第一设备和第二设备之间的交互信息。Based on the second network identification, a second connection with the first device is established to transmit interaction information between the first device and the second device.
图13是根据一示例性实施例示出的一种服务器装置的框图。参照图13,装置900包括处理组件922,其进一步包括一个或多个处理器,以及由存储器932所代表的存储器资源,用于存储可由处理组件922的执行的指令,例如应用程序。存储器932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件922被配置为执行指令,以执行上述信息处理方法。Fig. 13 is a block diagram of a server device according to an exemplary embodiment. 13,
装置900还可以包括一个电源组件926被配置为执行装置900的电源管理,一个有线或无线网络接口950被配置为将装置900连接到网络,和一个输入输出(I/O)接口958。装置900可以操作基于存储在存储器932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器932,上述指令可由装置900的处理组件922执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as a
一种非临时性计算机可读存储介质,当所述存储介质中的指令由服务器的处理组件执行时,使得服务器能够执行一种信息处理方法,所述方法包括:A non-transitory computer-readable storage medium, when an instruction in the storage medium is executed by a processing component of a server, enables the server to execute an information processing method, the method comprising:
接收路由器发送的第一设备的设备信息并转发给第三设备;其中,所述设备信息为所述路由器和所述第一设备基于预定存储的第一网络标识建立第一连接后发送;Receive the device information of the first device sent by the router and forward it to a third device; wherein, the device information is sent after the router and the first device establish a first connection based on a predetermined stored first network identifier;
接收第三设备根据所述设备信息发送的设备信息确认指令;receiving a device information confirmation instruction sent by a third device according to the device information;
根据所述设备信息确认指令,向所述路由器发送配网许可信息;其中,所述配网许可信息用于所述路由器向所述第一设备发送第二网络标识,所述第二网络标识用于所述第一设备与所述路由器建立第二连接,以传输所述第一设备和第二设备之间的交互信息。According to the device information confirmation instruction, send network distribution permission information to the router; wherein, the network distribution permission information is used by the router to send a second network identifier to the first device, and the second network identifier is used for A second connection is established between the first device and the router to transmit interaction information between the first device and the second device.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common general knowledge or techniques in the technical field not disclosed by this disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (20)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911121797.XA CN110891299A (en) | 2019-11-15 | 2019-11-15 | Network distribution method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911121797.XA CN110891299A (en) | 2019-11-15 | 2019-11-15 | Network distribution method and device, electronic equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN110891299A true CN110891299A (en) | 2020-03-17 |
Family
ID=69747674
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911121797.XA Pending CN110891299A (en) | 2019-11-15 | 2019-11-15 | Network distribution method and device, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110891299A (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112203339A (en) * | 2020-09-29 | 2021-01-08 | 中移(杭州)信息技术有限公司 | Network distribution method for smart home equipment, smart home equipment and router |
| CN112291100A (en) * | 2020-11-03 | 2021-01-29 | 北京小米移动软件有限公司 | Network distribution method, network distribution device and storage medium |
| CN112351000A (en) * | 2020-10-16 | 2021-02-09 | 深圳Tcl新技术有限公司 | Bidirectional identity authentication method, system, device and storage medium |
| CN114286421A (en) * | 2021-12-22 | 2022-04-05 | 珠海格力电器股份有限公司 | A distribution network method, device, system, electronic device and storage medium |
| WO2022068601A1 (en) * | 2020-09-29 | 2022-04-07 | 华为技术有限公司 | Network repairing method, electronic device, and mobile terminal |
| CN115643565A (en) * | 2021-07-19 | 2023-01-24 | 华为技术有限公司 | A network distribution method and device |
| CN115915115A (en) * | 2022-10-18 | 2023-04-04 | 小米汽车科技有限公司 | Communication network access method, device, vehicle, electronic equipment and storage medium |
| CN116886405A (en) * | 2023-08-03 | 2023-10-13 | 广东九博科技股份有限公司 | Miniaturized packet router and single point access information encryption protection method thereof |
Citations (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104023412A (en) * | 2014-05-23 | 2014-09-03 | 武汉泰睿科技有限公司 | Wireless terminal pairing method and device thereof |
| CN104135728A (en) * | 2014-07-17 | 2014-11-05 | 腾讯科技(深圳)有限公司 | Network connection method and device |
| CN104159226A (en) * | 2014-07-24 | 2014-11-19 | 小米科技有限责任公司 | Network connection method and device |
| CN105376738A (en) * | 2015-09-30 | 2016-03-02 | 小米科技有限责任公司 | Wireless network access method, apparatus and system |
| CN105873179A (en) * | 2016-05-19 | 2016-08-17 | 北京小米移动软件有限公司 | Wireless network accessing method and device |
| WO2016140907A1 (en) * | 2015-03-02 | 2016-09-09 | Qualcomm Incorporated | Mobile access point connection switching |
| CN106100949A (en) * | 2016-08-11 | 2016-11-09 | 安徽健搏信息科技有限公司 | A kind of control system for intelligent home device |
| CN106550259A (en) * | 2016-12-08 | 2017-03-29 | 深圳Tcl数字技术有限公司 | The matching method and system of remote control and TV |
| US20170127467A1 (en) * | 2015-10-29 | 2017-05-04 | Xiaomi Inc. | Method and Device for Establishing Wireless Connection |
| CN107294983A (en) * | 2017-06-30 | 2017-10-24 | 北京小米移动软件有限公司 | Method for connecting network, device, user equipment and terminal |
| CN108174459A (en) * | 2018-02-08 | 2018-06-15 | 深圳市沃特沃德股份有限公司 | Wireless audio devices matching method and wireless audio devices |
| CN108880869A (en) * | 2018-06-01 | 2018-11-23 | 深圳市智博通电子有限公司 | Matching method, system and the wireless bridge device of wireless bridge |
| CN109151010A (en) * | 2018-08-09 | 2019-01-04 | 北京小米移动软件有限公司 | Method for connecting network, device and storage medium |
| CN109462850A (en) * | 2017-09-06 | 2019-03-12 | 九阳股份有限公司 | A kind of network collocating method and smart machine of smart machine |
| CN109819498A (en) * | 2019-01-23 | 2019-05-28 | 欧普照明股份有限公司 | A kind of smart machine, the automatic distribution method and system of smart machine |
-
2019
- 2019-11-15 CN CN201911121797.XA patent/CN110891299A/en active Pending
Patent Citations (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104023412A (en) * | 2014-05-23 | 2014-09-03 | 武汉泰睿科技有限公司 | Wireless terminal pairing method and device thereof |
| CN104135728A (en) * | 2014-07-17 | 2014-11-05 | 腾讯科技(深圳)有限公司 | Network connection method and device |
| CN104159226A (en) * | 2014-07-24 | 2014-11-19 | 小米科技有限责任公司 | Network connection method and device |
| WO2016140907A1 (en) * | 2015-03-02 | 2016-09-09 | Qualcomm Incorporated | Mobile access point connection switching |
| CN105376738A (en) * | 2015-09-30 | 2016-03-02 | 小米科技有限责任公司 | Wireless network access method, apparatus and system |
| US20170127467A1 (en) * | 2015-10-29 | 2017-05-04 | Xiaomi Inc. | Method and Device for Establishing Wireless Connection |
| CN105873179A (en) * | 2016-05-19 | 2016-08-17 | 北京小米移动软件有限公司 | Wireless network accessing method and device |
| CN106100949A (en) * | 2016-08-11 | 2016-11-09 | 安徽健搏信息科技有限公司 | A kind of control system for intelligent home device |
| CN106550259A (en) * | 2016-12-08 | 2017-03-29 | 深圳Tcl数字技术有限公司 | The matching method and system of remote control and TV |
| CN107294983A (en) * | 2017-06-30 | 2017-10-24 | 北京小米移动软件有限公司 | Method for connecting network, device, user equipment and terminal |
| CN109462850A (en) * | 2017-09-06 | 2019-03-12 | 九阳股份有限公司 | A kind of network collocating method and smart machine of smart machine |
| CN108174459A (en) * | 2018-02-08 | 2018-06-15 | 深圳市沃特沃德股份有限公司 | Wireless audio devices matching method and wireless audio devices |
| CN108880869A (en) * | 2018-06-01 | 2018-11-23 | 深圳市智博通电子有限公司 | Matching method, system and the wireless bridge device of wireless bridge |
| CN109151010A (en) * | 2018-08-09 | 2019-01-04 | 北京小米移动软件有限公司 | Method for connecting network, device and storage medium |
| CN109819498A (en) * | 2019-01-23 | 2019-05-28 | 欧普照明股份有限公司 | A kind of smart machine, the automatic distribution method and system of smart machine |
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2022068601A1 (en) * | 2020-09-29 | 2022-04-07 | 华为技术有限公司 | Network repairing method, electronic device, and mobile terminal |
| CN112203339B (en) * | 2020-09-29 | 2022-12-27 | 中移(杭州)信息技术有限公司 | Network distribution method of intelligent household equipment, intelligent household equipment and router |
| CN112203339A (en) * | 2020-09-29 | 2021-01-08 | 中移(杭州)信息技术有限公司 | Network distribution method for smart home equipment, smart home equipment and router |
| CN112351000A (en) * | 2020-10-16 | 2021-02-09 | 深圳Tcl新技术有限公司 | Bidirectional identity authentication method, system, device and storage medium |
| CN112351000B (en) * | 2020-10-16 | 2024-02-09 | 深圳Tcl新技术有限公司 | Bidirectional identity verification method, system, equipment and storage medium |
| CN112291100B (en) * | 2020-11-03 | 2023-09-05 | 北京小米移动软件有限公司 | Network distribution method, network distribution device and storage medium |
| CN112291100A (en) * | 2020-11-03 | 2021-01-29 | 北京小米移动软件有限公司 | Network distribution method, network distribution device and storage medium |
| CN115643565A (en) * | 2021-07-19 | 2023-01-24 | 华为技术有限公司 | A network distribution method and device |
| WO2023001082A1 (en) * | 2021-07-19 | 2023-01-26 | 华为技术有限公司 | Network configuration method and apparatus |
| CN114286421A (en) * | 2021-12-22 | 2022-04-05 | 珠海格力电器股份有限公司 | A distribution network method, device, system, electronic device and storage medium |
| CN115915115A (en) * | 2022-10-18 | 2023-04-04 | 小米汽车科技有限公司 | Communication network access method, device, vehicle, electronic equipment and storage medium |
| CN115915115B (en) * | 2022-10-18 | 2024-02-06 | 小米汽车科技有限公司 | Communication network access method, device, vehicle, electronic equipment and storage medium |
| CN116886405A (en) * | 2023-08-03 | 2023-10-13 | 广东九博科技股份有限公司 | Miniaturized packet router and single point access information encryption protection method thereof |
| CN116886405B (en) * | 2023-08-03 | 2024-01-09 | 广东九博科技股份有限公司 | Miniaturized packet router and single point access information encryption protection method thereof |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110995665B (en) | Network distribution method and device, electronic equipment and storage medium | |
| CN110912880B (en) | Network distribution method and device, electronic equipment and storage medium | |
| CN110891299A (en) | Network distribution method and device, electronic equipment and storage medium | |
| WO2016127667A1 (en) | Device binding method and device | |
| CN110855677B (en) | Distribution network method and device, electronic equipment and storage medium | |
| WO2016041329A1 (en) | Method and device for accessing wireless network | |
| CN106888206B (en) | Key exchange method, device and system | |
| CN106452924B (en) | Method and device for synchronizing wireless network configuration | |
| CN105682253A (en) | Method, device, terminal and computer-readable storage medium for establishing communication | |
| CN113115403B (en) | Method, device, electronic equipment and storage medium for network node to access network | |
| CN105744595B (en) | Access method, apparatus, system and the storage medium of WLAN | |
| CN112202770B (en) | Device networking method and device, device and storage medium | |
| WO2017101508A1 (en) | Routing information transmission method and apparatus | |
| CN112383532B (en) | Device networking method and device, electronic device, storage medium | |
| US10673611B2 (en) | Data transmission method, device, and system | |
| CN105306567B (en) | Method and device for terminal connection | |
| CN114449501A (en) | A networking method, device, system, electronic device and storage medium | |
| CN112512097A (en) | Information processing method and device, electronic equipment and storage medium | |
| CN116155997A (en) | A routing agent method, device, equipment and storage medium | |
| WO2023240575A1 (en) | Relay communication method, communication apparatus, and communication device | |
| CN110784938A (en) | Correlation method, device and storage medium | |
| WO2024044994A1 (en) | Network access method, apparatus, and readable storage medium | |
| CN115426638A (en) | Bluetooth device pairing method and device | |
| CN119865930A (en) | Device connection method, device, electronic device and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200317 |