Channel detection method and device

By using frequency deviation estimation and actual frequency sweep methods in channel detection, combined with frame detection and RSSI values, the accuracy and efficiency problems of channel occupation detection in the prior art are solved, and fast and accurate channel state judgment is achieved.

CN119171937APending Publication Date: 2024-12-20BEIJING SIGBEAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411216328.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In the prior art, incomplete frames or interference may occur when judging whether the channel is occupied, resulting in low detection accuracy and adjacent channels are prone to confusion, resulting in false detection, requiring multiple detections and a long wait time.

Method used

By determining the frequency deviation estimation of the target channel and the actual frequency sweep method, combining frame detection and RSSI value, the channel occupation status is accurately judged, and the matching degree of frame detection, frequency deviation estimation and frequency sweep method is used to determine the channel occupation status.

Benefits of technology

It improves the accuracy and efficiency of channel occupancy detection, reduces false detection conditions, shortens detection time, and clarifys the channel occupancy status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119171937A_ABST
    Figure CN119171937A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a channel detection method and device, and the method comprises the steps: carrying out the frame detection of a target channel through determining the target channel and a target frequency sweeping mode, determining the frequency offset estimation of the target channel in response to the detection of a frame header of the target channel in the frame detection, and carrying out the detection of the frequency offset estimation of the target channel. The frequency offset estimation is used for representing the difference between the frequency of the sending end and the frequency of the receiving end of the signal, determining the actual frequency sweeping mode of the target channel, and determining the occupation condition of the target channel according to the target frequency sweeping mode of the target channel, the actual frequency sweeping mode and the frequency offset estimation. Therefore, the occupation condition of the target channel can be accurately determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power line carrier communications, and in particular to a channel detection method and device. Background Art

[0002] Determining whether a frame is idle or occupied based on RSSI (Received Signal Strength Indication) is a common method in wireless communications. RSSI measures the received signal strength to assess channel quality and, therefore, determine whether a channel is occupied.

[0003] RSSI is the received signal strength indicator, which is usually implemented after the reverse channel baseband receive filter. The RSSI value represents the received signal strength. The larger the RSSI value, the stronger the received signal; conversely, the smaller the RSSI value, the weaker the received signal.

[0004] However, during the randomly opened scanning period, incomplete frames or interference may occur on the channel, which may affect the accuracy of the channel occupancy detection. Therefore, when using existing detection technology, it is necessary to repeatedly detect whether the channel is occupied or idle, which is very time-consuming. In addition, adjacent channels are easily confused, resulting in false detection of channel occupancy. Summary of the Invention

[0005] In view of this, an embodiment of the present invention provides a channel detection method and apparatus, thereby accurately determining the occupancy status of a target channel.

[0006] In a first aspect, an embodiment of the present invention provides a channel detection method, the method comprising:

[0007] Determine the target channel and target scanning mode;

[0008] Performing frame detection on the target channel;

[0009] In response to detecting a frame header of the target channel during frame detection, determining a frequency offset estimate of the target channel, the frequency offset estimate being used to represent a difference between a transmitting end and a receiving end frequency of the signal;

[0010] Determining an actual frequency sweep mode of the target channel;

[0011] The occupancy status of the target channel is determined according to the target frequency sweep mode, the actual frequency sweep mode and the frequency offset estimation of the target channel.

[0012] In some embodiments, determining the actual frequency sweep mode of the target channel includes:

[0013] Determine candidate sweep patterns and long training sequences;

[0014] Determine the correlation peak power corresponding to the candidate frequency sweep mode according to the candidate frequency sweep mode and the long training sequence;

[0015] The candidate frequency sweep mode corresponding to the largest correlation peak power is determined as the actual frequency sweep mode of the target channel.

[0016] In some embodiments, determining the occupancy of the target channel according to the target frequency sweep mode, the actual frequency sweep mode, and the frequency offset estimation of the target channel includes:

[0017] In response to the target frequency sweep mode of the target channel being the same as the actual frequency sweep mode and the frequency offset estimate being less than a first predetermined value, determining that the target channel is an occupied channel;

[0018] In response to the target frequency sweep mode of the target channel being different from the actual frequency sweep mode or the frequency offset estimate being greater than or equal to a first predetermined value, the target channel is determined to be an idle channel.

[0019] In some embodiments, the method further comprises:

[0020] Determine a received signal strength indicator value of the target channel in a predetermined manner;

[0021] The target channels are sorted according to the occupancy status of each target channel and the received signal strength indicator value of the target channel.

[0022] In some embodiments, determining the received signal strength indicator value of the target channel in a predetermined manner includes:

[0023] Performing multiple samplings at a predetermined sampling period to obtain multiple sets of received signal strength values;

[0024] Determine the average received signal strength value of each group of received signal strength values;

[0025] Determine the amplification factor of the analog end;

[0026] Determine the intensity decibel value corresponding to each group of received signal strength values ​​according to the amplification factor and the average received signal strength value;

[0027] Determine the average intensity decibel value for multiple sets of intensity decibel values

[0028] The average strength decibel value is subtracted from the linear calibration component to obtain a received signal strength indicator value.

[0029] In some embodiments, the method further comprises:

[0030] In response to not detecting a frame header of the target channel in the frame detection, the target channel is determined to be an idle channel.

[0031] In some embodiments, sorting the target channels according to the occupancy status of each target channel and the received signal strength indicator value of the target channel includes:

[0032] Sort the occupied channels from largest to smallest according to received signal strength indicator values ​​to obtain a sequence of occupied channels;

[0033] Sort the idle channels from large to small according to the received signal strength indicator values ​​to obtain a sequence of idle channels;

[0034] The sequence of the idle channels is arranged after the sequence of the occupied channels.

[0035] In some embodiments, sorting the target channels according to the occupancy status of each target channel and the received signal strength indicator value of the target channel includes:

[0036] Sort the idle channels in ascending order according to received signal strength indicator values ​​to obtain a sequence of idle channels;

[0037] sorting the occupied channels from small to large according to the received signal strength indicator values ​​to obtain a sequence of occupied channels;

[0038] The sequence of the occupied channels is arranged after the sequence of the idle channels.

[0039] In some embodiments, the intensity decibel value determined according to the amplification factor and the received signal strength value is specifically calculated by the following formula:

[0040] R=10logP Rn -G an

[0041] Wherein, R is the intensity decibel value, P Rn is the average received signal strength value, G an is the amplification factor of the analog end.

[0042] In a second aspect, an embodiment of the present invention provides a channel detection device, the device comprising:

[0043] A target channel determination unit, used to determine a target channel and a target frequency scanning mode;

[0044] a frame detection unit, configured to perform frame detection on the target channel;

[0045] a frequency offset estimate determining unit, configured to determine a frequency offset estimate of the target channel in response to detecting a frame header of the target channel in frame detection, wherein the frequency offset estimate is used to represent a difference between a transmitting end and a receiving end frequency of a signal;

[0046] a frequency sweep mode determining unit, configured to determine an actual frequency sweep mode of the target channel;

[0047] The occupancy determination unit is configured to determine the occupancy of the target channel according to the target frequency sweep mode, the actual frequency sweep mode and the frequency offset estimation of the target channel.

[0048] The technical solution of the embodiment of the present invention determines a target channel and a target frequency sweep mode, performs frame detection on the target channel, and in response to detecting a frame header of the target channel during the frame detection, determines a frequency offset estimate of the target channel, which represents the difference between the frequencies of the transmitting and receiving ends of the signal. The actual frequency sweep mode of the target channel is then determined, and the occupancy of the target channel is determined based on the target frequency sweep mode, the actual frequency sweep mode, and the frequency offset estimate. Thus, the occupancy of the target channel can be accurately determined. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0050] Figure 1 2 is a schematic diagram of a channel scanning system according to an embodiment of the present invention.

[0051] Figure 2 is an overall flow chart of channel frequency sweep detection according to an embodiment of the present invention;

[0052] Figure 3 is a flow chart of a channel detection method according to an embodiment of the present invention;

[0053] Figure 4 is a flow chart of determining a received signal strength indicator value of a target channel according to an embodiment of the present invention;

[0054] Figure 5 is a flow chart of an actual frequency sweep method for determining a target channel according to an embodiment of the present invention;

[0055] Figure 6 is a flow chart of sorting target channels according to an embodiment of the present invention;

[0056] Figure 7 is a flowchart of sorting target channels according to another embodiment of the present invention;

[0057] Figure 8 is a flow chart of real-time sorting of channels according to RSSI values ​​according to an embodiment of the present invention;

[0058] Figure 9 is a schematic diagram of a buffer sequence according to an embodiment of the present invention;

[0059] Figure 10 is a schematic diagram of a channel detection method according to another embodiment of the present invention;

[0060] Figure 11 is a flowchart of determining the order of target channels according to an embodiment of the present invention;

[0061] Figure 12 is a schematic diagram of a channel scanning device according to an embodiment of the present invention;

[0062] Figure 13 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0063] The present application is described below based on the following embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without the description of these details. To avoid obscuring the essence of the present application, well-known methods, processes, procedures, components, and circuits are not described in detail.

[0064] Furthermore, persons of ordinary skill in the art will appreciate that the figures provided herein are for illustration purposes only and are not necessarily drawn to scale.

[0065] Unless the context clearly requires otherwise, words like “include”, “comprising” and the like throughout this application should be interpreted as including rather than exclusive or exhaustive; that is, as meaning “including but not limited to”.

[0066] In the description of this application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood to indicate or imply relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.

[0067] Figure 1 Schematic diagram of a channel scanning system according to an embodiment of the present invention. Figure 1 As shown, the channel scanning system includes an analog part 1 and a digital processing part 2. The analog part 1 includes a data interface 11 and an amplification module 12, and the digital processing part 2 includes a frame detection module 21, a frequency deviation estimation module 22, an RSSI calculation module 23 and a DSP (Digital Signal Processing) module 24.

[0068] The data interface 11 is a connecting bridge between the analog part and external devices or systems. It receives signals or data from the outside and transmits them to other modules of the analog part for processing.

[0069] The amplification module 12 is mainly responsible for amplifying the received signal. Since the signal may be attenuated during transmission, the amplification module is needed to enhance the signal strength to ensure that the subsequent processing module can accurately identify and process the signal, thereby improving the sensitivity and dynamic range of the entire system.

[0070] The frame detection module 21 is used to identify complete frames. In communication systems, data is typically transmitted in frames, each containing a certain amount of information and synchronization information. The frame detection module 21 can accurately locate and extract complete frames, providing input for subsequent processing modules.

[0071] Frequency offset estimation module 22 is used to estimate the frequency offset between the received signal and the transmitted signal. Due to various factors, the frequency of the received signal may deviate from the frequency of the transmitted signal. Frequency offset estimation module 22 estimates this deviation by analyzing the spectral characteristics of the received signal and outputs a corresponding frequency offset estimate.

[0072] The RSSI calculation module 23 is used to measure and calculate the strength of the received signal. The RSSI value reflects the attenuation of the signal during transmission. The RSSI calculation module can calculate the signal strength value by sampling and processing the received signal, and then perform corresponding processing based on the RSSI value.

[0073] The DSP module 24 is used to implement channel estimation, signal synchronization, noise suppression, and spectrum analysis. Through the processing of the DSP module, the performance and reliability of the system can be significantly improved, and various complex application requirements can be met.

[0074] The embodiments of the present invention determine a target channel and a target frequency sweep mode, perform frame detection on the target channel, and in response to detecting a frame header of the target channel during the frame detection, determine a frequency offset estimate of the target channel, wherein the frequency offset estimate represents the difference between the frequencies of the transmitting and receiving ends of the signal. The actual frequency sweep mode of the target channel is then determined, and the occupancy of the target channel is determined based on the target frequency sweep mode, the actual frequency sweep mode, and the frequency offset estimate. Thus, the occupancy of the target channel can be accurately determined.

[0075] Figure 2This is a general flow chart of the channel detection method of an embodiment of the present invention. The channel detection method is applied to a dual-mode chip. The dual-mode chip is a chip that can support two or more different wireless communication technologies. It has the characteristics of versatility, high integration and low power consumption, and is applied to multiple fields such as smart phones, Internet of Things devices, industrial Internet of Things and medical health. Figure 2 As shown, the detection method includes three frequency sweep modes as an example for explanation. It should be understood that the number of frequency sweep modes is determined according to actual conditions and is not described in detail in this embodiment of the present invention. Frequency sweeping is a technical method for searching or measuring signals within a frequency band by continuously changing the frequency. Each frequency sweep mode corresponds to a frequency range. The channel detection method includes the following steps:

[0076] Step S101: Determine whether the number of channels to be scanned in scanning mode 1 is not equal to 0.

[0077] The sweep mode is specifically a frequency band option. Specifically, for each sweep mode, it is necessary to determine whether there are channels that need to be scanned using that sweep mode. If there are channels that can be scanned using that sweep mode, the channels in that sweep mode are scanned using that sweep mode. If there are no channels that can be scanned using that sweep mode, the next sweep mode is determined.

[0078] If so, it indicates that scanning is required using scanning mode 1, and the process goes to step S102.

[0079] If not, it indicates that scanning by the frequency scanning mode 1 is not required, and the process goes to step S103.

[0080] Step S102: Scan the frequency scanning mode 1 according to the configured channel number.

[0081] Specifically, channel scanning is performed according to the information of the frequency scanning mode 1 to determine whether the channel is occupied or idle.

[0082] Step S103: Determine whether the number of channels scanned by scanning mode 2 is not equal to 0.

[0083] If so, it indicates that scanning is required using scanning mode 2, and the process goes to step S104.

[0084] If not, it indicates that scanning in the frequency sweep mode 2 is not required, and the process goes to step S105.

[0085] Step S104: Scan the frequency scanning mode 2 according to the configured channel number.

[0086] Specifically, channel scanning is performed according to the information of the frequency scanning mode 2 to determine whether the channel is occupied or idle.

[0087] Step S105: Determine whether the number of channels scanned by scanning mode 3 is not equal to 0.

[0088] If so, it indicates that scanning is required using scanning mode 3, and the process goes to step S106.

[0089] If not, it indicates that scanning in the frequency sweep mode 3 is not required, and the process goes to step S107.

[0090] Step S106: Scan the frequency scanning mode 3 according to the configured channel number.

[0091] Specifically, channel scanning is performed according to the information of the frequency scanning mode 3 to determine whether the channel is occupied or idle, and to determine the RSSI value of the channel.

[0092] Step S107: reporting the frequency scanning result.

[0093] Specifically, the occupancy status of the channel and the RSSI value are uploaded so as to be obtained when needed.

