A communication method for Internet of Things system based on LoRa communication
By obtaining the node location and historical signal strength in the LoRa communication system, dynamically adjusting the gateway location and realizing automatic switching, the problem of unstable communication in the LoRa communication system in a dynamic environment is solved, and the stability and reliability of the system are improved.
Patent Information
- Application Number
- CN202411091221.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-08-09
AI Technical Summary
Existing LoRa communication systems cannot adaptively optimize network performance under dynamic environmental conditions (such as signal attenuation caused by different weather conditions), resulting in unstable communication or interruption of connections between nodes.
By obtaining the location information of the LoRa node device, determining the initial installation location of the gateway, recording the historical signal strength of each LoRa node device under different weather conditions, and adjusting the gateway position according to the historical signal strength, so as to automatically switch to a gateway with stronger signals. Ensure the continuity and reliability of data transmission.
It effectively solves the communication interruption problem caused by signal strength fluctuations, improves the stability and reliability of the system in a changing environment, and ensures the sustainability and efficiency of data transmission.
Smart Images

Figure CN118828406B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things communication technology, and in particular to an Internet of Things system communication method based on LoRa communication. Background Art
[0002] In modern Internet of Things (IoT) systems, LoRa (Long Range) communication technology is widely adopted due to its long-distance transmission capability and low power consumption. This technology is mainly used in applications covering a wide area, such as smart cities, agricultural monitoring, and environmental monitoring, where the communication range and signal stability between nodes are key factors in system performance.
[0003] Existing LoRa communication systems mainly deploy LoRa gateway devices in a static manner to achieve coverage of LoRa nodes in a specific area. These gateways are installed based on preliminary geographical and environmental analysis, usually taking into account factors such as building layout and terrain. Once the location of the gateway is determined, it is rarely adjusted, and its main purpose is to maximize coverage and ensure network connectivity.
[0004] Although existing technologies can provide stable communications in most situations, they often cannot adaptively optimize network performance under dynamic environmental conditions, such as signal attenuation caused by different weather conditions. For example, in rainy or foggy weather, signal propagation may be affected, and existing static gateway deployment methods cannot adjust to these changes, which may lead to unstable communications or disconnection between nodes. Summary of the invention
[0005] The present application provides a communication method for an Internet of Things system based on LoRa communication, which is used to solve the problem of how to maintain the communication quality and stability of the Internet of Things system based on LoRa communication under changing environmental conditions.
[0006] In a first aspect, the present application provides an Internet of Things system communication method based on LoRa communication, which is applied to an Internet of Things system based on LoRa communication, and the method includes:
[0007] Obtaining location information of a LoRa node device in a target area map, where the LoRa node device is used to collect sensor data;
[0008] Determine a first installation location of the LoRa gateway device according to the building location information in the target area map, and the LoRa gateway device at the first installation location is wirelessly connected to one or more LoRa node devices;
[0009] Record the historical signal strength of each LoRa node device under different weather conditions;
[0010] Determine a second installation location of the LoRa gateway device based on the historical signal strength, where the historical signal strength received by the LoRa gateway device at the second installation location under the target weather conditions is higher than a preset strength threshold;
[0011] When it is detected that the strength signal of the LoRa node device is weak, the LoRa gateway device at the second installation location is automatically switched to receive and send communication data.
[0012] Through the above embodiments, the Internet of Things system can effectively solve the communication interruption problem caused by signal strength fluctuations by obtaining the location of the LoRa node device, determining the first and second installation locations, recording the signal strength, and automatically switching the gateway device. First, the optimal initial position of the gateway is determined by obtaining the node location and considering the building layout, which ensures basic coverage. Then, by recording the signal strength under different weather conditions and adjusting the gateway position accordingly, the stability of the system in a changing environment is improved. Finally, by automatically switching to a gateway with a stronger signal, the continuity and reliability of data transmission are ensured.
[0013] In some embodiments, the step of determining the first installation location of the LoRa gateway device according to the building location information in the target area map specifically includes:
[0014] Determine the effective data transmission range of the LoRa node device based on the building location information in the target area map;
[0015] A first installation location of each LoRa gateway device is determined based on the data transmission range, and the number of LoRa node devices covered by the LoRa gateway device at the first installation location is the largest.
[0016] Through the above embodiments, the IoT system determines the installation location of the gateway based on the effective data transmission range of the LoRa node device, so that the LoRa gateway device can cover more LoRa nodes more accurately, reducing the overall operating cost of the system and improving the efficiency of the network.
[0017] In some embodiments, the step of determining the second installation location of the LoRa gateway device based on the historical signal strength specifically includes:
[0018] Filter out target LoRa node devices whose historical signal strength is lower than a preset strength threshold;
[0019] A second installation location of the LoRa gateway device is separately constructed for the target LoRa node device, and the second installation location is different from the first installation location.
[0020] Through the above embodiments, the IoT system determines the second installation location of the LoRa gateway device based on the historical signal strength, which can significantly improve the system's adaptability to environmental changes. By screening out nodes with weak signals and reconfiguring the gateway location for them, it can ensure that high communication quality can be maintained even under adverse conditions. This strategy of dynamically adjusting the gateway location allows the system to self-optimize, further enhancing the stability and reliability of the network.
[0021] In some embodiments, after the step of determining the first installation location of the LoRa gateway device according to the building location information in the target area map, the method further includes:
[0022] Obtaining a priority level of each local area set by a user, where the target area is composed of multiple local areas;
[0023] The data transmission frequency of the LoRa node device in each local area is adjusted according to the priority level, and the data transmission frequency is positively correlated with the priority level.
[0024] Through the above embodiment, after determining the first installation position of the gateway, the Internet of Things system obtains the priority set by the user in each local area and adjusts the data transmission frequency accordingly. This can make the system more intelligent and user-friendly. Adjusting the communication frequency according to the usage priority of different areas not only ensures the data transmission requirements of key areas, but also optimizes the allocation of network resources, thereby improving the overall efficiency of the system and user satisfaction.
[0025] In some embodiments, after the step of obtaining the location information of the LoRa node device in the target area map, the method further includes:
[0026] Monitor the electromagnetic interference intensity of each local area at different time periods;
[0027] Determine a window period based on the electromagnetic interference intensity, wherein the electromagnetic interference intensity during the window period is lower than a preset interference threshold;
[0028] Control the LoRa gateway device to transmit communication data during the window period first.
[0029] Through the above embodiments, the Internet of Things system monitors electromagnetic interference and determines the best time for transmission after obtaining node location information. By adopting the above technical solution, the impact of electromagnetic interference on communication quality can be effectively avoided. By real-time monitoring of interference intensity and selecting a period with low interference for data transmission, the success rate and quality of data transmission are improved, communication errors and retransmissions are reduced, thereby improving the efficiency and reliability of the system.
[0030] In some embodiments, after the step of determining the second installation location of the LoRa gateway device based on the historical signal strength, the method further includes:
[0031] Receiving a standby LoRa gateway device set by a user for each LoRa node device, the standby LoRa gateway device being installed at the first installation position or the second installation position;
[0032] When the signal strength of the current LoRa node device is detected to be weak, the signal strength received by the backup LoRa gateway device is automatically tested;
[0033] Use the backup LoRa gateway device with the strongest signal strength for communication data transmission.
[0034] Through the above embodiments, the IoT system can further enhance the redundancy and robustness of the system. When the signal is poor, it automatically tests and switches to the gateway with the strongest signal, which not only ensures the continuity of data transmission, but also reduces data delays and losses caused by signal problems, significantly improving user experience and system reliability.
[0035] In some embodiments, after the step of determining the first installation location of the LoRa gateway device according to the building location information in the target area map, the method further includes:
[0036] The LoRa gateway device at the first installation location is preferentially used to receive and transmit communication data.
[0037] Through the above embodiments, the IoT system can maximize the use of the initially set efficient gateway resources. Giving priority to the gateway at the first installation location not only ensures the communication needs of the high priority area, but also utilizes the optimal location determined by the preliminary analysis, thereby improving the overall efficiency and performance of the system.
[0038] In a second aspect, the present application provides an Internet of Things system based on LoRa communication, the Internet of Things system comprising: one or more processors and a memory;
[0039] The memory is coupled to the one or more processors, and the memory is used to store computer program code, which includes computer instructions. The one or more processors call the computer instructions so that the Internet of Things system can implement an Internet of Things system communication method based on LoRa communication provided in the above embodiment, which will not be repeated here.
[0040] In a third aspect, the present application provides a computer-readable storage medium, including instructions. When the instructions are executed on an Internet of Things system, the Internet of Things system can implement an Internet of Things system communication method based on LoRa communication provided in the above embodiment, which will not be repeated here.
[0041] In a fourth aspect, the present application provides a computer program product. When the computer program product runs on an Internet of Things system, the Internet of Things system can implement an Internet of Things system communication method based on LoRa communication provided in the above embodiment, which will not be repeated here.
[0042] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0043] 1. The IoT system can dynamically adjust the installation location of the LoRa gateway device based on historical signal strength data, and automatically switch to a gateway with a stronger signal to receive and send data when the signal is weak. This adaptive adjustment mechanism greatly enhances the stability and reliability of the network in the face of environmental changes (such as different weather conditions).
[0044] 2. The IoT system can adjust the frequency of data transmission and optimize resource allocation according to the priority set by users in each area. This not only improves the service quality in key areas, but also makes rational use of network resources, reduces resource waste, and makes the entire communication network more efficient and responsive.
[0045] 3. The IoT system effectively avoids the negative impact of interference on communication quality by monitoring electromagnetic interference and selecting relatively low-interference time periods for data transmission. This strategy of real-time interference perception and optimizing transmission timing based on environmental conditions not only improves the success rate of data transmission, but also significantly reduces communication errors and retransmissions caused by interference. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flow chart of a communication method of an Internet of Things system based on LoRa communication in an embodiment of the present application;
[0047] Figure 2 This is another flow chart of a communication method of an Internet of Things system based on LoRa communication in an embodiment of the present application;
[0048] Figure 3 It is a schematic diagram of the structure of a physical device of the Internet of Things system in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more listed items.
[0050] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0051] For ease of understanding, the application scenarios of the relevant technical embodiments are introduced below.
[0052] In the development of smart cities, Internet of Things (IoT) systems play a central role, especially in the application of long-distance communication technologies such as LoRa (Long Range). Smart cities involve a wide range of monitoring and data collection, such as traffic flow monitoring, environmental quality monitoring, public safety, etc. These applications require efficient data transmission and stable network performance, especially in urban environments with wide coverage, dense buildings and complex terrain. However, conventional IoT systems use static gateway deployment, which is rarely adjusted once determined. This approach is often difficult to adapt to dynamic environmental factors (such as signal attenuation caused by weather changes), resulting in unstable data transmission and failure to meet the efficient operation requirements of smart cities.
[0053] For example, in a large city, due to the wide distribution and complexity of water supply pipelines, in order to collect water quality test data in the pipeline in a timely manner, LoRa sensors can be installed at various key pipeline nodes to monitor water quality parameters in real time, such as pH value, turbidity, etc., and transmit the data back to the central monitoring system through LoRa node devices and LoRa gateway devices. However, in severe weather such as the rainy season, due to the attenuation of rain on the signal, the originally set gateway position cannot effectively cover the LoRa node devices in the entire area, resulting in a break in data collection and the inability to obtain the latest water quality data in real time.
[0054] Taking the traffic monitoring system of a smart city as an example, assuming that a communication method of an Internet of Things system based on LoRa communication provided by this application is adopted, the Internet of Things system records the historical signal strength of each LoRa node according to different weather conditions, and automatically adjusts the position of the gateway device to optimize signal reception. For example, on a rainy day, the system detects that the signal strength of nodes in certain areas has dropped, and automatically switches to the gateway installed in the preset second installation position for data reception and transmission. This position has been determined to be able to receive stronger signals under the same or similar weather conditions before. This dynamic adjustment can significantly improve the stability of the network and the integrity of the data, ensure the accuracy of traffic flow data, and help city managers make more effective traffic scheduling and management decisions.
[0055] For ease of understanding, the following describes the process of the method provided by this implementation in combination with the above scenario. Figure 1 , which is a flow chart of a communication method of an Internet of Things system based on LoRa communication in an embodiment of the present application.
[0056] S101. Obtain location information of a LoRa node device in a target area map.
[0057] LoRa node devices refer to devices equipped with LoRa radio modules, which are usually responsible for collecting data and sending the data through the LoRa network. The data collected by LoRa node devices mainly comes from various data acquisition devices, such as sensors. The LoRa node device processes the collected data through a microcontroller unit (MCU) or a single-board computer (such as Raspberry Pi) and sends it to the LoRa gateway device in the form of radio waves.
[0058] To obtain the location information of each LoRa node device, the LoRa node device can be recorded when it is installed, or a positioning system such as GPS can be installed on the LoRa node device, so that the IoT system can monitor the location information of each LoRa node device in real time on the map. Taking the environmental monitoring of smart cities as an example, the IoT system first deploys a large number of LoRa node devices in the target area (such as an industrial park). Each node device is integrated with an air quality sensor that can detect key indicators such as PM2.5 and CO2 in real time. The system obtains the latitude and longitude coordinates of each node through the built-in GPS module, and then maps it to the electronic map of the park. In this way, the system accurately grasps the spatial location distribution of each environmental monitoring node, laying the foundation for subsequent gateway planning.
[0059] It should be noted that the LoRa node device is generally installed near the test point to directly receive the data information collected by the sensor. The location of the LoRa node device generally changes with the location of the test point, which is not limited here.
[0060] In addition, the target area can be a city or a park. The specific settings can be adjusted according to the actual application situation and are not limited here.
[0061] S102: Determine a first installation location of the LoRa gateway device according to building location information in a target area map.
[0062] Since buildings block and diffract radio waves, they significantly affect the communication distance and signal quality of LoRa. Therefore, after obtaining the location information of the LoRa node device, the IoT system needs to further determine the initial installation location (i.e., the first installation location) of the LoRa gateway based on the distribution of buildings in the target area. Specifically, the system obtains parameters such as the height, material, and spacing of the main buildings in the target area, and determines the optimal installation location and height of each gateway in combination with the coverage of the effective data reception of the LoRa gateway device to achieve maximum coverage of nodes in the area.
[0063] It should be noted that the Internet of Things system can determine the installable range of the LoRa gateway device in the target area map based on the material properties and location information of the building, as well as the location information of each LoRa node device. Then, the technicians can set specific coordinate information within the installable range as the first installation location.
[0064] It should also be noted that the first installation location of the LoRa gateway device can also be set by a technician directly on the target area map, which is not limited here.
[0065] S103. Record the historical signal strength of each LoRa node device under different weather conditions.
[0066] Since environmental factors such as rain, snow, fog and haze will introduce additional signal attenuation, after determining the initial location of the gateway, the IoT system must continue to monitor the signal quality of each LoRa node device, especially the changes under different weather conditions, and record the impact of different weather conditions on node communication quality.
[0067] Specifically, the IoT system collects key indicators such as RSSI (signal strength indicator) and SNR (signal-to-noise ratio) reported by each node in real time, and continuously records the trend of changes over a period of time. At the same time, the system also obtains meteorological information (such as rainfall, visibility, etc.) in the target area to determine the correlation between node signal strength and weather conditions, that is, based on the historical signal strength of each LoRa node device, it identifies the area or single LoRa node device that is most affected by the weather.
[0068] Taking greenhouse monitoring of smart agriculture as an example, the IoT system deploys several LoRa nodes in each greenhouse to collect environmental parameters such as temperature, humidity, and light. At the same time, a LoRa gateway is installed outside the greenhouse to collect data and return it. The system continuously records the changes in signal strength of each node and correlates it with the weather data of the local meteorological station. The results show that the signal strength of some nodes will drop significantly in rainy and foggy weather, affecting the reliability of data transmission.
[0069] S104: Determine a second installation location of the LoRa gateway device based on the historical signal strength.
[0070] After accumulating a certain amount of historical data on node signal strength and weather conditions, the IoT system can further optimize the deployment plan of the LoRa gateway. Specifically, the system detects areas where the signal attenuation is severe under specific weather conditions (such as rainy days) and extracts the spatial distribution characteristics of these weak areas on the target area map. On this basis, the system plans a batch of alternative second installation locations. These locations can ensure that under the target weather conditions, the node signal strength in the corresponding area can still be maintained above the threshold of reliable transmission. In other words, the LoRa gateway in the second installation position can take over the data transmission task in the weak area in bad weather to ensure the communication quality of the entire network.
[0071] Taking the geological disaster monitoring in mountainous environments as an example, the IoT system deploys a large number of LoRa node devices at different locations on the mountain to monitor geological parameters such as mountain deformation and soil moisture content in real time. Due to the complex terrain of the mountainous area, coupled with frequent rainfall and foggy weather, the stability of the LoRa network faces a huge test. By analyzing the historical signal strength of each node under different weather conditions, the system detected that the signal attenuation of nodes in some low-lying areas was very serious on rainy days, and it was difficult to report early warning data in a timely manner. Therefore, the system planned several alternative second installation locations at the commanding heights of these areas. Once extreme weather such as heavy rain is detected in the area, the backup gateway at the corresponding location will automatically turn on and take over the data transmission task. Through this dynamic switching mechanism of the main and backup gateways, the IoT system can maintain highly reliable monitoring and early warning capabilities under harsh natural conditions, providing strong data support for the prevention and control of geological disasters.
[0072] It should be noted that after the Internet of Things system identifies an area where signal attenuation is severe under specific weather conditions, relevant technical personnel can carry a signal strength detector to conduct an on-site survey of the area to determine a second installation location where the signal strength exceeds the threshold for reliable transmission. Of course, the second installation location can also be set by relevant technical personnel directly on the electronic map corresponding to the area based on experience, and this is not limited here.
[0073] S105 . When it is detected that the strength signal of the LoRa node device is weak, the LoRa gateway device at the second installation position is automatically switched to receive and send communication data.
[0074] Based on the previously determined backup gateway locations, the IoT system can achieve adaptive network optimization based on environmental conditions. When the system detects that the signal strength of the LoRa nodes in certain areas is lower than the preset threshold (usually corresponding to severe weather), it will automatically wake up the backup LoRa gateways at the second installation location in the corresponding area. These gateways will take over the data transmission tasks of all nodes in the area to ensure the stability of the communication link. At the same time, the original gateways at the first installation location will suspend work to avoid signal conflicts and interference. After the extreme weather subsides and the node signal returns to normal, the system will switch back to the initial gateway to continue data transmission. This seamless switching dynamic adjustment mechanism enables the LoRa network to optimize autonomously according to external conditions, thereby minimizing the impact of harsh environments on transmission reliability.
[0075] In the above embodiment, the Internet of Things system can effectively solve the communication interruption problem caused by signal strength fluctuations by obtaining the location of the LoRa node device, determining the first and second installation locations, recording the signal strength, and automatically switching the gateway device. First, the optimal initial location of the gateway is determined by obtaining the node location and considering the building layout, which ensures basic coverage. Then, by recording the signal strength under different weather conditions and adjusting the gateway position accordingly, the stability of the system in a changing environment is improved. Finally, by automatically switching to a gateway with a stronger signal, the continuity and reliability of data transmission are ensured.
[0076] After combining the above scenarios, the following is a more detailed description of the process of the method provided by this implementation. Figure 2 , is another flow chart of a communication method of an Internet of Things system based on LoRa communication in an embodiment of the present application.
[0077] S201. Determine a window period based on the electromagnetic interference intensity of each local area in different time periods.
[0078] When deploying LoRa networks in IoT systems, especially in urban areas, the impact of electromagnetic interference on communication quality needs to be considered. Different areas may face electromagnetic interference from various electronic devices at different times, such as radio stations, radars, power equipment, etc. The radiation from these interference sources can seriously affect the data transmission between LoRa nodes and gateways, resulting in increased packet loss rates and even communication interruptions.
[0079] To this end, technicians have deployed electromagnetic sensors in the target area to collect electromagnetic environment data in each local area in real time. Electromagnetic sensors determine the type and degree of interference based on parameters such as the frequency and intensity of electromagnetic waves. After preprocessing and filtering, these data are uploaded to the Internet of Things system. The Internet of Things system then determines the time distribution pattern of the electromagnetic interference intensity based on the data uploaded by the electromagnetic sensor, and then determines the window period. For example, it is detected that the interference level in certain areas is significantly reduced during specific time periods (such as early morning). The system defines these periods with weaker interference as "window periods", that is, the time windows most suitable for data transmission.
[0080] S202, controlling the LoRa gateway device to preferentially transmit communication data during the window period.
[0081] After determining the window period of electromagnetic interference in each local area, the IoT system schedules the data transmission tasks of the LoRa gateway to maximize the use of these high-quality time windows. Specifically, the IoT system tracks the electromagnetic interference status of each area in real time. When the window period is detected, it will immediately wake up the LoRa gateway in the corresponding area and take out the highest priority data transmission task from the task queue and hand it over to the gateway for execution.
[0082] In the above embodiment, the IoT system monitors electromagnetic interference and determines the best time for transmission after obtaining node location information. By adopting the above technical solution, the impact of electromagnetic interference on communication quality can be effectively avoided. By monitoring the interference intensity in real time and selecting a period with low interference for data transmission, the success rate and quality of data transmission are improved, communication errors and retransmissions are reduced, thereby improving the efficiency and reliability of the system.
[0083] S203: Determine the effective data transmission range of the LoRa node device based on the building location information in the target area map.
[0084] Since the location of the test point is determined, the location of the LoRa node device installed at the test point is also determined. The LoRa node device and the LoRa gateway device transmit data via radio waves. Therefore, the LoRa gateway device needs to be installed within the effective data transmission range of the LoRa node device. The distribution of buildings in the target area will affect the propagation of radio waves. Factors such as the density, height, and material of the building directly determine the effective communication distance and coverage quality of the LoRa node. Therefore, the system must first accurately evaluate the data transmission capability of each LoRa node (LoRa node device) based on the building information, that is, determine the effective data transmission range of the LoRa node device.
[0085] Specifically, the IoT system obtains a vector map of the target area from the GIS platform, which contains the two-dimensional outline, height and other attribute information of the building. At the same time, the system can also obtain the electromagnetic parameters of the main building materials (such as reinforced concrete, masonry, glass curtain walls, etc.), such as dielectric constant and conductivity, through field surveys uploaded by technicians or directly retrieving stored data from the database. Then, the system substitutes these parameters into the radio propagation model to deduce the attenuation and scattering of the LoRa signal of each node device by the building. Among them, commonly used radio propagation models include but are not limited to Okumura-Hata, COST-231, etc., which can accurately describe the path loss in different terrain environments such as urban and suburban areas, and the effective data transmission range of the LoRa node device is not limited here.
[0086] S204: Determine a first installation location of each LoRa gateway device based on a data transmission range.
[0087] Based on the effective data transmission range corresponding to each LoRa node device and the effective data receiving range of the LoRa gateway device, the first installation position of the LoRa gateway device is determined so that the number of LoRa node devices covered by the LoRa gateway device at the first installation position is the largest.
[0088] Of course, the process can be set up directly by relevant technicians on the electronic map of the target area of the IoT system, or the LoRa network planning can be transformed into a maximum coverage problem based on the multi-objective optimization algorithm of graph theory. The target area is divided into several grid units, and the size of each unit is smaller than the minimum coverage radius of the node. Then, the system abstracts each LoRa node as a vertex in the graph, and the effective transmission range of the node corresponds to a circular subgraph with the vertex as the center. Next, the system selects several from all grid units as candidate gateway locations, and each candidate location corresponds to a binary decision variable. If a location is selected, the corresponding variable takes the value of 1, which means that the gateway is installed here. The optimization goal is to maximize the total number of all node vertices covered while satisfying the constraints of the number of gateways and deployment costs.
[0089] In addition, the first installation position of each LoRa gateway device can be determined by other algorithms according to actual needs, which is not limited here.
[0090] In the above embodiment, the IoT system determines the installation location of the gateway based on the effective data transmission range of the LoRa node device, so that the LoRa gateway device can cover more LoRa nodes more accurately, reducing the overall operating cost of the system and improving the efficiency of the network.
[0091] S205. Filter out target LoRa node devices whose historical signal strength is lower than a preset strength threshold.
[0092] During the data communication between the LoRa node device and the LoRa gateway device, the signal strength of each LoRa node device under different weather conditions is recorded. After a preset time period, the target LoRa node devices whose historical signal strength under different weather conditions is lower than a preset strength threshold are selected.
[0093] S206: construct a second installation location of the LoRa gateway device separately for the target LoRa node device.
[0094] This step has been introduced in step S104 and will not be repeated here.
[0095] In the above embodiment, the IoT system determines the second installation location of the LoRa gateway device based on the historical signal strength, which can significantly improve the system's adaptability to environmental changes. By screening out nodes with weak signals and reconfiguring the gateway location for them, it can ensure that high communication quality can be maintained even under adverse conditions. This strategy of dynamically adjusting the gateway location allows the system to self-optimize, further enhancing the stability and reliability of the network.
[0096] S207: Receive the backup LoRa gateway device set by the user for each LoRa node device.
[0097] After determining the LoRa gateway devices at the first installation position and the second installation position, the user can set a backup LoRa gateway device for each LoRa node device. The backup LoRa gateway device is selected from the existing LoRa gateway devices. For example, in one embodiment, the LoRa gateway device A installed at the first installation position corresponds to multiple LoRa node devices, namely a1, a2 and a3. The LoRa gateway device B installed at the first installation position also corresponds to multiple LoRa node devices, namely b1 and b2, and the LoRa gateway device B is within the effective data transmission range of the LoRa node device a2, which allows the user to set the LoRa gateway device B as the backup LoRa gateway device for the LoRa node device a2.
[0098] It should be noted that the same LoRa node device can be equipped with multiple backup LoRa gateway devices, which is not limited here.
[0099] S208. When it is detected that the signal strength of the current LoRa node device is weak, automatically test the signal strength received by the standby LoRa gateway device.
[0100] When the IoT system detects that the signal strength of a LoRa node device is lower than the threshold (such as -120dBm) for multiple consecutive times, it sends a control instruction to the node device to control the node device to immediately start the backup link test. After receiving the instruction, the node device will send a test data packet to all backup gateways in turn, which contains metadata such as node ID and timestamp. After receiving the data packet, the backup gateway will evaluate its signal strength and signal-to-noise ratio and upload the results to the IoT system.
[0101] S209, using the backup LoRa gateway device with the strongest signal strength to perform communication data transmission.
[0102] The IoT system uses the data received in step S208 to comprehensively evaluate key parameters such as real-time signal quality, load capacity, energy efficiency, and service priority of all candidate gateways, and determines the LoRa gateway device with the strongest signal strength for communication data transmission.
[0103] In the above embodiments, the IoT system can further enhance the redundancy and robustness of the system. When the signal is poor, it automatically tests and switches to the gateway with the strongest signal, which not only ensures the continuity of data transmission, but also reduces data delays and losses caused by signal problems, significantly improving user experience and system reliability.
[0104] S210, preferentially using the LoRa gateway device at the first installation location to receive and transmit communication data.
[0105] In the actual data communication process, the IoT system preferentially uses the LoRa gateway device installed at the first installation position for data transmission, that is, receives the communication data sent by the LoRa node device, and sends the received communication data to the server side of the IoT system. When it is detected that the signal strength of a certain LoRa node device is weak, the LoRa gateway device installed at the second installation position is switched to receive and transmit communication data. If the LoRa gateway device corresponding to the LoRa node device does not exist at the second installation position, the corresponding standby LoRa gateway device is switched to receive and transmit communication data.
[0106] In the above embodiment, the IoT system can maximize the use of the initially set efficient gateway resources. Giving priority to the gateway at the first installation location not only ensures the communication needs of the high priority area, but also utilizes the optimal location determined by the preliminary analysis, thereby improving the overall efficiency and performance of the system.
[0107] S211. Adjust the data transmission frequency of the LoRa node device in each local area according to the priority level of each local area set by the user.
[0108] The user can divide the target area into multiple local areas on the electronic map and set the priority of each local area. The IoT system adjusts the data transmission frequency of the LoRa node device in the corresponding local area according to the priority set by the user. The higher the priority, the higher the transmission frequency. There is no limitation here.
[0109] In the above embodiment, after determining the first installation position of the gateway, the IoT system obtains the priority set by the user in each local area and adjusts the data transmission frequency accordingly. This can make the system more intelligent and user-friendly. By adjusting the communication frequency according to the usage priority of different areas, the data transmission requirements of key areas are guaranteed, the allocation of network resources is optimized, and the overall efficiency of the system and user satisfaction are improved.
[0110] The Internet of Things system of the embodiment of the present invention is composed of multiple electronic devices. Figure 3 A schematic diagram of the architecture of an electronic device suitable for implementing an embodiment of the present invention is shown.
[0111] It should be noted that Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0112] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructions (computer programs), or by controlling related hardware through instructions (computer programs), and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. The electronic device of this embodiment includes a storage medium and a processor, wherein a plurality of instructions are stored in the storage medium, and the instructions can be loaded by the processor to execute any step of the method provided in the embodiment of the present invention.
[0113] Specifically, the storage medium and the processor are electrically connected directly or indirectly to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more signal lines. The storage medium stores computer execution instructions for implementing the data access control method, including at least one software function module that can be stored in the storage medium in the form of software or firmware. The processor executes various functional applications and data processing by running the software program and module stored in the storage medium. The storage medium can be, but is not limited to, random access storage medium (Random Access Memory, referred to as: RAM), read-only storage medium (Read Only Memory, referred to as: ROM), programmable read-only storage medium (Programmable Read-Only Memory, referred to as: PROM), erasable read-only storage medium (Erasable Programmable Read-Only Memory, referred to as: EPROM), electrically erasable read-only storage medium (Electric Erasable Programmable Read-Only Memory, referred to as: EEPROM), etc. Among them, the storage medium is used to store programs, and the processor executes the program after receiving the execution instruction.
[0114] Furthermore, the software programs and modules in the above-mentioned storage medium may also include an operating system, which may include various software components and / or drivers for managing system tasks (such as memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components. The processor may be an integrated circuit chip having signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., which may implement or execute the various methods, steps, and logic flow diagrams disclosed in this embodiment. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0115] Since the instructions stored in the storage medium can execute the steps in any method provided in the embodiments of the present invention, the beneficial effects of any method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0116] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A communication method for an Internet of Things system based on LoRa communication, applied to an Internet of Things system based on LoRa communication, characterized in that: The method comprises: Obtaining location information of a LoRa node device in a target area map, wherein the LoRa node device is used to collect sensor data; Determine a first installation location of the LoRa gateway device according to the building location information in the target area map, and the LoRa gateway device at the first installation location is wirelessly connected to one or more LoRa node devices; Record the signal quality of each LoRa node device under different weather conditions and obtain multiple historical signal strengths; Determine a second installation location of the LoRa gateway device based on the historical signal strength, wherein the historical signal strength received by the LoRa gateway device at the second installation location under the target weather conditions is higher than a preset strength threshold; When it is detected that the signal strength of the LoRa node device is lower than a preset threshold, the LoRa gateway device at the second installation location is automatically switched to receive and send communication data.
2. The method according to claim 1, characterized in that The step of determining the first installation location of the LoRa gateway device according to the building location information in the target area map specifically includes: Determine the effective data transmission range of the LoRa node device based on the building location information in the target area map; A first installation position of each LoRa gateway device is determined based on the data transmission range, and the LoRa gateway device covers the largest number of LoRa node devices at the first installation position.
3. The method according to claim 1, characterized in that The step of determining the second installation location of the LoRa gateway device based on the historical signal strength specifically includes: Filter out the target LoRa node device whose historical signal strength is lower than a preset strength threshold; A second installation position of a LoRa gateway device is separately constructed for the target LoRa node device, where the second installation position is different from the first installation position.
4. The method according to claim 1, characterized in that: After the step of determining the first installation location of the LoRa gateway device according to the building location information in the target area map, the method further includes: Obtaining a priority level of each local area set by a user, wherein the target area is composed of a plurality of local areas; The data transmission frequency of the LoRa node device in each local area is adjusted according to the priority level, and the data transmission frequency is positively correlated with the priority level.
5. The method according to claim 1, characterized in that After the step of obtaining the location information of the LoRa node device in the target area map, the method further includes: Monitor the electromagnetic interference intensity of each local area at different time periods; Determine a window period based on the electromagnetic interference intensity, wherein the electromagnetic interference intensity during the window period is lower than a preset interference threshold; The LoRa gateway device is controlled to transmit communication data during the window period.
6. The method according to claim 1, characterized in that After the step of automatically switching the LoRa gateway device at the second installation location to receive and send communication data when the signal strength of the LoRa node device is detected to be lower than a preset threshold, the method further includes: receiving a standby LoRa gateway device set by a user for each LoRa node device, wherein the standby LoRa gateway device is installed at the first installation position or the second installation position; When it is detected that the signal strength of the current LoRa node device is lower than a threshold, automatically testing the signal strength received by the standby LoRa gateway device; Use the LoRa gateway device with the strongest signal strength for communication data transmission.
7. The method according to claim 1, characterized in that After the step of determining the first installation location of the LoRa gateway device according to the building location information in the target area map, the method further includes: The LoRa gateway device at the first installation location is used to receive and transmit communication data.
Citation Information
Patent Citations
LoRa gateway deployment method and device, equipment and storage medium
CN112770326A
LoRa communication method and system
CN115474291A