LoRa communication method and system, LoRa gateway, and LoRa terminal

By using the in-group key of the kit in the LoRa communication system for data encryption and verification, the problem of LoRa communication being susceptible to interference in the unregulated frequency band is solved, and stable and reliable communication is achieved.

CN114025334BActive Publication Date: 2025-05-23SHENZHEN KAIFA TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010683823.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-15
Publication Date
2025-05-23
Estimated Expiration
2040-07-15

AI Technical Summary

Technical Problem

When existing LoRa communication technology works in unregulated frequency bands, it is susceptible to interference from surrounding synchronous nodes, affecting the communication quality or causing normal communication.

Method used

By constructing a LoRa communication method, using cloud server, LoRa gateway and LoRa terminal, the in-group key of the suite is used for data encryption and verification, ensuring that the frequency selection and data transmission between the terminal and gateway of the same suite are not disturbed by other suites.

Benefits of technology

It effectively avoids synchronous frequency interference, ensures the stability and reliability of LoRa communication, and ensures that the terminals and gateways of the same suite can correctly find and use unused candidate frequencies for communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114025334B_ABST
    Figure CN114025334B_ABST
Patent Text Reader

Abstract

The present invention discloses a LoRa communication method and system, a LoRa gateway, and a LoRa terminal. The present invention uses a group secret key of a suite as a basis for determining whether the suite is the same suite. Different suites use different group secret keys. Different suites cannot parse data content. To ensure that radio frequency signals between suites do not interfere with each other and avoid co-frequency interference, when a gateway and a terminal access a network, a frequency hopping factor is used to randomly select a fixed candidate frequency for monitoring. The gateway and the terminal share the same frequency hopping factor, ensuring that the terminal in the same suite can find the gateway frequency of the suite.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of LoRa communication, and in particular to a LoRa communication method and system, a LoRa gateway, and a LoRa terminal. Background Art

[0002] In the current field of the Internet of Things, various applications based on LoRa technology are emerging in an endless stream. Since the LoRa protocol works in an unregulated frequency band, if two nodes are interfered with by other nodes with the same frequency in the vicinity during the communication process, the communication quality will be seriously affected, and even normal communication will not be possible. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a LoRa communication method and system, a LoRa gateway, and a LoRa terminal in view of the above-mentioned defects of the prior art.

[0004] The technical solution adopted by the present invention to solve its technical problem is:

[0005] On the one hand, a LoRa communication method is constructed, which is implemented based on a cloud server, a LoRa gateway and a LoRa terminal. The LoRa gateway communicates with the cloud server through the Internet, and the LoRa gateway communicates with the LoRa terminal through LoRa. The cloud server includes group keys of different suites, and different group keys are used between different suites. The LoRa gateway and the LoRa terminal only include the group key of one suite. The method includes a network access step and a communication step.

[0006] The network access steps include:

[0007] The LoRa gateway and the LoRa terminal each randomly select a preset number of candidate frequencies from the LoRa frequency set according to the agreed frequency modulation factor and random algorithm, and the LoRa gateway and the LoRa terminal each monitor the preset number of candidate frequencies in turn;

[0008] The LoRa gateway selects a candidate frequency that is not used in the current environment from the preset number of candidate frequencies according to the monitoring result as the working frequency between itself and the LoRa terminal;

[0009] The data of the LoRa terminal at a certain candidate frequency can be decrypted using the group key of the suite to which it belongs, so the LoRa gateway is found, and the candidate frequency is selected as the working frequency between the LoRa terminal and the LoRa gateway;

[0010] The communication step comprises:

[0011] When the LoRa terminal sends data to the cloud server, the data is encrypted based on the group key of the suite and then sent to the LoRa gateway;

[0012] The LoRa gateway monitors the data from the cloud server and the LoRa terminal, verifies the received data based on the group key of the suite it is in, and sends the verified data to the LoRa terminal or cloud server in the same suite;

[0013] When the LoRa terminal and the cloud server receive data from the LoRa gateway, they decrypt the received data according to the group key of the suite.

[0014] Preferably, the selecting, according to the monitoring result, a candidate frequency that is not used in the current environment from the preset number of candidate frequencies as the working frequency between itself and the LoRa terminal includes:

[0015] Select the candidate frequency where no data is monitored as the working frequency between itself and the LoRa terminal;

[0016] When all candidate frequencies have data, the candidate frequency with the smallest ratio of gateway signal strength to signal-to-noise ratio is selected as the operating frequency between itself and the LoRa terminal.

[0017] Preferably, the method of verifying the received data based on the group key of the suite to which it belongs, and sending the successfully verified data to the LoRa terminal or cloud server in the same suite includes:

[0018] When the LoRa gateway receives the data sent by the cloud server, it uses the MIC code in the data decrypted by the group secret key. If the MIC code is wrong, the data is discarded. If the MIC code is correct, the data is sent to the LoRa terminal through the working frequency;

[0019] When the LoRa gateway monitors the data sent by the LoRa terminal at the working frequency, it uses the MIC code in the data to decrypt the data using the secret key within the group. If the MIC code is wrong, the data is discarded. If the MIC code is correct, the data is sent to the cloud server.

[0020] Preferably, the method further includes: if the LoRa terminal still cannot find the LoRa gateway after monitoring all candidate frequencies, then use the frequency of the mutual control mode and the group key of the suite to which it belongs to directly send and receive data with other LoRa terminals.

[0021] In the second aspect, a LoRa communication method is constructed, which is implemented based on a LoRa gateway, wherein the LoRa gateway communicates with a cloud server via the Internet, and the LoRa gateway communicates with a LoRa terminal via LoRa, and the method includes:

[0022] The LoRa gateway randomly selects a preset number of candidate frequencies from the LoRa frequency set based on the frequency modulation factor and random algorithm agreed with the LoRa terminal;

[0023] The LoRa gateway monitors the preset number of candidate frequencies in sequence, and selects a candidate frequency that is not used in the current environment from the preset number of candidate frequencies as the working frequency between itself and the LoRa terminal according to the monitoring result;

[0024] The LoRa gateway monitors the data from the cloud server and the LoRa terminal, verifies the received data based on the group key of the suite it is in, and sends the verified data to the LoRa terminal or cloud server in the same suite. Different suites use different group keys.

[0025] Preferably, the selecting, according to the monitoring result, a candidate frequency that is not used in the current environment from the preset number of candidate frequencies as the working frequency between itself and the LoRa terminal includes:

[0026] Select the candidate frequency where no data is monitored as the working frequency between itself and the LoRa terminal;

[0027] When all candidate frequencies have data, the candidate frequency with the smallest ratio of gateway signal strength to signal-to-noise ratio is selected as the operating frequency between itself and the LoRa terminal.

[0028] In the third aspect, a LoRa communication method is constructed, which is implemented based on the LoRa terminal, wherein the LoRa terminal communicates with the LoRa gateway via LoRa, and the LoRa gateway communicates with the cloud server via the Internet, and the method includes:

[0029] The LoRa terminal randomly selects a preset number of candidate frequencies from the LoRa frequency set according to the frequency modulation factor and random algorithm agreed with the LoRa gateway;

[0030] The LoRa terminal monitors the preset number of candidate frequencies in sequence. If the data of a candidate frequency can be decrypted using the group key of the suite to which it belongs, it is determined that the LoRa gateway is found, and the candidate frequency is selected as the working frequency between the LoRa terminal and the LoRa gateway.

[0031] When the LoRa terminal sends data, it encrypts the data based on the suite's group key and sends it to the LoRa gateway. When the LoRa terminal receives data from the LoRa gateway, it decrypts the received data according to the suite's group key.

[0032] In fourth aspect, a LoRa communication system is constructed, including a cloud server, a LoRa gateway, and a LoRa terminal. The LoRa gateway and the cloud server communicate via the Internet, and the LoRa gateway and the LoRa terminal communicate via LoRa. The cloud server includes group keys of different suites, and different suites use different group keys. The LoRa gateway and the LoRa terminal only include the group key of one suite. The cloud server, the LoRa gateway, and the LoRa terminal are used to implement the method as described above.

[0033] In a fifth aspect, a LoRa gateway is constructed, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method described above are implemented.

[0034] In a sixth aspect, a LoRa terminal is constructed, comprising a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method described above are implemented.