[0094] The embodiments of the present invention determine a target channel and a target frequency sweep mode, perform frame detection on the target channel, and in response to detecting a frame header of the target channel during the frame detection, determine a frequency offset estimate of the target channel, wherein the frequency offset estimate represents the difference between the frequencies of the transmitting and receiving ends of the signal. The actual frequency sweep mode of the target channel is then determined, and the occupancy of the target channel is determined based on the target frequency sweep mode, the actual frequency sweep mode, and the frequency offset estimate. Thus, the occupancy of the target channel can be accurately determined.

[0095] Figure 3 This is a flow chart of a channel detection method according to an embodiment of the present invention. The channel detection method is applied to a dual-mode chip. Specifically, this flow chart is for Figure 2 The scanning of a certain frequency sweep mode according to the configured channel number in the process is specifically described, that is, step S102 or step S104 or step S106. This embodiment is specifically described with reference to the frequency sweep mode 1 of step S102. The detection method specifically includes the following steps:

[0096] Step S201: Determine whether the number of channels that have been detected is less than the number of channels that need to be detected.

[0097] Specifically, when scanning channels in sweep mode 1, for example, if the number of channels to be detected is q, if the number of channels already detected is less than q, detection is not complete and the next channel needs to be detected. If the number of channels already detected is equal to the number of channels to be detected, the channels to be scanned in sweep mode 1 have been detected, and this process ends.

[0098] If so, it indicates that there are still channels that need to be detected, and the detection needs to be continued, and the process goes to step S202.

[0099] If not, it indicates that all channels in the frequency sweep mode have been detected, and the process goes to step S216.

[0100] Step S202: Take the p+1th channel to be scanned and perform pre-configuration, where p is the number of channels that have been detected.

[0101] Specifically, after detecting p channels and p being less than the number of channels to be detected, q, the p+1th channel needs to be detected. At this point, the p+1th channel needs to be preconfigured, which specifically includes bandwidth configuration and frequency sweep parameter configuration. Specifically, during communication reception, to prevent frequency deviation, the bandwidth is configured to be relatively wide, for example, greater than the channel spacing. However, a large bandwidth can easily cause confusion between adjacent channels during frequency sweeping. Because the channel bandwidth in embodiments of the present invention is configurable, during frequency sweeping, the bandwidth is configured to be less than or equal to the channel spacing, effectively reducing signal confusion between adjacent channels during frequency sweeping. Frequency sweep parameter configuration includes specifying the frequency sweep mode and frequency sweep frequency. For example, configuring the frequency sweep frequency to 500 kHz for frequency sweep mode 3. Conventional frequency sweeping only configures the frequency sweep frequency and cannot distinguish between different sweep modes. For example, if the frequency sweep frequency matches two sweep modes simultaneously, conventional methods cannot distinguish which sweep mode is being used. By configuring the frequency sweep mode, dual detection of both the frequency sweep mode and frequency sweep frequency is possible.

[0102] Step S203: perform frame detection and determine whether a frame header is detected during the frame detection.

[0103] Specifically, a frame detection module is used to perform frame detection on the channel, and it is determined whether a frame header is detected during the frame detection process.

[0104] If so, it indicates that frame data has been detected in the channel, and the process goes to step S207.

[0105] If not, it indicates that no frame data is detected in the channel, and the process goes to step S204.

[0106] Step S204: Determine whether the scanning time reaches the predetermined time.

[0107] Specifically, after no frame header is detected on the channel, the channel needs to be scanned to determine the RSSI value of the channel. The predetermined time is specifically the total time required to scan a channel, and the scanning time is specifically the time the channel has been scanned. Specifically, the duration of each scan is a scanning cycle. For example, if the scanning cycle is 1ms and the predetermined time is 5ms, a total of 5 scans are required.

[0108] If so, it indicates that the channel scanning has been completed, and the process goes to step S207.

[0109] If not, it indicates that the channel needs to be scanned, and the process goes to step S205.

[0110] Step S205: Calculate RSSI.

[0111] The RSSI calculation is specifically to determine the received signal strength indicator value of the target channel.

[0112] Specifically, determining the received signal strength indicator value of the target channel is to obtain the RSSI value of the channel, and the RSSI value is a parameter used to characterize the strength of the signal.

[0113] Figure 4 FIG. 1 is a flow chart of determining the received signal strength indicator value of the target channel according to an embodiment of the present invention. Figure 4 As shown, determining the received signal strength indicator value of the target channel includes the following steps:

[0114] Step S2051: Perform multiple samplings in a predetermined sampling period to obtain multiple groups of received signal strength values.

[0115] The number of groups of received signal strength values ​​is m, and each group of received signal strength values ​​specifically includes n data. Specifically, for a group of received signals, it includes multiple sampled data, which are obtained by performing multiple samplings according to a predetermined period. Specifically, the received signal strength value is calculated according to the following formula:

[0116] P R(i) =I(i) 2 +Q(i) 2

[0117] Wherein, I(i) is specifically the value of the in-phase component of the i-th sample data, and Q(i) is specifically the value of the quadrature component of the i-th sample data. The in-phase component is specifically the signal component with the same phase as the reference signal, and the quadrature component is specifically the signal component with a 90-degree phase difference with the reference signal.

[0118] Step S2052: Determine the average received signal strength value of each group of received signal strength values.

[0119] Specifically, the average value of the multiple received signal strength values ​​obtained in each set of data is taken to obtain the average received signal strength value. Specifically, it is calculated using the following formula:

[0120]

[0121] Among them, P RnThe received signal strength of a set of sampled data is represented by calculating the average received signal strength value.

[0122] Step S2053: Determine the amplification factor of the analog end.

[0123] The amplification factor specifically represents the gain relationship between the input signal and the output signal. Specifically, the received signal strength value of the signal of the target channel is amplified at the analog end.

[0124] Step S2054: Determine the intensity decibel value corresponding to each group of received signal strength values ​​according to the amplification factor and the average received signal strength value.

[0125] Specifically, an average received signal strength value is obtained for each set of data, and the average received signal strength value is converted into a strength decibel value based on the amplification factor. The decibel value of signal strength is usually measured in decibel milliwatts (dBm) in the field of communications. The specific strength decibel value is calculated as follows:

[0126] R=10logP Rn -G an

[0127] Wherein, R is the intensity decibel value, P Rn is the average received signal strength value, G an is the amplification factor of the analog end.

[0128] Step S2055: Determine the average intensity decibel value of the multiple groups of intensity decibel values.

[0129] Specifically, in step S2054, an intensity decibel value is calculated for each set of data, and the average intensity decibel value is calculated specifically by the following formula:

[0130]

[0131] Among them, R a is the average intensity decibel value, R i is the intensity decibel value obtained for the i-th group of data.

[0132] Step S2056: Subtract the average strength decibel value from the linear calibration component to obtain a received signal strength indicator value.

[0133] Specifically, the signal in the power carrier communication system experiences nonlinear distortion during transmission. To reduce the impact of this nonlinear distortion on communication quality, it is necessary to perform linear calibration on the relevant components in the system to obtain a linear calibration component. By subtracting the linear calibration component from the average intensity decibel value, a more accurate received signal strength indicator value is obtained. Specifically, it is calculated using the following formula:

[0134] RSSI = R a -L

[0135] Among them, RSSI is the signal strength indicator value, L is the linear calibration component, R a is the average intensity in decibels.

[0136] Step S206: Record the maximum RSSI value.

[0137] Specifically, the maximum RSSI value that occurs during the scanning period is recorded, and the RSSI maximum value is used as a reference for detecting whether there is a valid signal within the detection time. Specifically, when the maximum RSSI value exceeds a preset threshold, it can be determined that there is a valid signal in the channel.

[0138] After step S206 is completed, return to step S204 for judgment.

[0139] Specifically, steps S204-S206 constitute the overall process of RSSI detection for a frame. As a whole, steps S204-S206 complete the acquisition of the RSSI value for a scanning cycle and the recording of the RSSI maximum value. After completing a scanning cycle, step S204 determines whether the scanning time has reached the predetermined time, thereby determining whether to continue the scanning cycle until the predetermined time is reached. Specifically, during a scanning process of the predetermined duration, a frame header may or may not appear. The predetermined time can be set according to actual needs.

[0140] Step S207: Determine whether a frame header is detected during frame detection.

[0141] Specifically, this step is the same as step S203. This step is used to preliminarily determine whether the channel is occupied or idle. If no frame header is detected, the channel must be idle. If a frame header is detected, the channel may be occupied and further determination is required in the following steps.

[0142] The function of step S203 is to determine whether the channel needs to be scanned for a predetermined time. If no frame header is detected, the channel needs to be scanned for a predetermined time to continue detecting the frame header. If a frame header is detected, the channel does not need to be scanned for a predetermined time.

[0143] If so, it indicates that frame data has been detected in the channel, and the process goes to step S208.

[0144] If not, it indicates that no frame data is detected in the channel, and the process goes to step S212.

[0145] Step S208: Determine the frequency offset estimate of the target channel.

[0146] Frequency offset estimation is a process used in communication systems to determine the difference in frequency between the transmitting and receiving ends of a signal. Frequency offset estimation is divided into integer frequency offset estimation and fractional frequency offset estimation. Integer frequency offset estimation is primarily caused by hardware factors such as oscillator errors, while fractional frequency offset may be caused by a combination of factors. In integer frequency offset estimation, a known signal sequence is used for matching, and the frequency offset value is estimated by calculating the correlation. Fractional frequency offset estimation can employ techniques such as cyclic prefix-based correlation methods and methods based on single-sideband signal characteristics.

[0147] Specifically, when a frame header of a target channel is detected during frame detection, it indicates that a frame exists in the target channel. Therefore, it is necessary to analyze the frame in the target channel to determine whether the target channel is occupied or idle.

[0148] More specifically, because different sweep modes may share the same modulation frequency, using only frame detection can lead to misjudgment of the channel's sweep mode. This is because different sweep modes may share the same receiving frequency. For example, if channel 2 in sweep mode 2 and channel 1 in sweep mode 1 both receive at 471 MHz, this could lead to inaccurate determination of whether the target channel is occupied or idle. Therefore, estimating the target channel's frequency offset can eliminate some misjudgments of the target channel, making channel occupancy more accurate.

[0149] Step S209: Determine the actual frequency sweep mode.

[0150] Specifically, the actual scanning mode is the scanning mode obtained by analyzing the target channel. The actual scanning mode is compared with the target scanning mode to determine whether the scanning mode is correct. In step S102, the channel is scanned using scanning mode 1. That is, the target scanning mode is scanning mode 1, and the actual scanning mode is the scanning mode actually used by the channel, specifically the scanning mode calculated by the correlation peak power.

[0151] Figure 5 FIG. 1 is a flow chart of an embodiment of the present invention for determining an actual frequency sweeping method for a target channel. Figure 5 As shown, the actual frequency scanning method for determining the target channel specifically includes the following steps:

[0152] Step S2091: Determine candidate frequency sweep modes and long training sequences.

[0153] Specifically, the candidate frequency sweep modes are multiple frequency sweep modes that may exist for the channel, and the frequency sweep mode used by the target channel is determined. For example, for channel A, the candidate frequency sweep modes are frequency sweep mode 1, frequency sweep mode 2, and frequency sweep mode 3.

[0154] The long training sequence is a pseudo-random sequence known to both the transmitter and receiver, designed for specific signal processing tasks. In OFDM (Orthogonal Frequency Division Multiplexing) systems, long training sequences are often used alongside short training sequences to implement various synchronization and estimation tasks in the receiver. Specifically, long training sequences typically consist of specialized sequences with specific structures and properties to facilitate processing at the receiver.

[0155] Step S2092: Determine the correlation peak power corresponding to the candidate frequency sweep mode according to the candidate frequency sweep mode and the long training sequence.

[0156] Specifically, for each candidate frequency sweep mode, the correlation peak power under the candidate frequency sweep mode is obtained by combining each candidate frequency sweep mode with the long training sequence, and is obtained by writing the candidate frequency sweep mode and the long training sequence back to the frequency offset estimation module.

[0157] The specific process of calculating the correlation peak power is described below. First, a series of candidate sweep frequency sequences are generated based on the frequency deviation range and step size preset by the system. These sequences may be constructed by simulating signal waveforms under different frequency offsets. Then, a long training sequence sent by the transmitter is received at a specific position in the communication frame. The long training sequence has good autocorrelation and cross-correlation, and the received long training sequence is correlated with each candidate sweep frequency sequence. The correlation operation can be a sliding correlation in the time domain or a product followed by summation in the frequency domain, which reflects the similarity between the received sequence and the candidate sequence, that is, the correlation peak power.

[0158] Step S2093: Determine the candidate frequency sweep mode corresponding to the maximum correlation peak power as the actual frequency sweep mode of the target channel.

[0159] Specifically, after calculating multiple correlation peak power values, the sweep mode corresponding to the largest correlation peak power value is determined as the actual sweep mode. This is because a large correlation peak power indicates that the corresponding sweep mode has the highest match with the long training sequence and is more consistent with the corresponding sweep mode. Therefore, the candidate sweep mode corresponding to the largest correlation peak power is determined as the actual sweep mode of the target channel.

[0160] Step S210: Calculate the RSSI value.

[0161] Specifically, it is the same as step S205 and will not be described again here.

[0162] Step S211: Record the maximum value of RSSI.

[0163] It should be noted that although this step is similar to step S206 in that both steps record the maximum RSSI value, since the RSSI calculation is performed on the channel where the frame header has been detected, a valid signal must exist in the channel. Therefore, the maximum RSSI value recorded in this step is not used as a reference for determining whether a valid signal exists, but rather as a reference for signal strength.

[0164] Step S212: Determine whether the target frequency sweep mode is the same as the actual frequency sweep mode and the frequency offset estimate is less than a first predetermined value.

[0165] Specifically, in response to the target frequency sweep mode of the target channel being the same as the actual frequency sweep mode and the frequency offset estimate being less than a first predetermined value, the target channel is determined to be an occupied channel. The frequency offset estimate is specifically the difference between the transmitting and receiving frequencies of the signal. When the transmitting and receiving frequencies of the signal do not differ significantly, that is, when the frequency offset estimate is less than the first predetermined value, it indicates that the signal belongs to the target frequency band. At this time, if the target frequency sweep mode is consistent with the actual frequency sweep mode, it indicates that a signal is present in the channel and the target channel is an occupied channel.

[0166] In response to the target frequency sweep mode of the target channel being different from the actual frequency sweep mode or the frequency offset estimate being greater than or equal to a first predetermined value, the target channel is determined to be an idle channel. Specifically, if the frequency offset estimate is large, i.e., if there is a significant frequency difference between the transmitting and receiving ends of the signal; or if the target frequency sweep mode is different from the actual frequency sweep mode, indicating that the actual frequency sweep mode of the signal does not match the target frequency sweep mode, the channel is not occupied and is determined to be an idle channel.

