Double-threshold spectrum sensing method and device based on self-adaptive time varying, equipment and medium

By updating the double threshold in each time slot and adjusting according to the detection results, an adaptive time-varying spectrum perception method is realized, solving the problem of misjudgment in the environment and power changes of traditional methods, and improving the accuracy of spectrum perception.

CN119602898APending Publication Date: 2025-03-11LIAONING TECHNICAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411341725.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The traditional fixed double-threshold spectrum perception method is prone to misjudgment when the environment and main user transmission power changes, resulting in spectrum perception errors and cannot meet performance requirements.

Method used

Adaptive time-varying dual-threshold spectrum perception method is adopted, by updating high thresholds and low thresholds in each time slot, adjusting the thresholds according to the detection results in the continuous time slots, and adaptive adjustment is achieved.

Benefits of technology

It improves the accuracy of spectrum perception, can effectively adjust thresholds under time and environment changes, reduce misjudgment, and meet performance requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119602898A_ABST
    Figure CN119602898A_ABST
Patent Text Reader

Abstract

The invention discloses a double-threshold spectrum sensing method, device and equipment based on self-adaptive time varying and a medium, and relates to the field of signal detection.The method comprises the steps that for the spectrum sensing process of the jth time slot, a high threshold and a low threshold are updated, and the high threshold of the jth time slot and the low threshold of the jth time slot are obtained; according to the energy received by the receiver of the jth time slot and the high threshold and the low threshold of the jth time slot, judging whether the jth time slot has a main user signal or not; according to the energy received by the jth time slot receiver and the state parameter, the high threshold and the low threshold of the (j-1) th time slot, updating the existence count value, the non-existence count value and the state parameter to obtain the existence count value, the non-existence count value and the state parameter of the jth time slot; and the spectrum sensing process is ended until the last time slot in the spectrum sensing period is reached. According to the invention, the threshold can be adaptively adjusted along with the change of time and environment, so that the accuracy of spectrum sensing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of signal detection, and in particular to a method, device, equipment and medium for sensing spectrum with dual thresholds based on adaptive time variation. Background Art

[0002] In spectrum sensing, a fixed dual-threshold sensing method is generally used to detect and extract useful information from signals. It distinguishes different states or characteristics of signals based on setting two thresholds. The traditional dual-threshold energy detection scheme is to solve the problem that the energy value of the primary user (PU) signal after the energy and noise are superimposed is difficult to distinguish from the energy value of only noise when the signal-to-noise ratio is low. For energy values ​​that are easy to distinguish: the collected energy value is compared with the fixed threshold. If the energy value is greater than the high threshold, it is judged that the primary user energy exists, and if it is lower than the low threshold, it is judged that the primary user energy does not exist. In actual equipment, the preset thresholds are mostly fixed, while the environment and PU transmission power are variable. When the environment changes or the preset initial threshold does not meet the requirements, the detector will have a large number of misjudgments, resulting in spectrum sensing errors in the fixed threshold sensing scheme, which does not meet the performance requirements. Summary of the invention

[0003] The purpose of this application is to provide a dual-threshold spectrum sensing method, device, equipment and medium based on adaptive time-varying, which can adaptively adjust the threshold with time and environmental changes, thereby improving the accuracy of spectrum sensing.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] In a first aspect, the present application provides a dual-threshold spectrum sensing method based on adaptive time variation, comprising:

[0006] Determine initial state parameters, initial high threshold, initial low threshold, initial existence count value, initial non-existence count value, existence time slot threshold number and non-existence time slot threshold number;

[0007] For the spectrum sensing process of the jth time slot in the spectrum sensing period, according to the existence count value of the j-1th time slot, the non-existence count value of the j-1th time slot, the existence time slot threshold number and the non-existence time slot threshold number, the high threshold of the j-1th time slot and the low threshold of the j-1th time slot are updated to obtain the high threshold of the jth time slot and the low threshold of the jth time slot; j>0; the high threshold of the 0th time slot is the initial high threshold, the low threshold of the 0th time slot is the initial low threshold, the existence count value of the 0th time slot is the initial existence count value, and the non-existence count value of the 0th time slot is the initial non-existence count value;

[0008] According to the energy received by the receiver in the jth time slot, the upper threshold of the jth time slot and the lower threshold of the jth time slot, it is judged whether there is a primary user signal in the jth time slot to determine the activity state of the primary user in the jth time slot on the channel; the activity state of the primary user on the channel is idle or occupied;

[0009] According to the energy received by the receiver of the j-th time slot, the state parameter of the j-1-th time slot, the upper threshold of the j-th time slot and the lower threshold of the j-th time slot, the existence count value of the j-1-th time slot, the non-existence count value of the j-1-th time slot and the state parameter of the j-1-th time slot are updated to obtain the existence count value of the j-th time slot, the non-existence count value of the j-th time slot and the state parameter of the j-th time slot; the state parameter of the 0-th time slot is the initial state parameter;

[0010] It is determined whether the jth time slot is the last time slot in the spectrum sensing cycle. If so, the spectrum sensing process is terminated; otherwise, the spectrum sensing process of the j+1th time slot is performed.

[0011] In a second aspect, the present application provides a dual-threshold spectrum sensing device based on adaptive time variation, comprising:

[0012] An initialization module, used to determine an initial state parameter, an initial high threshold, an initial low threshold, an initial existence count value, an initial non-existence count value, an existence time slot threshold number, and an non-existence time slot threshold number;

[0013] A threshold updating module, connected to the initialization module, for the spectrum sensing process of the j-th time slot within the spectrum sensing period, according to the existence count value of the j-1th time slot, the non-existence count value of the j-1th time slot, the existence time slot threshold number and the non-existence time slot threshold number, to update the high threshold of the j-1th time slot and the low threshold of the j-1th time slot, so as to obtain the high threshold of the j-th time slot and the low threshold of the j-th time slot; j>0; the high threshold of the 0th time slot is the initial high threshold, the low threshold of the 0th time slot is the initial low threshold, the existence count value of the 0th time slot is the initial existence count value, and the non-existence count value of the 0th time slot is the initial non-existence count value;

[0014] a spectrum sensing module, connected to the threshold updating module, for judging whether there is a primary user signal in the jth time slot according to the energy received by the jth time slot receiver, the upper threshold of the jth time slot and the lower threshold of the jth time slot, so as to determine the activity state of the primary user in the jth time slot on the channel; the activity state of the primary user on the channel is idle or occupied;

[0015] A counting module connected to the spectrum sensing module, configured to update the existence count value of the j-1th time slot, the non-existence count value of the j-1th time slot, and the state parameter of the j-1th time slot according to the energy received by the j-th time slot receiver, the state parameter of the j-1th time slot, the upper threshold of the j-th time slot, and the lower threshold of the j-th time slot, to obtain the existence count value of the j-th time slot, the non-existence count value of the j-th time slot, and the state parameter of the j-th time slot; the state parameter of the 0th time slot is the initial state parameter;

[0016] The iteration module is connected to the counting module and the threshold updating module respectively, and is used to determine whether the jth time slot is the last time slot in the spectrum sensing cycle. If so, the spectrum sensing process is terminated, otherwise, the spectrum sensing process of the j+1th time slot is performed.

[0017] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned dual-threshold spectrum sensing method based on adaptive time variation.

[0018] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned dual-threshold spectrum sensing method based on adaptive time variation is implemented.

[0019] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0020] The present application provides a dual-threshold spectrum sensing method, apparatus, device and medium based on adaptive time variation. The time slot for collecting energy is used as a unit. When the presence or absence of a primary user signal is detected in multiple consecutive time slots, the high threshold or low threshold is adjusted. Specifically, if the primary user signal has not been detected after a certain number of time slots, it means that the current threshold setting is too high, and the high threshold is updated. If the primary user signal is continuously detected after a certain number of time slots, it means that the current threshold setting is too low, and the low threshold is updated. The present application can adaptively adjust the threshold as time and environment change, thereby improving the accuracy of spectrum sensing. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1This is an application environment diagram of an adaptive time-varying dual-threshold spectrum sensing method in an embodiment of the present application;

[0023] Figure 2 A schematic diagram of a flow chart of a dual-threshold spectrum sensing method based on adaptive time-varying provided in one embodiment of the present application;

[0024] Figure 3 A schematic diagram of the overall principle of a dual-threshold spectrum sensing method based on adaptive time variation provided in an embodiment of the present application;

[0025] Figure 4 A schematic diagram of functional modules of a dual-threshold spectrum sensing device based on adaptive time-varying according to an embodiment of the present application;

[0026] Figure 5 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0029] Dual threshold means setting two different thresholds during signal processing: a high threshold and a low threshold. These two thresholds are used to classify signals into different states or categories. Specifically, by comparing the size relationship between the signal and the high threshold and the low threshold, the state of the signal or whether it needs further processing is determined.

[0030] Signal processing using double thresholds generally includes the following processes:

[0031] (1) Signal sampling: The analog signal received by the receiver is converted into a digital signal and sampled. The signal may come from various sources, such as sensors, communication systems, etc.

[0032] (2) Setting thresholds: Determine appropriate upper and lower thresholds. The selection of upper and lower thresholds usually depends on the application scenario and signal characteristics. The upper threshold is usually set to a higher value to identify significant features in the signal; the lower threshold is set to a lower value to identify noise or weaker features in the signal.

[0033] (3) Signal comparison: Compare the sampled signal with the set upper and lower thresholds. Based on the comparison results, the signal can be classified into the following states:

[0034] If the signal is higher than the upper threshold, it may indicate that the signal has significant characteristics and can be marked as a useful signal, that is, the channel is occupied.