[0035] The LoRa communication method and system, LoRa gateway, and LoRa terminal of the present invention have the following beneficial effects: the present invention uses the intra-group secret key of the suite as the basis for determining whether it is the same suite, different suites use different intra-group secret keys, and different suites cannot parse data content. In order to ensure that the radio frequency signals between suites do not interfere with each other and avoid co-frequency interference, the gateway and the terminal in the present invention use the frequency hopping factor to randomly select a fixed candidate frequency for monitoring when accessing the network, and the gateway and the terminal share the same frequency hopping factor to ensure that the terminal in the same suite can find the gateway frequency of the suite. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative work:

[0037] Figure 1 It is a flow chart of the LoRa communication method of embodiment 1;

[0038] Figure 2 It is a flow chart of the LoRa communication method of embodiment 2. DETAILED DESCRIPTION

[0039] In order to facilitate understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Typical embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.

[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0041] The general idea of ​​the present invention is: the present invention uses the group key of the suite as the basis for determining whether it is the same suite, different suites use different group keys, and different suites cannot parse data content. In order to ensure that the radio frequency signals between suites do not interfere with each other and avoid co-frequency interference, the gateway and the terminal in the present invention use the frequency hopping factor to randomly select a fixed candidate frequency for monitoring when accessing the network. The gateway and the terminal share the same frequency hopping factor to ensure that the terminal in the same suite can find the gateway frequency of the suite.

[0042] In order to better understand the above-mentioned technical scheme, the above-mentioned technical scheme will be described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical scheme of the present application, rather than limitations on the technical scheme of the present application. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0043] Embodiment 1

[0044] refer to Figure 1 The LoRa communication method of this embodiment is implemented based on the LoRa gateway. The LoRa gateway communicates with the cloud server through the Internet, that is, through the TCP / IP protocol, and the LoRa gateway communicates with the LoRa terminal through LoRa. Figure 1 , the method comprising:

[0045] S101: The LoRa gateway randomly selects a preset number of candidate frequencies from the LoRa frequency set according to the frequency modulation factor and random algorithm agreed with the LoRa terminal;

[0046] After the LoRa gateway is powered on, it will randomly select a preset number of candidate frequencies from the LoRa frequency set using a random algorithm (such as a pseudo-random SRAND algorithm) based on the frequency modulation factor F_FACTOR, for example, 8 candidate frequencies are randomly selected from the 96 LoRa frequency set. The agreed method can be written into the product when it leaves the factory.

[0047] S102: The LoRa gateway monitors the preset number of candidate frequencies in sequence, and selects a candidate frequency that is not used in the current environment from the preset number of candidate frequencies as the working frequency between itself and the LoRa terminal according to the monitoring result;

[0048] That is, select each candidate frequency in order and monitor the scheduled time. Select the candidate frequency that has not monitored data as the working frequency between itself and the LoRa terminal; when all candidate frequencies have monitored data, select the candidate frequency with the smallest RSSI / SNR as the working frequency between itself and the LoRa terminal. RSSI represents the gateway signal strength, and SNR represents the signal-to-noise ratio. Because the RSSI / SNR of the frequency that is already in use will be stronger and cause greater interference to itself, the frequency with the smallest RSSI / SNR is selected.

[0049] S103: The LoRa gateway monitors the data from the cloud server and the LoRa terminal, verifies the received data based on the group key of the suite it is in, and sends the verified data to the LoRa terminal or cloud server in the same suite.

[0050] Specifically, when the LoRa gateway receives data sent by the cloud server, it uses the MIC code in the data decrypted by the secret key within the group. If the MIC code is wrong, the data is discarded. If the MIC code is correct, the data is sent to the LoRa terminal through the working frequency; when the LoRa gateway monitors the data sent by the LoRa terminal at the working frequency, it uses the MIC code in the data decrypted by the secret key within the group. If the MIC code is wrong, the data is discarded. If the MIC code is correct, the data is sent to the cloud server.

[0051] Among them, the data sent by the LoRa terminal and the cloud server are encrypted using the group key groupKey for AES-128 symmetric encryption. When the LoRa terminal receives the data, it only needs to use the group key groupKey to decode the MIC code for verification. If the decrypted MIC code is consistent with the locally stored MIC code, the MIC code in the data is considered correct.