[0167] If so, it indicates that the channel is occupied, and the process goes to step S214.

[0168] If not, it indicates that the channel is not occupied, and the process goes to step S213.

[0169] Step S213: Determine whether the channel is an idle channel.

[0170] Step S214: Determine that the channel is an occupied channel.

[0171] Step S215: Sort the channels.

[0172] Specifically, the channels are sorted according to the channel occupancy and RSSI values.

[0173] Figure 6 FIG. 1 is a flow chart of sorting target channels according to an embodiment of the present invention. Figure 6 As shown, the sorting of target channels includes the following steps:

[0174] Step S2151: Sort the occupied channels from large to small according to the received signal strength indicator values ​​to obtain a sequence of occupied channels.

[0175] Specifically, the channels to be sorted include occupied channels and idle channels. By sorting the occupied channels according to their RSSI values, the larger the RSSI value, the higher the channel occupancy. All occupied channels are sorted according to their RSSI values ​​to obtain a sequence of occupied channels. For example, if there are three occupied channels, the RSSI value of channel A1 is 1, the RSSI value of channel A2 is 10, and the RSSI value of channel A3 is 5, then the sequence of occupied channels is: channel A2, channel A3, channel 1.

[0176] Step S2152: Sort the idle channels from large to small according to the received signal strength indicator values ​​to obtain a sequence of idle channels.

[0177] Similarly, for idle channels, lower RSSI values ​​indicate higher channel availability. All idle channels are sorted by RSSI value to obtain a sequence of idle channels. For example, if there are three idle channels, channel A4 has an RSSI of 3, channel A5 has an RSSI of 2, and channel A6 has an RSSI of 6, then the sequence of idle channels is: channel A6, channel A4, channel A5.

[0178] Step S2153: Arrange the sequence of the idle channels after the sequence of the occupied channels.

[0179] Specifically, the sequence of idle channels is sorted after the sequence of occupied channels to obtain the sorted sequence of all target channels. According to the above example, for channels A1, A2, A3, A4, A5, and A6 to be sorted, the specific sorting is: channel A2, channel A3, channel A1, channel A6, channel A4, and channel A5.

[0180] After the sorting is completed, the sorting result is fed back to the upper link. Based on the sorting result, the upper link will give priority to the channel in the front when it needs to use the occupied channel.

[0181] Figure 7FIG. 1 is a flow chart of sorting target channels according to another embodiment of the present invention. Figure 7 As shown, the sorting of target channels includes the following steps:

[0182] Step S2154: Sort the idle channels from small to large according to the received signal strength indicator values ​​to obtain a sequence of idle channels.

[0183] Step S2155: Sort the occupied channels from small to large according to the received signal strength indicator values ​​to obtain a sequence of occupied channels.

[0184] Step S2156: Arrange the sequence of the occupied channels after the sequence of the idle channels.

[0185] Specifically, the sorting steps of another embodiment are similar to the sorting method of the previous embodiment, with the specific difference being that the sorting method is exactly opposite, that is, the obtained sequence is the opposite sequence of the previous embodiment.

[0186] Specifically, for channel A1, channel A2, channel A3, channel A4, channel A5, and channel A6, the sorting results obtained according to this embodiment are: channel A5, channel A4, channel A6, channel A1, channel A3, and channel A2.

[0187] The ranking of the target channels achieved in this embodiment is fed back to the upper link. Based on the ranking result, the upper link will give priority to the channel ranked first when it needs to use an idle channel.

[0188] However, Figure 6 and Figure 7 The sorting method is based on the occupancy and RSSI values ​​of all channels. That is to say, Figure 6 and Figure 7 This only shows the sorting results, not the sorting process. Specifically, in the actual sorting process, after a channel is scanned, it is sorted based on RSSI value and occupancy. For example, after scanning five channels, the sorting buffer length of these five channels is complete. At this point, after scanning the sixth channel, the sixth channel needs to be inserted into the sequence of five channels to obtain a new sorting sequence.

[0189] Figure 8 This is a flow chart of real-time sorting of channels according to RSSI values ​​in an embodiment of the present invention. In this embodiment, the channels are sorted from largest to smallest according to their occupancy level. Figure 8 As shown, the real-time sorting of channels according to RSSI values ​​includes the following steps:

[0190] Step S301: Assign the initial value of i to 0.

[0191] Here, i is a loop identifier, initially assigned a value of 0. After each loop, the value of i is incremented by one. Each loop compares the data of the channel to be sorted with the data of a channel in the buffer sequence and performs a corresponding operation based on the comparison result, specifically moving or not moving the channel. Thus, the data of the channel to be sorted is compared with the data of each channel in the buffer, thereby determining the order of the channels to be sorted in the buffer sequence. The channel data specifically includes the frame detection flag and RSSI value. The channel to be sorted is the channel to be sorted in this process.

[0192] Step S302: Determine whether the value of i is less than L.

[0193] Wherein, L is the buffer length, specifically the amount of channel data in the buffer.

[0194] If so, it indicates that the data of the channel to be sorted has not been compared with all the channel data in the buffer sequence, and the position of the channel to be sorted in the sequence needs to be determined, and the process goes to step S303.

[0195] If not, it indicates that the loop has been executed L times and comparisons have been performed L times, that is, the data of the channel to be sorted has been compared with the data of all channels in the buffer sequence, and the process goes to step S314.

[0196] Step S303: Determine whether the frame detection flag of the channel to be sorted is greater than the frame detection flag of the channel with sequence number [Li-1] in the buffer.

[0197] The frame detection flag is specifically a frame detection identification bit. The frame detection flag of an occupied channel is larger than the frame detection flag of an idle channel. Furthermore, for a channel, the larger the RSSI value, the larger the corresponding frame detection flag value. Therefore, if the frame detection flag of channel A is larger than the frame detection flag of another channel B, channel A is ranked before channel B, and there is no need to compare RSSI values. If the frame detection flags of channels A and B are the same, it is necessary to compare the RSSI values ​​of the two channels.

[0198] A schematic diagram of a buffer sequence according to an embodiment of the present invention is shown in FIG. Figure 9 As shown, the sequence number is the sequence number of the channel that has been sorted. Figure 9 For the four channels g1, g2, g3, and g4 that have been sorted, their buffer sequence is [0], [1], [2], and [3]. Since the embodiment of the present invention sorts the channels from highest to lowest occupancy, the RSSI values ​​of [0], [1], [2], and [3] are arranged in descending order.

[0199] It should be noted that after the channels to be sorted are sorted, the buffer length needs to be increased by 1. Therefore, it is necessary to define [4] for data storage during the sorting process.

[0200] Specifically, in this step, the size of the frame detection markers of the channel to be detected and [Li-1] is compared. Since L = 4 and i = 0 in the first loop, the first loop compares the size of the frame detection marker of the channel to be detected with the size of the frame detection marker of channel g4. After one loop, the value of i is 1, and the second loop compares the size of the frame detection marker of the channel to be detected with the size of the frame detection marker of channel g3. Similarly, the next two loops compare the size of the frame detection marker of the channel to be detected with the size of the frame detection markers of g2 and g1, respectively.

