Dynamic spectrum autonomous collaborative optimization method and system based on large language model

Through the dynamic spectrum autonomous collaborative optimization method based on large language model, the problem of rigid decision-making and insufficient scalability in dynamic spectrum resource optimization is solved, efficient spectrum utilization and real-time strategy generation are achieved, and communication overhead and sensitive information leakage risks are reduced.

CN120474648APending Publication Date: 2025-08-12CHINA ACADEMY OF RAILWAY SCI CORP LTD +1
View PDF 0 Cites 12 Cited by

Patent Information

Application Number
CN202510831370.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The prior art has problems such as rigid decision-making, insufficient scalability, large communication overhead and delay in dynamic spectrum resource optimization, and it is difficult to adapt to high-frequency band, high-density, and high-dynamic wireless communication scenarios, especially in a multi-user and multi-channel coexistence environment, and there is a risk of sensitive information leakage.

Method used

The dynamic spectrum autonomous collaborative optimization method based on large language models is adopted, and the channel state, historical operation trajectory and conflict feedback signals are converted into text-numerical mixed tensors by building an environment characterization module. A distributed semantic inference engine and sparse Transformer architecture are designed, and a candidate strategy set for spectrum access and power mode is generated using the sliding window local attention mechanism, and interference risks are evaluated through the multi-head attention mechanism to achieve real-time strategy generation and optimization.

Benefits of technology

It improves spectrum utilization efficiency, reduces decision-making delay and communication overhead, enhances the system's autonomous collaborative optimization capabilities, reduces the risk of sensitive information leakage, and adapts to real-time strategy generation in complex spectrum environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120474648A_ABST
    Figure CN120474648A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic spectrum autonomous collaborative optimization method based on a large language model, and the method comprises the steps: converting a channel state, a historical operation track and a conflict feedback signal into text-numerical value mixed tensors, and carrying out the splicing of the tensors to form a multi-dimensional environment state mixed representation; a distributed semantic inference engine is designed, a sparse Transform architecture and an adaptive conflict prediction mechanism are constructed in the distributed semantic inference engine, and a candidate strategy set of spectrum access and power modes is generated through a dynamic context window based on a sliding window local attention mechanism. The strategy generation module is used for performing real-time strategy generation and risk pre-judgment in a complex spectrum environment; through a conflict prediction module, performing similarity comparison on feature vectors extracted based on a multi-head attention mechanism and a learnable conflict prototype, and dynamically evaluating an interference risk coefficient of a candidate strategy; and dynamic spectrum autonomous collaborative optimization is carried out based on multi-dimensional environment state mixed characterization and an interference risk coefficient. The invention further discloses a corresponding system, electronic equipment and a computer readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of dynamic spectrum resource optimization, and in particular to a method and system for autonomous collaborative optimization of dynamic spectrum based on a large language model. Background Art

[0002] With the rapid deployment of 5G / 6G networks and the exponential growth of IoT devices, wireless communication scenarios are characterized by high frequency bands, high density, and high dynamics. Dynamic spectrum resource optimization in cognitive radio networks often faces complex challenges such as partial observability constraints, decentralized multi-user collaboration, and joint strategy generation. Traditional static spectrum allocation mechanisms are no longer able to cope with resource competition in dense user scenarios. While dynamic spectrum sharing technology can improve spectrum utilization, existing technologies suffer from three core flaws in complex environments with multiple primary users (PUs), multiple users (SUs), and multiple channels. First, traditional rule engines rely on manually preset fixed strategies, such as polling mechanisms based on channel occupancy, which struggle to adapt to the dramatic changes in channel status brought about by bursty traffic and mobility, resulting in large fluctuations in spectrum utilization efficiency. Second, centralized optimization schemes require periodic synchronization of global network status. When the user scale is large, communication overhead can account for up to one-third of the system's total energy consumption, and there is a risk of sensitive information leakage. Third, while decentralized methods based on deep reinforcement learning (DRL) can achieve local optimization, the high decision latency introduced by their experience replay mechanism makes them unable to meet the millisecond-level spectrum switching requirements in URLLC scenarios. In short, existing methods rely on fixed rules or centralized optimization, resulting in rigid decisions and insufficient scalability.

[0003] Breakthroughs in large language model (LLM) technology provide a new path to solving the above problems: its fusion capability can uniformly encode heterogeneous data such as channel state values and user behavior sequences, significantly improving the accuracy of long-range dependency modeling compared to traditional LSTM networks; the parallel reasoning characteristics of the Transformer architecture enable distributed SU nodes to complete strategy generation in a very short time, far exceeding traditional DRL solutions.

[0004] However, the application of existing large language models (LLMs) in dynamic spectrum management still has significant limitations: first, most studies only use a single modal input (such as purely numerical channel status), failing to effectively integrate textual semantic information such as conflict event logs, resulting in a loss of integrity in environmental representation; second, there is a lack of conflict prediction mechanisms tailored to the physical characteristics of wireless communications, and existing attention weight analysis methods have a high misjudgment rate for co-frequency interference events; third, traditional fine-tuning methods rely on manually designed reward functions, making it difficult to accurately quantify semantic optimization goals such as "coverage mode improves throughput." Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for autonomous collaborative optimization of dynamic spectrum based on a large language model. The system incorporates a three-layer semantic reasoning architecture: first, an environment representation module is constructed to convert channel states, historical operation trajectories, and conflict feedback signals into text-numeric hybrid tensors; second, a distributed semantic reasoning engine is designed to generate a set of candidate strategies for spectrum access and power modes using a dynamic context window; finally, a conflict probability predictor is developed to evaluate the interference risk coefficient of candidate strategies using the causal reasoning capabilities of the large model. This method and system adopt a pre-training-domain fine-tuning paradigm and achieve knowledge distillation through semantic reward signals.

[0006] A first aspect of the present invention is to provide a dynamic spectrum autonomous collaborative optimization method based on a large language model, comprising:

[0007] S1, converting the channel state, historical operation trajectory and conflict feedback signal into a text-value mixed tensor, and forming a multi-dimensional environment state mixed representation by splicing the text-value mixed tensor;

[0008] S2: Design a distributed semantic reasoning engine. Within this engine, a sparse Transformer architecture and an adaptive conflict prediction mechanism are built. Based on a sliding window local attention mechanism, a set of candidate strategies for spectrum access and power modes is generated through a dynamic context window. This candidate strategy set is used for real-time strategy generation and risk prediction in complex spectrum environments.

[0009] S3, through the conflict prediction module, compares the feature vector extracted based on the multi-head attention mechanism with the learnable conflict prototype to dynamically evaluate the interference risk coefficient of the candidate strategy;

[0010] S4, performing the dynamic spectrum autonomous collaborative optimization based on the multi-dimensional environmental state hybrid representation and the interference risk coefficient.

[0011] Preferably, the S1 includes:

[0012] S11, constructing an environment characterization system; wherein the environment characterization system is used to uniformly encode three types of heterogeneous data, namely, channel state matrix, user operation trajectory, and conflict event log, into a text-value hybrid tensor through heterogeneous data fusion technology;

[0013] S12, forming a multi-dimensional environment state mixed representation by splicing the text-value mixed tensors.

[0014] Preferably, the S11 includes:

[0015] (1) Define the system state space from three dimensions: physical layer, protocol layer, and application layer; the state model of the physical layer is based on the channel state matrix is the core characterization parameter, where N represents the number of available channels, M is the number of consecutive observation time slots, and the matrix element Q[n][m] quantifies the state of the physical layer of the n-th channel in the m-th time slot. The state of the physical layer is determined by the signal-to-noise ratio (SNR), the multipath fading coefficient, and the Doppler shift parameter;

[0016] (2) At the physical layer, the channel state matrix The numerical features of the channel state matrix are mapped to a high-dimensional space through a learnable embedding layer. The spatiotemporal joint distribution characteristics of Q are mapped to the d-dimensional semantic space through the learnable embedding layer Embed(Q), and its mathematical expression is shown in formula (1):

[0017] Embed(Q)=ReLU(W q Q+b q ) (1);

[0018] In formula (1), is the trainable weight tensor, For the bias vector, the ReLU activation function introduces nonlinear transformation capabilities;