[0035] The signal is below the lower threshold: This may mean that the signal is at the noise level and may be ignored, that is, the channel is idle.

[0036] The signal is between two thresholds: further processing or analysis may be required to determine whether it is a signal of interest.

[0037] (4) Signal processing: Based on the above comparison results, the signal is further processed. For example, signals that meet the conditions are screened out for analysis, or signals below a lower threshold are denoised.

[0038] When the environment changes (the noise in the electromagnetic space will change continuously, and the PU transmission power may also change) or the preset threshold does not meet the requirements, the detector will have a large number of misjudgments. If the threshold is too low, most of the collected energy values ​​will be judged as existing regardless of whether the PU exists; if the threshold is too high, most of them will be judged as non-existent. Therefore, when the detector continuously judges as existing or non-existent, it may be because the preset threshold does not meet the performance requirements in the current environment. Therefore, it is necessary to dynamically adjust the threshold over time to meet the performance requirements under the changing environment.

[0039] In order to overcome the detection error caused by the variability of noise and PU transmission requirements in the fixed dual threshold scheme in a low signal-to-noise ratio environment, the present application proposes an adaptive time-varying (ATV) feedback mechanism to adaptively adjust the threshold. In this feedback mechanism, the preset initial threshold is adjusted by introducing a feedback factor, and the feedback factor is determined by the processing center by recording the judgment result of each detection time slot, with the time interval (or time slot) of collecting energy as the unit. When the detection results in a continuous finite number of time slots are all present or not present, the processing center will adjust the threshold of the detector for the next time slot according to the threshold and feedback factor of the current time slot. Specifically, the number of consecutive time slots in which the main user is not detected is determined. If the main user is not detected after reaching a certain number of time slots, it means that the current threshold is set too high, and the threshold is lowered according to the feedback function; if the main user is detected after reaching a certain number of time slots, it means that the current threshold is set too low, and the threshold is increased according to the feedback function. The present application can adaptively adjust the threshold with time and environmental changes, thereby improving the accuracy of signal detection.

[0040] The dual-threshold spectrum sensing method based on adaptive time-varying provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send initial state parameters, initial high thresholds, initial low thresholds, initial existence count values, initial non-existence count values, the number of existence time slot thresholds, the number of non-existence time slot thresholds and the energy received by the receiver to the server 104. After receiving the data, the server 104 performs spectrum sensing and dynamically updates the high threshold and the low threshold during the spectrum sensing process. The server 104 can feedback the activity status of the main user of each time slot on the channel to the terminal 102. In addition, in some embodiments, the dual-threshold spectrum sensing method based on adaptive time variation can also be implemented by the server 104 or the terminal 102 alone.

[0041] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0042] In an exemplary embodiment, Figure 2 As shown, a dual-threshold spectrum sensing method based on adaptive time-varying is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used for explanation, and the steps include the following steps 201 to 205.

[0043] in:

[0044] Step 201, determine the initial state parameter last, the initial high threshold λ H , initial low threshold λ L , Initial existence count value slot b , Initially, there is no count value slot f , there is a time slot threshold number slot b,th And there is no time slot threshold number slot f,th .

[0045] In this application, the initial state parameter last and the initial existence count value slot bAnd the initial count value slot does not exist f Both are 0.

[0046] The presence count value and the absence count value represent counters for calculating whether the number of time slots meets the update threshold condition. The state parameter represents the activity state of the primary user on the channel. If the primary user signal exists, the state parameter is 1, and if the primary user does not exist, the state parameter is 0.

[0047] Step 202, for the spectrum sensing process of the j-th time slot in the spectrum sensing period, according to the existence count value of the j-1-th time slot, the non-existence count value of the j-1-th time slot, the existence time slot threshold number and the non-existence time slot threshold number, update the high threshold of the j-1-th time slot and the low threshold of the j-1-th time slot to obtain the high threshold of the j-th time slot and the low threshold of the j-th time slot. j>0.

[0048] The high threshold of the 0th time slot is the initial high threshold, the low threshold of the 0th time slot is the initial low threshold, the presence count value of the 0th time slot is the initial presence count value, and the absence count value of the 0th time slot is the initial absence count value.

[0049] In a specific example, when multiple time slots are detected as the presence of the primary user, and the number of time slots detected to be greater than the threshold number of time slots b,th When the primary user is detected as absent for multiple consecutive time slots, and the number of consecutive non-existent time slots is greater than the threshold number of slots f,th Step 202 includes the following steps 301 and 302.

[0050] Step 301: Determine the feedback factor of the j-th time slot according to the presence count value of the j-1th time slot, the absence count value of the j-1th time slot, the presence time slot threshold number, and the absence time slot threshold number:

[0051]

[0052] Among them, w j is the feedback factor of the jth time slot, slot f,j-1 is the absence count value of the j-1th time slot, slot b,j-1 is the existence count value of the j-1th time slot, slot f,th The number of timeslot thresholds that do not exist, slot b,th is the number of time slot thresholds.

