LoRa-based frequency hopping communication method and related device
By using the LoRa communication method with dynamic random frequency hopping and time synchronization, the problems of high data packet loss rate and severe co-channel interference in multi-mower operations are solved, and efficient and reliable frequency hopping communication is achieved.
Patent Information
- Application Number
- CN202511103503.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-07
AI Technical Summary
Existing LoRa communication solutions suffer from high data packet loss rates when multiple lawnmowers are operating, and severe co-channel interference under fixed frequency bands, resulting in poor communication reliability.
By employing dynamic random frequency hopping and time synchronization, the base station and rover generate random frequency hopping sequences through a shared pairing code, perform channel switching and data packet transmission, and issue synchronization commands after receiving frequency confirmation messages, thus ensuring data frequency hopping transmission on multiple independent channels.
It effectively avoids data transmission interference between the base station and the rover, improves the reliability and efficiency of communication, and is suitable for multi-node distributed communication scenarios.
Smart Images

Figure CN120915327A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a frequency hopping communication method based on LoRa and related devices. BACKGROUND
[0002] At present, the PPS-dependent frequency hopping scheme relies on the PPS signal synchronization of the RTK positioning system, and the synchronization fails when there is no navigation signal or satellite blocking, and an additional hardware clock module is required, which has a high cost. The fixed frequency band LoRa communication scheme transmits RTK differential data using a fixed frequency band, and the co-channel interference is serious under a fixed channel, which greatly increases the data packet loss rate when multiple mowing vehicles are working. For example, using a single channel of the European 868MHz frequency band to continuously send data results in a high co-channel interference rate of up to 22%, and the channel selection based on the RSSI threshold lacks randomization design and is easy to exhaust channel resources.
[0003] Therefore, how to improve the communication reliability of data transmission needs to be solved urgently. SUMMARY
[0004] The embodiments of the present application provide a frequency hopping communication method based on LoRa and related devices, which avoids interference in data transmission between the reference station and the mobile station through dynamic random frequency hopping and time synchronization, thereby ensuring efficient and reliable frequency hopping communication.
[0005] In a first aspect, the embodiments of the present application provide a frequency hopping communication method based on LoRa, applied to a reference station, the method comprising:
[0006] configured to work on m independent channels of a target frequency band, and the residence time of each channel is T, wherein m is an integer greater than 1;
[0007] generating a random frequency hopping sequence according to a pairing code shared with a mobile station;
[0008] hopping to a target channel according to the frequency hopping sequence, and sending a data packet containing a network identifier within the residence time, the network identifier being associated with the pairing code;
[0009] receiving a frequency confirmation message fed back by the mobile station, the frequency confirmation message being sent by the mobile station after listening to the data packet and verifying that the network identifier matches;
[0010] in response to the frequency confirmation message, issuing a synchronization instruction containing the frequency hopping sequence to the mobile station;
[0011] based on the synchronization instruction, performing data frequency hopping transmission with the mobile station on the m independent channels.
[0012] In a second aspect, the embodiments of the present application provide a frequency hopping communication method based on LoRa, applied to a flow station, and the method comprises the following steps:
[0013] Obtaining a pairing code shared with a reference station;
[0014] Continuously listening to each channel for at least KxT duration on m independent channels of a target frequency band, wherein m is an integer greater than 1, T is the residence time of the channel, and K is an integer greater than m;
[0015] Analyzing the received data packet during the listening process;
[0016] When the network identifier contained in the analyzed data packet matches the pairing code, sending a frequency confirmation message to the reference station;
[0017] Receiving a synchronization instruction containing a frequency hopping sequence issued by the reference station;
[0018] Based on the synchronization instruction, performing data frequency hopping transmission with the reference station on the m independent channels.
[0019] In a third aspect, the embodiments of the present application provide a frequency hopping communication device based on LoRa, applied to a reference station, and the device comprises:
[0020] A configuration unit configured to work on m independent channels of a target frequency band, and the residence time of each channel is T duration, wherein m is an integer greater than 1;
[0021] A generation unit configured to generate a random frequency hopping sequence according to a pairing code shared with a flow station;
[0022] A sending unit configured to jump to a target channel according to the frequency hopping sequence, and send a data packet containing a network identifier within the residence time, wherein the network identifier is associated with the pairing code;
[0023] A receiving unit configured to receive a frequency confirmation message fed back by the flow station, wherein the frequency confirmation message is sent by the flow station after listening to the data packet and verifying that the network identifier matches;
[0024] The sending unit is also configured to issue a synchronization instruction containing the frequency hopping sequence to the flow station in response to the frequency confirmation message;
[0025] A communication unit configured to perform data frequency hopping transmission with the flow station on the m independent channels based on the synchronization instruction.
[0026] In a fourth aspect, the embodiments of the present application provide a frequency hopping communication device based on LoRa, applied to a flow station, and the device comprises:
[0027] The acquisition unit is configured to acquire a pairing code shared by the reference station;
[0028] The monitoring unit is configured to continuously monitor each channel for at least KxT time on m independent channels of the target frequency band, where m is an integer greater than 1, T is the residence time of the channel, and K is an integer greater than m.
[0029] The analysis unit is configured to analyze the received data packet during the monitoring process.
[0030] The sending unit is configured to send a frequency confirmation message to the reference station when the network identifier contained in the analyzed data packet matches the pairing code.
[0031] The receiving unit is configured to receive a synchronization instruction containing a frequency hopping sequence issued by the reference station.
[0032] The communication unit is configured to perform data frequency hopping transmission with the reference station on the m independent channels based on the synchronization instruction.
[0033] In a fifth aspect, an electronic device is provided, which includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for performing the steps in any method of the first aspect.
[0034] In a sixth aspect, a computer readable storage medium is provided, which stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform some or all of the steps described in any method of the first aspect.
[0035] In a seventh aspect, a computer program product is provided, which includes a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps described in any method of the first aspect. The computer program product can be a software installation package.
[0036] By implementing the embodiments of the present application, dynamic random frequency hopping and time synchronization are performed between the reference station and the mobile station, so that the data transmission between the two is not interfered, thereby ensuring efficient and reliable frequency hopping communication. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings described below are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0038] Figure 1 is a system architecture diagram of a frequency hopping communication system provided by an embodiment of the present application;
[0039] Figure 2 is a structural schematic diagram of an electronic device provided by an embodiment of the present application;
[0040] Figure 3 is an application scenario diagram of frequency hopping communication applied to a smart mower provided by an embodiment of the present application;
[0041] Figure 4 is a flowchart of a frequency hopping communication method based on LoRa provided by an embodiment of the present application;
[0042] Figure 5 is a flowchart of channel division provided by an embodiment of the present application;
[0043] Figure 6 is a flowchart of another frequency hopping communication method based on LoRa provided by an embodiment of the present application;
[0044] Figure 7 is a functional unit composition block diagram of a frequency hopping communication device based on LoRa provided by an embodiment of the present application;
[0045] Figure 8 is a functional unit composition block diagram of another frequency hopping communication device based on LoRa provided by an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the person skilled in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0047] The terms "first", "second", and the like in the description and in the claims of the present application and above-described drawings are used to distinguish different objects, and are not used to describe a particular order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product, or device.
[0048] It should be understood that the term "and / or" herein only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in this paper represents that the front and rear associated objects are a "or" relationship. "Multiple" in the embodiments of the present application means two or more.
[0049] The "at least one" or similar expressions in the embodiments of the present application means any combination of these items, including any combination of single item or multiple items, means one or more, and multiple means two or more. For example, at least one of a, b or c can represent the following seven cases: a, b, c, a and b, a and c, b and c, a, b and c. Wherein, each of a, b and c can be an element or a set containing one or more elements.
[0050] The "connection" appearing in the embodiments of the present application means direct connection or indirect connection and various connection modes to realize communication between devices, which is not limited by the embodiments of the present application.
[0051] In this paper, "embodiment" means that the specific features, structures or characteristics described in conjunction with the embodiment can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment to other embodiments. The skilled person explicitly and implicitly understands that the embodiments described herein can be combined with other embodiments.
[0052] First, the related terms involved in the present application will be explained as follows:
[0053] Pulse Per Second (PPS): refers to a high-precision time synchronization signal, usually a periodic 1-second interval pulse, widely used in scenarios that require strict alignment of timing.
[0054] Real-Time Kinematic (RTK): refers to the core technology in scenarios such as intelligent mowing vehicles, drones, surveying and mapping, etc. that require centimeter-level high-precision positioning. Through the cooperation of reference stations and mobile stations, errors in satellite positioning are eliminated to achieve sub-meter or even centimeter-level positioning accuracy.
[0055] Long Range (LoRa): refers to a low-power wide-area network wireless communication technology based on spread spectrum technology, widely used in smart meters, environmental monitoring, smart agriculture, intelligent mowing vehicles, etc.
[0056] Frequency hopping sequence: refers to a frequency sequence that both parties of communication agree on in advance and quickly switch between different channels (frequency bands) according to certain rules.
[0057] Currently, the PPS-dependent frequency hopping scheme relies on the PPS signal synchronization of the RTK positioning system, and the synchronization fails when there is no navigation signal or satellite obstruction, and an additional hardware clock module is required, which is costly. The fixed frequency band LoRa communication scheme uses a fixed frequency band to transmit RTK differential data, and the co-channel interference is serious under a fixed channel, which greatly increases the data packet loss rate when multiple mowing vehicles are operating, for example, using a single channel in the European 868MHz frequency band to continuously send data, resulting in a high co-channel interference rate of up to 22%, and the channel selection based on RSSI threshold lacks randomization design, which easily exhausts channel resources. Therefore, how to improve the communication reliability of data transmission needs to be solved urgently.
[0058] To solve the above problems, the embodiments of the present application provide a frequency hopping communication method and related device based on LoRa, first, the reference station is configured to work on m independent channels of the target frequency band, the residence time of each channel is T, wherein m is an integer greater than 1; generate a random frequency hopping sequence according to the pairing code shared with the mobile station; hop to the target channel according to the frequency hopping sequence and send a data packet containing a network identifier within the residence time, the network identifier is associated with the pairing code; receive the frequency confirmation message fed back by the mobile station, the frequency confirmation message is sent by the mobile station after listening to the data packet and verifying that the network identifier matches; in response to the frequency confirmation message, issue a synchronization instruction containing the frequency hopping sequence to the mobile station; based on the synchronization instruction, perform data frequency hopping transmission with the mobile station on the m independent channels. Through dynamic random frequency hopping and time synchronization, the data transmission between the reference station and the mobile station is avoided from being disturbed, thereby ensuring efficient and reliable frequency hopping communication.
[0059] For ease of understanding, please refer to Figure 1 , Figure 1is a system architecture diagram of a frequency hopping communication system provided by an embodiment of the present application. The frequency hopping communication system includes a reference station and a mobile station. After frequency matching, the reference station and the mobile station can perform data frequency modulation transmission.
[0060] The reference station is a leading party of communication, and m independent channels in a target frequency band can be preconfigured. The residence time of each channel is T, where m is an integer greater than 1. Then, a random frequency hopping sequence is generated based on a pairing code shared with the mobile station, and the target channel is jumped according to the frequency hopping sequence. A data packet containing a network identifier associated with the pairing code is sent within the residence time. After receiving the frequency matching confirmation message from the mobile station, a synchronization instruction containing the frequency hopping sequence is issued to lead the subsequent data frequency hopping transmission process. The pairing code can be a LoRa pairing code, which is not limited here.
[0061] The mobile station is a responding party of communication, and can preacquire a pairing code shared with the reference station, and continuously listen to each channel for at least KxT time on m independent channels in the target frequency band, where m is an integer greater than 1, T is the residence time of the channel, and K is an integer greater than m to ensure that the complete frequency hopping period is covered. Then, the received data packet is analyzed, and when the network identifier matches the pairing code, the reference station is sent a frequency matching confirmation. After receiving the synchronization instruction, the mobile station keeps the channel switching pace consistent with the reference station based on the frequency hopping sequence, so as to perform data frequency hopping transmission.
[0062] It can be seen that the identity authentication between the reference station and the mobile station is completed through the shared pairing code, and the frequency hopping sequence is generated based on the pairing code, which can effectively resist illegal intrusion and data interception. At the same time, the frequency hopping sequence is jumped among multiple independent channels, and the overall communication is not affected when a single channel is interfered, which can greatly reduce the interference influence. The reference station leads the synchronization, and the frequency hopping sequence is issued to realize precise cooperation with the mobile station. The number of channels and the residence time can be adjusted to adapt to different scenarios, so as to support multi-node distributed communication and meet the full-scene coverage demand.
[0063] The following will be described in combination with Figure 2 The electronic device in the embodiments of the present application is described, Figure 2 is a structural schematic diagram of an electronic device provided by an embodiment of the present application, as Figure 2 shown, the electronic device includes one or more processors, a memory, a communication interface, and one or more programs. The processor is in communication connection with the memory and the communication interface through an internal communication bus.
[0064] The one or more programs are stored in the above-mentioned memory and are configured to be executed by the above-mentioned processor. The one or more programs include instructions for executing any step in the above-mentioned method embodiments.
[0065] The processor can be a Central Processing Unit (CPU), a general-purpose processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It can implement or execute various exemplary logical blocks, units, and circuits described in conjunction with the disclosure. The processor can also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication unit can be a communication interface, a transceiver, a transceiver circuit, and the like, and the storage unit can be a memory.
[0066] The memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0067] It can be understood that the electronic device can include more or fewer structural elements than the above structural block diagram, for example, including a power module, a physical key, a Wi-Fi module, a speaker, a Bluetooth module, a sensor, a display module, etc., which are not limited herein. It can be understood that the electronic device can be equipped with the system architecture described above, and the electronic device can be a device using LoRa communication. Figure 1 The system architecture described above, and the electronic device can be a device using LoRa communication.
[0068] For ease of understanding, please refer to Figure 3 , Figure 3 is an application scenario of frequency hopping communication applied to an intelligent mower provided by an embodiment of the present application, wherein the reference station can perform frequency hopping communication with the mower through a wireless signal, is responsible for planning tasks, synchronizing channels, and monitoring states. The mobile station can be an intelligent mower, which moves and mows autonomously by receiving instructions from the reference station, and feeds back position, power and other data in real time. Among them, the reference station can pre-store a mowing area map (including boundaries, obstacles), and issue path planning, obstacle avoidance parameters and other instructions to the mobile station (such as an intelligent mower) through the frequency hopping communication mode; the mobile station can feed back state data while working, and both sides cooperate to complete the automatic mowing task.
[0069] After understanding the software and hardware architecture of the present application, the following will be described in combination with Figure 4 A frequency hopping communication method based on LoRa in an embodiment of the present application will be described, Figure 4 is a flowchart of a frequency hopping communication method based on LoRa provided by an embodiment of the present application, applied to a reference station, and specifically comprising the following steps:
[0070] Step S401, configured to work on m independent channels of a target frequency band, and the residence time of each channel is T.
[0071] Wherein, m is an integer greater than 1, m independent channels can be divided in the target frequency band, and the reference station is configured to work on the m independent channels. The reference station will not be fixed on a single channel when communicating, but will switch regularly among the m channels. At the same time, the time of staying on each channel is uniformly T (such as 200 milliseconds), so as to ensure that the reference station and the mobile station have sufficient time to complete data transmission after jumping to the next channel.
[0072] For ease of understanding, please refer to Figure 5 , Figure 5 is a flowchart of channel division provided by an embodiment of the present application, wherein before the configuration of working on m independent channels of a target frequency band, the method further comprises:
[0073] A1, determining the target bandwidth of the reference station;
[0074] A2, determining a channel number according to the frequency range of the target frequency band and the target bandwidth;
[0075] A3, dividing the target frequency band according to the target bandwidth and the channel number to obtain the m independent channels.
[0076] In specific embodiments, first, the transmission demand parameter of the reference station can be obtained, which is a key basis for balancing bandwidth size and transmission performance, such as data transmission rate requirement, anti-interference ability requirement, time delay sensitivity, etc., which is not specifically limited here. For example, high-speed transmission (such as video data) may require a larger bandwidth, while low-speed transmission (such as sensor data) can use a smaller bandwidth. Then, the target bandwidth of the reference station is determined according to the transmission demand parameter, for example, if the transmission demand of the reference station is mainly high-definition video, i.e. the transmission demand parameter is high-speed transmission, the target bandwidth can be set to 20MHz; if it is only used for low-speed Internet of Things communication, i.e. the transmission demand parameter is low-speed transmission, the target bandwidth can be set to 2MHz.
[0077] Then, the frequency range of the target frequency band is determined, for example, the target frequency band can be 868 frequency band, and the frequency range of the target frequency band is 863MHz-870MHz, which is not specifically limited here. Then, the number of channels that can be divided is calculated according to the frequency range of the target frequency band and the target bandwidth, i.e. the total width of the frequency range is divided by the target bandwidth of a single channel to obtain the number of channels. It should be noted that if it cannot be divided, the bandwidth of the last channel may need to be adjusted to ensure that all channels fill the entire frequency range.
[0078] Finally, starting from the starting frequency of the frequency range, the target bandwidth and the channel number are sequentially divided to obtain m independent channels. For example, the target bandwidth is 250kHz, the channel number is 28, and the target frequency band is 863MHz-870MHz, then starting from 863MHz, the first channel is 863.000MHz-863.250MHz, and the second channel is 863.250MHz-863.500MHz. Until the target frequency band is completely divided, 28 independent channels that do not overlap each other are finally obtained. In addition, the 868 frequency band can be divided into 28 channels according to the target bandwidth of 125KHz, wherein the bandwidth of 125KHz can be used as a protection bandwidth to prevent signal interference between adjacent channels, i.e. each channel includes a target bandwidth of 125KHz and a protection bandwidth of 125KHz, which is not specifically limited here.
[0079] It can be seen that by dividing the target frequency band into m independent channels, the probability of being interrupted or having an error code can be greatly reduced by quickly switching channels during communication to avoid the device staying in the same channel for a long time. At the same time, through the division of multiple channels, not only is the waste of resources caused by a too wide channel avoided, but also more devices are supported to access in parallel.
[0080] In step S402, a random frequency hopping sequence is generated according to a pairing code shared with the flow station.
[0081] In step S402, a random frequency hopping sequence is generated according to a pairing code shared with the flow station.
[0082] B1, converting the pairing code into a byte stream;
[0083] B2, performing hash processing on the byte stream to obtain a hash value;
[0084] B3, determining a random number according to the hash value;
[0085] B4, mapping the random number to the m independent channels to obtain the frequency hopping sequence.
[0086] In specific embodiments, first, each character of the pairing code can be mapped to the corresponding byte according to a predetermined encoding rule (such as UTF-8, ASCII). For example, the character "A" corresponds to the byte 0x41 (binary 01000001) in ASCII, and the string "AB" is converted into the byte stream [0x41, 0x42]. The pairing code is a key (such as a string, a combination of numbers, or a mixed sequence) that is previously agreed upon and shared by both parties, which is not specifically limited here.
[0087] Then, the byte stream is calculated by a predetermined hash algorithm (such as SHA-1, SHA-256, etc. Hash function), and through complex mathematical operations, any length of byte stream is converted into a fixed length output to obtain a fixed length hash value. Then, the hash value is converted into a random number that meets the frequency hopping requirements to serve as the basis for the frequency hopping sequence. The binary number of the hash value can be directly converted into a decimal integer, or the hash value can be divided into multiple subsequences of a fixed length, and the multiple subsequences can be converted into corresponding integers, which is not specifically limited here. For example, the pairing code can be used to generate a SHA-256 hash value, which is then converted to obtain a random arrangement of 0-27.
[0088] Finally, the random number is one-to-one corresponding to the m independent channels divided in advance to generate the frequency hopping sequence. For example, if the random number is 5, it corresponds to the 6th channel (assuming the channel number starts from 0); the sequence corresponding to the random number is [3, 15, 7, 22], and the frequency hopping sequence is "channel 4, channel 16, channel 8, channel 23".
[0089] It can be seen that the reference station and the mobile station generate the same frequency hopping sequence based on the same pairing code, to ensure that both sides switch to the same channel at the same time, avoiding communication interruption caused by asynchronous frequency hopping. At the same time, the frequency hopping sequence has randomness, which can make both sides quickly switch between multiple channels, avoiding long stay in the disturbed channel.
[0090] In step S403, the target channel is jumped to according to the frequency hopping sequence, and a data packet containing a network identifier is sent within the residence time.
[0091] The network identifier is associated with the pairing code. The reference station can sequentially reside in each channel according to the frequency hopping sequence, and send a data packet containing a network identifier within the residence time, and jump to the next target channel at the end of each residence time. The network identifier represents a code (such as a string, a sequence of numbers) that uniquely identifies a communication network or a group of devices, used to distinguish different communication systems (to avoid interference between different networks in the same frequency band). The network identifier is usually generated based on the pairing code (for example, the partial interception, hash processing of the pairing code, or directly taking the first few bits of the hash value of the pairing code as the network identifier), to ensure that only devices with the same pairing code can identify and parse data packets containing the network identifier, and non-associated devices will ignore the data packet, improving the privacy of data communication.
[0092] The target channel is jumped to according to the frequency hopping sequence, and the specific steps include:
[0093] C1, performing channel idle assessment on the reference channel corresponding to the frequency hopping sequence;
[0094] C2, if the reference channel is in an idle state, determining the reference channel as the target channel.
[0095] In specific embodiments, first, the reference station obtains the current reference channel to be used from the frequency hopping sequence, and the reference station starts the channel idle assessment (CCA) process before sending data, to detect the received signal strength indicator (RSSI) value of the reference channel in real time. Then, the RSSI threshold can be set to -120dBm, or the RSSI threshold can be adjusted based on the environmental noise level and communication sensitivity, to ensure that the idle and occupied states of the channel can be effectively distinguished.
[0096] Then, if the RSSI value of the reference channel is continuously detected to be lower than -120dBm (e.g., 5 consecutive sampling points meet the condition), it is determined that the reference channel is in an idle state, the reference station determines it as a target channel, normally switches to this channel and sends a data packet. If the RSSI value of the reference channel is higher than or equal to -120dBm (indicating that the reference channel may be occupied by other devices or there is strong interference), the channel switching mechanism is triggered: the reference station immediately skips the current reference channel and switches to the next channel according to the frequency hopping sequence, and re-executes the CCA detection process for the new channel until an idle channel that meets the RSSI threshold requirement is found as the target channel.
[0097] It can be seen that through real-time RSSI dynamic detection and channel rapid switching, the occupied or interfered channel can be effectively avoided, and the anti-interference ability and transmission reliability of frequency hopping communication can be significantly improved, which is especially suitable for complex electromagnetic environment scenarios.
[0098] Step S404, receiving the frequency confirmation message fed back by the flow station.
[0099] The frequency confirmation message is sent by the flow station after listening to the data packet and verifying that the network identifier matches. The reference station listens to the frequency confirmation message on the corresponding channel of the frequency hopping sequence (consistent with the channel of sending the data packet, or the next synchronization channel according to the protocol agreement), until the frequency confirmation message fed back by the flow station is received.
[0100] Step S405, in response to the frequency confirmation message, issuing a synchronization instruction containing the frequency hopping sequence to the flow station.
[0101] After the reference station receives the frequency confirmation message in the channel, it responds to the frequency confirmation message and sends a synchronization instruction containing the frequency hopping sequence to the flow station in the channel, and uses the synchronization window period (200ms residence time) of the current channel to ensure that the flow station can receive.
[0102] The synchronization instruction contains a clock compensation parameter, and the method further comprises:
[0103] D1, recording a first timestamp when sending the data packet, and receiving a second timestamp fed back by the flow station; the second timestamp is a timestamp recorded when the flow station triggers an interrupt when receiving the data packet;
[0104] D2, determining the transmission delay between the reference station and the flow station;
[0105] D3, calculating the clock deviation according to the first timestamp, the second timestamp and the transmission delay;
[0106] D4, converting the clock deviation into the clock compensation parameter.
[0107] In a specific embodiment, first, the reference station synchronously records the current time of the local clock when sending a data packet (such as a broadcast beacon containing network identification) to the mobile station, obtaining a first timestamp. When the mobile station receives the data packet, a hardware interrupt (to ensure the accuracy of time recording) is triggered, and the current time of the local clock of the mobile station is recorded, obtaining a second timestamp. The reference station can determine the second timestamp according to the feedback frequency confirmation message from the mobile station when receiving the feedback frequency confirmation message.
[0108] Next, the transmission delay can be determined according to the time consumed by the data packet from the reference station to the mobile station. Then, the clock deviation is calculated according to the first timestamp, the second timestamp, and the transmission delay. The clock deviation = second timestamp - (first timestamp + transmission delay).
[0109] Finally, the clock deviation is converted into a clock compensation parameter, which represents specific instructions for correcting the clock deviation of the mobile station, such as "trigger 0.002 ms in advance next time frequency hopping", which is not limited here. If the clock deviation is positive (the mobile station clock is fast), the clock compensation parameter is "reduce the time corresponding to the clock deviation" (such as subtracting 0.002 ms when the mobile station calculates the next frequency hopping time); if the clock deviation is negative (the mobile station clock is slow), the clock compensation parameter is "increase the time corresponding to the clock deviation".
[0110] It should be noted that there is an inherent deviation between the local clocks of the reference station and the mobile station. If not calibrated, the frequency hopping switching time of both sides will gradually misalign (such as the reference station hopping 10 ms in advance at the 100th residence time point, and the mobile station lagging 10 ms) over time, eventually leading to communication interruption. The clock compensation parameter can be used to calculate a correction value based on the clock deviation of both sides, so that the mobile station can calibrate the local clock according to the correction value to ensure that the frequency hopping rhythm of the reference station and the mobile station is consistent in the long run.
[0111] As can be seen, through the clock compensation parameter, the mobile station can calibrate the local clock in real time to ensure that the time of each frequency hopping switching of both sides is completely consistent, avoiding channel misalignment caused by clock deviation accumulation. Without frequently sending full-amount time synchronization signals, only by issuing a compensation parameter once, the mobile station can independently correct the clock, reduce communication overhead, and adapt to low-power scenarios.
[0112] In one possible embodiment, when sending the data packet, an interrupt is triggered through the physical layer characteristic signal of the data packet to record the first timestamp; after receiving the second timestamp fed back by the mobile station, the method further comprises: performing time synchronization between the reference station and the mobile station based on the first timestamp and the second timestamp.
[0113] Specifically, the physical layer characteristic signal of the data packet can be a preamble (such as a fixed sequence detected by an LLCC68 chip) or a synchronization header, which has the characteristics of fixed structure and easy identification, and is the first part perceived by the receiver in the communication signal. When the reference station transmits the data packet, the moment when the physical layer characteristic signal (such as the preamble) starts to be transmitted will directly trigger a hardware interrupt: for the sender, the radio frequency chip (such as the LLCC68 chip) of the reference station will output a level jump (from low to high) through a dedicated pin (such as DIO) at the moment when the preamble signal is generated, which is directly connected to the external interrupt pin of the microcontroller unit (MCU); the MCU immediately reads the current value of its high-precision timer (such as the microsecond counter) in the interrupt response, and records it as the first timestamp.
[0114] After receiving the second timestamp fed back by the mobile station, the time synchronization between the reference station and the mobile station is performed based on the first timestamp and the second timestamp. Wherein, the clock compensation parameter can be calculated according to the first timestamp and the second timestamp, the reference station can send the clock compensation parameter to the mobile station through the synchronization instruction, and the mobile station can adjust its corresponding local timer according to the clock compensation parameter to align the clock with the reference station, so as to complete the time synchronization between the reference station and the mobile station. It should be noted that if the mobile station cannot directly modify the clock (such as hardware limitation), the reference station can send the next data packet in advance or delay according to the clock compensation parameter, so as to offset the clock deviation between the two parties (such as the mobile station clock is 2us faster, and the reference station delays 2us to send the next signal).
[0115] It can be seen that through the time synchronization between the reference station and the mobile station, the clock deviation between the two parties can be controlled within microseconds, ensuring the accurate alignment of the frequency hopping switching moment (such as the end of 200ms residence time), and avoiding the failure of channel switching caused by time misalignment.
[0116] Step S406, based on the synchronization instruction, performing data frequency hopping transmission with the mobile station on the m independent channels.
[0117] Wherein, the data frequency hopping transmission with the mobile station on the m independent channels based on the synchronization instruction includes the following specific steps:
[0118] E1, calibrating data transmission timing based on the clock compensation parameter;
[0119] E2, performing data frequency hopping transmission with the mobile station on the channels of the frequency hopping sequence according to the data transmission timing.
[0120] In a specific embodiment, first, the reference station and the mobile station correct the local high-precision timers according to the clock compensation parameters in the synchronization instruction. For example, if the clock compensation parameters show that the clock of the mobile station is 5 microseconds faster than the clock of the reference station, the mobile station will subtract 5 microseconds from the timer count to ensure time synchronization between the two parties. Then, the frequency hopping switching time of each channel is recalculated based on the clock compensation parameters to obtain the calibrated data transmission timing. For example, for the switching of "channel 1 to channel 2" in the frequency hopping sequence, the original plan is to execute at time T1 of the reference station. After calibration, the switching time of the mobile station is strictly aligned with time T1 to avoid misalignment caused by clock deviation, such as "one party has switched to channel 2, and the other party is still waiting in channel 1".
[0121] Next, the use duration of each channel is determined according to the data transmission timing. For example, time slot 1 (0-10 ms) corresponds to the first channel of the frequency hopping sequence, and time slot 2 (10-20 ms) corresponds to the second channel of the frequency hopping sequence. At the start of the time slot, the reference station and the mobile station simultaneously switch from the current channel to the next channel indicated by the frequency hopping sequence. The switching speed of the channel needs to be faster than the time slot interval to avoid occupying the effective transmission time. After the switching is completed, the reference station immediately sends a data packet on the channel, and the transmission duration needs to be less than the time slot. The mobile station can switch to the same channel at the same time based on the same data transmission timing and frequency hopping sequence, open the receiving window, and demodulate, decode, and check the received data packet. If the check passes, the data of the buffered data packet is stored; if it fails, the error position is recorded for subsequent retransmission. Before the end of the time slot, the reference station and the mobile station close the transceiver link of the current channel and prepare to switch to the next channel according to the frequency hopping sequence to enter the transmission process of the next time slot.
[0122] As can be seen, by synchronizing the timing and channel hopping of the reference station and the mobile station, the influence of fixed channel interference can be significantly reduced. For example, when a certain channel is interfered, only the data in that channel is affected, and communication can be restored by subsequent frequency hopping to other channels.
[0123] For ease of understanding, please refer to Figure 6 , Figure 6 is a flowchart of another LoRa-based frequency hopping communication method provided by the embodiment of the present application, which is applied to a mobile station and specifically includes the following steps:
[0124] Step S601: Obtain a pairing code shared with a reference station.
[0125] Specifically, during the device deployment stage of the reference station and the mobile station, the same pairing code (which can be a string of numbers, characters or encryption keys, such as "FH-2024-007") can be written into the local database of the mobile station and the reference station through a physical interface or a local configuration tool, where the pairing code can be a LoRa pairing code, which is not limited here. A one-time pairing code can also be generated by a trusted third party (such as the control center corresponding to the reference station and the mobile station), and then sent to the reference station and the mobile station, respectively. After receiving, the reference station and the mobile station decrypt and verify the integrity of the one-time pairing code, and store it in the local database after confirming that it is correct.
[0126] Step S602: Continuously listening to each channel for at least KxT time on m independent channels of the target frequency band, where m is an integer greater than 1, T is the dwell time of the channel, and K is an integer greater than m.
[0127] Specifically, the mobile station sequentially listens to each channel on m independent channels of the target frequency band, and continuously listens to each channel for at least KxT time, where m is an integer greater than 1, T is the dwell time of the channel, and K is an integer greater than m. For example, when m is 28, K can be 29, i.e. the listening time is 29 dwell times, and when the dwell time T = 200 milliseconds, the listening time is 5.8 seconds. By listening to each channel for at least KxT time, and K is greater than m, to ensure that the listening time of a single channel is long enough (covering multiple transmission periods) to avoid missing detection due to the misalignment of the reference station signal transmission timing and the mobile station scanning rhythm; at the same time, traversing m independent channels ensures that the reference station signal can be captured on any possible channel before the frequency hopping sequence is synchronized, laying a foundation for subsequent pairing and synchronization.
[0128] Step S603: Analyzing the received data packet during the listening process.
[0129] Wherein, the analyzing the received data packet during the listening process, the specific steps include:
[0130] F1, determining the current listening channel in the m independent channels;
[0131] F2, if the data packet is received during the listening process of the current listening channel, the data packet is analyzed to obtain the network identifier;
[0132] F3, if the data packet is not received during the listening process of the current listening channel, jump to the next channel for listening.
[0133] In a specific embodiment, first, the mobile station locks the current channel to be monitored in the scanning order from the m independent channels, to obtain the current monitoring channel. Then, if a signal meeting the physical layer characteristics is detected within the monitoring process of the current monitoring channel (at least KxT duration), the data packet receiving process can be started until the data packet is completely received. Then, the data packet is subjected to integrity verification, if the verification fails (such as signal interference leading to data error), the data packet is discarded, and the monitoring continues; if the verification succeeds, the network identifier in the data packet (which is usually encrypted or encoded) is parsed. For example, the parsed network identifier is "LoRa-Net-001", which is temporarily stored in a temporary buffer area for subsequent matching verification with the pairing code. If no signal meeting the physical layer characteristics is detected within the monitoring process of the current monitoring channel, or the received signal is all invalid data packets, the mobile station determines that the current channel has no valid data, and immediately jumps to the next channel to continue monitoring.
[0134] Step S604, when the network identifier contained in the parsed data packet matches the pairing code, a frequency confirmation message is sent to the reference station.
[0135] Specifically, when the mobile station monitors the data packet, it will parse and extract the network identifier contained therein, and compare it with the shared pairing code: if the two match, it is confirmed that the sender is a legal associated device (i.e. the reference station holding the same pairing code). If the two do not match, it is determined to be an unrelated signal (such as data packets of other networks or interference signals), which is directly discarded without further processing. Then, when the network identifier verification is passed, the mobile station automatically generates a frequency confirmation message and sends it to the reference station within the same residence time (or according to the next channel agreed by the protocol). The frequency confirmation message includes but is not limited to device identifier, confirmation status and current frequency hopping progress, which is not limited here.
[0136] Step S605, receiving the synchronization instruction containing the frequency hopping sequence issued by the reference station.
[0137] Specifically, after the mobile station sends the frequency confirmation message to the reference station, it does not immediately switch channels, but remains in the current monitoring channel, waiting for the synchronization instruction containing the frequency hopping sequence issued by the reference station, until the synchronization instruction is received.
[0138] Step S606, based on the synchronization instruction, the data frequency hopping transmission with the reference station on the m independent channels.
[0139] Specifically, the mobile station extracts key parameters from the synchronization instruction and completes initialization, wherein the key parameters include but are not limited to frequency hopping sequence, clock compensation parameters, data transmission timing, which are not limited here. Then, the mobile station performs channel switching according to the frequency hopping sequence, and performs time synchronization according to the clock compensation parameters. Finally, data frequency hopping transmission is performed with the reference station on the m independent channels.
[0140] It can be seen that by periodically switching between the m independent channels through the frequency hopping sequence, long-term residence on a single channel is avoided, which can effectively avoid narrowband interference and continuous co-frequency interference. The clock compensation parameters contained in the synchronization instruction can ensure that the channel switching time and data transmission window of the mobile station and the reference station are strictly synchronized, avoiding data packet loss caused by timing deviation.
[0141] The above mainly introduces the scheme of the embodiments of the present application from the perspective of the execution process of the method. It can be understood that the electronic device contains hardware structure and / or software module corresponding to the execution of each function in order to realize the above functions. Those skilled in the art should easily realize that the units and algorithm steps of each example described in connection with the embodiments provided herein can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0142] The embodiments of the present application can divide the functional units of the electronic device according to the above method examples, for example, each functional unit can be divided according to each function, or two or more functions can be integrated in one processing unit. The integrated unit can be realized in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division. Actual implementation can have another division method.
[0143] In the case of dividing each functional unit according to each function, Figure 7 is a functional unit composition block diagram of a LoRa-based frequency hopping communication device provided by the embodiments of the present application, applied to a reference station, and the LoRa-based frequency hopping communication device 700 includes:
[0144] The configuration unit 710 is configured to work on m independent channels of a target frequency band, and the residence time of each channel is a time length T, wherein m is an integer greater than 1;
[0145] The generation unit 720 is configured to generate a random frequency hopping sequence according to a pairing code shared with the mobile station;
[0146] The sending unit 730 is configured to hop to a target channel according to the frequency hopping sequence, and send a data packet containing a network identifier associated with the pairing code within a residence time.
[0147] The receiving unit 740 is configured to receive a frequency confirmation message fed back by the mobile station, the frequency confirmation message being sent by the mobile station after listening to the data packet and verifying that the network identifier matches.
[0148] The sending unit 730 is further configured to issue a synchronization instruction containing the frequency hopping sequence to the mobile station in response to the frequency confirmation message.
[0149] The communication unit 750 is configured to perform data frequency hopping transmission with the mobile station on the m independent channels based on the synchronization instruction.
[0150] Optionally, the synchronization instruction contains a clock compensation parameter, and the communication unit 750 is specifically configured to:
[0151] record a first timestamp when the data packet is sent, and receive a second timestamp fed back by the mobile station; the second timestamp is a timestamp recorded when the mobile station triggers an interrupt after receiving the data packet;
[0152] determine a transmission delay between the reference station and the mobile station;
[0153] calculate a clock deviation according to the first timestamp, the second timestamp, and the transmission delay;
[0154] convert the clock deviation into the clock compensation parameter.
[0155] Optionally, in the data frequency hopping transmission with the mobile station on the m independent channels based on the synchronization instruction, the communication unit 750 is further specifically configured to:
[0156] calibrate a data transmission timing based on the clock compensation parameter;
[0157] perform data frequency hopping transmission with the mobile station on the channels of the frequency hopping sequence according to the data transmission timing.
[0158] Optionally, in the recording of the first timestamp when the data packet is sent, the communication unit 750 is further specifically configured to:
[0159] trigger an interrupt through a physical layer feature signal of the data packet to record the first timestamp when the data packet is sent;
[0160] After the second timestamp fed back by the mobile station is received, the method further includes:
[0161] synchronize time between the reference station and the rover station based on the first timestamp and the second timestamp.
[0162] Optionally, before the configuration unit 710 is configured to work on the m independent channels of the target frequency band, the configuration unit 710 is specifically configured to:
[0163] determine a target bandwidth of the reference station;
[0164] determine a number of channels according to a frequency range of the target frequency band and the target bandwidth;
[0165] divide the target frequency band according to the target bandwidth and the number of channels to obtain the m independent channels.
[0166] Optionally, in the aspect of generating a random frequency hopping sequence according to a pairing code shared with the rover station, the generation unit 720 is specifically configured to:
[0167] convert the pairing code into a byte stream;
[0168] perform hash processing on the byte stream to obtain a hash value;
[0169] determine a random number according to the hash value;
[0170] map the random number to the m independent channels to obtain the frequency hopping sequence.
[0171] Optionally, in the aspect of hopping to a target channel according to the frequency hopping sequence, the sending unit 730 is specifically configured to:
[0172] perform channel idle assessment on a reference channel corresponding to the frequency hopping sequence;
[0173] if the reference channel is in an idle state, determine that the reference channel is the target channel.
[0174] It can be seen that, by means of dynamic random frequency hopping and time synchronization, data transmission between the reference station and the rover station is avoided from being interfered, thereby ensuring efficient and reliable frequency hopping communication.
[0175] It should be noted that the specific implementation of each operation can be implemented by means of the corresponding description of the above-mentioned method embodiments, and the LoRa-based frequency hopping communication device 700 can be used to execute the above-mentioned method embodiments of the present application, and therefore will not be described here.
[0176] In the case of dividing each functional unit according to each function, Figure 8is another function unit composition block diagram of a LoRa-based frequency hopping communication device provided by the embodiment of the application, applied to a flow station, the LoRa-based frequency hopping communication device 800 comprises:
[0177] The acquisition unit 810 is configured to acquire a pairing code shared with the reference station.
[0178] The monitoring unit 820 is configured to continuously monitor each channel for at least KxT duration on m independent channels of a target frequency band, wherein m is an integer greater than 1, T is the residence time of the channel, and K is an integer greater than m.
[0179] The analysis unit 830 is configured to analyze the received data packet during the monitoring process.
[0180] The sending unit 840 is configured to send a frequency confirmation message to the reference station when the network identifier contained in the analyzed data packet matches the pairing code.
[0181] The receiving unit 850 is configured to receive a synchronization instruction containing a frequency hopping sequence issued by the reference station.
[0182] The communication unit 860 is configured to perform data frequency hopping transmission with the reference station on the m independent channels based on the synchronization instruction.
[0183] Optionally, in terms of analyzing the received data packet during the monitoring process, the analysis unit 830 is specifically configured to:
[0184] Determine the current monitoring channel in the m independent channels;
[0185] If the data packet is received within the monitoring process of the current monitoring channel, the data packet is analyzed to obtain the network identifier;
[0186] If the data packet is not received within the monitoring process of the current monitoring channel, jump to the next channel for monitoring.
[0187] As can be seen, identity verification based on the shared pairing code prevents illegal devices from accessing, lays a foundation for subsequent communication encryption, and prevents malicious control or tampering with instructions. Through long duration monitoring of m channels, it is ensured that the reference station signal can be quickly captured in complex environments (obstruction, interference), and missed detection is avoided. Frequency hopping transmission based on the synchronization instruction dynamically switches between multiple channels, which can avoid electromagnetic noise, device conflict and other interference, and ensure stable data transmission. It can support multiple device parallel communication (through different frequency hopping sequences), and can dynamically adjust the channel strategy to improve spectrum utilization and operation continuity.
[0188] It should be noted that the specific implementation of each operation can be implemented by the corresponding description of the method embodiment shown above, and the LoRa-based frequency hopping communication device 800 can be used to perform the method embodiments of the present application, and details are not repeated.
[0189] The embodiments of the present application further provide a computer readable storage medium, wherein the computer readable storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute part or all of the steps of any method described in the above method embodiments, and the computer includes an electronic device.
[0190] The embodiments of the present application further provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any method described in the above method embodiments. The computer program product can be a software installation package, and the computer includes an electronic device.
[0191] It should be noted that, for the above-mentioned various embodiments, in order to simply describe, they are all expressed as a series of action combinations. Those skilled in the art should know that the present application is not limited to the order of the actions described, because some steps in the embodiments of the present application can be performed in other order or simultaneously. In addition, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions, steps, modules or units involved are not necessarily required in the embodiments of the present application.
[0192] In the above embodiments, the description of each embodiment of the present application has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0193] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by a computer program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. The program can include the processes of the above-mentioned method embodiments when executed. The storage medium described above includes ROM or random storage memory RAM, magnetic disk or optical disk and various program code storage media.
[0194] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disk, a removable media, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium can be integral to the processor. The processor and the storage medium can reside in an ASIC. Alternatively, the processor and the storage medium can be located in a terminal device or an access device. The processor and the storage medium can also be located in any other
[0195] Those skilled in the art should clearly understand that, in one or more examples described above, the functions described in the embodiments of the present application can be implemented entirely or partially by software, hardware, firmware, or any combination thereof. When implemented by software, the functions can be implemented in the form of a computer program product entirely or partially. The computer program product includes one or more computer instructions. When loaded and executed on a computer, the computer instructions entirely or partially generate the processes or functions described in the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer instructions can be transferred from one website, computer, server, or data center to another via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available media can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0196] The various modules / units included in the various devices and products described in the above embodiments can be software modules / units or hardware modules / units, or partially software modules / units and partially hardware modules / units. For example, for the various devices and products applied to or integrated into a chip, the various modules / units included therein can all be implemented in the form of hardware such as circuitry, or at least some of the modules / units can be implemented in the form of software programs running on a processor integrated in the chip, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuitry; for the various devices and products applied to or integrated into a chip module, the various modules / units included therein can all be implemented in the form of hardware such as circuitry, and different modules / units can be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the chip module, or at least some of the modules / units can be implemented in the form of software programs running on a processor integrated in the chip module, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuitry; for the various devices and products applied to or integrated into a terminal device, the various modules / units included therein can all be implemented in the form of hardware such as circuitry, and different modules / units can be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the terminal device, or at least some of the modules / units can be implemented in the form of software programs running on a processor integrated in the terminal device, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuitry.
[0197] The above detailed description of the specific embodiments of the present application has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the application to the precise form described, and many modifications, equivalents and alternatives shown. The detailed description is not intended to limit the scope of the present application. Instead, the scope of the present application is defined by the appended claims, reasonably construed in light of the prior art.
Claims
1. A LoRa-based frequency hopping communication method, characterized in that, The method applied to a reference station comprises: being configured to work on m independent channels of a target frequency band, each channel having a residence time of a time length T, wherein m is an integer greater than 1; generating a random frequency hopping sequence according to a pairing code shared with a rover station; hopping to a target channel according to the frequency hopping sequence and sending a data packet containing a network identifier within the residence time, the network identifier being associated with the pairing code; receiving a frequency confirmation message fed back by the rover station, the frequency confirmation message being sent by the rover station after listening to the data packet and verifying that the network identifier matches; in response to the frequency confirmation message, issuing a synchronization instruction containing the frequency hopping sequence to the rover station; based on the synchronization instruction, performing data frequency hopping transmission with the rover station on the m independent channels.
2. The method of claim 1, wherein, The synchronization instruction contains a clock compensation parameter, and the method further comprises: recording a first timestamp when the data packet is sent, and receiving a second timestamp fed back by the rover station; the second timestamp is a timestamp recorded when the rover station triggers an interrupt after receiving the data packet; determining the transmission delay between the reference station and the rover station; calculating the clock deviation according to the first timestamp, the second timestamp and the transmission delay; converting the clock deviation into the clock compensation parameter.
3. The method of claim 2, wherein, Based on the synchronization instruction, the data frequency hopping transmission with the rover station on the m independent channels comprises: calibrating the data transmission timing based on the clock compensation parameter; performing data frequency hopping transmission with the rover station on the channels of the frequency hopping sequence according to the data transmission timing.
4. The method of claim 2, wherein, The recording of the first timestamp when the data packet is sent comprises: triggering an interrupt by a physical layer feature signal of the data packet when the data packet is sent, and recording the first timestamp; After receiving the second timestamp fed back by the rover station, the method further comprises: performing time synchronization between the reference station and the rover station based on the first timestamp and the second timestamp.
5. The method of claim 1, wherein, Before the configuration to work on m independent channels of a target frequency band, the method further comprises: determining the target bandwidth of the reference station; determining the number of channels according to the frequency range of the target frequency band and the target bandwidth; dividing the target frequency band according to the target bandwidth and the number of channels to obtain the m independent channels.
6. The method of claim 5, wherein, The generation of a random frequency hopping sequence according to a pairing code shared with a rover station comprises: converting the pairing code into a byte stream; hash processing the byte stream to obtain a hash value; determining a random number according to the hash value; mapping the random number to the m independent channels to obtain the frequency hopping sequence.
7. The method of claim 5, wherein, The hopping to a target channel according to the frequency hopping sequence comprises: performing channel idle evaluation on a reference channel corresponding to the frequency hopping sequence; if the reference channel is in an idle state, determining the reference channel as the target channel. 8.A LoRa-based frequency hopping communication method, characterized in that, Applied to a rover station, comprising: obtaining a pairing code shared with a reference station; Consecutively listen to each of the m independent channels in the target frequency band for at least K×T, where m is an integer greater than 1, T is the residence time of the channel, and K is an integer greater than m; Parse the received data packet during the listening process; When the network identifier contained in the parsed data packet matches the pairing code, send a frequency confirmation message to the reference station; Receive the synchronization instruction containing the frequency hopping sequence issued by the reference station; Based on the synchronization instruction, perform data frequency hopping transmission with the reference station on the m independent channels.
9. The method of claim 8, wherein, The parsing of the received data packet during the listening process includes: Determine the current listening channel in the m independent channels; If the data packet is received during the listening process of the current listening channel, parse the data packet to obtain the network identifier; If the data packet is not received during the listening process of the current listening channel, jump to the next channel for listening. 10.A LoRa-based frequency hopping communication device, characterized in that, Applied to the reference station, the device includes: A configuration unit configured to work on m independent channels in a target frequency band, with a residence time of T for each channel, where m is an integer greater than 1; A generation unit configured to generate a random frequency hopping sequence based on a pairing code shared with the mobile station; A sending unit configured to jump to a target channel according to the frequency hopping sequence and send a data packet containing a network identifier within the residence time, the network identifier being associated with the pairing code; A receiving unit configured to receive a frequency confirmation message fed back by the mobile station, the frequency confirmation message being sent by the mobile station after listening to the data packet and verifying that the network identifier matches; The sending unit is also configured to issue a synchronization instruction containing the frequency hopping sequence to the mobile station in response to the frequency confirmation message; A communication unit configured to perform data frequency hopping transmission with the mobile station on the m independent channels based on the synchronization instruction. 11.A LoRa-based frequency hopping communication device, characterized in that, Applied to the mobile station, the device includes: An acquisition unit configured to acquire a pairing code shared with the reference station; A listening unit configured to consecutively listen to each of the m independent channels in the target frequency band for at least K×T, where m is an integer greater than 1, T is the residence time of the channel, and K is an integer greater than m; A parsing unit configured to parse the received data packet during the listening process; A sending unit configured to send a frequency confirmation message to the reference station when the network identifier contained in the parsed data packet matches the pairing code; A receiving unit configured to receive the synchronization instruction containing the frequency hopping sequence issued by the reference station; A communication unit configured to perform data frequency hopping transmission with the reference station on the m independent channels based on the synchronization instruction.
12. An electronic device, comprising: It includes: A processor, a memory, a communication interface, and one or more programs; The one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for performing the steps in the method of any one of claims 1-9.
13. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, the computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1-9.
Citation Information
Cited By
Wireless communication anti-interference method of avionics system
CN121218367A
Wireless radio frequency channel conflict avoidance method applied to fault indicator
CN121815447A
A wireless frequency hopping communication method based on Lora technology
CN122475724A