CN113037652B - Network connection method, device and computer equipment based on distributed networking system - Google Patents
Network connection method, device and computer equipment based on distributed networking system Download PDFInfo
- Publication number
- CN113037652B CN113037652B CN202110314578.4A CN202110314578A CN113037652B CN 113037652 B CN113037652 B CN 113037652B CN 202110314578 A CN202110314578 A CN 202110314578A CN 113037652 B CN113037652 B CN 113037652B
- Authority
- CN
- China
- Prior art keywords
- networking
- network
- slave
- resource
- allocation request
- 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
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/78—Architectures of resource allocation
- H04L47/783—Distributed allocation of resources, e.g. bandwidth brokers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/22—Alternate routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
- H04L61/5014—Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域technical field
本申请涉及网络连接技术领域,特别是涉及一种基于分布式组网系统的网络连接方法、装置、计算机设备和存储介质。The present application relates to the technical field of network connection, and in particular, to a network connection method, apparatus, computer equipment and storage medium based on a distributed networking system.
背景技术Background technique
在组网系统中,组网设备和终端设备均需要基于已经构建好的组网系统进行网络连接。In the networking system, both the networking equipment and the terminal equipment need to be connected to the network based on the already constructed networking system.
传统技术中,为组网设备提供配置向导,由用户选择组网工作模式。由于用户主观因素等影响,组网系统中可能会存在组网工作模式无序的情况,导致组网系统中网络资源的分配出现混乱。In the traditional technology, a configuration wizard is provided for networking equipment, and the user selects the networking working mode. Due to the influence of user's subjective factors, the network working mode may be disordered in the networking system, resulting in confusion in the allocation of network resources in the networking system.
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本申请的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。It should be noted that the information disclosed in the above Background section is only for enhancing understanding of the background of the application, and therefore may include information that does not form the prior art known to a person of ordinary skill in the art.
发明内容SUMMARY OF THE INVENTION
基于此,有必要针对上述技术问题,提供一种基于分布式组网系统的网络连接方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide a network connection method, apparatus, computer equipment and storage medium based on a distributed networking system in response to the above technical problems.
一种基于分布式组网系统的网络连接方法,所述方法包括:基于网络资源发现服务从上级主控组网设备中获取第一网络区域对应的组网资源集合;所述上级主控组网设备携带有第二网络区域对应的组网资源集合,所述第一网络区域与所述第二网络区域存在对应关系;接收处于所述第一网络区域的第一从控组网设备发送的第一组网资源分配请求;所述第一组网资源分配请求由所述第一从控组网设备基于所开启的网络资源发现服务生成;响应于所述第一组网资源分配请求,基于所述组网资源集合向所述第一从控组网设备分配第一组网资源,以使得所述第一从控组网设备基于所述第一组网资源加入所述第一网络区域对应的组网系统并关闭网络资源发现服务。A network connection method based on a distributed networking system, the method comprising: obtaining a network resource set corresponding to a first network area from an upper-level main control networking device based on a network resource discovery service; the upper-level main control networking The device carries a set of networking resources corresponding to the second network area, and the first network area has a corresponding relationship with the second network area; receives the first slave-controlled networking device in the first network area. A group of network resource allocation request; the first network resource allocation request is generated by the first slave-controlled networking device based on the network resource discovery service opened; in response to the first network resource allocation request, based on the The networking resource set allocates a first networking resource to the first slave-controlled networking device, so that the first slave-controlled networking device joins the first network area corresponding to the first networking resource based on the first networking resource. Network the system and turn off the network resource discovery service.
在一个实施例中,所述响应于所述第一组网资源分配请求,基于所述组网资源集合向所述第一从控组网设备分配第一组网资源,以使得所述第一从控组网设备基于所述第一组网资源加入所述第一网络区域对应的组网系统并关闭网络资源发现服务之后,还包括:接收所述第一从控组网设备在关闭网络资源发现服务之后转发的由终端设备发送的终端连网资源分配请求;所述终端连网资源分配请求由所述终端设备基于第二组网资源发送给所述第一从控组网设备,所述第二组网资源由所述第一从控组网设备基于所述组网资源集合分配给所述终端设备;响应于所述终端连网资源分配请求,向所述终端设备分配第一连网资源,以使得所述终端设备基于所述第一连网资源进行网络连接。In an embodiment, in response to the first networking resource allocation request, the first networking resource is allocated to the first slave-controlled networking device based on the networking resource set, so that the first networking resource is allocated to the first slave networking device. After the slave-controlled networking device joins the networking system corresponding to the first network area based on the first networking resource and disables the network resource discovery service, the method further includes: receiving that the first slave-controlled networking device disables the network resource A terminal networking resource allocation request sent by the terminal device and forwarded after the service is discovered; the terminal networking resource allocation request is sent by the terminal device to the first slave-controlled networking device based on the second networking resource, and the The second networking resource is allocated to the terminal device by the first slave-controlled networking device based on the set of networking resources; in response to the terminal networking resource allocation request, the first networking resource is allocated to the terminal device resource, so that the terminal device performs network connection based on the first networking resource.
在一个实施例中,所述接收处于所述第一网络区域的第一从控组网设备发送的第一组网资源分配请求,包括:接收所述第一从控组网设备在确定第二从控组网设备对所述第一从控组网设备保持静默状态之后发送的所述第一组网资源分配请求;所述第二从控组网设备在对所述第一从控组网设备保持静默状态时处于开启网络资源发现服务的状态,并在接收到基于所述组网资源集合分配的第三组网资源时关闭网络资源发现服务。In an embodiment, the receiving a first networking resource allocation request sent by a first slave-controlled networking device located in the first network area includes: receiving the first slave-controlled networking device determining the second The first networking resource allocation request sent by the slave-control networking device after the first slave-control networking device maintains a silent state; the second slave-control networking device is sending the first slave-control networking device The device is in a state of enabling the network resource discovery service when it remains in the silent state, and disables the network resource discovery service when receiving the third networking resource allocated based on the networking resource set.
在一个实施例中,所述第一从控组网设备基于目标网络连接方式与所述第二从控组网设备通信;所述接收处于所述第一网络区域的第一从控组网设备发送的第一组网资源分配请求,包括:接收所述第一从控组网设备基于所述目标网络连接方式发送的第一组网资源分配请求。In an embodiment, the first slave-control networking device communicates with the second slave-control networking device based on a target network connection; the receiving the first slave-control networking device located in the first network area The sending of the first networking resource allocation request includes: receiving a first networking resource allocation request sent by the first slave-controlled networking device based on the target network connection mode.
在一个实施例中,所述第一组网资源分配请求中携带所述第一从控组网设备对应的设备集群标识;所述响应于所述第一组网资源分配请求,基于所述组网资源集合向所述第一从控组网设备分配第一组网资源,包括:当根据第一从控组网设备对应的设备集群标识确定所述第一从控组网设备对应的设备集群为所述第一网络区域内的设备集群时,响应于所述第一组网资源分配请求,基于所述组网资源集合向所述第一从控组网设备分配第一组网资源。In an embodiment, the first networking resource allocation request carries a device cluster identifier corresponding to the first slave-controlled networking device; the first networking resource allocation request, based on the group The network resource set allocating the first networking resource to the first slave-control networking device includes: determining the device cluster corresponding to the first slave-control networking device according to the device cluster identifier corresponding to the first slave-control networking device When clustering devices in the first network area, in response to the first networking resource allocation request, allocate a first networking resource to the first slave-controlled networking device based on the networking resource set.
在一个实施例中,所述方法,还包括:接收第三从控组网设备发送的第二组网资源分配请求;所述第二组网资源分配请求中携带所述第三从控组网设备对应的设备集群标识;当根据第三从控组网设备对应的设备集群标识确定所述第三从控组网设备对应的设备集群不是所述第一网络区域内的设备集群时,对所述第二组网资源分配请求保持静默状态。In an embodiment, the method further includes: receiving a second networking resource allocation request sent by a third slave control networking device; the second networking resource allocation request carries the third slave control networking The device cluster identifier corresponding to the device; when it is determined according to the device cluster identifier corresponding to the third slave control networking device that the device cluster corresponding to the third slave control networking device is not a device cluster in the first network area, The second network resource allocation request remains silent.
在一个实施例中,所述响应于所述第一组网资源分配请求,基于所述组网资源集合向所述第一从控组网设备分配第一组网资源之后,还包括:接收所述第一从控组网设备基于所述第一组网资源发送的连网资源分配请求;响应于第一从控组网设备发送的连网资源分配请求,向所述第一从控组网设备分配第二连网资源,以使得所述第一从控组网设备基于所述第二连网资源进行网络连接。In an embodiment, after allocating the first networking resource to the first slave-controlled networking device based on the networking resource set in response to the first networking resource allocation request, the method further includes: receiving the The first slave control networking device sends a networking resource allocation request based on the first networking resource; in response to the networking resource allocation request sent by the first slave control networking device, to the first slave control networking The device allocates the second networking resource, so that the first slave-controlled networking device performs network connection based on the second networking resource.
一种基于分布式组网系统的网络连接装置,应用于当前主控组网设备,所述装置包括:资源集合获取模块,用于基于网络资源发现服务从上级主控组网设备中获取第一网络区域对应的组网资源集合;所述上级主控组网设备携带有第二网络区域对应的组网资源集合,所述第一网络区域与所述第二网络区域存在对应关系;分配请求接收模块,用于接收处于所述第一网络区域的第一从控组网设备发送的第一组网资源分配请求;所述第一组网资源分配请求由所述第一从控组网设备基于所开启的网络资源发现服务生成;组网系统加入模块,用于响应于所述第一组网资源分配请求,基于所述组网资源集合向所述第一从控组网设备分配第一组网资源,以使得所述第一从控组网设备基于所述第一组网资源加入所述第一网络区域对应的组网系统并关闭网络资源发现服务。A network connection device based on a distributed networking system, applied to a current master control networking device, the device comprising: a resource collection acquisition module, configured to obtain a first master network device from an upper-level master network device based on a network resource discovery service The set of networking resources corresponding to the network area; the upper-level master networking device carries the set of networking resources corresponding to the second network area, and the first network area has a corresponding relationship with the second network area; the allocation request is received A module for receiving a first networking resource allocation request sent by a first slave-controlled networking device in the first network area; the first networking resource allocation request is sent by the first slave-controlled networking device based on The enabled network resource discovery service is generated; a networking system is added to a module for, in response to the first networking resource allocation request, allocating a first group to the first slave-controlled networking device based on the networking resource set network resources, so that the first slave-controlled networking device joins the networking system corresponding to the first network area based on the first networking resources and disables the network resource discovery service.
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:基于网络资源发现服务从上级主控组网设备中获取第一网络区域对应的组网资源集合;所述上级主控组网设备携带有第二网络区域对应的组网资源集合,所述第一网络区域与所述第二网络区域存在对应关系;接收处于所述第一网络区域的第一从控组网设备发送的第一组网资源分配请求;所述第一组网资源分配请求由所述第一从控组网设备基于所开启的网络资源发现服务生成;响应于所述第一组网资源分配请求,基于所述组网资源集合向所述第一从控组网设备分配第一组网资源,以使得所述第一从控组网设备基于所述第一组网资源加入所述第一网络区域对应的组网系统并关闭网络资源发现服务。A computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program: obtaining a first network from an upper-level main control networking device based on a network resource discovery service The set of networking resources corresponding to the area; the upper-level master networking device carries the set of networking resources corresponding to the second network area, and the first network area has a corresponding relationship with the second network area; A first networking resource allocation request sent by the first slave-controlled networking device in the first network area; the first networking resource allocation request is generated by the first slave-controlled networking device based on the enabled network resource discovery service ; In response to the first networking resource allocation request, allocate a first networking resource to the first slave-controlled networking device based on the networking resource set, so that the first slave-controlled networking device is based on the The first networking resource is added to the networking system corresponding to the first network area and the network resource discovery service is turned off.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:基于网络资源发现服务从上级主控组网设备中获取第一网络区域对应的组网资源集合;所述上级主控组网设备携带有第二网络区域对应的组网资源集合,所述第一网络区域与所述第二网络区域存在对应关系;接收处于所述第一网络区域的第一从控组网设备发送的第一组网资源分配请求;所述第一组网资源分配请求由所述第一从控组网设备基于所开启的网络资源发现服务生成;响应于所述第一组网资源分配请求,基于所述组网资源集合向所述第一从控组网设备分配第一组网资源,以使得所述第一从控组网设备基于所述第一组网资源加入所述第一网络区域对应的组网系统并关闭网络资源发现服务。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: acquiring a network corresponding to a first network area from an upper-level master networking device based on a network resource discovery service A resource set; the upper-level master networking device carries a networking resource set corresponding to the second network area, and the first network area has a corresponding relationship with the second network area; receives the network resource set in the first network area a first networking resource allocation request sent by a first slave-controlled networking device; the first networking resource allocation request is generated by the first slave-controlled networking device based on the enabled network resource discovery service; in response to the A first networking resource allocation request, based on the networking resource set to allocate a first networking resource to the first slave-controlled networking device, so that the first slave-controlled networking device is based on the first networking resource The resource is added to the networking system corresponding to the first network area and the network resource discovery service is turned off.
上述基于分布式组网系统的网络连接方法、装置、计算机设备和存储介质,当前主控组网设备基于网络资源发现服务从上级主控组网设备中获取第一网络区域对应的组网资源集合;处于第一网络区域的第一从控组网设备能够基于所开启的网络资源发现服务从当前主控组网设备中获取到第一组网资源,基于第一组网资源加入第一网络区域对应的组网系统,在加入第一网络区域对应的组网系统关闭网络资源发现服务,以防止第一从控组网设备向主控组网设备和其他从控组网设备分配组网资源。通过网络资源发现服务的开启和关闭控制,能对组网系统中的当前主控组网设备和从控组网设备的组网资源进行有序控制,进而保证组网设备和终端设备的有序网络连接。In the above-mentioned network connection method, device, computer equipment and storage medium based on a distributed networking system, the current main control networking device obtains the network resource set corresponding to the first network area from the upper-level main control networking device based on the network resource discovery service ; The first slave control networking device in the first network area can obtain the first networking resource from the current master networking device based on the opened network resource discovery service, and join the first network area based on the first networking resource The corresponding networking system disables the network resource discovery service in the networking system corresponding to joining the first network area to prevent the first slave networking device from allocating networking resources to the master networking device and other slave networking devices. Through the on and off control of the network resource discovery service, the network resources of the current master networking equipment and the slave networking equipment in the networking system can be controlled in an orderly manner, thereby ensuring the orderly network equipment and terminal equipment. Internet connection.
附图说明Description of drawings
图1为一个实施例中基于分布式组网系统的网络连接方法的应用环境图;1 is an application environment diagram of a network connection method based on a distributed networking system in one embodiment;
图2为一个实施例中基于分布式组网系统的网络连接方法的流程示意图;2 is a schematic flowchart of a network connection method based on a distributed networking system in one embodiment;
图3为一个实施例中组网设备和终端设备的网络拓扑图;3 is a network topology diagram of networking equipment and terminal equipment in one embodiment;
图4为一个实施例中组网设备的网络拓扑图;4 is a network topology diagram of a networking device in one embodiment;
图5为另一个实施例中基于分布式组网系统的网络连接方法的流程示意图;5 is a schematic flowchart of a network connection method based on a distributed networking system in another embodiment;
图6为另一个实施例中组网设备和终端设备的网络拓扑图;6 is a network topology diagram of networking equipment and terminal equipment in another embodiment;
图7为一个实施例中基于分布式组网系统的网络连接方法的时序图;7 is a sequence diagram of a network connection method based on a distributed networking system in one embodiment;
图8为一个实施例中基于分布式组网系统的网络连接装置的结构框图;8 is a structural block diagram of a network connection device based on a distributed networking system in one embodiment;
图9为一个实施例中计算机设备的内部结构图。Figure 9 is a diagram of the internal structure of a computer device in one embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
本申请提供的基于分布式组网系统的网络连接方法,可以应用于如图1所示的应用环境中。该应用环境中包含上级主控组网设备102、当前主控组网设备104以及第一从控组网设备106。其中,当前主控组网设备104分别与上级主控组网设备102和第一从控组网设备106通过网络进行通信,可以通过有线或者无线的方式进行网络通信。如图1所示,当前主控组网设备和第一从控组网设备位于第一网络区域,第一网络区域位于第二网络区域,而上级主控组网设备位于第二网络区域内。位于第二网络区域的上级主控组网设备与位于第一网络区域的当前主控组网设备连接。当前主控组网设备在开启网络资源发现服务后从上级主控组网设备中获取第一网络区域对应的组网资源集合。在接收到第一从控组网设备发送的第一组网资源分配请求时,基于组网资源集合向第一从控组网设备分配第一组网资源,以使得第一从控组网设备基于第一组网资源加入第一网络区域对应的组网系统并关闭网络资源发现服务。其中,上级主控组网设备可以但不限于是各种组网设备,例如可以是调制解调器、交换机或者路由器等。当前主控组网设备和第一从控组网设备可以但不限于是各种组网设备,例如:可以是路由器、交换机或者网卡等中的至少一种。在一个实施例中,上级主控组网设备、当前主控组网设备和第一从控组网设备可以是同类型的组网设备,也可以是不同类型的组网设备。The network connection method based on the distributed networking system provided by the present application can be applied to the application environment shown in FIG. 1 . The application environment includes the upper-level
在一个实施例中,如图2所示,提供了一种基于分布式组网系统的网络连接方法。以该方法应用于图1中的当前主控组网设备为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2 , a network connection method based on a distributed networking system is provided. Taking the method applied to the current main control networking device in FIG. 1 as an example, the following steps are included:
S202,基于网络资源发现服务从上级主控组网设备中获取第一网络区域对应的组网资源集合;上级主控组网设备携带有第二网络区域对应的组网资源集合,第一网络区域与第二网络区域存在对应关系。S202, based on the network resource discovery service, obtain the networking resource set corresponding to the first network area from the upper-level main control networking device; the upper-level main control networking device carries the networking resource set corresponding to the second network area, the first network area There is a corresponding relationship with the second network area.
其中,组网设备指的是进行网络组建的设备,可以包括交换机、路由器等。当为路由器时,可以指配置有Mesh(无线宽带自组网)功能或者AC(Access Control,接入控制)功能的路由器。当前主控组网设备可以是承担整个组网管理职责的组网设备,在某些实施例中可以称为AC(Access Controller,接入控制器)或者Master(主接入控制器)。第一从控组网设备主要是承担网络接入和扩展组网网络职责的组网设备,可以称为AP(Access Point,无线接入点)或者Slave(从接入控制器)。上级主控组网设备为与主控组网设备连接的组网设备,用于为第二网络区域内的组网设备分配网络资源。当组网设备为路由器时,当前主控组网设备也可以称为主路由器、主路由或者母路由,第一从控组网设备也可以称为从路由器、从路由或者子路由,上级主控组网设备可以称为上级路由。The networking device refers to a device for network formation, which may include switches, routers, and the like. When it is a router, it may refer to a router configured with a Mesh (wireless broadband ad hoc network) function or an AC (Access Control, access control) function. The current master networking device may be a networking device that undertakes the entire networking management responsibility, and may be called an AC (Access Controller, access controller) or a Master (master access controller) in some embodiments. The first slave control networking device is mainly a networking device responsible for network access and network expansion, and may be called an AP (Access Point, wireless access point) or a Slave (slave access controller). The upper-level main control networking device is a networking device connected to the main control networking device, and is used for allocating network resources to the networking devices in the second network area. When the networking device is a router, the current master networking device can also be called a master router, a master router, or a parent router, and the first slave networking device can also be called a slave router, slave router, or sub-router. A networking device can be called an upper-level router.
当前主控组网设备、第一从控组网设备以及上级主控组网设备可以构成组网系统。该组网系统向终端设备分配网络资源,例如IP(Internet Protocol,网际互连协议)地址等。终端设备基于组网系统中组网设备所分配的网络资源实现网络连接,进而保证终端设备与其他终端或者服务器之间的网络通信。在某些实施例中,组网系统也可以包含终端设备,终端设备与组网设备之间可以处于连接状态,也可以处于暂未连接的状态。其中,终端设备可以是各种需要进行网络连接的设备,可以是个人电脑、智能手机、可穿戴设备等等。在某些情况下,终端设备也可以称为组网终端。在一个实施例中,终端设备可以是设定区域范围内的设备,例如,是某个家庭区域范围内的终端设备。在一个实施例中,在家庭组网环境中,可以将家庭区域范围内的主从路由器、个人电脑、智能手机、智能电视或者智能手环等构成系统作为组网系统,该组网系统能够给家庭提供稳定的组网系统。The current master networking device, the first slave networking device, and the upper-level master networking device may constitute a networking system. The networking system allocates network resources, such as IP (Internet Protocol, Internet Protocol) addresses, to terminal devices. The terminal device realizes network connection based on the network resources allocated by the networking device in the networking system, thereby ensuring network communication between the terminal device and other terminals or servers. In some embodiments, the networking system may also include a terminal device, and the terminal device and the networking device may be in a connected state or in a temporarily disconnected state. The terminal device may be various devices that need to be connected to the network, and may be a personal computer, a smart phone, a wearable device, and the like. In some cases, a terminal device may also be referred to as a networking terminal. In one embodiment, the terminal device may be a device within a set area, for example, a terminal device within a certain home area. In one embodiment, in a home networking environment, a system consisting of a master-slave router, a personal computer, a smart phone, a smart TV, or a smart bracelet in the home area can be used as a networking system, and the networking system can provide The home provides a stable networking system.
在一个实施例中,组网系统为分布式组网系统。其中,分布式组网系统为由多台组网设备构成的系统,系统内的组网设备通过有线或者无线的方式连接,以达到扩展网络覆盖范围,或者集中管控的目的。In one embodiment, the networking system is a distributed networking system. Among them, the distributed networking system is a system composed of multiple networking devices, and the networking devices in the system are connected by wired or wireless means to achieve the purpose of expanding network coverage or centralized management and control.
网络区域可以指某一网络所覆盖的区域,例如:被WIFI(Wireless Fidelity,无线通信技术)网络、无线网络或者有线网络等中的至少一种网络所覆盖的网络区域。网络区域可以为局域网(Local Area Network,LAN)、城域网(Metropolitan Area Network,MAN)、广域网(Wide Area Network,WAN)、个人网等网络类型。第一网络区域和第二网络区域可以属于相同的网络类型,也可以属于不同的网络类型。The network area may refer to an area covered by a certain network, for example: a network area covered by at least one of a WIFI (Wireless Fidelity, wireless communication technology) network, a wireless network, or a wired network. The network area may be a local area network (Local Area Network, LAN), a metropolitan area network (Metropolitan Area Network, MAN), a wide area network (Wide Area Network, WAN), a personal network and other network types. The first network area and the second network area may belong to the same network type, or may belong to different network types.
在一个实施例中,第一网络区域与第二网络区域之间的对应关系可以包括以下至少一种:1)第一网络区域与第二网络区域的网络类型一致,例如:第一网络区域与第二网络区域均为局域网;2)第一网络区域对应的空间位置包含于第二网络区域对应的空间位置;3)第一网络区域对应的网络覆盖范围与第二网络区域对应的网络覆盖范围位于不同的空间位置且两者所位于的空间位置处于平等状态,例如:第一网络区域为A家庭对应的局域网区域,第二网络区域为B家庭对应的局域网区域,A家庭与B家庭是邻居关系或者亲戚关系;4)第一网络区域对应的网络覆盖范围包含于第二网络区域对应的网络覆盖范围,例如:第一网络区域为局域网,第二网络区域为广域网,第一网络区域包含在第二网络区域内。In an embodiment, the corresponding relationship between the first network area and the second network area may include at least one of the following: 1) the network types of the first network area and the second network area are consistent, for example: the first network area and The second network area is a local area network; 2) the spatial position corresponding to the first network area is included in the spatial position corresponding to the second network area; 3) the network coverage area corresponding to the first network area and the network coverage area corresponding to the second network area They are located in different spatial locations and their spatial locations are equal, for example: the first network area is the local area network area corresponding to the A family, the second network area is the local area network area corresponding to the B family, and the A family and B family are neighbors 4) The network coverage corresponding to the first network area is included in the network coverage corresponding to the second network area, for example: the first network area is a local area network, the second network area is a wide area network, and the first network area is included in within the second network area.
在一个实施例中,当前主控组网设备可以为目标局域网中的组网设备。当前主控组网设备所在的空间位置包含于第一网络区域对应的空间位置。即,当前主控组网设备对应的局域网被上级主控组网设备对应的广域网所覆盖。In one embodiment, the current master networking device may be a networking device in the target local area network. The spatial position where the current master control networking device is located is included in the spatial position corresponding to the first network area. That is, the local area network corresponding to the current main control networking device is covered by the wide area network corresponding to the upper-level main control networking device.
网络资源发现服务包括网络资源查找服务、网络资源获取服务或者网络资源分配服务等中的至少一项。组网设备能基于网络资源发现服务从上级主控组网设备中获取组网资源,也能基于网络资源发现服务从组网系统中的其他组网设备中获取组网资源,并基于组网资源完成组网任务。在一个实施例中,当网络资源发现服务为网络资源分配服务时,可以具体为DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)对应的服务,以基于DHCP服务向对应的组网设备和终端设备进行IP地址的分配。The network resource discovery service includes at least one of a network resource search service, a network resource acquisition service, or a network resource allocation service. The networking device can obtain networking resources from the upper-level master networking device based on the network resource discovery service, and can also obtain networking resources from other networking devices in the networking system based on the network resource discovery service, and based on the networking resources Complete the networking task. In one embodiment, when the network resource discovery service is a network resource allocation service, it may specifically be a service corresponding to DHCP (Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol), so as to provide the corresponding networking equipment and terminal equipment based on the DHCP service. Allocate IP addresses.
在一个实施例中,当前主控组网设备可以在启动后开启网络资源发现服务,并基于所开启的网络资源发现服务从上级主控组网设备中获取第一网络区域对应的组网资源集合。在一个实施例中,当网络资源发现服务为DHCP时,当前主控组网设备可以作为DHCP客户端从上级主控组网设备中获取第一网络区域对应的组网资源集合。In one embodiment, the current master networking device may enable the network resource discovery service after startup, and obtain the networking resource set corresponding to the first network area from the upper-level master networking device based on the enabled network resource discovery service from the upper-level master networking device . In one embodiment, when the network resource discovery service is DHCP, the current master networking device may act as a DHCP client to obtain the networking resource set corresponding to the first network area from the upper-level master networking device.
在一个实施例中,上级主控组网设备也可以在启动后开启网络资源发现服务,并一直保持开启网络资源发现服务的状态。上级主控组网设备可以是用于将网络信息接入到第一网络区域的组网设备。以第一网络区域为某一家庭区域为例,上级主控组网设备为将网络信息接入到该家庭网络中的组网设备。进一步的,上级主控组网设备可以为入户光猫(调制解调器)或者入户交换机(上接运营商路由器)等。另外,当前主控组网设备还可以通过特定的网络连接方式与上级主控组网设备进行网络通信,以从上级主控组网设备中获取组网资源集合。In one embodiment, the upper-level master networking device may also enable the network resource discovery service after startup, and keep the state of enabling the network resource discovery service all the time. The upper-level master networking device may be a networking device for accessing network information to the first network area. Taking the first network area as a certain home area as an example, the upper-level master networking device is a networking device that accesses network information to the home network. Further, the upper-level main control networking device may be a home optical modem (modem) or a home switch (connected to an operator's router), and the like. In addition, the current main control networking device can also perform network communication with the upper-level main control networking device through a specific network connection mode, so as to obtain a set of networking resources from the upper-level main control networking device.
组网资源为进行网络组建所需的组网系统信息、互联网协议地址信息等。组网资源可以为IP地址等,可以理解为进行网络组建过程中采用的临时IP地址,在完成网络组建后,组网设备和终端设备可以重新获取IP地址,以实现网络连接。组网资源集合为由至少一个组网资源构成的集合。不同的网络区域可以对应有不同的组网资源集合。进一步地,上级主控组网设备携带第二网络区域对应的组网资源集合,也即,上级主控组网设备用于管理第二网络区域内各个子网络区域的组网资源。当接收到某一子网络区域A中的主控组网设备发送的组网资源集合获取请求时,向主控组网设备返回与子网络区域A对应的组网资源集合。在一个实施例中,组网资源集合可以为一定序列范围内的组网资源序列,在接收到组网资源分配请求时,从组网资源序列中选择一个某个位置上的组网资源序列,作为所分配的组网资源。例如:组网资源集合为10.1.10.100~10.1.10.200,则可以按顺序依次将10.1.10.100、10.1.10.101、……、10.1.10.200作为组网资源进行分配。The networking resources are the networking system information, Internet Protocol address information, etc. required for network formation. Networking resources can be IP addresses, etc., which can be understood as temporary IP addresses used in the process of network formation. After the network formation is completed, the networking equipment and terminal equipment can re-acquire IP addresses to realize network connection. The networking resource set is a set consisting of at least one networking resource. Different network areas may correspond to different sets of networking resources. Further, the upper-level master networking device carries a set of networking resources corresponding to the second network area, that is, the upper-level master networking device is used to manage networking resources of each sub-network area in the second network area. When receiving a network resource set acquisition request sent by the master networking device in a certain sub-network area A, the network resource set corresponding to the sub-network area A is returned to the master networking device. In one embodiment, the set of networking resources may be a sequence of networking resources within a certain sequence range, when receiving a request for allocation of networking resources, select a sequence of networking resources at a certain location from the sequence of networking resources, as the allocated networking resources. For example, if the set of networking resources is 10.1.10.100 to 10.1.10.200, then 10.1.10.100, 10.1.10.101, ..., 10.1.10.200 can be allocated as networking resources in sequence.
在一个实施例中,当前主控组网设备也可以采用PPP(Point to Point Protocol,点对点协议)拨号等方式从上级主控组网设备中获取组网资源集合。In an embodiment, the current main control networking device may also acquire the set of networking resources from the upper-level main control networking device by means of PPP (Point to Point Protocol, point-to-point protocol) dialing or the like.
在一个实施例中,S202的实现过程可以为:当前主控组网设备开启网络资源发现服务,基于网络资源发现服务向上级主控组网设备发送组网资源集合获取请求,接收上级主控组网设备基于组网资源集合获取请求返回的与第一网络区域对应的组网资源集合。In one embodiment, the implementation process of S202 may be: the current main control networking device enables the network resource discovery service, sends a network resource set acquisition request to the upper-level main control networking device based on the network resource discovery service, and receives the upper-level main control group The network device returns the network resource set corresponding to the first network area based on the network resource set acquisition request.
S204,接收处于第一网络区域的第一从控组网设备发送的第一组网资源分配请求;第一组网资源分配请求由第一从控组网设备基于所开启的网络资源发现服务生成。S204: Receive a first networking resource allocation request sent by the first slave-controlled networking device in the first network area; the first networking resource allocation request is generated by the first slave-controlled networking device based on the enabled network resource discovery service .
组网资源分配请求为获取组网资源的请求,以基于所获取的组网资源进行网络组建,并基于所组建的网络为终端设备提供网络连接的基础。The networking resource allocation request is a request for acquiring networking resources, a network is constructed based on the acquired networking resources, and a network connection basis is provided for terminal devices based on the constructed network.
在一个实施例中,第一从控组网设备可以为第一网络区域中的组网设备。进一步地,第一从控组网设备所在的空间位置包含于第一网络区域对应的空间位置。In one embodiment, the first slave control networking device may be a networking device in the first network area. Further, the spatial position where the first slave control networking device is located is included in the spatial position corresponding to the first network area.
在一个实施例中,S204的实现过程可以为:第一从控组网设备在启动时开启网络资源发现服务,基于所开启的网络资源发现服务生成第一组网资源分配请求,并向当前主控组网设备发送第一组网资源分配请求,以触发当前主控组网设备基于第一组网资源分配请求向第一从控组网设备进行组网资源的分配。In one embodiment, the implementation process of S204 may be: the first slave control networking device starts the network resource discovery service at startup, generates a first network resource allocation request based on the enabled network resource discovery service, and sends the request to the current master The controlling networking device sends a first networking resource allocation request to trigger the current master networking device to allocate networking resources to the first slave controlling networking device based on the first networking resource allocation request.
当组网系统中存在组网设备互相分配IP地址的情况时,如组网设备A分配IP地址给组网设备B,组网设备B又分配IP地址给组网设备C,整个组网系统就会出现IP地址混乱,互相纠缠,致使整个网络陷于不可用的状态。在一个实施例中,第一网络区域可以为当前主控组网设备所管辖的网络区域,即当前主控组网设备对第一网络区域内的设备进行组网资源和连网资源的集中分配,而对于其他网络区域中的设备则保持静默状态。进一步地,在第一网络区域中只有一个授权的组网资源的分配机构,通过集中分配的方式能有效保证组网资源分配的有序性。When there is a situation in which networking devices assign IP addresses to each other in the networking system, for example, networking device A assigns an IP address to networking device B, and networking device B assigns an IP address to networking device C, the entire networking system will There will be confusion and entanglement of IP addresses, causing the entire network to become unusable. In one embodiment, the first network area may be a network area under the jurisdiction of the current master networking device, that is, the current master networking device performs centralized allocation of networking resources and networking resources to the devices in the first network area , while silent for devices in other network zones. Further, there is only one authorized allocation mechanism for networking resources in the first network area, and the orderly allocation of networking resources can be effectively ensured by means of centralized allocation.
S206,响应于第一组网资源分配请求,基于组网资源集合向第一从控组网设备分配第一组网资源,以使得第一从控组网设备基于第一组网资源加入第一网络区域对应的组网系统并关闭网络资源发现服务。S206, in response to the first networking resource allocation request, allocate the first networking resource to the first slave-controlled networking device based on the networking resource set, so that the first slave-controlled networking device joins the first slave-controlled networking device based on the first networking resource The networking system corresponding to the network area and the network resource discovery service are turned off.
组网资源集合中包含至少一个组网资源,当前主控组网设备可以通过特定的分配方式从组网资源集合中为第一从控组网设备分配第一组网资源。其中,特定的分配方式可以是按照组网资源的编号顺序依次确定,也可以是随机确定的方式。具体地,当前主控组网设备随机从组网资源集合中选取一个,作为第一组网资源,并将第一组网资源发送给第一从控组网设备。The networking resource set includes at least one networking resource, and the current master networking device can allocate the first networking resource to the first slave networking device from the networking resource set in a specific allocation manner. The specific allocation mode may be determined sequentially according to the numbering sequence of the networking resources, or may be determined randomly. Specifically, the current master networking device randomly selects one of the networking resource sets as the first networking resource, and sends the first networking resource to the first slave networking device.
其中,加入到组网系统中可以为组网设备完成组网过程。在组网完成时,对应的组网设备与对应的组网系统建立连接,以通过组网系统与同一组网系统内的其他组网设备进行网络通信,同时能与终端设备进行通信并向终端设备分配组网资源。另外,加入到组网系统中也可以理解为组网设备加入到对应的网络环境中,据此,该组网设备能够基于组网资源与同一网络环境内的其他设备进行网络通信。具体地,第一从控组网设备在接收到第一组网资源时,可以基于第一组网资源与第一网络区域所在的组网系统建立连接,以通过第一网络区域所在的组网系统与第一网络区域内的组网设备进行网络通信,同时能与终端设备进行通信并向终端设备分配组网资源。Among them, joining the networking system can complete the networking process for the networking equipment. When the networking is completed, the corresponding networking device establishes a connection with the corresponding networking system, so as to perform network communication with other networking devices in the same networking system through the networking system, and at the same time communicate with the terminal device to the terminal The device allocates networking resources. In addition, joining a networking system can also be understood as adding a networking device to a corresponding network environment, whereby the networking device can perform network communication with other devices in the same network environment based on networking resources. Specifically, when receiving the first networking resource, the first slave-controlled networking device may establish a connection with the networking system where the first network area is located based on the first networking resource, so as to pass the networking where the first network area is located. The system performs network communication with the networking equipment in the first network area, and can communicate with the terminal equipment and allocate networking resources to the terminal equipment at the same time.
在一个实施例中,第一从控组网设备加入第一网络区域对应的组网系统,基于第一网络区域对应的组网系统向终端设备分配组网资源之后,关闭网络资源发现服务。在关闭网络资源发现服务后,第一从控组网设备无法进行组网资源的分配。而在开启网络资源发现服务后到关闭网络资源发现服务之间,第一从控组网设备可以进行组网资源的分配,例如向终端设备分配组网资源。In one embodiment, the first slave control networking device joins the networking system corresponding to the first network area, and after allocating networking resources to the terminal device based on the networking system corresponding to the first network area, disables the network resource discovery service. After the network resource discovery service is turned off, the first slave control networking device cannot allocate networking resources. After the network resource discovery service is turned on and the network resource discovery service is turned off, the first slave-controlled networking device may allocate networking resources, such as allocating networking resources to terminal devices.
在一个实施例中,S206的实现过程可以为:当前主控组网设备在接收到第一组网资源分配请求时,从组网资源集合中选择第一组网资源,并将第一组网资源发送给第一从控组网设备,第一从控组网设备基于第一组网资源加入第一网络区域对应的组网系统并关闭网络资源发现服务。In one embodiment, the implementation process of S206 may be: when the current master networking device receives the first networking resource allocation request, selects the first networking resource from the networking resource set, and assigns the first networking resource to the first networking resource. The resource is sent to the first slave-controlled networking device, and the first slave-controlled networking device joins the networking system corresponding to the first network area based on the first networking resource and disables the network resource discovery service.
上述基于分布式组网系统的网络连接方法中,当前主控组网设备基于网络资源发现服务从上级主控组网设备中获取第一网络区域对应的组网资源集合;处于第一网络区域的第一从控组网设备能够基于所开启的网络资源发现服务从当前主控组网设备中获取到第一组网资源,基于第一组网资源加入第一网络区域对应的组网系统,在加入第一网络区域对应的组网系统后关闭网络资源发现服务,以防止第一从控组网设备向主控组网设备和其他从控组网设备分配组网资源。通过网络资源发现服务的开启和关闭控制,能对组网系统中的当前主控组网设备和从控组网设备的组网资源进行有序控制,进而保证组网设备和终端设备的有序网络连接。In the above network connection method based on a distributed networking system, the current main control networking device obtains the network resource set corresponding to the first network area from the upper-level main control networking device based on the network resource discovery service; The first slave control networking device can obtain the first networking resource from the current master networking device based on the enabled network resource discovery service, and join the networking system corresponding to the first network area based on the first networking resource. After joining the networking system corresponding to the first network area, the network resource discovery service is turned off to prevent the first slave networking device from allocating networking resources to the master networking device and other slave networking devices. Through the on and off control of the network resource discovery service, the network resources of the current master networking equipment and the slave networking equipment in the networking system can be controlled in an orderly manner, thereby ensuring the orderly network equipment and terminal equipment. Internet connection.
在一个实施例中,第一从控组网设备在开启网络资源发现服务后,可以向终端设备分配组网资源,以使得终端设备加入第一网络区域对应的组网系统中。在第一从控组网设备和终端设备加入第一网络区域对应的组网系统后,第一从控组网设备可以关闭网络资源发现服务。而终端设备需要获取连网资源,以基于连网资源进行网络连接。由于第一从控组网设备已经关闭网络资源发现服务而当前主控组网设备处于开启网络资源发现服务的状态,因此,终端设备可以向当前主控组网设备获取连网资源。终端设备获取连网资源的方式可以但不限于是:直接向当前主控组网设备发送连网资源分配请求,通过第一从控组网设备向当前主控组网设备发送连网资源分配请求。In one embodiment, after enabling the network resource discovery service, the first slave-controlled networking device may allocate networking resources to the terminal device, so that the terminal device joins the networking system corresponding to the first network area. After the first slave-controlled networking device and the terminal device join the networking system corresponding to the first network area, the first slave-controlled networking device may disable the network resource discovery service. On the other hand, the terminal device needs to acquire networking resources to perform network connection based on the networking resources. Since the first slave networking device has disabled the network resource discovery service and the current master networking device is in the state of enabling the network resource discovery service, the terminal device can obtain networking resources from the current master networking device. The way that the terminal device obtains the networking resources may be, but is not limited to: directly sending a networking resource allocation request to the current master networking device, and sending a networking resource allocation request to the current master networking device through the first slave networking device .
其中,连网资源为进行网络连接所需的组网系统信息、互联网协议地址信息等,与组网资源的作用可以不同。终端设备可以基于连网资源进行上网。连网资源可以为IP地址等。在进行连网资源分配时,主控组网设备可以基于预先确定的连网资源集合实现,例如,从预先确定的连网资源集合中确定连网资源。其中,连网资源集合为由至少一个连网资源构成的集合。进一步的,连网资源集合可以为一定序列范围内的连网资源序列。Among them, the networking resource is the networking system information, Internet Protocol address information, etc. required for network connection, and the function of the networking resource may be different from that of the networking resource. Terminal devices can access the Internet based on networking resources. The networking resource may be an IP address or the like. When allocating the networking resources, the master networking device may implement based on a predetermined set of networking resources, for example, determine the networking resources from the predetermined set of networking resources. The networked resource set is a set composed of at least one networked resource. Further, the set of networking resources may be a sequence of networking resources within a certain sequence range.
在一个实施例中,在组网系统组建好之后,即在组网设备都加入到第一网络区域对应的组网系统后,可以由当前主控组网设备向组网系统中的从控组网设备和终端设备分配连网资源。在接收到连网资源分配请求时,当前主控组网设备从连网资源序列中选择一个某个位置上的连网资源序列,作为所分配的连网资源。当前主控组网设备可以通过特定的分配方式从预先获取的连网资源集合中为终端设备分配第一连网资源。其中,特定的分配方式可以是按照连网资源的编号顺序依次确定,也可以是随机确定的方式。具体地,当前主控组网设备按顺序从连网资源集合中选取一个,作为第一连网资源,并将第一连网资源发送给第一从控组网设备。例如:连网资源集合为192.168.1.100~192.168.1.200,则可以按顺序依次将192.168.1.100、192.168.1.101、……、192.168.1.200作为连网资源进行分配。在一个实施例中,连网资源集合可以为前述组网资源集合,当前主控组网设备按照顺序依次从组网资源集合中获取资源,分别作为对应的组网资源和连网资源。在一个实施例中,以第一从控组网设备加入到组网系统为时间节点。在第一从控组网设备加入组网系统之前,第一从控组网设备以及与第一从控组网设备连接的终端设备发出的资源分配请求为组网资源分配请求;在第一从控组网设备加入组网系统之后,第一从控组网设备以及与第一从控组网设备连接的终端设备发出的资源分配请求为连网资源分配请求。In one embodiment, after the networking system is set up, that is, after the networking devices are all added to the networking system corresponding to the first network area, the current master networking device can send a message to the slave controlling group in the networking system. Network equipment and terminal equipment allocate networking resources. When receiving the network connection resource allocation request, the current master network formation device selects a network connection resource sequence at a certain position from the network connection resource sequence as the allocated network connection resource. The current master networking device can allocate the first networking resource to the terminal device from the set of networking resources acquired in advance in a specific allocation manner. The specific allocation mode may be determined sequentially according to the serial number sequence of the networking resources, or may be determined randomly. Specifically, the current master networking device selects one of the networking resource sets in sequence as the first networking resource, and sends the first networking resource to the first slave networking device. For example, if the set of networking resources is 192.168.1.100 to 192.168.1.200, then 192.168.1.100, 192.168.1.101, ..., 192.168.1.200 can be allocated as networking resources in sequence. In one embodiment, the networking resource set may be the aforementioned networking resource set, and the current master networking device obtains resources from the networking resource set in sequence as corresponding networking resources and networking resources, respectively. In one embodiment, the time node is the time when the first slave-controlled networking device joins the networking system. Before the first slave-controlled networking device joins the networking system, the resource allocation request sent by the first slave-controlled networking device and the terminal device connected to the first slave-controlled networking device is a networking resource allocation request; After the controlling networking device joins the networking system, the resource allocation request sent by the first slave controlling networking device and the terminal device connected to the first slave controlling networking device is a networking resource allocation request.
在一个实施例中,响应于第一组网资源分配请求,基于组网资源集合向第一从控组网设备分配第一组网资源,以使得第一从控组网设备基于第一组网资源加入第一网络区域对应的组网系统并关闭网络资源发现服务之后,还包括:接收第一从控组网设备在关闭网络资源发现服务之后转发的由终端设备发送的终端连网资源分配请求;终端连网资源分配请求由终端设备基于第二组网资源发送给第一从控组网设备,第二组网资源由第一从控组网设备基于组网资源集合分配给终端设备;响应于终端连网资源分配请求,向终端设备分配第一连网资源,以使得终端设备基于第一连网资源进行网络连接。In one embodiment, in response to the first networking resource allocation request, the first networking resource is allocated to the first slave-controlled networking device based on the networking resource set, so that the first slave-controlled networking device is based on the first networking resource After the resource is added to the networking system corresponding to the first network area and the network resource discovery service is turned off, the method further includes: receiving a terminal networking resource allocation request sent by the terminal device and forwarded by the first slave-controlled networking device after turning off the network resource discovery service ; The terminal networking resource allocation request is sent by the terminal device to the first slave-controlled networking device based on the second networking resource, and the second networking resource is allocated to the terminal device by the first slave-controlled networking device based on the networking resource set; Response; In response to the terminal networking resource allocation request, a first networking resource is allocated to the terminal device, so that the terminal device performs network connection based on the first networking resource.
终端连网资源分配请求为终端设备获取连网资源的请求。终端设备基于所获取的连网资源可以进行网络连接,进而与自治网络外的其他终端或者服务器之间进行网络通信。The terminal networking resource allocation request is a request for the terminal device to acquire networking resources. The terminal device can perform network connection based on the acquired networking resources, and then perform network communication with other terminals or servers outside the autonomous network.
在一个实施例中,终端设备与组网系统中的某个组网设备建立有网络连接,该网络连接可以是有线网络连接方式也可以是无线网络连接方式。在需要获取组网资源时,终端设备向建立有网络连接的组网设备发送组网资源分配请求。进一步地,如图3所示,终端设备与第一从控组网设备之间通过目标网络连接方式连接。终端设备基于目标网络连接方式向第一从控组网设备发送第一组网资源分配请求,以请求获取第二组网资源并基于第二组网资源加入第一网络区域对应的组网系统中。在一个实施例中,如图3所示,终端设备与第一从控组网设备之间建立有网络连接关系,当第一从控组网设备尚未组网时,由于与当前主控组网设备之间的路还没有通,因此无法直接通过与当前主控组网设备的通信获取到组网资源,终端设备只能与第一从控组网设备之间进行通信。当第一从控组网设备完成组网时,终端设备可以基于组网资源与组网系统中的当前触控组网设备和上级主控组网设备进行通信,以通过组网设备分配连网资源。In one embodiment, the terminal device establishes a network connection with a certain networking device in the networking system, and the network connection may be a wired network connection or a wireless network connection. When it is necessary to acquire networking resources, the terminal device sends a networking resource allocation request to the networking device that has established a network connection. Further, as shown in FIG. 3 , the terminal device and the first slave control networking device are connected through a target network connection. The terminal device sends a first networking resource allocation request to the first slave-controlled networking device based on the target network connection mode, so as to request to acquire the second networking resource and join the networking system corresponding to the first network area based on the second networking resource . In one embodiment, as shown in FIG. 3 , a network connection relationship is established between the terminal device and the first slave networking device. The road between the devices has not been connected, so the networking resources cannot be directly obtained through communication with the current master networking device, and the terminal device can only communicate with the first slave networking device. When the first slave networking device completes networking, the terminal device can communicate with the current touch networking device and the upper-level master networking device in the networking system based on networking resources, so as to allocate networking through the networking devices resource.
在一个实施例中,第一从控组网设备在发出第二组网资源后,可以设置有效时间,当有效时间到达时关闭网络资源发现服务。另一方面,终端设备在接收到第二组网资源时,需要在有效时间内基于第二组网资源加入第一网络区域对应的组网系统,若超过有效时间未加入第一网络区域对应的组网系统,则组网终端需要直接向当前主控组网设备发送组网资源分配请求,以从当前主控组网设备中重新获取组网资源。从控组网设备通过分配组网资源能够负责一部分的组网资源分配工作,减少主控组网设备的运行压力,同时,通过有效时间的设置激励终端设备尽快加入到组网系统中,提高网络连接的效率,另外,基于有效时间的设置,能够将组网资源的分配集中到主控组网设备中,保证组网资源分配的有序性。具体地,这个时间限制主要是可以让终端设备尽快地完成组网,从路由完成组网之前,终端设备可以一直正常获取从路由分发的IP地址,当从路由完成组网之后,不再分发IP地址,终端设备可以在1分钟之内,从主路由重新获取IP地址,快速进入连网状态,即快速完成联网。In one embodiment, after sending out the second networking resource, the first slave-controlled networking device may set an effective time, and when the effective time arrives, the network resource discovery service is turned off. On the other hand, when the terminal device receives the second networking resource, it needs to join the networking system corresponding to the first network area based on the second networking resource within the valid time. In the networking system, the networking terminal needs to directly send a networking resource allocation request to the current master networking device to re-obtain networking resources from the current master networking device. The slave control networking equipment can be responsible for part of the networking resource allocation by allocating networking resources, reducing the operating pressure of the master networking equipment. The efficiency of connection, in addition, based on the setting of the effective time, the allocation of networking resources can be centralized to the main control networking equipment to ensure the orderly allocation of networking resources. Specifically, this time limit is mainly to allow the terminal device to complete the networking as soon as possible. Before the routing completes the networking, the terminal device can always obtain the IP address distributed from the routing normally. After the routing completes the networking, the IP address will no longer be distributed. The terminal device can re-obtain the IP address from the main route within 1 minute, and quickly enter the network connection state, that is, quickly complete the network connection.
在一个实施例中,终端设备向第一从控组网设备发送组网资源分配请求,第一从控组网设备可以访问当前主控组网设备获取的组网资源集合,以基于组网资源集合向终端设备分配第二组网资源。另外,第一从控组网设备也可以在接收到终端设备发送的组网资源分配请求时,将组网资源分配请求转发给当前主控组网设备,以使得当前主控组网设备基于组网资源集合向终端设备分配第二组网资源。In one embodiment, the terminal device sends a networking resource allocation request to the first slave-control networking device, and the first slave-control networking device can access the networking resource set acquired by the current master-control networking device to obtain a network resource based on the networking resources The set allocates the second networking resource to the terminal device. In addition, the first slave control networking device may also forward the networking resource allocation request to the current master networking device when receiving the networking resource allocation request sent by the terminal device, so that the current master networking device is based on the group The network resource set allocates the second network resource to the terminal device.
在一个实施例中,在获取到第二组网资源时,终端设备基于第二组网资源向加入第一网络区域对应的组网系统中,在通过显示屏等接收到连网触发操作时,基于第二组网资源向第一从控组网设备发送终端连网资源分配请求。此时,第一从控组网设备可以将终端设备发送的终端连网资源分配请求转发给当前主控组网设备。In one embodiment, when acquiring the second networking resource, the terminal device joins the networking system corresponding to the first network area based on the second networking resource, and when receiving a networking trigger operation through a display screen or the like, Send a terminal networking resource allocation request to the first slave-controlled networking device based on the second networking resource. At this time, the first slave control networking device may forward the terminal networking resource allocation request sent by the terminal device to the current master control networking device.
在一个实施例中,当前主控组网设备在接收到终端连网资源分配请求时,可以基于网络资源发现服务向终端设备分配第一连网资源,以使得终端设备基于第一连网资源进行网络连接。进一步地,终端设备可以基于第一连网资源连接互联网,进而与互联网中的其他终端或者服务器进行网络通信。In one embodiment, when the current master networking device receives a terminal networking resource allocation request, it may allocate first networking resources to the terminal device based on the network resource discovery service, so that the terminal device performs a network connection based on the first networking resource. Internet connection. Further, the terminal device may connect to the Internet based on the first networking resource, and then perform network communication with other terminals or servers in the Internet.
在一个实施例中,响应于终端连网资源分配请求,向终端设备分配第一连网资源,以使得终端设备基于第一连网资源进行网络连接,包括:响应于终端连网资源分配请求,向第一从控组网设备返回第一连网资源,以使得第一从控组网设备向终端设备分配第一连网资源并触发终端设备基于第一连网资源进行网络连接。In one embodiment, allocating the first networking resource to the terminal device in response to the terminal networking resource allocation request, so that the terminal device performs network connection based on the first networking resource, includes: in response to the terminal networking resource allocation request, Return the first networking resource to the first slave-controlled networking device, so that the first slave-controlled networking device allocates the first networking resource to the terminal device and triggers the terminal device to perform network connection based on the first networking resource.
在一个实施例中,组网设备可以设置配置管理页面。终端设备在获取到第二组网资源时,基于第二组网资源进入组网设备的配置管理页面,进行配置修改,修改组网设备的相关配置参数,例如:设置上网的信号名称或者密码等。In one embodiment, the networking device may set a configuration management page. When the terminal device obtains the second networking resource, it will enter the configuration management page of the networking device based on the second networking resource, modify the configuration, and modify the relevant configuration parameters of the networking device, such as setting the signal name or password for the Internet access, etc. .
上述实施例中,在第一从控组网设备关闭网络资源发现服务时,由当前主控组网设备向终端设备分配连网资源,通过网络资源发现服务的关闭,能使得组网系统中的连网资源都由当前主控组网设备分配,防止由多个组网设备进行连网资源的分配导致的混乱问题。In the above embodiment, when the network resource discovery service is disabled by the first slave control networking device, the current master networking device allocates networking resources to the terminal device. The networking resources are all allocated by the current master networking device to prevent confusion caused by the allocation of networking resources by multiple networking devices.
组网设备在组网期间不向组网设备分配连网资源,而仅向终端设备分配组网资源,能避免组网设备稳定之前组网设备互相分配IP地址的情况,保证组网系统在组网期间的稳定性。During networking, networking equipment does not allocate networking resources to networking equipment, but only allocates networking resources to terminal equipment, which can avoid the situation that networking equipment allocates IP addresses to each other before networking equipment is stable, and ensure that networking systems are in the grouping. stability during the network.
在一个实施例中,接收处于第一网络区域的第一从控组网设备发送的第一组网资源分配请求,包括:接收第一从控组网设备在确定第二从控组网设备对第一从控组网设备保持静默状态之后发送的第一组网资源分配请求;第二从控组网设备在对第一从控组网设备保持静默状态时处于开启网络资源发现服务的状态,并在接收到基于组网资源集合分配的第三组网资源时关闭网络资源发现服务。In an embodiment, receiving a first networking resource allocation request sent by a first slave-controlled networking device located in a first network area includes: receiving the first slave-controlled networking device when determining that the second slave-controlled networking device has a pair of A first networking resource allocation request sent after the first slave-controlled networking device keeps a silent state; the second slave-controlled networking device is in a state of enabling network resource discovery services when the first slave-controlled networking device keeps a silent state, And when the third networking resource allocated based on the networking resource set is received, the network resource discovery service is turned off.
在一个实施例中,在当前主控组网设备为主路由时,主路由可以工作在路由模式下,也可以工作在桥接模式下。其中,路由模式是组网设备的一种工作模式,在路由模式下有完整的防火墙系统和IP管理系统,工作在路由模式的组网设备,会与连接的上级网络分离。即,主路由与从路由组网形成一个独立的自治网络。主路由负责整个网络的IP地址分配和管理。在路由模式下,自治网络与外界是网络隔离的,主路由是出口,也就是针对自治网络的对外出口。桥接模式也称AP或Bridge模式,组网设备的一种工作模式,在桥接模式下,组网设备与上级网络融合,透明地共用同一个IP管理系统,实现网络自治。In one embodiment, when the current master control networking device is the main route, the main route may work in a routing mode or in a bridge mode. Among them, routing mode is a working mode of networking equipment. In routing mode, there is a complete firewall system and IP management system. The networking equipment working in routing mode will be separated from the connected upper-level network. That is, the master router and the slave router form an independent autonomous network. The main router is responsible for the IP address allocation and management of the entire network. In routing mode, the autonomous network is isolated from the outside world, and the main route is the egress, that is, the external egress for the autonomous network. Bridge mode, also known as AP or Bridge mode, is a working mode of networking equipment. In bridge mode, networking equipment integrates with the upper-level network and transparently shares the same IP management system to achieve network autonomy.
在一个实施例中,当前主控组网设备通过输入接口接收模式选择指令,基于所接收的模式选择指令确定工作模式,即确定用户选择的是路由模式还是桥接模式。进而按照对应的工作模式进行组网分配。In one embodiment, the current master networking device receives the mode selection instruction through the input interface, and determines the working mode based on the received mode selection instruction, that is, determines whether the user selects the routing mode or the bridge mode. Then, the network allocation is performed according to the corresponding working mode.
在一个实施例中,第一从控组网设备在获取到第一组网资源时加入第一网络区域对应的组网系统,第二从控组网设备在获取到第三组网资源时加入第一网络区域对应的组网系统。此时,如图4所示,当前主控组网设备、第一从控组网设备以及第二从控组网设备构成自治网络,由当前主控组网设备对自治网络内的组网资源和连网资源进行集中分配。In one embodiment, the first slave-control networking device joins the networking system corresponding to the first network area when it acquires the first networking resource, and the second slave-control networking device joins the third networking resource when it acquires the third networking resource. The networking system corresponding to the first network area. At this time, as shown in FIG. 4 , the current master networking device, the first slave networking device and the second slave networking device form an autonomous network, and the current master networking device controls the networking resources in the autonomous network. and centralized allocation of networking resources.
在一个实施例中,第二从控组网设备在启动后可以开启网络资源发现服务,当接收到第一从控组网设备发送的组网资源分配请求时,对第一从控组网设备保持静默状态,即不响应第一从控组网设备发送的组网资源分配请求。在一些实施例中,第二从控组网设备在接收到第一从控组网设备发送的组网资源分配请求时,也可以向第一从控组网设备发送不响应请求的提示信息。第一从控组网设备在确定第二从控组网设备保持静默状态或者接收到第二从控组网设备发送的不响应请求的提示信息时,向当前主控组网设备发送第一组网资源分配请求。In one embodiment, the second slave-control networking device may enable a network resource discovery service after startup, and when receiving a networking resource allocation request sent by the first slave-control networking device, the first slave-control networking device Keeping the silent state, that is, not responding to the networking resource allocation request sent by the first slave-controlling networking device. In some embodiments, when receiving the networking resource allocation request sent by the first slave networking device, the second slave networking device may also send prompt information of not responding to the request to the first slave networking device. When the first slave control networking device determines that the second slave control networking device remains in a silent state or receives the prompt message of not responding to the request sent by the second slave control networking device, it sends the first group to the current master networking device. network resource allocation request.
在一个实施例中,第二从控组网设备可以向当前主控组网设备发送组网资源分配请求,当前主控组网设备可以基于组网资源集合向第二从控组网设备分配第三组网资源,此时,第二从控组网设备可以基于第三组网资源加入第一网络区域对应的组网系统,也即,加入到与当前主控组网设备对应的组网系统中,此时,第二从控组网设备可以关闭网络资源发现服务,以停止向终端设备或者其他组网设备分配组网资源和连网资源。In one embodiment, the second slave networking device may send a networking resource allocation request to the current master networking device, and the current master networking device may allocate the second slave networking device to the second slave networking device based on the set of networking resources. Three networking resources, at this time, the second slave networking device can join the networking system corresponding to the first network area based on the third networking resource, that is, join the networking system corresponding to the current master networking device , at this time, the second slave-controlled networking device may close the network resource discovery service to stop allocating networking resources and networking resources to the terminal device or other networking devices.
在一个实施例中,第一从控组网设备向第二从控组网设备发送组网资源分配请求,在确定第二从控组网设备对第一从控组网设备保持静默状态时,向当前主控组网设备发送第一组网资源分配请求。In one embodiment, the first slave-controlled networking device sends a networking resource allocation request to the second slave-controlled networking device, and when it is determined that the second slave-controlled networking device keeps the first slave-controlled networking device in a silent state, Send a first networking resource allocation request to the current master networking device.
上述实施例中,从控组网设备不响应其他从控组网设备发送的组网资源发送请求,即,对其他从控组网设备保持静默状态,使得组网过程中各个从控组网设备仅能从当前主控组网设备中获取到组网资源,实现组网资源的集中分配,进而保证组网资源分配的有序性,可以有效提高组网的效率。In the above-mentioned embodiment, the slave-control networking device does not respond to the request for sending networking resources sent by other slave-control networking devices, that is, it keeps a silent state for other slave-control networking devices, so that each slave-control networking device in the networking process is in a silent state. The networking resources can only be obtained from the current main control networking equipment to realize the centralized allocation of networking resources, thereby ensuring the orderly allocation of networking resources, and effectively improving the efficiency of networking.
在一个实施例中,当前主控组网设备、第一从控组网设备和第二从控组网设备可以在每次重新启动后都重新开启网络资源发现服务,以重新进行组网和网络连接。其中,当前主控组网设备、第一从控组网设备和第二从控组网设备可以在断电重连或者接收到用户的网络重组网操作时重新启动。In one embodiment, the current master networking device, the first slave networking device, and the second slave networking device may restart the network resource discovery service after each reboot, so as to perform networking and networking again connect. Wherein, the current master networking device, the first slave networking device and the second slave networking device can be restarted when the power is cut off and reconnected or when a user's network reorganization operation is received.
在一个实施例中,从控组网设备在启动后可以基于网络资源发现服务向组网系统中的各个组网设备同步发送组网资源分配请求。接收到组网资源分配请求的从控组网设备会保持静默状态。接收到组网资源分配请求的当前主控组网设备会进行响应,进而向发出组网资源分配请求的从控组网设备分配组网资源。In one embodiment, the slave-controlled networking device may send a networking resource allocation request synchronously to each networking device in the networking system based on the network resource discovery service after being started. The slave networking device that receives the networking resource allocation request will remain silent. The current master networking device that receives the networking resource allocation request will respond, and then allocate networking resources to the slave networking device that sent the networking resource allocation request.
当前主控组网设备和第一从控组网设备之间可以通过特定的网络连接方式进行网络连接。其中,网络连接方式包括无线连接方式和有线连接方式。而当前主控组网设备和第一从控组网设备的数量都可以为至少一个。对于当前主控组网设备为一个,第一从控组网设备为多个的情况,当前主控组网设备和各个从控组网设备之间可以采用不同的网络连接方式。例如:当前主控组网设备A与第一从控组网设备B之间采用有线连接方式,而与第二从控组网设备C之间采用无线连接方式。The network connection between the current master control networking device and the first slave control networking device may be performed in a specific network connection manner. The network connection method includes a wireless connection method and a wired connection method. The number of the current master networking device and the first slave networking device may be at least one. For the case where there is one current master networking device and multiple first slave networking devices, different network connection modes may be used between the current master networking device and each slave networking device. For example, a wired connection is used between the current master networking device A and the first slave networking device B, while a wireless connection is adopted between the master networking device A and the second slave networking device C.
在一个实施例中,组网系统中各个组网设备之间采用单一的网络连接方式,即相同的网络连接方式。具体地,各个组网设备之间均采用无线连接方式,或者均采用有线连接方式。通过这样的设置,能使得组网系统中组网设备之间仅有一种通信方式,不会出现两个组网设备之间同时采用无线连接和有线连接的方式进行通信的环路问题,进而保证组网系统的网络稳定性。另外,采用单一的网络连接方式也能降低组网线路的复杂性以及组网系统出现故障的概率。In one embodiment, a single network connection mode, that is, the same network connection mode, is used between each networking device in the networking system. Specifically, each networking device adopts a wireless connection mode, or a wired connection mode. Through this setting, there is only one communication method between the networking devices in the networking system, and there will be no loop problem that the two networking devices use wireless connection and wired connection at the same time to communicate, thereby ensuring that Network stability of the networking system. In addition, the use of a single network connection method can also reduce the complexity of the networking line and the probability of failure of the networking system.
进一步地,第一从控组网设备基于目标网络连接方式与第二从控组网设备通信;接收处于第一网络区域的第一从控组网设备发送的第一组网资源分配请求,包括:接收第一从控组网设备基于目标网络连接方式发送的第一组网资源分配请求。Further, the first slave control networking device communicates with the second slave control networking device based on the target network connection mode; receiving the first networking resource allocation request sent by the first slave control networking device in the first network area, including : Receive the first networking resource allocation request sent by the first slave control networking device based on the target network connection mode.
其中,目标网络连接方式包括无线连接方式或者有线连接方式。无线连接方式简单快捷,能有效提高终端设备网络连接的效率。相比较而言,有线连接方式更稳定,吞吐量更大,性能更高,因此可以通过有线连接方式能保证从控组网设备和主控组网设备之间更稳定的通信。The target network connection method includes a wireless connection method or a wired connection method. The wireless connection method is simple and fast, which can effectively improve the network connection efficiency of the terminal equipment. Comparatively speaking, the wired connection method is more stable, the throughput is larger, and the performance is higher. Therefore, the wired connection method can ensure more stable communication between the slave control networking device and the master control networking device.
在一个实施例中,第一从控组网设备通过有线连接方式向第二从控组网设备发送组网资源分配请求。第一从控组网设备通过有线连接方式向当前主控组网设备发送第一组网资源分配请求。进一步地,当前主控组网设备也可以基于有线连接方式向第一从控组网设备返回第一组网资源。也即,分布式组网系统中上级主控组网设备、当前主控组网设备、第一从控组网设备和第二从控组网设备之间均采用有线连接方式进行网络通信。In one embodiment, the first slave-control networking device sends a networking resource allocation request to the second slave-control networking device through a wired connection. The first slave-control networking device sends a first networking resource allocation request to the current master-control networking device through a wired connection. Further, the current master networking device may also return the first networking resource to the first slave networking device based on a wired connection. That is, in the distributed networking system, the upper-level master networking device, the current master networking device, the first slave networking device and the second slave networking device all use wired connections for network communication.
在一个实施例中,第一组网资源分配请求中携带第一从控组网设备对应的设备集群标识;响应于第一组网资源分配请求,基于组网资源集合向第一从控组网设备分配第一组网资源,包括:当根据第一从控组网设备对应的设备集群标识确定第一从控组网设备对应的设备集群为第一网络区域内的设备集群时,响应于第一组网资源分配请求,基于组网资源集合向第一从控组网设备分配第一组网资源。In one embodiment, the first networking resource allocation request carries a device cluster identifier corresponding to the first slave-controlling networking device; in response to the first networking resource allocation request, the first slave-controlling networking Allocating the first networking resource by the device includes: when it is determined according to the device cluster identifier corresponding to the first slave control networking device that the device cluster corresponding to the first slave control networking device is a device cluster in the first network area, responding to the first slave control networking device. A group of network resource allocation request, based on the network resource set, to allocate the first network resource to the first slave control network device.
其中,设备集群标识包括对组网设备所在的集群进行区分的标识,可以通过特定的编号实现。The device cluster identifier includes an identifier for distinguishing the cluster where the networking device is located, which can be implemented by a specific number.
集群可以为由多个组网设备组合成的集合,一个设备集群可以为特定空间区域内的设备,其中,特定空间区域可以为按照物理结构划分的特定物理空间区域,也可以按照网络覆盖范围划分的特定空间区域。例如:设备集群为某个家庭区域内的所有设备,包括电脑、智能手机、智能电视、智能洗衣机、智能音箱、智能冰箱、智能门锁、Pad(portableandroid device,平板电脑)或者可穿戴设备等中的至少一项。A cluster can be a collection of multiple networking devices, and a device cluster can be a device in a specific space area, where the specific space area can be a specific physical space area divided according to the physical structure, or can be divided according to the network coverage. specific space area. For example, a device cluster is all devices in a home area, including computers, smartphones, smart TVs, smart washing machines, smart speakers, smart refrigerators, smart door locks, Pads (portableandroid devices, tablet computers) or wearable devices, etc. at least one of.
在一个实施例中,设备集群标识可以根据网络区域来确定,不同的网络区域内的组网设备所对应的设备集群标识是不同的。进一步地,第一网络区域内的组网设备携带用于标识第一网络区域的设备集群标识。更进一步地,设备集群标识可以房间号,例如,将房间号作为同一房间内的所有组网设备的设备集群标识。具体地,对于设置在302房间的组网系统。302房间内的所有组网设备在与其他组网设备进行通信时,均会在通信数据中携带设备集群标识:302,其他组网设备能够基于组网设备所携带的设备集群标识获知到对应的组网设备为302房间内的组网设备。In one embodiment, the device cluster identifier may be determined according to the network area, and the device cluster identifiers corresponding to the networking devices in different network areas are different. Further, the networking devices in the first network area carry a device cluster identifier for identifying the first network area. Further, the device cluster identifier may be a room number, for example, the room number is used as the device cluster identifier of all networking devices in the same room. Specifically, for the networking system set up in room 302. 302 All networking devices in the room will carry the device cluster ID in the communication data when communicating with other networking devices: 302, other networking devices can learn the corresponding device cluster ID based on the device cluster ID carried by the networking device. The networking equipment is the networking equipment in room 302.
进一步地,当网络资源发现服务为DHCP时,设备集群标识可以通过OPTION字段来携带设备集群标识,此时设备集群标识也可以称为OPTION或者OPTION标识,能够用于区分不同的终端设备形态。在一个实施例中,OPTION能够在当前主控组网设备对应的自治网络内传输,自治网络内的组网设备能够基于OPTION确定出对应的设备为同一自治网络内的设备,进而对设备发送的请求等进行响应。进一步地,自治网络内的从控组网设备在与主控组网设备通信时都会携带OPTION。OPTION在当前主控组网设备对应的自治网络之外不进行传输。在一个实施例中,终端设备与组网设备通信时可以不携带OPTION。Further, when the network resource discovery service is DHCP, the device cluster identifier can carry the device cluster identifier through the OPTION field. At this time, the device cluster identifier can also be called OPTION or OPTION identifier, which can be used to distinguish different terminal device forms. In one embodiment, the OPTION can be transmitted in the autonomous network corresponding to the current master networking device, and the networking device in the autonomous network can determine, based on the OPTION, that the corresponding device is a device in the same autonomous network, and then send the message to the device. respond to requests, etc. Further, the slave control networking device in the autonomous network will carry OPTION when communicating with the master control networking device. OPTION does not transmit outside the autonomous network corresponding to the current master networking device. In one embodiment, the terminal device may not carry OPTION when communicating with the networking device.
上述实施例中,当前主控组网设备对设备集群标识进行分析,以确定第一从控组网设备所属的网络区域,当确定第一从控组网设备所属的网络区域为第一网络区域时,判定第一从控组网设备与当前主控组网设备位于同一网络区域,此时向第一从控组网设备分配第一组网资源。能够使得主控组网设备对所管辖的网络区域的组网资源分配,保证各个网络区域对应的组网系统的独立自治,进而保证所有设备网络连接的有序性。In the above embodiment, the current master control networking device analyzes the device cluster identifier to determine the network area to which the first slave control networking device belongs, and when it is determined that the network area to which the first slave control networking device belongs is the first network area. When it is determined that the first slave control networking device and the current master control networking device are located in the same network area, at this time, the first slave control networking device is allocated the first networking resource. It enables the master networking equipment to allocate networking resources to the network areas under its jurisdiction, to ensure the independence and autonomy of the networking systems corresponding to each network area, and to ensure the orderly network connections of all equipment.
传统技术中使用设置向导的方式管理网络资源发现服务,在向导设置完成后路由中网络资源发现服务的状态就被固定了,例如:主路由一直处于开启网络资源发现服务的状态,而从路由一直处于关闭网络资源发现服务的状态。这种方式一方面会增加用户的配置难度,另一方面,当组网设备中的主路由出现异常,因为从路由无法与主路由通信,导致从路由从网络中断开,由于网络资源发现服务已关闭,用户无从有效地查看和管理异常设备,导致排障困难,增加维护成本。在一个实施例中,在当前主控组网设备出现故障时,第一从控组网设备可以重新开启网络资源发现服务,并基于网络资源发现服务向终端设备分配连网资源,并保证终端设备进行网络连接。通过这样的处理方式,能使得主控组网设备出现故障时,终端设备仍能正常分发到连网资源,进而保证终端设备网络连接的稳定性。另外,用户也可以基于重新开启的网络资源发现服务查看和管理异常的组网设备,以进行故障排除。In the traditional technology, the setting wizard is used to manage the network resource discovery service. After the wizard setting is completed, the status of the network resource discovery service in the route is fixed. In the state where the network resource discovery service is turned off. On the one hand, this method will increase the difficulty of configuration for users. On the other hand, when the main route in the networking device is abnormal, because the secondary route cannot communicate with the main route, the secondary route is disconnected from the network. Due to the network resource discovery service It has been closed, and users cannot effectively view and manage abnormal equipment, resulting in difficulty in troubleshooting and increased maintenance costs. In one embodiment, when the current master networking device fails, the first slave networking device can restart the network resource discovery service, allocate networking resources to the terminal device based on the network resource discovery service, and ensure that the terminal device Make a network connection. Through such a processing method, when the main control networking device fails, the terminal device can still be distributed to the networking resources normally, thereby ensuring the stability of the network connection of the terminal device. In addition, users can view and manage abnormal networking devices based on the restarted network resource discovery service for troubleshooting.
在一个实施例中,基于分布式组网系统的网络连接方法,还包括:接收第三从控组网设备发送的第二组网资源分配请求;第二组网资源分配请求中携带第三从控组网设备对应的设备集群标识;当根据第三从控组网设备对应的设备集群标识确定第三从控组网设备对应的设备集群不是第一网络区域内的设备集群时,对第二组网资源分配请求保持静默状态。In one embodiment, the network connection method based on a distributed networking system further includes: receiving a second networking resource allocation request sent by a third slave control networking device; the second networking resource allocation request carries the third slave The device cluster identifier corresponding to the control networking device; when it is determined according to the device cluster identifier corresponding to the third slave networking device that the device cluster corresponding to the third slave networking device is not a device cluster in the first network area, the second The network resource allocation request remains silent.
上述实施例,当前主控组网设备对非第一网络区域内的从控组网设备发送的组网资源分配请求保持静默,能够使得主控组网设备对所管辖的网络区域的组网资源分配,保证各个网络区域对应的组网系统的独立自治,进而保证所有设备网络连接的有序性。In the above embodiment, the current master networking device keeps silent on the networking resource allocation requests sent by the slave networking devices not in the first network area, so that the master networking device can control the networking resources of the network area under its jurisdiction. Allocation ensures the independence and autonomy of the networking system corresponding to each network area, thereby ensuring the orderly network connection of all devices.
在一个实施例中,完成组网后的各个组网设备和终端设备均可以向当前主控组网设备发送连网资源分配请求,以从当前主控组网设备中获取连网资源。例如:当接收到第一从控组网设备发送的组网资源分配请求时,当前主控组网设备将192.168.1.100作为第一组网资源分配给第一从控组网设备;接下来,当接收到终端设备发送的组网资源分配请求时,当前主控组网设备将192.168.1.101作为组网资源分配给终端设备;再接下来,当接收到终端设备发送的连网资源分配请求时,当前主控组网设备将192.168.1.102作为连网资源分配给终端设备。In one embodiment, each networking device and terminal device after completing networking can send a networking resource allocation request to the current master networking device to obtain networking resources from the current master networking device. For example: when receiving the networking resource allocation request sent by the first slave networking device, the current master networking device allocates 192.168.1.100 as the first networking resource to the first slave networking device; next, When receiving the networking resource allocation request sent by the terminal device, the current master networking device allocates 192.168.1.101 as the networking resource to the terminal device; then, when receiving the networking resource allocation request sent by the terminal device , the current master networking device allocates 192.168.1.102 as a networking resource to the terminal device.
在一个实施例中,响应于第一组网资源分配请求,基于组网资源集合向第一从控组网设备分配第一组网资源之后,还包括:接收第一从控组网设备基于第一组网资源发送的连网资源分配请求;响应于第一从控组网设备发送的连网资源分配请求,向第一从控组网设备分配第二连网资源,以使得第一从控组网设备基于第二连网资源进行网络连接。In one embodiment, in response to the first networking resource allocation request, after allocating the first networking resource to the first slave-controlled networking device based on the networking resource set, the method further includes: receiving the first slave-controlled networking device based on the first slave-controlled networking device A network resource allocation request sent by a group of network resources; in response to the network resource allocation request sent by the first slave control networking device, a second network resource is allocated to the first slave control networking device, so that the first slave control network device is allocated a second network resource. The networking device performs network connection based on the second networking resource.
在一个实施例中,第一从控组网设备发送连网资源分配请求时可以处于开启网络资源发现服务的状态,当接收到第二连网资源时,用第二连网资源替换第一组网资源,并基于第二连网资源进行网络连接,关闭网络资源发现服务。In one embodiment, the first slave-controlled networking device may be in a state of enabling the network resource discovery service when sending the networking resource allocation request, and when receiving the second networking resource, replace the first group with the second networking resource network resource, and perform network connection based on the second networking resource, and disable the network resource discovery service.
上述实施例,第一从控组网设备获取到第一组网资源后能够进行网络组建。基于所组建的网络可以获取连网资源,进而与组网系统以外的终端设备或者服务器等进行网络通信,进而保证从控组网设备的正常网络通信。In the above embodiment, after the first slave control networking device obtains the first networking resource, the network can be formed. Based on the established network, networking resources can be obtained, and then network communication can be performed with terminal devices or servers other than the networking system, thereby ensuring normal network communication of the slave-controlled networking devices.
在一个实施例中,响应于所述第一组网资源分配请求,基于所述组网资源集合向所述第一从控组网设备分配第一组网资源之前,还包括:接收第一从控组网设备基于第一组网资源发送的连网资源分配请求;对第一组网资源发送的连网资源分配请求保持静默。In an embodiment, in response to the first networking resource allocation request, before allocating the first networking resource to the first slave-controlled networking device based on the networking resource set, the method further includes: receiving a first slave The networking control device is based on the networking resource allocation request sent by the first networking resource; and keeps silent on the networking resource allocation request sent by the first networking resource.
在一个实施例中,如图5所示,提供了一种基于分布式组网系统的网络连接方法,该方法应用于由上级主控组网设备、当前主控组网设备、第一从控组网设备、第二从控组网设备以及终端设备组成的分布式组网系统中。其中,上级主控组网设备用于对第二网络区域内的网络连接进行管控。当前主控组网设备与上级主控组网设备连接,并对第一网络区域内的网络连接进行管控。其中,第一网络区域为位于第二网络区域范围内的网络区域。该方法包括以下步骤:In one embodiment, as shown in FIG. 5 , a network connection method based on a distributed networking system is provided, and the method is applied to the networking equipment controlled by the upper-level master, the networking equipment currently under the master control, and the first slave controller. In the distributed networking system composed of the networking equipment, the second slave control networking equipment and the terminal equipment. Wherein, the upper-level main control networking device is used to manage and control the network connection in the second network area. The current main control networking device is connected to the upper-level main control networking device, and manages and controls the network connection in the first network area. The first network area is a network area located within the scope of the second network area. The method includes the following steps:
S502,当前主控组网设备、第一从控组网设备以及第二从控组网设备启动,并各自开启网络资源发现服务。S502 , the current master networking device, the first slave networking device, and the second slave networking device are started, and respectively enable the network resource discovery service.
S504,当前主控组网设备基于网络资源发现服务从上级主控组网设备中获取第一网络区域对应的组网资源集合。S504, the current main control networking device acquires a network resource set corresponding to the first network area from the upper-level main control networking device based on the network resource discovery service.
S506,第一从控组网设备基于网络资源发现服务向当前主控组网设备和第二从控组网设备发送组网资源分配请求。S506, the first slave control networking device sends a networking resource allocation request to the current master control networking device and the second slave control networking device based on the network resource discovery service.
S508,第二从控组网设备对第一从控组网设备发送的组网资源分配请求保持静默状态。S508, the second slave control networking device keeps a silent state for the networking resource allocation request sent by the first slave control networking device.
S510,当前主控组网设备确定第一从控组网设备对应的设备集群为第一网络区域内的设备集群时,响应于第一从控组网设备发送的组网资源分配请求,基于组网资源集合向第一从控组网设备分配第一组网资源。S510: When the current master networking device determines that the device cluster corresponding to the first slave networking device is a device cluster in the first network area, in response to the networking resource allocation request sent by the first slave networking device, based on the group The network resource set allocates the first networking resource to the first slave-controlled networking device.
S512,第一从控组网设备基于第一组网资源加入第一网络区域对应的组网系统并关闭网络资源发现服务。S512, the first slave-controlled networking device joins the networking system corresponding to the first network area based on the first networking resource and disables the network resource discovery service.
S514,第二从控组网设备基于网络资源发现服务向当前主控组网设备和第一从控组网设备发送组网资源分配请求。S514, the second slave control networking device sends a networking resource allocation request to the current master control networking device and the first slave control networking device based on the network resource discovery service.
S516,第一从控组网设备对第二从控组网设备发送的组网资源分配请求保持静默状态。S516, the first slave control networking device keeps a silent state for the networking resource allocation request sent by the second slave control networking device.
S518,当前主控组网设备确定第二从控组网设备对应的设备集群为第一网络区域内的设备集群时,响应于第二从控组网设备发送的组网资源分配请求,基于组网资源集合向第二从控组网设备分配第三组网资源。S518, when the current master networking device determines that the device cluster corresponding to the second slave networking device is a device cluster in the first network area, in response to the networking resource allocation request sent by the second slave networking device, based on the group The network resource set allocates the third networking resource to the second slave-controlled networking device.
S520,第二从控组网设备基于第三组网资源加入第一网络区域对应的组网系统。S520, the second slave control networking device joins the networking system corresponding to the first network area based on the third networking resource.
S522,当接收到终端设备发送的组网资源分配请求时,第二从控组网设备触发当前主控组网设备基于组网资源集合向终端设备分配第二组网资源,终端设备基于第二组网资源加入第一网络区域对应的组网系统中。S522, when receiving the networking resource allocation request sent by the terminal device, the second slave networking device triggers the current master networking device to allocate the second networking resource to the terminal device based on the networking resource set, and the terminal device based on the second networking resource The networking resources are added to the networking system corresponding to the first network area.
S524,第二从控组网设备关闭网络资源发现服务。S524, the second slave control networking device closes the network resource discovery service.
S526,第二从控组网设备接收到终端设备基于第二组网资源发送的终端连网资源分配请求时,基于第一组网资源向当前主控组网设备转发终端连网资源分配请求。S526: When receiving the terminal networking resource allocation request sent by the terminal device based on the second networking resource, the second slave networking device forwards the terminal networking resource allocation request to the current master networking device based on the first networking resource.
S528,当前主控组网设备响应于终端连网资源分配请求,向终端设备分配第一连网资源。S528, the current master networking device allocates the first networking resource to the terminal device in response to the terminal networking resource allocation request.
S530,终端设备基于第一连网资源进行网络连接。S530, the terminal device performs network connection based on the first network connection resource.
上述基于分布式组网系统的网络连接方法中,通过网络资源发现服务的开启和关闭控制,使得组网过程中仅由当前主控组网设备进行组网资源的分配,以对组网系统中的第一从控组网设备、第二从控组网设备以及终端设备的组网资源进行有序控制,另外,在组网完成后,由当前主控组网设备集中进行连网资源的分配,能保证组网设备和终端设备的有序网络连接。In the above-mentioned network connection method based on the distributed networking system, the on and off control of the network resource discovery service is used, so that only the current main control networking device allocates the networking resources in the networking process, so as to control the network resources in the networking system. The network resources of the first slave control networking equipment, the second slave control networking equipment and the terminal equipment are controlled in an orderly manner. In addition, after the networking is completed, the current master networking equipment will centrally allocate the networking resources. , which can ensure the orderly network connection of networking equipment and terminal equipment.
在一个实施例中,提供一种基于分布式组网系统的网络连接方法的应用场景。该应用场景如图6所示。图6中,上级主控组网设备为上级路由,当前主控组网设备为主路由,第一从控组网设备为从路由1,第二从控组网设备为从路由2。主路由工作在路由模式下。从路由1以及从路由2在从主路由中获取到组网IP地址后进行组网,在组网完成后构建成由主路由、从路由1和从路由2构成的自治网络,终端设备也可以获取组网IP地址,以与自治网络中的路由进行通信,从自治网络中获取IP地址,通过所获取的IP地址对组网IP地址进行更新,进而基于所获取的IP地址进行网络连接。各个主体执行的动作如图7所示,以下进行详细说明:In one embodiment, an application scenario of a network connection method based on a distributed networking system is provided. The application scenario is shown in Figure 6. In Figure 6, the upper-level master networking device is the upper-level router, the current master networking device is the master router, the first slave-control networking device is the
1、开启DHCP服务。在断电重连或者接收到用户的网络重组网操作时,主路由、从路由1和从路由2重新启动并开启DHCP服务。1. Enable DHCP service. When a power failure is reconnected or a user's network reorganization operation is received, the master router,
2、主路由获取组网IP地址。主路由作为DHCP客户端向上级路由、从路由1和从路由2请求获取组网IP地址。从路由1和从路由2对主路由保持静默状态,而上级路由向主路由分配广域网组网IP地址集合,作为组网资源集合。同时,主路由使用其中一个组网IP地址。在接收到上级路由返回的组网IP地址集合时,主路由组网成功,等待从路由和终端设备请求获取组网IP地址的组网请求。假设主路由从上级路由中获取的广域网组网IP地址集合为10.1.10.100。2. The main router obtains the network IP address. As a DHCP client, the master router requests the upper-level router,
主路由加入上级网络,要上联上级网络请求组网IP地址,主路由下联下级网络,可以基于DHCP向下级网络分发组网IP地址。组网IP地址可以认为是从路由还没有组网之前分发的临时IP地址。组网之后,终端设备的组网IP地址会被更新为连网IP地址。The main route is added to the upper-level network. It needs to be connected to the upper-level network to request the networking IP address. The main route is connected to the lower-level network and can distribute the networking IP address to the lower-level network based on DHCP. The networking IP address can be regarded as a temporary IP address distributed by the slave router before networking. After networking, the networking IP address of the terminal device will be updated to the networking IP address.
3、从路由1请求获取组网IP地址。从路由1设置OPTION标识,作为DHCP客户端向主路由和从路由2请求组网IP地址。3. Request the network IP address from
4、从路由1加入主路由自治网络并关闭DHCP服务。主路由基于所获取的广域网组网IP地址集合向从路由1分配局域网组网IP地址1。该组网IP地址1可以为基于10.1.10.100得到的IP地址192.168.1.100。从路由1收到主路由分发的组网IP地址1时关闭DHCP服务,此时从路由1组网成功(加入主路由自治网络)。4. Join the main route autonomous network from
5、从路由2请求获取组网IP地址。从路由2设置OPTION标识,作为DHCP客户端向主路由请求组网IP地址。在完成组网之前,从路由2是可以为终端设备分配组网IP地址的。因此,此时从路由2可以正常为终端设备分发组网IP地址。完成组网之后,不会再分配IP地址给终端设备,终端设备的IP地址应转由主路由分配。5. Request the network IP address from route 2. Set the OPTION flag from Route 2 to request a networking IP address from the main route as a DHCP client. Before completing the networking, router 2 can assign networking IP addresses to terminal devices. Therefore, at this time, the secondary route 2 can normally distribute the networking IP address to the terminal device. After the networking is completed, no IP addresses will be assigned to the terminal devices, and the IP addresses of the terminal devices should be assigned by the main route.
6、从路由2加入主路由自治网络并关闭DHCP服务。主路由基于所获取的广域网组网IP地址集合向从路由2分配局域网组网IP地址2。该组网IP地址2可以为基于10.1.10.100得到的IP地址192.168.1.101。从路由2收到主路由分发的组网IP地址2时关闭DHCP服务,此时从路由2组网成功(加入主路由自治网络)。6. Join the main route autonomous network from route 2 and turn off the DHCP service. The master router assigns the LAN network IP address 2 to the slave router 2 based on the obtained WAN network IP address set. The networking IP address 2 may be the IP address 192.168.1.101 obtained based on 10.1.10.100. When the slave router 2 receives the networking IP address 2 distributed by the master router, the DHCP service is disabled. At this time, the slave router 2 is successfully networked (joins the master router autonomous network).
7、终端设备请求获取组网IP地址。终端设备启动后作为DHCP客户端,向从路由2请求组网IP地址,从路由2触发主路由向终端设备返回组网IP地址。7. The terminal device requests to obtain the networking IP address. After the terminal device is started, it acts as a DHCP client and requests the network IP address from the secondary route 2, and the secondary route 2 triggers the main route to return the network IP address to the terminal device.
8、终端设备加入主路由自治网络。终端设备收到从路由2基于主路由所获取的广域网分发的组网IP地址3。该组网IP地址3可以为基于10.1.10.100得到的IP地址192.168.1.102。基于组网IP地址3在1分钟的有效时间内加入主路由自治网络。如果在1分钟内未加入主路由自治网络,则说明从路由2已经关闭DHCP服务,此时终端设备向主路由请求组网IP地址。8. The terminal device joins the main routing autonomous network. The terminal device receives the networking IP address 3 distributed from the Route 2 based on the WAN obtained from the main route. The networking IP address 3 may be the IP address 192.168.1.102 obtained based on 10.1.10.100. Based on the networking IP address 3, join the main routing autonomous network within a valid time of 1 minute. If the master router does not join the autonomous network within 1 minute, the slave router 2 has disabled the DHCP service, and the terminal device requests the master router for a networking IP address.
经过以上步骤,最终达成网络自治状态,从路由1、从路由2、终端设备都终归于主路由管理。此时由主路由负责向终端设备和从路由分配IP地址。After the above steps, the network autonomous state is finally achieved, and the
9、终端设备请求更新IP地址。终端设备向从路由2请求IP地址更新,由于从路由2在组网成功后,会自动关闭DHCP服务,终端设备会转向主路由请求IP地址。9. The terminal device requests to update the IP address. The terminal device requests an IP address update from the secondary route 2. After the secondary route 2 is successfully networked, the DHCP service will be automatically turned off, and the terminal device will turn to the primary route to request an IP address.
10、终端设备连网。主路由分发IP地址(为与组网IP地址区分,该IP地址也可以称为连网IP地址)给终端设备。该IP地址可以为基于10.1.10.100得到的IP地址192.168.1.103。终端设备基于分发的IP地址替换之前分配的组网IP地址3进行连网,连网成功。10. The terminal equipment is connected to the network. The main route distributes an IP address (to distinguish it from a networking IP address, the IP address may also be called a networking IP address) to the terminal device. The IP address may be the IP address 192.168.1.103 obtained based on 10.1.10.100. The terminal device connects to the network based on the distributed IP address by replacing the previously assigned networking IP address 3, and the networking succeeds.
在一个实施例中,从路由对其他路由发送的获取组网IP地址的请求保持静默。如图7所示,从路由2收到来自主路由和从路由1的IP地址获取请求,对主路由和从路由1的IP地址获取请求保持静默,不为其分配IP地址(因为从路由1的IP地址应由主路由分配和管理);从路由1收到来自主路由和从路由2的IP地址获取请求,对主路由和从路由2的IP地址获取请求保持静默,不为其分配IP地址(因为从路由2的IP地址应由主路由分配和管理)。In one embodiment, requests sent by the slave route to other routes to obtain the networking IP address remain silent. As shown in Figure 7, the slave route 2 receives the IP address acquisition request from the main route and the
上述实施例至少具有以下有益效果:The above-mentioned embodiments at least have the following beneficial effects:
1.在完成组网设备组网后,会根据组网设备角色,自动开启或者关闭DHCP服务。即使主路由出现故障,从路由也能通过重新开启DHCP服务的方式为终端设备分配IP地址。1. After completing the networking of the networking devices, the DHCP service will be automatically enabled or disabled according to the roles of the networking devices. Even if the primary router fails, the secondary router can assign IP addresses to terminal devices by restarting the DHCP service.
2.在自治网络构建过程以及构建好之后,由主路由集中进行IP地址的分配,以维持组网系统的IP地址统一性,避免IP地址混乱,保证网络的稳定性。2. During and after the construction of the autonomous network, the main router will centrally allocate IP addresses to maintain the uniformity of IP addresses in the networking system, avoid IP address confusion, and ensure network stability.
应该理解的是,虽然上述流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,上述流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the above flow charts are displayed in sequence according to the arrows, these steps are not necessarily executed in the sequence indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in the above flow chart may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution sequence of these steps or stages It is also not necessarily performed sequentially, but may be performed alternately or alternately with other steps or at least a portion of a step or phase within the other steps.
基于与上述实施例中的基于分布式组网系统的网络连接方法相同的思想,本申请还提供基于分布式组网系统的网络连接装置,该装置可用于执行上述基于分布式组网系统的网络连接方法。为了便于说明,基于分布式组网系统的网络连接装置实施例的结构示意图中,仅仅示出了与本申请实施例相关的部分,本领域技术人员可以理解,图示结构并不构成对装置的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Based on the same idea as the network connection method based on the distributed networking system in the above-mentioned embodiments, the present application also provides a network connection device based on the distributed networking system, which can be used to execute the above-mentioned network connection based on the distributed networking system. connection method. For convenience of description, in the schematic structural diagram of the embodiment of the network connection apparatus based on the distributed networking system, only the part related to the embodiment of the present application is shown, and those skilled in the art can understand that the illustrated structure does not constitute a reference to the apparatus. By definition, more or fewer components than shown may be included, or some components may be combined, or a different arrangement of components.
在一个实施例中,如图8所示,提供了一种基于分布式组网系统的网络连接装置800,应用于当前主控组网设备,该装置可以采用软件模块或硬件模块,或者是二者的结合成为计算机设备的一部分,该装置具体包括:资源集合获取模块802、分配请求接收模块804和组网系统加入模块806,其中:In one embodiment, as shown in FIG. 8 , a
资源集合获取模块802,用于基于网络资源发现服务从上级主控组网设备中获取第一网络区域对应的组网资源集合;所述上级主控组网设备携带有第二网络区域对应的组网资源集合,所述第一网络区域与所述第二网络区域存在对应关系。分配请求接收模块804,用于接收处于所述第一网络区域的第一从控组网设备发送的第一组网资源分配请求;所述第一组网资源分配请求由所述第一从控组网设备基于所开启的网络资源发现服务生成。组网系统加入模块806,用于响应于所述第一组网资源分配请求,基于所述组网资源集合向所述第一从控组网设备分配第一组网资源,以使得所述第一从控组网设备基于所述第一组网资源加入所述第一网络区域对应的组网系统并关闭网络资源发现服务。A resource set obtaining
上述基于分布式组网系统的网络连接装置中,通过网络资源发现服务的开启和关闭控制,能对组网系统中的当前主控组网设备和第一从控组网设备的组网资源进行有序控制,进而保证组网设备和终端设备的有序网络连接。In the above-mentioned network connection device based on the distributed networking system, through the on and off control of the network resource discovery service, the networking resources of the current master networking device and the first slave networking device in the networking system can be performed. Orderly control, thereby ensuring orderly network connection of networking equipment and terminal equipment.
在一个实施例中,所述装置,还包括:第一连网请求接收模块,用于接收所述第一从控组网设备在关闭网络资源发现服务之后转发的由终端设备发送的终端连网资源分配请求;所述终端连网资源分配请求由所述终端设备基于第二组网资源发送给所述第一从控组网设备,所述第二组网资源由所述第一从控组网设备基于所述组网资源集合分配给所述终端设备;第一连网资源分配模块,用于响应于所述终端连网资源分配请求,向所述终端设备分配第一连网资源,以使得所述终端设备基于所述第一连网资源进行网络连接。In one embodiment, the apparatus further includes: a first networking request receiving module, configured to receive a terminal networking request sent by the terminal device and forwarded by the first slave-controlled networking device after the network resource discovery service is turned off A resource allocation request; the terminal networking resource allocation request is sent by the terminal device to the first slave control networking device based on the second networking resource, and the second networking resource is sent by the first slave control group The network device is allocated to the terminal device based on the set of networking resources; the first networking resource allocation module is configured to allocate the first networking resource to the terminal device in response to the terminal networking resource allocation request, to The terminal device is caused to perform network connection based on the first networking resource.
在一个实施例中,分配请求接收模块,还用于接收所述第一从控组网设备在确定第二从控组网设备对所述第一从控组网设备保持静默状态之后发送的所述第一组网资源分配请求;所述第二从控组网设备在对所述第一从控组网设备保持静默状态时处于开启网络资源发现服务的状态,并在接收到基于所述组网资源集合分配的第三组网资源时关闭网络资源发现服务。In one embodiment, the allocation request receiving module is further configured to receive the information sent by the first slave-controlled networking device after determining that the second slave-controlled networking device keeps the first slave-controlled networking device in a silent state the first networking resource allocation request; the second slave-controlled networking device is in the state of enabling the network resource discovery service when it keeps the first slave-controlled networking device in a silent state, and receives a request based on the The network resource discovery service is turned off when the third network resource allocated by the network resource set is used.
在一个实施例中,所述第一从控组网设备基于目标网络连接方式与所述第二从控组网设备通信;分配请求接收模块,还用于接收所述第一从控组网设备基于所述目标网络连接方式发送的第一组网资源分配请求。In an embodiment, the first slave-control networking device communicates with the second slave-control networking device based on a target network connection; an allocation request receiving module is further configured to receive the first slave-control networking device The first networking resource allocation request sent based on the target network connection mode.
在一个实施例中,所述第一组网资源分配请求中携带所述第一从控组网设备对应的设备集群标识;组网系统加入模块,还用于当根据第一从控组网设备对应的设备集群标识确定所述第一从控组网设备对应的设备集群为所述第一网络区域内的设备集群时,响应于所述第一组网资源分配请求,基于所述组网资源集合向所述第一从控组网设备分配第一组网资源。In one embodiment, the first networking resource allocation request carries a device cluster identifier corresponding to the first slave-controlled networking device; the networking system adding module is further configured to, when based on the first slave-controlled networking device When the corresponding device cluster identifier determines that the device cluster corresponding to the first slave control networking device is a device cluster in the first network area, in response to the first networking resource allocation request, based on the networking resource The set allocates first networking resources to the first slave-controlled networking device.
在一个实施例中,所述装置,还包括:组网资源分配请求接收模块,用于接收第三从控组网设备发送的第二组网资源分配请求;所述第二组网资源分配请求中携带所述第三从控组网设备对应的设备集群标识;静默模块,用于当根据第三从控组网设备对应的设备集群标识确定所述第三从控组网设备对应的设备集群不是所述第一网络区域内的设备集群时,对所述第二组网资源分配请求保持静默状态。In one embodiment, the apparatus further includes: a networking resource allocation request receiving module, configured to receive a second networking resource allocation request sent by a third slave-controlled networking device; the second networking resource allocation request carries the device cluster identifier corresponding to the third slave control networking device; the silence module is used to determine the device cluster corresponding to the third slave control networking device according to the device cluster identifier corresponding to the third slave control networking device. When it is not a device cluster in the first network area, the second network resource allocation request is kept in a silent state.
在一个实施例中,所述装置,还包括:第二连网请求接收模块,用于接收所述第一从控组网设备基于所述第一组网资源发送的连网资源分配请求;第二连网资源分配模块,用于响应于第一从控组网设备发送的连网资源分配请求,向所述第一从控组网设备分配第二连网资源,以使得所述第一从控组网设备基于所述第二连网资源进行网络连接。In one embodiment, the apparatus further includes: a second networking request receiving module, configured to receive a networking resource allocation request sent by the first slave-controlled networking device based on the first networking resource; A second networking resource allocation module, configured to allocate a second networking resource to the first slave networking device in response to a networking resource allocation request sent by the first slave networking device, so that the first slave networking device The networking control device performs network connection based on the second networking resource.
关于基于分布式组网系统的网络连接装置的具体限定可以参见上文中对于基于分布式组网系统的网络连接方法的限定,在此不再赘述。上述基于分布式组网系统的网络连接装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the network connection device based on the distributed networking system, reference may be made to the above definition of the network connection method based on the distributed networking system, which will not be repeated here. Each module in the above-mentioned distributed networking system-based network connection device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储组网资源集合、组网资源、连网资源等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种基于分布式组网系统的网络连接方法。In one embodiment, a computer device is provided, and the computer device may be a server, and its internal structure diagram may be as shown in FIG. 9 . The computer device includes a processor, memory, and a network interface connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used to store data such as network resource collection, network resource, and network resource. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a network connection method based on a distributed networking system is implemented.
本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 9 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, a computer device is also provided, including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the foregoing method embodiments when the processor executes the computer program.
在一个实施例中,提供了一种计算机可读存储介质,存储有计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, implements the steps in the foregoing method embodiments.
在一个实施例中,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述各方法实施例中的步骤。In one embodiment, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in the foregoing method embodiments.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the various embodiments provided in this application may include at least one of non-volatile and volatile memory. The non-volatile memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, and the like. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, the RAM may be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM).
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110314578.4A CN113037652B (en) | 2021-03-24 | 2021-03-24 | Network connection method, device and computer equipment based on distributed networking system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110314578.4A CN113037652B (en) | 2021-03-24 | 2021-03-24 | Network connection method, device and computer equipment based on distributed networking system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113037652A CN113037652A (en) | 2021-06-25 |
CN113037652B true CN113037652B (en) | 2022-04-12 |
Family
ID=76474075
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110314578.4A Active CN113037652B (en) | 2021-03-24 | 2021-03-24 | Network connection method, device and computer equipment based on distributed networking system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113037652B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111316685A (en) * | 2018-03-30 | 2020-06-19 | 华为技术有限公司 | Method and device for converged networking |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8009615B2 (en) * | 2006-11-09 | 2011-08-30 | Avaya Inc. | Multi-hop ad-hoc wireless networks that support non-multi-hop wireless terminals |
CN104936168B (en) * | 2015-05-04 | 2019-01-29 | 北京柏惠维康科技有限公司 | A kind of efficient wireless mesh network-building method |
CN108989114B (en) * | 2018-07-25 | 2021-08-06 | 新华三技术有限公司 | Method and device for configuring router |
CN111163185A (en) * | 2019-12-30 | 2020-05-15 | 乐鑫信息科技(上海)股份有限公司 | Method for IP addressing access to nodes in mesh network |
CN111935763B (en) * | 2020-08-13 | 2023-10-20 | 杭州萤石软件有限公司 | Method for improving data transmission reliability in wireless mesh network and network system |
-
2021
- 2021-03-24 CN CN202110314578.4A patent/CN113037652B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111316685A (en) * | 2018-03-30 | 2020-06-19 | 华为技术有限公司 | Method and device for converged networking |
Also Published As
Publication number | Publication date |
---|---|
CN113037652A (en) | 2021-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022037322A1 (en) | Network topology management system and method for home networking | |
US8321862B2 (en) | System for migrating a virtual machine and resource usage data to a chosen target host based on a migration policy | |
US20160006686A1 (en) | Dhcp proxy in a subscriber environment | |
US20170031704A1 (en) | Network port profile for virtual machines using network controller | |
US8838831B2 (en) | Populating location wiremap databases | |
WO2012079474A1 (en) | Address allocation processing method, apparatus, and system | |
CN106657330B (en) | User data migration method and user data backup method, device and system | |
CN111817869B (en) | A network configuration recovery method and related equipment | |
WO2015021829A1 (en) | Resource allocation method | |
CN106685776A (en) | Method and system of intelligent device discovery in local area network | |
US20170180309A1 (en) | Selective ip address allocation for probes that do not have assigned ip addresses | |
CN113098797B (en) | Network connection method, device and computer equipment based on distributed networking system | |
CN114070822B (en) | Kubernetes Overlay IP address management method | |
CN106878480B (en) | DHCP service process sharing method and device | |
CN109040184B (en) | A method for electing a master node and a server | |
CN111464454B (en) | Load sharing method and system for virtual BRAS (broadband remote Access Server) equipment in data center | |
WO2017114363A1 (en) | Packet processing method, bng and bng cluster system | |
JP2017526298A (en) | Method and system for managing network traffic | |
JP4705650B2 (en) | Communication node | |
CN108933844A (en) | The method and apparatus of DHCP service is provided | |
JP6445408B2 (en) | Communication system and setting method | |
CN113037652B (en) | Network connection method, device and computer equipment based on distributed networking system | |
CN111163463B (en) | Method, device, equipment and storage medium for wireless equipment to access router | |
CN107948002B (en) | AP access control method and device | |
CN115460628B (en) | Method for self-organizing network of Mesh devices, Mesh device, terminal 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PP01 | Preservation of patent right |
Effective date of registration: 20250513 Granted publication date: 20220412 |