[0019] (3) At the protocol layer, the user operation trajectory is constructed as a user behavior sequence, and the temporal dependency of the user behavior sequence is captured by a bidirectional LSTM network; the high-dimensional feature vector output by the learnable embedding layer effectively captures the spatial correlation and temporal evolution law of the channel quality, and the state modeling of the protocol layer focuses on the user behavior sequence H = a t-k ,...,a t-1 Timing dependency analysis of τ represents the user's access decision on E candidate channels in time slot τ; H represents a historical action sequence, which captures the spectrum access decision a{i} made by the user in a period of time before the current decision time t, specifically in k time slots, where i from tk to t-1 represents the user's access decision a on all candidate channels in time slot i. t-k It is the earliest (oldest) action in the sequence, recording the user's access status to E channels in the tk time slot, and is an E-dimensional 0 / 1 vector; a t-1 It is the most recent action in the sequence, recording the user's access status to E channels in the last t-1 time slot. It is an E-dimensional 0 / 1 vector, where t represents the current decision time slot and k represents the size of the history window.

[0020] A bidirectional residual LSTM network (BiLSTM) is designed for processing, and its hidden state update equation is shown in formula (2):

[0021]

[0022] in, It is the hidden state vector of the forward LSTM network in time slot τ, which is used to capture the temporal dependency from the past to the current moment τ in the user behavior sequence; LSTM → It is a forward propagation LSTM unit that processes the sequence from left to right and inputs the access decision vector a of the current time slot τ and the previous hidden state a τ It represents the user's access decision on E candidate channels in time slot τ, defined as a τ ∈{0,1}^E, where E represents the number of candidate channels. Each element in the vector takes the value 0 or 1, indicating whether the corresponding channel is accessed. is the hidden state vector of the forward LSTM at time slot τ-1, used to transfer historical state information to the current time slot; is the hidden state vector of the reverse LSTM network at time slot τ, which is used to capture the reverse temporal dependency from the future to the current moment (τ) in the user behavior sequence; LSTM ← It is a back-propagation LSTM unit that processes the sequence from right to left, inputting the access decision vector aτ of the current time slot and the hidden state at the next moment is the hidden state vector of the reverse LSTM in time slot τ+1, which is used to transfer future state information to the current time slot; H t is the final output vector of the current decision time slot t, which represents the concatenation of the forward hidden state and the reverse hidden state. Represents vector concatenation operation;

[0023] (4) At the application layer, the text semantic information in the conflict event log is weighted based on the improved TF-IDF algorithm; the state modeling of the application layer is based on the conflict event log. Perform semantic enhancement processing, where I() is the event indicator function; introduce the event intensity factor δ w and time decay factor Δ t , construct an improved weight calculation model as shown in formula (3):

[0024]

[0025] In formula (3), C t It is the set of conflict event logs in time slot t, which contains the description text of multiple conflict events w, used to characterize the conflict event set at the current moment, and serves as the original input for feature extraction; w is the log of traversing C t A single conflict event w in is used to identify the type of each conflict event to be weighted; f w Is the conflict event w in C tThe original occurrence frequency in , an unweighted count, reflects the frequency of events and is the core input of traditional TF-IDF; w is the event intensity factor, which is dynamically quantified into three-level quantitative indicators according to the interference signal intensity, where δ w =1: slight interference, δ w =3: Moderate interference, δ w =5: severe interference, used to map the physical layer interference intensity to a semantic weight so that high-intensity interference obtains a higher feature weight. The interference intensity is expressed in dBm. t is the time decay factor, which is used to control the decay of the influence of historical events, Δ t =exp(-(t-τ w ) / T), which is used to achieve exponential decay of event influence.

[0026] Preferably, the S12 includes: in the feature fusion stage, cross-modal information aggregation is achieved through tensor splicing operations to generate a multi-dimensional environment state hybrid representation, as shown in formula (4):

[0027] φ(s t )=Concat[Embed(C t ); BiLSTM(H t ); TF-IDF(F t )] (4);

[0028] in, is the channel state embedding matrix, Encode vectors for user behavior, is the weight distribution of conflict events, V is the total number of conflict types; the mixed tensor after splicing Through layer normalization and Dropout processing, a multi-dimensional environmental state hybrid representation with clear physical meaning and unified dimension is finally formed.

[0029] Preferably, the S2 includes:

[0030] S21. Design a distributed semantic reasoning engine and construct a sparse Transformer architecture within the distributed semantic reasoning engine; wherein the sparse Transformer architecture includes a policy generation network, and the policy generation network includes a multi-head attention layer and a policy output layer;

[0031] S22, constructing an adaptive conflict prediction mechanism based on the conflict prediction module; wherein the conflict prediction module is deeply integrated into the strategy output layer after the multi-head attention layer, and the adaptive conflict prediction mechanism implements interference risk quantitative assessment based on the prototype contrastive learning framework, including:

[0032] Define the feature vector output by H attention heads

[0033] By learning the conflict prototype vector The similarity measurement is performed and the interference frequency of the interference event is determined based on the conflict prediction module, as shown in the following formulas (5) and (6):

[0034]

[0035] Among them, α h Represents the similarity metric value, β=5 is the temperature coefficient controlling the distribution sharpness, Risk e The interference risk coefficient of the candidate strategy is normalized by the Sigmoid function and has a value range of [0, 1]. A larger value indicates a higher interference risk. It is used to dynamically evaluate the potential conflict risk of the current spectrum strategy and subsequent optimization decisions. is the classifier weight matrix, c is the number of conflict types; σ is the Sigmoid activation function, which compresses the input value to the [0,1] interval and outputs a probabilistic risk value; It is the weighted sum of the output results of H attention heads, where H represents the number of attention heads in the multi-head attention mechanism and is a hyperparameter; α h is the similarity weight of the hth attention head, calculated by formula (5), which is used to measure the similarity between the current attention head feature and the conflict prototype. The higher the weight, the greater the contribution of the head to risk prediction. MLP is a multi-layer perceptron, which is used to perform nonlinear transformation on the input features and extract higher-level conflict semantic features. is the output feature of the h-th attention head, and the matrix T is the transpose operation of the matrix. If Head h If it is N×d, then after transposition it becomes d×N;

[0036] S23, constructing the sliding window local attention mechanism, including:

[0037] Given an input sequence length of N, define the window width as W = log2N;

[0038] By constructing the mask matrix Restrict each query vector to interact only with the key-value pairs within the window range, which can be expressed as Equation (7) and Equation (8):

[0039] (M mask [i,j]=0 if|ij|≤W)else(-∞) (7);

[0040]

[0041] in, They represent the query matrix, key matrix and value matrix respectively, and d is the feature dimension;

[0042] S24, when the conflict prediction module detects a high-frequency interference event, starting the sliding window local attention mechanism, including: when the conflict prediction module detects a high-frequency interference event, that is, the interference frequency Eisk of the interference event e When W is greater than 0.15, the window width is automatically expanded to W'=2W to capture long-range dependency features across windows by increasing the receptive field.

[0043] S25, generating a candidate strategy set of spectrum access and power mode through a dynamic context window, and performing joint optimization of discrete-continuous parameters in the candidate strategy set of spectrum access and power mode based on a hybrid action space modeling technology.

[0044] Preferably, the S25 includes:

[0045] (1) Based on the contrastive learning strategy, the conflict prototype vector is trained and a candidate strategy set of spectrum access and power mode is generated through a dynamic context window, including determining training samples and optimization targets. The positive samples are the feature cluster centers of historical high-interference scenarios, and the negative samples are the features of low-interference scenarios. The optimization target is to minimize the positive sample spacing while maximizing the negative sample discrimination.

[0046] (2) The strategy output layer of the strategy generation network adopts hybrid action space modeling technology to jointly optimize discrete channel selection and continuous power regulation, including: defining the action vector Where E is the number of candidate channels, and each channel corresponds to a binary decision variable x e ∈0,1 and power level p e ∈[0,P m ax]; Differentiable sampling of discrete variables is realized based on the Gumbel-Softmax algorithm, as shown in formula (9):

[0047]

[0048] Among them, x e It is a binary decision variable, indicating whether to select a channel. The argmax operation is used to implement differentiable sampling of discrete decisions, ensuring that the policy gradient can be traced back. e The value range of x e ∈{0,1},x e =1 means select channel, x e =0 means not selecting channel e; π e is the channel selection probability distribution, which indicates the probability that the channel e output by the model is selected, π e ∈[0,1], satisfying the probability distribution constraint; G eis Gumbel noise, which represents independently sampled random noise and obeys the standard Gumbel distribution. It ensures that different channel combinations are fully explored in the early stage of training and makes discrete decisions differentiable through continuous relaxation of argmax. e is the continuous power level, ∈ is Gaussian noise, obeying the standard Gaussian distribution Sampling noise, injecting exploration noise into power decision-making to avoid falling into local optimal solutions; μ e and σ e are the mean and variance parameters of power regulation respectively.

[0049] Preferably, the S3 includes:

[0050] S31, design a semantic multi-objective reward function, including: maximizing spectrum efficiency, minimizing conflict risk, and maintaining strategy stability, and defining a weighted reward function, as shown in formula (11):

[0051] R t =λ1log(1+SE t )+λ2I(Risk t <θ)-λ3D KL (π t ||π t-1 ) (11);

[0052] Among them, λ1, λ2 and λ3 are the coefficients of spectrum efficiency, conflict avoidance term and policy entropy constraint term respectively; D KL (π t ||π t-1 ) is the KL divergence constraint strategy update amplitude, which is used to suppress mutations. The calculation method is shown in formula (14), π t is the current strategy distribution, π t-1 is the strategy distribution at the previous moment; I(Risk t <θ), where θ is the risk threshold, which is fixed at 0.1;

[0053] SE t is the spectrum efficiency term, which is determined by the channel capacity model based on Shannon’s theorem, as shown in formula (12):

[0054]

[0055] Among them, B e is the channel bandwidth, P e ∈[0,P m ax] is the transmission power, h e is the channel gain coefficient, I e′ represents the co-channel interference indicator function;

[0056] I(Riskt <θ) is a conflict avoidance term, determined by a threshold trigger mechanism, as shown in Equation (13):

[0057] I(Risk t <θ) = 1 / (1 + exp(γ(Risk t -θ))) (13);

[0058] where γ represents the temperature coefficient;

[0059] When the real-time conflict risk prediction value Risk t exceeds the threshold θ = 0.1, the penalty term grows exponentially; the temperature coefficient γ = 10 controls the steepness of the function, reducing the incidence of conflict events;

[0060] D KL (π t ||π t-1 ) is the policy entropy constraint term, measuring the policy update amplitude through KL divergence, as shown in Equation (14):

[0061]

[0062] S32, implement a two-stage parameter adjustment mechanism at the level of improving the adaptive proximal policy optimization algorithm, including:

[0063] (1) Determine the dynamic shear threshold ε t in the leading period (t < T0) stage, as shown in Equation (15):

[0064]

[0065] The initial threshold ε0 = 0.3 allows a relatively large amplitude of policy update, and τ ε = 1000 controls the attenuation rate; when t = 500, ε t drops to 0.2, balancing the exploration breadth and convergence speed;

[0066] (2) Perform entropy regularization enhancement, as shown in Equation (16):

[0067] η t = η0·(1 - t / T0) (16);

[0068] where η t is the entropy weight at time t, η0 is the initial entropy weight, η0 = 0.1 guides the policy to explore a diverse action space, and linearly decays to 0 as the training progresses;

[0069] (3) Use the conservative policy update in the leading period (t ≥ T0) stage to fix ε t = 0.1, and introduce a second-order optimization constraint, as shown in Equation (17):

[0070]

[0071] in, is a gradient operator used to calculate the partial derivative of the function J(θ) with respect to the parameter vector θ, generating a gradient vector. J(θ) is the objective function of the policy optimization algorithm, representing the expected cumulative reward that can be obtained by the policy network parameters θ, and is the function that needs to be maximized. Is an L2 norm, that is, the Euclidean norm, used to calculate the modulus of the gradient vector and quantize the gradient amplitude; δ is the constraint threshold, a positive scalar constant), which defines the allowed gradient vector The maximum upper limit of the L2 norm of J(θ), δ = 0.05, prevents violent oscillations in the parameter space and achieves stable convergence through truncation of the Hessian matrix eigenvalues;

[0072] S33, in the knowledge distillation and strategy transfer mechanism stage, a teacher-student model framework is constructed to realize cross-scenario strategy transfer; wherein, the teacher model in the teacher-student model framework is pre-trained in the NS-3 simulation environment to generate a state-action pair dataset The student model in the teacher-student model framework is implemented by the distillation loss function Fine-tuning, as shown in formula (18):

[0073]

[0074] Among them, CE is the cross entropy loss, which is used to make the policy distribution of the student model π s Approximate the teacher model's policy distribution π t ,MSE constrains the value function to be aligned; is the knowledge distillation loss function, which is used to measure the difference between the student model and the teacher model and guide the learning process of the student model; s (a|s i ) is the student model in state s i The probability distribution of selecting action a, π t (a|s i ) is the teacher model in the same state s i The probability distribution of selecting action a; MSE() is the mean squared error loss, which is used to align the value estimate V of the student model with the value estimate V of the teacher model * ; V(s i ) is the student model for state s i The value function estimate of V, that is, the predicted value of the long-term cumulative reward; * (s i ) is the teacher model for state s i The value function estimate of , as a supervisory signal; s iIt is the environment state vector, generated by the multi-dimensional environment state hybrid representation module, and contains the fusion information of channel state, user behavior and conflict events.

[0075] A second aspect of the present invention is to provide a dynamic spectrum autonomous collaborative optimization system based on a large language model, for implementing the method of the first aspect, comprising:

[0076] A multi-dimensional environment state hybrid representation module (101) is used to convert the channel state, historical operation trajectory and conflict feedback signal into a text-value hybrid tensor, and form a multi-dimensional environment state hybrid representation by splicing the text-value hybrid tensor;

[0077] A distributed semantic reasoning engine (102) is used to design a distributed semantic reasoning engine, construct a sparse Transformer architecture and an adaptive conflict prediction mechanism within the distributed semantic reasoning engine, and generate a candidate strategy set for spectrum access and power mode through a dynamic context window based on a sliding window local attention mechanism; wherein the candidate strategy set is used for real-time strategy generation and risk prediction in a complex spectrum environment;

[0078] A conflict probability predictor (103) is used to dynamically evaluate the interference risk coefficient of the candidate strategy by comparing the similarity between the feature vector extracted by the multi-head attention mechanism and the learnable conflict prototype through the conflict prediction module;

[0079] A dynamic spectrum autonomous collaborative optimization module (104) is used to perform the dynamic spectrum autonomous collaborative optimization based on the multi-dimensional environmental state mixed representation and the interference risk coefficient.

[0080] A third aspect of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores a plurality of instructions, and the processor is configured to read the instructions and execute the method described in the first aspect.

[0081] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, and the plurality of instructions can be read by a processor to execute the method described in the first aspect.

[0082] Beneficial effects of the method and system of the present invention:

[0083] The dynamic spectrum autonomous collaborative optimization method based on a large language model establishes a new paradigm for the collaborative allocation of decentralized spectrum resources by systematically integrating three core capabilities: environmental perception, policy reasoning, and dynamic optimization. The autonomous collaborative optimization mechanism achieves knowledge distillation through the design of a semantic reward function and an improved proximal policy optimization algorithm. The reward function design comprehensively considers the three goals of improving spectrum efficiency, avoiding conflict risks, and maintaining policy stability. The spectrum efficiency term uses the Shannon formula to quantify the channel capacity, the conflict risk term is dynamically weighted based on the real-time prediction value, and the policy entropy constraint term controls the policy update amplitude through the KL divergence. At the algorithm implementation level, an adaptive clipping threshold adjustment mechanism is used to balance exploration and utilization. In the early stages of training, larger policy updates are allowed to cover the solution space. As the training progresses, the update amplitude is gradually tightened to ensure convergence stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0085] Figure 1 A flow chart of a method for autonomous collaborative optimization of dynamic spectrum based on a large language model according to an embodiment of the present invention;

