CN113766473B - Wireless Mesh ad hoc network method and device, electronic equipment and storage medium - Google Patents

Wireless Mesh ad hoc network method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113766473B
CN113766473B CN202110971205.4A CN202110971205A CN113766473B CN 113766473 B CN113766473 B CN 113766473B CN 202110971205 A CN202110971205 A CN 202110971205A CN 113766473 B CN113766473 B CN 113766473B
Authority
CN
China
Prior art keywords
bluetooth
bluetooth device
wireless mesh
hoc network
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110971205.4A
Other languages
Chinese (zh)
Other versions
CN113766473A (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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202110971205.4A priority Critical patent/CN113766473B/en
Publication of CN113766473A publication Critical patent/CN113766473A/en
Application granted granted Critical
Publication of CN113766473B publication Critical patent/CN113766473B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S11/00Systems for determining distance or velocity not using reflection or reradiation
    • G01S11/02Systems for determining distance or velocity not using reflection or reradiation using radio waves
    • G01S11/06Systems for determining distance or velocity not using reflection or reradiation using radio waves using intensity measurements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Abstract

The embodiment of the invention relates to a wireless Mesh ad hoc network method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: starting Bluetooth scanning after the first Bluetooth device is powered on; when a Bluetooth signal sent by any second Bluetooth device is scanned, determining an RSSI value of the Bluetooth signal; determining a distance value between the first Bluetooth device and any one of the second Bluetooth devices based on the RSSI value; and sending the distance value to the wireless Mesh ad hoc network device, so that the wireless Mesh ad hoc network device determines a second Bluetooth device meeting the set conditions with the first Bluetooth device based on the distance value, and performs wireless Mesh ad hoc network on the first Bluetooth device and the second Bluetooth device meeting the set conditions with the first Bluetooth device. From this, can realize automatic discovery and satisfy first bluetooth equipment and the second bluetooth equipment of setting for the condition, and then carry out wireless Mesh network deployment to satisfying the first bluetooth equipment and the second bluetooth equipment of setting for the condition intelligently, and need not the user and join in marriage the net manually, promote user experience.

Description

Wireless Mesh ad hoc network method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of Bluetooth, in particular to a wireless Mesh ad hoc network method, a wireless Mesh ad hoc network device, electronic equipment and a storage medium.
Background
The wireless Mesh ad hoc network is a novel wireless network technology completely different from the traditional wireless network, and is widely applied by virtue of the advantages of strong reliability, easiness in expansion and the like.
In an exemplary application scenario, the wireless Mesh ad hoc network is applied to a smart home system. However, in the prior art, when multiple smart home devices are subjected to wireless Mesh ad hoc network, a user needs to manually distribute a network based on the position of the smart home device, which causes low efficiency of the distribution network and is easy to make mistakes, thereby affecting user experience.
In view of the above technical problems, no effective solution has been proposed at present.
Disclosure of Invention
In view of this, embodiments of the present invention provide a wireless Mesh ad hoc network method, an apparatus, an electronic device, and a storage medium, so as to automatically discover a first bluetooth device and a second bluetooth device that meet a set condition, and further intelligently perform wireless Mesh networking on the first bluetooth device and the second bluetooth device that meet the set condition, thereby improving network distribution efficiency and improving user experience.
In a first aspect, an embodiment of the present invention provides a wireless Mesh ad hoc network method, where the method includes:
starting Bluetooth scanning after the first Bluetooth equipment is powered on;
when a Bluetooth signal sent by any second Bluetooth device is scanned, determining the RSSI value of the Bluetooth signal;
determining a distance value between the first Bluetooth device and any one of the second Bluetooth devices based on the RSSI value;
and sending the distance value to wireless Mesh ad hoc network equipment, so that the wireless Mesh ad hoc network equipment determines second Bluetooth equipment meeting set conditions with the first Bluetooth equipment based on the distance value, and performs wireless Mesh ad hoc network on the first Bluetooth equipment and the second Bluetooth equipment meeting the set conditions with the first Bluetooth equipment.
In a possible embodiment, when there are a plurality of scanned bluetooth signals transmitted by the second bluetooth devices, the determining a distance between the first bluetooth device and any one of the second bluetooth devices based on the RSSI value includes:
grouping the RSSI values of all the scanned Bluetooth signals, wherein the RSSI values in the same group correspond to the same second Bluetooth equipment, and the RSSI values in different groups correspond to different second Bluetooth equipment;
for each of the packets, determining a target RSSI value from a plurality of the RSSI values that the packet comprises; determining a distance value between the first Bluetooth device and the second Bluetooth device corresponding to the packet based on the target RSSI value.
In a possible implementation, the determining a target RSSI value from among the plurality of RSSI values included in the packet comprises:
filtering a plurality of the RSSI values comprised by the packet;
determining an average of a plurality of the RSSI values in the packet after filtering;
determining the average value as a target RSSI value.
In a possible embodiment, the filtering the plurality of RSSI values included in the packet includes:
determining a mean u and a variance σ of a plurality of the RSSI values included in the packet;
and filtering RSSI values which do not belong to a set range in the packet, wherein the set range is (u-k sigma, u + k sigma), and k is a preset value.
In a second aspect, an embodiment of the present invention provides a wireless Mesh ad hoc network method, where the method includes:
receiving a distance value sent by a first Bluetooth device, wherein the distance value is used for representing the distance between the first Bluetooth device and a second Bluetooth device;
determining a second Bluetooth device meeting a set condition with the first Bluetooth device based on the distance value;
and performing wireless Mesh ad hoc network on the first Bluetooth device and the second Bluetooth device meeting set conditions with the first Bluetooth device.
In a possible embodiment, determining a second bluetooth device satisfying a set condition with the first bluetooth device based on the distance value includes:
determining first position information of the first Bluetooth device based on distance values between the first Bluetooth device and at least three second Bluetooth devices and known second position information of the at least three second Bluetooth devices by using a least square method;
and determining a second Bluetooth device in the same set space with the first Bluetooth device as a second Bluetooth device meeting set conditions with the first Bluetooth device based on the first position information and the second position information.
In a third aspect, an embodiment of the present invention provides a wireless Mesh ad hoc network device, where the device includes:
the scanning module is used for starting Bluetooth scanning after the first Bluetooth equipment is powered on;
the RSSI determining module is used for determining the RSSI value of the Bluetooth signal when the Bluetooth signal sent by any second Bluetooth device is scanned;
a distance determining module, configured to determine a distance value between the first bluetooth device and any of the second bluetooth devices based on the RSSI value;
and the sending module is used for sending the distance value to the wireless Mesh ad hoc network device so as to enable the wireless Mesh ad hoc network device to determine a second Bluetooth device meeting the set conditions between the wireless Mesh ad hoc network device and the first Bluetooth device based on the distance value, and to carry out wireless Mesh ad hoc network on the first Bluetooth device and the second Bluetooth device meeting the set conditions between the first Bluetooth device and the first Bluetooth device.
In a fourth aspect, an embodiment of the present invention provides a wireless Mesh ad hoc network device, where the device includes:
the receiving module is used for receiving a distance value sent by a first Bluetooth device, wherein the distance value is used for representing the distance between the first Bluetooth device and a second Bluetooth device;
the device determining module is used for determining a second Bluetooth device meeting a set condition with the first Bluetooth device based on the distance value;
and the networking module is used for performing wireless Mesh ad hoc network on the first Bluetooth device and the second Bluetooth device meeting set conditions with the first Bluetooth device.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including: the processor is configured to execute a wireless Mesh ad hoc network program stored in the memory to implement the wireless Mesh ad hoc network method according to any one of the first aspect and the second aspect.
In a sixth aspect, an embodiment of the present invention provides a storage medium, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the wireless Mesh ad hoc network method according to any one of the first aspect or the second aspect.
According to the technical scheme provided by the embodiment of the invention, after a first Bluetooth device is powered on, bluetooth scanning is started, when a Bluetooth signal sent by any second Bluetooth device is scanned, an RSSI value of the Bluetooth signal is determined, a distance value between the first Bluetooth device and any second Bluetooth device is determined based on the RSSI value, and the distance value is sent to a wireless Mesh ad hoc network device, so that the wireless Mesh ad hoc network device determines a second Bluetooth device meeting a set condition with the first Bluetooth device based on the distance value, and performs wireless Mesh ad hoc network on the first Bluetooth device and a second Bluetooth device meeting the set condition with the first Bluetooth device, and the first Bluetooth device and the second Bluetooth device meeting the set condition can be automatically found, and then the first Bluetooth device and the second Bluetooth device meeting the set condition can be intelligently subjected to wireless Mesh network configuration without a user manually, so that the efficiency of the network is improved, and the user experience is improved.
Drawings
Fig. 1 is a schematic view of an application scenario according to an embodiment of the present invention;
fig. 2 is a flowchart of an embodiment of a wireless Mesh ad hoc network method according to an exemplary embodiment of the present invention;
fig. 3 is a schematic diagram illustrating that, when the distance is fixed, the probability distribution of the RSSI values of the bluetooth signals received by the receiving end satisfies the normal distribution;
fig. 4 is a flowchart of another embodiment of a wireless Mesh ad hoc network method according to an exemplary embodiment of the present invention;
fig. 5 is a schematic diagram of a networking architecture obtained by applying the wireless Mesh ad hoc network method according to the embodiment of the present invention;
fig. 6 is a block diagram of an embodiment of a wireless Mesh ad hoc network device according to an exemplary embodiment of the present invention;
fig. 7 is a block diagram of another embodiment of a wireless Mesh ad hoc network device according to an exemplary embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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.
For the convenience of understanding of the embodiments of the present invention, the system architecture and application scenario related to the embodiments of the present invention are first explained with reference to the drawings.
Fig. 1 is a schematic view of an application scenario according to an embodiment of the present invention. The application scenario shown in fig. 1 includes: bluetooth devices 11-16, and a wireless Mesh ad hoc network device 17.
As an exemplary application scenario, the bluetooth devices 11 to 16 may be smart home devices, such as a smart air conditioner, a smart range hood, a smart water purifier, a smart electric cooker, a smart television, a smart floor sweeper, and the like. Further, as shown in fig. 1, it is assumed that the bluetooth devices 11 to 14 are located in the same space, such as a kitchen, and the bluetooth devices 15 to 16 are located in a different space, such as a living room, from the bluetooth devices 1 to 14.
In the application scenario, by applying the technical solution provided by the embodiment of the present invention, bluetooth devices, such as the bluetooth devices 11 to 14, in the same space can be discovered, and then the bluetooth devices in the same space are subjected to wireless Mesh ad hoc network.
The method according to the present invention is further explained with reference to the following embodiments, which are not to be construed as limiting the embodiments of the present invention.
Referring to fig. 2, a flowchart of an embodiment of a wireless Mesh ad hoc network method according to an exemplary embodiment of the present invention is provided. As an embodiment, the process shown in fig. 2 may be applied to a bluetooth device (hereinafter referred to as a first bluetooth device for convenience of description) with unknown location information, such as the bluetooth device 11. As shown in fig. 2, the process may include the following steps:
step 201, after the first bluetooth device is powered on, bluetooth scanning is started.
In one embodiment, the first bluetooth device may automatically turn on the bluetooth scanning function after first powering on.
In another embodiment, after the first bluetooth device is powered on, the bluetooth scan function may be started by the first bluetooth device by triggering the bluetooth start button on the first bluetooth device.
The first bluetooth device may scan at least one bluetooth broadcast channel (e.g., three channels 37, 38, and 39) for bluetooth signals after initiating a bluetooth scan.
Furthermore, it should be noted that the first bluetooth device will continue to scan at least one bluetooth broadcast channel for a period of time, such as 1 minute, after initiating the bluetooth scan.
Step 202, when a bluetooth signal sent by any second bluetooth device is scanned, determining an RSSI value of the bluetooth signal.
First, the second bluetooth device refers to the bluetooth devices, such as the bluetooth devices 12 to 16, except the first bluetooth device in the whole application scenario.
The second bluetooth device may start the bluetooth broadcast under the power-on condition, for example, the second bluetooth device may automatically start the bluetooth broadcast function after being powered on, or the second bluetooth device starts the bluetooth broadcast function by triggering the broadcast button on the second bluetooth device after being powered on. The second bluetooth device may transmit a bluetooth signal through at least one bluetooth broadcast channel (e.g., three channels 37, 38, and 39) after the bluetooth broadcast function is activated.
The second bluetooth device may continuously transmit bluetooth signals over the at least one bluetooth broadcast channel for a period of time, similar to the first bluetooth device continuously scanning the at least one bluetooth broadcast channel for a period of time as described above.
Based on this, after starting bluetooth scanning, the first bluetooth device can scan the bluetooth signal that the second bluetooth device sent, and for a certain second bluetooth device, the first bluetooth device can scan a plurality of bluetooth signals of this second bluetooth device. The plurality of bluetooth signals here includes the same bluetooth signal transmitted by the second bluetooth device at the same time through the plurality of bluetooth broadcast channels, and a plurality of bluetooth signals transmitted by the second bluetooth device at different times.
In the embodiment of the invention, when the first Bluetooth device scans the Bluetooth signal sent by the second Bluetooth device, the RSSI value of the Bluetooth signal is determined.
And step 203, determining a distance value between the first Bluetooth device and any second Bluetooth device based on the RSSI value.
As shown in step 202, for a second bluetooth device, the first bluetooth device may scan a plurality of bluetooth signals of the second bluetooth device during the scanning process, and then determine RSSI values of the plurality of bluetooth signals.
Based on this, in this step 203, the first bluetooth device first groups the RSSI values of all the scanned bluetooth signals, so as to assign the RSSI values corresponding to the same second bluetooth device to the same group, and assign the RSSI values corresponding to different second bluetooth devices to different groups, that is, the RSSI values in the same group correspond to the same second bluetooth device, and the RSSI values in different groups correspond to different second bluetooth devices; the first Bluetooth device then determines, for each packet, a target RSSI value from among a plurality of RSSI values included in the packet, and finally determines, based on the target RSSI value, a distance value between the first Bluetooth device and a second Bluetooth device to which the packet corresponds. This means that, in the embodiment of the present invention, the first bluetooth device determines, for each second bluetooth device, the distance value between the first bluetooth device and the second bluetooth device based on the RSSI values of the plurality of bluetooth signals transmitted by the second bluetooth device collectively. Through this kind of processing, can effectively avoid because of the RSSI value of bluetooth signal can receive the interference of environmental factor, lead to RSSI value inaccurate enough to the distance that determines based on single RSSI value is great with the condition of actual distance error.
In one embodiment, the plurality of RSSI values included in the packet may be filtered to filter out outliers (e.g., values that are too large or too small), and then an average of the plurality of RSSI values in the packet after filtering is determined and determined as the target RSSI value.
Furthermore, it is found through statistics that, within a certain period of time, when the distance is fixed (that is, the distance between the receiving end and the transmitting end of the bluetooth signal is fixed), the RSSI value probability distribution of the bluetooth signal received by the receiving end satisfies the normal distribution, see fig. 3, which is a schematic diagram that the RSSI value probability distribution of the bluetooth signal received by the receiving end satisfies the normal distribution when the distance is fixed.
Based on this, in an embodiment, the plurality of RSSI values included in the packet may be filtered by: first, an average value u and a variance σ of a plurality of RSSI values included in a packet are determined based on the following formula (one) and formula (two), respectively, and then RSSI values that do not fall within a set range of (u-k σ, u + k σ) where k is a preset value, for example, 0.8, are filtered out from the packet.
Figure BDA0003225080040000081
Figure BDA0003225080040000082
In this step 203, determining a distance value between the first bluetooth device and the second bluetooth device corresponding to the packet based on the target RSSI value may be implemented based on the following formula (three):
Figure BDA0003225080040000091
in the formula (iii), d represents a distance value, RSSI represents a target RSSI value, a represents an RSSI value when the transmitting end and the receiving end are spaced apart by 1 meter, and m represents an environmental attenuation factor. In an open space, m is generally 1.6 to 1.8, and in a blocked complex space, m is generally 4 to 6.
And 204, sending the distance value to the wireless Mesh ad hoc network device, so that the wireless Mesh ad hoc network device determines a second Bluetooth device meeting the set conditions with the first Bluetooth device based on the distance value, and performs wireless Mesh ad hoc network on the first Bluetooth device and the second Bluetooth device meeting the set conditions with the first Bluetooth device.
In one embodiment, the setting condition may refer to being in the same space, such as a kitchen.
In an embodiment, the setting condition may refer to a close distance, wherein the close distance may be characterized by a distance value being smaller than a set distance threshold.
As to how the wireless Mesh ad hoc network device determines the second bluetooth device satisfying the setting condition with the first bluetooth device based on the distance value, the following is explained by the flow shown in fig. 4, and detailed description is omitted here.
According to the technical scheme provided by the embodiment of the invention, after a first Bluetooth device is powered on, bluetooth scanning is started, when a Bluetooth signal sent by any second Bluetooth device is scanned, an RSSI value of the Bluetooth signal is determined, a distance value between the first Bluetooth device and any second Bluetooth device is determined based on the RSSI value, and the distance value is sent to a wireless Mesh ad hoc network device, so that the wireless Mesh ad hoc network device determines a second Bluetooth device meeting a set condition with the first Bluetooth device based on the distance value, and the first Bluetooth device and a second Bluetooth device meeting the set condition with the first Bluetooth device are subjected to wireless Mesh ad hoc network, so that the first Bluetooth device and the second Bluetooth device meeting the set condition can be automatically discovered, and the first Bluetooth device and the second Bluetooth device meeting the set condition can be intelligently subjected to wireless Mesh networking without being manually subjected to network distribution by a user, the network distribution efficiency is improved, and the user experience is improved.
Referring to fig. 4, a flowchart of another embodiment of a method for wireless Mesh ad hoc network according to an exemplary embodiment of the present invention is provided. As an embodiment, the flow shown in fig. 4 may be applied to a wireless Mesh ad hoc network device. As shown in fig. 4, the process may include the following steps:
step 401, receiving a distance value sent by a first bluetooth device, where the distance value is used to represent a distance between the first bluetooth device and a second bluetooth device.
As for how the first bluetooth device obtains the distance value between the first bluetooth device and the second bluetooth device, refer to the description in the flow shown in fig. 2, and are not described again here.
And 402, determining a second Bluetooth device meeting the set conditions with the first Bluetooth device based on the distance value.
In one embodiment, the setting condition may refer to being in the same space, such as a kitchen.
In an embodiment, the setting condition may refer to a close distance, wherein the close distance may be characterized by a distance value being smaller than a set distance threshold.
It should be noted that, when the setting condition indicates that the smart home devices are located in the same space, it is not accurate to determine whether the smart home devices are located in the same space only according to the distance value, for example, in a home scene, if a living room and a kitchen are adjacent, the smart home devices located in the living room are likely to be closer to the smart home devices located in the kitchen, but the smart home devices are not located in the same space. Since it is more accurate to determine whether the bluetooth devices are located in the same space according to the location information, in this step 402, the location information of the first bluetooth device (hereinafter referred to as first location information for convenience of description) is determined, and then the second bluetooth device located in the same space as the first bluetooth device is determined based on the first location information of the first bluetooth device and the location information of the second bluetooth device (hereinafter referred to as second location information for convenience of description).
How to determine the first location information of the first bluetooth device is described below:
based on the least square method positioning principle, when the position information (represented by two-dimensional coordinate values) of three nodes and the distance value between each of the three nodes and the unknown position node are known, the position information of the unknown position node can be solved based on the least square method.
Specifically, it is assumed that the position information of the known three nodes is (x 1, x 2), (x 2, y 2), and (x 3, y 3), and the distance value between each of the three nodes and the unknown position node (the position information to be solved is (x, y)) is d 1 、d 2 、d 3 The following set of equations may be listed:
Figure BDA0003225080040000111
then, by solving the above equation set, the following equation (four) is obtained, i.e., (x, y) can be solved:
Figure BDA0003225080040000112
it can be seen that, in this step 402, determining, based on the distance value, a second bluetooth device that satisfies the setting condition with the first bluetooth device includes: and determining first position information of the first Bluetooth device based on the distance values between the first Bluetooth device and at least three second Bluetooth devices and known second position information of the at least three second Bluetooth devices by using a least square method, and then determining the second Bluetooth device which is in the same set space with the first Bluetooth device as the second Bluetooth device meeting the set conditions with the first Bluetooth device based on the first position information and the second position information.
And step 403, performing wireless Mesh ad hoc network on the first bluetooth device and the second bluetooth device meeting the set conditions with the first bluetooth device.
Fig. 5 is a schematic diagram of a networking architecture obtained by applying the wireless Mesh ad hoc network method provided by the embodiment of the present invention. In fig. 5, nodes a to J, L to N are in the same space and are added to the same networking architecture, while K, O are removed from the networking architecture because they are in other spaces.
According to the technical scheme provided by the embodiment of the invention, after a first Bluetooth device is powered on, bluetooth scanning is started, when a Bluetooth signal sent by any second Bluetooth device is scanned, an RSSI value of the Bluetooth signal is determined, a distance value between the first Bluetooth device and any second Bluetooth device is determined based on the RSSI value, and the distance value is sent to a wireless Mesh ad hoc network device, so that the wireless Mesh ad hoc network device determines a second Bluetooth device meeting a set condition with the first Bluetooth device based on the distance value, and performs wireless Mesh ad hoc network on the first Bluetooth device and a second Bluetooth device meeting the set condition with the first Bluetooth device, and the first Bluetooth device and the second Bluetooth device meeting the set condition can be automatically found, and then the first Bluetooth device and the second Bluetooth device meeting the set condition can be intelligently subjected to wireless Mesh network configuration without a user manually, so that the efficiency of the network is improved, and the user experience is improved.
Corresponding to the embodiment of the wireless Mesh ad hoc network method, the invention also provides an embodiment of the wireless Mesh ad hoc network device.
Referring to fig. 6, a block diagram of an embodiment of a wireless Mesh ad hoc network device according to an exemplary embodiment of the present invention is provided. As an embodiment, the apparatus may be applied to a first bluetooth device, and as shown in fig. 6, the apparatus includes:
the scanning module 61 is configured to start bluetooth scanning after the first bluetooth device is powered on;
an RSSI determining module 62, configured to determine an RSSI value of a bluetooth signal sent by any one of the second bluetooth devices when the bluetooth signal is scanned;
a distance determining module 63, configured to determine a distance value between the first bluetooth device and any one of the second bluetooth devices based on the RSSI value;
a sending module 64, configured to send the distance value to a wireless Mesh ad hoc network device, so that the wireless Mesh ad hoc network device determines, based on the distance value, a second bluetooth device that meets a set condition with the first bluetooth device, and performs wireless Mesh ad hoc network on the first bluetooth device and the second bluetooth device that meets the set condition with the first bluetooth device.
In a possible implementation, the distance determining module 63 is specifically configured to:
when a plurality of scanned Bluetooth signals sent by the second Bluetooth equipment are sent, grouping the RSSI values of all the scanned Bluetooth signals, wherein the RSSI value in the same group corresponds to the same second Bluetooth equipment, and the RSSI values in different groups correspond to different second Bluetooth equipment;
for each of the packets, determining a target RSSI value from a plurality of the RSSI values that the packet comprises; determining a distance value between the first Bluetooth device and the second Bluetooth device corresponding to the packet based on the target RSSI value.
In a possible implementation, the distance determining module 63 determines a target RSSI value from a plurality of RSSI values included in the packet, including:
filtering a plurality of the RSSI values comprised by the packet;
determining an average of a plurality of the RSSI values in the packet after filtering;
determining the average value as a target RSSI value.
In a possible implementation, the distance determining module 63 filters the plurality of RSSI values included in the packet, including:
determining a mean u and a variance σ of a plurality of the RSSI values included in the packet;
and filtering RSSI values which do not belong to a set range in the packet, wherein the set range is (u-k sigma, u + k sigma), and k is a preset value.
Referring to fig. 7, a block diagram of another embodiment of a wireless Mesh ad hoc network device is provided for an exemplary embodiment of the present invention. As an embodiment, the apparatus may be applied to a wireless Mesh ad hoc network device, as shown in fig. 7, and includes:
a receiving module 71, configured to receive a distance value sent by a first bluetooth device, where the distance value is used to represent a distance between the first bluetooth device and a second bluetooth device;
a device determining module 72, configured to determine, based on the distance value, a second bluetooth device that meets a set condition with the first bluetooth device;
a networking module 73, configured to perform wireless Mesh ad hoc networking on the first bluetooth device and the second bluetooth device that meets the set condition with the first bluetooth device.
In a possible implementation, the device-based determination module 72 is specifically configured to:
determining first position information of the first Bluetooth device based on distance values between the first Bluetooth device and at least three second Bluetooth devices and known second position information of the at least three second Bluetooth devices by using a least square method;
and determining a second Bluetooth device in the same set space with the first Bluetooth device as a second Bluetooth device meeting set conditions with the first Bluetooth device based on the first position information and the second position information.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device 800 shown in fig. 8 includes: at least one processor 801, memory 802, at least one network interface 804, and other user interfaces 803. The various components in the electronic device 800 are coupled together by a bus system 805. It is understood that the bus system 805 is used to enable communications among the components connected. The bus system 805 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 805 in fig. 8.
The user interface 803 may include a touch panel, a touch screen, or the like.
It will be appreciated that the memory 802 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM ), enhanced Synchronous DRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 802 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In embodiments of the present invention, processor 801 is configured to perform the method steps provided by the various method embodiments by invoking programs or instructions stored in memory 802, including, for example:
starting Bluetooth scanning after the first Bluetooth device is powered on;
when a Bluetooth signal sent by any second Bluetooth device is scanned, determining the RSSI value of the Bluetooth signal;
determining a distance value between the first Bluetooth device and any one of the second Bluetooth devices based on the RSSI value;
and sending the distance value to wireless Mesh ad hoc network equipment, so that the wireless Mesh ad hoc network equipment determines second Bluetooth equipment meeting set conditions with the first Bluetooth equipment based on the distance value, and performs wireless Mesh ad hoc network on the first Bluetooth equipment and the second Bluetooth equipment meeting the set conditions with the first Bluetooth equipment.
Or receiving a distance value sent by a first Bluetooth device, wherein the distance value is used for representing the distance between the first Bluetooth device and a second Bluetooth device;
determining a second Bluetooth device meeting a set condition with the first Bluetooth device based on the distance value;
and performing wireless Mesh ad hoc network on the first Bluetooth device and the second Bluetooth device meeting set conditions with the first Bluetooth device.
The methods disclosed in the embodiments of the present invention described above may be implemented in the processor 801 or implemented by the processor 801. The processor 801 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 801. The processor 801 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 802, and the processor 801 reads the information in the memory 802, and combines the hardware to complete the steps of the method.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The electronic device provided in this embodiment may be the electronic device shown in fig. 8, and may execute all the steps of the wireless Mesh ad hoc network method shown in fig. 2 and 4, so as to achieve the technical effect of the wireless Mesh ad hoc network method shown in fig. 2 and 4, and please refer to the description related to fig. 2 and 4 for brevity, which is not described herein again.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, storage media may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors, the above-described wireless Mesh ad hoc network method performed on the electronic side is implemented.
The processor is used for executing the wireless Mesh ad hoc network program stored in the memory so as to realize the following steps of the wireless Mesh ad hoc network method executed on the electronic equipment side:
starting Bluetooth scanning after the first Bluetooth device is powered on;
when a Bluetooth signal sent by any second Bluetooth device is scanned, determining the RSSI value of the Bluetooth signal;
determining a distance value between the first Bluetooth device and any second Bluetooth device based on the RSSI value;
and sending the distance value to wireless Mesh ad hoc network equipment, so that the wireless Mesh ad hoc network equipment determines second Bluetooth equipment meeting set conditions with the first Bluetooth equipment based on the distance value, and performs wireless Mesh ad hoc network on the first Bluetooth equipment and the second Bluetooth equipment meeting the set conditions with the first Bluetooth equipment.
Or receiving a distance value sent by a first Bluetooth device, wherein the distance value is used for representing the distance between the first Bluetooth device and a second Bluetooth device;
determining a second Bluetooth device meeting a set condition with the first Bluetooth device based on the distance value;
and performing wireless Mesh ad hoc network on the first Bluetooth device and the second Bluetooth device meeting set conditions with the first Bluetooth device.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A wireless Mesh ad hoc network method is applied to a first Bluetooth device, and the position information of the first Bluetooth device is unknown; the method comprises the following steps:
starting Bluetooth scanning after the first Bluetooth equipment is powered on;
when a Bluetooth signal sent by any second Bluetooth device is scanned, determining the RSSI value of the Bluetooth signal;
determining a distance value between the first Bluetooth device and any second Bluetooth device based on the RSSI values, wherein the distance value is determined based on the RSSI values included in each group after the RSSI values of all the scanned Bluetooth signals are grouped;
and sending the distance value to wireless Mesh ad hoc network equipment, so that the wireless Mesh ad hoc network equipment determines second Bluetooth equipment meeting set conditions with the first Bluetooth equipment based on the distance value, and performs wireless Mesh ad hoc network on the first Bluetooth equipment and the second Bluetooth equipment meeting the set conditions with the first Bluetooth equipment.
2. The method of claim 1, wherein when a plurality of scanned Bluetooth signals are transmitted by the second Bluetooth device, the determining a distance between the first Bluetooth device and any one of the second Bluetooth devices based on the RSSI values comprises:
grouping the RSSI values of all the scanned Bluetooth signals, wherein the RSSI values in the same group correspond to the same second Bluetooth equipment, and the RSSI values in different groups correspond to different second Bluetooth equipment;
for each of the packets, determining a target RSSI value from a plurality of the RSSI values that the packet includes; determining a distance value between the first Bluetooth device and the second Bluetooth device corresponding to the packet based on the target RSSI value.
3. The method of claim 2, wherein said determining a target RSSI value from a plurality of said RSSI values included in said packet comprises:
filtering a plurality of the RSSI values comprised by the packet;
determining an average of a plurality of the RSSI values in the packet after filtering;
determining the average value as a target RSSI value.
4. The method of claim 3, wherein the filtering the plurality of RSSI values included in the packet comprises:
determining a mean u and a variance σ of a plurality of the RSSI values included in the packet;
and filtering RSSI values which do not belong to a set range in the packet, wherein the set range is (u-k sigma, u + k sigma), and k is a preset value.
5. A wireless Mesh ad hoc network method is applied to a wireless Mesh ad hoc network device, and the method comprises the following steps:
receiving a distance value sent by a first Bluetooth device, wherein the distance value is used for representing the distance between the first Bluetooth device and a second Bluetooth device, and the distance value is determined based on RSSI (received signal strength indicator) values included in each group after the RSSI values of all the scanned Bluetooth signals are grouped; the position information of the first Bluetooth device is unknown;
determining a second Bluetooth device meeting a set condition with the first Bluetooth device based on the distance value;
and performing wireless Mesh ad hoc network on the first Bluetooth device and the second Bluetooth device meeting set conditions with the first Bluetooth device.
6. The method of claim 5, wherein determining a second Bluetooth device satisfying a predetermined condition with the first Bluetooth device based on the distance value comprises:
determining first position information of the first Bluetooth device based on distance values between the first Bluetooth device and at least three second Bluetooth devices and known second position information of the at least three second Bluetooth devices by using a least square method;
and determining a second Bluetooth device in the same set space with the first Bluetooth device as a second Bluetooth device meeting set conditions with the first Bluetooth device based on the first position information and the second position information.
7. A wireless Mesh ad hoc network device is applied to a first Bluetooth device, and the position information of the first Bluetooth device is unknown; the device comprises:
the scanning module is used for starting Bluetooth scanning after the first Bluetooth equipment is powered on;
the RSSI determining module is used for determining the RSSI value of the Bluetooth signal when the Bluetooth signal sent by any second Bluetooth device is scanned;
a distance determining module, configured to determine, based on the RSSI values, a distance value between the first bluetooth device and any one of the second bluetooth devices, where the distance value is determined based on the RSSI values included in each packet after the RSSI values of all the scanned bluetooth signals are grouped;
and the sending module is used for sending the distance value to the wireless Mesh ad hoc network device so as to enable the wireless Mesh ad hoc network device to determine a second Bluetooth device meeting the set conditions between the wireless Mesh ad hoc network device and the first Bluetooth device based on the distance value, and to carry out wireless Mesh ad hoc network on the first Bluetooth device and the second Bluetooth device meeting the set conditions between the wireless Mesh ad hoc network device and the first Bluetooth device.
8. A wireless Mesh ad hoc network device is applied to wireless Mesh ad hoc network equipment, and the device comprises:
the distance measurement device comprises a receiving module, a judging module and a judging module, wherein the receiving module is used for receiving a distance value sent by a first Bluetooth device, the distance value is used for representing the distance between the first Bluetooth device and a second Bluetooth device, and the distance value is determined based on RSSI values included in each group after the RSSI values of all the scanned Bluetooth signals are grouped; the position information of the first Bluetooth device is unknown;
the device determining module is used for determining a second Bluetooth device meeting set conditions with the first Bluetooth device based on the distance value;
and the networking module is used for performing wireless Mesh ad hoc network on the first Bluetooth device and the second Bluetooth device meeting set conditions with the first Bluetooth device.
9. An electronic device, comprising: a processor and a memory, wherein the processor is configured to execute a wireless Mesh ad hoc network program stored in the memory to implement the wireless Mesh ad hoc network method according to any one of claims 1 to 4 or 5 to 6.
10. A storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the wireless Mesh ad hoc network method of any one of claims 1 to 4 or 5 to 6.
CN202110971205.4A 2021-08-23 2021-08-23 Wireless Mesh ad hoc network method and device, electronic equipment and storage medium Active CN113766473B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110971205.4A CN113766473B (en) 2021-08-23 2021-08-23 Wireless Mesh ad hoc network method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110971205.4A CN113766473B (en) 2021-08-23 2021-08-23 Wireless Mesh ad hoc network method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113766473A CN113766473A (en) 2021-12-07
CN113766473B true CN113766473B (en) 2022-12-20

Family

ID=78790923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110971205.4A Active CN113766473B (en) 2021-08-23 2021-08-23 Wireless Mesh ad hoc network method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113766473B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114758679A (en) * 2022-05-05 2022-07-15 汇钜电科(东莞)实业有限公司 Mobile hard disk, hard disk data interaction system and hard disk data interaction method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108834121A (en) * 2018-07-02 2018-11-16 中国联合网络通信集团有限公司 A kind of bluetooth equipment ad hoc network method and system
CN110506400A (en) * 2017-04-28 2019-11-26 慧与发展有限责任合伙企业 Bluetooth equipment locator
CN112512028A (en) * 2021-02-04 2021-03-16 深圳市晶讯技术股份有限公司 Intelligent product replacement system and method based on Bluetooth Mesh network
CN113466841A (en) * 2021-07-16 2021-10-01 Oppo广东移动通信有限公司 Distance measuring method, distance measuring device, electronic device, and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9860680B2 (en) * 2012-06-04 2018-01-02 Qualcomm Incorporated Automatic connection of bluetooth human interface devices
WO2016091284A1 (en) * 2014-12-09 2016-06-16 Here Global B.V. Handling bluetooth low energy messages of radio tags for position determination
US10064180B2 (en) * 2015-03-27 2018-08-28 Intel IP Corporation Methods, systems, and devices for dynamic packet transfer in wireless networks
US20180115858A1 (en) * 2016-10-21 2018-04-26 Qualcomm Incorporated Systems and methods for connecting wireless communication devices
CN107197445B (en) * 2017-05-16 2019-12-10 北京千丁互联科技有限公司 Memory, Bluetooth intelligent terminal, distance calculation method and door opening control method
CN108834154B (en) * 2018-07-20 2022-09-16 上海麦士信息技术有限公司 Intelligent facility layout method based on Bluetooth mesh
CN112867141B (en) * 2019-11-28 2023-07-11 中移雄安信息通信科技有限公司 Positioning control method, bluetooth service node and electronic equipment
CN112969167A (en) * 2021-02-02 2021-06-15 珠海格力电器股份有限公司 Equipment network distribution method, device and system, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110506400A (en) * 2017-04-28 2019-11-26 慧与发展有限责任合伙企业 Bluetooth equipment locator
CN108834121A (en) * 2018-07-02 2018-11-16 中国联合网络通信集团有限公司 A kind of bluetooth equipment ad hoc network method and system
CN112512028A (en) * 2021-02-04 2021-03-16 深圳市晶讯技术股份有限公司 Intelligent product replacement system and method based on Bluetooth Mesh network
CN113466841A (en) * 2021-07-16 2021-10-01 Oppo广东移动通信有限公司 Distance measuring method, distance measuring device, electronic device, and storage medium