[0052] The suite consists of a cloud server, a LoRa gateway, and a LoRa terminal. The LoRa gateway and LoRa terminal can only belong to the same suite, while the cloud server can belong to several suites at the same time. Therefore, the LoRa gateway and LoRa terminal only include the group key of one suite, while the cloud server includes the group keys of different suites. Different suites use different group keys. The group keys of the server, LoRa gateway, and LoRa terminal are all pre-written locally.

[0053] Embodiment 2

[0054] refer to Figure 2 The LoRa communication method of this embodiment is implemented based on the LoRa terminal. The LoRa gateway communicates with the cloud server through the Internet, that is, through the TCP / IP protocol, and the LoRa gateway communicates with the LoRa terminal through LoRa. Figure 2 , the method comprising:

[0055] S201: The LoRa terminal randomly selects a preset number of candidate frequencies from the LoRa frequency set according to the frequency modulation factor and random algorithm agreed with the LoRa gateway;

[0056] Similar to the principle of the gateway, after the LoRa terminal is powered on, it will randomly select a preset number of candidate frequencies from the LoRa frequency set based on the frequency modulation factor F_FACTOR using a random algorithm (such as a pseudo-random SRAND algorithm), for example, 8 candidate frequencies are randomly selected from the 96 LoRa frequency set. The agreed method can be written into the product when it leaves the factory.

[0057] S202: The LoRa terminal monitors the preset number of candidate frequencies in sequence. If the data of a candidate frequency can be decrypted using the group key of the suite to which it belongs, it is determined that the LoRa gateway is found, and the candidate frequency is selected as the working frequency between the LoRa terminal and the LoRa gateway.

[0058] That is, select each candidate frequency in order to monitor the scheduled time. When the LoRa terminal monitors the candidate frequency, if the data of a candidate frequency can be decrypted using the group key of the suite it is in, the LoRa terminal will send a network access request based on this candidate frequency. If the network access is successful, it will determine that the LoRa gateway is found and record the candidate frequency as the working frequency between itself and the LoRa gateway. If the network access is unsuccessful, the next candidate frequency will be selected for monitoring. Among them, the group keys of the server, LoRa gateway, and LoRa terminal are all pre-written locally.

[0059] Preferably, if the LoRa terminal still cannot find the LoRa gateway after monitoring all candidate frequencies, it uses the frequency of the inter-control mode and the group key of the suite to which it belongs to directly send and receive data with other LoRa terminals.

[0060] It is understandable that even if the LoRa terminal finds the LoRa gateway, in addition to monitoring the LoRa gateway, it will also monitor the frequency of the mutual control mode to ensure that when a LoRa terminal cannot find the gateway, it can communicate with other terminals through the local mutual control mode.

[0061] S203: When the LoRa terminal sends data, it encrypts the data based on the internal secret key of the suite and sends it to the LoRa gateway. When the LoRa terminal receives data from the LoRa gateway, it decrypts the received data according to the internal secret key of the suite.

[0062] For example, the LoRa terminal uses the group key groupKey to perform AES-128 symmetric encryption to encrypt. The LoRa terminal uses the group key groupKey to perform AES-128 symmetric decryption to decrypt the received data.

[0063] Embodiment 3

[0064] The LoRa communication method of this embodiment is implemented based on a cloud server, a LoRa gateway and a LoRa terminal. The LoRa gateway communicates with the cloud server via the Internet, and the LoRa gateway communicates with the LoRa terminal via LoRa. The cloud server includes group keys of different suites, and different suites use different group keys. The LoRa gateway and the LoRa terminal only include the group key of one suite. The method includes a network access step and a communication step;

[0065] The network access step includes:

[0066] 1) The LoRa gateway and the LoRa terminal randomly select a preset number of candidate frequencies from the LoRa frequency set according to the agreed frequency modulation factor and random algorithm;

[0067] After the LoRa gateway and the LoRa terminal are powered on, they will use a random algorithm (such as a pseudo-random SRAND algorithm) to randomly select a preset number of candidate frequencies from the LoRa frequency set according to the frequency modulation factor F_FACTOR, for example, 8 candidate frequencies are randomly selected from the 96 LoRa frequency set. The agreed method can be written into the product when it leaves the factory.