[0086] Figure 2 This is a diagram of the architecture of a dynamic spectrum autonomous collaborative optimization system based on a large language model according to an embodiment of the present invention;

[0087] Figure 3 A structural diagram of an electronic device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0088] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0089] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0090] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0091] Example 1

[0092] like Figure 1 As shown, this embodiment provides a dynamic spectrum autonomous collaborative optimization method based on a large language model, including:

[0093] S1, converting the channel state, historical operation trajectory and conflict feedback signal into a text-value mixed tensor, and forming a multi-dimensional environment state mixed representation by splicing the text-value mixed tensor;

[0094] As a preferred embodiment, the S1 includes:

[0095] S11, constructing an environment characterization system. The core of the construction of the environment characterization system is to establish a heterogeneous data fusion coding model, and achieve accurate modeling of complex dynamic spectrum scenarios through multi-dimensional feature extraction and joint characterization. The environment characterization system is used to uniformly encode three types of heterogeneous data: channel state matrix, user operation trajectory, and conflict event log into a text-value hybrid tensor through heterogeneous data fusion technology.

[0096] In this embodiment, step S11 includes:

[0097] (1) Define the system state space from three dimensions: physical layer, protocol layer, and application layer; the state model of the physical layer is based on the channel state matrix is the core characterization parameter, where N represents the number of available channels, M is the number of consecutive observation time slots, and the matrix element Q[n][m] quantifies the state of the physical layer of the n-th channel in the m-th time slot. The state of the physical layer is determined by the signal-to-noise ratio (SNR), the multipath fading coefficient, and the Doppler shift parameter;

[0098] (2) At the physical layer, the channel state matrix The numerical features of are mapped to high-dimensional space through a learnable embedding layer;

[0099] In this embodiment, the channel state matrix The spatiotemporal joint distribution characteristics of Q are mapped to the d-dimensional semantic space through the learnable embedding layer Embed(Q), and its mathematical expression is shown in formula (1):

[0100] Embed(Q)=ReLU(W q Q+b q ) (1);

[0101] In formula (1), is the trainable weight tensor, For the bias vector, the ReLU activation function introduces nonlinear transformation capabilities.

[0102] (3) At the protocol layer, the user operation trajectory is constructed as a user behavior sequence, and the temporal dependency of the user behavior sequence is captured by a bidirectional LSTM network;

[0103] In this embodiment, the high-dimensional feature vector output by the learnable embedding layer effectively captures the spatial correlation and temporal evolution of channel quality, and the state modeling of the protocol layer focuses on the user behavior sequence H=a t-k ,...,a t-1 Timing dependency analysis of τ represents the user's access decision on E candidate channels in time slot τ, and H represents a historical action sequence, which captures the spectrum access decision a{i} made by the user in a period of time before the current decision time t, specifically in k time slots, where i from tk to t-1 represents the user's access decision a on all candidate channels in time slot i. t-k It is the earliest (oldest) action in the sequence, recording the user's access status to E channels in the tk time slot, and is an E-dimensional 0 / 1 vector; a t-1 It is the most recent action in the sequence, recording the user's access status to E channels in the last t-1 time slot. It is an E-dimensional 0 / 1 vector, where t represents the current decision time slot and k represents the size of the history window.

[0104] To overcome the defect of the traditional LSTM network in insufficiently modeling long-range dependencies, this embodiment designs a bidirectional residual LSTM network (BiLSTM) for processing, and its hidden state update equation is shown in formula (2):

[0105]

[0106] in, It is the hidden state vector of the forward LSTM network in time slot τ, which is used to capture the temporal dependency from the past to the current moment τ in the user behavior sequence; LSTM → It is a forward propagation LSTM unit that processes the sequence from left to right and inputs the access decision vector a of the current time slot τ and the previous hidden state a τ It represents the user's access decision on E candidate channels in time slot τ, defined as a τ ∈{0,1}^E, where E represents the number of candidate channels. Each element in the vector takes the value 0 or 1, indicating whether the corresponding channel is accessed. is the hidden state vector of the forward LSTM at time slot τ-1, used to transfer historical state information to the current time slot; is the hidden state vector of the reverse LSTM network at time slot τ, which is used to capture the reverse temporal dependency from the future to the current moment (τ) in the user behavior sequence; LSTM ← It is a back-propagation LSTM unit that processes the sequence from right to left, inputting the access decision vector aτ of the current time slot and the hidden state at the next moment is the hidden state vector of the reverse LSTM in time slot τ+1, which is used to transfer future state information to the current time slot; H t is the final output vector of the current decision time slot t, which represents the concatenation of the forward hidden state and the reverse hidden state. Represents a vector concatenation operation.

[0107] This architecture fully captures the causal relationship and reverse dependency characteristics in user spectrum access behavior through forward and backward dual-path information transmission.

[0108] (4) At the application layer, the text semantic information in the conflict event log is weighted based on the improved TF-IDF algorithm;

[0109] In this embodiment, the state modeling of the application layer is based on the conflict event log Perform semantic enhancement processing, where I() is the event indicator function; the traditional TF-IDF algorithm only considers the word frequency statistical characteristics, and this embodiment innovatively introduces the event intensity factor δ w and time decay factor Δ t , construct an improved weight calculation model as shown in formula (3):

[0110]

[0111] In formula (3), C t It is the set of conflict event logs in time slot t, which contains the description text of multiple conflict events w, used to characterize the conflict event set at the current moment, and serves as the original input for feature extraction; w is the log of traversing C t A single conflict event w in is used to identify the type of each conflict event to be weighted; f w Is the conflict event w in C t The original occurrence frequency in , an unweighted count, reflects the frequency of events and is the core input of traditional TF-IDF; w is the event intensity factor, which is dynamically quantified into three-level quantitative indicators according to the interference signal intensity, where δ w =1: slight interference, δ w =3: Moderate interference, δ w =5: severe interference, used to map the physical layer interference intensity to a semantic weight so that high-intensity interference obtains a higher feature weight. The interference intensity is expressed in dBm. t is the time decay factor, which is used to control the decay of the influence of historical events, Δ t =exp(-(t-τ w ) / T), which is used to achieve exponential decay of event influence.

[0112] The technical effect of step S11 is to model the dynamic spectrum management problem as a partially observable Markov decision process (POMDP).

[0113] S12, forming a multi-dimensional environment state mixed representation by splicing the text-value mixed tensors.

[0114] In this embodiment, the feature fusion stage realizes cross-modal information aggregation through tensor splicing operations to generate a multi-dimensional environment state hybrid representation, as shown in formula (4):

[0115] φ(s t )=Concat[Embed(C t ); BiLSTM(H t ); TF-IDF(F t )] (4);

[0116] in, is the channel state embedding matrix, Encode vectors for user behavior, is the weight distribution of conflict events, V is the total number of conflict types; the mixed tensor after splicing Through layer normalization (LayerNorm) and dropout (rate = 0.1), a multi-dimensional hybrid representation of the environmental state is formed with clear physical meaning and uniform dimensionality. In simulation scenarios involving multiple channels and user nodes, the proposed encoder improves over single-modal baseline methods.

[0117] S2: Design a distributed semantic reasoning engine. Within this engine, a sparse Transformer architecture and an adaptive conflict prediction mechanism are built. Based on a sliding window local attention mechanism, a set of candidate strategies for spectrum access and power modes is generated through a dynamic context window. This candidate strategy set is used for real-time strategy generation and risk prediction in complex spectrum environments.

[0118] As a preferred embodiment, the S2 includes:

[0119] S21. Design a distributed semantic reasoning engine and construct a sparse Transformer architecture within the distributed semantic reasoning engine; wherein the sparse Transformer architecture includes a policy generation network, and the policy generation network includes a multi-head attention layer and a policy output layer;

[0120] S22, constructing an adaptive conflict prediction mechanism based on the conflict prediction module; wherein the conflict prediction module is deeply integrated into the strategy output layer after the multi-head attention layer, and the adaptive conflict prediction mechanism implements interference risk quantitative assessment based on the prototype contrastive learning framework, including:

[0121] Define the feature vector output by H attention heads