[0053] Step 302: According to the feedback factor of the jth time slot, the upper threshold of the j-1th time slot and the lower threshold of the j-1th time slot are updated to obtain the upper threshold of the jth time slot and the lower threshold of the jth time slot:

[0054]

[0055]

[0056] Among them, λ H,j is the upper threshold of the jth time slot, λ L,j is the lower threshold of the jth time slot, λ H,j-1 is the upper threshold of the j-1th time slot, λ L,j-1 is the lower threshold of the j-1th time slot, w j is the feedback factor of the jth time slot.

[0057] Step 203, judging whether there is a primary user signal in the jth time slot according to the energy received by the receiver in the jth time slot, the upper threshold of the jth time slot and the lower threshold of the jth time slot, so as to determine the activity state of the primary user in the jth time slot on the channel. The activity state of the primary user on the channel is idle or occupied.

[0058] Specifically, if the energy received by the receiver in the jth time slot is greater than the upper threshold of the jth time slot, it is determined that there is a primary user signal in the jth time slot, and the activity state of the primary user in the jth time slot on the channel is occupied.

[0059] If the energy received by the receiver in the jth time slot is less than the lower threshold of the jth time slot, it is determined that there is no primary user signal in the jth time slot, and the activity state of the primary user in the jth time slot on the channel is idle.

[0060] Step 204: Update the existence count value of the j-1th time slot, the non-existence count value of the j-1th time slot, and the state parameter of the j-1th time slot according to the energy received by the receiver of the j-1th time slot, the state parameter of the j-1th time slot, the upper threshold of the j-1th time slot, and the lower threshold of the j-1th time slot, and obtain the existence count value of the j-th time slot, the non-existence count value of the j-th time slot, and the state parameter of the j-1th time slot. The state parameter of the 0th time slot is the initial state parameter.

[0061] In one specific example, step 204 includes:

[0062] Determine the relationship between the energy received by the receiver in the jth time slot and the upper threshold of the jth time slot and the lower threshold of the jth time slot:

[0063] If the energy received by the receiver in the jth time slot is greater than the high threshold of the jth time slot, the presence count value of the jth time slot is the presence count value of the j-1th time slot plus one, the absence count value of the jth time slot is 0, and the state parameter of the jth time slot is 1.

[0064] If the energy received by the receiver in the jth time slot is less than the lower threshold of the jth time slot, the presence count value of the jth time slot is 0, the absence count value of the jth time slot is the absence count value of the j-1th time slot plus one, and the state parameter of the jth time slot is 0.

[0065] If the energy received by the receiver in the jth time slot is between the upper threshold of the jth time slot and the lower threshold of the jth time slot, it is determined whether the state parameter of the j-1th time slot is 0. If so, the existence count value of the jth time slot is 0, and the non-existence count value of the jth time slot is the non-existence count value of the j-1th time slot plus one; otherwise, the existence count value of the jth time slot is the existence count value of the j-1th time slot plus one, and the non-existence count value of the jth time slot is 0.

[0066] Step 205, determining whether the j-th time slot is the last time slot in the spectrum sensing cycle, if so, the spectrum sensing process is terminated, otherwise, the spectrum sensing process of the j+1-th time slot is performed.

[0067] In another exemplary embodiment, in order to evaluate the performance of the dual-threshold spectrum sensing method, the dual-threshold spectrum sensing method based on adaptive time variation further includes the following steps 206 to 212:

[0068] Step 206: Determine an initial actual presence count value n1, an initial actual absence count value n0, an initial false alarm count value nf, and an initial missed detection count value nm.

[0069] In the present application, the initial actual existence count value n1, the initial actual non-existence count value n0, the initial false alarm count value nf and the initial missed detection count value nm are all 0.

[0070] The actual presence count value and the actual absence count value respectively represent the counters of the number of time slots in which the primary user actually exists and actually does not exist. The false alarm count value and the missed detection count value respectively represent the counters of incorrect detection results. When the primary user is actually not present, it is a false alarm; when the primary user is actually present, it is detected as present; when the primary user is actually present, it is detected as not present.

[0071] Step 207: For the spectrum sensing process of the jth time slot within the spectrum sensing period, if the activity state of the primary user of the jth time slot on the channel is idle, the actual absence count value of the jth time slot is the actual absence count value of the j-1th time slot plus 1. The actual absence count value of the 0th time slot is the initial actual presence count value.

[0072] Step 208: If the active state of the primary user of the jth time slot on the channel is idle and the energy received by the receiver of the jth time slot is greater than the upper threshold of the jth time slot, or the active state of the primary user of the jth time slot on the channel is idle and the energy received by the receiver of the jth time slot is between the upper threshold of the jth time slot and the lower threshold of the jth time slot and the state parameter of the jth time slot is 1, then the false alarm count value of the jth time slot is equal to the false alarm count value of the j-1th time slot plus 1. The false alarm count value of the 0th time slot is the initial false alarm count value.