[0068] 2) The LoRa gateway and the LoRa terminal monitor the preset number of candidate frequencies in turn;

[0069] That is, each candidate frequency is selected in order and monitored for a predetermined time.

[0070] 3) The LoRa gateway selects a candidate frequency that is not used in the current environment from the preset number of candidate frequencies according to the monitoring result as the working frequency between itself and the LoRa terminal;

[0071] Specifically: select the candidate frequency that has not monitored data as the working frequency between itself and the LoRa terminal; when all candidate frequencies have monitored data, select the candidate frequency with the smallest RSSI / SNR as the working frequency between itself and the LoRa terminal. RSSI represents the gateway signal strength, and SNR represents the signal-to-noise ratio. Because the RSSI / SNR of the frequency that is already in use will be stronger and cause greater interference to itself, the frequency with the smallest RSSI / SNR is selected.

[0072] 4) The data of the LoRa terminal at a certain candidate frequency can be decrypted using the group key of the suite to which it belongs, so the LoRa gateway is found, and the candidate frequency is selected as the working frequency between itself and the LoRa gateway.

[0073] Specifically: When the LoRa terminal listens to the candidate frequencies in turn, if the data of a candidate frequency can be decrypted using the group key of the suite it is in, the LoRa terminal will send a network access request based on this candidate frequency. If the network access is successful, it will determine that the LoRa gateway is found, and the candidate frequency will be recorded as the working frequency between itself and the LoRa gateway. If the network access is unsuccessful, the next candidate frequency will be selected for monitoring. Preferably, if the LoRa terminal still cannot find the LoRa gateway after monitoring all candidate frequencies, it will use the frequency of the inter-control mode and the group key of the suite it is in to directly send and receive data with other LoRa terminals.

[0074] It is understandable that even if the LoRa terminal finds the LoRa gateway, in addition to monitoring the LoRa gateway, it will also monitor the frequency of the mutual control mode to ensure that when a LoRa terminal cannot find the gateway, it can communicate with other terminals through the local mutual control mode.

[0075] Wherein, the communication step includes:

[0076] 1) When the LoRa terminal and the cloud server send data, they encrypt the data based on the group key of the suite and send it to the LoRa gateway;

[0077] 2) The LoRa gateway monitors the data from the cloud server and the LoRa terminal, verifies the received data based on the group key of the suite it is in, and sends the verified data to the LoRa terminal or cloud server in the same suite;

[0078] Specifically, when the LoRa gateway receives data sent by the cloud server, it uses the MIC code in the data decrypted by the secret key within the group. If the MIC code is wrong, the data is discarded. If the MIC code is correct, the data is sent to the LoRa terminal through the working frequency; when the LoRa gateway monitors the data sent by the LoRa terminal at the working frequency, it uses the MIC code in the data decrypted by the secret key within the group. If the MIC code is wrong, the data is discarded. If the MIC code is correct, the data is sent to the cloud server.

[0079] Among them, the data sent by the LoRa terminal and the cloud server are encrypted using the group key groupKey for AES-128 symmetric encryption. When the LoRa terminal receives the data, it only needs to use the group key groupKey to decode the MIC code for verification. If the decrypted MIC code is consistent with the locally stored MIC code, the MIC code in the data is considered correct.

[0080] The suite consists of a cloud server, a LoRa gateway, and a LoRa terminal. The LoRa gateway and LoRa terminal can only belong to the same suite, while the cloud server can belong to several suites at the same time. Therefore, the LoRa gateway and LoRa terminal only include the group key of one suite, while the cloud server includes the group keys of different suites. Different suites use different group keys. The group keys of the server, LoRa gateway, and LoRa terminal are all pre-written locally.

[0081] 3) When the LoRa terminal and the cloud server receive data from the LoRa gateway, they decrypt the received data according to the group key of the suite.

[0082] Embodiment 4