[0122] By learning the conflict prototype vector The similarity measurement is performed and the interference frequency of the interference event is determined based on the conflict prediction module, as shown in the following formulas (5) and (6):

[0123]

[0124] Among them, α h Represents the similarity metric value, β=5 is the temperature coefficient controlling the distribution sharpness, Risk e The interference risk coefficient of the candidate strategy is normalized by the Sigmoid function and has a value range of [0, 1]. A larger value indicates a higher interference risk. It is used to dynamically evaluate the potential conflict risk of the current spectrum strategy and subsequent optimization decisions. is the classifier weight matrix, c is the number of conflict types; σ is the Sigmoid activation function, which compresses the input value to the [0,1] interval and outputs a probabilistic risk value; It is the weighted sum of the output results of H attention heads, where H represents the number of attention heads in the multi-head attention mechanism and is a hyperparameter; α h is the similarity weight of the hth attention head, calculated by formula (5), which is used to measure the similarity between the current attention head feature and the conflict prototype. The higher the weight, the greater the contribution of the head to risk prediction. MLP is a multi-layer perceptron, which is used to perform nonlinear transformation on the input features and extract higher-level conflict semantic features. is the output feature of the h-th attention head, and the matrix T is the transpose operation of the matrix. If Head h If it is N×d, then after transposition it becomes d×N;

[0125] S23, constructing the sliding window local attention mechanism, including:

[0126] Given an input sequence length of N, define the window width as W = log2N;

[0127] By constructing the mask matrix Restrict each query vector to interact only with the key-value pairs within the window range, which can be expressed as Equation (7) and Equation (8):

[0128] (M mask [i,j]=0 if|ij|≤W)else(-∞) (7);

[0129]

[0130] in, They represent the query matrix, key matrix and value matrix respectively, and d is the feature dimension.

[0131] S24, when the conflict prediction module detects a high-frequency interference event, starting the sliding window local attention mechanism, including: when the conflict prediction module detects a high-frequency interference event, that is, the interference frequency Risk of the interference event e When W is greater than 0.15, the window width is automatically expanded to W'=2W to capture long-range dependency features across windows by increasing the receptive field.

[0132] S25, generating a candidate strategy set for spectrum access and power mode using a dynamic context window, and performing a joint optimization of discrete-continuous parameters in the candidate strategy set for spectrum access and power mode based on a hybrid action space modeling technique, including:

[0133] (1) Based on the contrastive learning strategy, the conflict prototype vector is trained and a candidate strategy set of spectrum access and power mode is generated through a dynamic context window, including determining training samples and optimization targets. The positive samples are the feature cluster centers of historical high-interference scenarios, and the negative samples are the features of low-interference scenarios. The optimization target is to minimize the positive sample spacing while maximizing the negative sample discrimination.

[0134] (2) The strategy output layer of the strategy generation network adopts hybrid action space modeling technology to jointly optimize discrete channel selection and continuous power regulation, including: defining the action vector Where E is the number of candidate channels, and each channel corresponds to a binary decision variable x e ∈0,1 and power level p e ∈[0,P m ax]; Differentiable sampling of discrete variables is realized based on the Gumbel-Softmax algorithm, as shown in formula (9):

[0135]

[0136] Among them, α h Represents the similarity metric value, β=5 is the temperature coefficient controlling the distribution sharpness, Risk e The interference risk coefficient of the candidate strategy is normalized by the Sigmoid function and has a value range of [0, 1]. A larger value indicates a higher interference risk. It is used to dynamically evaluate the potential conflict risk of the current spectrum strategy and subsequent optimization decisions. is the classifier weight matrix, c is the number of conflict types; σ is the Sigmoid activation function, which compresses the input value to the [0,1] interval and outputs a probabilistic risk value; It is the weighted sum of the output results of H attention heads, where H represents the number of attention heads in the multi-head attention mechanism and is a hyperparameter; α h is the similarity weight of the hth attention head, calculated by formula (5), which is used to measure the similarity between the current attention head feature and the conflict prototype. The higher the weight, the greater the contribution of the head to risk prediction. MLP is a multi-layer perceptron, which is used to perform nonlinear transformation on the input features and extract higher-level conflict semantic features. is the output feature of the h-th attention head, and the matrix T is the transpose operation of the matrix. If Head h If it is N×d, then after transposition it becomes d×N;.

[0137] Beneficial effects of step S2: Distributed semantic reasoning engine design, through sparse Transformer architecture and adaptive conflict prediction mechanism, realizes real-time strategy generation and risk prediction in complex spectrum environment. The core of this method S2 is to build an efficient parallel strategy generation network. Its key technical breakthroughs are reflected in the design of sparse attention mechanism and dynamic assessment of conflict risk. In the design of sparse Transformer architecture, in order to solve the problem that the computational complexity of traditional self-attention mechanism increases quadratically with the length of sequence, this method innovatively introduces sliding window local attention mechanism. This design reduces the computational complexity from O(N) of traditional Transformer to 2 d) is reduced to O(NlogNd). The dynamic context expansion mechanism further enhances the global perception ability of local attention: when the conflict prediction module detects a high-frequency interference event (Risk e >0.15), the window width is automatically expanded to W'=2W to capture cross-window long-range dependency features by increasing the receptive field. After the conflict prediction module is deeply integrated into the multi-head attention layer of the strategy generation network, the prototype contrast learning framework is used to achieve quantitative assessment of interference risk. Define the feature vector output by H attention heads By learning the conflict prototype vector Similarity measurement is performed. The conflict prototype vector is trained through a contrastive learning strategy. The positive samples are the feature cluster centers of historical high-interference scenes, and the negative samples are the features of low-interference scenes. The optimization goal is to minimize the distance between positive samples while maximizing the discrimination of negative samples. The strategy output layer of the strategy generation network uses hybrid action space modeling technology to jointly optimize discrete channel selection and continuous power regulation. Define the action vector Where E is the number of candidate channels, and each channel corresponds to a binary decision variable x e ∈0,1 and power level p e ∈[0,P m ax]. Differentiable sampling of discrete variables is achieved through the Gumbel-Softmax technique, as shown in formula (10):

[0138]

[0139] where π e is the channel selection probability distribution, G e is Gimbel noise, μ e and σ eare the mean and variance parameters for power regulation, respectively. This modeling approach ensures policy drivability while precisely satisfying the physical layer constraints of wireless communication protocols, achieving an extremely high channel switching success rate and significantly improving upon traditional ε-greedy exploration. Compared to traditional deep reinforcement learning methods, this engine design overcomes performance bottlenecks through three technical innovations: First, a sparse attention mechanism compresses policy generation latency, meeting the responsiveness requirements of 5G URLLC scenarios; second, a prototype contrastive learning framework replaces traditional rule-based judgment with feature space metrics, improving interference prediction accuracy; third, hybrid action space modeling enables joint optimization of discrete and continuous parameters, improving spectral efficiency while maintaining QoE stability, providing a scalable solution for dynamic resource management in 6G intelligent metasurface networks. In the design of the distributed semantic reasoning engine, a sparse Transformer architecture was innovatively constructed to improve policy generation efficiency. By introducing a sliding window attention mechanism, the computational complexity is reduced from the quadratic level of the traditional Transformer to the linear logarithmic level. This is achieved by imposing locality constraints on the attention mask matrix, allowing each query vector to interact only with key-value pairs within the window range.

[0140] S3, through the conflict prediction module, compares the feature vector extracted based on the multi-head attention mechanism with the learnable conflict prototype to dynamically evaluate the interference risk coefficient of the candidate strategy;

[0141] As a preferred embodiment, the S3 includes:

[0142] S31, design a semantic multi-objective reward function, including: maximizing spectrum efficiency, minimizing conflict risk, and maintaining strategy stability, and defining a weighted reward function, as shown in formula (11):

[0143] R t =λ1log(1+SE t )+λ2I(Risk t <θ)-λ3D KL (π t ||π t-1 ) (11);

[0144] Among them, λ1, λ2 and λ3 are the coefficients of spectrum efficiency, conflict avoidance term and policy entropy constraint term respectively; D KL (π t ||π t-1 ) is the KL divergence constraint strategy update amplitude, which is used to suppress mutations. The calculation method is shown in formula (14), π t is the current strategy distribution, π t-1 is the strategy distribution at the previous moment; I(Risk t<θ), where θ is the risk threshold, which is a fixed value of 0.1; SE t is the spectral efficiency term, which is determined by modeling the channel capacity based on Shannon's theorem, as shown in Equation (12):