[0073] Step 209: If the activity state of the primary user of the jth time slot on the channel is occupied, the actual presence count value of the jth time slot is the actual presence count value of the j-1th time slot plus 1. The actual presence count value of the 0th time slot is the initial actual presence count value.

[0074] Step 210: If the active state of the primary user of the jth time slot on the channel is occupied and the energy received by the receiver of the jth time slot is less than the lower threshold of the jth time slot, or the active state of the primary user of the jth time slot on the channel is occupied and the energy received by the receiver of the jth time slot is between the upper threshold of the jth time slot and the lower threshold of the jth time slot and the state parameter of the jth time slot is 0, then the missed detection count value of the jth time slot is equal to the missed detection count value of the j-1th time slot plus 1. The missed detection count value of the 0th time slot is the initial missed detection count value.

[0075] Step 211: Determine the false alarm probability according to the actual absence count value of the Jth time slot and the false alarm count value of the Jth time slot, where J is the last time slot in the spectrum sensing cycle.

[0076] Step 212: Determine the missed detection probability according to the actual existence count value of the Jth time slot and the missed detection count value of the Jth time slot.

[0077] In order to better understand the solution of the present application, the algorithm flow is generally introduced below.

[0078] Step 1: Initialize n0, n1, nf, nm, slot b 、slot f Both are 0.

[0079] Step 2: Detection starts and enters the loop. The receiver collects energy and obtains the energy Y of the jth time slot j .

[0080] Step 3: Set the number of time slots to the slot threshold b,th , There is no time slot threshold number slot f,th , the existence count value of the j-1th time slot slot b,j-1 and the absence count value slot of the j-1th time slot f,j-1, input formula (1) to (4), update the threshold, and obtain the high threshold λ of the jth time slot H,j and the lower threshold λ of the jth time slot L,j .

[0081] Step 4: Determine the active state Q of the jth time slot based on the actual state sequence of the primary user j .

[0082] If the PU is not actually occupying the channel, then n0=n0+1, and go to step five.

[0083] If the PU is actually occupying the channel, then n1=n1+1, and go to step six.

[0084] Step 5: Compare Y j With λ H,j and λ L,j Size:

[0085] If Y j >λ H,j Then nf=nf+1, slot b,j = slot b,j-1 +1, slot f,j =0, last j =1;

[0086] If Y j <λ L,j Then slot f,j = slot f,j-1 +1, slot b,j =0,last j =0.

[0087] If λ L,j <Y j <λ H,j , then it is necessary to determine the state parameter last of the j-1th time slot j-1 Values:

[0088] If last j-1 =0, then slot f,j = slot f,j-1 +1, slot b,j =0;

[0089] If last j-1 =1, then nf=nf+1, slot b,j = slot b,j-1 +1, slot f,j =0;

[0090] Finish and go to step seven.

[0091] Step 6: Compare Y j With λ H,j and λ L,j Size:

[0092] If Y j >λ H,j Then slot b,j = slot b,j-1 +1, slot f,j =0,last j =1;

[0093] If Y j <λ L,j Then nm=nm+1, slot f,j = slot f,j-1 +1, slot b,j =0,last j =0;

[0094] If λ L,j <Y j <λ H,j , then it is necessary to determine the state parameter last of the j-1th time slot j-1 Values:

[0095] If last j-1 =0, then nm=nm+1, slot f,j = slot f,j-1 +1, slot b,j =0;

[0096] If last j-1 =1, then slot b,j = slot b,j-1 +1, slot f,j =0;

[0097] Finish and go to step seven.

[0098] Step 7: Determine whether J time slots have been detected. If not, go to step 2; otherwise, go to step 8.

[0099] Step 8: Calculate the false alarm probability Pf=nf / n0 and the missed detection probability Pm=nm / n1, and end the algorithm.

[0100] In another exemplary embodiment, Figure 3 As shown, firstly, a main user activity model is established. The main user activity model is used to simulate and verify the dual-threshold spectrum sensing method and evaluate the performance of the dual-threshold spectrum sensing method. J The actual state sequence of the primary user is obtained after passing through the fading channel, and the time slots T1 to T JFor the energy sequence of the jth time slot, if the energy is higher than the upper threshold, it is considered that the primary user exists; if it is lower than the lower threshold, it is considered that the primary user does not exist; if it is between the upper threshold and the lower threshold, it is considered that the primary user state has not changed. Further, according to the detection result of the jth time slot, the continuity of the detection result is recorded. When the state of continuous existence or non-existence appears in the detection sequence and exceeds the upper limit, the threshold is adjusted to obtain the upper and lower thresholds of the j+1th time slot. Then determine the time slots T1 to T J The master user detects the state sequence, and finally compares the actual state sequence with the detected state sequence to calculate the missed detection probability and the false alarm probability.