[0201] It should be understood that for subsequent steps, such as the comparison size in step S305, the loop logic is consistent with the loop of this step, and the data of the channel to be detected is compared with the data g4 of the last channel in the sequence, and then compared with g3, g2, and g1 in subsequent loops. The embodiment of the present invention is not described in detail here.

[0202] If so, it indicates that the RSSI value of the channel to be sorted is greater than the RSSI value of the channel with sequence number [Li-1] in the buffer. Therefore, the channel to be sorted should be placed before the channel with sequence number [Li-1] in the buffer, and the process goes to step S304.

[0203] If not, the RSSI value of the channel to be sorted and the RSSI value of the channel with sequence number [Li-1] in the buffer cannot be compared with each other by comparing the frame detection flags, and the process proceeds to step S305 to continue the determination.

[0204] Step S304: Assign W=1.

[0205] In this embodiment, a shift flag W is set. When the shift flag W is a first flag, it indicates that a shift is required. When the shift flag W is a second flag, it indicates that a shift is not required.

[0206] In some embodiments, the first flag is set to 1 and the second flag is set to 0.

[0207] That is, when it is determined that the RSSI value of the channel to be sorted is greater than the RSSI value of the channel with sequence number [ni-1] in the buffer, it indicates that shifting is required, and the shift flag is assigned a value of 1. At this time, the channel with sequence number [Li-1] needs to be shifted.

[0208] Step S305: Determine whether the frame detection flag of the channel to be sorted is smaller than the frame detection flag of the channel with sequence number [ni-1] in the buffer.

[0209] When it is detected that the frame detection flag of the channel to be sorted is not greater than the frame detection flag of the channel with sequence number [Li-1] in the buffer, it is determined whether the frame detection flag of the channel to be sorted is less than the frame detection flag of the channel with sequence number [Li-1] in the buffer.

[0210] If so, it indicates that the RSSI value of the channel to be sorted is less than the RSSI value of the channel with sequence number [Li-1] in the buffer. Therefore, the channel to be sorted should be placed after the channel with sequence number [Li-1] in the buffer, and step S306 is entered.

[0211] If not, it indicates that the frame detection mark of the channel to be sorted is the same as the frame detection mark of the buffer with sequence number [Li-1]. The size cannot be determined by comparing the frame detection marks. It is necessary to compare the RSSI values ​​of the two channels for further judgment, and enter step S307.

[0212] Step S306: Assign W=0.

[0213] If the frame detection flag of the channel to be sorted is less than the frame detection flag of the channel with sequence number [Li-1] in the buffer, it indicates that the RSSI value of the channel to be sorted is less than the RSSI value of the channel with sequence number [Li-1] in the buffer. The shift flag is assigned the second flag, that is, W = 0. In this case, the channel with sequence number [Li-1] needs to be shifted.

[0214] Step S307: Determine whether the RSSI value of the channel to be sorted is less than the RSSI value of the channel with sequence number [Li-1] in the buffer.

[0215] If so, it indicates that the RSSI value of the channel to be sorted is smaller than the RSSI value of the channel with sequence number [Li-1] in the buffer. The channel to be sorted needs to be placed after the channel with sequence number [Li-1] in the buffer, and then proceeds to step S308.

[0216] If not, it indicates that the RSSI value of the channel to be sorted is greater than the RSSI value of the channel with sequence number [Li-1] in the buffer, and the channel to be sorted needs to be placed before the channel with sequence number [Li-1] in the buffer, and the process goes to step S309.

[0217] Step S308: Assign W=0.

[0218] When the RSSI value of the channel to be sorted is smaller than the RSSI value of the channel with sequence number [Li-1] in the buffer, there is no need to shift the channel with sequence number [Li-1], and W=0 is assigned.

[0219] Step S309: Assign W=1.

[0220] When the RSSI value of the channel to be sorted is greater than or equal to the RSSI value of the channel with sequence number [Li-1] in the buffer, the channel with sequence number [Li-1] needs to be shifted and assigned a value of W=1.

[0221] Step S310: Determine whether the value of W is 1.

[0222] If so, it indicates that shifting is required, and the process goes to step S312.

[0223] If not, it means that no shift is required, and the process goes to step S311.

[0224] Step S311: Determine the data with the sequence number [Li] as the RSSI value and frame detection flag of the channel to be sorted.

[0225] Specifically, when the value of W is 0, that is, after determining that the RSSI value of the channel to be sorted is less than the channel with sequence number [Li-1] in the buffer, the data with sequence number [Li] in the buffer is determined as the RSSI value and frame detection mark of the channel to be sorted.

[0226] After the data with the sequence number [Li] is determined as the RSSI value and the frame detection flag of the channel to be sorted, the position of the channel to be sorted has been determined, indicating that the sorting of the channel to be sorted is completed, and the process proceeds to step S315.

[0227] If the value of W is 1, it means that the channel to be sorted needs to be sorted before the channel with sequence number [Li-1] in the buffer, and step S312 needs to be executed.

[0228] Step S312: Determine the data of the channel with the sequence number [Li] in the buffer as the data of [Li-1].

[0229] Specifically, when the value of W is 1, that is, after determining that the RSSI value of the channel to be sorted is greater than the RSSI value of the channel with sequence number [ni-1] in the buffer, the data with sequence number [Li-1] in the buffer is moved back one position, that is, [Li] in the buffer sequence is assigned to the data of [Li-1].

[0230] Step S313: The value of i is increased by one.

[0231] After one determination, if the RSSI value of the channel to be sorted is higher, it indicates that the channel to be sorted should be earlier than the position with the sequence number [Li-1] in the buffer. At this point, it is necessary to further determine the RSSI of the channel to be sorted and other channels. Therefore, the value of i is incremented by one, and the loop continues to compare the frame detection flag and RSSI value of the previous channel.

[0232] After completing step S313, the process returns to step S302 and the loop continues according to the value of i that has been incremented by 1. Specifically, after determining that the order of the channel to be sorted and the channel with sequence number [L-1] in the buffer is that the channel to be sorted comes first, the process continues by determining the order of the channel to be sorted and the previous channel in the buffer, i.e., the channel with sequence number [L-2], and so on until the loop terminates.

[0233] Step S314: Determine the data of the channel with sequence number [0] in the buffer as the RSSI value and frame detection flag of the channel to be sorted.

[0234] Specifically, after L cycles, if the judgment result is that the RSSI value of the channel to be detected is greater than the RSSI value of the original channel in the buffer, it means that the RSSI value of the channel to be detected is greater than the RSSI values ​​of all the original channels. Therefore, it is necessary to put the channel to be detected at the front of the sequence, that is, the channel with sequence number [0] in the buffer.

[0235] Step S315, end.

[0236] The following example illustrates this. Currently, there are three channels of data in the buffer, sorted as follows: [0]: Channel A, Frame Detection Flag 8, RSSI 60; [1]: Channel B, Frame Detection Flag 6, RSSI 40; [2]: Channel C, Frame Detection Flag 0, RSSI 5.

[0237] If the frame detection flag of the channel to be sorted, X, is 6 and its RSSI value is 35, the first step is to determine the difference between the frame detection flag values ​​of the channel to be sorted and the channel numbered [Li-1] (where L=3 and i=0, i.e., [2]) in the buffer. In this example, the frame detection flag of the channel to be sorted is greater than the frame detection flag of channel C, so W is assigned a value of 1, and in step S312, the RSSI value and frame detection flag of [2] are assigned to [3]. At the same time, the value of i is incremented from 0 to 1, and the process returns to step S302.