[0145]

[0146] where B e is the channel bandwidth, P e ∈[0, P m ax] is the transmit power, h e is the channel gain coefficient, and I e′ represents the co-channel interference indication function. By introducing a logarithmic compression function, the non-linear channel capacity is transformed into a differentiable optimization objective, which improves the gradient stability compared to directly using SE t

[0147] I(Risk t <θ) is the conflict avoidance term, which is determined by a threshold trigger mechanism, as shown in Equation (13):

[0148] I(Risk t <θ) = 1 / (1 + exp(γ(Risk t - θ))) (13);

[0149] where γ represents the temperature coefficient;

[0150] When the real-time conflict risk prediction value Risk t exceeds the threshold θ = 0.1, the penalty term grows exponentially. The temperature coefficient γ = 10 controls the steepness of the function, reducing the incidence of conflict events;

[0151] D KL (π t ||π t-1 ) is the policy entropy constraint term, which measures the magnitude of policy update through KL divergence, as shown in Equation (14):

[0152]

[0153] This constraint term suppresses policy mutations and ensures the smoothness of the optimization process. In a dense user scenario, the policy fluctuation amplitude is reduced.

[0154] S32. At the level of improving the Adaptive Proximal Policy Optimization algorithm, a two-stage parameter adjustment mechanism is proposed to address the exploration-exploitation imbalance problem of the traditional PPO algorithm in dynamic spectrum scenarios, including:

[0155] (1) Determine the dynamic clipping threshold ε t in the dominant period (t < T0) stage, as shown in Equation (15):

[0156]

[0157] The initial threshold ε0 = 0.3 allows for larger policy updates, τ ε =1000 controls the decay rate; when t=500, ε t Reduced to 0.2 to balance the exploration breadth and convergence speed;

[0158] (2) Perform entropy regularization enhancement, as shown in formula (16):

[0159] η t =η0·(1-t / T0) (16);

[0160] Among them, η t is the entropy weight at time t, η0 is the initial entropy weight, η0 = 0.1 guides the strategy to explore a diverse action space, and linearly decays to 0 as the training progresses;

[0161] (3) Using the conservative strategy in the dominant period (t ≥ T0) to update to a fixed ε t =0.1, and introduce the second-order optimization constraint, as shown in formula (17):

[0162]

[0163] in, is a gradient operator used to calculate the partial derivative of the function J(θ) with respect to the parameter vector θ, generating a gradient vector. J(θ) is the objective function of the policy optimization algorithm, representing the expected cumulative reward that can be obtained by the policy network parameters θ, and is the function that needs to be maximized. Is an L2 norm, that is, the Euclidean norm, used to calculate the modulus of the gradient vector and quantize the gradient amplitude; δ is the constraint threshold, a positive scalar constant), which defines the allowed gradient vector The maximum upper limit of the L2 norm of J(θ), δ = 0.05, prevents violent oscillations in the parameter space, and achieves stable convergence through truncation of the eigenvalues of the Hessian matrix.

[0164] S33, in the knowledge distillation and strategy transfer mechanism stage, a teacher-student model framework is constructed to realize cross-scenario strategy transfer; wherein, the teacher model in the teacher-student model framework is pre-trained in the NS-3 simulation environment to generate a state-action pair dataset The student model in the teacher-student model framework is implemented by the distillation loss function Fine-tuning, as shown in formula (18):

[0165]

[0166] Among them, CE is the cross entropy loss, which is used to make the policy distribution of the student model πs Approximate the teacher model's policy distribution π t ,MSE constrains the value function to be aligned; is the knowledge distillation loss function, which is used to measure the difference between the student model and the teacher model and guide the learning process of the student model; s (a|s i ) is the student model in state s i The probability distribution of selecting action a, π t (a|s i ) is the teacher model in the same state s i The probability distribution of selecting action a; MSE() is the mean squared error loss, which is used to align the value estimate V of the student model with the value estimate V of the teacher model * ; V(s i ) is the student model for state s i The value function estimate of V, that is, the predicted value of the long-term cumulative reward; * (s i ) is the teacher model for state s i The value function estimate of , as a supervisory signal; s i It is the environment state vector, generated by the multi-dimensional environment state hybrid representation module, and contains the fusion information of channel state, user behavior and conflict events.

[0167] The beneficial effect of step S3 is that it leverages the causal reasoning capabilities of the large model to evaluate the interference risk coefficients of all candidate strategies in the candidate strategy set. Through the design of a semantic reward function and an adaptive policy update algorithm, stable optimization and knowledge distillation of dynamic spectrum strategies are achieved. This method breaks through the traditional reinforcement learning's reliance on manually designed reward functions and constructs a multi-objective joint optimization framework.

[0168] S4, performing the dynamic spectrum autonomous collaborative optimization based on the multi-dimensional environmental state hybrid representation and the interference risk coefficient.

[0169] Example 2

[0170] like Figure 2 As shown, this embodiment provides a dynamic spectrum autonomous collaborative optimization system based on a large language model, which is used to implement the method of embodiment 1, including:

[0171] A multi-dimensional environment state hybrid representation module 101 is used to convert the channel state, historical operation trajectory and conflict feedback signal into a text-value hybrid tensor, and form a multi-dimensional environment state hybrid representation by splicing the text-value hybrid tensors;

[0172] Distributed semantic reasoning engine 102 is used to design a distributed semantic reasoning engine, build a sparse Transformer architecture and an adaptive conflict prediction mechanism within the distributed semantic reasoning engine, and generate a candidate strategy set for spectrum access and power mode through a dynamic context window based on a sliding window local attention mechanism. The candidate strategy set is used for real-time strategy generation and risk prediction in complex spectrum environments.

[0173] The conflict probability predictor 103 is used to dynamically evaluate the interference risk coefficient of the candidate strategy by comparing the similarity between the feature vector extracted by the multi-head attention mechanism and the learnable conflict prototype through the conflict prediction module;

[0174] The dynamic spectrum autonomous collaborative optimization module 104 is configured to perform the dynamic spectrum autonomous collaborative optimization based on the multi-dimensional environmental state hybrid representation and the interference risk coefficient.

[0175] The present invention also provides a memory storing a plurality of instructions, wherein the instructions are used to implement the method as in the first embodiment.

[0176] like Figure 3 As shown, the present invention also provides an electronic device, including a processor 301 and a memory 302 connected to the processor 301, the memory 302 stores multiple instructions, and the instructions can be loaded and executed by the processor to enable the processor to execute the methods of embodiment 2 and embodiment 3.