[0101] The state sequence includes the channel states (occupied or idle) of J time slots. In a specific example, 0 represents idle and 1 represents occupied. The state sequence [0, 0, 1, 1] indicates that the channel states in 4 time slots are [idle, idle, occupied, occupied].

[0102] The energy detection process does not require prior information, so any activity information of the PU is unknown. However, in order to simulate and verify the dual-threshold spectrum sensing method, the primary user activity model is assumed here:

[0103] The PU states are independent of each other in each time slot. There are only two active states of PU in each time slot on the channel, idle and occupied, which obeys the binomial distribution, expressed as:

[0104] P j =[P b ,P f ] (5)

[0105] Among them, P j is the activity state of the jth time slot channel, P b Indicates that the channel is occupied by PU, P f Indicates that the channel is not occupied by a PU.

[0106] This application dynamically adjusts the threshold through the feature of the historical activity status of the primary user, which can improve the accuracy of spectrum perception. It is worth noting that this feature provides information of different dimensions from the existing detection methods. Therefore, the method of this application is complementary to the existing methods, and together they provide a more comprehensive solution to the spectrum perception problem, enrich the theoretical framework of the existing research field, and also provide new ideas and methods for improving spectrum perception, which has important theoretical and practical significance.

[0107] Based on the same inventive concept, the embodiment of the present application also provides a dual-threshold spectrum sensing device based on adaptive time variation for implementing the dual-threshold spectrum sensing method based on adaptive time variation involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the dual-threshold spectrum sensing device based on adaptive time variation provided below can refer to the limitations of the dual-threshold spectrum sensing method based on adaptive time variation in the above text, and will not be repeated here.

[0108] In an exemplary embodiment, Figure 4 As shown, a dual-threshold spectrum sensing device based on adaptive time variation is provided, including: an initialization module 401, a threshold updating module 402, a spectrum sensing module 403, a counting module 404 and an iteration module 405.

[0109] The initialization module 401 is used to determine the initial state parameters, the initial high threshold, the initial low threshold, the initial presence count value, the initial absence count value, the presence time slot threshold number and the absence time slot threshold number.

[0110] The threshold updating module 402 is connected to the initialization module 401, and is used for updating the high threshold of the j-1th time slot and the low threshold of the j-1th time slot according to the existence count value of the j-1th time slot, the non-existence count value of the j-1th time slot, the existence time slot threshold number and the non-existence time slot threshold number for the spectrum sensing process of the j-th time slot within the spectrum sensing period, so as to obtain the high threshold of the j-th time slot and the low threshold of the j-th time slot. j>0.

[0111] The high threshold of the 0th time slot is the initial high threshold, the low threshold of the 0th time slot is the initial low threshold, the presence count value of the 0th time slot is the initial presence count value, and the absence count value of the 0th time slot is the initial absence count value.

[0112] The spectrum sensing module 403 is connected to the threshold updating module 402, and the spectrum sensing module 403 is used to determine whether there is a primary user signal in the jth time slot according to the energy received by the jth time slot receiver, the upper threshold of the jth time slot and the lower threshold of the jth time slot, so as to determine the activity state of the primary user in the jth time slot on the channel. The activity state of the primary user on the channel is idle or occupied.

[0113] The counting module 404 is connected to the spectrum sensing module 403, and is used to update the existence count value of the j-1th time slot, the non-existence count value of the j-1th time slot, and the state parameter of the j-1th time slot according to the energy received by the j-th time slot receiver, the state parameter of the j-1th time slot, the high threshold of the j-th time slot, and the low threshold of the j-th time slot, and obtain the existence count value of the j-th time slot, the non-existence count value of the j-th time slot, and the state parameter of the j-th time slot. The state parameter of the 0th time slot is the initial state parameter.

[0114] The iteration module 405 is connected to the counting module 404 and the threshold updating module 402 respectively, and is used to determine whether the jth time slot is the last time slot in the spectrum sensing cycle. If so, the spectrum sensing process is terminated, otherwise the spectrum sensing process of the j+1th time slot is performed.

[0115] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store initial state parameters, initial high thresholds, initial low thresholds, initial existence count values, initial non-existence count values, existence time slot thresholds and non-existence time slot thresholds. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a dual-threshold spectrum sensing method based on adaptive time variation is implemented.