[0083] This embodiment discloses a LoRa communication system, including a cloud server, a LoRa gateway, and a LoRa terminal. The LoRa gateway and the cloud server communicate via the Internet, and the LoRa gateway and the LoRa terminal communicate via LoRa. The cloud server includes group keys of different suites, and different group keys are used between different suites. The LoRa gateway and the LoRa terminal only include the group key of one suite. The cloud server, the LoRa gateway, and the LoRa terminal implement the method described in Example 3.

[0084] Embodiment 5

[0085] This embodiment discloses a LoRa gateway, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method described in Embodiment 1 are implemented. The specific implementation process can be referred to the description of the above method embodiment, which will not be repeated here.

[0086] Embodiment 6

[0087] This embodiment discloses a LoRa terminal, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method in Embodiment 2 are implemented. The specific implementation process can be referred to the description of the above method embodiment, which will not be repeated here.

[0088] In summary, the LoRa communication method and system, LoRa gateway, and LoRa terminal of the present invention have the following beneficial effects: the present invention uses the intra-group key of the suite as the basis for determining whether it is the same suite, different suites use different intra-group keys, and different suites cannot parse data content. In order to ensure that the radio frequency signals between suites do not interfere with each other and avoid co-frequency interference, the gateway and the terminal in the present invention use the frequency hopping factor to randomly select a fixed candidate frequency for monitoring when accessing the network. The gateway and the terminal share the same frequency hopping factor to ensure that the terminal in the same suite can find the gateway frequency of the suite.

[0089] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.

Claims

1. A LoRa communication method is implemented based on a cloud server, a LoRa gateway, and LoRa terminals. The LoRa gateway communicates with the cloud server via the Internet, and the LoRa gateway communicates with LoRa terminals via LoRa. Characterized in that, The cloud server includes group keys for different suites, and different group keys are used between different suites. The LoRa gateway and LoRa terminals only include group keys for one suite. The method includes an access step and a communication step; The access step includes: Both the LoRa gateway and LoRa terminals respectively randomly select a preset number of candidate frequencies from the LoRa frequency set according to the agreed frequency modulation factor and random algorithm, and both the LoRa gateway and LoRa terminals respectively listen to the preset number of candidate frequencies in sequence; The LoRa gateway selects a candidate frequency that is not used in the current environment from the preset number of candidate frequencies as the working frequency between itself and the LoRa terminal according to the listening results, specifically including: selecting a candidate frequency without detecting data as the working frequency between itself and the LoRa terminal; when there is data on all candidate frequencies, then selecting the candidate frequency with the smallest ratio of gateway signal strength to signal-to-noise ratio as the working frequency between itself and the LoRa terminal; If the data of a certain candidate frequency can be decrypted by the group key of the suite where the LoRa terminal is located, it is determined that the LoRa gateway is found, and this certain candidate frequency is selected as the working frequency between itself and the LoRa gateway. If the LoRa terminal still cannot find the LoRa gateway after listening to all candidate frequencies, it directly performs data transmission and reception with other LoRa terminals using the frequency in the mutual control mode and the group key of its own suite; The communication step includes: When the LoRa terminal and the cloud server send data, they respectively encrypt the data based on the group key of the suite and send it to the LoRa gateway; The LoRa gateway listens to the data from the cloud server and LoRa terminals, verifies the received data based on the group key of its own suite, and sends the data with successful verification to the LoRa terminal or cloud server in the same suite; When the LoRa terminal and the cloud server receive data from the LoRa gateway, they decrypt the received data according to the group key of the suite.

2. The LoRa communication method according to claim 1, Characterized in that, The verifying the received data based on the group key of its own suite and sending the data with successful verification to the LoRa terminal or cloud server in the same suite includes: When the LoRa gateway receives data sent by the cloud server, it uses the MIC code in the data decrypted by the group key. If the MIC code is incorrect, the data is discarded. If the MIC code is correct, the data is sent to the LoRa terminal through the working frequency; When the LoRa gateway detects data sent by the LoRa terminal at the working frequency, it uses the MIC code in the data decrypted by the group key. If the MIC code is incorrect, the data is discarded. If the MIC code is correct, the data is sent to the cloud server.