[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A dynamic spectrum autonomous collaborative optimization method based on a large language model, characterized in that: include: S1, converting the channel state, historical operation trajectory and conflict feedback signal into a text-value mixed tensor, and forming a multi-dimensional environment state mixed representation by splicing the text-value mixed tensor; S2: Design a distributed semantic reasoning engine. Within this engine, a sparse Transformer architecture and an adaptive conflict prediction mechanism are built. Based on a sliding window local attention mechanism, a set of candidate strategies for spectrum access and power modes is generated through a dynamic context window. This candidate strategy set is used for real-time strategy generation and risk prediction in complex spectrum environments. S3, through the conflict prediction module, compares the feature vector extracted based on the multi-head attention mechanism with the learnable conflict prototype to dynamically evaluate the interference risk coefficient of the candidate strategy; S4, performing the dynamic spectrum autonomous collaborative optimization based on the multi-dimensional environmental state hybrid representation and the interference risk coefficient.

2. The method for autonomous collaborative optimization of dynamic spectrum based on a large language model according to claim 1, characterized in that: Said S1 comprises: S11, constructing an environment characterization system; wherein the environment characterization system is used to uniformly encode three types of heterogeneous data, namely, channel state matrix, user operation trajectory, and conflict event log, into a text-value hybrid tensor through heterogeneous data fusion technology; S12, forming a multi-dimensional environment state mixed representation by splicing the text-value mixed tensors.

3. The method for autonomous collaborative optimization of dynamic spectrum based on a large language model according to claim 2, characterized in that: The S11 includes: (1) Define the system state space from three dimensions: physical layer, protocol layer, and application layer; the state model of the physical layer is based on the channel state matrix is the core characterization parameter, where N represents the number of available channels, M is the number of consecutive observation time slots, and the matrix element Q[n][m] quantifies the state of the physical layer of the n-th channel in the m-th time slot. The state of the physical layer is determined by the signal-to-noise ratio (SNR), the multipath fading coefficient, and the Doppler shift parameter; (2) At the physical layer, the channel state matrix The numerical features of the channel state matrix are mapped to a high-dimensional space through a learnable embedding layer. The spatiotemporal joint distribution characteristics of Q are mapped to the d-dimensional semantic space through the learnable embedding layer Embed(Q), and its mathematical expression is shown in formula (1): Embed(Q)=ReLU(W q ·Q+b q ) (1); In formula (1), is the trainable weight tensor, For the bias vector, the ReLU activation function introduces nonlinear transformation capabilities; (3) At the protocol layer, the user operation trajectory is constructed as a user behavior sequence, and the temporal dependency of the user behavior sequence is captured by a bidirectional LSTM network; the high-dimensional feature vector output by the learnable embedding layer effectively captures the spatial correlation and temporal evolution law of the channel quality, and the state modeling of the protocol layer focuses on the user behavior sequence H = a t-k ,...,a t-1 Timing dependency analysis of τ represents the user's access decision on E candidate channels in time slot τ, and H represents a historical action sequence, which captures the spectrum access decision a{i} made by the user in a period of time before the current decision time t, specifically in k time slots, where i from tk to t-1 represents the user's access decision a on all candidate channels in time slot i. t-k It is the earliest action in the sequence, that is, the oldest action, which records the user's access status to E channels in the tk time slot and is an E-dimensional 0 / 1 vector; t-1 It is the most recent action in the sequence, recording the user's access status to E channels in the last t-1 time slot. It is an E-dimensional 0 / 1 vector, where t represents the current decision time slot and k represents the size of the history window. A bidirectional residual LSTM network (BiLSTM) is designed for processing, and its hidden state update equation is shown in formula (2): in, It is the hidden state vector of the forward LSTM network in time slot τ, which is used to capture the temporal dependency from the past to the current moment τ in the user behavior sequence; LSTM → It is a forward propagation LSTM unit that processes the sequence from left to right and inputs the access decision vector a of the current time slot τ and the previous hidden state a τ It represents the user's access decision on E candidate channels in time slot τ, defined as a τ ∈{0,1}^E, where E represents the number of candidate channels. Each element in the vector takes the value 0 or 1, indicating whether the corresponding channel is accessed. is the hidden state vector of the forward LSTM at time slot τ-1, used to transfer historical state information to the current time slot; is the hidden state vector of the reverse LSTM network at time slot τ, which is used to capture the reverse temporal dependency from the future to the current moment (τ) in the user behavior sequence; LSTM ← It is a back-propagation LSTM unit that processes the sequence from right to left, inputting the access decision vector aτ of the current time slot and the hidden state at the next moment is the hidden state vector of the reverse LSTM in time slot τ+1, which is used to transfer future state information to the current time slot; H t is the final output vector of the current decision time slot t, which represents the concatenation of the forward hidden state and the reverse hidden state. Represents vector concatenation operation; (4) At the application layer, the text semantic information in the conflict event log is weighted based on the improved TF-IDF algorithm; the state modeling of the application layer is based on the conflict event log. Perform semantic enhancement processing, where I() is the event indicator function; introduce the event intensity factor δ w and time decay factor Δ t , construct an improved weight calculation model as shown in formula (3): In formula (3), C t It is the set of conflict event logs in time slot t, which contains the description text of multiple conflict events w, used to characterize the conflict event set at the current moment, and serves as the original input for feature extraction; w is the log of traversing C t A single conflict event w in is used to identify the type of each conflict event to be weighted; f w Is the conflict event w in C t The original occurrence frequency in , an unweighted count, reflects the frequency of events and is the core input of traditional TF-IDF; w is the event intensity factor, which is dynamically quantified into three-level quantitative indicators according to the interference signal intensity, where δ w =1: slight interference, δ w =3: Moderate interference, δ w =5: severe interference, used to map the physical layer interference intensity to a semantic weight so that high-intensity interference obtains a higher feature weight. The interference intensity is expressed in dBm. t is the time decay factor, which is used to control the decay of the influence of historical events, Δ t =exp(-(t-τ w ) / T), which is used to achieve exponential decay of event influence.

4. The method for autonomous collaborative optimization of dynamic spectrum based on a large language model according to claim 3, characterized in that: The S12 includes: in the feature fusion stage, cross-modal information aggregation is achieved through tensor splicing operations to generate a multi-dimensional environment state hybrid representation, as shown in formula (4): φ(s t )=Concat[Embed(C t );BiLSTM(H t );TF-IDF(F t )] (4); in, is the channel state embedding matrix, Encode vectors for user behavior, is the weight distribution of conflict events, V is the total number of conflict types; the mixed tensor after splicing Through layer normalization and Dropout processing, a multi-dimensional environmental state hybrid representation with clear physical meaning and unified dimension is finally formed.

5. The method for autonomous collaborative optimization of dynamic spectrum based on a large language model according to claim 4, characterized in that: The S2 includes: S21. Design a distributed semantic reasoning engine and construct a sparse Transformer architecture within the distributed semantic reasoning engine; wherein the sparse Transformer architecture includes a policy generation network, and the policy generation network includes a multi-head attention layer and a policy output layer; S22, constructing an adaptive conflict prediction mechanism based on the conflict prediction module; wherein the conflict prediction module is deeply integrated into the strategy output layer after the multi-head attention layer, and the adaptive conflict prediction mechanism implements interference risk quantitative assessment based on the prototype contrastive learning framework, including: Define the feature vector output by H attention heads By learning the conflict prototype vector The similarity measurement is performed and the interference frequency of the interference event is determined based on the conflict prediction module, as shown in the following formulas (5) and (6): Among them, α h Represents the similarity metric value, β=5 is the temperature coefficient controlling the distribution sharpness, Risk e The interference risk coefficient of the candidate strategy is normalized by the Sigmoid function and has a value range of [0, 1]. A larger value indicates a higher interference risk. It is used to dynamically evaluate the potential conflict risk of the current spectrum strategy and subsequent optimization decisions. is the classifier weight matrix, c is the number of conflict types; σ is the Sigmoid activation function, which compresses the input value to the [0,1] interval and outputs a probabilistic risk value; It is the weighted sum of the output results of H attention heads, where H represents the number of attention heads in the multi-head attention mechanism and is a hyperparameter; α h is the similarity weight of the hth attention head, calculated by formula (5), which is used to measure the similarity between the current attention head feature and the conflict prototype. The higher the weight, the greater the contribution of the head to risk prediction. MLP is a multi-layer perceptron, which is used to perform nonlinear transformation on the input features and extract higher-level conflict semantic features. is the output feature of the h-th attention head, and the matrix T is the transpose operation of the matrix. If Head h If it is N×d, then after transposition it becomes d×N; S23, constructing the sliding window local attention mechanism, including: Given an input sequence length of N, define the window width as W = log2N; By constructing the mask matrix Restrict each query vector to interact only with the key-value pairs within the window range, which can be expressed as Equation (7) and Equation (8): (M mask [i,j]=0 if|i-j|≤W)else(-∞) (7); in, They represent the query matrix, key matrix and value matrix respectively, and d is the feature dimension; S24, when the conflict prediction module detects a high-frequency interference event, starting the sliding window local attention mechanism, including: when the conflict prediction module detects a high-frequency interference event, that is, the interference frequency Risk of the interference event e When W is greater than 0.15, the window width is automatically expanded to W'=2W to capture long-range dependency features across windows by increasing the receptive field. S25, generating a candidate strategy set of spectrum access and power mode through a dynamic context window, and performing joint optimization of discrete-continuous parameters in the candidate strategy set of spectrum access and power mode based on a hybrid action space modeling technology.

6. The method for autonomous collaborative optimization of dynamic spectrum based on a large language model according to claim 5, characterized in that: The S25 includes: (1) Based on the contrastive learning strategy, the conflict prototype vector is trained and a candidate strategy set of spectrum access and power mode is generated through a dynamic context window, including determining training samples and optimization targets. The positive samples are the feature cluster centers of historical high-interference scenarios, and the negative samples are the features of low-interference scenarios. The optimization target is to minimize the positive sample spacing while maximizing the negative sample discrimination. (2) The strategy output layer of the strategy generation network adopts hybrid action space modeling technology to jointly optimize discrete channel selection and continuous power regulation, including: defining the action vector Where E is the number of candidate channels, and each channel corresponds to a binary decision variable x e ∈0,1 and power level p e ∈[0,P m ax]; Differentiable sampling of discrete variables is realized based on the Gumbel-Softmax algorithm, as shown in formula (9): Among them, x e It is a binary decision variable, indicating whether to select a channel. The argmax operation is used to implement differentiable sampling of discrete decisions, ensuring that the policy gradient can be traced back. e The value range of x∈{0,1}, x e =1 means select channel, x e =0 means not selecting channel e; π e is the channel selection probability distribution, which indicates the probability that the channel e output by the model is selected, π e ∈[0,1], satisfying the probability distribution constraint; G e is Gumbel noise, which represents independently sampled random noise and obeys the standard Gumbel distribution. It ensures that different channel combinations are fully explored in the early stage of training and makes discrete decisions differentiable through continuous relaxation of argmax. e is the continuous power level, ∈ is Gaussian noise, obeying the standard Gaussian distribution Sampling noise, injecting exploration noise into power decision-making to avoid falling into local optimal solutions; μ e and σ e are the mean and variance parameters of power regulation respectively.

7. The method for autonomous collaborative optimization of dynamic spectrum based on a large language model according to claim 6, characterized in that: The S3 includes: S31, design a semantic multi-objective reward function, including: maximizing spectrum efficiency, minimizing conflict risk, and maintaining strategy stability, and defining a weighted reward function, as shown in formula (11): R t =λ1log(1+SE t )+λ2I(Risk t <θ)-λ3D KL (p t ||p t-1 ) (11); Among them, λ1, λ2 and λ3 are the coefficients of spectrum efficiency, conflict avoidance term and policy entropy constraint term respectively; D KL (π t ||π t-1 ) is the KL divergence constraint strategy update amplitude, which is used to suppress mutations. The calculation method is shown in formula (14), π t is the current strategy distribution, π t-1 is the strategy distribution at the previous moment; I(Risk t <θ), where θ is the risk threshold, which is fixed at 0.1; SE t is the spectrum efficiency term, which is determined by the channel capacity model based on Shannon’s theorem, as shown in formula (12): Among them, B e is the channel bandwidth, P e ∈[0,P m ax] is the transmission power, h e is the channel gain coefficient, I e′ represents the co-channel interference indicator function; I(Risk t <θ) is the conflict avoidance term, which is determined by a threshold trigger mechanism, as shown in Equation (13): I(Risk t <θ)=1 / (1+exp(γ(Risk t -θ))) (13); Where γ represents the temperature coefficient; When the real-time conflict risk prediction value Risk t When the threshold θ=0.1 is exceeded, the penalty term increases exponentially; the temperature coefficient γ=10 controls the steepness of the function, reducing the occurrence rate of conflict events; D KL (π t ||π t-1 ) is the policy entropy constraint term, and the KL divergence is used to measure the policy update amplitude, as shown in formula (14): S32, implements a two-stage parameter adjustment mechanism at the level of adaptive proximal policy optimization algorithm improvement, including: (1) Determine the dynamic shear threshold ε during the dominant period (t < T0), as shown in Equation (15): t , as shown in Equation (15): The initial threshold ε0 = 0.3 allows for larger policy updates, τ ε =1000 controls the decay rate; when t=500, ε t Reduced to 0.2 to balance the exploration breadth and convergence speed; (2) Perform entropy regularization enhancement, as shown in formula (16): or t =η0·(1-t / T0) (16); Among them, η t is the entropy weight at time t, η0 is the initial entropy weight, η0 = 0.1 guides the strategy to explore a diverse action space, and linearly decays to 0 as the training progresses; (3) Using the conservative strategy in the dominant period (t ≥ T0) to update to a fixed ε t =0.1, and introduce the second-order optimization constraint, as shown in formula (17): in, is a gradient operator used to calculate the partial derivative of the function J(θ) with respect to the parameter vector θ, generating a gradient vector. J(θ) is the objective function of the policy optimization algorithm, representing the expected cumulative reward that can be obtained by the policy network parameters θ, and is the function that needs to be maximized. Is an L2 norm, that is, the Euclidean norm, used to calculate the modulus of the gradient vector and quantize the gradient amplitude; δ is the constraint threshold, a positive scalar constant), which defines the allowed gradient vector The maximum upper limit of the L2 norm of J(θ), δ = 0.05, prevents violent oscillations in the parameter space and achieves stable convergence through truncation of the Hessian matrix eigenvalues; S33, in the knowledge distillation and strategy transfer mechanism stage, a teacher-student model framework is constructed to realize cross-scenario strategy transfer; wherein, the teacher model in the teacher-student model framework is pre-trained in the NS-3 simulation environment to generate a state-action pair dataset The student model in the teacher-student model framework is implemented by the distillation loss function Fine-tuning, as shown in formula (18): Among them, CE is the cross entropy loss, which is used to make the policy distribution of the student model π s Approximate the teacher model's policy distribution π t ,MSE constrains the value function to be aligned; is the knowledge distillation loss function, which is used to measure the difference between the student model and the teacher model and guide the learning process of the student model; s (a|s i ) is the student model in state s i The probability distribution of selecting action a, π t (a|s i ) is the teacher model in the same state s i The probability distribution of selecting action a; MSE() is the mean squared error loss, which is used to align the value estimate V of the student model with the value estimate V of the teacher model * ; V(s i ) is the student model for state s i The value function estimate of V, that is, the predicted value of the long-term cumulative reward; * (s i ) is the teacher model for state s i The value function estimate of , as a supervisory signal; s i It is the environment state vector, generated by the multi-dimensional environment state hybrid representation module, and contains the fusion information of channel state, user behavior and conflict events.