[0116] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0117] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0118] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0119] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0120] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0121] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0122] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0123] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A dual-threshold spectrum sensing method based on adaptive time-varying, characterized in that: The dual-threshold spectrum sensing method based on adaptive time variation includes: Determine initial state parameters, initial high threshold, initial low threshold, initial existence count value, initial non-existence count value, existence time slot threshold number and non-existence time slot threshold number; For the spectrum sensing process of the jth time slot in the spectrum sensing period, according to the existence count value of the j-1th time slot, the non-existence count value of the j-1th time slot, the existence time slot threshold number and the non-existence time slot threshold number, the high threshold of the j-1th time slot and the low threshold of the j-1th time slot are updated to obtain the high threshold of the jth time slot and the low threshold of the jth time slot; j>0; the high threshold of the 0th time slot is the initial high threshold, the low threshold of the 0th time slot is the initial low threshold, the existence count value of the 0th time slot is the initial existence count value, and the non-existence count value of the 0th time slot is the initial non-existence count value; According to the energy received by the receiver in the jth time slot, the upper threshold of the jth time slot and the lower threshold of the jth time slot, it is judged whether there is a primary user signal in the jth time slot to determine the activity state of the primary user in the jth time slot on the channel; the activity state of the primary user on the channel is idle or occupied; According to the energy received by the receiver of the j-th time slot, the state parameter of the j-1-th time slot, the upper threshold of the j-th time slot and the lower threshold of the j-th time slot, the existence count value of the j-1-th time slot, the non-existence count value of the j-1-th time slot and the state parameter of the j-1-th time slot are updated to obtain the existence count value of the j-th time slot, the non-existence count value of the j-th time slot and the state parameter of the j-th time slot; the state parameter of the 0-th time slot is the initial state parameter; It is determined whether the jth time slot is the last time slot in the spectrum sensing cycle. If so, the spectrum sensing process is terminated; otherwise, the spectrum sensing process of the j+1th time slot is performed.

2. The method for spectrum sensing based on adaptive time-varying dual thresholds according to claim 1, characterized in that: According to the existence count value of the j-1th time slot, the non-existence count value of the j-1th time slot, the existence time slot threshold number and the non-existence time slot threshold number, the high threshold of the j-1th time slot and the low threshold of the j-1th time slot are updated to obtain the high threshold of the jth time slot and the low threshold of the jth time slot, specifically including: Determine a feedback factor for the j-th time slot according to the presence count value of the j-1-th time slot, the absence count value of the j-1-th time slot, the presence time slot threshold number, and the absence time slot threshold number; According to the feedback factor of the jth time slot, the upper threshold of the j-1th time slot and the lower threshold of the j-1th time slot are updated to obtain the upper threshold of the jth time slot and the lower threshold of the jth time slot.

3. The method for spectrum sensing based on adaptive time-varying dual thresholds according to claim 2, characterized in that: The feedback factor for the jth time slot is determined using the following formula: Among them, w j is the feedback factor of the jth time slot, slot f,j-1 is the absence count value of the j-1th time slot, slot b,j-1 is the existence count value of the j-1th time slot, slot f,th The number of timeslot thresholds that do not exist, slot b,th is the number of time slot thresholds.

4. The method for spectrum sensing based on adaptive time-varying dual thresholds according to claim 2, characterized in that: The following formula is used to update the upper threshold of the j-1th time slot and the lower threshold of the j-1th time slot: Among them, λ H,j is the upper threshold of the jth time slot, λ L,j is the lower threshold of the jth time slot, λ H,j-1 is the upper threshold of the j-1th time slot, λ L,j-1 is the lower threshold of the j-1th time slot, w j is the feedback factor of the jth time slot.

5. The method for spectrum sensing based on adaptive time-varying dual thresholds according to claim 1, characterized in that: According to the energy received by the receiver in the jth time slot, the upper threshold of the jth time slot and the lower threshold of the jth time slot, it is judged whether there is a primary user signal in the jth time slot to determine the activity state of the primary user in the jth time slot on the channel, specifically including: If the energy received by the receiver in the jth time slot is greater than the upper threshold of the jth time slot, it is determined that there is a primary user signal in the jth time slot, and the activity state of the primary user in the jth time slot on the channel is occupied; If the energy received by the receiver in the jth time slot is less than the lower threshold of the jth time slot, it is determined that there is no primary user signal in the jth time slot, and the activity state of the primary user in the jth time slot on the channel is idle.

6. The method for spectrum sensing based on adaptive time-varying dual thresholds according to claim 1, characterized in that: According to the energy received by the receiver of the j-th time slot, the state parameter of the j-1-th time slot, the upper threshold of the j-th time slot and the lower threshold of the j-th time slot, the existence count value of the j-1-th time slot, the absence count value of the j-1-th time slot and the state parameter of the j-1-th time slot are updated to obtain the existence count value of the j-th time slot, the absence count value of the j-th time slot and the state parameter of the j-th time slot, specifically including: Determine the relationship between the energy received by the receiver in the jth time slot and the upper threshold of the jth time slot and the lower threshold of the jth time slot: If the energy received by the receiver in the jth time slot is greater than the high threshold of the jth time slot, the presence count value of the jth time slot is the presence count value of the j-1th time slot plus one, the absence count value of the jth time slot is 0, and the state parameter of the jth time slot is 1; If the energy received by the receiver in the jth time slot is less than the lower threshold of the jth time slot, the presence count value of the jth time slot is 0, the absence count value of the jth time slot is the absence count value of the j-1th time slot plus one, and the state parameter of the jth time slot is 0; If the energy received by the receiver in the jth time slot is between the upper threshold of the jth time slot and the lower threshold of the jth time slot, it is determined whether the state parameter of the j-1th time slot is 0. If so, the existence count value of the jth time slot is 0, and the non-existence count value of the jth time slot is the non-existence count value of the j-1th time slot plus one; otherwise, the existence count value of the jth time slot is the existence count value of the j-1th time slot plus one, and the non-existence count value of the jth time slot is 0.