3. A LoRa communication method, implemented based on a LoRa gateway. The LoRa gateway communicates with a cloud server via the Internet, and the LoRa gateway communicates with LoRa terminals via LoRa. Characterized in that, The method includes: The LoRa gateway randomly selects a preset number of candidate frequencies from the LoRa frequency set according to the frequency modulation factor and random algorithm agreed upon with the LoRa terminals. The LoRa gateway sequentially monitors the preset number of candidate frequencies, and selects, according to the monitoring results, a candidate frequency that is not used in the current environment from the preset number of candidate frequencies as the working frequency between itself and the LoRa terminals. Specifically, it includes: selecting a candidate frequency for which no data is monitored as the working frequency between itself and the LoRa terminals; when there is data for all candidate frequencies, then selecting the candidate frequency with the smallest ratio of the gateway signal strength to the signal-to-noise ratio as the working frequency between itself and the LoRa terminals. The LoRa gateway monitors data from the cloud server and LoRa terminals, verifies the received data based on the group key within its own suite, and sends the data that passes the verification to the LoRa terminals or the cloud server in the same suite, where different suites use different group keys. Wherein, the LoRa terminal is configured to: randomly select a preset number of candidate frequencies from the LoRa frequency set according to the agreed frequency modulation factor and random algorithm. Both the LoRa gateway and the LoRa terminal sequentially monitor the preset number of candidate frequencies. If the data of a certain candidate frequency can be decrypted with the group key within its own suite, it is determined that the LoRa gateway is found, and this certain candidate frequency is selected as the working frequency between itself and the LoRa gateway. If the LoRa terminal still cannot find the LoRa gateway after monitoring all candidate frequencies, it directly performs data transmission and reception with other LoRa terminals using the frequency in the mutual control mode and the group key within its own suite.

4. A LoRa communication method, implemented based on a LoRa terminal. The LoRa terminal communicates with a LoRa gateway via LoRa, and the LoRa gateway communicates with a cloud server via the Internet. Characterized in that, The method includes: The LoRa terminal randomly selects a preset number of candidate frequencies from the LoRa frequency set according to the frequency modulation factor and random algorithm agreed upon with the LoRa gateway. The LoRa terminal sequentially monitors the preset number of candidate frequencies. If the data of a certain candidate frequency can be decrypted with the group key within its own suite, it is determined that the LoRa gateway is found, and this certain candidate frequency is selected as the working frequency between itself and the LoRa gateway. If the LoRa terminal still cannot find the LoRa gateway after monitoring all candidate frequencies, it directly performs data transmission and reception with other LoRa terminals using the frequency in the mutual control mode and the group key within its own suite. When the LoRa terminal sends data, it encrypts the data based on the suite's internal key and sends it to the LoRa gateway. When the LoRa terminal receives data from the LoRa gateway, it decrypts the received data according to the suite's internal key. Among them, the LoRa gateway is configured as: The LoRa gateway randomly selects a preset number of candidate frequencies from the LoRa frequency set based on the frequency modulation factor and random algorithm agreed with the LoRa terminal; The LoRa gateway monitors the preset number of candidate frequencies in turn, and selects a candidate frequency that is not used in the current environment from the preset number of candidate frequencies according to the monitoring result as the working frequency between itself and the LoRa terminal, specifically including: selecting a candidate frequency without monitored data as the working frequency between itself and the LoRa terminal; when all candidate frequencies have data, selecting the candidate frequency with the smallest ratio of the gateway signal strength to the signal-to-noise ratio as the working frequency between itself and the LoRa terminal.

5. A LoRa communication system, comprising a cloud server, a LoRa gateway, and a LoRa terminal, wherein the LoRa gateway communicates with the cloud server via the Internet, and the LoRa gateway communicates with the LoRa terminal via LoRa. It is characterized in that The cloud server includes group keys of different suites, different group keys are used between different suites, the LoRa gateway and the LoRa terminal only include the group key of one suite, and the cloud server, the LoRa gateway, and the LoRa terminal are used to implement the method as described in any one of claims 1-2.

6. A LoRa gateway, It is characterized in that The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method according to any one of claims 3 are implemented.

7. A LoRa terminal, It is characterized in that The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method according to claim 4 are implemented.

Citation Information

Patent Citations

  • Data transmission method and device based on LoRa, LoRa gateway, system and storage medium

    CN108600376A