Indoor smart device positioning method
By connecting indoor smart devices to the Raspberry Pi, using machine learning models to identify the room where the device is located, and estimating the location through RSSI values, the problem of excessive cost of existing indoor positioning technology is solved, and economical and accurate indoor positioning is achieved.
Patent Information
- Application Number
- CN202211683343.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-12-27
AI Technical Summary
The existing indoor positioning technology is too expensive, making it difficult to achieve economical and accurate indoor positioning.
By connecting indoor smart devices to Raspberry Pi, scanning devices with ARP commands, collecting packet loss rate and delay data, dividing them into indoor and outdoor data sets, using machine learning models to identify the room where the device is located, and estimating the device location through RSSI values.
It realizes indoor precise positioning, reduces positioning costs, and saves costs compared with ultra-bandwidth and Bluetooth AOA technology.
Smart Images

Figure CN116017289B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of positioning technology, and in particular to a smart home device positioning method. Background Art
[0002] Although existing indoor positioning technologies, such as ultra-wideband and Bluetooth AOA, can meet the needs of indoor positioning, their costs are too high. Summary of the invention
[0003] The technical problem solved by the present invention is to provide a smart home device positioning method to solve the problem of high indoor positioning cost in the prior art.
[0004] The present invention solves the above technical problems by adopting a technical solution: an indoor smart device positioning method, comprising the following steps:
[0005] S01. Connect indoor smart devices to the Raspberry Pi via wireless network;
[0006] S02. Use the ARP command to scan and display all devices connected to the Raspberry Pi and generate an ARP table;
[0007] S03. Collect the packet loss rate and latency of all devices in different scenarios, and add them to the APR table to obtain a data set;
[0008] S04. Divide the data in the data set into two categories: inside the room and outside the room, and use the machine learning model for training to obtain a machine learning model that can identify whether the device and the Raspberry Pi are in the same room;
[0009] S05. Use the machine learning model that can identify whether the device and the Raspberry Pi are in the same room to identify the room where the device to be located is located, and use the RSSI value between the device to be located and the smart device at a fixed position to estimate the position of the device to be located.
[0010] Furthermore, the APR table includes the device IP address and MAC address.
[0011] Furthermore, the delay includes a minimum value, a maximum value, an average value and a standard deviation.
[0012] Furthermore, the ICMP ping command is used to obtain the packet loss rate and delay of all devices.
[0013] Furthermore, the devices to be located include mobile phones, tablet computers and sweeping robots.
[0014] Furthermore, the indoor smart device positioning method also includes S06, updating the position of the device to be positioned in the indoor map in real time.
[0015] Beneficial effects of the invention: The indoor smart device positioning method of the invention uses the packet loss rate and delay between the smart device and the Raspberry Pi as a data set, and divides the data set into two categories: indoor and outdoor. The machine learning model is used to identify the smart device in the same room as the Raspberry Pi, and the RSSI value between the device to be positioned and the smart device at a fixed position is used to estimate the position of the device to be positioned, thereby achieving indoor precise positioning and solving the problem of high indoor positioning cost. Compared with ultra-wideband and Bluetooth AOA, the invention saves costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Attached Figure 1 It is a flow chart of the indoor smart device positioning method of the present invention. DETAILED DESCRIPTION
[0017] The indoor smart device positioning method of the present invention is as follows Figure 1 As shown, the following steps are included:
[0018] S01. Connect indoor smart devices to the Raspberry Pi via wireless network;
[0019] Specifically, indoor smart devices include air conditioners with wireless networks, televisions, wireless routers, mobile phones, tablets, sweeping robots and other smart devices.
[0020] S02. Use the ARP command to scan and display all devices connected to the Raspberry Pi and generate an ARP table;
[0021] Specifically, the APR table includes the device IP address and MAC address, which are used to distinguish different smart devices.
[0022] S03. Collect the packet loss rate and latency of all devices in different scenarios, and add them to the APR table to obtain a data set;
[0023] Specifically, the ICMP ping command is used to obtain the packet loss rate and delay of all devices. The delay shown includes the minimum value, maximum value, average value and standard deviation.
[0024] S04. Divide the data in the data set into two categories: inside the room and outside the room, and use the machine learning model for training to obtain a machine learning model that can identify whether the device and the Raspberry Pi are in the same room;
[0025] Specifically, in the same room, the packet loss rate is usually 0. The farther the distance or the different rooms, the packet loss rate and delay time will increase.
[0026] S05. Use the machine learning model that can identify whether the device and the Raspberry Pi are in the same room to identify the room where the device to be located is located, and use the RSSI value between the device to be located and the smart device at a fixed position to estimate the position of the device to be located.
[0027] Specifically, the room where the device to be located is obtained through the machine learning model, that is, the same room as the Raspberry Pi, and then the RSSI value between the device to be located and the smart device at a fixed position is used to estimate the position of the device to be located.
[0028] The indoor smart device positioning method of the present invention further includes step S06, updating the position of the device to be positioned in real time in the indoor map.
Claims
1. An indoor smart device positioning method, characterized in that: The following steps are involved: S01. Connect indoor smart devices to the Raspberry Pi via wireless network; S02. Use the ARP command to scan and display all devices connected to the Raspberry Pi and generate an ARP table, which includes the device IP address and MAC address; S03. Collect the packet loss rate and delay of all devices in different scenarios, and add them to the APR table to obtain a data set, where the delay includes the minimum value, maximum value, average value and standard deviation; S04. Divide the data in the data set into two categories: inside the room and outside the room, and use the machine learning model for training to obtain a machine learning model that can identify whether the device and the Raspberry Pi are in the same room; S05. Use the machine learning model that can identify whether the device and the Raspberry Pi are in the same room to identify the room where the device to be located is located, and use the RSSI value between the device to be located and the smart device at a fixed position to estimate the position of the device to be located.
2. The indoor smart device positioning method according to claim 1, characterized in that: Use the ICMP ping command to obtain the packet loss rate and latency of all devices.
3. The indoor smart device positioning method according to claim 1, characterized in that: The devices to be located include mobile phones, tablets and sweeping robots.
4. The indoor smart device positioning method according to any one of claims 1 to 3, characterized in that: The method further includes S06, updating the position of the device to be located in the indoor map in real time.
Citation Information
Patent Citations
Method for automatic generation of steel tube number
CN101256643A
Charging trolley for wireless rechargeable sensor network
CN111679673A