7. The method for spectrum sensing based on adaptive time-varying dual thresholds according to claim 1, characterized in that: The dual-threshold spectrum sensing method based on adaptive time variation also includes: Determine an initial actual presence count value, an initial actual absence count value, an initial false alarm count value, and an initial missed detection count value; For the spectrum sensing process of the jth time slot within the spectrum sensing period, if the activity state of the primary user of the jth time slot on the channel is idle, the actual absence count value of the jth time slot is the actual absence count value of the j-1th time slot plus one; the actual absence count value of the 0th time slot is the initial actual presence count value; If the activity state of the primary user of the jth time slot on the channel is idle and the energy received by the receiver of the jth time slot is greater than the upper threshold of the jth time slot, or the activity state of the primary user of the jth time slot on the channel is idle and the energy received by the receiver of the jth time slot is between the upper threshold of the jth time slot and the lower threshold of the jth time slot and the state parameter of the jth time slot is 1, then the false alarm count value of the jth time slot is equal to the false alarm count value of the j-1th time slot plus one; the false alarm count value of the 0th time slot is the initial false alarm count value; If the activity state of the primary user of the jth time slot on the channel is occupied, the actual existence count value of the jth time slot is the actual existence count value of the j-1th time slot plus one; the actual existence count value of the 0th time slot is the initial actual existence count value; If the active state of the primary user of the jth time slot on the channel is occupied and the energy received by the receiver of the jth time slot is less than the lower threshold of the jth time slot, or the active state of the primary user of the jth time slot on the channel is occupied and the energy received by the receiver of the jth time slot is between the upper threshold of the jth time slot and the lower threshold of the jth time slot and the state parameter of the jth time slot is 0, then the missed detection count value of the jth time slot is equal to the missed detection count value of the j-1th time slot plus one; the missed detection count value of the 0th time slot is the initial missed detection count value; Determine the false alarm probability according to the actual non-existence count value of the Jth time slot and the false alarm count value of the Jth time slot; J is the last time slot in the spectrum sensing cycle; The missed detection probability is determined according to the actual existence count value of the J-th time slot and the missed detection count value of the J-th time slot.

8. A dual-threshold spectrum sensing device based on adaptive time variation, applied to the dual-threshold spectrum sensing method based on adaptive time variation according to any one of claims 1 to 7, characterized in that: The dual-threshold spectrum sensing device based on adaptive time variation includes: An initialization module, used to determine an initial state parameter, an initial high threshold, an initial low threshold, an initial existence count value, an initial non-existence count value, an existence time slot threshold number, and an non-existence time slot threshold number; A threshold updating module, connected to the initialization module, for the spectrum sensing process of the j-th time slot within the spectrum sensing period, according to the existence count value of the j-1th time slot, the non-existence count value of the j-1th time slot, the existence time slot threshold number and the non-existence time slot threshold number, to update the high threshold of the j-1th time slot and the low threshold of the j-1th time slot, so as to obtain the high threshold of the j-th time slot and the low threshold of the j-th time slot; j>0; the high threshold of the 0th time slot is the initial high threshold, the low threshold of the 0th time slot is the initial low threshold, the existence count value of the 0th time slot is the initial existence count value, and the non-existence count value of the 0th time slot is the initial non-existence count value; a spectrum sensing module, connected to the threshold updating module, for judging whether there is a primary user signal in the jth time slot according to the energy received by the jth time slot receiver, the upper threshold of the jth time slot and the lower threshold of the jth time slot, so as to determine the activity state of the primary user in the jth time slot on the channel; the activity state of the primary user on the channel is idle or occupied; A counting module connected to the spectrum sensing module, configured to update the existence count value of the j-1th time slot, the non-existence count value of the j-1th time slot, and the state parameter of the j-1th time slot according to the energy received by the j-th time slot receiver, the state parameter of the j-1th time slot, the upper threshold of the j-th time slot, and the lower threshold of the j-th time slot, to obtain the existence count value of the j-th time slot, the non-existence count value of the j-th time slot, and the state parameter of the j-th time slot; the state parameter of the 0th time slot is the initial state parameter; The iteration module is connected to the counting module and the threshold updating module respectively, and is used to determine whether the jth time slot is the last time slot in the spectrum sensing cycle. If so, the spectrum sensing process is terminated, otherwise, the spectrum sensing process of the j+1th time slot is performed.

9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the adaptive time-varying dual-threshold spectrum sensing method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the adaptive time-varying dual-threshold spectrum sensing method according to any one of claims 1 to 7 is implemented.