CN117528599A - LoRa-based wireless communication method and device and electronic equipment - Google Patents
LoRa-based wireless communication method and device and electronic equipment Download PDFInfo
- Publication number
- CN117528599A CN117528599A CN202311792048.6A CN202311792048A CN117528599A CN 117528599 A CN117528599 A CN 117528599A CN 202311792048 A CN202311792048 A CN 202311792048A CN 117528599 A CN117528599 A CN 117528599A
- Authority
- CN
- China
- Prior art keywords
- lora gateway
- lora
- wireless communication
- standby
- occupancy rate
- 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.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 157
- QVFWZNCVPCJQOP-UHFFFAOYSA-N chloralodol Chemical compound CC(O)(C)CC(C)OC(O)C(Cl)(Cl)Cl QVFWZNCVPCJQOP-UHFFFAOYSA-N 0.000 title claims abstract description 71
- 238000000034 method Methods 0.000 title claims abstract description 65
- 230000002159 abnormal effect Effects 0.000 claims abstract description 47
- 238000012545 processing Methods 0.000 claims description 161
- 238000012360 testing method Methods 0.000 claims description 18
- 231100000279 safety data Toxicity 0.000 claims description 13
- 230000008569 process Effects 0.000 abstract description 12
- 230000006870 function Effects 0.000 description 8
- 230000005856 abnormality Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000007613 environmental effect Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000036039 immunity Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000001228 spectrum Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/04—Arrangements for maintaining operational condition
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/02—Arrangements for optimising operational condition
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
A wireless communication method and device based on LoRa and electronic equipment relate to the field of LoRa communication. The method comprises the following steps: acquiring a first running state of a first LoRa gateway; if the first operation state is confirmed to be the abnormal operation state, a standby LoRa gateway is obtained; judging whether the standby LoRa gateway is in an idle state or not; and if the standby LoRa gateway is in an idle state, the plurality of terminal devices are connected in a wireless communication manner through the standby LoRa gateway. According to the technical scheme, the problem that when the total number of the LoRa gateways is unchanged in a skiing field, a single LoRa gateway can simultaneously process wireless communication connection of more terminal equipment, at the moment, a larger load can cause abnormal operation of the LoRa gateway, and the abnormal operation can occur in the process of acquiring data of the terminal equipment with lower efficiency or can not acquire the data of the terminal equipment is solved.
Description
Technical Field
The application relates to the field of LoRa communication, in particular to a wireless communication method and device based on LoRa and electronic equipment.
Background
Long Range wireless communication (LoRa) is a low power wireless communication technology, and is particularly suitable for Long-Range, low-rate internet of things (IoT) applications. The LoRa technique employs a technique called "spread spectrum modulation" that achieves longer communication distances and strong interference immunity by transmitting a narrower bandwidth over a wider frequency band. The LoRa technology has excellent transmission distances, which can reach several kilometers to tens of kilometers, depending on the equipment and environmental conditions.
Currently, the LoRa gateway is mostly used for communication connection of low-power consumption and long-distance terminal equipment, including but not limited to environmental parameter sensors, small unmanned aerial vehicles, monitoring equipment and the like. In a ski resort, a large number of terminals are usually required for a plurality of LoRa gateways to be connected to a plurality of terminals, respectively, due to a large surface area. In the skiing season, along with the increase of skiers in a skiing field, the number of terminal devices is increased along with the increase of skiers in the skiing field, at this moment, when the total number of the LoRa gateways is unchanged in the skiing field, a single LoRa gateway can simultaneously process wireless communication connection of more terminal devices, at this moment, a larger load can cause abnormal operation conditions of the LoRa gateway, and the abnormal operation conditions can cause the problem that the efficiency is lower or the data of the terminal devices cannot be acquired when the data of the terminal devices are acquired.
Therefore, there is a need for a wireless communication method, apparatus and electronic device based on LoRa.
Disclosure of Invention
The application provides a wireless communication method, device and electronic equipment based on LoRa, which solve the problems that in a ski field, when the total number of the LoRa gateways is unchanged, a single LoRa gateway can simultaneously process wireless communication connection of more terminal equipment, and at the moment, a larger load can cause the situation that the LoRa gateway operates abnormally, so that the efficiency of acquiring data of the terminal equipment is lower or the data of the terminal equipment cannot be acquired.
In a first aspect of the present application, a wireless communication method based on LoRa is provided, where the method is applied to a POE switch, and the POE switch connects a first LoRa gateway, a second LoRa gateway, a third LoRa gateway, and a standby LoRa gateway through wireless communication; the first LoRa gateway is connected with a plurality of terminal devices through wireless communication, and the method comprises the following steps: acquiring a first running state of a first LoRa gateway; if the first operation state is confirmed to be the abnormal operation state, a standby LoRa gateway is obtained; judging whether the standby LoRa gateway is in an idle state or not; and if the standby LoRa gateway is in an idle state, the plurality of terminal devices are connected in a wireless communication manner through the standby LoRa gateway.
Through adopting above-mentioned technical scheme, POE switch acquires every loRa gateway's running state in real time, if POE switch detects the loRa gateway of unusual running state, first loRa gateway promptly, through the reserve loRa gateway that acquires idle state, can switch all terminal equipment who carries out wireless communication connection with first loRa gateway to carry out wireless communication connection with idle state's reserve loRa gateway, thereby solve the problem that the efficiency that the situation of unusual operation can appear is lower or can't acquire terminal equipment's data when acquireing terminal equipment data.
Optionally, after determining whether the standby LoRa gateway is in the idle state and if the standby LoRa gateway is in the idle state, performing wireless communication connection on the plurality of terminal devices through the standby LoRa gateway, the method further includes: if the standby LoRa gateway is not in the idle state, acquiring a second running state of the second LoRa gateway and a third running state of a third LoRa gateway; if the second running state and the third running state are not abnormal running states, acquiring a first occupancy rate of the second LoRa gateway and a second occupancy rate of the third LoRa gateway; judging whether the first occupancy rate is smaller than the second occupancy rate; and if the first occupancy rate is smaller than the second occupancy rate, preferentially connecting the plurality of terminal devices in wireless communication through the second LoRa gateway.
By adopting the technical scheme, if no spare LoRa gateway in other idle states exists in the POE switch, the POE switch needs to perform wireless communication connection between the terminal equipment which cannot perform wireless communication connection with the spare LoRa gateway and other LoRa gateways. At this time, the POE switch acquires the LoRa gateway with the lowest occupancy rate, that is, the second LoRa gateway, and performs wireless communication connection between the terminal device that fails to perform wireless communication connection with the standby LoRa gateway and the second LoRa gateway, thereby maximally increasing the utilization rate of all the LoRa gateways, and further balancing the occupancy rate of each LoRa gateway.
Optionally, after the wireless communication connection is preferentially performed on the plurality of terminal devices through the second LoRa gateway if the first occupancy rate is smaller than the second occupancy rate, the method further includes: judging whether the first occupancy rate is larger than a preset occupancy rate or not; if the first occupancy rate is larger than the preset occupancy rate, acquiring a first memory occupancy value of a first terminal device in wireless communication connection with a second LoRa gateway, and acquiring a second memory occupancy value of a second terminal device in wireless communication connection with the second LoRa gateway; the first terminal equipment and the second terminal equipment are any two different terminal equipment from a plurality of terminal equipment which are in wireless communication connection with the second LoRa gateway; acquiring whether the first memory occupation value is smaller than the second memory occupation value; if the first memory occupation value is smaller than the second memory occupation value, the wireless communication connection between the first terminal equipment and the second LoRa gateway is released preferentially.
Through the technical scheme, if the occupancy rate of the second LoRa gateway is full, that is, if the first occupancy rate of the second LoRa gateway is greater than the preset occupancy rate, the POE switch can release the wireless communication connection between part of the terminal devices and the second LoRa gateway, and part of the terminal devices are one or more terminal devices with the minimum memory occupancy value among all devices connected with the second LoRa gateway in a wireless communication manner. And then, the server can carry out wireless communication connection on the terminal equipment which is disconnected with the second LoRa gateway and other LoRa gateways with less than full occupancy rate, so that each LoRa gateway is ensured to be in a better running state, and the probability of abnormality of the LoRa gateway is reduced.
Optionally, the data processing performance of the standby LoRa gateway is smaller than that of the first LoRa gateway, the second LoRa gateway and the third LoRa gateway, and after the plurality of terminal devices are connected in a wireless communication manner through the standby LoRa gateway if the standby LoRa gateway is in an idle state, the method further includes: acquiring a first processing priority corresponding to the third terminal equipment from a priority database; the third terminal equipment is any one of a plurality of terminal equipment; judging whether the first processing priority is greater than a preset priority; if the first processing priority is greater than the preset priority, acquiring a fourth running state of the second LoRa gateway and a fifth running state of the third LoRa gateway; if the fourth running state and the fifth running state are not abnormal running states, acquiring a third occupancy rate of the second LoRa gateway and a fourth occupancy rate of the third LoRa gateway; judging whether the third occupancy rate is smaller than the fourth occupancy rate; if the first occupancy rate is smaller than the second occupancy rate, the third terminal equipment is preferentially connected in a wireless communication mode through the second LoRa gateway.
Through adopting above-mentioned technical scheme, through setting up the processing priority of every terminal equipment, can make among the terminal equipment that POE switch will carry out wireless communication connection with reserve LoRa gateway, the higher terminal equipment of priority switches to and carries out wireless communication with the LoRa gateway that does not appear abnormal operation state and carries out wireless communication with the LoRa gateway that appears abnormal operation state and link, also can carry out wireless communication connection according to by processing priority high to low to make POE switch can obtain the higher terminal equipment of processing priority and send data.
Optionally, before the first processing priority corresponding to the third terminal device is obtained in the priority database, constructing the priority database specifically includes: acquiring first processing data of a third terminal device, wherein the first processing data comprises position data, time data and heart rate data; setting a first processing priority corresponding to the third terminal equipment according to the first processing data; and storing the first corresponding relation among the third terminal equipment, the first processing priority and the first processing priority in a priority database.
By adopting the technical scheme, since the safety of the user is very important to be confirmed in the skiing field, the processing priority is closely related to the safety of the user, and the more the data to be processed by the terminal equipment can reflect the safety of the user, the higher the processing priority of the terminal equipment. The POE exchanger can ensure the safety of the user in the skiing field to a greater extent by preferentially acquiring the data sent by the terminal equipment with higher processing priority.
Optionally, after storing the third terminal device, the first processing priority, and the correspondence between the third terminal device and the first processing priority in the priority database, the method further includes: acquiring second processing data of third terminal equipment at intervals of a first time period; judging whether the second processing data is larger than the safety data or not; if the second processing data is larger than the safety data, changing the first processing priority corresponding to the third terminal equipment into the second processing priority, wherein the second processing priority is larger than the first processing priority; and storing the second corresponding relation among the third terminal equipment, the second processing priority and the second processing priority in a priority database.
By adopting the technical scheme, the processing priority corresponding to the terminal equipment in the priority database can be updated at any time, and the POE switch judges whether the processing data of one terminal equipment is larger than the safety data; if the processing data of the terminal equipment is larger than the safety data, the situation that the user has potential safety hazards in a skiing field is indicated, and at the moment, the POE switch improves the processing priority corresponding to the terminal equipment, so that the data generated by the terminal equipment with the potential safety hazards are processed preferentially.
Optionally, if the first operation state is confirmed to be an abnormal operation state, the method specifically includes: transmitting a plurality of test data to a plurality of terminal devices through a first LoRa gateway every first time period; acquiring a plurality of test data from sending to a plurality of second time periods returned to the first LoRa gateway; one test data corresponds to one second time period; obtaining tie times of a plurality of second time periods; and if the average time is greater than the preset average time, confirming that the first running state is an abnormal running state.
Through the technical scheme, the POE exchanger can monitor the running states of the plurality of LoRa gateways in real time by setting the interval first preset time, and can judge whether the plurality of LoRa gateways have the LoRa gateway in the abnormal running state or not through test data, so that terminal equipment in wireless communication connection with the LoRa gateway in the abnormal running state can be timely switched to other LoRa gateways.
In a second aspect of the present application, a wireless communication device based on LoRa is provided, the device is a POE switch, the POE switch is connected to a first LoRa gateway, a second LoRa gateway, a third LoRa gateway and a standby LoRa gateway through wireless communication, the first LoRa gateway is connected to a plurality of terminal devices through wireless communication, the device includes an acquisition module and a processing module, wherein,
the acquisition module is used for acquiring a first running state of the first LoRa gateway; and if the first operation state is confirmed to be the abnormal operation state, acquiring the standby LoRa gateway.
The processing module is used for judging whether the standby LoRa gateway is in an idle state or not; and if the standby LoRa gateway is in an idle state, the plurality of terminal devices are connected in a wireless communication manner through the standby LoRa gateway.
Optionally, the processing module is configured to, after determining whether the standby LoRa gateway is in an idle state and if the standby LoRa gateway is in the idle state, perform wireless communication connection on the plurality of terminal devices through the standby LoRa gateway, and if the standby LoRa gateway is not in the idle state, obtain a second running state of the second LoRa gateway and a third running state of the third LoRa gateway; if the second running state and the third running state are not abnormal running states, acquiring a first occupancy rate of the second LoRa gateway and a second occupancy rate of the third LoRa gateway; judging whether the first occupancy rate is smaller than the second occupancy rate; and if the first occupancy rate is smaller than the second occupancy rate, preferentially connecting the plurality of terminal devices in wireless communication through the second LoRa gateway.
Optionally, the processing module is configured to determine whether the first occupancy rate is greater than a preset occupancy rate after the first occupancy rate is less than the second occupancy rate and the plurality of terminal devices are preferentially connected through wireless communication by the second LoRa gateway; if the first occupancy rate is larger than the preset occupancy rate, acquiring a first memory occupancy value of a first terminal device in wireless communication connection with a second LoRa gateway, and acquiring a second memory occupancy value of a second terminal device in wireless communication connection with the second LoRa gateway; the first terminal equipment and the second terminal equipment are any two different terminal equipment from a plurality of terminal equipment which are in wireless communication connection with the second LoRa gateway; acquiring whether the first memory occupation value is smaller than the second memory occupation value; if the first memory occupation value is smaller than the second memory occupation value, the wireless communication connection between the first terminal equipment and the second LoRa gateway is released preferentially.
Optionally, the data processing performance of the standby LoRa gateway is smaller than that of the first LoRa gateway, the second LoRa gateway and the third LoRa gateway, and the processing module is configured to obtain, after the plurality of terminal devices are connected in a wireless communication manner through the standby LoRa gateway if the standby LoRa gateway is in an idle state, a first processing priority corresponding to the third terminal device in the priority database; the third terminal equipment is any one of a plurality of terminal equipment; judging whether the first processing priority is greater than a preset priority; if the first processing priority is greater than the preset priority, acquiring a fourth running state of the second LoRa gateway and a fifth running state of the third LoRa gateway; if the fourth running state and the fifth running state are not abnormal running states, acquiring a third occupancy rate of the second LoRa gateway and a fourth occupancy rate of the third LoRa gateway; judging whether the third occupancy rate is smaller than the fourth occupancy rate; if the first occupancy rate is smaller than the second occupancy rate, the third terminal equipment is preferentially connected in a wireless communication mode through the second LoRa gateway.
Optionally, the processing module is configured to construct a priority database before acquiring a first processing priority corresponding to the third terminal device in the priority database, and specifically includes: acquiring first processing data of a third terminal device, wherein the first processing data comprises position data, time data and heart rate data; setting a first processing priority corresponding to the third terminal equipment according to the first processing data; and storing the first corresponding relation among the third terminal equipment, the first processing priority and the first processing priority in a priority database.
Optionally, the processing module is configured to obtain the second processing data of the third terminal device at intervals of a first period after the third terminal device, the first processing priority, and the correspondence between the third terminal device and the first processing priority are stored in the priority database; judging whether the second processing data is larger than the safety data or not; if the second processing data is larger than the safety data, changing the first processing priority corresponding to the third terminal equipment into the second processing priority, wherein the second processing priority is larger than the first processing priority; and storing the second corresponding relation among the third terminal equipment, the second processing priority and the second processing priority in a priority database.
Optionally, the obtaining module is configured to, if the first operation state is determined to be an abnormal operation state, specifically include: transmitting a plurality of test data to a plurality of terminal devices through a first LoRa gateway every first time period; acquiring a plurality of test data from sending to a plurality of second time periods returned to the first LoRa gateway; one test data corresponds to one second time period; obtaining tie times of a plurality of second time periods; and if the average time is greater than the preset average time, confirming that the first running state is an abnormal running state.
In a third aspect the present application provides an electronic device comprising a processor, a memory for storing instructions, a user interface and a network interface for communicating with other devices, the processor for executing instructions stored in the memory to cause the electronic device to perform a method as any one of the above.
In a fourth aspect of the present application there is provided a computer readable storage medium storing a computer program for execution by a processor of a method as any one of the above.
One or more technical solutions provided in the embodiments of the present application at least have the following technical effects or advantages:
1. The POE switch acquires the running state of each LoRa gateway in real time, if the POE switch detects the LoRa gateway in the abnormal running state, namely the first LoRa gateway, all terminal equipment in wireless communication connection with the first LoRa gateway can be switched to be in wireless communication connection with the standby LoRa gateway in the idle state by acquiring the standby LoRa gateway in the idle state, and therefore the problem that the efficiency of acquiring data of the terminal equipment is low or the data of the terminal equipment cannot be acquired when the abnormal running state is acquired is solved.
2. If there is no other standby LoRa gateway in idle state in the POE switch, the POE switch needs to perform wireless communication connection between the terminal device which fails to perform wireless communication connection with the standby LoRa gateway and the other LoRa gateway. At this time, the POE switch acquires the LoRa gateway with the lowest occupancy rate, that is, the second LoRa gateway, and performs wireless communication connection between the terminal device that fails to perform wireless communication connection with the standby LoRa gateway and the second LoRa gateway, thereby maximally increasing the utilization rate of all the LoRa gateways, and further balancing the occupancy rate of each LoRa gateway.
3. If the occupancy rate of the second LoRa gateway is full, that is, if the first occupancy rate of the second LoRa gateway is greater than the preset occupancy rate, the POE switch can release the wireless communication connection between a part of terminal devices and the second LoRa gateway, and the part of terminal devices are one or more terminal devices with the smallest memory occupancy value among all devices connected with the second LoRa gateway in a wireless communication manner. And then, the server can carry out wireless communication connection on the terminal equipment which is disconnected with the second LoRa gateway and other LoRa gateways with less than full occupancy rate, so that each LoRa gateway is ensured to be in a better running state, and the probability of abnormality of the LoRa gateway is reduced.
Drawings
Fig. 1 is a schematic diagram of an application scenario based on LoRa provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of a wireless communication method based on LoRa according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a wireless communication device based on LoRa according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Reference numerals illustrate: 100. a POE switch; 101. a first LoRa gateway; 102. a second LoRa gateway; 103. a third LoRa gateway; 104. a standby LoRa gateway; 105. a terminal device; 31. an acquisition module; 32. a processing module; 401. a processor; 402. a communication bus; 403. a user interface; 404. a network interface; 405. a memory.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present application, but not all embodiments.
The terminology used in the following embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of this application, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates to the contrary. It should also be understood that the term "and/or" as used in this application refers to and encompasses any or all possible combinations of one or more of the listed items.
The terms "first," "second," and the like, are used below for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
In order to make the technical scheme of the present invention better understood by those skilled in the art, the present invention will be further described in detail with reference to the accompanying drawings.
Long Range wireless communication (LoRa) is a low power wireless communication technology, and is particularly suitable for Long-Range, low-rate internet of things (IoT) applications. The LoRa technique employs a technique called "spread spectrum modulation" that achieves longer communication distances and strong interference immunity by transmitting a narrower bandwidth over a wider frequency band. The LoRa technology has excellent transmission distances, which can reach several kilometers to tens of kilometers, depending on the equipment and environmental conditions.
Currently, the LoRa gateway is mostly used for communication connection of low-power consumption and long-distance terminal equipment, including but not limited to environmental parameter sensors, small unmanned aerial vehicles, monitoring equipment and the like. In a ski resort, a large number of terminals are usually required for a plurality of LoRa gateways to be connected to a plurality of terminals, respectively, due to a large surface area. In the skiing season, along with the increase of skiers (hereinafter referred to as users) in a skiing field, the number of terminal devices is also increased, at this time, in the skiing field, when the total number of the LoRa gateways is unchanged, a single LoRa gateway can simultaneously process wireless communication connection of more terminal devices, at this time, a larger load can cause abnormal operation conditions of the LoRa gateway, and the abnormal operation conditions can cause the problem that the efficiency is lower or the data of the terminal devices cannot be acquired when the data of the terminal devices are acquired.
Therefore, there is a need for a wireless communication method, apparatus and electronic device based on LoRa.
Referring to fig. 1, a schematic diagram of an application scenario based on the LoRa according to an embodiment of the present invention is shown, the method is applied to a POE switch 100, the POE switch 100 is connected to a first LoRa gateway 101, a second LoRa gateway 102, a third LoRa gateway 103 and a standby LoRa gateway 104 through wireless communication, and the first LoRa gateway 101 is connected to a plurality of terminal devices 105 through wireless communication.
Referring to fig. 2, a flow chart of a wireless communication method based on LoRa according to an embodiment of the present invention is shown, and the method is applied to a POE switch 100, and the flow chart mainly includes the following steps: s201 to S204.
Step S201, a first operation state of the first LoRa gateway 101 is acquired.
Specifically, since the area of the skiing field is larger, the skiing field may be divided into a plurality of areas, and the POE switch 100 corresponding to the area and a plurality of LoRa gateways for performing wireless communication connection with the terminal device 105 in the area are set in each area, where the POE switch 100 in each area is used to control the plurality of LoRa gateways in the area, and obtain the running state of each LoRa gateway in real time, where the running state also includes the first running state of the first LoRa gateway 101. The number of the LoRa gateways set in each area is not limited in this embodiment, and in a ski resort, the number of the LoRa gateways in each area needs to be set according to the actual situation of the ski resort, where factors to be considered include the area of the ski resort, the geographical environments of different areas, the user densities of different areas, the communication ranges of the LoRa gateways, and the like. This embodiment is described in terms of POE switch 100 and multiple LoRa gateways in one zone and in that zone in the following steps.
In step S202, if the first operation state is confirmed to be the abnormal operation state, the standby LoRa gateway 104 is obtained.
Specifically, the POE switch 100 in one area can be connected to a plurality of standby LoRa gateways 104 in addition to being capable of wireless communication with the plurality of LoRa gateways, and the plurality of LoRa gateways includes, but is not limited to, a first LoRa gateway 101, a second LoRa gateway 102, and a third LoRa gateway 103, and the first LoRa gateway 101, the second LoRa gateway 102, and the third LoRa gateway 103 refer to all LoRa gateways connected to the POE switch 100 in wireless communication with the exception of the standby LoRa gateway 104. The POE switch 100 acquires the running state of each LoRa gateway in the area in real time, and when there is an abnormal LoRa gateway in the area, the POE switch 100 acquires a plurality of standby LoRa gateways 104, for example, when the POE switch 100 detects that the first LoRa gateway 101 is abnormal, the POE switch 100 acquires a plurality of standby LoRa gateways 104.
In one possible implementation, step S202 further includes: transmitting a plurality of test data to the plurality of terminal devices 105 through the first LoRa gateway 101 at each first time period; acquiring a plurality of test data from the sending to the returning of the plurality of second time periods of the first LoRa gateway 101; one test data corresponds to one second time period; obtaining tie times of a plurality of second time periods; and if the average time is greater than the preset average time, confirming that the first running state is an abnormal running state.
Specifically, every first period of time, POE switch 100 needs to detect the operation status of each of the LoRa gateways in the area, taking first LoRa gateway 101 as an example. The POE switch 100 transmits one test data to each of the terminal equipments 105 connected in wireless communication with the first LoRa gateway 101 through the first LoRa gateway 101, and acquires a plurality of second time periods required for each test data to be transmitted from the POE switch 100 to the first LoRa gateway 101, to each of the terminal equipments 105, to the first LoRa gateway 101 from the terminal equipment 105, and to the POE switch 100. The POE switch 100 calculates the average time of the plurality of second time periods, compares the magnitude relation between the average time and the preset average time, and if the average time is smaller than the preset average time, indicates that no abnormality occurs in the first LoRa gateway 101; if the average time is greater than the preset average time, it is indicated that the first LoRa gateway 101 is abnormal, and the first running state corresponding to the first LoRa gateway 101 is confirmed to be the abnormal running state. In this embodiment, the setting of the preset average time may be accurate to a fraction of a second or even a millisecond, so that the case where the average time is equal to the preset average time will not generally occur, and if so, the average time of the plurality of second time periods may be recalculated, and the first running state corresponding to the first LoRa gateway 101 may be determined again, or the POE switch 100 directly sets the case where the average time is equal to the case where no abnormality occurs in the first LoRa gateway 101, which is not limited in this embodiment.
Step S203, determine whether the standby LoRa gateway 104 is in an idle state.
Specifically, each time a terminal device 105 performs a wireless communication connection with the LoRa gateway, a certain memory of the LoRa gateway is occupied, and the size of the memory occupancy depends on the performance of the terminal device 105, and the higher the performance of the terminal device 105, the more memory of the LoRa gateway is occupied, i.e. the larger the memory occupancy value of the terminal device 105. The ratio of the sum of memory occupancy values of the terminal devices 105 that the LoRa gateway performs wireless communication connection to the total memory that the LoRa gateway can accommodate is the occupancy rate of the LoRa gateway. The POE switch 100 determines whether the standby LoRa gateways 104 are in an idle state, that is, determines whether there are standby LoRa gateways 104 with full occupancy rate in all the standby LoRa gateways 104, by setting a preset memory occupancy threshold (the preset memory occupancy threshold is less than or equal to 100%) for the standby LoRa gateways 104, and when the occupancy rate of the terminal device 105 in the standby LoRa gateways 104 is less than the preset memory occupancy threshold, it indicates that the standby LoRa gateways 104 are in the idle state.
In step S204, if the standby LoRa gateway 104 is in the idle state, the plurality of terminal devices 105 are connected by wireless communication through the standby LoRa gateway 104.
Specifically, POE switch 100 acquires all standby LoRa gateways 104 in an idle state, and connects all terminal devices 105 that are in wireless communication connection with first LoRa gateway 101 in which an abnormality occurs, respectively, to one or more standby LoRa gateways 104. In this step, since the number of the terminal devices 105 wirelessly connected to the first abnormal LoRa gateway 101 is not determined, the number of the standby LoRa gateways 104 required is also not determined, when the number of the terminal devices 105 is large, a plurality of standby LoRa gateways 104 may be required to process, at this time, the terminal devices 105 are preferentially connected to the standby LoRa gateways 104 with a small occupancy rate, in this process, when the occupancy rate of the standby LoRa gateways 104 is greater than the preset memory occupancy threshold, if the number of the terminal devices 105 remains, the standby LoRa gateways 104 with other idle states are obtained, and the remaining terminal devices 105 are connected to the standby LoRa gateways 104 with other idle states in a wireless communication manner until all the terminal devices 105 are connected to the standby LoRa gateways 104 in a wireless communication manner or the standby LoRa gateways 104 with other idle states do not exist in the POE switch 100.
In one possible implementation, step S204 further includes: if the standby LoRa gateway 104 is not in the idle state, acquiring a second operation state of the second LoRa gateway 102 and a third operation state of the third LoRa gateway 103; if the second running state and the third running state are not abnormal running states, acquiring a first occupancy rate of the second loRa gateway 102 and a second occupancy rate of the third loRa gateway 103; judging whether the first occupancy rate is smaller than the second occupancy rate; if the first occupancy rate is smaller than the second occupancy rate, the plurality of terminal devices 105 are preferentially connected in wireless communication through the second LoRa gateway 102.
Specifically, if there is no other standby LoRa gateway 104 in an idle state in the POE switch 100, the POE switch 100 needs to connect the terminal equipment 105 which fails to connect to the standby LoRa gateway 104 in wireless communication with other LoRa gateways. It should be noted that, in order to ensure the safety of the user in the skiing field, the terminal device 105 should be connected with the LoRa gateways in a communication manner as soon as possible, because the number of standby LoRa gateways is far less than that of other LoRa gateways, the process of searching for the standby LoRa gateway 104 in an idle state and connecting the standby LoRa gateway 104 with the terminal device 105 in a wireless manner is faster than that of connecting the standby LoRa gateway 104 with the first LoRa gateway 101, the second LoRa gateway 102 and the third LoRa gateway 103, at this time, the POE switch 100 can now connect the terminal device 105 with the standby LoRa gateway 104 in a wireless manner, and when no standby LoRa gateway 104 in other idle state exists in the POE switch 100, other LoRa gateways which are connected with the POE switch 100 in a wireless manner except for the standby LoRa gateway 104 and the first LoRa gateway 101 are found if the memory occupation is not full. At this time, the POE switch 100 obtains the LoRa gateway with the lowest occupancy rate from all the LoRa gateways that are not in the abnormal operation state, that is, the second LoRa gateway 102 and the third LoRa gateway 103, that is, when the first occupancy rate of the second LoRa gateway 102 is smaller than the second occupancy rate of the third LoRa gateway 103, the second LoRa gateway 102 is the LoRa gateway with the lowest occupancy rate, and preferentially connects the plurality of terminal devices 105 through the second LoRa gateway 102 in a wireless communication manner, where the first occupancy rate and the second occupancy rate are not all satisfied.
In one possible implementation, after step S204, the method further includes: judging whether the first occupancy rate is larger than a preset occupancy rate or not; if the first occupancy rate is greater than the preset occupancy rate, acquiring a first memory occupancy value of a first terminal device in wireless communication connection with the second loRa gateway 102, and acquiring a second memory occupancy value of a second terminal device in wireless communication connection with the second loRa gateway 102; the first terminal device and the second terminal device are any two different terminal devices from a plurality of terminal devices which are in wireless communication connection with the second LoRa gateway 102; acquiring whether the first memory occupation value is smaller than the second memory occupation value; if the first memory occupancy value is smaller than the second memory occupancy value, the wireless communication connection between the first terminal device and the second LoRa gateway 102 is released preferentially.
Specifically, in the process of performing wireless communication connection between the plurality of terminal devices 105 and the second LoRa gateway 102, when the first occupancy rate of the second LoRa gateway 102 is full, that is, when the first occupancy rate of the second LoRa gateway 102 is greater than the preset occupancy rate, acquiring memory occupancy values corresponding to all the terminal devices 105 that perform wireless communication connection with the second LoRa gateway 102, and calculating to acquire the terminal device 105 that performs wireless communication connection with the second LoRa gateway 102 corresponding to the smallest memory occupancy value, that is, the first terminal device, and releasing the wireless communication connection between the first terminal device and the second LoRa gateway 102; if the occupancy rate of the second LoRa gateway 102 is still full at this time, repeating the above steps, and continuing to release the terminal device 105 having the smallest memory occupancy value and performing wireless communication connection with the second LoRa gateway 102 until the first occupancy rate of the second LoRa gateway 102 is smaller than the preset occupancy rate. Then, POE switch 100 inquires of the other LoRa gateway whose occupancy rate is not full, and connects terminal device 105 disconnected from wireless communication with second LoRa gateway 102 in wireless communication therewith.
For example, if the preset occupancy rate is set to be more than 80%, that is, the occupancy rate of the proxy LoRa gateway is full, at this time, the first occupancy rate of the second LoRa gateway 102 is 86%, then all the memory occupancy values corresponding to the terminal devices 105 that are in wireless communication connection with the second LoRa gateway 102 are obtained respectively, and if the memory occupancy values corresponding to the terminal devices a-F are 30%, 10%, 5%, 10%, and 3%, respectively, the wireless communication connection between the terminal device F and the second LoRa gateway 102 corresponding to the minimum memory occupancy value of 3% is released, after the release, the first occupancy rate of the second LoRa gateway 102 is 83%, at this time, the first occupancy rate is still full, at this time, the wireless communication connection between the terminal device D corresponding to the minimum memory occupancy value of 5% and the second LoRa gateway 102 is continuously released, after the release, the first occupancy rate of the second LoRa gateway 102 is 78%, and the release operation is ended. The POE switch 100 can then connect the released terminal device F and terminal device D to other LoRa gateways in wireless communication. It should be noted that, the memory occupancy value of the internal terminal device 105 is assumed for convenience of description, and in an actual scenario, the memory occupancy value of the terminal device 105 is far smaller than that in the above example, and the memory occupancy value of one terminal device 105 is approximately between tens of kilobytes and hundreds of kilobytes.
In a possible implementation, after step S204, the data processing performance of the standby LoRa gateway 104 is smaller than the first, second and third LoRa gateways 101, 102, 103, and the method further includes: acquiring a first processing priority corresponding to the third terminal equipment from a priority database; the third terminal device is any one terminal device 105 among the plurality of terminal devices 105; judging whether the first processing priority is greater than a preset priority; if the first processing priority is greater than the preset priority, acquiring a fourth running state of the second LoRa gateway 102 and a fifth running state of the third LoRa gateway 103; if the fourth operation state and the fifth operation state are not abnormal operation states, acquiring a third occupancy rate of the second LoRa gateway 102 and a fourth occupancy rate of the third LoRa gateway 103; judging whether the third occupancy rate is smaller than the fourth occupancy rate; if the first occupancy rate is smaller than the second occupancy rate, the third terminal device is preferentially connected in wireless communication through the second LoRa gateway 102.
Specifically, since the data processing performance of the standby LoRa gateway 104 is smaller than that of the first LoRa gateway 101, the second LoRa gateway 102 and the third LoRa gateway 103, after the process of performing wireless communication connection between the plurality of terminal devices 105 and the standby LoRa gateway, the POE switch 100 can switch the terminal device 105 that performs wireless communication connection with the standby LoRa gateway to the terminal device 105 with higher priority to perform wireless communication connection with the LoRa gateway that does not have an abnormal operation state. In a ski resort, it is important to confirm the safety of the user, so that the POE switch 100 also needs to obtain the data sent by the terminal device 105 with higher processing priority preferentially, and if the processing priority of the third terminal device is greater than that of the second terminal device, the third terminal device is connected to the second LoRa gateway 102 with smaller occupancy rate in a wireless communication manner.
In a possible implementation, step S204 further includes building a priority database: acquiring first processing data of a third terminal device, wherein the first processing data comprises position data, time data and heart rate data; setting a first processing priority corresponding to the third terminal equipment according to the first processing data; and storing the first corresponding relation among the third terminal equipment, the first processing priority and the first processing priority in a priority database.
Specifically, the priority of the terminal device 105 is confirmed by the actual use of the device. In a ski resort, there are a number of terminal devices 105 such as a monitoring device, a renting device, etc. provided in the ski resort in addition to the terminal devices 105 worn by the user, such as a timer device, a positioning device, a heart rate detecting device, an altitude detecting device, etc., and the POE switch 100 sets a processing priority level for each device according to the importance of the data to be processed by each device, the processing priority level being related to the safety of the user, the higher the processing priority level of the terminal device 105 is the more reflective of the safety of the user the data to be processed by the terminal device 105 is, and the POE switch 100 associates each processing priority level with each terminal device 105 and the correspondence of each processing priority level with each terminal device 105 is stored in a priority database.
In one possible implementation, after step S204, the method further includes: acquiring second processing data of third terminal equipment at intervals of a first time period; judging whether the second processing data is larger than the safety data or not; if the second processing data is larger than the safety data, changing the first processing priority corresponding to the third terminal equipment into the second processing priority, wherein the second processing priority is larger than the first processing priority; and storing the second corresponding relation among the third terminal equipment, the second processing priority and the second processing priority in a priority database.
Specifically, the processing priority corresponding to the terminal device 105 in the priority database may be updated at any time, and the POE switch 100 determines whether the processing data of a certain terminal device 105 is greater than the security data; if the processing data of the terminal device 105 is greater than the safety data, it is indicated that the user has a safety hazard in the ski resort. At this time, the POE switch 100 increases the processing priority corresponding to the terminal device 105, and sends a danger notification to the staff in the ski resort, so that the staff can immediately rescue the user.
By adopting the method, the beneficial effects which can be achieved include at least one of the following:
1. Through adopting above-mentioned technical scheme, POE switch acquires every loRa gateway's running state in real time, if POE switch detects the loRa gateway of unusual running state, first loRa gateway promptly, through the reserve loRa gateway that acquires idle state, can switch all terminal equipment who carries out wireless communication connection with first loRa gateway to carry out wireless communication connection with idle state's reserve loRa gateway, thereby solve the problem that the efficiency that the situation of unusual operation can appear is lower or can't acquire terminal equipment's data when acquireing terminal equipment data.
2. By setting the processing priority of each terminal device, the POE exchanger can switch the terminal device with higher priority from the terminal device which is in wireless communication connection with the standby LoRa gateway to the terminal device which is in wireless communication connection with the LoRa gateway with no abnormal operation state, and the terminal device with higher priority is in wireless communication connection with the LoRa gateway with abnormal operation state according to the sequence of wireless communication connection from high processing priority to low processing priority, so that the POE exchanger can obtain the data sent by the terminal device with higher processing priority.
3. Since it is important to confirm the safety of the user in the ski resort, the processing priority is closely related to the safety of the user, and the higher the data to be processed by the terminal device can reflect the safety of the user, the higher the processing priority of the terminal device. The POE exchanger can ensure the safety of the user in the skiing field to a greater extent by preferentially acquiring the data sent by the terminal equipment with higher processing priority.
Referring to fig. 3, a wireless communication device based on LoRa according to an embodiment of the present invention is a POE switch 100, the device is a POE switch, the POE switch is connected to a first LoRa gateway, a second LoRa gateway, a third LoRa gateway and a standby LoRa gateway through wireless communication, the first LoRa gateway is connected to a plurality of terminal devices through wireless communication, the device includes an obtaining module 31 and a processing module 32, wherein,
an obtaining module 31, configured to obtain a first operation state of the first LoRa gateway; and if the first operation state is confirmed to be the abnormal operation state, acquiring the standby LoRa gateway.
A processing module 32, configured to determine whether the standby LoRa gateway is in an idle state; and if the standby LoRa gateway is in an idle state, the plurality of terminal devices are connected in a wireless communication manner through the standby LoRa gateway.
In a possible implementation manner, the processing module 32 is configured to, after determining whether the standby LoRa gateway is in an idle state and if the standby LoRa gateway is in the idle state, perform wireless communication connection on the plurality of terminal devices through the standby LoRa gateway, if the standby LoRa gateway is not in the idle state, obtain the second operation state of the second LoRa gateway and the third operation state of the third LoRa gateway; if the second running state and the third running state are not abnormal running states, acquiring a first occupancy rate of the second LoRa gateway and a second occupancy rate of the third LoRa gateway; judging whether the first occupancy rate is smaller than the second occupancy rate; and if the first occupancy rate is smaller than the second occupancy rate, preferentially connecting the plurality of terminal devices in wireless communication through the second LoRa gateway.
In a possible implementation manner, the processing module 32 is configured to determine whether the first occupancy rate is greater than the preset occupancy rate after the plurality of terminal devices are preferentially connected in wireless communication through the second LoRa gateway if the first occupancy rate is less than the second occupancy rate; if the first occupancy rate is larger than the preset occupancy rate, acquiring a first memory occupancy value of a first terminal device in wireless communication connection with a second LoRa gateway, and acquiring a second memory occupancy value of a second terminal device in wireless communication connection with the second LoRa gateway; the first terminal equipment and the second terminal equipment are any two different terminal equipment from a plurality of terminal equipment which are in wireless communication connection with the second LoRa gateway; acquiring whether the first memory occupation value is smaller than the second memory occupation value; if the first memory occupation value is smaller than the second memory occupation value, the wireless communication connection between the first terminal equipment and the second LoRa gateway is released preferentially.
In a possible implementation manner, the data processing performance of the standby LoRa gateway is smaller than that of the first LoRa gateway, the second LoRa gateway and the third LoRa gateway, and the processing module 32 is configured to obtain, after the plurality of terminal devices are connected in wireless communication through the standby LoRa gateway if the standby LoRa gateway is in an idle state, a first processing priority corresponding to the third terminal device in the priority database; the third terminal equipment is any one of a plurality of terminal equipment; judging whether the first processing priority is greater than a preset priority; if the first processing priority is greater than the preset priority, acquiring a fourth running state of the second LoRa gateway and a fifth running state of the third LoRa gateway; if the fourth running state and the fifth running state are not abnormal running states, acquiring a third occupancy rate of the second LoRa gateway and a fourth occupancy rate of the third LoRa gateway; judging whether the third occupancy rate is smaller than the fourth occupancy rate; if the first occupancy rate is smaller than the second occupancy rate, the third terminal equipment is preferentially connected in a wireless communication mode through the second LoRa gateway.
In a possible implementation manner, the processing module 32 is configured to construct a priority database before acquiring the first processing priority corresponding to the third terminal device in the priority database, and specifically includes: acquiring first processing data of a third terminal device, wherein the first processing data comprises position data, time data and heart rate data; setting a first processing priority corresponding to the third terminal equipment according to the first processing data; and storing the first corresponding relation among the third terminal equipment, the first processing priority and the first processing priority in a priority database.
In a possible implementation manner, the processing module 32 is configured to obtain the second processing data of the third terminal device at intervals of a first period of time after the third terminal device, the first processing priority, and the correspondence between the third terminal device and the first processing priority are stored in the priority database; judging whether the second processing data is larger than the safety data or not; if the second processing data is larger than the safety data, changing the first processing priority corresponding to the third terminal equipment into the second processing priority, wherein the second processing priority is larger than the first processing priority; and storing the second corresponding relation among the third terminal equipment, the second processing priority and the second processing priority in a priority database.
In one possible implementation manner, the obtaining module 31 is configured to, if the first operation state is confirmed to be an abnormal operation state, specifically include: transmitting a plurality of test data to a plurality of terminal devices through a first LoRa gateway every first time period; acquiring a plurality of test data from sending to a plurality of second time periods returned to the first LoRa gateway; one test data corresponds to one second time period; obtaining tie times of a plurality of second time periods; and if the average time is greater than the preset average time, confirming that the first running state is an abnormal running state.
It should be noted that: in the device provided in the above embodiment, when implementing the functions thereof, only the division of the above functional modules is used as an example, in practical application, the above functional allocation may be implemented by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the embodiments of the apparatus and the method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the embodiments of the method are detailed in the method embodiments, which are not repeated herein.
The application also discloses electronic equipment. Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to the disclosure in an embodiment of the present application. The electronic device may include: at least one processor 401, at least one communication bus 402, a user interface 403, at least one network interface 404, and a memory 405.
Wherein communication bus 402 is used to enable connected communications between these components.
The user interface 403 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 403 may further include a standard wired interface and a standard wireless interface.
The network interface 404 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 401 may include one or more processing cores. The processor 401 connects the various parts within the overall POE switch 100 using various interfaces and lines, executing various functions and processing data of the POE switch 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 405, and invoking data stored in the memory 405. Alternatively, the processor 401 may be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 401 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 401 and may be implemented by a single chip.
The Memory 405 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 405 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 405 may be used to store instructions, programs, code sets, or instruction sets. The memory 405 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described various method embodiments, etc.; the storage data area may store data or the like involved in the above respective method embodiments. The memory 405 may also optionally be at least one storage device located remotely from the aforementioned processor 401. Referring to fig. 4, an operating system, a network communication module, a user interface module, and an application program for LoRa-based wireless communication may be included in the memory 405 as a computer storage medium.
In the electronic device shown in fig. 4, the user interface 403 is mainly used for providing an input interface for a user, and acquiring data input by the user; and processor 401 may be used to invoke an application program in memory 405 for a LoRa-based wireless communication, which when executed by one or more processors 401, causes the electronic device to perform the method as described in one or more of the above embodiments. It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided herein, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, such as a division of units, merely a division of logic functions, and there may be additional divisions in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, comprising several instructions for causing a computer device (which may be a personal computer, POE switch 100 or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned memory includes: various media capable of storing program codes, such as a U disk, a mobile hard disk, a magnetic disk or an optical disk.
The foregoing is merely exemplary embodiments of the present disclosure and is not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure.
This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains.
Claims (10)
1. The wireless communication method based on the LoRa is characterized in that the method is applied to a POE switch (100), and the POE switch (100) is connected with a first LoRa gateway (101), a second LoRa gateway (102), a third LoRa gateway (103) and a standby LoRa gateway (104) through wireless communication; the first LoRa gateway (101) connects a plurality of terminal devices (105) through wireless communication, the method comprising:
acquiring a first operating state of the first LoRa gateway (101);
if the first operation state is confirmed to be an abnormal operation state, acquiring the standby LoRa gateway (104);
judging whether the standby LoRa gateway (104) is in an idle state;
and if the standby LoRa gateway (104) is in the idle state, a plurality of terminal devices (105) are connected in a wireless communication way through the standby LoRa gateway (104).
2. The method according to claim 1, wherein the method further comprises:
If the standby LoRa gateway (104) is not in an idle state, acquiring a second running state of the second LoRa gateway (102) and a third running state of a third LoRa gateway (103);
if the second running state and the third running state are not abnormal running states, acquiring a first occupancy rate of the second LoRa gateway (102) and a second occupancy rate of the third LoRa gateway (103);
judging whether the first occupancy rate is smaller than the second occupancy rate;
and if the first occupancy rate is smaller than the second occupancy rate, preferentially connecting the plurality of terminal devices (105) in wireless communication through the second LoRa gateway (102).
3. The method according to claim 2, characterized in that after said preferentially connecting a plurality of said terminal devices (105) for wireless communication via said second LoRa gateway (102) if said first occupancy is smaller than said second occupancy, said method further comprises:
judging whether the first occupancy rate is larger than a preset occupancy rate or not;
if the first occupancy rate is larger than the preset occupancy rate, acquiring a first memory occupancy value of a first terminal device in wireless communication connection with the second LoRa gateway (102), and acquiring a second memory occupancy value of a second terminal device in wireless communication connection with the second LoRa gateway (102); the first terminal device and the second terminal device are any two different terminal devices in a plurality of terminal devices which are in wireless communication connection with the second LoRa gateway (102);
Acquiring whether the first memory occupancy value is smaller than the second memory occupancy value;
and if the first memory occupancy value is smaller than the second memory occupancy value, preferentially releasing the wireless communication connection between the first terminal equipment and the second LoRa gateway (102).
4. The method of claim 1, wherein the data processing performance of the backup LoRa gateway (104) is less than the first (101), second (102) and third (103) LoRa gateways; after the wireless communication connection is performed on the plurality of terminal devices through the standby LoRa gateway (104) if the standby LoRa gateway (104) is in the idle state, the method further includes:
acquiring a first processing priority corresponding to the third terminal equipment from a priority database; the third terminal device is any one terminal device (105) of a plurality of terminal devices (105);
judging whether the first processing priority is greater than a preset priority or not;
if the first processing priority is greater than the preset priority, acquiring a fourth running state of the second LoRa gateway (102) and a fifth running state of a third LoRa gateway (103);
if the fourth running state and the fifth running state are not abnormal running states, acquiring a third occupancy rate of the second LoRa gateway (102) and a fourth occupancy rate of the third LoRa gateway (103);
Judging whether the third occupancy rate is smaller than the fourth occupancy rate;
and if the first occupancy rate is smaller than the second occupancy rate, preferentially connecting the third terminal equipment in a wireless communication way through the second LoRa gateway (102).
5. The method according to claim 4, wherein constructing the priority database before the first processing priority corresponding to the third terminal device is obtained in the priority database, specifically includes:
acquiring first processing data of the third terminal device, wherein the first processing data comprises position data, time data and heart rate data;
setting the first processing priority corresponding to the third terminal equipment according to the first processing data;
and storing the third terminal equipment, the first processing priority and the first corresponding relation between the third terminal equipment and the first processing priority in the priority database.
6. The method of claim 5, wherein after the third terminal device, the first processing priority, and the correspondence of the third terminal device to the first processing priority are stored in the priority database, the method further comprises:
Acquiring second processing data of the third terminal equipment at intervals of a first time period;
judging whether the second processing data is larger than the safety data or not;
if the second processing data is larger than the safety data, changing the first processing priority corresponding to the third terminal equipment into a second processing priority, wherein the second processing priority is larger than the first processing priority;
and storing the third terminal equipment, the second processing priority and a second corresponding relation between the third terminal equipment and the second processing priority in the priority database.
7. The method according to claim 1, wherein if the first operation state is confirmed to be an abnormal operation state, specifically comprising:
transmitting a plurality of test data to a plurality of said terminal devices (105) through said first LoRa gateway (101) at each first time period;
acquiring a plurality of second time periods from sending the test data back to the first LoRa gateway (101); one of the test data corresponds to one of the second time periods;
obtaining tie times of a plurality of second time periods;
and if the average time is greater than the preset average time, confirming that the first running state is an abnormal running state.
8. A wireless communication device based on LoRa, characterized in that the device is a POE switch (100), the POE switch (100) is connected with a first LoRa gateway (101), a second LoRa gateway (102), a third LoRa gateway (103) and a standby LoRa gateway (104) through wireless communication, the first LoRa gateway (101) is connected with a plurality of terminal devices (105) through wireless communication, the device comprises an acquisition module (31) and a processing module (32), wherein,
the acquiring module (31) is configured to acquire a first operation state of the first LoRa gateway (101); if the first operation state is confirmed to be an abnormal operation state, acquiring the standby LoRa gateway (104);
the processing module (32) is configured to determine whether the standby LoRa gateway (104) is in an idle state; and if the standby LoRa gateway (104) is in the idle state, a plurality of terminal devices (105) are connected in a wireless communication way through the standby LoRa gateway (104).
9. An electronic device comprising a processor (401), a communication bus (402), a user interface (403), a network interface (404) and a memory (405), the memory (405) being for storing instructions, the user interface (403) and the network interface (404) being for communicating to other devices, the processor (401) being for executing the instructions stored in the memory (405) to cause the electronic device (400) to perform the method of any of claims 1 to 7.
10. A computer readable storage medium storing instructions which, when executed, perform the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311792048.6A CN117528599B (en) | 2023-12-25 | 2023-12-25 | LoRa-based wireless communication method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311792048.6A CN117528599B (en) | 2023-12-25 | 2023-12-25 | LoRa-based wireless communication method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117528599A true CN117528599A (en) | 2024-02-06 |
CN117528599B CN117528599B (en) | 2024-08-16 |
Family
ID=89748053
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311792048.6A Active CN117528599B (en) | 2023-12-25 | 2023-12-25 | LoRa-based wireless communication method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117528599B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111614529A (en) * | 2020-05-28 | 2020-09-01 | 深圳市欧瑞博科技股份有限公司 | Intelligent household control panel, network management method thereof and electronic equipment |
CN112399455A (en) * | 2019-08-16 | 2021-02-23 | 武汉所为科技有限公司 | Lora gateway control method and Lora communication system |
US20210064434A1 (en) * | 2019-08-30 | 2021-03-04 | Samsung Electronics Co., Ltd. | Electronic device and operating method thereof |
CN113709839A (en) * | 2021-08-19 | 2021-11-26 | 珠海格力电器股份有限公司 | Multi-gateway network switching method, device and system, electronic equipment and storage medium |
CN115297527A (en) * | 2022-07-29 | 2022-11-04 | 西安紫光展锐科技有限公司 | Wireless hotspot management method and device |
CN115664944A (en) * | 2022-10-25 | 2023-01-31 | 广州河东科技有限公司 | Multi-gateway dynamic hot standby method, device, equipment and storage medium |
-
2023
- 2023-12-25 CN CN202311792048.6A patent/CN117528599B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112399455A (en) * | 2019-08-16 | 2021-02-23 | 武汉所为科技有限公司 | Lora gateway control method and Lora communication system |
US20210064434A1 (en) * | 2019-08-30 | 2021-03-04 | Samsung Electronics Co., Ltd. | Electronic device and operating method thereof |
CN111614529A (en) * | 2020-05-28 | 2020-09-01 | 深圳市欧瑞博科技股份有限公司 | Intelligent household control panel, network management method thereof and electronic equipment |
CN113709839A (en) * | 2021-08-19 | 2021-11-26 | 珠海格力电器股份有限公司 | Multi-gateway network switching method, device and system, electronic equipment and storage medium |
CN115297527A (en) * | 2022-07-29 | 2022-11-04 | 西安紫光展锐科技有限公司 | Wireless hotspot management method and device |
CN115664944A (en) * | 2022-10-25 | 2023-01-31 | 广州河东科技有限公司 | Multi-gateway dynamic hot standby method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN117528599B (en) | 2024-08-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210022022A1 (en) | Method and device for monitoring network data | |
CN111787069A (en) | Method, device and equipment for processing service access request and computer storage medium | |
CN110971444A (en) | Alarm management method, device, server and storage medium | |
CN113364682B (en) | Data transmission method and device, storage medium and electronic device | |
CN114338650A (en) | File transmission method and device, electronic equipment and readable storage medium | |
CN111901421A (en) | Data processing method and related equipment | |
CN107306200A (en) | Network failure method for early warning and the gateway for network failure early warning | |
CN107404404B (en) | Terminal routing method based on Internet of things and Internet of things terminal | |
CN117528599B (en) | LoRa-based wireless communication method and device and electronic equipment | |
CN110224872B (en) | Communication method, device and storage medium | |
CN107682939B (en) | Communication method based on LORA ad hoc protocol | |
CN111093238B (en) | Wireless network control method and device, storage medium and electronic equipment | |
CN114615337B (en) | Equipment scheduling method, system, server and storage medium | |
CN115695497A (en) | Diagnostic data remote transmission method and device, electronic equipment and medium | |
CN112153679B (en) | Network switching method and device | |
CN112653717B (en) | Multi-cloud cooperation distributed system and application distribution method | |
CN115277595B (en) | Data transmission method and related device | |
CN117750514B (en) | Satellite resource allocation method and device, storage medium and electronic equipment | |
CN116132973B (en) | Terminal capability configuration method and device and electronic equipment | |
CN116390201A (en) | Dynamic networking method of power supply equipment, power supply equipment and computer storage medium | |
JP2023083952A (en) | Control apparatus, control system, control method, and control program | |
CN116321335A (en) | Method, system, equipment and medium for selecting data transmission mode | |
CN115379480A (en) | Network optimization method, device, server and storage medium | |
CN117435421A (en) | Data acquisition method and device, electronic equipment and storage medium | |
CN111835650A (en) | Information transmitting/receiving method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |