CN117220826B - Agricultural Internet of things perception data prediction method based on semantic communication - Google Patents

Agricultural Internet of things perception data prediction method based on semantic communication Download PDF

Info

Publication number
CN117220826B
CN117220826B CN202310828015.6A CN202310828015A CN117220826B CN 117220826 B CN117220826 B CN 117220826B CN 202310828015 A CN202310828015 A CN 202310828015A CN 117220826 B CN117220826 B CN 117220826B
Authority
CN
China
Prior art keywords
semantic
data
head
layer
attention
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310828015.6A
Other languages
Chinese (zh)
Other versions
CN117220826A (en
Inventor
朱容波
刘浩
潘昕耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huazhong Agricultural University
Original Assignee
Huazhong Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huazhong Agricultural University filed Critical Huazhong Agricultural University
Priority to CN202310828015.6A priority Critical patent/CN117220826B/en
Publication of CN117220826A publication Critical patent/CN117220826A/en
Application granted granted Critical
Publication of CN117220826B publication Critical patent/CN117220826B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses a semantic communication-based agricultural Internet of things perception data prediction method, which comprises the following steps of: collecting environment data, namely IoA data, necessary in various agricultural production processes; in a transmitting end, sending the IoA data D into a semantic encoder, extracting semantic features S from the dense vector E, and inputting the semantic features S into a semantic compressor to obtain compressed semantic information Z; in the channel layer, the semantic information Z is used as the input of a neuron and added with bias to simulate the interference suffered by the signal in the AWGN channel, so as to obtain a signal Y; in the receiving end, the received signal Y is input into a semantic decoder, and the semantic data recovery is carried out by a semantic restorer and the vector is outputPrediction layer is based on vectorsOutputting the prediction resultAnd calculating the value of the loss function, and reversely transmitting the value to a transmitting end through the adaptive moment estimation to complete the training and updating of the SC-ICCM network model. The invention can reduce the data volume of channel transmission, overcome noise interference and effectively execute the prediction task.

Description

Agricultural Internet of things perception data prediction method based on semantic communication
Technical Field
The invention relates to the field of intelligent agriculture by artificial intelligence technology, in particular to an agricultural Internet of things perception data prediction method based on semantic communication.
Background
Agriculture is a basic stone upon which humans survive. In agricultural production, the crop's growing environment is an important factor affecting its yield and quality. The traditional agriculture perception and prediction of the environment mainly takes the farmer experience as the main, and has the problem of low accuracy. Along with the development of artificial intelligence technology, the demands of people on the intelligent degree of the agricultural production process are higher and higher, and new modes of agricultural production are gradually explored. The agricultural internet of things (Internet ofAgriculture, ioA) is considered a typical paradigm for intelligent agriculture. The IoA can collect and forecast the environmental growth factors necessary for agricultural production through various sensor devices deployed at the edge of the network, so that the accurate regulation and control of the agricultural product growth environment is realized.
However, existing prediction methods have some problems and have limited applicability in IoA. Firstly, the existing prediction method adopts a mode of 'transmission before prediction', mainly uses shannon information theory, realizes error-free transmission of data at a bit layer, and does not pay attention to semantic information contained in a transmission content aiming at a prediction task. The traditional mobile communication system mainly comprises six modules of source coding, channel coding, modulation, demodulation, channel decoding and source decoding. A large amount of sensory data is collected at the network edge by the agricultural sensing device. The source coding carries out symbol reconstruction according to the statistical characteristics of the original signal, and the shortest code element is used for carrying the highest information quantity on the premise that the information distortion is in the tolerance range so as to realize information compression. The channel coding solves the problems of error code, loss and the like caused by noise interference, fading and the like by adding redundancy check codes. Modulation is intended to carry information on a suitable carrier wave for conversion to a signal suitable for transmission over a wireless channel for long distance transmission. Demodulation, channel decoding, which is the inverse of the corresponding module, is intended to recover the transmitted data without errors. The received perceptual data is then used as input to a predictive model to obtain a corresponding result. This predictive approach separates communication from the computation process such that the deep learning (DEEP LEARNING, DL) model cannot combine optimization objectives to correct errors originating from the transmission process, degrading the performance of the prediction. Second, the real-time perception of IoA creates a large amount of data that needs to be transmitted over limited spectrum resources while requiring low latency, which presents challenges to conventional communication systems. In addition, the data may be distorted during transmission of the wireless channel due to noise interference, especially in the case of low signal-to-noise ratio. Finally, due to the computational bottleneck of the IoA device, the IoA usually adopts a cloud edge end cooperative architecture, and a cloud/edge server is responsible for the training process of the prediction model and issues the model to the IoA terminal device. However, the process of issuing the prediction model also occupies limited spectrum resources, further burdening the channel, and resulting in higher transmission delay. Therefore, how to design a new IoA-aware data prediction method, which combines the communication and prediction processes more tightly, not only can reduce the amount of data transmitted, but also can meet the intelligent service requirement of users on the side equipment, is a key problem that restricts the further development of IoA.
The invention aims to solve the following technical problems:
(1) Aiming at the problems of low precision and extra communication overhead caused by the separation of communication and calculation in the existing prediction method, an IoA perception data prediction model SC-ICCM based on semantic communication is designed. The SC-ICCM adopts a general calculation integrated end-edge cooperative framework to connect the data sensing, transmitting and predicting processes in series, so that the joint optimization of the whole data predicting process is realized to improve the anti-interference capability and the intelligent degree of data transmission.
(2) Aiming at the problem of overlarge communication load pressure of an IoA backbone network caused by massive data in the transmission process of the existing prediction method, a semantic encoder and a semantic decoder are designed. The encoder/decoder can extract key semantics contained in data aiming at the data required by a prediction task, only transmits semantic information playing a key role in prediction precision in a semantic compression mode, reduces the transmitted data volume, and slows down the communication pressure of the IoA.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides the agricultural Internet of things perception data prediction method based on semantic communication.
The technical scheme adopted for solving the technical problems is as follows:
the invention provides a semantic communication-based agricultural Internet of things perception data prediction method, which is used for establishing an SC-ICCM network model and comprises the following steps: a transmitting end and a receiving end; the transmitting end comprises: embedding layers and semantic encoders; the semantic encoder includes: a semantic extractor and a semantic compressor; the receiving end comprises a semantic decoder; the semantic decoder includes: a semantic reducer and a prediction layer; a channel layer is arranged between the sending end and the receiving end; the method comprises the following steps:
Step 1, collecting environmental data, namely IoA data, necessary in various agricultural production processes through an IoA terminal sensing device; sending the data to Sink nodes at the edge, wherein the Sink nodes are used as sending ends;
step 2, in a transmitting end, sending the IoA data D into a semantic encoder, expressing the IoA data D into a dense vector E through a Embedding layer, extracting semantic features S from the dense vector E through a semantic extractor according to the requirements of a prediction task, wherein the semantic features S contain key semantics required by the prediction task, and inputting the semantic features S into a semantic compressor to obtain compressed semantic information Z;
Step 3, in the channel layer, using semantic information Z as the input of neurons and adding bias to simulate the interference suffered by signals in an AWGN channel to obtain signals Y; transmitting the data to an IoA intelligent terminal, wherein the IoA intelligent terminal is used as a receiving end;
step 4, in the receiving end, the received signal Y is input into a semantic decoder, and the semantic data recovery is carried out through a semantic restorer and vectors are output Prediction layer is based on vector/>Output prediction result/>
Step 5, at the tail end of the receiving end, according to the IoA data D and the prediction resultCalculating the value of the loss function, and reversely transmitting the value to a transmitting end through the adaptive moment estimation to complete the training and updating of the SC-ICCM network model;
and 6, inputting the IoA data to be predicted, and outputting a prediction result through a trained SC-ICCM network model.
Further, the IoA data in the step 1 of the present invention is a set of multivariate perceptual data sequences d= [ D 1...,dl...,dL],D∈RB×L×M, where R represents a real set, B is a batch size, L is a backtracking window size, each of the perceptual data D has M dimensions at time t, i.e. d= [ D 1,...,dm,...,dM ], where D m is the mth perceptual data, M e M; for each set of sensory data D in D, due to the strong correlation of agricultural sensory data and time, time information is added in D to improve accuracy of the model, processedExpressed as:
where year is the year of the perceived data d, mon is the month of the perceived data d, f (h), g (h) is a trigonometric function with the hour h of the perceived data d as an argument, for extracting period information, expressed as:
f(h)=sin(2πh/24)
g(h)=cos(2πh/24)
For the following Each time series data is normalized by a maximum and minimum value, and is expressed as:
wherein, For/>Maximum value of/(I)For/>Is a minimum of (2).
Further, the Embedding layer in the step 2 of the present invention is composed of a Dense layer, and is used for linearly transforming the sparse input vector with low dimension into the Dense vector with high dimension so as to amplify the characteristics thereof.
Further, the semantic extractor in the step 2 of the present invention is a modified lightweight Transformer Encoder layer, specifically including: layer normalization, lightweight multi-head attention mechanism, residual connection, and Dense layer; wherein:
firstly, carrying out layer normalization on an input vector E, and converting the mean variance of the input vector into the same distribution so as to accelerate the extraction process of the semantics;
The normalized vector is input into a lightweight multi-head attention mechanism, query semantics S q, key semantics S k and value semantics S v are calculated through linear transformation of a weight matrix W Q、WK、WV; then, the attention score S Attention thereof is calculated by the semantic vector S q、Sk、Sv to decide the importance degree of the data semantic, and this process is expressed as:
wherein, For the dimension of vector S k, PE p is a position code whose purpose is to enable a semantic extractor to learn and extract the semantics of the perceptual data implication in the space-time dimension by adding position information in the time-sequence vector, expressed as:
wherein, p represents the position of the data in the vector, r E [0, E/2], E is the output dimension of TransformerEncoder layers and is consistent with the dimension of Embedding layers, and the frequency is the same as that of the data in the vector Can be expressed as:
in the light multi-head attention mechanism, attention scores are calculated only on the first attention head, and the subsequent attention heads all use the attention scores of the heads so as to reduce the calculation cost of the attention mechanism; residual connection is carried out on the attention score and the output semantic features of the previous attention head so as to map the input vector into different subspaces, and then linear calculation is carried out through a Dense layer so as to obtain multidimensional attention output; finally, the calculated multi-headed attention outputs are stitched together and linearly transformed to yield the final output result S Mul-Head, which is expressed as:
headi=Linear(headi-1+SAttention)
SMul-Head=Concat(head1,...,headi,...,headh)WR
where Linear (·) represents the Linear computation, head i is the output semantics of the ith attention header, Concat denotes a splicing operation, and h is the number of attention heads;
Processing the output result of the lightweight multi-head attention mechanism by adopting residual connection to strengthen semantic features, wherein the process is expressed as:
SMul-Head=SMul-Head+E
Then, performing layer normalization on S Mul-Head, inputting the layer normalized to the Dense layer with the activation function of ReLU, performing linear transformation, and performing residual connection on the output vector again to obtain the finally extracted semantic feature S, where the process can be expressed as:
S=Linear(LayerNorm(SMul-Head))+SMul-Head
Wherein LayerNorm (·) represents the layer normalization operation.
Further, the semantic compressor in the step 2 of the present invention includes: hidden layer, mean calculation network E u (,) and variance calculation networkConsists of three Dense layers of different dimensions; e u (& gt) and/>Sharing a portion of the weights and network structure to reduce the number of parameters and prevent overfitting; the semantic compressor calculates the network/>, through the mean calculation network E u (& gt) and the varianceFitting probability distribution of semantic features S to obtain mean mu and variance sigma 2 of the S, and reducing the dimension of the S in a sampling mode to obtain compressed semantic information Z; then, AWGN compliant with the distribution N (0, 1) is added in Z to strengthen the Z's immunity to noise, expressed as:
Z=μ+ζσ
wherein ζ to N (0, 1).
Further, the channel layer in the step 3 of the present invention is specifically:
In the channel layer, the semantic information Z is used as the input of neurons, and bias is added to simulate the interference suffered by signals in an AWGN channel, namely:
Y=Z+N
wherein N is AWGN, and includes B noise vectors N, and the value of the random variable is determined by the signal-to-noise ratio in the channel.
Further, the semantic restorer in the step 4 of the present invention includes two Dense layers, restores the dimension of the received distorted semantic information Y to the original semantic dimension, and outputs a vector
Further, the prediction layer in the step 4 of the present invention is a Dense layer, and the number of neurons is set according to the task requirement to obtain the predicted data of the future time T stepWherein/>The predicted data after the backtracking window L plus the time T is represented.
Further, in said step 5 of the present invention, the mean square error MSE is used as a loss function to measure d and dThe gap between them is expressed as:
Wherein, the time T is the length of the prediction window; alpha is the network parameter set of the semantic encoder, beta is the network parameter set of the semantic decoder, ed represents the mathematical expectation of d.
Further, the method for updating the SC-ICCM model in the step 5 of the invention comprises the following steps:
expressing the update optimization problem of the SC-ICCM model as:
By minimizing the loss function L MSE, the SC-ICCM gradually learns the semantics contained in the perception data and improves the anti-interference capability in the transmission process.
The invention has the beneficial effects that:
1. the invention provides an IoA perception data prediction model SC-ICCM based on semantic communication. The SC-ICCM adopts a terminal-edge collaborative general calculation integrated architecture. The IoA terminal sensing equipment collects the necessary environmental data in various agricultural production processes and sends the environmental data to Sink nodes at the edge. The Sink node is used as a sending end to extract semantic information important for a prediction task and transmit the semantic information to the IoA intelligent terminal. And then, the intelligent terminal is used as a receiving end to restore data semantics and predict according to the received distortion signals, so as to obtain a corresponding prediction result. In this model, the semantic extraction, semantic compression, channel transmission, semantic recovery and prediction networks are jointly optimized by overcoming noise interference to improve robustness to noise.
2. The invention constructs a semantic encoder and a semantic decoder, wherein the semantic encoder consists of a semantic extractor and a semantic compressor. At the transmitting end, the semantic extractor maps the low-dimensional numerical data to a high-dimensional space for vector expression. Then, the semantic compressor performs dimension reduction on the high-dimension semantic vector, and only transmits the compressed semantic information to reduce the data volume in the channel transmission process. And the semantic decoder performs semantic restoration according to the received semantic information and executes a corresponding prediction task.
3. The improved lightweight Transformer Encoder layer is constructed in the semantic extractor, so that the computing pressure of the edge equipment is reduced, and the semantic extractor can learn and extract the semantics contained in the perception data in the space-time dimension by adding the position information in the time sequence vector; in the light-weight multi-head attention mechanism, attention scores are calculated only on the first attention head, and the subsequent attention heads all use the attention scores of the heads so as to reduce the calculation overhead of the attention mechanism.
Experimental results show that under the condition of good signal-to-noise ratio, the SC-ICCM provided by the invention can realize the data compression rate of more than 90% at the highest, and the prediction precision loss is within 2%. Compared with the traditional method, the SC-ICCM can reduce the transmitted data volume by more than 50% on the premise of not influencing the accuracy of the prediction task, and greatly relieves the bandwidth pressure of the IoA backbone network.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a diagram of an SC-ICCM system model of an embodiment of the invention;
FIG. 2 is a network architecture of an SC-ICCM of an embodiment of the invention;
FIG. 3 is a semantic extractor of an embodiment of the present invention;
FIG. 4 is a graph showing the effect of compression rate β on MSE values for different SNR conditions in accordance with an embodiment of the present invention;
FIG. 5 is a graph showing the effect of compression ratio β on R 2 values under different SNR conditions in accordance with an embodiment of the present invention;
FIG. 6 is a comparison of MSE values for different methods of embodiments of the present invention;
FIG. 7 is a comparison of R 2 values for the different methods of the examples of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Example 1
The agricultural Internet of things perception data prediction method based on semantic communication establishes an SC-ICCM network model, and comprises the following steps: a transmitting end and a receiving end; the transmitting end comprises: embedding layers and semantic encoders; the semantic encoder includes: a semantic extractor and a semantic compressor; the receiving end comprises a semantic decoder; the semantic decoder includes: a semantic reducer and a prediction layer; a channel layer is arranged between the sending end and the receiving end; the method comprises the following steps:
Step 1, collecting environmental data, namely IoA data, necessary in various agricultural production processes through an IoA terminal sensing device; sending the data to Sink nodes at the edge, wherein the Sink nodes are used as sending ends;
step 2, in a transmitting end, sending the IoA data D into a semantic encoder, expressing the IoA data D into a dense vector E through a Embedding layer, extracting semantic features S from the dense vector E through a semantic extractor according to the requirements of a prediction task, wherein the semantic features S contain key semantics required by the prediction task, and inputting the semantic features S into a semantic compressor to obtain compressed semantic information Z;
Step 3, in the channel layer, using semantic information Z as the input of neurons and adding bias to simulate the interference suffered by signals in an AWGN channel to obtain signals Y; transmitting the data to an IoA intelligent terminal, wherein the IoA intelligent terminal is used as a receiving end;
step 4, in the receiving end, the received signal Y is input into a semantic decoder, and the semantic data recovery is carried out through a semantic restorer and vectors are output Prediction layer is based on vector/>Output prediction result/>
Step 5, at the tail end of the receiving end, according to the IoA data D and the prediction resultCalculating the value of the loss function, and reversely transmitting the value to a transmitting end through the adaptive moment estimation to complete the training and updating of the SC-ICCM network model;
and 6, inputting the IoA data to be predicted, and outputting a prediction result through a trained SC-ICCM network model.
Example two
As shown in fig. 1, the SC-ICCM model of the embodiment of the present invention is composed of a semantic encoder, a wireless channel, and a semantic decoder. Unlike the conventional communication model, the SC-ICCM encodes IoA-aware data through a semantic encoder and a semantic decoder. At a transmitting end, a semantic encoder is responsible for guaranteeing the anti-interference capability of the IoA data in a channel, firstly, carrying out semantic extraction on the data to be transmitted to obtain corresponding semantic information, then reducing the dimension of the semantic information through semantic compression to reduce the transmitted data quantity, and transmitting the data into a wireless channel. The semantic information is distorted by Noise interference during wireless channel transmission, assuming that the Noise is caused by the channel, such as signal distortion caused by Additive White Gaussian Noise (AWGN). The distortion information transmitted through the channel is decoded by a semantic decoder to obtain a prediction result required by the intelligent task. In general, SC-ICCM takes into account both semantic and transport issues of data. The semantic layer considers the data semantic information required by the intelligent task to be extracted, and the transmission layer considers the semantic information to be successfully decoded into the prediction result required by the task.
Semantic encoder: the semantic encoder is positioned at the transmitting end and consists of two parts, namely semantic extraction and semantic compression. Conventional communication systems rearrange and express information by source coding to achieve data compression, and then guarantee error-free bit transmission of the information in a channel by channel coding. However, such coding is simply a symbol replacement for the information expression and cannot extract the semantics contained in the information itself. In contrast, semantic coding focuses not only on the symbolic substitution of information, but also on the semantic relationships that the information contains. Semantic extraction is responsible for carrying out semantic symbolic expression on information, semantic compression is responsible for carrying out dimension reduction on the extracted semantic information, and the whole process is digitizing and compressing semantic relations in the information. In addition, the semantic encoder jointly considers the source and the channel coding, and ensures the correct transmission of the semantics while extracting the semantic information.
Wireless channel: the present invention focuses mainly on the process of semantic encoding and decoding, thus consider AWGN (weighted white gaussian noise) channels. Furthermore, in order to jointly train the semantic encoder and the semantic decoder, back propagation must be possible through the channel. The AWGN channel is simulated as part of the model in a manner that simulates the physical channel with a neural network to support back propagation training.
Semantic decoder: the semantic decoder is positioned at the receiving end and consists of two parts, namely semantic restoration and prediction. In the invention, the semantic decoder inputs the received semantic information into the neural network for semantic reduction and obtains a prediction result in a future period of time. And then, updating parameters of the SC-ICCM according to the accuracy of the prediction result.
Example III
The network architecture of the SC-ICCM is shown in fig. 2, and includes four parts, namely Embedding layers, a semantic encoder, a channel layer and a semantic decoder, wherein: the semantic encoder is divided into two parts, namely a semantic extractor and a semantic compressor, and the semantic decoder is divided into two parts, namely a semantic restorer and a prediction layer.
(1) Embedding layers
The Embedding layer consists of a Dense layer, and functions to linearly transform the sparse input vector with low dimension into Dense vector with high dimension, and enlarge the characteristics so that the semantic extractor can extract the semantic better.
(2) Semantic extractor
As shown in fig. 3, based on the requirement of the lightweight network structure, the semantic extractor is an improved lightweight Transformer Encoder layer, which specifically includes: layer normalization, lightweight multi-head attention mechanism, residual connection, and Dense layer; wherein:
Firstly, carrying out layer normalization on an input vector E, and converting the mean variance of the input vector into the same distribution so as to accelerate the extraction process of the semantics.
The normalized vector is input into a lightweight multi-head attention mechanism, query semantics S q, key semantics S k and value semantics S v are calculated through linear transformation of a weight matrix W Q、WK、WV; then, the attention score S Attention thereof is calculated by the semantic vector S q、Sk、Sv to decide the importance degree of the data semantic, and this process is expressed as:
wherein, For the dimension of the vector S k, PE p is a position code, whose purpose is to enable the semantic extractor to learn and extract the semantics contained in the perceptual data in the space-time dimension by adding position information to the time-sequence vector, which can be expressed as:
wherein, p represents the position of the data in the vector, r E [0, E/2], E is the output dimension of TransformerEncoder layers and is consistent with the dimension of Embedding layers, and the frequency is the same as that of the data in the vector Can be expressed as:
In the light-weight multi-head attention mechanism, attention scores are calculated only on the first attention head, and the subsequent attention heads all use the attention scores of the heads so as to reduce the calculation overhead of the attention mechanism. Residual connection is carried out on the attention score and the output semantic features of the previous attention head so as to map the input vectors into different subspaces, and then linear calculation is carried out through a Dense layer so as to obtain multi-dimensional attention output. Finally, the calculated multi-headed attention outputs are stitched together and linearly transformed to yield the final output result S Mul-Head, which is expressed as:
headi=Linear(headi-1+SAttention) (9)
SMul-Head=Concat(head1,...,headi,...,headh)WR (10)
where Linear (·) represents the Linear computation, head i is the output semantics of the ith attention header, Concat denotes a splicing operation, and h is the number of attention heads;
Processing the output result of the lightweight multi-head attention mechanism by adopting residual connection to strengthen semantic features, wherein the process is expressed as:
SMul-Head=SMul-Head+E (11)
Then, performing layer normalization on S Mul-Head, inputting the layer normalized to the Dense layer with the activation function of ReLU, performing linear transformation, and performing residual connection on the output vector again to obtain the finally extracted semantic feature S, where the process can be expressed as:
S=Linear(LayerNorm(SMul-Head))+SMul-Head (12)
Wherein LayerNorm (·) represents the layer normalization operation.
(3) Semantic compressor
The semantic compressor is divided into a hidden layer, a mean value computing network E u (DEG) and a variance computing networkConsists of three different dimensional Dense layers. Eu (-) and E σ2 (-) share a portion of the weight and network structure to reduce the number of parameters and prevent overfitting. The semantic compressor calculates the network/>, through the mean calculation network E u (& gt) and the varianceFitting the probability distribution of S to obtain a mean mu and a variance sigma 2 of the S, and reducing the dimension of the S in a sampling mode to obtain compressed semantic information Z. Then, adding AWGN following the distribution N (0, 1) in Z to strengthen the anti-interference ability of Z against noise can be expressed as:
Z=μ+ζσ (13)
wherein ζ to N (0, 1).
(4) Channel(s)
The AWGN channel is simulated by using a neuron and is embedded into the model to participate in training as a loop in the model, so that the model has stronger anti-interference learning capability.
(5) Semantic restorer
The semantic restorer of the receiving end consists of two Dense layers, and restores the dimension of the compressed semantic into the original semantic dimension according to the received distorted semantic information.
(6) Prediction layer
The prediction layer is composed of a Dense layer, which sets the number of neurons according to task requirements to obtain the predicted data of the future T time step
Example IV
The operation flow of the SC-ICCM model of the embodiment of the invention is as follows:
And step 1, the input of the SC-ICCM is the perception data of various sensors and is marked as D epsilon R B×L×M, wherein R represents a real number set, and B is the batch size.
The input of the transmitting end is a group of multivariable sensing data sequences D= [ D 1...,dl...,dL ], wherein L is the size of a backtracking window, each sensing data D has M dimensions at the time t, namely d= [ D 1,...,dm,...,dM ], D m (M epsilon M) is the mth sensing data and is a scalar value.
Then, for each set of sensory data D in D, time information is added to D to improve accuracy of the model due to strong correlation of agricultural sensory data and time, processedCan be expressed as:
Where year is the year of the perceived data d, mon is the month of the perceived data d, f (h), g (h) is a trigonometric function with the hour h of the perceived data d as an argument, for extracting period information, may be expressed as:
f(h)=sin(2πh/24) (15)
g(h)=cos(2πh/24) (16)
For the following The normalization of each time series data by the maximum and minimum values can be expressed as:
wherein, For/>Maximum value of/(I)For/>Is a minimum of (2).
Step 2, for a group of historical data with backtracking window LData is represented by Embedding layers as dense vectors E εR B×L×E, where E is the dimension of the vector.
And step 3, inputting the E into a semantic encoder, and firstly, learning semantic information of the perceived data from the E by the semantic encoder through Transformer Encoder, and outputting the extracted semantic features S epsilon R B×L×E.
And step 4, the semantic feature S obtained by the semantic extractor is still a dense vector, has a higher dimension, and consumes a large amount of bandwidth resources when being directly transmitted. S is input into a semantic compressor, compressed semantic information Z epsilon R B×L×βE is obtained through calculation of a formula (12), wherein beta (beta is more than or equal to 0 and less than or equal to 1) is the compression rate of the semantic compressor, and beta E is the output dimension of the semantic compressor.
The sign z of the semantic information can be expressed as:
wherein, Representing a semantic encoder with a network parameter set alpha.
In step 5, the bandwidth required for transmitting the compressed semantic information in the wireless channel is greatly reduced, however, the semantic information Z is distorted in the channel due to the interference of noise, and Z is taken as the input of a neuron and added with bias to simulate the interference suffered by the signal in the AWGN channel.
Transmitting the encoded z through a channel, the distortion signal y received by the receiving end can be expressed as:
Y=Z+N (2)
wherein N is AWGN, and includes B Noise vectors N, and the value of the random variable is determined by Signal-to-Noise Ratio (SNR) in the channel. Represents an independent and equidistributed AWGN with a mean of 0 and a variance of/>
Step 6, the signal Y received by the receiving end is input into a semantic decoder, firstly, the data semantic recovery is carried out through a semantic restorer, and the output vector is
Step 7, finally, the prediction layer is according toOutput prediction result/>Where P is the dimension of the prediction vector.
The receiving end takes the distortion signal y as input and executes corresponding prediction tasks through a semantic decoder. Prediction results obtained by decodingCan be expressed as:
wherein, Representing a semantic decoder with a network parameter set gamma.
Step 8, SC-ICCM at the end of the receiving end can be based on D andThe value of the loss function (4) is calculated, and the value is back propagated to the transmitting end through the adaptive moment estimation (Adaptive Moment Estimation, adam), so that the parameter of the whole system can be trained and updated.
The objective of SC-ICCM is to transfer the semantics contained in the original data without errors and guarantee the accuracy of the prediction tasks, which presents two challenges for the design of the model. First, the design of semantic encoders and decoders is the key to the overall system to extract and recover semantics. Secondly, how to improve the anti-interference capability of the model under the environment of low signal-to-noise ratio is the fundamental guarantee of communication stability. To ensure the original data d and the predicted dataD and/>, using Mean-square Error (MSE) as a loss functionThe gap between them can be expressed as:
Where T is the length of the prediction window.
The SC-ICCM aims to improve the accuracy of predicted data while guaranteeing the integrity of data semantics in the transmission process. Thus, the optimization problem of the overall system can be expressed as:
By minimizing the loss function L MSE, the SC-ICCM can gradually learn the semantics contained in the perception data and improve the anti-interference capability in the transmission process.
Test examples
To verify the performance of the proposed SC-ICCM in IoA, it was compared with other schemes in AWGN channel environment. Jena Climate with a data set of Max Planck Institute for Biogeochemistry is adopted, and the data contains 14 different weather characteristics such as temperature, humidity, pressure and the like, and more than 40 ten thousand pieces of data are adopted. The data set is divided into training and test sets in a ratio of 70% to 30%. The channel SNR takes the value interval of [ -15,15] dB, the backtracking window L is 144, the prediction window T is 72, the continuous 128 groups of perception data are taken as Batchsize, the initial learning rate is 0.001, and the optimizer adopts Adam. Using the perceived data d and the recovered dataThe MSE value and the decision coefficient (Coefficient of Determination) R 2 value are used as evaluation indexes to measure the performances of different methods. The calculation formula of R 2 is:
wherein, Is the average of the perceived data. Generally, the value range of R 2 is [0,1], and a closer value to 1 indicates a better fitting effect, which can represent the accuracy of the predicted data.
The impact of the compression ratio beta on SC-ICCM performance was first analyzed. Fig. 4 shows the effect of compression ratio β on MSE values for different SNR conditions. As the SNR increases, the MSE value decreases at different compression rates β. When β=1/32, the MSE value decreases from 10.53 to 0.93. Under the same SNR, the MSE value is increasing as the value of β is decreasing. When β=1/512, the MSE value decreases from 17.41 to 1.26, which increases 35.48% over β=1/32, because the reduction in compression rate causes the transmitted semantic information to decrease, thereby increasing the error in the predicted data. In the case of a lower SNR, the MSE values of different compression ratios β differ more. When snr=0, the MSE value of β=1/32 is 1.42, and the MSE value of β=1/64 is 1.57, which are close to each other. When snr=15, the MSE values of all β are almost equal.
Fig. 5 shows the effect of compression ratio β on the R 2 value under different SNR conditions. As the SNR increases, the R 2 value increases at different compression rates β. The R 2 value of β=1/32 increased from 44.90% to 99.46%, the R 2 value of β=1/64 increased from 33.34% to 99.45%, the R 2 value of β=1/128 increased from 19.13% to 99.34%, the R 2 value of β=1/256 increased from 6.95% to 99.14%, and the R 2 value of β=1/512 increased from 0% to 97.47%. When snr=0, the R 2 values of β=1/32 and β=1/64 start to coincide. When snr=15, the R 2 values of all β are close to coincidence. Considering the balance between the prediction accuracy and the transmission efficiency of the SC-ICCM in an actual IoA scene, the optimal compression rate β is set to 1/64 in the rest of the experiments.
The proposed SC-ICCM is then compared with the Original Data Direct Predictions (ODDP), conventional transmit-before-predict (TTBP), and performance analyzed. FIG. 6 shows a comparison of MES values for different methods. The MSE value of ODDP stabilizes at 0.93 and does not change with SNR, since ODDP data is not transmitted over the channel and is directly input to the model for prediction. As the SNR increases, the MSE value of TTBP decreases from 15.11 to 1.20 and the MSE value of sc-ICCM decreases from 11.38 to 0.94. When SNR <0, the interference of the channel is large, both TTBP and the proposed SC-ICCM have large errors. When the SNR is more than or equal to 0, the errors of the proposed SC-ICCM are smaller than TTBP, the maximum value is reached when the SNR=5, the MSE value of the SC-ICCM is 1.58, the MSE value of the TTBP is 2.12, and the reduction of 36.06 percent is realized. TTBP firstly transmits data and then predicts, a model cannot optimize noise interference, and a larger error is generated. And the SC-ICCM optimizes the joint noise of the transmitting end, the receiving end and the channel, thereby having good noise immunity. When the SNR is equal to or greater than 5, the MSE values of the proposed SC-ICCM and ODDP are almost equal, which indicates that the proposed SC-ICCM has stronger robustness under the condition of higher SNR.
Figure 7 shows a comparison of R 2 values for the different methods. The R 2 value of ODDP likewise stabilized at 99.51% and did not change with SNR. As the SNR increases, the R 2 value of TTBP increases from 8.74% to 98.21%, and the R 2 value of SC-ICCM increases from 33.34% to 99.45%. When SNR = -15, R 2 of SC-ICCM is 24.6% higher than TTBP. When-15 < SNR <0, the R 2 value of SC-ICCM rises slowly, while TTBP rises slowly after rising greatly. When the SNR is more than or equal to 0, the R 2 value of the proposed SC-ICCM is larger than TTBP, because the SC-ICCM extracts key semantics required by a prediction task at a transmitting end, the communication and the task calculation are tightly combined, the understanding capability of a model on the semantics is improved, and the prediction performance is better. When the SNR is more than or equal to 5, the R 2 values of the proposed SC-ICCM and ODDP are almost equal, so that the proposed SC-ICCM can greatly reduce the transmitted data quantity and real-time transmission delay and relieve the bandwidth pressure of the IoA backbone network on the premise of not influencing the prediction task precision.
It should be understood that the sequence numbers of the steps in the above embodiments do not mean the order of execution, and the execution order of the processes should be determined by the functions and the internal logic, and should not be construed as limiting the implementation process of the embodiments of the present application.
It will be understood that modifications and variations will be apparent to those skilled in the art from the foregoing description, and it is intended that all such modifications and variations be included within the scope of the following claims.

Claims (10)

1. The agricultural Internet of things perception data prediction method based on semantic communication is characterized by establishing an SC-ICCM network model and comprising the following steps: a transmitting end and a receiving end; the transmitting end comprises: embedding layers and semantic encoders; the semantic encoder includes: a semantic extractor and a semantic compressor; the receiving end comprises a semantic decoder; the semantic decoder includes: a semantic reducer and a prediction layer; a channel layer is arranged between the sending end and the receiving end; the method comprises the following steps:
Step 1, collecting environmental data, namely IoA data, necessary in various agricultural production processes through an IoA terminal sensing device; sending the data to Sink nodes at the edge, wherein the Sink nodes are used as sending ends;
step 2, in a transmitting end, sending the IoA data D into a semantic encoder, expressing the IoA data D into a dense vector E through a Embedding layer, extracting semantic features S from the dense vector E through a semantic extractor according to the requirements of a prediction task, wherein the semantic features S contain key semantics required by the prediction task, and inputting the semantic features S into a semantic compressor to obtain compressed semantic information Z;
Step 3, in the channel layer, using semantic information Z as the input of neurons and adding bias to simulate the interference suffered by signals in an AWGN channel to obtain signals Y; transmitting the data to an IoA intelligent terminal, wherein the IoA intelligent terminal is used as a receiving end;
step 4, in the receiving end, the received signal Y is input into a semantic decoder, and the semantic data recovery is carried out through a semantic restorer and vectors are output Prediction layer is based on vector/>Output prediction result/>
Step 5, at the tail end of the receiving end, according to the IoA data D and the prediction resultCalculating the value of the loss function, and reversely transmitting the value to a transmitting end through the adaptive moment estimation to complete the training and updating of the SC-ICCM network model;
and 6, inputting the IoA data to be predicted, and outputting a prediction result through a trained SC-ICCM network model.
2. The semantic communication-based agricultural internet of things perception data prediction method according to claim 1, wherein the IoA data in the step 1 is a group of multivariate perception data sequences d= [ D 1…,dl…,dL],D∈RB×L×M, wherein R represents a real set, B is a batch size, and L is a backtracking window size, and each perception data D has M dimensions at time t, namely d= [ D 1,…,dm,…,dM ], wherein D m is the mth perception data, M e M; for each set of sensory data D in D, due to the strong correlation of agricultural sensory data and time, time information is added in D to improve accuracy of the model, processedExpressed as:
where year is the year of the perceived data d, mon is the month of the perceived data d, f (h), g (h) is a trigonometric function with the hour h of the perceived data d as an argument, for extracting period information, expressed as:
f(h)=sin(2πh/24)
g(h)=cos(2πh/24)
For the following Each time series data is normalized by a maximum and minimum value, and is expressed as:
wherein, For/>Maximum value of/(I)For/>Is a minimum of (2).
3. The semantic communication-based agricultural internet of things perception data prediction method according to claim 1, wherein the Embedding layers in the step 2 are composed of a Dense layer, and are used for linearly transforming low-dimensional sparse input vectors into high-dimensional Dense vectors so as to amplify the features of the low-dimensional sparse input vectors.
4. The semantic communication-based agricultural internet of things perception data prediction method according to claim 1, wherein the semantic extractor in the step 2 is an improved lightweight Transformer Encoder layer, and specifically comprises: layer normalization, lightweight multi-head attention mechanism, residual connection, and Dense layer; wherein:
firstly, carrying out layer normalization on an input vector E, and converting the mean variance of the input vector into the same distribution so as to accelerate the extraction process of the semantics;
The normalized vector is input into a lightweight multi-head attention mechanism, query semantics S q, key semantics S k and value semantics S v are calculated through linear transformation of a weight matrix W Q、WK、WV; then, the attention score S Attention thereof is calculated by the semantic vector S q、Sk、Sv to decide the importance degree of the data semantic, and this process is expressed as:
wherein, For the dimension of vector S k, PE p is a position code whose purpose is to enable a semantic extractor to learn and extract the semantics of the perceptual data implication in the space-time dimension by adding position information in the time-sequence vector, expressed as:
Wherein, p represents the position of the data in the vector, r E [0, E/2], E is the output dimension of Transformer Encoder layers and is consistent with the dimension of Embedding layers, and the frequency is the same as that of the data in the vector Can be expressed as:
in the light multi-head attention mechanism, attention scores are calculated only on the first attention head, and the subsequent attention heads all use the attention scores of the heads so as to reduce the calculation cost of the attention mechanism; residual connection is carried out on the attention score and the output semantic features of the previous attention head so as to map the input vector into different subspaces, and then linear calculation is carried out through a Dense layer so as to obtain multidimensional attention output; finally, the calculated multi-headed attention outputs are stitched together and linearly transformed to yield the final output result S Mul-Head, which is expressed as:
headi=Linear(headi-1+SAttention)
SMul-Head=Concat(head1,...,headi,...,headh)WR
where Linear (·) represents the Linear computation, head i is the output semantics of the ith attention header, Concat denotes a splicing operation, and h is the number of attention heads;
Processing the output result of the lightweight multi-head attention mechanism by adopting residual connection to strengthen semantic features, wherein the process is expressed as:
SMul-Head=SMul-Head+E
Then, performing layer normalization on S Mul-Head, inputting the layer normalized to the Dense layer with the activation function of ReLU, performing linear transformation, and performing residual connection on the output vector again to obtain the finally extracted semantic feature S, where the process can be expressed as:
S=Linear(LayerNorm(SMul-Head))+SMul-Head
Wherein LayerNorm (·) represents the layer normalization operation.
5. The semantic communication-based agricultural internet of things perception data prediction method according to claim 1, wherein the semantic compressor in step 2 comprises: hidden layer, mean calculation network E u (,) and variance calculation networkConsists of three Dense layers of different dimensions; e u (& gt) and/>Sharing a portion of the weights and network structure to reduce the number of parameters and prevent overfitting; the semantic compressor calculates the network/>, through the mean calculation network E u (& gt) and the varianceFitting probability distribution of semantic features S to obtain mean mu and variance sigma 2 of the S, and reducing the dimension of the S in a sampling mode to obtain compressed semantic information Z; then, AWGN compliant with the distribution N (0, 1) is added in Z to strengthen the Z's immunity to noise, expressed as:
Z=μ+ζσ
wherein ζ to N (0, 1).
6. The semantic communication-based agricultural internet of things perception data prediction method according to claim 1, wherein the channel layer in the step 3 is specifically:
In the channel layer, the semantic information Z is used as the input of neurons, and bias is added to simulate the interference suffered by signals in an AWGN channel, namely:
Y=Z+N
Wherein N is AWGN, which contains B noise vectors N, and the value of the random variable N is determined by the signal-to-noise ratio in the channel.
7. The semantic communication-based agricultural internet of things perception data prediction method according to claim 2, wherein the semantic restorer in the step 4 comprises two Dense layers, restores the dimension of the received distorted semantic information Y to the original semantic dimension, and outputs a vector
8. The semantic communication-based agricultural internet of things perception data prediction method according to claim 1, wherein the prediction layer in the step 4 is a Dense layer, and the number of neurons is set according to task demands, so as to obtain predicted data of a future time T step lengthWherein/>The predicted data after the backtracking window L plus the time T is represented.
9. The semantic communication-based agricultural internet of things perception data prediction method according to claim 8, wherein d and d are measured by adopting a mean square error MSE as a loss function in the step 5The gap between them is expressed as:
Wherein, the time T is the length of the prediction window; alpha is the network parameter set of the semantic encoder, beta is the network parameter set of the semantic decoder, and E d represents the mathematical expectation of d.
10. The semantic communication-based agricultural internet of things perception data prediction method according to claim 9, wherein the method for updating the SC-ICCM model in step 5 comprises:
expressing the update optimization problem of the SC-ICCM model as:
By minimizing the loss function L MSE, the SC-ICCM gradually learns the semantics contained in the perception data and improves the anti-interference capability in the transmission process.
CN202310828015.6A 2023-07-06 2023-07-06 Agricultural Internet of things perception data prediction method based on semantic communication Active CN117220826B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310828015.6A CN117220826B (en) 2023-07-06 2023-07-06 Agricultural Internet of things perception data prediction method based on semantic communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310828015.6A CN117220826B (en) 2023-07-06 2023-07-06 Agricultural Internet of things perception data prediction method based on semantic communication

Publications (2)

Publication Number Publication Date
CN117220826A CN117220826A (en) 2023-12-12
CN117220826B true CN117220826B (en) 2024-04-19

Family

ID=89041345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310828015.6A Active CN117220826B (en) 2023-07-06 2023-07-06 Agricultural Internet of things perception data prediction method based on semantic communication

Country Status (1)

Country Link
CN (1) CN117220826B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836737A (en) * 2015-03-27 2015-08-12 北京邮电大学 Internet of things communication method taking named data as center
CN108595664A (en) * 2018-04-28 2018-09-28 尚谷科技(天津)有限公司 A kind of agricultural data monitoring method under hadoop environment
CN109033387A (en) * 2018-07-26 2018-12-18 广州大学 A kind of Internet of Things search system, method and storage medium merging multi-source data
CN110196886A (en) * 2019-04-19 2019-09-03 安徽大学 The multi-source heterogeneous big data correlating method of agricultural non-point source pollution and the big data supervising platform for using this method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836737A (en) * 2015-03-27 2015-08-12 北京邮电大学 Internet of things communication method taking named data as center
CN108595664A (en) * 2018-04-28 2018-09-28 尚谷科技(天津)有限公司 A kind of agricultural data monitoring method under hadoop environment
CN109033387A (en) * 2018-07-26 2018-12-18 广州大学 A kind of Internet of Things search system, method and storage medium merging multi-source data
CN110196886A (en) * 2019-04-19 2019-09-03 安徽大学 The multi-source heterogeneous big data correlating method of agricultural non-point source pollution and the big data supervising platform for using this method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向万物智联的语义通信网络;石光明等;《物联网学报》;20210416;第5卷(第2期);全文 *

Also Published As

Publication number Publication date
CN117220826A (en) 2023-12-12

Similar Documents

Publication Publication Date Title
CN110474716B (en) Method for establishing SCMA codec model based on noise reduction self-encoder
Zhang et al. Overfitting and underfitting analysis for deep learning based end-to-end communication systems
Shao et al. Task-oriented communication for multidevice cooperative edge inference
Yang et al. EfficientFi: Toward large-scale lightweight WiFi sensing via CSI compression
JP7056406B2 (en) Devices, sensor networks, communication methods and programs that function as sensor nodes and data centers
CN111901024B (en) MIMO channel state information feedback method based on fitting depth learning resistance
WO2021203243A1 (en) Artificial intelligence-based mimo multi-antenna signal transmission and detection technique
CN111935042B (en) Probability shaping recognition system and method based on machine learning and receiving end
CN116488748B (en) Semantic communication method, system, equipment and storage medium for transceiver collaborative learning against unmatched background knowledge base
Zhang et al. Predictive and adaptive deep coding for wireless image transmission in semantic communication
Zhang et al. A unified multi-task semantic communication system with domain adaptation
CN116939320B (en) Method for generating multimode mutually-friendly enhanced video semantic communication
Zhe et al. Rate-distortion optimized coding for efficient cnn compression
CN117220826B (en) Agricultural Internet of things perception data prediction method based on semantic communication
CN117669699A (en) Digital twinning-oriented semantic information federation learning method and system in industrial Internet of things scene
CN116938662A (en) Constellation probability shaping method and device based on recurrent neural network training optimization
Tabi et al. Hybrid Quantum-Classical Autoencoders for End-to-End Radio Communication
CN116527180A (en) SCMA method based on CWGAN-GP satellite-ground link channel modeling
Dong et al. Innovative semantic communication system
Zhang et al. Blind recognition of channel coding based on CNN-BLSTM
CN116261176A (en) Semantic communication method based on information bottleneck
CN113887806B (en) Long-tail cascade popularity prediction model, training method and prediction method
CN117978247B (en) Data compression method and device based on high-flux satellite Internet of things
CN111130697B (en) Method for reducing complexity of communication physical layer transmission system based on automatic encoder
Huang et al. Recognition of channel codes based on BiLSTM-CNN

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant