CN107395431B - Network construction method and device, equipment processing and accessing method and network equipment - Google Patents

Network construction method and device, equipment processing and accessing method and network equipment Download PDF

Info

Publication number
CN107395431B
CN107395431B CN201710709671.9A CN201710709671A CN107395431B CN 107395431 B CN107395431 B CN 107395431B CN 201710709671 A CN201710709671 A CN 201710709671A CN 107395431 B CN107395431 B CN 107395431B
Authority
CN
China
Prior art keywords
network
equipment
gateway
terminal
instruction
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.)
Expired - Fee Related
Application number
CN201710709671.9A
Other languages
Chinese (zh)
Other versions
CN107395431A (en
Inventor
向文
王浩彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TP Link Technologies Co Ltd
Original Assignee
TP Link Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN201710709671.9A priority Critical patent/CN107395431B/en
Publication of CN107395431A publication Critical patent/CN107395431A/en
Application granted granted Critical
Publication of CN107395431B publication Critical patent/CN107395431B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Abstract

The invention discloses a network construction method and device, a device processing and accessing method and network equipment. The network construction method comprises the following steps: responding to a configuration file acquisition request of at least one gateway device, and sending a pre-stored configuration file to each gateway device so that each gateway device generates a corresponding sub-network according to the configuration file; and acquiring all the terminal equipment to be accessed in the coverage range of each sub network, and allocating a unique terminal equipment identification code to each terminal equipment to be accessed. The invention can simplify the process of network construction and network expansion, improve the efficiency of network construction and expansion and simultaneously improve the robustness of network operation.

Description

Network construction method and device, equipment processing and accessing method and network equipment
Technical Field
The present invention relates to the field of computer technologies and network communications, and in particular, to a network construction method and apparatus, a device processing and accessing method, and a network device.
Background
The CSRmesh protocol is a set of Bluetooth protocol defined by independent research and development of the high-traffic company. In a wireless Mesh network (wireless Mesh network) constructed based on a CSRmesh protocol, a user can control any other terminal device in the wireless Mesh network only by accessing any terminal device into the wireless Mesh network, and does not need to be directly connected with the controlled terminal device.
In the prior art, a wireless Mesh network constructed based on a CSRmesh protocol is generally composed of a plurality of terminal devices, and each terminal device is connected with each other in a bluetooth manner. In the wireless Mesh network, when a user needs to expand the coverage area of the wireless Mesh network, new terminal devices need to be added to the network, and each newly added terminal device needs to be configured, so that in the prior art, the building and expanding processes of the wireless Mesh network are complicated and low in efficiency. In addition, in the existing wireless Mesh network, because the terminal devices are directly connected with each other, the phenomenon that the whole network is split and normal communication cannot be performed due to the fault of one terminal device may occur.
Disclosure of Invention
The embodiment of the invention provides a network construction method and device, a device processing and accessing method and network equipment, which can simplify the processes of network construction and network expansion, improve the efficiency of network construction and expansion and simultaneously improve the robustness of network operation.
The network construction method provided by the embodiment of the invention specifically comprises the following steps:
responding to a configuration file acquisition request of at least one gateway device, and sending a pre-stored configuration file to each gateway device so that each gateway device generates a corresponding sub-network according to the configuration file;
and acquiring all the terminal equipment to be accessed in the coverage range of each sub network, and allocating a unique terminal equipment identification code to each terminal equipment to be accessed.
Further, the configuration file comprises a network identification code and a network key;
before responding to a configuration file acquisition request of at least one gateway device and sending a pre-stored configuration file to each gateway device so that each gateway device generates a corresponding sub-network according to the configuration file, the method further includes:
generating the network identification code and the network key according to a preset random seed;
and generating the configuration file according to the network identification code and the network key, and storing the configuration file.
Further, the obtaining all the terminal devices to be accessed within the coverage area of each sub-network, and allocating a unique terminal device identification code to each terminal device to be accessed specifically includes:
sending a device scanning instruction to each gateway device so that each gateway device scans and obtains all terminal devices to be accessed in the coverage range of the corresponding sub-network and generates a corresponding device scanning result;
receiving a device scanning result returned by each gateway device, and generating a terminal device identification code corresponding to each terminal device to be accessed according to each device scanning result;
and sending each terminal equipment identification code to the corresponding gateway equipment so that each gateway equipment sends and stores the received terminal equipment identification code to the corresponding terminal equipment to be accessed.
Further, the gateway device includes a local gateway device and a non-local gateway device.
Further, the gateway device is a CSRmesh device.
The embodiment of the invention also provides a method for processing the terminal equipment of the network constructed by the network construction method, which specifically comprises the following steps:
receiving and obtaining a device processing instruction;
and responding to the equipment processing instruction, and sending the equipment processing instruction to each gateway equipment in the network so that each gateway equipment performs corresponding processing on the terminal equipment to be processed in the coverage range of the corresponding sub-network according to the equipment processing instruction.
Further, the sending, in response to the device processing instruction, the device processing instruction to each gateway device in the network, so that each gateway device performs corresponding processing on the terminal device to be processed in the coverage area of the corresponding sub-network according to the device processing instruction, specifically includes:
reading a configuration file stored locally in response to the device processing instruction; wherein, the configuration file comprises a network identification code and a network key;
and sending the equipment processing instruction to all gateway equipment corresponding to the network identification code so that each gateway equipment analyzes the equipment processing instruction according to the network key stored in the configuration file of the gateway equipment, and correspondingly processing the terminal equipment to be processed in the coverage range of the corresponding sub-network according to the analyzed equipment processing instruction.
Further, the device processing instruction is a device deleting instruction, a device setting instruction or a device querying instruction.
The embodiment of the invention also provides a terminal equipment access method of the network constructed by the network construction method, which specifically comprises the following steps:
responding to a device access instruction, and generating a device scanning instruction according to the device access instruction;
sending the device scanning instruction to each gateway device in the network, so that each gateway device scans all terminal devices to be accessed in the coverage range of the corresponding sub-network according to the device scanning instruction and generates a corresponding device scanning result;
receiving a device scanning result returned by each gateway device, and generating a terminal device identification code corresponding to each terminal device to be accessed according to each device scanning result;
and sending each terminal equipment identification code to the corresponding gateway equipment so that each gateway equipment sends and stores the received terminal equipment identification code to the corresponding terminal equipment to be accessed.
Further, the sending the device scanning instruction to each gateway device in the network so that each gateway device scans and obtains all terminal devices to be accessed in the coverage area of the corresponding sub-network according to the device scanning instruction and generates a corresponding device scanning result specifically includes:
responding to the equipment access instruction, and reading a configuration file stored locally; wherein, the configuration file comprises a network identification code and a network key;
and sending the equipment scanning instruction to all gateway equipment corresponding to the network identification code so that each gateway equipment analyzes the equipment scanning instruction according to the network key stored in the configuration file of the gateway equipment, scans and obtains all terminal equipment to be accessed in the coverage range of the corresponding sub-network according to the analyzed equipment scanning instruction, and generates a corresponding equipment scanning result.
Corresponding to the network construction method, an embodiment of the present invention further provides a network construction apparatus, which specifically includes:
the sub-network generation module is used for responding to a configuration file acquisition request of at least one gateway device, and sending a pre-stored configuration file to each gateway device so that each gateway device generates a corresponding sub-network according to the configuration file; and the number of the first and second groups,
and the terminal equipment identification code distribution module is used for acquiring all the terminal equipment to be accessed in the coverage range of each sub-network and distributing a unique terminal equipment identification code for each terminal equipment to be accessed.
The embodiment of the invention also provides network equipment, which specifically comprises at least one memory and at least one processor;
the memory including at least one executable program stored therein;
the executable program, when executed by the processor, causes the processor to implement the network construction method as described above.
The embodiment of the invention has the following beneficial effects:
according to the network construction method and device, the equipment processing and accessing method and the network equipment provided by the embodiment of the invention, the total network consisting of a plurality of identical sub-networks is obtained by configuring the same configuration file for each gateway equipment, and the construction of the network can be completed by allocating the corresponding terminal equipment identification code for each terminal equipment to be accessed in the total network, so that the network construction process is simple and rapid. The network expansion can be easily realized according to the same method, and the network coverage range of a plurality of terminal devices can be obtained under the condition of adding one gateway device, so that the network expansion efficiency is greatly increased. In addition, the gateway device is introduced to manage the terminal devices in the coverage range of the corresponding sub-network, so that the distributed management of the terminal devices in the network is realized, the influence among the terminal devices is reduced, and the robustness of the network operation is improved.
Drawings
Fig. 1 is a schematic flow chart of a preferred embodiment of a network construction method provided by the present invention;
FIG. 2 is a schematic diagram of a network constructed using another more preferred embodiment of the network construction method provided by the present invention;
fig. 3 is a schematic flowchart of a terminal device processing method according to a preferred embodiment of the present invention;
fig. 4 is a flowchart of a preferred embodiment of a terminal device access method provided by the present invention;
fig. 5 is a schematic structural diagram of a preferred embodiment of the network construction apparatus provided in the present invention;
fig. 6 is a schematic structural diagram of a preferred embodiment of the network device provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention transmits the pre-generated configuration file to each gateway device in the same network, so that each gateway device generates corresponding sub-networks which are the same with each other according to the configuration file, thereby obtaining the total network composed of the sub-networks, and completes the construction of the network by allocating unique corresponding terminal device identification codes for each terminal device to be accessed in the coverage range of the total network. The invention can obtain the total network composed of a plurality of identical sub-networks by configuring the same configuration file for each gateway device, and can complete the construction of the network by distributing the corresponding terminal device identification code for each terminal device to be accessed in the total network, therefore, the process of constructing the network is simple and rapid. The network expansion can be easily realized according to the same method, and the network coverage range of a plurality of terminal devices can be obtained under the condition of adding one gateway device, so that the network expansion efficiency is greatly increased. In addition, the invention manages the terminal equipment in the coverage range of the corresponding sub-network by introducing the gateway equipment, thereby realizing the distributed management of the terminal equipment in the network, reducing the influence among the terminal equipment and further improving the robustness of the network operation.
As shown in fig. 1, a schematic flow chart of a preferred embodiment of the network construction method provided by the present invention includes steps S11 to S12, which are specifically as follows:
s11: responding to a configuration file acquisition request of at least one gateway device, and sending a pre-stored configuration file to each gateway device so that each gateway device generates a corresponding sub-network according to the configuration file;
s12: and acquiring all the terminal equipment to be accessed in the coverage range of each sub network, and allocating a unique terminal equipment identification code to each terminal equipment to be accessed.
It should be noted that, the embodiment of the present invention is executed by a control module in a device, where the control module may be a control module in a certain gateway device, or may be a control module in another device, and is not limited herein. In the device where the control module is located, a configuration file corresponding to a network to be constructed or extended is stored in advance.
It is further noted that the network constructed or extended by the embodiments of the present invention is composed of one or more identical sub-networks.
In the process of network construction, when a certain gateway device needs to join in a network being constructed, the gateway device sends a configuration file acquisition request to the control module, and after receiving the configuration file acquisition request, the control module sends a configuration file pre-stored in local equipment to the gateway device. And after receiving the configuration file, the gateway device generates a corresponding sub-network according to the configuration file. Then, the control module responds to the device access instruction, obtains all the terminal devices to be accessed in the coverage range of the sub-network generated by the gateway device by controlling the gateway device, and allocates a unique corresponding terminal device identification code to each obtained terminal device to be accessed, so that the construction of the sub-network can be completed. When the number of the constructed sub-networks is one or more, the construction of the network can be completed. The device access instruction can be generated by a user by clicking a specific button or making a specific gesture, or can be generated by the control module autonomously.
In the same way, the expansion of the network can be done.
It should be further noted that the control module further includes a terminal device identification code recording table for recording each terminal device identification code assigned via the control module. When the control module allocates a terminal equipment identification code to a certain terminal equipment to be accessed, firstly generating a terminal equipment identification code, then judging whether the terminal equipment identification code is allocated to other terminal equipment by inquiring a terminal equipment identification code recording table, if so, regenerating a terminal equipment identification code, and carrying out the judgment again; if not, the identification code of the terminal equipment is distributed to the terminal equipment to be accessed. By using the terminal device identification code recording table, it is ensured that the terminal device identification codes assigned to the respective terminal devices by the same control module are different from one another.
Since the configuration file is generated and stored in advance, all the subnets generated according to the configuration file are identical to each other.
In some specific embodiments, the gateway device and the gateway device may be connected by a wired manner (e.g., Ethernet) or by a wireless manner (e.g., WiFi); the gateway equipment is connected with the terminal equipment in a Bluetooth mode.
The embodiment of the invention can complete the construction of the network by configuring the same configuration file for each gateway device to obtain the total network consisting of a plurality of identical sub-networks and allocating the corresponding terminal device identification code for each terminal device to be accessed in the total network, thereby the process of constructing the network is simple and rapid. The network expansion can be easily realized according to the same method, and the network coverage range of a plurality of terminal devices can be obtained under the condition of adding one gateway device, so that the network expansion efficiency is greatly increased. In addition, the gateway device is introduced to manage the terminal devices in the coverage range of the corresponding sub-network, so that the distributed management of the terminal devices in the network is realized, the influence among the terminal devices is reduced, and the robustness of the network operation is improved.
In another preferred embodiment, on the basis of the above embodiment, the configuration file includes a network identification code and a network key;
before responding to a configuration file acquisition request of at least one gateway device and sending a pre-stored configuration file to each gateway device so that each gateway device generates a corresponding sub-network according to the configuration file, the method further includes:
generating the network identification code and the network key according to a preset random seed;
and generating the configuration file according to the network identification code and the network key, and storing the configuration file.
It should be noted that the network identification code and the network key in the configuration file are generated according to a preset random seed. After the control module generates a corresponding configuration file according to the network identification code and the network key, the configuration file is stored in a storage medium (such as a flash) of the device where the configuration file is located.
Further, the gateway device includes a local gateway device and a non-local gateway device.
It should be noted that, in this embodiment, the control module is located in a certain gateway device, so that in a network construction process, the control module may send the configuration file to other non-local gateway devices, and may also send the configuration file to corresponding processing modules of a local gateway device according to a request of the local gateway device (i.e., the gateway device where the control module is located), so that both the local gateway device and the non-local gateway device can generate corresponding sub-networks according to the configuration file.
In some more preferred embodiments, after the user completes adding the first gateway device in the network to be constructed, the control module in the first gateway device randomly generates a network identifier and a network key, generates a corresponding configuration file according to the network identifier and the network key, and stores the configuration file in the flash of the first gateway device. The first gateway device generates a corresponding sub-network according to the configuration file. When the second gateway device accesses the network where the first gateway device is located, the control device of the first gateway device reads the configuration file from the flash and sends the configuration file to the second gateway device, so that the second gateway device generates a sub-network identical to the sub-network of the first gateway device according to the configuration file. According to the same method, the subsequent gateway devices can sequentially access to the network in which the first gateway device is located. Fig. 2 is a schematic diagram of a network constructed according to the present embodiment.
More preferably, the gateway device is a CSRmesh device.
It should be noted that, in this embodiment, the gateway device is a CSRmesh device. After receiving the configuration file, the CSRmesh device automatically starts a local CSRmesh control center function (i.e., a function capable of controlling a terminal device connected to a local device), and generates a corresponding CSRmesh-type sub-network according to the configuration file.
In another preferred embodiment, on the basis of the foregoing embodiments, the obtaining all the terminal devices to be accessed within the coverage area of each sub-network, and allocating a unique terminal device identification code to each terminal device to be accessed specifically includes:
sending a device scanning instruction to each gateway device so that each gateway device scans and obtains all terminal devices to be accessed in the coverage range of the corresponding sub-network and generates a corresponding device scanning result;
receiving a device scanning result returned by each gateway device, and generating a terminal device identification code corresponding to each terminal device to be accessed according to each device scanning result;
and sending each terminal equipment identification code to the corresponding gateway equipment so that each gateway equipment sends and stores the received terminal equipment identification code to the corresponding terminal equipment to be accessed.
It should be noted that, after each gateway device generates a corresponding sub-network according to the configuration file, the control module sends a device scanning instruction to each gateway device, so that each gateway device scans all terminal devices in the coverage area of the corresponding sub-network, obtains all terminal devices to be accessed, and generates a corresponding device scanning result. And then, the control module combines and arranges the device scanning results returned by each gateway device, allocates a unique corresponding terminal device identification code for each terminal device to be accessed obtained by scanning according to each device scanning result, and sends each terminal device identification code to the corresponding terminal device to be accessed for storage through the corresponding gateway device, so that each terminal device to be accessed has a unique identity in the total network formed by the sub-networks.
The network construction method provided by the embodiment of the invention can obtain the total network consisting of a plurality of identical sub-networks by configuring the same configuration file for each gateway device, and can finish the construction of the network by distributing the corresponding terminal device identification code for each terminal device to be accessed in the total network, so the process of constructing the network is simple and quick. The network expansion can be easily realized according to the same method, and the network coverage range of a plurality of terminal devices can be obtained under the condition of adding one gateway device, so that the network expansion efficiency is greatly increased. In addition, the gateway device is introduced to manage the terminal devices in the coverage range of the corresponding sub-network, so that the distributed management of the terminal devices in the network is realized, the influence among the terminal devices is reduced, and the robustness of the network operation is improved.
The invention also provides a terminal equipment processing method of the network constructed by the network construction method.
As shown in fig. 3, a schematic flowchart of a terminal device processing method of a network constructed by the network construction method according to a preferred embodiment of the present invention includes steps S31 to S32, which are specifically as follows:
s31: receiving and obtaining a device processing instruction;
s32: and responding to the equipment processing instruction, and sending the equipment processing instruction to each gateway equipment in the network so that each gateway equipment performs corresponding processing on the terminal equipment to be processed in the coverage range of the corresponding sub-network according to the equipment processing instruction.
It should be noted that the network constructed by the network construction method includes one or more gateway devices, and this embodiment is executed by any gateway device in the network, which is equipped with a WAN interface (wide area network interface), and the execution gateway device may be selected by a user, may also be determined by calculation according to a specific algorithm, may also be dynamically determined according to an actual operating state of the device, and is not limited herein.
In this embodiment, the user can perform corresponding operations on the execution gateway device to implement processing on any terminal device in the network. Specifically, the user may input a device processing instruction to the execution gateway device, and the execution gateway device broadcasts the device processing execution to all gateway devices in the network where the execution gateway device is located after receiving the device processing instruction. After each gateway device (including the execution gateway device) in the network receives the device processing instruction, scanning all terminal devices in the coverage area of the corresponding sub-network according to the received device processing instruction, judging whether the terminal devices to be processed exist in the coverage area, if so, performing corresponding processing on the terminal devices to be processed according to the device processing instruction, and generating corresponding processing results; if not, the processing is not carried out, and a corresponding processing result is generated. And after receiving the processing results returned by each other gateway device, the execution gateway device integrates each received processing result and the processing result of the execution gateway device to generate a corresponding processing feedback result, and feeds the processing feedback result back to the user.
In this embodiment, the execution gateway device includes an instruction receiving module, an instruction processing module, and an instruction transmitting module, and the other gateway devices include an instruction receiving module and an instruction processing module. Specifically, a request receiving module in the execution gateway device is configured to receive a device processing instruction sent by a user, and send the device processing instruction to a local instruction processing module and an instruction sending module; the instruction processing module in the execution gateway device is used for carrying out corresponding processing on corresponding terminal equipment according to the received equipment processing instruction and generating a corresponding processing result; the instruction sending module in the execution gateway equipment is used for sending the received equipment processing instruction to the instruction receiving module of other gateway equipment; the instruction receiving modules of other gateway devices send the received device processing instructions to the instruction processing module of the gateway device, so that the instruction processing module performs corresponding processing on corresponding terminal devices according to the device processing instructions and returns corresponding processing results; other gateway equipment returns the received processing result to the instruction sending module of the execution gateway equipment; the instruction receiving module of the execution gateway device collects the processing results in the local instruction processing module and the instruction sending module, integrates the processing results, generates a corresponding processing feedback result, and finally feeds the processing feedback result back to the user.
The embodiment of the invention enables all the gateway devices in the same network to simultaneously scan and correspondingly process the terminal devices in the sub-networks corresponding to the gateway devices by sending the device processing instruction to all the gateway devices belonging to the same network, thereby greatly improving the efficiency of processing the devices in the network.
In another preferred embodiment, on the basis of the foregoing embodiment, the sending, in response to the device processing instruction, the device processing instruction to each gateway device in the network, so that each gateway device performs corresponding processing on the terminal device to be processed in the coverage area of the corresponding sub-network according to the device processing instruction specifically includes:
reading a configuration file stored locally in response to the device processing instruction; wherein, the configuration file comprises a network identification code and a network key;
and sending the equipment processing instruction to all gateway equipment corresponding to the network identification code so that each gateway equipment analyzes the equipment processing instruction according to the network key stored in the configuration file of the gateway equipment, and correspondingly processing the terminal equipment to be processed in the coverage range of the corresponding sub-network according to the analyzed equipment processing instruction.
It should be noted that, in this embodiment, a user may perform corresponding operations on the execution gateway device to implement processing on any terminal device in the network. Specifically, the user may input a device processing instruction to the execution gateway device, and after receiving the device processing instruction, the execution gateway device reads the network identifier in the locally stored configuration file, so as to send the device processing instruction to all gateway devices corresponding to the network identifier, that is, broadcast the device processing instruction to all gateway devices belonging to the same network. After each gateway device (including the execution gateway device) in the network receives the device processing instruction, analyzing the device processing instruction by using a network key in a configuration file stored by the gateway device, so as to verify whether the device processing instruction is from the execution gateway device belonging to the same network, if the device processing instruction is not from the execution gateway device, not processing the device processing instruction, if the device processing instruction is from the execution gateway device, scanning and searching whether the corresponding to-be-processed terminal device exists in a sub-network coverage range corresponding to the device processing instruction according to the device processing instruction, and if the device processing instruction exists, performing corresponding processing on the to-be-processed terminal device according to the device processing instruction, and generating a corresponding processing result; if not, no processing is carried out, and a corresponding processing result is generated. And after receiving the processing results returned by each other gateway device, the execution gateway device integrates each received processing result and the processing result of the execution gateway device to generate a corresponding processing feedback result, and feeds the processing feedback result back to the user.
It should be further noted that, in some more preferred embodiments, each gateway device may further issue the network key in the configuration file stored in itself to all terminal devices in the sub-network corresponding to itself, so as to implement encrypted communication between itself and each terminal device in the sub-network corresponding to itself.
Further, the device processing instruction is a device deleting instruction, a device setting instruction or a device querying instruction.
It should be noted that the device processing instruction may be a device deleting instruction, a device setting instruction, a device querying instruction, and the like. Specifically, the device processing instruction includes an identification code of the corresponding terminal device to be processed. When the equipment processing instruction is an equipment deleting instruction, removing the corresponding terminal equipment from the network; when the equipment processing instruction is an equipment setting instruction, carrying out corresponding setting on the corresponding terminal equipment according to the equipment setting instruction; and when the equipment processing instruction is an equipment query instruction, performing corresponding query on the corresponding terminal equipment.
According to the terminal device processing method provided by the embodiment of the invention, the device processing instruction is sent to all gateway devices belonging to the same network, so that all gateway devices in the same network can simultaneously scan and correspondingly process the terminal devices in the sub-networks corresponding to the gateway devices, and the device processing efficiency in the network is greatly improved.
The invention also provides a terminal equipment access method of the network constructed by the network construction method.
As shown in fig. 4, a schematic flowchart of a preferred embodiment of a terminal device access method of a network constructed by using the above network construction method provided by the present invention includes steps S41 to S44, which are specifically as follows:
s41: responding to a device access instruction, and generating a device scanning instruction according to the device access instruction;
s42: sending the device scanning instruction to each gateway device in the network, so that each gateway device scans all terminal devices to be accessed in the coverage range of the corresponding sub-network according to the device scanning instruction and generates a corresponding device scanning result;
s43: receiving a device scanning result returned by each gateway device, and generating a terminal device identification code corresponding to each terminal device to be accessed according to each device scanning result;
s44: and sending each terminal equipment identification code to the corresponding gateway equipment so that each gateway equipment sends and stores the received terminal equipment identification code to the corresponding terminal equipment to be accessed.
It should be noted that the network constructed by the network construction method includes one or more gateway devices, and this embodiment is executed by any gateway device in the network, which is equipped with a WAN interface (wide area network interface), and the execution gateway device may be selected by a user, may also be determined by calculation according to a specific algorithm, may also be dynamically determined according to an actual operating state of the device, and is not limited herein.
In this embodiment, the user may cause the network to automatically associate the terminal device to be accessed into the network by performing corresponding operations on the execution gateway device. Specifically, a user may input a device access instruction to the execution gateway device, and after receiving the device access instruction, the execution gateway device generates a device scanning instruction according to the device access instruction, and sends the device scanning instruction to all gateway devices in a network where the execution gateway device is located. After receiving the device scanning instruction, each gateway device (including the execution gateway device) in the network scans all terminal devices within the coverage area of the sub-network corresponding to the gateway device (including the execution gateway device), obtains all terminal devices to be accessed, and generates a corresponding device scanning result. After receiving the device scanning results returned by other gateway devices, the execution gateway device integrates the received device scanning results with the device scanning results of the execution gateway device, allocates a unique corresponding terminal device identification code to each terminal device to be accessed obtained by scanning according to the integration processing results, and sends the identification code of each terminal device to the corresponding terminal device to be accessed through the corresponding gateway device for storage, so that each terminal device to be accessed has a unique identification in the network. And finally, the execution gateway equipment receives the identification code distribution results returned by other gateway equipment, integrates the received identification code distribution results with the identification code distribution results of the execution gateway equipment to generate corresponding access feedback results, and finally feeds the access feedback results back to the user.
It should be further noted that, the execution gateway device further stores a terminal device identification code recording table for recording each terminal device identification code allocated via the execution gateway device. When the execution gateway equipment allocates a terminal equipment identification code to a certain terminal equipment to be accessed, firstly generating a terminal equipment identification code, then judging whether the terminal equipment identification code is allocated to other terminal equipment or not by inquiring a terminal equipment identification code recording table, if so, regenerating a terminal equipment identification code, and carrying out the judgment again; if not, the identification code of the terminal equipment is distributed to the terminal equipment to be accessed. By using the terminal device identification code recording table, it is ensured that the terminal device identification codes assigned to the respective terminal devices by the same execution gateway device are different from one another.
According to the embodiment of the invention, the equipment scanning instruction is sent to all gateway equipment belonging to the same network, so that all gateway equipment in the same network simultaneously scan the terminal equipment to be accessed in the sub-network corresponding to the gateway equipment, the identification code of the terminal equipment can be rapidly distributed according to the scanning result, and the equipment access efficiency in the network is greatly improved.
In another preferred embodiment, on the basis of the foregoing embodiment, the sending the device scanning instruction to each gateway device in the network, so that each gateway device scans, according to the device scanning instruction, all terminal devices to be accessed in a coverage area of a sub-network corresponding to the gateway device, and generates a corresponding device scanning result, specifically including:
responding to the equipment access instruction, and reading a configuration file stored locally; wherein, the configuration file comprises a network identification code and a network key;
and sending the equipment scanning instruction to all gateway equipment corresponding to the network identification code so that each gateway equipment analyzes the equipment scanning instruction according to the network key stored in the configuration file of the gateway equipment, scans and obtains all terminal equipment to be accessed in the coverage range of the corresponding sub-network according to the analyzed equipment scanning instruction, and generates a corresponding equipment scanning result.
It should be noted that, the user may cause the network to automatically associate the terminal device to be accessed into the network by performing corresponding operations on the gateway device. Specifically, a user may input a device access instruction to the execution gateway device, and after receiving the device access instruction, the execution gateway device generates a device scanning instruction according to the device access instruction, and reads a network identifier in a configuration file stored locally, so as to send the device scanning instruction to all gateway devices corresponding to the network identifier, that is, broadcast the device scanning instruction to all gateway devices belonging to the same network. After each gateway device (including the execution gateway device) in the network receives the device scanning instruction, the device processing instruction is analyzed by using the network key in the configuration file stored by the gateway device, so as to verify whether the device processing instruction is from the execution gateway device belonging to the same network, if the device processing instruction is not from the execution gateway device, the device processing instruction is not processed, and if the device processing instruction is from the execution gateway device, all the terminal devices to be accessed in the coverage range of the corresponding sub-network are obtained by scanning according to the device processing instruction, and corresponding device scanning results are generated. After receiving the device scanning results returned by other gateway devices, the execution gateway device integrates the received device scanning results with the device scanning results of the execution gateway device, allocates a unique corresponding terminal device identification code to each terminal device to be accessed obtained by scanning according to the integration processing results, and sends the identification code of each terminal device to the corresponding terminal device to be accessed through the corresponding gateway device for storage, so that each terminal device to be accessed has a unique identification in the network. And finally, the execution gateway equipment receives the identification code distribution results returned by other gateway equipment, integrates the received identification code distribution results with the identification code distribution results of the execution gateway equipment to generate corresponding access feedback results, and finally feeds the access feedback results back to the user.
It should be further noted that, in some more preferred embodiments, each gateway device may further issue the network key in the configuration file stored in itself to all terminal devices in the sub-network corresponding to itself, so as to implement encrypted communication between itself and each terminal device in the sub-network corresponding to itself.
According to the terminal equipment access method provided by the embodiment of the invention, the equipment scanning instruction is sent to all gateway equipment belonging to the same network, so that all gateway equipment in the same network simultaneously scan the terminal equipment to be accessed in the sub-network corresponding to the gateway equipment, the identification code of the terminal equipment can be rapidly distributed according to the scanning result, and the equipment access efficiency in the network is greatly improved.
Corresponding to the network construction method, the invention also provides a network construction device, which can realize all the processes of the network construction method in the embodiment.
As shown in fig. 5, a schematic structural diagram of a preferred embodiment of the network building apparatus provided in the present invention is specifically as follows:
a sub-network generating module 51, configured to send a pre-stored configuration file to each gateway device in response to a configuration file acquisition request of at least one gateway device, so that each gateway device generates a corresponding sub-network according to the configuration file; and the number of the first and second groups,
and the terminal device identification code allocating module 52 is configured to obtain all terminal devices to be accessed within the coverage area of each sub-network, and allocate a unique terminal device identification code to each terminal device to be accessed.
In another preferred embodiment, on the basis of the above embodiment, the configuration file includes a network identification code and a network key;
the network construction method further comprises the following steps:
the random parameter generation module is used for generating the network identification code and the network key according to a preset random seed; and the number of the first and second groups,
and the configuration file generation module is used for generating the configuration file according to the network identification code and the network key and storing the configuration file.
Further, the gateway device includes a local gateway device and a non-local gateway device.
More preferably, the gateway device is a CSRmesh device.
In another preferred embodiment, based on the foregoing embodiment, the module for allocating an identification code of a terminal device specifically includes:
a device scanning instruction sending unit, configured to send a device scanning instruction to each gateway device, so that each gateway device scans to obtain all terminal devices to be accessed within a coverage area of a corresponding sub-network, and generates a corresponding device scanning result;
the device identification code generating unit is used for receiving a device scanning result returned by each gateway device and generating a terminal device identification code corresponding to each terminal device to be accessed according to each device scanning result; and the number of the first and second groups,
and the equipment identification code sending and storing unit is used for sending each terminal equipment identification code to the corresponding gateway equipment so that each gateway equipment sends and stores the received terminal equipment identification code to the corresponding terminal equipment to be accessed.
The network construction device provided by the embodiment of the invention can obtain the total network consisting of a plurality of identical sub-networks by configuring the same configuration file for each gateway device, and can complete the construction of the network by distributing the corresponding terminal device identification code for each terminal device to be accessed in the total network, so that the network construction process is simple and rapid. The network expansion can be easily realized according to the same method, and the network coverage range of a plurality of terminal devices can be obtained under the condition of adding one gateway device, so that the network expansion efficiency is greatly increased. In addition, the gateway device is introduced to manage the terminal devices in the coverage range of the corresponding sub-network, so that the distributed management of the terminal devices in the network is realized, the influence among the terminal devices is reduced, and the robustness of the network operation is improved.
The invention also provides network equipment.
As shown in fig. 6, which is a schematic structural diagram of a preferred embodiment of the network device provided in the present invention, specifically, the network device includes at least one memory 61 and at least one processor 62;
the memory 61 including at least one executable program stored therein;
the executable program, when executed by the processor 62, causes the processor 62 to implement the network construction method of any of the embodiments described above.
It should be noted that fig. 6 only illustrates an example in which one memory and one processor in the network device are connected, in some specific embodiments, the network device may further include a plurality of memories and/or a plurality of servers, and the specific number and the connection mode of the memories and the servers may be set and adaptively adjusted according to actual needs.
The network device provided by the embodiment of the invention can obtain the total network consisting of a plurality of identical sub-networks by configuring the same configuration file for each gateway device, and can complete the construction of the network by distributing the corresponding terminal device identification code for each terminal device to be accessed in the total network, so that the process of constructing the network is simple and rapid. The network expansion can be easily realized according to the same method, and the network coverage range of a plurality of terminal devices can be obtained under the condition of adding one gateway device, so that the network expansion efficiency is greatly increased. In addition, the gateway device is introduced to manage the terminal devices in the coverage range of the corresponding sub-network, so that the distributed management of the terminal devices in the network is realized, the influence among the terminal devices is reduced, and the robustness of the network operation is improved.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (11)

1. A network construction method, comprising:
generating a network identification code and a network key according to a preset random seed;
generating a configuration file according to the network identification code and the network key, and storing the configuration file; wherein, the configuration file comprises a network identification code and a network key;
responding to a configuration file acquisition request of at least one gateway device, and sending the configuration file to each gateway device so that each gateway device generates a corresponding sub-network according to the configuration file;
and acquiring all the terminal equipment to be accessed in the coverage range of each sub network, and allocating a unique terminal equipment identification code to each terminal equipment to be accessed.
2. The method of claim 1, wherein the obtaining all terminal devices to be accessed within the coverage area of each sub-network and assigning a unique terminal device identification code to each terminal device to be accessed specifically comprises:
sending a device scanning instruction to each gateway device so that each gateway device scans and obtains all terminal devices to be accessed in the coverage range of the corresponding sub-network and generates a corresponding device scanning result;
receiving a device scanning result returned by each gateway device, and generating a terminal device identification code corresponding to each terminal device to be accessed according to each device scanning result;
and sending each terminal equipment identification code to the corresponding gateway equipment so that each gateway equipment sends and stores the received terminal equipment identification code to the corresponding terminal equipment to be accessed.
3. The network construction method of claim 1, wherein the gateway device comprises a local gateway device and a non-local gateway device.
4. A method of network construction according to any of claims 1 to 3, wherein the gateway device is a CSRmesh device.
5. A terminal device processing method of a network constructed by the network construction method according to any one of claims 1 to 4, comprising:
receiving and obtaining a device processing instruction;
and responding to the equipment processing instruction, and sending the equipment processing instruction to each gateway equipment in the network so that each gateway equipment performs corresponding processing on the terminal equipment to be processed in the coverage range of the corresponding sub-network according to the equipment processing instruction.
6. The method according to claim 5, wherein the sending, in response to the device processing instruction, the device processing instruction to each gateway device in the network, so that each gateway device performs corresponding processing on the terminal device to be processed in the coverage area of the corresponding sub-network according to the device processing instruction, specifically comprises:
reading a configuration file stored locally in response to the device processing instruction; wherein, the configuration file comprises a network identification code and a network key;
and sending the equipment processing instruction to all gateway equipment corresponding to the network identification code so that each gateway equipment analyzes the equipment processing instruction according to the network key stored in the configuration file of the gateway equipment, and correspondingly processing the terminal equipment to be processed in the coverage range of the corresponding sub-network according to the analyzed equipment processing instruction.
7. The terminal device processing method according to claim 6, wherein the device processing instruction is a device delete instruction, a device setup instruction, or a device query instruction.
8. A terminal device access method of a network constructed by the network construction method according to any one of claims 1 to 4, comprising:
responding to a device access instruction, and generating a device scanning instruction according to the device access instruction;
sending the device scanning instruction to each gateway device in the network, so that each gateway device scans all terminal devices to be accessed in the coverage range of the corresponding sub-network according to the device scanning instruction and generates a corresponding device scanning result;
receiving a device scanning result returned by each gateway device, and generating a terminal device identification code corresponding to each terminal device to be accessed according to each device scanning result;
and sending each terminal equipment identification code to the corresponding gateway equipment so that each gateway equipment sends and stores the received terminal equipment identification code to the corresponding terminal equipment to be accessed.
9. The method for accessing a terminal device according to claim 8, wherein the sending the device scanning instruction to each gateway device in the network, so that each gateway device scans, according to the device scanning instruction, all terminal devices to be accessed within a coverage area of a corresponding sub-network, and generates a corresponding device scanning result, specifically includes:
responding to the equipment access instruction, and reading a configuration file stored locally; wherein, the configuration file comprises a network identification code and a network key;
and sending the equipment scanning instruction to all gateway equipment corresponding to the network identification code so that each gateway equipment analyzes the equipment scanning instruction according to the network key stored in the configuration file of the gateway equipment, scans and obtains all terminal equipment to be accessed in the coverage range of the corresponding sub-network according to the analyzed equipment scanning instruction, and generates a corresponding equipment scanning result.
10. A network construction apparatus, comprising:
the random parameter generation module is used for generating a network identification code and a network key according to a preset random seed;
the configuration file generation module is used for generating a configuration file according to the network identification code and the network key and storing the configuration file; wherein, the configuration file comprises a network identification code and a network key;
the sub-network generation module is used for responding to a configuration file acquisition request of at least one gateway device, and sending the configuration file to each gateway device so that each gateway device generates a corresponding sub-network according to the configuration file; and the number of the first and second groups,
and the terminal equipment identification code distribution module is used for acquiring all the terminal equipment to be accessed in the coverage range of each sub-network and distributing a unique terminal equipment identification code for each terminal equipment to be accessed.
11. A network device comprising at least one memory and at least one processor;
the memory including at least one executable program stored therein;
the executable program, when executed by the processor, causes the processor to implement the network construction method of any one of claims 1 to 4.
CN201710709671.9A 2017-08-17 2017-08-17 Network construction method and device, equipment processing and accessing method and network equipment Expired - Fee Related CN107395431B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710709671.9A CN107395431B (en) 2017-08-17 2017-08-17 Network construction method and device, equipment processing and accessing method and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710709671.9A CN107395431B (en) 2017-08-17 2017-08-17 Network construction method and device, equipment processing and accessing method and network equipment

Publications (2)

Publication Number Publication Date
CN107395431A CN107395431A (en) 2017-11-24
CN107395431B true CN107395431B (en) 2020-07-28

Family

ID=60353657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710709671.9A Expired - Fee Related CN107395431B (en) 2017-08-17 2017-08-17 Network construction method and device, equipment processing and accessing method and network equipment

Country Status (1)

Country Link
CN (1) CN107395431B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113543128B (en) * 2020-04-09 2023-03-31 中国移动通信有限公司研究院 Method, apparatus and computer readable storage medium for secure synchronization between access devices
CN113242161A (en) * 2021-05-08 2021-08-10 德微电技术(深圳)有限公司 Multi-device access method and system
CN113630825A (en) * 2021-08-04 2021-11-09 杰克缝纫机股份有限公司 Ad hoc networking method of industrial equipment, gateway and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103607432A (en) * 2013-10-30 2014-02-26 中兴通讯股份有限公司 Network establishment method and system, and network control center
EP2940926A1 (en) * 2014-04-28 2015-11-04 Siemens Aktiengesellschaft Method for configuring a communication device within an industrial automation system and distribution unit for a configuration server of an industrial communication network
CN106211184A (en) * 2015-04-30 2016-12-07 东莞市星东升实业有限公司 Microgrid based on microgrid agreement builds method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7848339B2 (en) * 2008-02-08 2010-12-07 Ricoh Company Ltd. Data communication apparatus, method for its network configuration, and computer readable recording medium storing its program
CN101677291B (en) * 2008-09-18 2012-11-07 华为技术有限公司 Method, device and system for automatically configuring network element equipment
CN103092158A (en) * 2012-12-31 2013-05-08 深圳先进技术研究院 Large building energy consumption real-time monitoring system based on wireless sensor network
US9792129B2 (en) * 2014-02-28 2017-10-17 Tyco Fire & Security Gmbh Network range extender with multi-RF radio support for plurality of network interfaces
TWI657675B (en) * 2015-04-10 2019-04-21 聚眾聯合科技股份有限公司 Network connection module, computer program product, and network connection method thereof
CN106792622A (en) * 2016-12-27 2017-05-31 广东欧珀移动通信有限公司 The method and terminal device of AP are hidden in connection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103607432A (en) * 2013-10-30 2014-02-26 中兴通讯股份有限公司 Network establishment method and system, and network control center
EP2940926A1 (en) * 2014-04-28 2015-11-04 Siemens Aktiengesellschaft Method for configuring a communication device within an industrial automation system and distribution unit for a configuration server of an industrial communication network
CN106211184A (en) * 2015-04-30 2016-12-07 东莞市星东升实业有限公司 Microgrid based on microgrid agreement builds method

Also Published As

Publication number Publication date
CN107395431A (en) 2017-11-24

Similar Documents

Publication Publication Date Title
CN107395431B (en) Network construction method and device, equipment processing and accessing method and network equipment
CN108781174B (en) Device connection method and device, electronic device and readable storage medium
CN108834198B (en) MP node network access method, MP node, MPP node and medium product
CN106656547B (en) Method and device for updating network configuration of household electrical appliance
CN109168150B (en) Bluetooth rapid networking method
CN103152624A (en) Remote control processing method, device and system
CN106713522B (en) Wireless fidelity Wi-Fi connection method and mobile terminal
CN102833363A (en) IP (Internet Protocol) address allocation method, device and system
CN111934961B (en) Intelligent household network configuration method, equipment and computer readable storage medium
CN110191451B (en) State synchronization method, mobile terminal, system and device of Bluetooth equipment
CN111556477A (en) Method for establishing decentralized Bluetooth SIG mesh network and intelligent lighting system applying same
CN106453370A (en) Method and device for allowing IPC to register to NVR
CN103686947A (en) Message transmission method and device based on virtual AP
CN104066083A (en) Method and device used for accessing wireless local area network
CN110022383B (en) Address management method and system
CN105530187B (en) Physical address acquisition methods and device
CN104053159A (en) Method and device for distributing frequency points to multi-carrier base station
CN111132266B (en) Terminal access method and system and cloud server
CN106162515B (en) Method, device and system for machine type communication safety communication
CN111461718A (en) Access method, device and system of block chain node
CN112769962B (en) Parameter distribution method, equipment and storage medium for application of Internet of things
CN110602268B (en) Tunnel port allocation method and device, electronic equipment and storage medium
CN106028303B (en) Intelligent device discovery method and device
CN104837146B (en) Configuration parameter distribution method, receiving method and device
CN113132333B (en) Networking login method, household appliance equipment, household appliance system 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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200728