Anti-interference random sequence frequency hopping and frequency synchronization method, system and storage medium
By using high random pseudo-random sequences and pseudo-random numbers in frequency hopping communication, uniformly selecting frequency points and dynamically adjusting the frequency hopping time interval, the problem of difficulty in taking into account both anti-interference and communication bandwidth stability in the prior art is solved, and a high stability and anti-interference frequency hopping communication is achieved.
Patent Information
- Application Number
- CN202510368965.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-03-27
AI Technical Summary
The existing frequency hopping communication methods are difficult to ensure both anti-interference and stability of communication bandwidth, especially in complex radio environments.
Using a pseudo-random sequence and pseudo-random number with high randomness and uniqueness, the frequency hopping points are uniformly selected, the signal energy is dispersed, and the frequency hopping time interval is dynamically adjusted to achieve frequency hopping and frequency synchronization of the link.
It improves the stability of communication bandwidth, reduces interference to other devices, enhances anti-interference ability and the difficulty of signal interception and cracking, and is suitable for almost any wireless communication scenario.
Smart Images

Figure CN119892149B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technologies, and specifically relates to an anti-interference random sequence frequency hopping and frequency synchronization method, system, and storage medium. Background Art
[0002] Frequency hopping communication technology refers to a communication method in which the carrier frequencies of the transmitted and received signals are controlled by a pseudo-random code and discretely change according to a predetermined rule. With the development of unmanned aerial vehicle (UAV) technology, currently, frequency hopping communication technology is also adopted between the ground receiving end (i.e., the transmitting end) and the sky end (i.e., the receiving end) of UAVs.
[0003] Currently, the two main frequency hopping communication methods are as follows: 1) Before communication, traverse the signal strengths of a fixed signal list and select the optimal signal for communication at a fixed frequency point. This method needs to interrupt the communication link when traversing the channels, has poor real-time performance, and the risk of being interfered with during fixed-channel communication is relatively high. 2) Set thresholds such as signal quality and strength during communication. When the thresholds are exceeded, perform a quick exploratory frequency hop to other frequency points in the pre-stored frequency points, and perform a frequency hop operation when a better frequency point is detected. This method has better anti-interference performance and real-time performance, but still has many deficiencies. For example, it is difficult to define the thresholds, there are many unknown scenarios, and for scenarios not considered, there are potential risks such as communication disconnection; the real-time performance of frequency hopping is insufficient, and there is a lag in switching to a better frequency point, resulting in an inability to continuously ensure a high-level and stable communication bandwidth, especially in a complex radio environment such as an urban area, where the bandwidth fluctuates greatly.
[0004] Neither of the above solutions can ensure both anti-interference performance and the stability of the communication bandwidth. Therefore, it is necessary to provide an anti-interference random sequence frequency hopping and frequency synchronization method, system, and storage medium to solve the above-mentioned technical problems. Summary of the Invention
[0005] To solve the above technical problems, this application proposes an anti-interference random sequence frequency hopping and frequency synchronization method, system, and storage medium.
[0006] According to the first aspect of this application, an anti-interference random sequence frequency hopping and frequency synchronization method for communication between a master node and a slave node is proposed, including:
[0007] Obtain the communication frequency band between the master node and the slave node, divide it into N intervals, select a frequency point in each interval using a pseudo-random sequence, and generate a mapping table containing N frequency points, where N is an integer greater than 2;
[0008] The master node randomly selects a frequency point from the mapping table and uses a first frequency f mPerform frequency hopping communication. The slave node randomly selects a frequency point from the mapping table and uses the second frequency f s Perform frequency hopping communication until a link communication connection is established between the master node and the slave node, where f s =N×f m ;
[0009] In response to the establishment of a link communication connection between the master node and the slave node, the master node sends the data frame of this period to the slave node, and the slave node parses the data frame to complete time synchronization;
[0010] Set the frequency hopping time interval, start the timer to count at each frequency hopping, and start the next frequency hopping when the timer counting is completed;
[0011] Use a pseudo-random number to index the target frequency point for the next frequency hopping from the mapping table, and implement frequency hopping and frequency synchronization of the link according to the target frequency point.
[0012] Preferably, the master node includes a microcontroller. The generation process of the pseudo-random sequence includes:
[0013] Use a high-precision timestamp to fuse the unique identifier UID of the microcontroller to generate a random number seed;
[0014] Based on the random number seed, use a random number generator to generate the pseudo-random sequence;
[0015] Among them, the precision of the high-precision timestamp is at the microsecond level.
[0016] Preferably, the timer includes a main timer and an auxiliary timer. The setting of the frequency hopping time interval, starting the timer to count at each frequency hopping, and starting the next frequency hopping when the timer counting is completed includes:
[0017] Set the frequency hopping time interval, and use the main timer and the auxiliary timer to perform frequency hopping interval counting simultaneously at each frequency hopping;
[0018] When the counting interval of the main timer reaches in the current period, perform a remainder operation on the count value of the auxiliary timer in the current period and its counting interval in one period;
[0019] If the remainder result is not 0, compensate and correct the counting interval of the main timer in the current period or the next period according to the remainder result;
[0020] Start the next frequency hopping when the main timer counting is completed;
[0021] Among them, the precision of the main timer is higher than that of the auxiliary timer.
[0022] Preferably, the generation process of the pseudo-random number includes:
[0023] Performing a modulo operation on the timestamp of the auxiliary timer and a preset random seed to obtain the pseudo-random number, where the preset random seed is a positive integer between [2, N].
[0024] Preferably, when the number of frequency points N included in the mapping table is a multiple of ten, the value of the preset random seed is N - 1.
[0025] Preferably, the master node sends the data frame of the current period to the slave node, and the slave node parses the data frame to complete time synchronization, including:
[0026] The master node inserts the timestamp of the master node into the first K bytes of the data frame, where K is a positive integer ≥ 3;
[0027] Recording the transmission time of the data frame between the master node and the slave node;
[0028] The slave node receives the data frame and parses the timestamp of the master node, and synchronizes the local timestamp according to the timestamp of the master node and the transmission time of the data frame.
[0029] According to the second aspect of the present application, an anti-interference random sequence hopping and frequency synchronization system is proposed, including a master node and a slave node, where the master node and the slave node are used to execute the anti-interference random sequence hopping and frequency synchronization method provided in any implementation manner of the first aspect above, to form a wireless communication link.
[0030] Preferably, the master node is a drone remote controller, and the slave node is a drone sky end.
[0031] According to the third aspect of the present application, an electronic device is proposed, including: one or more processors; a memory for storing one or more programs, when the one or more programs are executed by the one or more processors, enabling the electronic device to implement the anti-interference random sequence hopping and frequency synchronization method provided in any implementation manner of the first aspect above.
[0032] According to the fourth aspect of the present application, a computer-readable storage medium is proposed, on which a computer program is stored, and when the program is executed by a processor, it implements the anti-interference random sequence hopping and frequency synchronization method provided in any implementation manner of the first aspect above.
[0033] The present application proposes an anti-interference random sequence frequency hopping and frequency synchronization method, system and storage medium. By adopting mechanisms such as pseudo-random sequences and pseudo-random numbers with high randomness and uniqueness, dynamic adjustment of frequency hopping time intervals, and timestamp synchronization, it is not necessary to define a frequency hopping threshold, uniformly select frequency points, disperse the signal energy through frequency hopping, which not only improves the stability of the communication bandwidth, but also reduces interference to other devices. At the same time, it enhances the anti-interference ability and the difficulty of signal interception and cracking, and has good applicability in almost any wireless communication scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate the embodiments and, together with the description, are used to explain the principles of the invention. Other embodiments and many of the intended advantages of the embodiments will be readily apparent as they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale with each other. The same reference numerals refer to corresponding similar components.
[0035] Figure 1 is a flowchart of the anti-interference random sequence frequency hopping and frequency synchronization method according to an embodiment of the present application;
[0036] Figure 2 is a flowchart of the dynamic adjustment of the frequency hopping time interval of the main timer according to an embodiment of the present application;
[0037] Figure 3 is a block diagram of the anti-interference random sequence frequency hopping and frequency synchronization system according to a specific embodiment of the present application;
[0038] Figure 4 is a block diagram of the anti-interference random sequence frequency hopping and frequency synchronization system according to another specific embodiment of the present application;
[0039] Figure 5 is a block diagram of the anti-interference random sequence frequency hopping and frequency synchronization system according to yet another specific embodiment of the present application;
[0040] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0041] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. To make the objectives, technical solutions, and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without some of these specific details. The following description of the embodiments is only provided to provide a better understanding of the present invention by showing examples of the present invention.
[0042] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "comprising..." does not exclude the existence of additional identical elements in the process, method, article, or device comprising the element.
[0043] This application proposes an anti-interference random sequence frequency hopping and frequency synchronization method for communication between a master node and a slave node. Figure 1 The flowchart of the anti-interference random sequence frequency hopping and frequency synchronization method according to an embodiment of the present application is shown, as Figure 1 shown, the method includes the following steps:
[0044] Step S10: Obtain the communication frequency band between the master node and the slave node, divide it into N intervals, and use a pseudo-random sequence to select a frequency point in each interval to generate a mapping table containing N frequency points, where N is an integer greater than 2.
[0045] Specifically, the communication frequency band is evenly divided into N intervals to ensure that the frequency points in each interval can be selected. By evenly selecting frequency points, the signal energy of frequency hopping is dispersed. Then, a pseudo-random sequence is used to select a frequency point in each interval to obtain a frequency point mapping table with high randomness.
[0046] It should be noted that the value of N is preferably a multiple of ten. In this way, the calculated hopping interval time will be an integer, which is convenient for the subsequent timer to time. In this embodiment, N is taken as 20. In other embodiments, the value of N can be adjusted according to actual needs, and no limitation is imposed here.
[0047] In a specific embodiment, the master node includes a microcontroller (MCU single-chip microcomputer), and the pseudo-random sequence is generated by a random number generator. The specific generation process is as follows: Use a high-precision timestamp to fuse the unique identifier UID of the microcontroller of the master node to generate a random number seed. According to this random number seed, a pseudo-random sequence is generated through the random number generator.
[0048] In this way, the generated pseudo-random number seed has high randomness and uniqueness, thus ensuring the high randomness of the generated pseudo-random sequence, making the signal difficult to be interfered with or blocked, and at the same time increasing the difficulty of the signal being intercepted and cracked.
[0049] In this embodiment, the precision of the high-precision timestamp is in the microsecond level. In other embodiments, the precision of the high-precision timestamp can also be adjusted according to actual needs, and no limitation is made here.
[0050] Step S20: The master node randomly selects a frequency point from the mapping table and performs frequency hopping communication at the first frequency f m The slave node randomly selects a frequency point from the mapping table and performs frequency hopping communication at the second frequency f s until a link communication connection is established between the master node and the slave node, where f s =N×f m .
[0051] Specifically, before the master node and the slave node establish a wireless link communication connection, the master node adopts a slow hopping logic, and the slave node adopts a fast hopping logic. In a specific embodiment, the master node hops frequencies once per second, that is, the master node switches frequency points at a frequency of 1HZ, and the slave node hops frequencies 20 times per second, that is, the slave node switches frequency points at a frequency of 20HZ. Since there are only 20 frequency points in the mapping table, it is ensured that the slave node can establish a link communication connection with the master node within 1 second.
[0052] It should be noted that in this embodiment, the first frequency f m takes a value of 1HZ, and the second frequency f s takes a value of 20HZ. In other embodiments, under the condition of satisfying f s =N×f m , the values of the first frequency f m and the second frequency f s can be adjusted according to actual needs, and no limitation is made here.
[0053] Step S30: In response to the establishment of a link communication connection between the master node and the slave node, the master node sends the data frame of this period to the slave node, and the slave node parses the data frame to complete time synchronization.
[0054] In a specific embodiment, step S30 specifically includes:
[0055] Step S31: Insert the timestamp of the master node into the first K bytes of the data frame sent by the master node in this cycle, where K is a positive integer greater than or equal to 3.
[0056] Step S32: Record the transmission time of the data frame between the master node and the slave node.
[0057] Step S33: The slave node receives the data frame, parses the timestamp of the master node, and synchronizes the local timestamp according to the timestamp of the master node and the transmission time of the data frame.
[0058] In this embodiment, K is taken as 4.
[0059] It should be noted that, in this embodiment, taking the timestamp with a precision of one hundred microseconds as an example, a field with a length of 4 bytes can continuously record timestamps for about 300 days. Therefore, it can be understood that in other embodiments, the value of K can be adjusted according to the actual working conditions. K can be a positive integer greater than or equal to 3 or 4, and even when the timestamp precision is low, K can also be a positive integer less than 3.
[0060] Step S40: Set the hopping time interval, start the timer to count at each hopping, and start the next hopping when the timer counting is completed.
[0061] In a specific embodiment, the timer is the timer module of the microcontroller of the master node. The timer includes a main timer and an auxiliary timer, where the precision of the main timer is higher than that of the auxiliary timer. Figure 2 Shows the flowchart of the dynamic adjustment of the hopping time interval of the main timer according to the embodiment of the present application, as Figure 2 shown, step S40 specifically includes:
[0062] Step S41: Set the hopping time interval, and use the main timer and the auxiliary timer to perform hopping interval counting simultaneously at each hopping.
[0063] Step S42: When the counting interval of the main timer in the current cycle arrives, perform a modulo operation on the count value of the auxiliary timer in the current cycle and its counting interval in one cycle.
[0064] Step S43: Determine whether the modulo result is 0. If not, execute step S44; if so, execute step S45.
[0065] Step S44: Compensate and correct the counting interval of the main timer in the current cycle or the next cycle according to the modulo result.
[0066] Step S45: Start the next hopping when the main timer counting is completed.
[0067] In this embodiment, before the master node and the slave node establish a link communication connection, the slave node attempts to establish a link communication connection with the master node by hopping at 20 HZ. Therefore, after the master node and the slave node establish a link communication connection, the frequency hopping continues at 20 HZ, that is, the frequency hopping time interval is 50 ms, which is convenient for the master timer and the slave timer to count time.
[0068] In this embodiment, the accuracy of the master timer used is in the order of microseconds, and the accuracy of the slave timer used is in the order of one hundred microseconds. In other embodiments, under the condition that the accuracy of the master timer is higher than that of the slave timer, different master timers and slave timers with different accuracies can also be selected according to actual needs, which is not limited here.
[0069] Specifically, the frequency hopping time interval is 50 ms. For the master timer with microsecond accuracy, the counting interval of each cycle is 50000×1 μs, and the counting interval within one cycle is theoretically 50000 times; for the slave timer with one hundred microsecond accuracy, the counting interval of each cycle is 500×100 μs, and the counting interval within one cycle is theoretically 500 times.
[0070] However, although the accuracy of the master timer is very high, especially for the single-chip microcomputer timer, the higher the timer accuracy, the higher the clock frequency required to support its high-precision timing, and the single-chip microcomputer with a high clock frequency is more likely to be interfered by the outside world during operation, resulting in an increase in timing error. On the contrary, the slave timer has a lower accuracy and is less likely to be interfered by the outside world.
[0071] Therefore, in this embodiment, by adding a slave timer with a lower accuracy to dynamically adjust and compensate the counting interval of the master timer, the accuracy of the frequency hopping time interval is ensured, thereby maintaining the stability of the communication bandwidth. The following will explain the process of the slave timer dynamically adjusting and compensating the counting interval of the master timer with an example.
[0072] When the counting interval of the master timer in the current cycle reaches 50000 times, assuming that the actual counting interval has only passed 49900 μs, it means that the master timer has hopped too fast and there is an error. At this time, the count value displayed by the slave timer in the current cycle is 499. Perform a modulo operation on 499 and 500 (499%500), and the modulo result is 1. Therefore, a timing compensation of 1×100 μs is performed on the master timer in the current cycle, that is, the counting interval of the master timer in the current cycle is increased by 100 times to 50100 times.
[0073] When the count interval of the master timer reaches 50,000 times in the current cycle, assuming that the actual count interval has passed 50,100 μs, it indicates that the master timer has slowed down and there is an error. At this time, the count value displayed by the slave timer in the current cycle is 501. Perform a modulo operation on 501 and 500 (501 % 500), and the modulo result is 1. Therefore, a timing correction of 1×100 μs is performed on the master timer in the next cycle, that is, the count interval of the master timer in the next cycle is 100 times less, which is 49,900 times.
[0074] Step S50: Use a pseudo-random number to index the target frequency point for the next frequency hopping from the mapping table, and implement frequency hopping and frequency synchronization of the link according to the target frequency point.
[0075] Specifically, a target frequency point with high randomness is indexed from the mapping table through a pseudo-random number, and the master node and the slave node implement frequency hopping and frequency synchronization of the wireless communication link according to the target frequency point.
[0076] In a specific embodiment, the generation process of the pseudo-random number includes: performing a modulo operation on the timestamp of the slave timer and a preset random seed to obtain a pseudo-random number, where the preset random seed is a positive integer between [2, N], and N is the number of frequency points included in the mapping table.
[0077] Specifically, the timestamp of the slave timer is the cumulative count value of the slave timer. Since the timestamp of the slave timer changes in each cycle, performing a modulo operation on the timestamp of the slave timer and the preset random seed can obtain a modulo result with high randomness. Therefore, the target frequency point for indexing the next frequency hopping in the mapping table also has high randomness, making the signal difficult to be interfered with or blocked, and at the same time further increasing the difficulty of the signal being intercepted and cracked.
[0078] In a specific embodiment, when the number of frequency points N included in the mapping table is a multiple of ten, the value of the preset random seed is N - 1. The advantages of this embodiment will be explained below with an example.
[0079] When the value range of the preset random seed is between [2, N], the remainder operation is performed on the timestamp of the auxiliary timer and the preset random seed, and the resulting remainder will be a positive integer less than N. When N is a multiple of 10, taking N = 20 as an example: If the preset random seed also takes the value of 20, without considering large errors in the auxiliary timer over a long period, the change in the cumulative count value of the auxiliary timer after each cycle is relatively stable. Therefore, when the remainder operation is performed on the timestamp of the auxiliary timer and 20, the resulting remainder usually only changes back and forth between a few values, and the randomness is not high; If the preset random seed takes relatively small values such as 2, 3, 4..., when the remainder operation is performed on the timestamp of the auxiliary timer and the preset random seed, the resulting remainder also only changes back and forth between 0, 1, 2, 3..., and the target frequency points finally indexed in the mapping table only switch back and forth between the 1st, 2nd, 3rd, 4th... frequency points, unable to cover the entire mapping table, and the randomness is not high either.
[0080] Therefore, in this embodiment, when N is a multiple of 10, for example, N = 20, the preset random seed takes the value of N - 1, that is, the preset random seed is 19. In this way, when the remainder operation is performed on the timestamp of the auxiliary timer and the preset random seed, the resulting remainder will change back and forth between 0, 1, 2, 3... 18, and the target frequency points finally indexed in the mapping table will switch back and forth between the 1st, 2nd, 3rd, 4th... 19th frequency points, with a very high randomness and basically covering all the frequency points in the mapping table (except that the 20th frequency point will not be randomly selected). Through the above method, the anti-interference ability of the communication link can be further improved, ensuring the reliability and stability of communication.
[0081] It should be noted that the above embodiment is only a preferred embodiment for the value of the preset random seed, but does not limit the value of the preset random seed. When N is not a multiple of 10, the preset random seed can also take the value of N - 1.
[0082] In summary, the anti-interference random sequence frequency hopping and frequency synchronization method proposed in this application uses a pseudo-random sequence with high randomness and uniqueness to evenly select frequency points, spreading the signal energy through frequency hopping. This not only improves the stability of the communication bandwidth but also enhances the anti-interference ability. The master node adopts slow frequency hopping logic, and the slave node adopts fast frequency hopping logic. After establishing a link connection, the time stamps are synchronized to achieve fast and highly stable frequency hopping communication. Then, a microsecond-level master timer is used to time the frequency hopping interval, supplemented by a hundred-microsecond-level slave timer to dynamically correct the frequency hopping interval, solving the cumulative time error and floating problems that may occur under complex working conditions, ensuring the reliability of the frequency hopping frequency and the frequency hopping interval, and further maintaining the stability of the communication bandwidth. Then, based on the time stamp of the slave timer and a preset random seed, a highly random random number is generated, and the target frequency point for the next frequency hopping is indexed from the mapping table, further improving the anti-interference performance of the communication link and ensuring the reliability and stability of the communication.
[0083] Based on the above anti-interference random sequence frequency hopping and frequency synchronization method and the same inventive concept, this application also proposes an anti-interference random sequence frequency hopping and frequency synchronization system. Figure 3 The block diagram of the anti-interference random sequence frequency hopping and frequency synchronization system according to a specific embodiment of the present application is shown in Figure 3 As shown, the system includes a master node 100 and a slave node 200. The master node 100 and the slave node 200 are used to execute the anti-interference random sequence frequency hopping and frequency synchronization method provided in any of the above embodiments, forming a wireless communication link.
[0084] In a specific embodiment, the master node 100 is a drone remote controller, and the slave node 200 is a drone sky end, thus forming a one-drone-one-control drone digital image transmission system.
[0085] In a specific embodiment, both the remote controller and the sky end are equipped with communication modules. The communication module includes a radio frequency chip and a microcontroller (MCU single-chip microcomputer). The remote controller and the sky end achieve wireless communication through the communication module.
[0086] Figure 4 The block diagram of the anti-interference random sequence frequency hopping and frequency synchronization system according to another specific embodiment of the present application is shown in Figure 4 As shown, in another specific embodiment, multiple master nodes 100 can be set, thus forming a one-drone-multi-control drone digital image transmission system.
[0087] Figure 5 The block diagram of the anti-interference random sequence frequency hopping and frequency synchronization system according to yet another specific embodiment of the present application is shown in Figure 5As shown, in yet another specific embodiment, multiple slave nodes 200 can be provided, so as to form a drone digital image transmission system with one master controlling multiple machines.
[0088] Based on the above anti-interference random sequence frequency hopping and frequency synchronization method, and based on the same inventive concept, the present application also proposes an electronic device. Figure 6 The schematic diagram of the electronic device according to the embodiment of the present application is shown, as Figure 6 shown, the electronic device includes: one or more processors 301, a memory 302, a bus 303, and a communication interface 304. Among them, the one or more processors 301, the memory 302, and the communication interface 304 are connected through the bus 303. The memory 302 is used to store one or more programs. When the one or more programs are executed by the one or more processors 301, the electronic device implements the anti-interference random sequence frequency hopping and frequency synchronization method provided in any of the above embodiments.
[0089] Based on the above anti-interference random sequence frequency hopping and frequency synchronization method, and based on the same inventive concept, the present application also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the anti-interference random sequence frequency hopping and frequency synchronization method provided in any of the above embodiments.
[0090] In the embodiments of the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the above-described device / system / method embodiments are merely illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the units or modules can be electrical or other forms.
[0091] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0092] In addition, in each embodiment of the present invention, the functional units can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0093] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks, or optical discs that can store program codes.
[0094] Obviously, those skilled in the art can make various modifications and changes to the embodiments of the present invention without departing from the spirit and scope of the present invention. In this way, if these modifications and changes are within the scope of the claims of the present invention and their equivalent forms, the present invention also aims to cover these modifications and changes. The word "comprising" does not exclude the presence of other elements or steps not listed in the claims. The simple fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage. Any reference signs in the claims should not be construed as limiting the scope.
Claims
1. An anti-interference random sequence frequency hopping and frequency synchronization method for communication between a master node and a slave node, characterized in that: include: Obtain a communication frequency band between the master node and the slave node, and divide it into N intervals, select a frequency point in each interval using a pseudo-random sequence, and generate a mapping table containing N frequency points, where N is an integer greater than 2; The master node randomly selects a frequency point from the mapping table and uses the first frequency f m To perform frequency switching communication, the slave node randomly selects a frequency from the mapping table and transmits the frequency to the second frequency f s Perform frequency switching communication until the master node establishes a link communication connection with the slave node, where f s =N×f m ; In response to the master node establishing a link communication connection with the slave node, the master node sends a data frame of this cycle to the slave node, and the slave node parses the data frame to complete time synchronization; Setting a frequency hopping time interval, starting a timer at each frequency hopping, and starting the next frequency hopping when the timer is completed; Using a pseudo-random number to index a target frequency point for the next frequency hopping from the mapping table, and implementing frequency hopping and frequency synchronization of the link according to the target frequency point; The timer includes a main timer and a secondary timer, and the setting of the frequency hopping time interval starts the timer at each frequency hopping, and starts the next frequency hopping when the timer is finished, including: Setting a frequency hopping time interval, using the main timer and the auxiliary timer to simultaneously time the frequency hopping interval each time the frequency hopping occurs; When the counting interval of the main timer in the current cycle arrives, a modulo operation is performed on the counting value of the auxiliary timer in the current cycle and the counting interval of the auxiliary timer in one cycle; If the remainder result is not 0, the counting interval of the main timer in the current cycle or the next cycle is compensated and corrected according to the remainder result; Starting the next frequency hopping when the main timer finishes timing; The accuracy of the main timer is higher than that of the auxiliary timer.
2. The method according to claim 1, characterized in that The master node includes a microcontroller, and the generation process of the pseudo-random sequence includes: Generate a random number seed using a high-precision timestamp and a unique identifier UID of the microcontroller; Based on the random number seed, generate the pseudo-random sequence using a random number generator; The accuracy of the high-precision timestamp is at the microsecond level.
3. The method according to claim 1, characterized in that The pseudo-random number generation process includes: A modulo operation is performed on the timestamp of the auxiliary timer and a preset random seed to obtain the pseudo-random number, wherein the preset random seed is a positive integer between [2, N].
4. The method according to claim 3, characterized in that When the number N of frequency points included in the mapping table is an integer of ten, the preset random seed value is N-1.
5. The method according to claim 1, characterized in that The master node sends the data frame of this cycle to the slave node, and the slave node parses the data frame to complete time synchronization, including: The master node inserts the timestamp of the master node into the first K bytes of the data frame, where K is a positive integer ≥ 3; Recording the transmission time of the data frame between the master node and the slave node; The slave node receives the data frame and parses the timestamp of the master node, and synchronizes the local timestamp according to the timestamp of the master node and the transmission time of the data frame.
6. An anti-interference random sequence frequency hopping and frequency synchronization system, characterized in that: It comprises a master node and a slave node, wherein the master node and the slave node are used to execute the method according to any one of claims 1 to 5 to form a wireless communication link.
7. The system according to claim 6, characterized in that The master node is the drone remote controller, and the slave node is the drone sky terminal.
8. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the method as claimed in any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Time synchronization method and system in optical time slot switching network
CN117097427A
Same-frequency interference resisting method based on self-adaptive frequency hopping period and intelligent electric meter
CN117614481A