[0238] Since the value of i is still less than L at this time, the value of the frame detection flag of the channel to be sorted and the channel with sequence number [Li-1] (where L=3, i=1, that is, [1]) in the buffer is determined. Since the frame detection flags of the channel to be sorted and the channel with sequence number [1] in the buffer are the same, the judgments in steps S303 and S305 are both negative, and the process proceeds to step S307. In step S307, the RSSI values ​​of the channel to be sorted and the channel with sequence number [1] in the buffer are compared. Since the RSSI value of the channel to be sorted is less than the RSSI value of the channel with sequence number [1] in the buffer, the process proceeds to step S308, assigns the value of W to 0, and proceeds to step S311. In step S311, the data with sequence number [Li] (that is, [2]) is determined as the RSSI value and frame detection flag of the channel to be sorted.

[0239] Through sorting, the new channel sorting sequence obtained is [0]: Channel A, frame detection mark is 8, RSSI value is 60; [1]: Channel B, frame detection mark is 6, RSSI value is 40; [2]: Channel X, frame detection mark is 6, RSSI value is 35; [3]: Channel C, frame detection mark is 0, RSSI value is 5.

[0240] It should be understood that this embodiment specifically sorts from large to small according to the degree of occupancy. If it is necessary to sort from large to small according to the degree of idleness, all steps with W=0 in the flowchart are transformed into W=1, and all steps with W=1 are transformed into W=0. This embodiment of the present invention will not be elaborated on this.

[0241] Step S216, end.

[0242] The technical solution of the embodiment of the present invention determines a target channel and a target frequency sweep mode, performs frame detection on the target channel, and in response to detecting a frame header of the target channel during the frame detection, determines a frequency offset estimate of the target channel, which represents the difference between the frequencies of the transmitting and receiving ends of the signal. The actual frequency sweep mode of the target channel is then determined, and the occupancy of the target channel is determined based on the target frequency sweep mode, the actual frequency sweep mode, and the frequency offset estimate. Thus, the occupancy of the target channel can be accurately determined.

[0243] Figure 10 FIG. 5 is a schematic diagram of a channel detection method according to another embodiment of the present invention, which specifically includes the following steps:

[0244] Step S401: Determine the target channel and target frequency scanning mode.

[0245] Step S402: Perform frame detection on the target channel.

[0246] Step S403: In response to detecting the frame header of the target channel in the frame detection, determine a frequency offset estimate of the target channel, where the frequency offset estimate is used to represent the difference between the frequencies of the transmitting end and the receiving end of the signal.

[0247] Step S404: Determine the actual frequency scanning mode of the target channel.

[0248] Step S405: Determine the occupancy status of the target channel according to the target frequency sweep mode, the actual frequency sweep mode, and the frequency offset estimation of the target channel.

[0249] Figure 11 FIG. 1 is a flow chart of determining the order of target channels according to an embodiment of the present invention. Figure 4 As shown, determining the order of target channels includes the following steps:

[0250] Step S406: Determine the received signal strength indicator value of the target channel in a predetermined manner.

[0251] Step S407: sort the target channels according to the occupancy status of each target channel and the received signal strength indicator value of the target channel.

[0252] Specifically, sorting the target channels is specifically sorting the target channels based on the priority of the channels to the needs when the channels need to be used, so that when the channels need to be used, the optimal channel can be selected according to the sequence generated by sorting the target channels.

[0253] The embodiments of the present invention determine a target channel and a target frequency sweep mode, perform frame detection on the target channel, and in response to detecting a frame header of the target channel during the frame detection, determine a frequency offset estimate of the target channel, wherein the frequency offset estimate represents the difference between the frequencies of the transmitting and receiving ends of the signal. The actual frequency sweep mode of the target channel is then determined, and the occupancy of the target channel is determined based on the target frequency sweep mode, the actual frequency sweep mode, and the frequency offset estimate. Thus, the occupancy of the target channel can be accurately determined.

[0254] Figure 12 Schematic diagram of a channel detection device according to an embodiment of the present invention. Figure 12As shown, the channel detection device includes a target channel determination unit 121, a frame detection unit 122, a frequency offset estimation determination unit 123, a sweep mode determination unit 124, and an occupancy determination unit 125. The target channel determination unit 121 is used to determine the target channel and the target sweep mode. The frame detection unit 122 is used to perform frame detection on the target channel. The frequency offset estimation determination unit 123 is used to determine the frequency offset estimate of the target channel in response to detecting the frame header of the target channel in the frame detection, and the frequency offset estimate is used to represent the difference between the transmitting end and the receiving end frequency of the signal. The sweep mode determination unit 124 is used to determine the actual sweep mode of the target channel. The occupancy determination unit 125 is used to determine the occupancy of the target channel based on the target sweep mode, actual sweep mode and frequency offset estimation of the target channel.

[0255] In some embodiments, the frequency sweep mode determining unit includes:

[0256] A determination subunit, used to determine candidate frequency sweep modes and long training sequences;

[0257] A correlation peak power determination subunit, configured to determine the correlation peak power corresponding to the candidate frequency sweep mode according to the candidate frequency sweep mode and the long training sequence;

[0258] The actual frequency sweep mode determining subunit is configured to determine the candidate frequency sweep mode corresponding to the largest correlation peak power as the actual frequency sweep mode of the target channel.

[0259] In some embodiments, the occupancy determination unit includes:

[0260] an occupied channel determining subunit, configured to determine that the target channel is an occupied channel in response to a target frequency sweep mode of the target channel being the same as an actual frequency sweep mode and the frequency offset estimate being less than a first predetermined value;

[0261] The idle channel determining subunit is configured to determine that the target channel is an idle channel in response to the target frequency sweep mode of the target channel being different from the actual frequency sweep mode or the frequency offset estimate being greater than or equal to a first predetermined value.

[0262] In some embodiments, the apparatus further comprises:

[0263] a signal strength indicator value determining unit, configured to determine a received signal strength indicator value of the target channel in a predetermined manner;

[0264] The sorting unit is used to sort the target channels according to the occupancy status of each target channel and the received signal strength indicator value of the target channel.

[0265] In some embodiments, the strength indication value determining unit includes:

[0266] a signal strength determination subunit, configured to perform multiple samplings through a predetermined sampling period to obtain multiple sets of received signal strength values;

[0267] an average signal strength determination subunit, configured to determine an average received signal strength value of each group of received signal strength values;

[0268] an amplification factor determination subunit, for determining the amplification factor of the analog end;

[0269] a strength decibel value determining subunit, configured to determine a strength decibel value corresponding to each group of received signal strength values ​​according to the amplification factor and the average received signal strength value;

[0270] an average intensity decibel value determining subunit, used for determining an average intensity decibel value of a plurality of groups of intensity decibel values;

[0271] The strength indication value determining subunit is configured to subtract the average strength decibel value from the linear calibration component to obtain a received signal strength indication value.

[0272] In some embodiments, the apparatus further comprises:

[0273] The idle channel determining unit is configured to determine that the target channel is an idle channel in response to not detecting a frame header of the target channel in frame detection.

[0274] In some embodiments, the sorting unit specifically includes:

[0275] a first occupied channel sorting subunit, configured to sort the occupied channels from large to small according to received signal strength indicator values ​​to obtain a sequence of occupied channels;

[0276] A first idle channel sorting subunit is configured to sort the idle channels from large to small according to the received signal strength indicator values ​​to obtain a sequence of idle channels;