Also Published As

Publication number Publication date
CN113766473A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN110831112B (en) Network connection method, intelligent household equipment, intelligent gateway and electronic equipment
CN109189698B (en) Equipment control method and device and Internet of things system
CN107113892B (en) Method and device for automatically networking gateway equipment
CN113766473B (en) Wireless Mesh ad hoc network method and device, electronic equipment and storage medium
US10454639B2 (en) D2D communication method and D2D communication apparatus
JP2020535713A5 (en)
AU2018402038B2 (en) BWP frequency hopping configuration method, network device and terminal
JP6381152B2 (en) Resource allocation method and user equipment
WO2020228040A1 (en) Smart home system control method and apparatus, electronic device and storage medium
WO2021032193A1 (en) Method for sidelink relay processing and user equipment
US20190020621A1 (en) Metering device address management method, collection terminal, and metering device
CN109769274B (en) Method, apparatus and readable storage medium for channel switching in wireless networking system
CN107205210B (en) Method, device, system and computer program for configuring wireless network node
CN113965474A (en) Network quality evaluation method, electronic device and storage medium
CN105517111A (en) Methods and apparatuses for connecting devices with network
CN105915416B (en) Information processing method and terminal equipment
CN113068113A (en) Network distribution method, network distribution equipment and computer readable storage medium
CN107708141B (en) Wireless network scanning method, mobile terminal and storage medium
JP7279992B2 (en) Speech recognition device and its wake-up response method, computer storage medium
CN111212312B (en) Method, device and remote control system for realizing equipment control based on remote controller
WO2015180017A1 (en) Method for transmitting signal in device to device proximity service, base station and user equipment
JP6223661B2 (en) Wireless terminal, wireless communication system, and computer program
EP4302495A1 (en) Assigning a sensing node to a group based on a current access point of said node
CN113259928A (en) OTA (over the air) upgrading method and device, electronic equipment, storage medium and program product
CN111862964B (en) Voice recognition equipment and wake-up response method thereof as well as computer 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