8. A dynamic spectrum autonomous collaborative optimization system based on a large language model, used to implement the method according to any one of claims 1 to 7, characterized in that: include: A multi-dimensional environment state hybrid representation module (101) is used to convert the channel state, historical operation trajectory and conflict feedback signal into a text-value hybrid tensor, and form a multi-dimensional environment state hybrid representation by splicing the text-value hybrid tensor; A distributed semantic reasoning engine (102) is used to design a distributed semantic reasoning engine, construct a sparse Transformer architecture and an adaptive conflict prediction mechanism within the distributed semantic reasoning engine, and generate a candidate strategy set for spectrum access and power mode through a dynamic context window based on a sliding window local attention mechanism; wherein the candidate strategy set is used for real-time strategy generation and risk prediction in a complex spectrum environment; A conflict probability predictor (103) is used to dynamically evaluate the interference risk coefficient of the candidate strategy by comparing the similarity between the feature vector extracted by the multi-head attention mechanism and the learnable conflict prototype through the conflict prediction module; A dynamic spectrum autonomous collaborative optimization module (104) is used to perform the dynamic spectrum autonomous collaborative optimization based on the multi-dimensional environmental state mixed representation and the interference risk coefficient.

9. An electronic device comprising a processor and a memory, wherein the memory stores a plurality of instructions, and the processor is configured to read the instructions and execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a plurality of instructions, wherein the plurality of instructions can be read by a processor to execute the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • User attention prediction method based on cognitive model

    CN120743717A

  • Multi-tenant cloud policy conflict adaptive adjustment method and system

    CN120979825A

  • Multi-tenant cloud policy conflict adaptive adjustment method and system

    CN120979825B

  • Agricultural heterogeneous data fusion verification method based on multi-dimensional semantic alignment operator

    CN121030275A

  • CNN-Transform hybrid architecture-based road facility disease evolution prediction and maintenance decision method and system

    CN121328829A