Network access method, device and equipment
By obtaining and analyzing the device information of mesh network equipment and selecting the appropriate target master node device for access, it solves the problem of network load increase caused by the broadcast method of Bluetooth Mesh technology during data transmission, and achieves more efficient network access and Better user experience.
Patent Information
- Application Number
- CN202010584448.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-24
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2040-06-24
AI Technical Summary
The existing Bluetooth Mesh technology uses broadcasting methods during data transmission, which leads to an increase in the amount of data in the network, which may lead to slow device response and increase network load, affecting users' normal Internet access process and Internet access experience.
By obtaining the device information of the registered mesh network device, determining the set of master nodes to be connected, and determining the target master node device to be accessed by the mesh network device based on the pre-stored master node selection method, reducing the link of data transmission and avoiding the entire Internet broadcast.
It effectively reduces the amount of data transmitted in the network, avoids the problems of slow device response and large network load, ensures the normal Internet access process of users, and improves the Internet access experience of users.
Smart Images

Figure CN113840265B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communication technology, and in particular to a network access method, device and equipment. Background Art
[0002] With the development of transmission technology, Bluetooth technology will become a basic technology in the Internet of Things. More and more developers will choose Bluetooth to build their own Internet of Things solutions. The new Bluetooth Mesh technology is suitable for one-to-many wireless communication scenarios and improves the communication efficiency of building large-scale network coverage. Specifically, Bluetooth Mesh technology will be more suitable for scenarios such as smart homes, building automation, and wireless sensor networks that require thousands of devices to transmit data in a safe, reliable, and stable environment.
[0003] Taking smart home as an example, when the number of terminal devices connected to the home network increases, Bluetooth Mesh technology, due to its one-to-many communication characteristics, can change the previous communication device to only be able to transmit data to one terminal device at the same time, to being able to transmit data to multiple terminal devices at the same time, so that multiple terminal devices can access data at the same time, improving the efficiency of terminal devices in accessing data.
[0004] However, in the prior art, Bluetooth mesh technology transmits data in a broadcasting manner in the network. When the number of mesh network devices in the same network increases, the amount of data transmitted in the network will also increase significantly. When the amount of data transmitted in the network exceeds the preset value, the mesh network device response may slow down and the network load may increase, affecting the user's normal Internet access process and further affecting the user's Internet experience. Summary of the invention
[0005] The embodiments of the present invention provide a network access method, device and equipment to reduce the amount of data transmitted in the network and ensure the normal Internet access process of users.
[0006] In a first aspect, an embodiment of the present invention provides a network access method, comprising: obtaining device information of a registered wireless mesh network mesh network device; determining a first master node set to be connected based on the device information of the mesh network device, wherein the first master node set includes at least one master node device; determining a first target master node device to be connected to the mesh network device from the first master node set based on a pre-stored master node selection method, and determining a device group corresponding to the first target master node device, and then obtaining a target node device corresponding to a leaf node in the device group corresponding to the first target master node device; connecting the mesh network device to the target node device, so that a terminal device connected to the mesh network device can access the network through a communication link corresponding to the mesh network device.
[0007] Optionally, the first master node set includes a master node device, and determining the first target master node device to be accessed by the mesh network device from the first master node set based on a pre-stored master node selection method includes: determining the master node device in the first master node set as the first target master node device to be accessed by the mesh network device based on a pre-stored master node selection method.
[0008] Optionally, the first master node set includes multiple master node devices, and determining the first target master node device to be connected to the mesh network device from the first master node set based on a pre-stored master node selection method includes: determining the weight value of the mesh network device and each master node device in the first master node set based on the pre-stored master node selection method to obtain a weight value set, wherein the weight value of the mesh network device and each master node device in the first master node set is positively correlated with the number of nodes passed by the mesh network device to each master node device in the first master node set; obtaining a target weight value from the weight value set, wherein the target weight value is the weight value with the smallest numerical value in the weight value set; and obtaining a first target master node device corresponding to the target weight value from the first master node set.
[0009] Optionally, the device information of the mesh network device includes location information of the mesh network device, and determining the first master node set to be connected based on the device information of the mesh network device includes: determining, based on the location information of the mesh network device, a first master node device within a first preset range of the center with the location information of the mesh network device as the center, to obtain the first master node set.
[0010] Optionally, the method also includes: when monitoring the movement of any mesh network device in the network, updating the attribute information of the mobile mesh network device to a mobile node; obtaining the location information of the mesh network device whose attribute information is a mobile node, and determining a second master node device within a second preset range from the center with the location information of the mesh network device whose attribute information is a mobile node as the center to obtain a second master node set; determining a second target master node device from the second master node set according to the master node selection method; determining a target slave node device from the slave node devices belonging to the second target master node device according to the location information of the mesh network device whose attribute information is a mobile node; and connecting the mesh network device whose attribute information is a mobile node to the target slave node device.
[0011] Optionally, before connecting the mesh network device whose attribute information is a mobile node to the target slave node device, it also includes: determining whether the number of mesh network devices whose attribute information is a mobile node currently connected to the target slave node device exceeds a preset number threshold; if exceeded, re-executing the steps of determining other target slave node devices from the slave node devices belonging to the second target master node device according to the location information of the mesh network device whose attribute information is a mobile node and subsequent steps until a new target slave node device that does not exceed the number threshold is determined.
[0012] Optionally, it also includes: if the number of mesh network devices with the attribute information of mobile nodes accessed by the slave node devices belonging to the second target master node device exceeds the number threshold, the number threshold is adjusted, and the mesh network devices with the attribute information of mobile nodes are accessed to the initial target slave node device, wherein the initial target slave node device is determined from the slave node devices belonging to the second target master node device according to the location information of the mesh network devices with the attribute information of mobile nodes.
[0013] In a second aspect, an embodiment of the present invention provides a network access device, including: an acquisition module, used to acquire device information of a registered wireless mesh network device;
[0014] A determination module is used to determine a first master node set to be connected based on device information of the mesh network device, wherein the first master node set includes at least one master node device; the determination module is also used to determine a first target master node device to be connected to the mesh network device from the first master node set based on a pre-stored master node selection method, and determine a device group corresponding to the first target master node device, and then obtain a target node device corresponding to a leaf node in the device group corresponding to the first target master node device; the determination module is also used to connect the mesh network device to the target node device, so that a terminal device connected to the mesh network device can access the network through a communication link corresponding to the mesh network device.
[0015] In a third aspect, an embodiment of the present invention provides a network access device, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the network access method as described in any one of the first aspects.
[0016] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the network access method as described in any one of the first aspects is implemented.
[0017] The embodiment of the present invention provides a network access method, apparatus and equipment. After adopting the above scheme, the device information of the registered mesh network device can be obtained first, and then the first main node set to be connected is determined according to the device information of the mesh network device, and then the first target main node device to be connected to the mesh network device is determined from the first main node set based on the pre-stored main node selection method, and the device group corresponding to the first target main node device is determined, and then the target node device corresponding to the leaf node in the device group corresponding to the first target main node device is obtained, and the mesh network device is connected to the target node device, so that the terminal device connected to the mesh network device can access the network through the communication link corresponding to the mesh network device, that is, the data involved in the process of the terminal device accessing the network is only transmitted on the communication link from the mesh network device to the first target main node device, and will not affect other links, thereby reducing the problems of slow device response and heavy network load caused by the full network broadcast method, ensuring the normal Internet access process of the user, and thus improving the user's Internet access experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Preferred embodiments of the present invention will be described below with reference to the accompanying drawings.
[0019] Figure 1A schematic diagram of the architecture of an application system of a network access method provided by an embodiment of the present invention;
[0020] Figure 2 A schematic diagram of a flow chart of a network access method provided by an embodiment of the present invention;
[0021] Figure 3 A schematic diagram of a flow chart of a network access method provided by another embodiment of the present invention;
[0022] Figure 4 A schematic diagram of the structure of a network access device provided by an embodiment of the present invention;
[0023] Figure 5 A schematic diagram of the hardware structure of a network access device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0024] First, those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention. Those skilled in the art can make adjustments to them as needed to adapt to specific application scenarios.
[0025] Secondly, it should be noted that in the description of the present invention, terms such as "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is only for the convenience of description and does not indicate or imply that the device or component must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0026] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0027] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0028] In the prior art, Bluetooth mesh technology transmits data in a broadcasting manner in the network. For example, when Bluetooth mesh devices are networked, the devices need to be bound to the home network first, and then transmitted in the home network by broadcasting. When the number of mesh devices in the same network increases, the amount of data transmitted in the network will also increase significantly. When the amount of data transmitted in the network exceeds the preset value, the network device response may slow down and the network load may increase, affecting the user's normal Internet access process, and thus affecting the user's Internet experience.
[0029] Based on the above problems, the present application is based on grouping the main node devices and then implementing network access by group, so that the terminal devices connected to the network devices in the group corresponding to the main node can access the network through the communication link from the mesh network device to the first target main node device, reducing the problems of slow device response and heavy network load caused by the full network broadcast method, and achieving the technical effect of both ensuring the user's normal Internet access process and improving the user's Internet experience.
[0030] Figure 1 A schematic diagram of the architecture of an application system of the network access method provided by an embodiment of the present invention, such as Figure 1 As shown, it includes a network terminal 101, a master node device 102, a slave node device 103 under the master node device, and a terminal device 105, wherein the last slave node device under the master node device 102 can be called a leaf node. When no other slave node devices are connected to the master node device, the master node device itself can also be called a leaf node. The terminal device 105 can be connected to the leaf node and access the network through the leaf node. For example, Figure 1 The node device 104 in the master node 102 may be referred to as a leaf node. In addition, a master node device 102 and its associated slave node devices may be grouped into a device group. For example, Figure 1 There are 3 master node devices in the system, and correspondingly there can be 3 device groups.
[0031] Figure 2 The flowchart of the network access method provided by the embodiment of the present invention is as follows. Figure 2 As shown, the method of this embodiment may include:
[0032] S201: Acquire device information of a registered wireless mesh network device.
[0033] In this embodiment, when a mesh network device wants to access the network as a node, it needs to register the mesh network device first to determine the basic information of the mesh network device, for example, the device name, number, model, login password, etc. of the mesh network device. Only after the mesh network device is registered can it access the mesh network as a node to achieve data interaction with the terminal device. In addition, in order to improve the accuracy of the mesh network device accessing the network as a node, the device information of the registered mesh network device can be obtained when accessing the network, wherein the device information of the mesh network device can include the location information of the mesh network device.
[0034] Furthermore, the location information of the mesh network device may be determined by the mesh network device in real time, or may be predetermined and then stored in the mesh network device.
[0035] S202: Determine a first master node set to be connected according to device information of the mesh network device, wherein the first master node set includes at least one master node device.
[0036] In this embodiment, after obtaining the device information of the mesh network device, the first master node set to be connected can be determined according to the obtained device information of the mesh network device. Further, when the device information of the mesh network device is the location information of the mesh network device, the first master node set can be obtained by determining the first master node device within the first preset range of the center with the location information of the mesh network device as the center according to the location information of the mesh network device. The first preset range can be customized according to actual conditions, for example, the first preset range can be 1-10 meters.
[0037] S203: Determine the first target master node device to be connected to the mesh network device from the first master node set based on the pre-stored master node selection method, determine the device group corresponding to the first target master node device, and then obtain the target node device corresponding to the leaf node in the device group corresponding to the first target master node device.
[0038] In this embodiment, different first target master node devices correspond to different device groups. After obtaining the first master node set, the first target master node device to be connected can be determined from the first master node set, and then the device group corresponding to the first target master node device can be determined. In addition, when the mesh network device is connected to the network, the target node device corresponding to the leaf node in the device group is connected, that is, the node device corresponding to the last node in the device group.
[0039] In addition, the device group corresponding to the first master node device may include devices directly or indirectly connected to the first master node device, and also include the first master node device itself. Generally, a leaf node refers to a device corresponding to the last node in the communication link corresponding to the first master node device. When the device group corresponding to the first master node device only includes the first master node device, the target node device corresponding to the leaf node in the device group is the first master node device itself.
[0040] Furthermore, the number of master node devices included in the first master node set is different, and the method of determining the first target master node device may also be different. The first master node set may include one or more master node devices.
[0041] When the first master node set includes a master node device, the implementation method of determining the first target master node device to be accessed by the mesh network device from the first master node set based on a pre-stored master node selection method can be: based on the pre-stored master node selection method, the master node device in the first master node set is determined as the first target master node device to be accessed by the mesh network device.
[0042] Specifically, when the first master node set includes only one master node device, the master node device can be directly set as the first target master node device.
[0043] When the first master node set includes multiple master node devices, the implementation method of determining the first target master node device to be connected to the mesh network device from the first master node set based on the pre-stored master node selection method may be:
[0044] Based on the pre-stored master node selection method, the weight values of the mesh network device and each master node device in the first master node set are determined to obtain a weight value set, wherein the weight values of the mesh network device and each master node device in the first master node set are positively correlated with the number of nodes passed by the mesh network device to each master node device in the first master node set.
[0045] Then, a target weight value is obtained from the weight value set, wherein the target weight value is the weight value with the smallest value in the weight value set, and a first target master node device corresponding to the target weight value is obtained from the first master node set.
[0046] Specifically, when the first master node set includes multiple master node devices, the first target master node device can be determined by selecting a weight value. Among them, the weight value of the mesh network device and each master node device in the first master node set is positively correlated with the number of nodes passed by the mesh network device to each master node device in the first master node set. For example, the weight value of the mesh network device and each master node device in the first master node set can be the number of nodes passed from the leaf node to be accessed by the mesh network device to the master node device. The larger the weight value, the more nodes passed, and the greater the data delay may be. Therefore, after determining the weight value set, the weight value with the smallest numerical value can be obtained from the weight value set as the target weight value, and the first target master node device corresponding to the target weight value can be obtained from the first master node set.
[0047] In addition, in order to improve the efficiency of data transmission and reduce latency, the number of master node devices in the first master node set can be set to 2-3. Ideally, the weight value in the mesh network is 1, and the maximum weight value can be 5-8, generally not more than 6.
[0048] In a specific example, when there are multiple main nodes within the effective communication distance of the mesh network device, it is necessary to compare the weights of the mesh network device to each main node, that is, the number of non-repeated nodes from the leaf node to which the mesh network device is connected to the main node. For example, main node A corresponds to group A, which has 3 nodes, and main node B corresponds to group B, which has 4 nodes. That is, the maximum weight of the access node connecting to main node A is 3, and the maximum weight of the access node connecting to main node B is 4. In order to reduce latency, the mesh network device can be assigned to the main node A with a smaller weight value, and there are 4 nodes in group A after the assignment.
[0049] S204: Connecting the mesh network device to the target node device, so that the terminal device connected to the mesh network device can access the network through the communication link corresponding to the mesh network device.
[0050] In this embodiment, after determining the target node device to be accessed by the mesh network device, the mesh network device can be directly connected to the target node device. After the mesh network device is connected to the target node device, the terminal device can be directly connected to the mesh network device, and then the terminal device can access the network through the communication link from the mesh network device to the target node device, and finally to the first target master node device. If the mesh network device is directly connected to the first target master node device, the terminal device can access the network through the communication link from the mesh network device to the first target master node device. In a specific example, the terminal device can be a smart phone, a smart TV, and a washing machine. When the smart phone, the smart TV, and the washing machine are all connected to the mesh network device, the network can be accessed through the communication link from the mesh network device to the first target master node device.
[0051] After adopting the above scheme, the device information of the registered mesh network device can be obtained first, and then the first main node set to be connected can be determined according to the device information of the mesh network device, and then the first target main node device to be connected to the mesh network device can be determined from the first main node set based on the pre-stored main node selection method, and the device group corresponding to the first target main node device can be determined, and then the target node device corresponding to the leaf node in the device group corresponding to the first target main node device can be obtained, and the mesh network device can be connected to the target node device, so that the terminal device connected to the mesh network device can access the network through the communication link corresponding to the mesh network device, that is, the data involved in the process of the terminal device accessing the network is only transmitted on the communication link from the mesh network device to the first target main node device, and will not affect other links, thereby reducing the problems of slow device response and heavy network load caused by the full network broadcast method, ensuring the normal Internet access process of the user, and thus improving the user's Internet experience.
[0052] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0053] Figure 3 A flowchart of a network access method provided by another embodiment of the present invention is shown as follows: Figure 3 As shown, the method may also include:
[0054] S301: When it is detected that any mesh network device in the network moves, the attribute information of the moving mesh network device is updated to a mobile node.
[0055] S302: Acquire location information of a mesh network device whose attribute information is a mobile node, and determine a second master node device within a second preset range from the center with the location information of the mesh network device whose attribute information is a mobile node as the center to obtain a second master node set.
[0056] S303: Determine a second target master node device from the second master node set according to the master node selection method.
[0057] S304: Determine a target slave node device from slave node devices belonging to the second target master node device according to location information of the mesh network device whose attribute information is a mobile node.
[0058] S305: Connect the mesh network device with attribute information of a mobile node to the target slave node device.
[0059] In this embodiment, the motion sensor carried in the mesh network device can automatically detect the movement of the device. When the motion sensor detects the movement of the mesh network device, the attribute information of the moving mesh network device can be updated to a mobile node.
[0060] In addition, when a mesh network device with attribute information of a mobile node wants to access the network, the location information of the mesh network device with attribute information of a mobile node can be obtained first, and the second master node device within a second preset range from the center is determined with the location information of the mesh network device with attribute information of a mobile node as the center, to obtain a second master node set. The second preset range can be the same as the first preset range, or different from the first preset range. Exemplarily, the second preset range can be smaller than the first preset range, which is 2-5 meters.
[0061] In addition, there may be one second master node device or multiple second master node devices in the second master node set. When there is one second master node device in the second master node set, the second target master node device may be determined in a method similar to that of determining the first target master node device when there is one first master node device in the first master node set. When there are multiple second master node devices in the second master node set, the second target master node device may be determined in a method similar to that of determining the first target master node device when there are multiple first master node devices in the first master node set. In addition, since the mesh network device whose attribute information is a mobile node cannot directly access the target master node device, it is necessary to access the node group by accessing other slave node devices belonging to the second target master node device in the device group where the target master node device is located to achieve network access.
[0062] In addition, before connecting the mesh network device whose attribute information is a mobile node to the target slave node device, the method may further include:
[0063] Determine whether the number of mesh network devices whose attribute information is a mobile node currently connected to the target slave node device exceeds a preset number threshold. If exceeded, re-execute the steps of determining other target slave node devices from the slave node devices belonging to the second target master node device according to the location information of the mesh network device whose attribute information is a mobile node and the subsequent steps until a new target slave node device that does not exceed the number threshold is determined.
[0064] Specifically, in order to avoid the device response speed being affected by excessive data transmitted in the communication link, a threshold value for the number of mesh network devices whose attribute information is a mobile node currently connected to the target slave node device can be set. If the threshold value is exceeded, the threshold value for the number of mesh network devices whose attribute information is a mobile node currently connected to other slave node devices in the device group where the target slave node device is located is determined. If the threshold value for the number of mesh network devices whose attribute information is a mobile node currently connected to other slave node devices does not exceed the threshold value, the mesh network devices whose attribute information is a mobile node are connected to other slave node devices.
[0065] In addition, if the number of mesh network devices whose attribute information is mobile nodes currently connected to the target slave node device does not exceed the number threshold, the mesh network device is directly connected to the target slave node device. The number threshold can be any value between 3 and 6.
[0066] In addition, if the number of mesh network devices with attribute information of mobile nodes accessed by slave node devices belonging to the second target master node device exceeds the number threshold, the number threshold is adjusted, and the mesh network devices with attribute information of mobile nodes are accessed to the initial target slave node devices, wherein the initial target slave node devices are determined from the slave node devices belonging to the second target master node device based on the location information of the mesh network devices with attribute information of mobile nodes.
[0067] Specifically, when the number of mesh network devices with attribute information of mobile nodes accessed by the slave node devices of the second target master node device exceeds the quantity threshold, it indicates that the quantity threshold may not be set reasonably, and the quantity threshold needs to be appropriately increased to enable access of mesh network devices with attribute information of mobile nodes. Further, in order to avoid the effect of setting the quantity threshold being not obvious, the range of each increase can be 2-3.
[0068] Figure 4 A schematic diagram of the structure of a network access device provided by an embodiment of the present invention, such as Figure 4 As shown, the apparatus may include:
[0069] The acquisition module 401 is used to acquire device information of a registered wireless mesh network device.
[0070] The determination module 402 is used to determine a first master node set to be connected according to the device information of the mesh network device, wherein the first master node set includes at least one master node device.
[0071] The determination module 402 is also used to determine the first target master node device to be connected to the mesh network device from the first master node set based on a pre-stored master node selection method, and determine the device group corresponding to the first target master node device, and then obtain the target node device corresponding to the leaf node in the device group corresponding to the first target master node device.
[0072] In addition, the first master node set includes a master node device, and the determination module 402 is further used to: determine the master node device in the first master node set as the first target master node device to be accessed by the mesh network device based on a pre-stored master node selection method.
[0073] In addition, the first master node set includes a plurality of master node devices, and the determining module 402 is further configured to:
[0074] Based on a pre-stored master node selection method, weight values of the mesh network device and each master node device in the first master node set are determined to obtain a weight value set, wherein the weight values of the mesh network device and each master node device in the first master node set are positively correlated with the number of nodes passed by the mesh network device to each master node device in the first master node set.
[0075] A target weight value is obtained from the weight value set, wherein the target weight value is a weight value with the smallest value in the weight value set.
[0076] A first target master node device corresponding to the target weight value is obtained from the first master node set.
[0077] The determination module 402 is further configured to connect the mesh network device to the target node device, so that a terminal device connected to the mesh network device can access the network through a communication link corresponding to the mesh network device.
[0078] In addition, in another embodiment, the determining module 402 is further configured to:
[0079] According to the location information of the mesh network device, a first master node set is obtained by taking the location information of the mesh network device as the center and a first master node device within a first preset range of the center.
[0080] In addition, the determining module 402 is further used for:
[0081] When the movement of any mesh network device in the network is detected, the attribute information of the moving mesh network device is updated to a mobile node.
[0082] The location information of the mesh network device whose attribute information is a mobile node is obtained, and the second master node device within a second preset range from the center is determined with the location information of the mesh network device whose attribute information is a mobile node as the center to obtain a second master node set.
[0083] A second target master node device is determined from the second master node set according to the master node selection method.
[0084] A target slave node device is determined from slave node devices belonging to the second target master node device according to the location information of the mesh network device whose attribute information is a mobile node.
[0085] The mesh network device whose attribute information is a mobile node is connected to the target slave node device.
[0086] In addition, the determining module 402 is further configured to:
[0087] It is determined whether the number of mesh network devices whose attribute information is a mobile node currently accessed by the target slave node device exceeds a preset number threshold.
[0088] If it exceeds, re-execute the steps of determining other target slave node devices from the slave node devices belonging to the second target master node device according to the location information of the mesh network device whose attribute information is the mobile node, and subsequent steps until new target slave node devices that do not exceed the quantity threshold are determined.
[0089] In addition, the determining module 402 is further configured to:
[0090] If the number of mesh network devices with the attribute information of mobile nodes accessed by the slave node devices belonging to the second target master node device exceeds the number threshold, the number threshold is adjusted, and the mesh network devices with the attribute information of mobile nodes are accessed to the initial target slave node devices, wherein the initial target slave node devices are determined from the slave node devices belonging to the second target master node device based on the location information of the mesh network devices with the attribute information of mobile nodes.
[0091] The device provided by the embodiment of the present invention can achieve the above Figure 2The implementation principle and technical effect of the method in the embodiment shown are similar and will not be described in detail here.
[0092] Figure 5 Schematic diagram of the hardware structure of the network access device provided by the embodiment of the present invention. Figure 5 As shown, the hardware structure provided by this embodiment includes: at least one processor 501 and a memory 502 , wherein the processor 501 and the memory 502 are connected via a bus 503 .
[0093] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the method in the above method embodiment.
[0094] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0095] In the above Figure 5 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0096] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.
[0097] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0098] An embodiment of the present invention further provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the network access method of the above method embodiment is implemented.
[0099] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0100] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0101] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A network access method, characterized in that: include: Get the device information of the registered wireless mesh network device; Determine a first master node set to be connected according to the device information of the mesh network device, wherein the first master node set includes at least one master node device; Based on the pre-stored master node selection method, a first target master node device to be connected by the mesh network device is determined from the first master node set, and a device group corresponding to the first target master node device is determined, and then a target node device corresponding to a leaf node in the device group corresponding to the first target master node device is obtained; the first target master node device is a master node device corresponding to a weight value with the smallest value in a set among weight values of the mesh network device and each master node device in the first master node set, and the weight value is positively correlated with the number of nodes passed by the mesh network device to each master node device in the first master node set; The mesh network device is connected to the target node device so that the terminal device connected to the mesh network device can access the network through the communication link corresponding to the mesh network device.
2. The method according to claim 1, characterized in that The first master node set includes a master node device, and determining a first target master node device to be connected to the mesh network device from the first master node set based on a pre-stored master node selection method includes: Based on a pre-stored master node selection method, a master node device in the first master node set is determined as a first target master node device to be accessed by the mesh network device.
3. The method according to any one of claims 1 to 2, characterized in that: The device information of the mesh network device includes location information of the mesh network device, and determining the first master node set to be connected according to the device information of the mesh network device includes: According to the location information of the mesh network device, a first master node set is obtained by taking the location information of the mesh network device as the center and a first master node device within a first preset range of the center.
4. The method according to any one of claims 1 to 2, characterized in that: The method further comprises: When any mesh network device in the network is detected to move, the attribute information of the moving mesh network device is updated to a mobile node; Acquire the location information of the mesh network device whose attribute information is a mobile node, and determine the second master node device within a second preset range from the center with the location information of the mesh network device whose attribute information is a mobile node as the center, to obtain a second master node set; Determine a second target master node device from the second master node set according to the master node selection method; Determine a target slave node device from slave node devices belonging to the second target master node device according to the location information of the mesh network device whose attribute information is a mobile node; The mesh network device whose attribute information is a mobile node is connected to the target slave node device.
5. The method according to claim 4, characterized in that Before the mesh network device whose attribute information is a mobile node is connected to the target slave node device, the method further includes: Determine whether the number of mesh network devices whose attribute information is a mobile node currently accessed by the target slave node device exceeds a preset number threshold; If it exceeds, re-execute the steps of determining other target slave node devices from the slave node devices belonging to the second target master node device according to the location information of the mesh network device whose attribute information is the mobile node, and subsequent steps until new target slave node devices that do not exceed the quantity threshold are determined.
6. The method according to claim 5, characterized in that Also includes: If the number of mesh network devices with the attribute information of mobile nodes accessed by the slave node devices belonging to the second target master node device exceeds the number threshold, the number threshold is adjusted, and the mesh network devices with the attribute information of mobile nodes are accessed to the initial target slave node devices, wherein the initial target slave node devices are determined from the slave node devices belonging to the second target master node device based on the location information of the mesh network devices with the attribute information of mobile nodes.
7. A network access device, characterized in that: include: An acquisition module is used to obtain device information of registered wireless mesh network devices; A determination module, configured to determine a first master node set to be connected according to device information of the mesh network device, wherein the first master node set includes at least one master node device; The determination module is further used to determine the first target master node device to be accessed by the mesh network device from the first master node set based on a pre-stored master node selection method, and determine the device group corresponding to the first target master node device, and then obtain the target node device corresponding to the leaf node in the device group corresponding to the first target master node device; the first target master node device is the master node device corresponding to the weight value with the smallest value in the set among the weight values of the mesh network device and each master node device in the first master node set, and the weight value is positively correlated with the number of nodes passed by the mesh network device to each master node device in the first master node set; The determination module is further used to connect the mesh network device to the target node device, so that the terminal device connected to the mesh network device can access the network through the communication link corresponding to the mesh network device.
8. A network access device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the network access method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the network access method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Broadcast transmission method in mesh network
CN108366019A