CN116684216B - Communication method, readable medium and electronic equipment - Google Patents
Communication method, readable medium and electronic equipment Download PDFInfo
- Publication number
- CN116684216B CN116684216B CN202211584529.3A CN202211584529A CN116684216B CN 116684216 B CN116684216 B CN 116684216B CN 202211584529 A CN202211584529 A CN 202211584529A CN 116684216 B CN116684216 B CN 116684216B
- Authority
- CN
- China
- Prior art keywords
- network
- network device
- communication channel
- equipment
- communication
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2803—Home automation networks
- H04L12/2807—Exchanging configuration information on appliance services in a home automation network
Landscapes
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及智能家居领域,特别涉及一种通信方法、可读介质和电子设备。The present application relates to the field of smart home, and in particular to a communication method, a readable medium and an electronic device.
背景技术Background technique
随着居住条件的改善,住宅的房间数量和面积都在不断增大,为了确保在住宅的每个房间中都能接收到较佳的Wi-Fi信号,住户通常会在住宅中设置多个无线路由器,多个无线路由器同时连接至光调制解调器,即,光猫。例如:如图1所示,住宅的卧室A、卧室B和客厅中设置了Wi-Fi路由器100-1、100-2和100-3,Wi-Fi路由器100-1、100-2和100-3同时连接光调制解调器200。当用户分别在卧室A、卧室B和客厅中通过智能设备使用网络时,智能设备可以分别连接Wi-Fi路由器100-1、100-2或者100-3经过光调制解调器200浏览网络。As living conditions improve, the number and area of rooms in a house are constantly increasing. In order to ensure that a better Wi-Fi signal can be received in each room of the house, residents usually install multiple wireless routers in the house, and multiple wireless routers are simultaneously connected to an optical modem, that is, an optical modem. For example: as shown in FIG1 , Wi-Fi routers 100-1, 100-2, and 100-3 are installed in bedroom A, bedroom B, and living room of the house, and Wi-Fi routers 100-1, 100-2, and 100-3 are simultaneously connected to an optical modem 200. When users use the Internet through smart devices in bedroom A, bedroom B, and living room, respectively, the smart devices can respectively connect to Wi-Fi routers 100-1, 100-2, or 100-3 to browse the Internet through optical modem 200.
但是,由于Wi-Fi路由器100-1、100-2或者100-3各自具有不同的网段和服务集标识(Service Set Identifier,SSID)信息,导致Wi-Fi路由器100-1下的智能设备和Wi-Fi路由器100-2的智能设备互相不可见,不能访问,即与不同路由器连接的智能设备无法互相访问。例如:继续参考图1,在卧室A连接到Wi-Fi路由器100-1的平板电脑300访问不了设置于客厅连接在Wi-Fi路由器100-3的打印机400,若用户在卧室A内上网课需要打印资料,则必须将手机300切换至Wi-Fi路由器100-3才能实现打印,可能会造成网课中断,并且操作繁琐,用户体验较差。However, since Wi-Fi routers 100-1, 100-2 or 100-3 each have different network segments and service set identifiers (SSID) information, the smart devices under Wi-Fi router 100-1 and the smart devices of Wi-Fi router 100-2 are invisible to each other and cannot access each other, that is, smart devices connected to different routers cannot access each other. For example: Continuing with Figure 1, the tablet computer 300 connected to Wi-Fi router 100-1 in bedroom A cannot access the printer 400 connected to Wi-Fi router 100-3 in the living room. If the user needs to print materials for online classes in bedroom A, the mobile phone 300 must be switched to Wi-Fi router 100-3 to print, which may cause the online class to be interrupted, and the operation is cumbersome, and the user experience is poor.
发明内容Summary of the invention
本申请的目的在于提供一种通信方法、可读介质和电子设备。The purpose of the present application is to provide a communication method, a readable medium and an electronic device.
本申请的第一方面提供了一种通信方法,包括:A first aspect of the present application provides a communication method, comprising:
第一网络设备以组播的方式发送第一连接消息,其中,第一连接消息包括通信通道标识;The first network device sends a first connection message in a multicast manner, wherein the first connection message includes a communication channel identifier;
第二网络设备接收到第一连接消息,并且第二网络设备确定支持通信通道标识所标识的通信通道,其中,第一网络设备和第二网络设备连接同一网络服务设备;The second network device receives the first connection message, and the second network device determines to support the communication channel identified by the communication channel identifier, wherein the first network device and the second network device are connected to the same network service device;
第二网络设备与第一网络设备之间建立对应通信通道标识的第一通信通道,其中,第一通信通道用于第一网络设备连接的第一用户设备和第二网络设备连接的第二用户设备之间进行通信访问。A first communication channel corresponding to the communication channel identifier is established between the second network device and the first network device, wherein the first communication channel is used for communication access between a first user device connected to the first network device and a second user device connected to the second network device.
即在本申请的实施例中,这里的第一网络设备和第二网络设备可以是设置在住宅的各个房间中的Wi-Fi路由器。网络服务设备可以是设置在住宅的弱电箱内的光调制解调器。第一连接消息可以是第一网络设备通过网络服务设备组播的连接信息,连接信息可以携带第一网络设备的SSID信息以及第一网络设备支持通信通道的信息,即,支持通信通道标识,也就是,第一网络设备支持智能连接的信息。在第二网络设备接收到第一网络设备发送的连接信息,第二网络设备可以解析连接信息,在确定第一网络设备支持通信通道且第二网络设备自身也支持通信通道的情况下,第一网络设备与第二网络设备之间建立连接,用于相互发送安全认证和加密协商对应的信息,建立通信通道。分别连接第一网络设备与第二网络设备的第一用户设备和第二用户设备之间可以互相访问和通信。That is, in an embodiment of the present application, the first network device and the second network device here may be Wi-Fi routers arranged in each room of a residence. The network service device may be an optical modem arranged in a weak current box of a residence. The first connection message may be connection information multicasted by the first network device through the network service device, and the connection information may carry the SSID information of the first network device and the information that the first network device supports the communication channel, that is, the communication channel identification is supported, that is, the information that the first network device supports intelligent connection. When the second network device receives the connection information sent by the first network device, the second network device may parse the connection information, and when it is determined that the first network device supports the communication channel and the second network device itself also supports the communication channel, a connection is established between the first network device and the second network device, for sending information corresponding to security authentication and encryption negotiation to each other, and establishing a communication channel. The first user device and the second user device respectively connected to the first network device and the second network device can access and communicate with each other.
通过本申请实施例提供的通信方法,在住宅中的多个网络设备,如:第一网络设备和第二网络设备之间建立通信通道,设置统一的网段和SSID信息,使得住宅中的多个用户设备(智能设备),如:第一用户设备和第二用户设备,能够接入同一个网段,实现了智能设备之间的相互访问和通信,提高了用户体验;若用户携带智能设备在住宅中移动,智能设备还可以实现从一个网络设无缝切换至另一个网络设备,不会造成智能设备出现网络暂时中断的情况。Through the communication method provided in the embodiment of the present application, a communication channel is established between multiple network devices in a residence, such as a first network device and a second network device, and a unified network segment and SSID information are set, so that multiple user devices (smart devices) in the residence, such as a first user device and a second user device, can access the same network segment, thereby achieving mutual access and communication between smart devices and improving user experience; if a user carries a smart device and moves around the residence, the smart device can also achieve seamless switching from one network device to another, without causing temporary network interruption to the smart device.
在上述第一方面的一种可能的实现中,第一网络设备以组播的方式发送第一连接消息,包括:In a possible implementation of the first aspect, the first network device sends the first connection message in a multicast manner, including:
第一网络设备在网络服务设备对应的网段中以组播的方式发送第一连接消息。The first network device sends the first connection message in a multicast manner in the network segment corresponding to the network service device.
在上述第一方面的一种可能的实现中,第二网络设备接收到第一连接消息,包括:In a possible implementation of the first aspect, the second network device receives the first connection message, including:
第二网络设备在网络服务设备对应的网段中接收到第一连接消息。The second network device receives the first connection message in the network segment corresponding to the network service device.
即在本申请的实施例中,由于网络服务设备为第一网络设备与第二网络设备分配了对应的网段,第二网络设备能够接收到第一网络设备以组播的方式发送第一连接消息。That is, in the embodiment of the present application, since the network service device allocates corresponding network segments to the first network device and the second network device, the second network device can receive the first connection message sent by the first network device in a multicast manner.
在上述第一方面的一种可能的实现中,在第二网络设备符合通信通道标识时,第二网络设备与第一网络设备之间建立通信通道,包括:In a possible implementation of the first aspect, when the second network device matches the communication channel identifier, establishing a communication channel between the second network device and the first network device includes:
在第二网络设备支持通信通道标识对应的通信通道时,第二网络设备与第一网络设备之间完成安全认证和加密协商。When the second network device supports the communication channel corresponding to the communication channel identifier, security authentication and encryption negotiation are completed between the second network device and the first network device.
即在本申请的实施例中,在第一网络设备与第二网络设备之间建立连接后,以第一网络设备为例,安全认证的过程可以包括:第一网络设备发送报文,报文携带第一网络设备的SSID信息;第二网络设备识别出报文携带的SSID信息属于第一网络设备后,生成验证信息;返回给第一网络设备;第一网络设备发送报文并携带验证信息;第二网络设备再次识别出报文携带的验证信息后,确定验证通过。加密协商的过程可以包括:第一网络设备与第二网络设备之间确定都支持的加密方式,例如:WEP(Wired Equivalent Privacy,有线等效保密)等等。That is, in the embodiment of the present application, after the connection is established between the first network device and the second network device, taking the first network device as an example, the process of security authentication may include: the first network device sends a message, and the message carries the SSID information of the first network device; after the second network device identifies that the SSID information carried in the message belongs to the first network device, it generates verification information; returns it to the first network device; the first network device sends a message and carries the verification information; after the second network device identifies the verification information carried in the message again, it determines that the verification is passed. The process of encryption negotiation may include: the first network device and the second network device determine the encryption method that they both support, such as: WEP (Wired Equivalent Privacy), etc.
在上述第一方面的一种可能的实现中,还包括:In a possible implementation of the first aspect, the present invention further includes:
根据第二网络设备与第一网络设备对应的性能参数从第二网络设备与第一网络设备中确定一个目标网络设备,其中,性能参数包括处理器型号、传输速率和系统版本中的至少一种。A target network device is determined from the second network device and the first network device according to performance parameters corresponding to the second network device and the first network device, wherein the performance parameters include at least one of a processor model, a transmission rate, and a system version.
即在本申请的实施例中,在第一网络设备与第二网络设备之间建立了通信通道后,第一网络设备与第二网络设备之间可以根据性能参数,例如:处理器型号,传输速率,系统版本等等,确定一个主网络设备(目标网络设备),也就是,用于同步建立了通信通道的各个网络设备的参数。That is, in an embodiment of the present application, after a communication channel is established between the first network device and the second network device, the first network device and the second network device can determine a main network device (target network device) based on performance parameters, such as processor model, transmission rate, system version, etc., that is, the parameters of each network device that synchronizes the establishment of the communication channel.
在上述第一方面的一种可能的实现中,还包括:In a possible implementation of the first aspect, the present invention further includes:
在目标网络设备为第一网络设备时,基于第一网络设备的设备参数同步更新第二网络设备,其中,设备参数包括SSID信息、密码以及Wi-Fi参数中的至少一种。When the target network device is the first network device, the second network device is synchronously updated based on the device parameters of the first network device, wherein the device parameters include at least one of SSID information, a password, and Wi-Fi parameters.
在上述第一方面的一种可能的实现中,还包括:In a possible implementation of the first aspect, the present invention further includes:
在第二网络设备接入网络服务设备时,第二网络设备以组播的方式发送第二连接消息,其中,第二连接消息携带通信通道标识;When the second network device accesses the network service device, the second network device sends a second connection message in a multicast manner, wherein the second connection message carries a communication channel identifier;
第一网络设备接收到第二连接消息且第二网络设备确定支持通信通道标识所标识的通信通道时,第二网络设备与第一网络设备之间建立通信通道。When the first network device receives the second connection message and the second network device determines that it supports the communication channel identified by the communication channel identifier, a communication channel is established between the second network device and the first network device.
即在本申请的实施例中,对于第二网络设备来说,第一连接消息可以是第二网络设备通过网络服务设备组播的连接信息,连接信息可以携带第二网络设备的SSID信息以及第二网络设备支持通信通道的信息,即,支持通信通道标识,也就是,第二网络设备支持智能连接的信息。在第一网络设备接收到第一网络设备发送的连接信息,第一网络设备可以解析连接信息,在确定第二网络设备支持通信通道且第一网络设备自身也支持通信通道的情况下,第一网络设备与第二网络设备之间建立连接,用于相互发送安全认证和加密协商对应的信息,建立通信通道。That is, in the embodiment of the present application, for the second network device, the first connection message may be the connection information multicasted by the second network device through the network service device, and the connection information may carry the SSID information of the second network device and the information that the second network device supports the communication channel, that is, the communication channel identification is supported, that is, the information that the second network device supports intelligent connection. When the first network device receives the connection information sent by the first network device, the first network device may parse the connection information, and when it is determined that the second network device supports the communication channel and the first network device itself also supports the communication channel, a connection is established between the first network device and the second network device, and the information corresponding to the security authentication and encryption negotiation is sent to each other to establish a communication channel.
第二方面,本申请实施例提供一种通信方法,包括:In a second aspect, an embodiment of the present application provides a communication method, including:
第一网络设备接收连接的第一用户设备向第二用户设备发送的第一指令,其中,第二用户设备连接第二网络设备;The first network device receives a first instruction sent by a connected first user device to a second user device, wherein the second user device is connected to the second network device;
响应于第一指令,第一网络设备将第一指令携带的信息通过与第二网络设备之间的通信通道发送至第二用户设备,其中,第一网络设备和第二网络设备以有线连接方式连接至同一网络服务设备。In response to the first instruction, the first network device sends the information carried in the first instruction to the second user device through the communication channel between the first network device and the second network device, wherein the first network device and the second network device are connected to the same network service device in a wired manner.
即在本申请的实施例中,这里的第一指令可以是第一用户设备向第二用户设备发送的访问和通信的指令。尽管第一用户设备和第二用户设备分别连接第一网络设备和第二网络设备,第一网络设备和第二网络设备之间的参数相同,第一用户设备和第二用户设备之间可以互相访问和通信,数据或者信息可以通过通信通道相互传输。That is, in the embodiment of the present application, the first instruction here may be an access and communication instruction sent by the first user device to the second user device. Although the first user device and the second user device are respectively connected to the first network device and the second network device, the parameters between the first network device and the second network device are the same, the first user device and the second user device can access and communicate with each other, and data or information can be transmitted to each other through the communication channel.
在上述第二方面的一种可能的实现中,包括:In a possible implementation of the second aspect, the method includes:
第一网络设备和第二网络设备之间同步更新设备参数,其中,设备参数包括SSID信息、密码以及Wi-Fi参数中的至少一种。The first network device and the second network device synchronously update device parameters, wherein the device parameters include at least one of SSID information, a password, and Wi-Fi parameters.
在上述第二方面的一种可能的实现中,第一用户设备和第二用户设备位于同一网段中。In a possible implementation of the second aspect, the first user equipment and the second user equipment are located in the same network segment.
本申请的第三方面提供了一种可读介质,其特征在于,可读介质上存储有指令,该指令在电子设备上执行时使电子设备执行第一方面或者第一方面中的任意一种通信方法。A third aspect of the present application provides a readable medium, characterized in that the readable medium stores instructions, which, when executed on an electronic device, enable the electronic device to execute the first aspect or any one of the communication methods in the first aspect.
本申请的第四方面提供了一种电子设备,包括:A fourth aspect of the present application provides an electronic device, including:
存储器,用于存储由电子设备的一个或多个处理器执行的指令,以及a memory for storing instructions to be executed by one or more processors of the electronic device, and
处理器,是电子设备的处理器之一,用于执行第一方面或者第一方面中的任意一种通信方法。The processor is one of the processors of the electronic device, and is used to execute the first aspect or any one of the communication methods in the first aspect.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
图1根据本申请的实施例示出了一种住宅对应的智能网络的场景示意图;FIG1 shows a schematic diagram of a scenario of a smart network corresponding to a residence according to an embodiment of the present application;
图2根据本申请的实施例示出了一种各个智能设备之间的网络连接的场景示意图;FIG2 shows a schematic diagram of a scenario of network connection between various smart devices according to an embodiment of the present application;
图3根据本申请的实施例示出了一种网络设备的硬件结构示意图;FIG3 shows a schematic diagram of a hardware structure of a network device according to an embodiment of the present application;
图4根据本申请的实施例示出了一种网络设备的软件结构示意图;FIG4 shows a schematic diagram of a software structure of a network device according to an embodiment of the present application;
图5根据本申请的实施例示出了一种通信方法的流程示意图;FIG5 is a schematic diagram showing a flow chart of a communication method according to an embodiment of the present application;
图6根据本申请的实施例示出了一种各个智能设备之间的网络连接的场景示意图;FIG6 shows a schematic diagram of a scenario of network connection between various smart devices according to an embodiment of the present application;
图7根据本申请的实施例示出了一种各个智能设备显示的网络连接参数的示意图。FIG. 7 shows a schematic diagram of network connection parameters displayed by various smart devices according to an embodiment of the present application.
具体实施方式Detailed ways
本申请的说明性实施例包括但不限于一种通信方法、可读介质和电子设备。Illustrative embodiments of the present application include, but are not limited to, a communication method, a readable medium, and an electronic device.
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例中的技术方案进行清楚、详尽的描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution in the embodiment of the present application will be described clearly and in detail in conjunction with the accompanying drawings. In the description of the embodiment of the present application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more.
在本申请中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本申请所描述的实施例可以与其它实施例结合。Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
下面对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。Some terms in this application are explained below to facilitate understanding by those skilled in the art.
网段是指一个计算机网络中使用同一物理层设备(路由器,中继器,集线器等)能够直接通讯的一部分网络。A network segment refers to a part of a computer network that can communicate directly using the same physical layer devices (routers, repeaters, hubs, etc.).
应用层协议(application layer protocol)用于运行在不同电子设备的系统上的应用程序进程相互传递报文。The application layer protocol is used for application programs running on systems of different electronic devices to transmit messages to each other.
继续参考图1,图1示例性示出了本申请实施例提供的住宅对应的智能网络的场景示意图。如图1所示,住户A在卧室A中使用平板电脑300通过Wi-Fi路由器100-2上网课,住户B在卧室B中使用笔记本电脑500通过Wi-Fi路由器100-3进行视频会议,如果在住户A上网课的过程或者在住户B视频会议的过程中,需要通过连接Wi-Fi路由器100-1的打印机400打印资料,则住户A或者住户B都需要将切换至Wi-Fi路由器100-1才能访问并使用打印机400,由于Wi-Fi路由器100-1设置在客厅,在卧室A和卧室B中Wi-Fi路由器100-1发送的Wi-Fi信号可能较弱,导致平板电脑300和笔记本电脑500连接至Wi-Fi路由器100-1后,网课和视频会议会卡顿或者中断;如果,住户A和住户B将平板电脑300和笔记本电脑500移动至客厅再切换至Wi-Fi路由器100-1,则会带来很大的不方便。Continuing to refer to FIG. 1 , FIG. 1 exemplarily shows a scenario diagram of a smart network corresponding to a residence provided in an embodiment of the present application. As shown in FIG1 , resident A uses a tablet computer 300 in bedroom A to take an online class through a Wi-Fi router 100-2, and resident B uses a laptop computer 500 in bedroom B to conduct a video conference through a Wi-Fi router 100-3. If resident A needs to print materials through a printer 400 connected to the Wi-Fi router 100-1 during the online class or the video conference of resident B, then resident A or resident B needs to switch to the Wi-Fi router 100-1 to access and use the printer 400. Since the Wi-Fi router 100-1 is set in the living room, the Wi-Fi signal sent by the Wi-Fi router 100-1 in bedrooms A and B may be weak, resulting in the online class and video conference being stuck or interrupted after the tablet computer 300 and the laptop computer 500 are connected to the Wi-Fi router 100-1. If residents A and B move the tablet computer 300 and the laptop computer 500 to the living room and then switch to the Wi-Fi router 100-1, it will cause great inconvenience.
参考图2,图2示例性示出了一种本申请实施例提供的住宅内的各个智能设备之间的网络连接的场景示意图。如图2所示,Wi-Fi路由器100-1、100-2和100-3通过网线同时连接光调制解调器200,可以设置在住宅的弱电箱内。平板电脑300连接Wi-Fi路由器100-2,笔记本电脑500连接Wi-Fi路由器100-3,打印机400连接Wi-Fi路由器100-1。从图2可以看出,Wi-Fi路由器100-1、100-2和100-3分别具有各自的SSID信息,同时,由于光调制解调器200还为Wi-Fi路由器100-1、100-2和100-3分配了不同的ip地址,例如:ip地址分别为192.168.0.2,192.168.0.3和192.168.0.4。尽管Wi-Fi路由器100-1、100-2和100-3处于光调制解调器200对应的网段,但是Wi-Fi路由器100-1、100-2和100-3与平板电脑300、笔记本电脑500和打印机400之间分别运行在Wi-Fi路由器各自不同的网段下,也就是说,Wi-Fi路由器100-1、100-2和100-3分别为平板电脑300、笔记本电脑500和打印机400分配不同的网段,使得平板电脑300、笔记本电脑500和打印机400之间互相不可见,不能访问。Referring to Figure 2, Figure 2 exemplarily shows a schematic diagram of a scenario of network connection between various smart devices in a residence provided by an embodiment of the present application. As shown in Figure 2, Wi-Fi routers 100-1, 100-2 and 100-3 are simultaneously connected to an optical modem 200 via a network cable, and can be set in a weak current box of a residence. Tablet computer 300 is connected to Wi-Fi router 100-2, laptop computer 500 is connected to Wi-Fi router 100-3, and printer 400 is connected to Wi-Fi router 100-1. As can be seen from Figure 2, Wi-Fi routers 100-1, 100-2 and 100-3 have their own SSID information respectively. At the same time, since the optical modem 200 also assigns different IP addresses to Wi-Fi routers 100-1, 100-2 and 100-3, for example: the IP addresses are 192.168.0.2, 192.168.0.3 and 192.168.0.4 respectively. Although the Wi-Fi routers 100-1, 100-2 and 100-3 are in the network segment corresponding to the optical modem 200, the Wi-Fi routers 100-1, 100-2 and 100-3 and the tablet computer 300, the laptop computer 500 and the printer 400 respectively operate in different network segments of the Wi-Fi routers. That is, the Wi-Fi routers 100-1, 100-2 and 100-3 respectively allocate different network segments to the tablet computer 300, the laptop computer 500 and the printer 400, so that the tablet computer 300, the laptop computer 500 and the printer 400 are invisible to each other and cannot access each other.
可以理解,连接了同一光调制解调器的不同网络设备之间是可以通过光调制解调器对应的网段互相发送信息的,即连接了同一光调制解调器的不同网络设备之间是可以通信的。因此,为了解决上述图1和图2涉及的不同网络设备连接的智能设备之间无法实现互相访问的问题,本申请实施例提供了一种通信方法。在该方法中,连接了同一光调制解调器的不同网络设备通过组播的方式,在光调制解调器对应的网段中发送各自的连接信息,其中,连接信息中可以携带各网络设备的SSID信息以及支持通信通道的信息。如此,网络设备在接收到其他网络设备的连接信息之后,可以确定出哪些网络设备能够支持通信信道,通过安全认证和加密协商在支持通信通道的各个网络设备之间建立不同网络设备间的通信通道,不同网络设备间的通信通道能够用于实现不同网络设备下挂的终端设备间的通信。It can be understood that different network devices connected to the same optical modem can send information to each other through the network segment corresponding to the optical modem, that is, different network devices connected to the same optical modem can communicate with each other. Therefore, in order to solve the problem that the intelligent devices connected to different network devices involved in Figures 1 and 2 above cannot access each other, an embodiment of the present application provides a communication method. In this method, different network devices connected to the same optical modem send their respective connection information in the network segment corresponding to the optical modem by multicast, wherein the connection information can carry the SSID information of each network device and the information of the supported communication channel. In this way, after receiving the connection information of other network devices, the network device can determine which network devices can support the communication channel, and establish communication channels between different network devices through security authentication and encryption negotiation between each network device that supports the communication channel. The communication channels between different network devices can be used to realize the communication between terminal devices hanging under different network devices.
在建立了通信信道后,根据多个网络设备的性能参数确定性能参数符合条件的网络设备作为一个主网络设备,采用主网络设备的ip地址和SSID信息对多个网络设备进行设置,在多个网络设备之间进行参数同步,使得多个网络设备具有相同的网段和SSID信息,也就是在住宅中的各个房间提供相同的Wi-Fi网络参数。若建立了通信通道的多个网络设备中的每一个网络设备分别又连接有至少一个智能设备,各个网络设备下的智能设备能够通过通信通道传输信息,也就是,使得不同网络设备下的智能设备工作在同一个网段下,不同网络设备下的智能设备能够通过已经设置的通信通道相互访问和通信。After the communication channel is established, a network device with performance parameters that meet the conditions is determined as a master network device based on the performance parameters of multiple network devices, and multiple network devices are set using the IP address and SSID information of the master network device, and parameters are synchronized between multiple network devices so that multiple network devices have the same network segment and SSID information, that is, the same Wi-Fi network parameters are provided in each room in the house. If each of the multiple network devices that have established the communication channel is connected to at least one smart device, the smart devices under each network device can transmit information through the communication channel, that is, the smart devices under different network devices work under the same network segment, and the smart devices under different network devices can access and communicate with each other through the communication channel that has been set up.
通过本申请实施例提供的通信方法,在住宅中的多个网络设备之间建立通信通道,设置统一的网段和SSID信息,使得住宅中的智能设备能够接入同一个网段,实现了智能设备之间的相互访问和通信,提高了用户体验;若用户携带智能设备在住宅中移动,智能设备还可以实现从一个网络设无缝切换至另一个网络设备,不会造成智能设备出现网络暂时中断的情况。Through the communication method provided in the embodiment of the present application, a communication channel is established between multiple network devices in a residence, and a unified network segment and SSID information are set, so that smart devices in the residence can access the same network segment, thereby achieving mutual access and communication between smart devices and improving user experience; if a user carries a smart device around the residence, the smart device can also achieve seamless switching from one network device to another, without causing temporary network interruption to the smart device.
为了更加清楚、详细地介绍本申请实施例提供的通信方法,下面先介绍本申请实施例提供实施该方法所涉及的网络设备100。网络设备100可以是支持Wi-Fi和蜂窝功能(4G/5G)的智能设备,本申请实施例对网络设备的具体类型不作任何限制。In order to more clearly and in detail introduce the communication method provided in the embodiment of the present application, the network device 100 involved in implementing the method provided in the embodiment of the present application is first introduced below. The network device 100 can be a smart device that supports Wi-Fi and cellular functions (4G/5G), and the embodiment of the present application does not impose any restrictions on the specific type of the network device.
如图3所示,网络设备100可以包括:系统级芯片(SoC,System on Chip)110,内部存储器140,外部存储器接口150,电源管理模块160,接口170,按键180,指示器190以及多根天线(未示出)。As shown in FIG. 3 , the network device 100 may include: a system on chip (SoC) 110 , an internal memory 140 , an external memory interface 150 , a power management module 160 , an interface 170 , a button 180 , an indicator 190 , and multiple antennas (not shown).
可以理解的是,本实施例示意的结构并不构成对电子设备的具体限定。在另一些实施例中,在电子设备同时支持Wi-Fi通信和蜂窝通信的基础上,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, on the basis of the electronic device supporting both Wi-Fi communication and cellular communication, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
系统级芯片110可以包括一个或多个处理单元111,例如:处理单元111可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphicsprocessing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)其中的一种。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个系统级芯片中。系统级芯片110还可以包括无线通信模块112,无线通信模块112可以提供应用在网络设备100上的无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络,2.4G WLAN),在一些实施例中,无线通信模块112还可以提供蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequencymodulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。The system-on-chip 110 may include one or more processing units 111, for example, the processing unit 111 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more system-on-chips. The system-level chip 110 may also include a wireless communication module 112, which may provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks, 2.4G WLAN) applied to the network device 100. In some embodiments, the wireless communication module 112 may also provide wireless communication solutions such as Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.
在一些实施例中,系统级芯片110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integratedcircuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the system-on-chip 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
在一些实施例中,系统级芯片110还可以包括无线通信模块113(5G WLAN)以及移动通信模块114,移动通信模块114可以提供应用在网络设备100上的包括2G/3G/4G/5G等无线通信的解决方案。In some embodiments, the system-level chip 110 may also include a wireless communication module 113 (5G WLAN) and a mobile communication module 114. The mobile communication module 114 may provide wireless communication solutions including 2G/3G/4G/5G applied on the network device 100.
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
内部存储器140可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。系统级芯片110通过运行存储在内部存储器140的指令,从而执行电子设备的各种功能应用以及数据处理。例如,在本申请实施例中,系统级芯片110可以通过执行存储在内部存储器140中的指令,内部存储器140可以包括存储程序区和存储数据区。The internal memory 140 may be used to store computer executable program codes, which include instructions. The system-level chip 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 140. For example, in an embodiment of the present application, the system-level chip 110 may execute the instructions stored in the internal memory 140, and the internal memory 140 may include a program storage area and a data storage area.
外部存储器接口150可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备的存储能力。外部存储卡通过外部存储器接口150与系统级芯片110通信,实现数据存储功能。The external memory interface 150 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the system-on-chip 110 through the external memory interface 150 to implement a data storage function.
电源管理模块160,电源管理模块160为网络设备100供电。The power management module 160 provides power for the network device 100 .
接口170,接口170可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulsecode modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口Interface 170, interface 170 may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, and a subscriber identity module (SIM) interface
按键180可以包括开机键、重启键等,按键180可以是机械按键。也可以是触摸式按键。网络设备100可以接收按键输入,产生与网络设备100的用户设置以及功能控制有关的键信号输入。The button 180 may include a power button, a restart button, etc. The button 180 may be a mechanical button or a touch button. The network device 100 may receive a button input and generate a key signal input related to user settings and function control of the network device 100.
指示器190可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 190 may be an indicator light, which may be used to indicate the charging status, power change, messages, missed calls, notifications, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
图4是本发明实施例的网络设备100的软件结构框图。FIG. 4 is a software structure block diagram of the network device 100 according to an embodiment of the present invention.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,可以将网络设备100的操作系统分为四层,从上至下分别为应用层,应用态业务层,中间件层,以及内核层。The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the operating system of the network device 100 can be divided into four layers, from top to bottom, namely, the application layer, the application state service layer, the middleware layer, and the kernel layer.
应用层可以包括一系列网络设备100的应用。如图4所示,应用程序层可以包括插件应用,配置应用等应用程序。The application layer may include a series of applications of the network device 100. As shown in Fig. 4, the application layer may include applications such as plug-in applications and configuration applications.
应用态业务层可以包括:插件平台开放能力接口(RESTful API)、路由协议、设备管理、Wi-Fi业务和维管应用等。其中,插件平台开放能力接口用于提供访问网络设备100的接口,接入网络设备100的各种智能设备可以通过调用API向网络设备100发起HTTP请求,网络设备100响应请求将处理结果反馈给智能设备。路由协议提供了多种数据包转送方式的网上协议。设备管理用户控制网络设备100。Wi-Fi业务用于提供Wi-Fi连接。维管应用用于记录网络设备100的运行日志等。The application state business layer may include: plug-in platform open capability interface (RESTful API), routing protocol, device management, Wi-Fi service and maintenance application, etc. Among them, the plug-in platform open capability interface is used to provide an interface for accessing the network device 100. Various smart devices connected to the network device 100 can initiate HTTP requests to the network device 100 by calling the API, and the network device 100 responds to the request and feeds back the processing results to the smart device. The routing protocol provides an online protocol for multiple data packet forwarding methods. The device management user controls the network device 100. The Wi-Fi service is used to provide Wi-Fi connection. The maintenance application is used to record the operation log of the network device 100, etc.
中间件层包括多个基础库,例如:数据块(DB),安全(Security)等。The middleware layer includes multiple basic libraries, such as data block (DB), security, etc.
内核层是硬件和软件之间的层。内核层至少包含内核HAL(硬件抽象层,HardwareAbstraction Layer)用于与内核层进行交互、通用驱动,输入输出驱动,网卡驱动等。The kernel layer is the layer between hardware and software. The kernel layer contains at least the kernel HAL (Hardware Abstraction Layer) for interacting with the kernel layer, general drivers, input and output drivers, network card drivers, etc.
下面基于图5所示的网络设备的交互示意图来描述本申请实施例的网络连接的过程,在图5中,仅示出了Wi-Fi路由器100-1、Wi-Fi路由器100-2和光调制解调器200,在一些实施例中,还可以包括更多的Wi-Fi路由器,这里不做限定。The following describes the network connection process of an embodiment of the present application based on the interaction diagram of the network device shown in Figure 5. In Figure 5, only Wi-Fi router 100-1, Wi-Fi router 100-2 and optical modem 200 are shown. In some embodiments, more Wi-Fi routers may be included, which is not limited here.
S501:Wi-Fi路由器100-1和Wi-Fi路由器100-2分别接入光调制解调器200。S501: The Wi-Fi router 100-1 and the Wi-Fi router 100-2 are respectively connected to the optical modem 200.
示例性地,如图2所示,这里的光调制解调器200可以设置在住宅的弱电箱内。光调制解调器200的一个端口与光纤通信网络连接,用于转换光信号。光调制解调器200还可以提供多个本地局域网端口,也就是LAN端口,用来连接终端设备或次一级的网络设备的接口。Wi-Fi路由器100-1和Wi-Fi路由器100-2也可以通过本地局域网端口,也就是LAN端口,接入光调制解调器200;Wi-Fi路由器100-1、Wi-Fi路由器100-2和光调制解调器200形成一个网段,光调制解调器200可以为Wi-Fi路由器100-1和Wi-Fi路由器100-2分配ip地址。Exemplarily, as shown in FIG. 2 , the optical modem 200 here can be set in a low-voltage box of a residence. One port of the optical modem 200 is connected to the optical fiber communication network for converting optical signals. The optical modem 200 can also provide multiple local area network ports, that is, LAN ports, for connecting the interfaces of terminal devices or next-level network devices. The Wi-Fi router 100-1 and the Wi-Fi router 100-2 can also access the optical modem 200 through the local area network port, that is, the LAN port; the Wi-Fi router 100-1, the Wi-Fi router 100-2 and the optical modem 200 form a network segment, and the optical modem 200 can assign IP addresses to the Wi-Fi router 100-1 and the Wi-Fi router 100-2.
S502:Wi-Fi路由器100-1通过光调制解调器200组播连接信息。S502: The Wi-Fi router 100-1 multicasts the connection information via the optical modem 200.
示例性地,Wi-Fi路由器100-1可以在与光调制解调器200之间的网段中,组播连接信息,也就是,在光调制解调器200的网段的ip地址中发送连接信息,用于判断同样接入光调制解调器200的其他网络设备是否能够接收到连接信息。例如:Wi-Fi路由器100-1和Wi-Fi路由器之间可以在100-2光调制解调器200对应的网段中交互连接信息。这里的连接信息可以携带Wi-Fi路由器100-1的SSID信息(SSID1)以及Wi-Fi路由器100-1支持通信通道的信息,也就是,Wi-Fi路由器100-1支持智能连接的信息。Exemplarily, the Wi-Fi router 100-1 can multicast connection information in the network segment between the Wi-Fi router 100-1 and the optical modem 200, that is, send the connection information in the IP address of the network segment of the optical modem 200 to determine whether other network devices that are also connected to the optical modem 200 can receive the connection information. For example: the Wi-Fi router 100-1 and the Wi-Fi router 100-2 can exchange connection information in the network segment corresponding to the optical modem 200. The connection information here can carry the SSID information (SSID1) of the Wi-Fi router 100-1 and the information that the Wi-Fi router 100-1 supports the communication channel, that is, the information that the Wi-Fi router 100-1 supports smart connection.
在一些实施例中,例如,如图6,Wi-Fi路由器100-1与Wi-Fi路由器100-2可以分别运行CoAP服务端(CoAP server)和CoAP客户端(CoAP client),CoAP客户端用于组播连接信息,CoAP服务端用于接收并解析连接信息。In some embodiments, for example, as shown in FIG. 6 , the Wi-Fi router 100 - 1 and the Wi-Fi router 100 - 2 may respectively run a CoAP server and a CoAP client, wherein the CoAP client is used to multicast connection information and the CoAP server is used to receive and parse the connection information.
S503:Wi-Fi路由器100-2接收到连接信息后,Wi-Fi路由器100-1与Wi-Fi路由器100-2之间建立连接。S503: After the Wi-Fi router 100-2 receives the connection information, a connection is established between the Wi-Fi router 100-1 and the Wi-Fi router 100-2.
示例性地,在Wi-Fi路由器100-2接收到Wi-Fi路由器100-1发送的连接信息,Wi-Fi路由器100-2可以解析连接信息,在确定Wi-Fi路由器100-1支持通信通道且Wi-Fi路由器100-2自身也支持通信通道的情况下,Wi-Fi路由器100-1与Wi-Fi路由器100-2之间建立连接,用于相互发送安全认证和加密协商对应的信息。Exemplarily, when Wi-Fi router 100-2 receives the connection information sent by Wi-Fi router 100-1, Wi-Fi router 100-2 may parse the connection information, and when it is determined that Wi-Fi router 100-1 supports the communication channel and Wi-Fi router 100-2 itself also supports the communication channel, a connection is established between Wi-Fi router 100-1 and Wi-Fi router 100-2 for mutually sending information corresponding to security authentication and encryption negotiation.
S504:Wi-Fi路由器100-1与Wi-Fi路由器100-2之间进行安全认证和加密协商,建立通信通道。S504: The Wi-Fi router 100-1 and the Wi-Fi router 100-2 perform security authentication and encryption negotiation to establish a communication channel.
示例性地,在Wi-Fi路由器100-1与Wi-Fi路由器100-2之间建立连接后,以Wi-Fi路由器100-1为例,安全认证的过程可以包括:Wi-Fi路由器100-1发送报文,报文携带Wi-Fi路由器100-1的SSID信息;Wi-Fi路由器100-2识别出报文携带的SSID信息属于Wi-Fi路由器100-1后,生成验证信息;返回给Wi-Fi路由器100-1;Wi-Fi路由器100-1发送报文并携带验证信息;Wi-Fi路由器100-2再次识别出报文携带的验证信息后,确定验证通过。加密协商的过程可以包括:Wi-Fi路由器100-1与Wi-Fi路由器100-2之间确定都支持的加密方式,例如:WEP(Wired Equivalent Privacy,有线等效保密)等等。Exemplarily, after a connection is established between the Wi-Fi router 100-1 and the Wi-Fi router 100-2, taking the Wi-Fi router 100-1 as an example, the security authentication process may include: the Wi-Fi router 100-1 sends a message, the message carries the SSID information of the Wi-Fi router 100-1; after the Wi-Fi router 100-2 identifies that the SSID information carried in the message belongs to the Wi-Fi router 100-1, it generates verification information; returns it to the Wi-Fi router 100-1; the Wi-Fi router 100-1 sends a message carrying the verification information; after the Wi-Fi router 100-2 identifies the verification information carried in the message again, it determines that the verification is passed. The encryption negotiation process may include: the Wi-Fi router 100-1 and the Wi-Fi router 100-2 determine the encryption methods that they both support, such as: WEP (Wired Equivalent Privacy), etc.
在一些实施例中,这里的通信通道可以是通过CoAP(Costrained ApplicationProtocal,受限制的应用协议)建立的。Wi-Fi路由器100-1与Wi-Fi路由器100-2之间能够通过CoAP对应的请求报文和应答报文传输信息。例如,继续参考图6,Wi-Fi路由器100-1与Wi-Fi路由器100-2可以分别运行CoAP服务端(CoAP server)和CoAP客户端(CoAP client),CoAP客户端用于发送请求报文,CoAP服务端用户回复应答报文。请求报文和应答报文可以通过单播的方式传输。In some embodiments, the communication channel here can be established through CoAP (Costrained Application Protocol). Wi-Fi router 100-1 and Wi-Fi router 100-2 can transmit information through request messages and response messages corresponding to CoAP. For example, referring to Figure 6, Wi-Fi router 100-1 and Wi-Fi router 100-2 can run CoAP server (CoAP server) and CoAP client (CoAP client) respectively, and CoAP client is used to send request messages, and CoAP server user replies to response messages. Request messages and response messages can be transmitted in a unicast manner.
S505:Wi-Fi路由器100-1与Wi-Fi路由器100-2之间进行能力协商,确认Wi-Fi路由器100-1为主网络设备。S505: The Wi-Fi router 100-1 and the Wi-Fi router 100-2 perform capability negotiation to confirm that the Wi-Fi router 100-1 is the primary network device.
示例性地,在Wi-Fi路由器100-1与Wi-Fi路由器100-2之间建立了通信通道后,Wi-Fi路由器100-1与Wi-Fi路由器100-2之间可以根据性能参数,例如:处理器型号,传输速率,系统版本等等,确定一个主网络设备(目标网络设备),也就是,用于同步建立了通信通道的各个网络设备的参数。Exemplarily, after a communication channel is established between Wi-Fi router 100-1 and Wi-Fi router 100-2, Wi-Fi router 100-1 and Wi-Fi router 100-2 may determine a main network device (target network device) based on performance parameters, such as processor model, transmission rate, system version, etc., that is, parameters of each network device for synchronizing the established communication channel.
S506:Wi-Fi路由器100-1与Wi-Fi路由器100-2之间进行参数同步,发送网络连接参数。S506: The Wi-Fi router 100-1 and the Wi-Fi router 100-2 perform parameter synchronization and send network connection parameters.
示例性地,如图7所示,作为主网络设备的Wi-Fi路由器100-1可以通过通信通道将Wi-Fi路由器100-2的SSID信息、ip地址对应的网段、密码以及Wi-Fi参数(网络参数)同步为与Wi-Fi路由器100-1一致。可以理解,在Wi-Fi路由器100-3接入光调制解调器200且Wi-Fi路由器100-3也支持通信通道的情况下,Wi-Fi路由器100-1还可以通过通信通道将Wi-Fi路由器100-3的SSID信息和ip地址对应的网段同步为与Wi-Fi路由器100-3一致。参考图7,Wi-Fi路由器100-2和Wi-Fi路由器100-3的SSID信息同步为SSID1。例如:在一些实施例中,上述网段中,光调制解调器200的ip地址可以是192.168.0.1,Wi-Fi路由器100-1和Wi-Fi路由器100-2的ip地址可以分别是192.168.0.2和192.168.0.3。Exemplarily, as shown in FIG7 , the Wi-Fi router 100-1 as the main network device can synchronize the SSID information, the network segment corresponding to the IP address, the password, and the Wi-Fi parameters (network parameters) of the Wi-Fi router 100-2 through the communication channel to be consistent with the Wi-Fi router 100-1. It can be understood that when the Wi-Fi router 100-3 is connected to the optical modem 200 and the Wi-Fi router 100-3 also supports the communication channel, the Wi-Fi router 100-1 can also synchronize the SSID information and the network segment corresponding to the IP address of the Wi-Fi router 100-3 through the communication channel to be consistent with the Wi-Fi router 100-3. Referring to FIG7 , the SSID information of the Wi-Fi router 100-2 and the Wi-Fi router 100-3 is synchronized to SSID1. For example, in some embodiments, in the above network segment, the IP address of the optical modem 200 may be 192.168.0.1, and the IP addresses of the Wi-Fi router 100-1 and the Wi-Fi router 100-2 may be 192.168.0.2 and 192.168.0.3, respectively.
在一些实施例中,分别位于卧室A、卧室B和客厅的平板电脑300、笔记本电脑500和打印机400显示的Wi-Fi网络连接参数都是SSID1,尽管平板电脑300、笔记本电脑500和打印机400分别连接Wi-Fi路由器100-2、Wi-Fi路由器100-3和Wi-Fi路由器100-1,Wi-Fi路由器100-1、Wi-Fi路由器100-2和Wi-Fi路由器100-3之间的参数相同,平板电脑300、笔记本电脑500和打印机400之间可以互相访问和通信,数据或者信息可以通过上述步骤S504建立的通信通道相互传输。In some embodiments, the Wi-Fi network connection parameters displayed by the tablet computer 300, the laptop computer 500 and the printer 400 located in the bedroom A, the bedroom B and the living room respectively are all SSID1. Although the tablet computer 300, the laptop computer 500 and the printer 400 are respectively connected to the Wi-Fi router 100-2, the Wi-Fi router 100-3 and the Wi-Fi router 100-1, the parameters between the Wi-Fi router 100-1, the Wi-Fi router 100-2 and the Wi-Fi router 100-3 are the same, the tablet computer 300, the laptop computer 500 and the printer 400 can access and communicate with each other, and data or information can be transmitted to each other through the communication channel established in the above step S504.
在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the accompanying drawings, some structural or method features may be shown in a specific arrangement and/or order. However, it should be understood that such a specific arrangement and/or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and/or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。It should be noted that the units/modules mentioned in the various device embodiments of the present application are all logical units/modules. Physically, a logical unit/module can be a physical unit/module, or a part of a physical unit/module, or can be implemented as a combination of multiple physical units/modules. The physical implementation method of these logical units/modules themselves is not the most important. The combination of functions implemented by these logical units/modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units/modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units/modules in the above-mentioned device embodiments.
需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211584529.3A CN116684216B (en) | 2022-12-09 | 2022-12-09 | Communication method, readable medium and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211584529.3A CN116684216B (en) | 2022-12-09 | 2022-12-09 | Communication method, readable medium and electronic equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116684216A CN116684216A (en) | 2023-09-01 |
| CN116684216B true CN116684216B (en) | 2024-06-04 |
Family
ID=87789669
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211584529.3A Active CN116684216B (en) | 2022-12-09 | 2022-12-09 | Communication method, readable medium and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116684216B (en) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105122893A (en) * | 2012-11-21 | 2015-12-02 | 英特尔公司 | Systems and methods for enabling multi-band service discovery |
| WO2016161564A1 (en) * | 2015-04-07 | 2016-10-13 | 华为技术有限公司 | Gateway device automatic networking method and device |
| CN106656730A (en) * | 2015-10-30 | 2017-05-10 | 西门子公司 | Communication method, communication device, and communication system |
| CN108900579A (en) * | 2018-06-11 | 2018-11-27 | 广州视源电子科技股份有限公司 | Communication system, communication method, device, equipment and medium |
| CN110087236A (en) * | 2018-01-25 | 2019-08-02 | 苹果公司 | For establishing the agreement of secure communication session by wireless network and anonymous host |
| CN114697880A (en) * | 2020-12-31 | 2022-07-01 | 华为技术有限公司 | Cross-network segment discovery method, routing device and system |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP3565191B1 (en) * | 2018-04-30 | 2021-07-07 | Hewlett Packard Enterprise Development LP | Provisioning and managing internet-of-thing devices over a network |
-
2022
- 2022-12-09 CN CN202211584529.3A patent/CN116684216B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105122893A (en) * | 2012-11-21 | 2015-12-02 | 英特尔公司 | Systems and methods for enabling multi-band service discovery |
| WO2016161564A1 (en) * | 2015-04-07 | 2016-10-13 | 华为技术有限公司 | Gateway device automatic networking method and device |
| CN106656730A (en) * | 2015-10-30 | 2017-05-10 | 西门子公司 | Communication method, communication device, and communication system |
| CN110087236A (en) * | 2018-01-25 | 2019-08-02 | 苹果公司 | For establishing the agreement of secure communication session by wireless network and anonymous host |
| CN108900579A (en) * | 2018-06-11 | 2018-11-27 | 广州视源电子科技股份有限公司 | Communication system, communication method, device, equipment and medium |
| CN114697880A (en) * | 2020-12-31 | 2022-07-01 | 华为技术有限公司 | Cross-network segment discovery method, routing device and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116684216A (en) | 2023-09-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10225098B2 (en) | Methods, devices and systems for supporting wireless communication | |
| US11070970B2 (en) | Apparatus and method for providing universal plug and play service based on Wi-Fi direct connection in portable terminal | |
| US9503957B2 (en) | Low cost mesh network capability | |
| CN110312160A (en) | Wireless screen projection method and device, intelligent panel, terminal and system | |
| US20100290391A1 (en) | Apparatus and method for accessing multiple wireless networks | |
| CN101828156A (en) | Maintaining multiple, simultaneous wireless network connections using a single radio | |
| CN102137395A (en) | Method, device and system for configuring access device | |
| US11343225B2 (en) | Sharing media among remote access clients in a universal plug and play environment | |
| WO2019153722A1 (en) | Terminal communication method and device, terminal and storage medium | |
| WO2017214137A1 (en) | Methods, devices and systems for supporting wireless communication | |
| WO2015133859A1 (en) | Method and system for establishing a connection between a seeker device and a target device | |
| CN119030823A (en) | A distributed soft bus-based networking method, system and terminal | |
| WO2023151423A1 (en) | Device connection method and apparatus, device, and storage medium | |
| CN105812185A (en) | A communication connection method for a playback device | |
| WO2023246601A1 (en) | Device discovery method, apparatus and system | |
| US20250344289A1 (en) | Networking device communication method and electronic device | |
| US20220286731A1 (en) | Multimedia apparatus and cast method | |
| WO2015139401A1 (en) | Establishment method and system for wireless network, and wireless routing device | |
| WO2020164522A1 (en) | Data transmission control method and related product | |
| CN116684216B (en) | Communication method, readable medium and electronic equipment | |
| JP2003087248A (en) | Network information processing system and network construction method | |
| CN100353343C (en) | Wireless network automatic identification and login system and method | |
| JP2020088712A (en) | Communication device and control method thereof | |
| JP2024546969A (en) | Device management method and network device | |
| WO2025035980A1 (en) | Device registration method, device, and system |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address | ||
| CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |