A semantic communication method based on CCSK and deep learning
Through the semantic communication method of CCSK and deep learning, the problem of low information transmission efficiency in the prior art is solved, efficient and secure communication in harsh channel environments is achieved, and redundant data transmission is reduced.
Patent Information
- Application Number
- CN202210260485.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-03-16
AI Technical Summary
The existing communication technology is difficult to efficiently transmit information in environments with limited bandwidth, low signal-to-noise or high bit error rates, resulting in waste of spectrum resources and increased communication energy consumption, and fail to effectively use semantic information for encoding to reduce redundant data.
Using a semantic communication method based on CCSK and deep learning, the semantic information is achieved by converting speech into text, extracting feature matrix and decoding it, using spread spectrum code for packet spread spectrum transmission, and despreading it at the receiving end, achieving efficient transmission of semantic information.
It effectively reduces the amount of data transmitted, reduces communication costs, improves communication security and anti-interference, and is suitable for high-reliability applications in harsh channel environments.
Smart Images

Figure BDA0003549963860000021 
Figure BDA0003549963860000022 
Figure BDA0003549963860000023
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology and proposes a semantic communication method based on CCSK and deep learning. Background Art
[0002] Over the past few decades, communications technology has developed rapidly, playing a vital role in smart cities, the Internet of Things, autonomous driving, telemedicine, and other fields. The amount of information people access daily continues to increase, placing increasing demands on communications technology. Future communications technologies will need to accurately transmit information in environments with limited bandwidth, low signal-to-noise ratios, or high bit error rates, thereby further improving bandwidth utilization and more efficiently allocating spectrum resources. Current communications technologies primarily focus on accurately transmitting data or precisely transmitting signal waveforms, typically using bit error rate (BER) or symbol error rate (SER) as performance metrics. Furthermore, technological advances aimed at higher capacity, reliability, and lower latency often result in significant waste of spectrum resources and a sharp increase in communications energy consumption. With the development of cellular communication systems, the information transmission rate of current communication systems has increased tens of thousands of times, and system capacity is gradually approaching the Shannon limit.
[0003] Powered by powerful deep learning technologies, semantic communication is considered a promising solution for further improving the efficiency of communication systems. Semantic communication systems focus on the meaning carried in signals, namely semantic information. They use this information for encoding and remove redundant data to reduce the amount of data transmitted. In the big data era, semantic communication, centered on "meaningful communication," is an inevitable form of communication between intelligent agents. By processing data in the semantic domain, semantic communication systems can remove redundant data and reduce the amount of data transmitted, thereby achieving more efficient communication. This type of communication system is also expected to be more robust in harsh channel environments, namely low signal-to-noise ratio (SNR) regions, making it ideal for applications requiring high reliability. Driven by deep learning technologies, natural language processing has achieved tremendous success in analyzing and understanding large amounts of linguistic text. Summary of the Invention
[0004] The purpose of the present invention is to address the deficiencies of the existing technology and provide a semantic communication method based on CCSK and deep learning.
[0005] The object of the present invention is achieved through the following technical solution: a semantic communication method based on CCSK and deep learning, comprising the following steps:
[0006] Step (1): The sender converts the speech into text;
[0007] Step (2): extracting a feature matrix from the text converted in step (1) to obtain a feature matrix;
[0008] Step (3): Decode the feature matrix obtained in step (2) to obtain semantic information;
[0009] Step (4): Generate a 256-bit spreading code for the semantic information obtained in step (3), perform group spreading on the semantic information using the spreading code, obtain a spread signal, and transmit it to the receiving end;
[0010] Step (5): The receiving end generates a 256-bit spreading code that is consistent with the transmitting end, obtains the spread spectrum signal transmitted by the transmitting end by identifying the synchronization bit, and despreads it to obtain semantic information;
[0011] Step (6): Convert the semantic information obtained in step (5) into speech to complete the transmission.
[0012] Furthermore, the step (2) includes the following sub-steps:
[0013] (2.1) Preprocess the text converted in step (1), which includes three parts: word segmentation, word vector generation and word vector position encoding; the preprocessing is specifically as follows: 1) Word segmentation: The text is segmented, that is, the text is input into the jieba Chinese word segmentation model, and w1, w2, ..., w are obtained in the original order of the text. i ,…,w n There are n words in total, where the subscript i represents the i-th word, i∈[1,n]; the jieba Chinese word segmentation model is a commonly used word segmentation model that can divide a sentence into multiple words; 2) Generate word vectors: Then, the words w1, w2, ..., w i ,…,w n Input into the Word2vec Chinese pre-training model to obtain the corresponding word vectors x1, x2, ..., x i ,…,x n , the word vector x1,x2,…,x i ,…,x n is a row vector with a dimension of 300; the Word2vec Chinese pre-training model is a commonly used model for generating word vectors, which can map words into vectors; 3) Word vector position encoding: Use sine / cosine function to encode word vectors x1, x2, ..., x i ,…,x n Generate position vectors t1, t2, …, t i ,…,t n , the formula is as follows:
[0014]
[0015] Where a refers to the word vector x i The ath dimension of t, a∈[1,300]; (,) Refers to the position vector ti The value of the ath dimension; the word vector x1,x2,…,x i ,…,x n and the corresponding position vectors t1, t2,…, t i ,…,t n Add up to get word embedding vectors e1, e2,…, e i ,…,e n , where e i =x i +t i , embed the word into vectors e1,e2,…,e i ,…,e n Denoted as matrix E;
[0016] (2.2) Perform a self-attention mechanism operation on the matrix E obtained in step (2.1). The self-attention mechanism operation process is as follows:
[0017] First, generate the Query matrix Q1, Key matrix K1, and Value matrix V1:
[0018]
[0019]
[0020]
[0021] in, They are weight matrices with a dimension of 300. The specific values of the elements in the matrix are obtained through pre-training. The pre-training determines Eighteen weight matrices, all of which are weight matrices with a dimension of 300. The data set used for pre-training has the word " <start>", and added the word " <eos>", after pre-training, the weight matrix Will include <start>"and" <eos>"The characteristic information of q i ,k i ,v i is a row vector of dimension 300, where q i is the query vector of the i-th row vector in the matrix E, k i is the key vector of the i-th row vector in matrix E, v i is the value vector of the i-th row vector in the matrix E;
[0022] Let the query vectors in the Query query matrix Q1 perform score operations with all key vectors in the matrix K1;
[0023] Take the query vector q1 in the Query matrix Q1 as an example. The query vector q1 and the key vector k i (i∈[1,n]) performs score operation, and the result is recorded as α 1,m ,m=i;The score calculation formula is:
[0024]
[0025] All the results α 1,1 ,α 1,2 ,…,α 1,m ,…,α 1,n Perform soft-max normalization operation to obtain The soft-max function is a commonly used function in deep learning. It can map the input to a real number between 0 and 1, and ensure that the sum of all the real numbers mapped to the input is 1. The formula for the soft-max normalization operation is:
[0026]
[0027] Then The corresponding value vectors v1, v2, ...v in the Value matrix V1 are i ,…,v n Multiply to get the weighted vector z1,z2,…z m ,…,z n , the multiplication operation is The weighted vector z1,z2,…z m ,…,z n Add together to get the thought vector b1;
[0028] Perform the above operation n times to obtain vectors b1, b2, ..., b i ,…,b n , the formula is as follows:
[0029]
[0030] So far, the thought vectors b1, b2, ..., b corresponding to all row vectors in the matrix E have been generated. i ,…,b n ;
[0031] (2.3) The thought vectors b1, b2, ..., b obtained in step (2.2) i ,…,b n Output vectors f1, f2, ..., f through the feedforward neural network i ,…,f n , the feedforward neural network consists of two transformations, the first one uses the ReLU activation function to perform nonlinear mapping, and the second one uses the linear activation function to restore the original gradient;
[0032] (2.4) The vectors f1, f2, ..., f obtained in step (2.3) are i ,…,f n Denoted as matrix F, the self-attention mechanism operation is performed on the matrix F. In this self-attention mechanism operation, the matrix F is respectively combined with the weight matrix Multiply them to generate the Query matrix, Key matrix and Value matrix. The rest of the specific operation process is the same as step (2.2) to obtain the thought vectors d1, d2, ..., d corresponding to all row vectors in the matrix F. i ,…,d n , and the thought vectors d1, d2, ..., d i ,…,d n Output vector through feedforward neural network
[0033] The vector Denoted as feature matrix
[0034] Furthermore, the step (3) includes the following sub-steps:
[0035] (3.1) The feature matrix obtained in step (2) Decode;
[0036] First, initialize; the word " <start>After the word vector generation and word vector position encoding operations in step (2.1), an initial word embedding vector s with a dimension of 300 is generated;
[0037] Then the initial word embedding vector s is subjected to the first self-attention mechanism operation. In this self-attention mechanism operation, the vector s is respectively combined with the weight matrix Multiply to generate the Query matrix, Key matrix and Value matrix. The rest of the specific operation process is the same as step (2.2) to obtain the thought vector c1 corresponding to the initial word embedding vector s;
[0038] Then the thought vector c1 and the feature matrix obtained in step (2) Perform the second self-attention mechanism operation. In this self-attention mechanism operation, the thought vector c1 and the weight matrix are used Multiply to generate the Query query matrix, and use the feature matrix obtained in step (2) Respectively with the weight matrix and Multiply to generate the Key matrix and the Value matrix. The other specific operations are the same as step (2.2) to obtain the thought vector
[0039] Finally, the thought vector Outputting a vector z through a feedforward neural network, wherein the latitude of the vector z is 300;
[0040] (3.2) The vector z obtained in step (3.1) is subjected to the first self-attention mechanism operation. In this self-attention mechanism operation, the vector z is respectively compared with the weight matrix Multiply them to generate the Query matrix, Key matrix and Value matrix. The rest of the specific operation process is the same as step (2.2). The thought vector c2 corresponding to the vector z is obtained;
[0041] Then the thought vector c2 and the feature matrix obtained in step (2) Perform the second self-attention mechanism operation. In this self-attention mechanism operation, the thought vector c2 and the weight matrix are used Multiply to generate the Query query matrix, and use the feature matrix obtained in step (2) Respectively with the weight matrix and Multiply to generate the Key matrix and the Value matrix. The other specific operations are the same as step (2.2) to obtain the thought vector
[0042] Finally, the thought vector Output vector through feedforward neural network The vector The latitude is 300;
[0043] (3.3) The vector obtained in step (3.2) Input the neural network layer and transform it to obtain the probability vector μ of the first word. The latitude of the probability vector μ is 30,000. The corresponding word is searched in the vocabulary containing 30,000 words through this probability vector to obtain the first target word W1. The search rule is: find the latitude with the largest value in the probability vector μ, record it as max_value, and find the max_valueth word in the vocabulary as the first target word W1.
[0044] (3.4) Repeat steps (3.1), (3.2) and (3.3) on the word embedding vector corresponding to the first target word W1 obtained in step (3.3) to generate the second target word W2;
[0045] (3.5) Repeat step (3.4) until the output target word is " <eos>", get all target words W1, W2, ..., W l ,…,W h ; All target words W1,W2,…,W l ,…,W h Splice in the order of generation to get the predicted sentence The predicted sentence The semantic information obtained by decoding;
[0046] (3.6) The model parameters can be trained by minimizing the loss function, which includes matrix elements and neural network weights. The minimization loss function is defined as:
[0047]
[0048] Among them, q(W l ): lth target word W l The true probability of appearing in the input text;
[0049] p(W l ): lth target word W l In semantic information The predicted probability of appearing in .
[0050] Furthermore, the step (4) includes the following sub-steps:
[0051] (4.1) Generate a 256-bit spread spectrum code. The generation process is as follows: A dynamic shift register is composed of eight serially connected shift registers and feedback logic circuits. After the initial digital number is set for the shift register with linear feedback logic, each register level changes after each shift under clock triggering. The dynamic shift register can generate an output sequence of 255 bits. Such a sequence is called the longest linear shift register sequence (m-sequence). The m-sequence is generated using a code format, where the initial digital number of the register is: the highest-order register is 1, and the remaining registers are 0. A bit with a value of 0 is added to the end of the generated 255-bit m-sequence to generate a 256-bit binary sequence that meets the length requirement as the spread spectrum code.
[0052] (4.2) Semantic information Convert the data into binary form and group them into 256-bit groups to obtain multiple data groups, each of which is a binary sequence.
[0053] (4.3) performing group spreading on the first data packet obtained in step (4.2), wherein the group spreading process is as follows: converting the first data packet into a decimal number N; using the obtained decimal number N as a shift amount, cyclically shifting the spreading code generated in step (4.1) left by N bits to obtain a pseudo-random sequence, and using the pseudo-random sequence as the spread spectrum transmission sequence for the first data packet;
[0054] The binary-to-decimal conversion rule used is: the binary sequence is stored in little-endian order, that is, the weight of the first bit of the binary sequence is 20, the first bit is the leftmost bit, and the exponent is increased from left to right, each time by 1, and finally expanded and summed according to the weight;
[0055] (4.4) framing the spread spectrum transmission sequence of the first data packet obtained in step (4.3) to obtain a first data frame, and transmitting the data frame to the receiving end;
[0056] The framing process is as follows: first, an empty data frame is defined. A 3-byte synchronization bit, the spread spectrum transmission sequence of the first data packet obtained in step (4.3), and a 2-byte CRC check bit are sequentially added to the empty data frame to obtain the first data frame. The synchronization bit is used to identify useful information in the data frame. The CRC check bit is used to perform data verification. The CRC check bit algorithm adopts the CRC-16 standard.
[0057] (4.5) Perform steps (4.3) and (4.4) on all data packets obtained in step (4.2) to achieve spectrum spreading, framing and transmission, thus completing the semantic information. spread spectrum transmission.
[0058] Furthermore, the step (5) includes the following sub-steps:
[0059] (5.1) The receiving end generates the 256-bit spreading code required for despreading. The generation process is the same as step (4.1), and the spreading code generated by the receiving end is the same as the spreading code generated by the transmitting end.
[0060] (5.2) The receiving end continues to identify the synchronization bit, which is the synchronization bit added in step (4.4);
[0061] (5.3) When the receiving end recognizes the synchronization bit, it pauses to match the synchronization bit, extracts the 272-bit binary sequence after the synchronization bit, and performs a CRC check on it. The 272-bit sequence includes 256 spreading codes and a 16-bit CRC check bit. The 16-bit CRC check bit is checked. If the check is wrong, repeat step (5.2).
[0062] (5.4) When the synchronization bit matches successfully and the CRC check is correct, it is considered that a data frame generated in step (4) has arrived at the receiving end, and the information contained in the arrived data frame is despread;
[0063] Extract the 256-bit pseudo-random sequence after the synchronization bit and match it with the spreading code generated in step (5.1). The matching process is as follows: perform correlation operations on the pseudo-random sequence and all possible pseudo-random sequences generated by cyclic shift of the spreading code, and update the pseudo-random sequence with the maximum correlation value and the shift value of the pseudo-random sequence relative to the spreading code in real time, which are recorded as matched_sq and max_value respectively. The correlation operation is:
[0064]
[0065] Where res is the calculation result, x(m) is the value of the m-th bit of the extracted pseudo-random sequence, and y(ma) is the value of the m-th bit of the pseudo-random sequence with the cyclic code shifted left by a bits;
[0066] (5.5) converting the decimal number max_value obtained in step (5.4) into a binary sequence according to the binary-to-decimal conversion rule, wherein the binary sequence is the original data information carried by the binary pseudo-random sequence extracted in step (5.4);
[0067] (5.6) Repeat the operations of step (5.2), step (5.3), step (5.4) and step (5.5), continue to despread all data frames arriving at the receiving end, and finally obtain the semantic information extracted in step (3) at the receiving end to complete the transmission.
[0068] The beneficial effects of the present invention are as follows: the semantic communication system designed by the present invention extracts meaningful information from the source, removes redundant data, effectively reduces the amount of transmitted data, and lowers communication costs; and performs spread spectrum transmission on information data, thereby improving the security and anti-interference ability of communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 Flowchart of a semantic communication method based on CCSK and deep learning;
[0070] Figure 2 This is an operational flow chart of steps (2) and (3) in Example 1;
[0071] Figure 3 This is a flow chart of the operations of steps (4) and (5) in Example 1. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to illustrate the present invention, rather than to represent all embodiments. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.
[0073] Example 1
[0074] like Figure 1 As shown, a semantic communication method based on CCSK and deep learning includes the following steps:
[0075] Step (1): The sender converts the speech into text;
[0076] Step (2): extracting a feature matrix from the text converted in step (1) to obtain a feature matrix;
[0077] Step (2) is implemented through the following sub-steps:
[0078] (2.1) Preprocess the text converted in step (1), which includes three parts: word segmentation, word vector generation and word vector position encoding; the preprocessing is specifically as follows: 1) Word segmentation: The text is segmented, that is, the text is input into the jieba Chinese word segmentation model, and w1, w2, ..., w are obtained in the original order of the text. i ,…,w n There are n words in total, where the subscript i represents the i-th word, i∈[1,n]; the jieba Chinese word segmentation model is a commonly used word segmentation model that can divide a sentence into multiple words; 2) Generate word vectors: Then, the words w1, w2, ..., w i ,…,w n Input into the Word2vec Chinese pre-training model to obtain the corresponding word vectors x1, x2, ..., x i ,…,x n , the word vector x1,x2,…,x i ,…,x n is a row vector with a dimension of 300; the Word2vec Chinese pre-training model is a commonly used model for generating word vectors, which can map words into vectors; 3) Word vector position encoding: Use sine / cosine function to encode word vectors x1, x2, ..., x i ,…,x n Generate position vectors t1, t2, …, t i ,…,t n , the formula is as follows:
[0079]
[0080] Where a refers to the word vector x i The ath dimension of t, a∈[1,300]; (,) Refers to the position vector t i The value of the ath dimension; the word vector x1,x2,…,x i ,…,x n and the corresponding position vectors t1, t2,…, t i ,…,t n Add up to get word embedding vectors e1, e2,…, e i ,…,e n , where e i =x i +t i , embed the word into vectors e1,e2,…,e i ,…,e n Denoted as matrix E;
[0081] (2.2) Perform a self-attention mechanism operation on the matrix E obtained in step (2.1). The self-attention mechanism operation process is as follows:
[0082] First, generate the Query matrix Q1, Key matrix K1, and Value matrix V1:
[0083]
[0084]
[0085]
[0086] in, They are weight matrices with a dimension of 300. The specific values of the elements in the matrix are obtained through pre-training. The pre-training determines Eighteen weight matrices, all of which are weight matrices with a dimension of 300. The data set used for pre-training has the word " <start>", and added the word " <eos>", after pre-training, the weight matrix Will include <start>"and" <eos>"The characteristic information of q i ,k i ,v i is a row vector of dimension 300, where q i is the query vector of the i-th row vector in the matrix E, k i is the key vector of the i-th row vector in matrix E, v i is the value vector of the i-th row vector in the matrix E;
[0087] Let the query vectors in the Query query matrix Q1 perform score operations with all key vectors in the matrix K1;
[0088] Take the query vector q1 in the Query matrix Q1 as an example. The query vector q1 and the key vector k i (i∈[1,n]) performs score operation, and the result is recorded as α 1, ,m=i;The score calculation formula is:
[0089]
[0090] All the results α 1, ,α 1, ,…,α 1, ,…,α 1, Perform soft-max normalization operation to obtain The soft-max function is a commonly used function in deep learning. It can map the input to a real number between 0 and 1, and ensure that the sum of all the real numbers mapped to the input is 1. The formula for the soft-max normalization operation is:
[0091]
[0092] Then The corresponding value vectors v1, v2, ...v in the Value matrix V1 are i ,…,v n Multiply to get the weighted vector z1,z2,…z m ,…,z n , the multiplication operation is The weighted vector z1,z2,…z m ,…,z n Add together to get the thought vector b1;
[0093] Perform the above operation n times to obtain vectors b1, b2, ..., b i ,…,b n , the formula is as follows:
[0094]
[0095] So far, the thought vectors b1, b2, ..., b corresponding to all row vectors in the matrix E have been generated. i ,…,b n ;
[0096] (2.3) The thought vectors b1, b2, ..., b obtained in step (2.2) i ,…,b n Output vectors f1, f2, ..., f through the feedforward neural network i ,…,f n , the feedforward neural network consists of two transformations, the first one uses the ReLU activation function to perform nonlinear mapping, and the second one uses the linear activation function to restore the original gradient;
[0097] (2.4) The vectors f1, f2, ..., f obtained in step (2.3) are i ,…,f n Denoted as matrix F, the self-attention mechanism operation is performed on the matrix F. In this self-attention mechanism operation, the matrix F is respectively combined with the weight matrix Multiply them to generate the Query matrix, Key matrix and Value matrix. The rest of the specific operation process is the same as step (2.2) to obtain the thought vectors d1, d2, ..., d corresponding to all row vectors in the matrix F. i ,…,d n . The thought vectors d1, d2, ..., d i ,…,d n Output vector through feedforward neural network
[0098] The vector Denoted as feature matrix
[0099] Step (3): Decode the feature matrix obtained in step (2) to obtain semantic information;
[0100] Step (3) is implemented through the following sub-steps:
[0101] (3.1) The feature matrix obtained in step (2) Decode;
[0102] First, initialize; the word " <start>After the word vector generation and word vector position encoding operations in step (2.1), an initial word embedding vector s with a dimension of 300 is generated;
[0103] Then the initial word embedding vector s is subjected to the first self-attention mechanism operation. In this self-attention mechanism operation, the vector s is respectively combined with the weight matrix Multiply to generate the Query matrix, Key matrix and Value matrix. The rest of the specific operation process is the same as step (2.2) to obtain the thought vector c1 corresponding to the initial word embedding vector s;
[0104] Then the thought vector c1 and the feature matrix obtained in step (2) Perform the second self-attention mechanism operation. In this self-attention mechanism operation, the thought vector c1 and the weight matrix are used Multiply to generate the Query query matrix, and use the feature matrix obtained in step (2) Respectively with the weight matrix and Multiply to generate the Key matrix and the Value matrix. The other specific operations are the same as step (2.2) to obtain the thought vector
[0105] Finally, the thought vector Outputting a vector z through a feedforward neural network, wherein the latitude of the vector z is 300;
[0106] (3.2) The vector z obtained in step (3.1) is subjected to the first self-attention mechanism operation. In this self-attention mechanism operation, the vector z is respectively compared with the weight matrix Multiply them to generate the Query matrix, Key matrix and Value matrix. The rest of the specific operation process is the same as step (2.2). The thought vector c2 corresponding to the vector z is obtained;
[0107] Then the thought vector c2 and the feature matrix obtained in step (2) Perform the second self-attention mechanism operation. In this self-attention mechanism operation, the thought vector c2 and the weight matrix are used Multiply to generate the Query query matrix, and use the feature matrix obtained in step (2) Respectively with the weight matrix and Multiply to generate the Key matrix and the Value matrix. The other specific operations are the same as step (2.2) to obtain the thought vector
[0108] Finally, the thought vector Output vector through feedforward neural network The vector The latitude is 300;
[0109] (3.3) The vector obtained in step (3.2) Input the neural network layer and transform it to obtain the probability vector μ of the first word. The latitude of the probability vector μ is 30,000. The corresponding word is searched in the vocabulary containing 30,000 words through this probability vector to obtain the first target word W1. The search rule is: find the latitude with the largest value in the probability vector μ, record it as max_value, and find the max_valueth word in the vocabulary as the first target word W1.
[0110] (3.4) Repeat steps (3.1), (3.2) and (3.3) on the word embedding vector corresponding to the first target word W1 obtained in step (3.3) to generate the second target word W2;
[0111] (3.5) Repeat step (3.4) until the output target word is " <eos>", get all target words W1, W2, ..., W l ,…,W h ; All target words W1,W2,…,W l ,…,W h Splice in the order of generation to get the predicted sentence The predicted sentence The semantic information obtained by decoding;
[0112] (3.6) The model parameters can be trained by minimizing the loss function, which includes matrix elements and neural network weights. The minimization loss function is defined as:
[0113]
[0114] Among them, q(W l ): lth target word W l The true probability of appearing in the input text;
[0115] p(W l ): lth target word W l In semantic information The predicted probability of appearing in .
[0116] All operations in steps (2) and (3) are as follows Figure 2 shown.
[0117] Step (4): Generate a 256-bit spreading code for the semantic information obtained in step (3), perform group spreading on the semantic information using the spreading code, obtain a spread signal, and transmit it to the receiving end;
[0118] Step (4) is implemented through the following sub-steps:
[0119] (4.1) Generate a 256-bit spread spectrum code. The generation process is as follows: A dynamic shift register is composed of eight serially connected shift registers and feedback logic circuits. After the initial digital number is set for the shift register with linear feedback logic, each register level changes after each shift under clock triggering. The dynamic shift register can generate an output sequence of 255 bits. Such a sequence is called the longest linear shift register sequence (m-sequence). The m-sequence is generated using a code format, where the initial digital number of the register is: the highest-order register is 1, and the remaining registers are 0. A bit with a value of 0 is added to the end of the generated 255-bit m-sequence to generate a 256-bit binary sequence that meets the length requirement as the spread spectrum code.
[0120] (4.2) Semantic information Convert the data into binary form and group them into 256-bit groups to obtain multiple data groups, each of which is a binary sequence.
[0121] (4.3) performing group spreading on the first data packet obtained in step (4.2), wherein the group spreading process is as follows: converting the first data packet into a decimal number N; using the obtained decimal number N as a shift amount, cyclically shifting the spreading code generated in step (4.1) left by N bits to obtain a pseudo-random sequence, and using the pseudo-random sequence as the spread spectrum transmission sequence for the first data packet;
[0122] The binary-to-decimal conversion rule used is: the binary sequence is stored in little-endian order, that is, the weight of the first bit of the binary sequence is 20, the first bit is the leftmost bit, and the exponent is increased from left to right, each time by 1, and finally expanded and summed according to the weight;
[0123] (4.4) framing the spread spectrum transmission sequence of the first data packet obtained in step (4.3) to obtain a first data frame, and transmitting the data frame to the receiving end;
[0124] The framing process is as follows: first, an empty data frame is defined. A 3-byte synchronization bit, the spread spectrum transmission sequence of the first data packet obtained in step (4.3), and a 2-byte CRC check bit are sequentially added to the empty data frame to obtain the first data frame. The synchronization bit is used to identify useful information in the data frame. The CRC check bit is used to perform data verification. The CRC check bit algorithm adopts the CRC-16 standard.
[0125] (4.5) Perform steps (4.3) and (4.4) on all data packets obtained in step (4.2) to achieve spectrum spreading, framing and transmission, thus completing the semantic information. spread spectrum transmission.
[0126] Step (5): The receiving end generates a 256-bit spreading code that is consistent with the transmitting end, obtains the spread spectrum signal transmitted by the transmitting end by identifying the synchronization bit, and despreads it to obtain semantic information;
[0127] Step (5) is implemented through the following sub-steps:
[0128] (5.1) The receiving end generates the 256-bit spreading code required for despreading. The generation process is the same as step (4.1), and the spreading code generated by the receiving end is the same as the spreading code generated by the transmitting end.
[0129] (5.2) The receiving end continues to identify the synchronization bit, which is the synchronization bit added in step (4.4);
[0130] (5.3) When the receiving end recognizes the synchronization bit, it pauses to match the synchronization bit, extracts the 272-bit binary sequence after the synchronization bit, and performs a CRC check on it. The 272-bit sequence includes 256 spreading codes and a 16-bit CRC check bit. The 16-bit CRC check bit is checked. If the check is wrong, repeat step (5.2).
[0131] (5.4) When the synchronization bit matches successfully and the CRC check is correct, it is considered that a data frame generated in step (4) has arrived at the receiving end, and the information contained in the arrived data frame is despread;
[0132] Extract the 256-bit pseudo-random sequence after the synchronization bit and match it with the spreading code generated in step (5.1). The matching process is as follows: perform correlation operations on the pseudo-random sequence and all possible pseudo-random sequences generated by cyclic shift of the spreading code, and update the pseudo-random sequence with the maximum correlation value and the shift value of the pseudo-random sequence relative to the spreading code in real time, which are recorded as matched_sq and max_value respectively. The correlation operation is:
[0133]
[0134] Where res is the calculation result, x(m) is the value of the m-th bit of the extracted pseudo-random sequence, and y(ma) is the value of the m-th bit of the pseudo-random sequence with the cyclic code shifted left by a bits;
[0135] (5.5) converting the decimal number max_value obtained in step (5.4) into a binary sequence according to the binary-to-decimal conversion rule, wherein the binary sequence is the original data information carried by the binary pseudo-random sequence extracted in step (5.4);
[0136] (5.6) Repeat the operations of step (5.2), step (5.3), step (5.4) and step (5.5), continue to despread all data frames arriving at the receiving end, and finally obtain the semantic information extracted in step (3) at the receiving end to complete the transmission.
[0137] All operations in steps (4) and (5) are as follows Figure 3 shown.
[0138] Step (6): Convert the semantic information obtained in step (5) into speech to complete the transmission.
[0139] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.< / eos> < / start> < / eos> < / start> < / eos> < / start> < / eos> < / start> < / eos> < / start> < / eos> < / start>
Claims
1. A semantic communication method based on CCSK and deep learning, characterized in that: The following steps are involved: Step (1): The sender converts the speech into text; Step (2): extracting a feature matrix from the text converted in step (1) to obtain a feature matrix; The step (2) includes the following sub-steps: (2.1) Preprocess the text converted in step (1), which includes three parts: word segmentation, word vector generation and word vector position encoding; the preprocessing is specifically as follows: 1) Word segmentation: The text is segmented, that is, the text is input into the jieba Chinese word segmentation model, and w1, w2, ..., w are obtained in the original order of the text. i ,…,w n There are n words in total, where the subscript i represents the i-th word, i∈[1,n]; the jieba Chinese word segmentation model is a commonly used word segmentation model that can divide a sentence into multiple words; 2) Generate word vectors: Then, the words w1, w2, ..., w i ,…,w n Input into the Word2vec Chinese pre-training model to obtain the corresponding word vectors x1, x2, ..., x i ,…,x n , the word vector x1,x2,…,x i ,…,x n is a row vector with a dimension of 300; the Word2vec Chinese pre-training model is a commonly used model for generating word vectors, which can map words into vectors; 3) Word vector position encoding: Use sine / cosine function to encode word vectors x1, x2, ..., x i ,…,x n Generate position vectors t1, t2, …, t i ,…,t n , the formula is as follows: Where a refers to the word vector x i The ath dimension of t, a∈[1,300]; (i,a) Refers to the position vector t i The value of the ath dimension; the word vector x1,x2,…,x i ,…,x n and the corresponding position vectors t1, t2,…, t i ,…,t n Add up to get word embedding vectors e1, e2,…, e i ,…,e n , where e i =x i +t i , embed the word into vectors e1,e2,…,e i ,…,e n Denoted as matrix E; (2.2) Perform a self-attention mechanism operation on the matrix E obtained in step (2.1). The self-attention mechanism operation process is as follows: First, generate the Query matrix Q1, Key matrix K1, and Value matrix V1: in, They are weight matrices with a dimension of 300. The specific values of the elements in the matrix are obtained through pre-training. The pre-training determines Eighteen weight matrices, all of which are weight matrices with a dimension of 300. The data set used for pre-training has the word "" added to the beginning of the text. <start>", and added the word " <eos>", after pre-training, the weight matrix Will contain <start>"and" <eos>"The characteristic information of q i ,k i ,v i is a row vector of dimension 300, where q i is the query vector of the i-th row vector in the matrix E, k i is the key vector of the i-th row vector in matrix E, v i is the value vector of the i-th row vector in the matrix E;< / eos> < / start> < / eos> < / start> Let the query vectors in the Query query matrix Q1 perform score operations with all key vectors in the matrix K1; Take the query vector q1 in the Query matrix Q1 as an example. The query vector q1 and the key vector k i (i∈[1,n]) performs score operation, and the result is recorded as α 1,m ,m=i;The score calculation formula is: All the results α 1,1 ,α 1,2 ,…,α 1,m ,…,α 1,n Perform soft-max normalization operation to obtain The soft-max function is a commonly used function in deep learning. It can map the input to a real number between 0 and 1, and ensure that the sum of all the real numbers mapped to the input is 1. The formula for the soft-max normalization operation is: Then The corresponding value vectors v1, v2, ...v in the Value matrix V1 are i ,…,v n Multiply to get the weighted vector z1,z2,…z m ,…,z n , the multiplication operation is The weighted vector z1,z2,…z m ,…,z n Add together to get the thought vector b1; Perform the above operation n times to obtain vectors b1, b2, ..., b i ,…,b n , the formula is as follows: So far, the thought vectors b1, b2, ..., b corresponding to all row vectors in the matrix E have been generated. i ,…,b n ; (2.3) The thought vectors b1, b2, ..., b obtained in step (2.2) i ,…,b n Output vectors f1, f2, ..., f through the feedforward neural network i ,…,f n , the feedforward neural network consists of two transformations, the first one uses the ReLU activation function to perform nonlinear mapping, and the second one uses the linear activation function to restore the original gradient; (2.4) The vectors f1, f2, ..., f obtained in step (2.3) are i ,…,f n Denoted as matrix F, the self-attention mechanism operation is performed on the matrix F. In this self-attention mechanism operation, the matrix F is respectively combined with the weight matrix Multiply them to generate the Query matrix, Key matrix and Value matrix. The rest of the specific operation process is the same as step (2.2) to obtain the thought vectors d1, d2, ..., d corresponding to all row vectors in the matrix F. i ,…,d n , and the thought vectors d1, d2, ..., d i ,…,d n Output vector through feedforward neural network The vector Denoted as feature matrix Step (3): Decode the feature matrix obtained in step (2) to obtain semantic information; Step (4): Generate a 256-bit spreading code for the semantic information obtained in step (3), perform group spreading on the semantic information using the spreading code, obtain a spread signal, and transmit it to the receiving end; Step (5): The receiving end generates a 256-bit spreading code that is consistent with the transmitting end, obtains the spread spectrum signal transmitted by the transmitting end by identifying the synchronization bit, and despreads it to obtain semantic information; Step (6): Convert the semantic information obtained in step (5) into speech to complete the transmission.
2. The semantic communication method based on CCSK and deep learning according to claim 1, characterized in that: The step (3) includes the following sub-steps: (3.1) The feature matrix obtained in step (2) Decode; First, initialize; the word " <start> After the word vector generation and word vector position encoding operations in step (2.1), an initial word embedding vector s with a dimension of 300 is generated;< / start> Then the initial word embedding vector s is subjected to the first self-attention mechanism operation. In this self-attention mechanism operation, the vector s is respectively combined with the weight matrix Multiply to generate the Query matrix, Key matrix and Value matrix. The rest of the specific operation process is the same as step (2.2) to obtain the thought vector c1 corresponding to the initial word embedding vector s; Then the thought vector c1 and the feature matrix obtained in step (2) Perform the second self-attention mechanism operation. In this self-attention mechanism operation, the thought vector c1 and the weight matrix are used Multiply to generate the Query query matrix, and use the feature matrix obtained in step (2) Respectively with the weight matrix and Multiply to generate the Key matrix and the Value matrix. The other specific operations are the same as step (2.2) to obtain the thought vector Finally, the thought vector Outputting a vector z through a feedforward neural network, wherein the latitude of the vector z is 300; (3.2) The vector z obtained in step (3.1) is subjected to the first self-attention mechanism operation. In this self-attention mechanism operation, the vector z is respectively compared with the weight matrix Multiply them to generate the Query matrix, Key matrix and Value matrix. The rest of the specific operation process is the same as step (2.2). The thought vector c2 corresponding to the vector z is obtained; Then the thought vector c2 and the feature matrix obtained in step (2) Perform the second self-attention mechanism operation. In this self-attention mechanism operation, the thought vector c2 and the weight matrix are used Multiply to generate the Query query matrix, and use the feature matrix obtained in step (2) Respectively with the weight matrix and Multiply to generate the Key matrix and the Value matrix. The other specific operations are the same as step (2.2) to obtain the thought vector Finally, the thought vector Output vector through feedforward neural network The vector The latitude is 300; (3.3) The vector obtained in step (3.2) Input the neural network layer and transform it to obtain the probability vector μ of the first word. The latitude of the probability vector μ is 30,000. The corresponding word is searched in the vocabulary containing 30,000 words through this probability vector to obtain the first target word W1. The search rule is: find the latitude with the largest value in the probability vector μ, record it as max_value, and find the max_valueth word in the vocabulary as the first target word W1. (3.4) Repeat steps (3.1), (3.2) and (3.3) on the word embedding vector corresponding to the first target word W1 obtained in step (3.3) to generate the second target word W2; (3.5) Repeat step (3.4) until the output target word is " <eos>", get all target words W1, W2, ..., W l ,…,W h ; All target words W1,W2,…,W l ,…,W h Splice in the order of generation to get the predicted sentence The predicted sentence The semantic information obtained by decoding;< / eos> (3.6) The model parameters can be trained by minimizing the loss function, which includes matrix elements and neural network weights. The minimization loss function is defined as: Among them, q(W l ): lth target word W l The true probability of appearing in the input text; p(W l ): lth target word W l In semantic information The predicted probability of appearing in .
3. The semantic communication method based on CCSK and deep learning according to claim 2, characterized in that: The step (4) includes the following sub-steps: (4.1) Generate a 256-bit spread spectrum code. The generation process is as follows: A dynamic shift register is formed by eight serially connected shift registers and feedback logic circuits. After the initial digits are set for the shift register with linear feedback logic, the registers at each stage change after each shift, triggered by a clock. The dynamic shift register can generate an output sequence of 255 bits. Such a sequence is called the longest linear shift register sequence, or m-sequence. The m-sequence is generated using a code format, where the register initial digits are: the highest-order register is 1, and the remaining registers are 0. A bit with a value of 0 is added to the end of the generated 255-bit m-sequence to generate a 256-bit binary sequence that meets the length requirement as the spread spectrum code. (4.2) Semantic information Convert the data into binary form and group them into 256-bit groups to obtain multiple data groups, each of which is a binary sequence. (4.3) performing group spreading on the first data packet obtained in step (4.2), wherein the group spreading process is as follows: converting the first data packet into a decimal number N; using the obtained decimal number N as a shift amount, cyclically shifting the spreading code generated in step (4.1) left by N bits to obtain a pseudo-random sequence, and using the pseudo-random sequence as the spread spectrum transmission sequence for the first data packet; The binary-to-decimal conversion rule used is: the binary sequence is stored in little-endian order, that is, the weight of the first bit of the binary sequence is 20, the first bit is the leftmost bit, and the exponent is increased from left to right, each time by 1, and finally expanded and summed according to the weight; (4.4) framing the spread spectrum transmission sequence of the first data packet obtained in step (4.3) to obtain a first data frame, and transmitting the data frame to the receiving end; The framing process is as follows: first, an empty data frame is defined. A 3-byte synchronization bit, the spread spectrum transmission sequence of the first data packet obtained in step (4.3), and a 2-byte CRC check bit are sequentially added to the empty data frame to obtain the first data frame. The synchronization bit is used to identify useful information in the data frame. The CRC check bit is used to perform data verification. The CRC check bit algorithm adopts the CRC-16 standard. (4.5) Perform steps (4.3) and (4.4) on all data packets obtained in step (4.2) to achieve spectrum spreading, framing and transmission, thus completing the semantic information. spread spectrum transmission.
4. The semantic communication method based on CCSK and deep learning according to claim 3, characterized in that: The step (5) includes the following sub-steps: (5.1) The receiving end generates the 256-bit spreading code required for despreading. The generation process is the same as step (4.1), and the spreading code generated by the receiving end is the same as the spreading code generated by the transmitting end. (5.2) The receiving end continues to identify the synchronization bit, which is the synchronization bit added in step (4.4); (5.3) When the receiving end recognizes the synchronization bit, it pauses to match the synchronization bit, extracts the 272-bit binary sequence after the synchronization bit, and performs a CRC check on it. The 272-bit sequence includes 256 spreading codes and a 16-bit CRC check bit. The 16-bit CRC check bit is checked. If the check is wrong, repeat step (5.2). (5.4) When the synchronization bit matches successfully and the CRC check is correct, it is considered that a data frame generated in step (4) has arrived at the receiving end, and the information contained in the arrived data frame is despread; Extract the 256-bit pseudo-random sequence after the synchronization bit and match it with the spreading code generated in step (5.1). The matching process is as follows: perform correlation operations on the pseudo-random sequence and all possible pseudo-random sequences generated by cyclic shift of the spreading code, and update the pseudo-random sequence with the maximum correlation value and the shift value of the pseudo-random sequence relative to the spreading code in real time, which are recorded as matched_sq and max_value respectively. The correlation operation is: Where res is the calculation result, x(m) is the value of the m-th bit of the extracted pseudo-random sequence, and y(ma) is the value of the m-th bit of the pseudo-random sequence with the cyclic code shifted left by a bits; (5.5) converting the decimal number max_value obtained in step (5.4) into a binary sequence according to the binary-to-decimal conversion rule, wherein the binary sequence is the original data information carried by the binary pseudo-random sequence extracted in step (5.4); (5.6) Repeat the operations of step (5.2), step (5.3), step (5.4) and step (5.5), continue to despread all data frames arriving at the receiving end, and finally obtain the semantic information extracted in step (3) at the receiving end to complete the transmission.
Citation Information
Patent Citations
Modulation and demodulation method and device for GFDM signal
CN110290087A
Semantic communication system and method based on Transform
CN114154508A