[0277] The first total ordering subunit is configured to arrange the sequence of the idle channels after the sequence of the occupied channels.

[0278] In some embodiments, the sorting unit is specifically configured to:

[0279] A second idle channel sorting subunit is configured to sort the idle channels in ascending order according to the received signal strength indicator values ​​to obtain a sequence of idle channels;

[0280] a second occupied channel sorting subunit, configured to sort the occupied channels from small to large according to the received signal strength indicator values ​​to obtain a sequence of occupied channels;

[0281] The second total ordering subunit is configured to arrange the sequence of the occupied channels after the sequence of the idle channels.

[0282] In some embodiments, the intensity decibel value determined according to the amplification factor and the received signal strength value is specifically calculated by the following formula:

[0283] R=10logP Rn -G an

[0284] Wherein, R is the intensity decibel value, P Rn is the average received signal strength value, G an is the amplification factor of the analog end.

[0285] The embodiments of the present invention determine a target channel and a target frequency sweep mode, perform frame detection on the target channel, and in response to detecting a frame header of the target channel during the frame detection, determine a frequency offset estimate of the target channel, wherein the frequency offset estimate represents the difference between the frequencies of the transmitting and receiving ends of the signal. The actual frequency sweep mode of the target channel is then determined, and the occupancy of the target channel is determined based on the target frequency sweep mode, the actual frequency sweep mode, and the frequency offset estimate. Thus, the occupancy of the target channel can be accurately determined.

[0286] Figure 13 Schematic diagram of an electronic device according to an embodiment of the present invention. Figure 13 As shown, Figure 13 The electronic device shown is a general address query device, which includes a general computer hardware structure, including at least a processor 131 and a memory 132. The processor 131 and the memory 132 are connected via a bus 133. The memory 132 is suitable for storing instructions or programs executable by the processor 131. The processor 131 can be a standalone microprocessor or a collection of one or more microprocessors. Thus, the processor 131 executes the instructions stored in the memory 132, thereby performing the method flow of the embodiment of the present invention described above to process data and control other devices. The bus 133 connects the above-mentioned multiple components together and also connects them to the display controller 134 and the display device as well as the input / output (I / O) device 135. The input / output (I / O) device 135 can be a mouse, keyboard, modem, network interface, touch input device, somatosensory input device, printer, and other devices known in the art. Typically, the input / output device 135 is connected to the system via an input / output (I / O) controller 136.

[0287] It will be understood by those skilled in the art that the embodiments of the present application may be provided as methods, devices (equipment), or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0288] The present application is described with reference to flowcharts of methods, apparatuses (devices), and computer program products according to embodiments of the present application. It should be understood that each process in the flowcharts can be implemented by computer program instructions.

[0289] These computer program instructions may be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device that implements the process Figure 1 A function specified in a process or multiple processes.

[0290] These computer program instructions can also be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce the instructions for implementing the process Figure 1 A device that specifies functions in a process or multiple processes.

[0291] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, wherein the computer-readable program is used to enable a computer to execute part or all of the above method embodiments.

[0292] That is, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiments can be implemented by specifying relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.

[0293] The foregoing is merely a preferred embodiment of the present application and is not intended to limit the present application. Persons skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application are intended to be within the scope of protection of the present application.

Claims

1. A channel detection method, characterized in that: The method comprises: Determine the target channel and target detection method; Performing frame detection on the target channel; In response to detecting a frame header of the target channel in the frame detection, determining a frequency offset estimate of the target channel, the frequency offset estimate being used to represent a difference between a transmitting end and a receiving end frequency of the signal; Determining an actual frequency scanning mode of the target channel; The occupancy status of the target channel is determined according to the target frequency scanning mode, the actual frequency scanning mode and the frequency offset estimation of the target channel.

2. The method according to claim 1, characterized in that The actual frequency scanning mode of determining the target channel includes: Determine candidate frequency sweep modes and long training sequences; Determine the correlation peak power corresponding to the candidate frequency sweep mode according to the candidate frequency sweep mode and the long training sequence; The candidate frequency scanning mode corresponding to the largest correlation peak power is determined as the actual frequency scanning mode of the target channel.

3. The method according to claim 1, characterized in that Determining the occupancy of the target channel according to the target frequency scanning mode, the actual frequency scanning mode and the frequency offset estimation of the target channel includes: In response to the target frequency scanning mode of the target channel being the same as the actual frequency scanning mode and the frequency offset estimate being less than a first predetermined value, determining that the target channel is an occupied channel; In response to the target frequency scanning mode of the target channel being different from the actual frequency scanning mode or the frequency offset estimate being greater than or equal to a first predetermined value, the target channel is determined to be an idle channel.

4. The method according to claim 3, characterized in that The method further comprises: Determine a received signal strength indicator value of the target channel in a predetermined manner; The target channels are sorted according to the occupancy status of each target channel and the received signal strength indicator value of the target channel.

5. The method according to claim 4, characterized in that Determining the received signal strength indicator value of the target channel in a predetermined manner includes: Performing multiple samplings at a predetermined sampling period to obtain multiple sets of received signal strength values; Determine the average received signal strength value of each group of received signal strength values ​​respectively; Determine the amplification factor of the analog end; Determine the intensity decibel value corresponding to each group of received signal strength values ​​according to the amplification factor and the average received signal strength value; Determining an average intensity decibel value of the plurality of sets of intensity decibel values; The average strength decibel value is subtracted from the linear calibration component to obtain a received signal strength indication value.

6. The method according to claim 1, characterized in that The method further comprises: In response to not detecting a frame header of the target channel in frame detection, determining that the target channel is an idle channel.

7. The method according to claim 4, characterized in that The step of sorting the target channels according to the occupancy of each target channel and the received signal strength indicator value of the target channel comprises: Sort the occupied channels from large to small according to the received signal strength indicator values ​​to obtain a sequence of occupied channels; Sort the idle channels from large to small according to the received signal strength indicator values ​​to obtain a sequence of idle channels; The sequence of the idle channels is arranged after the sequence of the occupied channels.

8. The method according to claim 4, characterized in that The step of sorting the target channels according to the occupancy of each target channel and the received signal strength indicator value of the target channel comprises: Sort the idle channels from small to large according to the received signal strength indicator values ​​to obtain a sequence of idle channels; Sort the occupied channels from small to large according to the received signal strength indicator values ​​to obtain a sequence of occupied channels; The sequence of the occupied channels is arranged after the sequence of the idle channels.

9. The method according to claim 5, characterized in that The intensity decibel value determined according to the amplification factor and the received signal strength value is specifically calculated by the following formula: R=10logP Rn -G an Wherein, R is the intensity decibel value, P Rn is the average received signal strength value, G an is the amplification factor of the analog end.

10. A channel detection device, characterized in that: The device comprises: A target channel determination unit, used to determine a target channel and a target frequency scanning mode; A frame detection unit, used for performing frame detection on the target channel; a frequency offset estimation determination unit, configured to determine a frequency offset estimation of the target channel in response to detecting a frame header of the target channel in frame detection, wherein the frequency offset estimation is used to represent a difference between a transmitting end and a receiving end frequency of a signal; A frequency scanning mode determining unit, used to determine an actual frequency scanning mode of the target channel; The occupancy determination unit is used to determine the occupancy of the target channel according to the target frequency scanning mode, the actual frequency scanning mode and the frequency offset estimation of the target channel.