Photon energy band prediction transmission spectrum model training, prediction method, medium and device

CN117313531BActive Publication Date: 2026-08-11CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

为了解决复杂光子结构设计问题,需要立即做的一项任务是建立光子能带图、光场分布图等二维数据与透射谱、结构参数等一维数据的深度学习模型,然而这类二维数据不能直接离散化,且特征复杂不易学习,即使经过一些预处理步骤后,直接作为模型输入的效果也不太好,从而存在输入为二维光子能带图、输出为一维透射谱的深度学习模型训练误差大、难以收敛的问题

Benefits of technology

[0015]本发明所采取的技术方案带来的有益效果是:本发明针对输入输出为光子结构复杂自由度的深度学习模型训练误差大和模型训练难以收敛的问题进行了改进,构建了光子能带预测透射谱模型包括能带图像编码器和能带-光谱解码器,能带图像编码器为一深度学习模型,用于将二维能带图像转换为具有固定长度的一维编码,能带-光谱解码器为一深度学习模型,用于将一维编码转化为对应的光谱,通过网络编码解码的方式对输入光子能带图进行编码,将输入数据转换成更易于传输或存储的格式,并通过解码的方式输出透射谱;借鉴自适应编码器模型的思想,构建透射谱自适应编码器-解码器模型,透射谱自适应编码器-解码器模型包括透射谱自适应编码器和透射谱自适应解码器,两者为相互独立的深度学习模型,透射谱自适应编码器的输出与透射谱自适应解码器的输入尺寸相同;改进了自适应编码器的训练过程,具体为对透射谱自适应编码器-解码器模型进行训练,训练流程如下:使用透射谱数据作为输入和目标,将透射谱数据输入到透射谱自适应编码器中转化为一维编码,将一维编码输入到透射谱自适应解码器中输出为透射谱数据,计算预测误差并传递给Adam优化器,Adam优化器会根据预测误差的大小自动调整透射谱自适应编码器和透射谱自适应解码器的参数,使得输出的透射谱数据逐渐接近真实透射谱数据,多次迭代训练,直到输出的透射谱数据的预测误差达到收敛;对能带图像编码器进行训练,训练流程如下:使用能带图像作为输入、步骤S2中训练结束得到的透射谱数据的一维编码作为目标,将能带图像输入到能带图像编码器中转化为一维编码,计算预测误差,将预测误差传递给Adam优化器对能带图像编码器的参数进行优化,多次迭代训练,直到输出的一维编码的预测误差达到收敛;对能带-光谱解码器进行训练,训练流程如下:使用上述步骤中训练结束得到的一位编码即伪透射谱编码作为输入、真实透射谱数据作为目标,将伪透射谱编码输入到能带-光谱解码器中转化为透射谱,计算预测误差,将预测误差传递给Adam优化器对能带-光谱解码器的参数进行优化,多次迭代训练,直到输出的透射谱的预测误差达到收敛;从而对数据进行学习和训练,使得最终编码器将输入的能带图像数据转换为低维数据特征,解码器则将低维数据特征转换为透射谱数据,通过间接训练的过程,从而解决了现有技术存在输入为二维光子能带图、输出为一维透射谱的深度学习模型训练误差大、难以收敛的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117313531B_ABST
    Figure CN117313531B_ABST
Patent Text Reader

Abstract

This invention provides a training and prediction method, medium, and device for a photon bandgap prediction transmission spectrum model, comprising the following steps: constructing a transmission spectrum adaptive encoder-decoder model; training the transmission spectrum adaptive encoder-decoder model; training the bandgap image encoder; and training the bandgap-spectrum decoder. This invention addresses the problems of large training errors and difficulty in convergence in deep learning models whose input and output are complex degrees of freedom of photon structures. Borrowing the idea of ​​adaptive encoder models, it learns and trains on the data, enabling the encoder to convert the input bandgap image data into low-dimensional data features, and the decoder to convert the low-dimensional data features into transmission spectrum data. Through this indirect training process, it solves the problems of large training errors and difficulty in convergence in existing deep learning models with two-dimensional photon bandgap images as input and one-dimensional transmission spectra as output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of photonic device technology, and more specifically, relates to the training and prediction methods, media, and devices for photonic bandgap prediction transmission spectrum models. Background Technology

[0002] With the rapid development of information technologies such as 5G communication and high-end chips, high-capacity and high-bandwidth optical information transmission, processing and storage technologies have become an inevitable trend, creating an urgent need for high-performance, miniaturized and integrated micro-nano photonic devices.

[0003] In recent years, with the development of various deep learning modeling techniques, deep learning has been widely applied in computer science and engineering. The photonics community has also benefited from the rapid development of deep learning technology. By combining deep learning models with fundamental physics, it is possible to efficiently solve partial differential equations describing physical systems, helping to understand the governing laws behind physical phenomena. Within a given design space, deep learning has generalization capabilities, generating fast and accurate designs without requiring time-consuming numerical calculations for each case. A well-trained deep learning model can directly establish a mapping from the design to the optical properties of the target photonic device, and vice versa.

[0004] Deep learning is generally considered a powerful tool for discovering complex relationships between structures and their optical responses. Current research largely uses spectra and structural parameters as inputs and outputs. Spectra can be easily discretized into vectors, making them readily incorporable into deep learning models. To address the design of complex photonic structures, an immediate task is to establish deep learning models that combine two-dimensional data such as photonic band diagrams and light field distribution maps with one-dimensional data such as transmission spectra and structural parameters. However, this type of two-dimensional data cannot be directly discretized, and its complex features make it difficult to learn. Even after some preprocessing steps, directly using it as model input does not yield good results. This leads to problems such as large training errors and difficulty in convergence for deep learning models with two-dimensional photonic band diagrams as input and one-dimensional transmission spectra as output. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a training method for a photonic bandgap prediction transmission spectrum model. The photonic bandgap prediction transmission spectrum model includes a bandgap image encoder and a bandgap-spectrum decoder. The bandgap image encoder is a deep learning model used to convert a two-dimensional bandgap image into a one-dimensional code with a fixed length. The bandgap-spectrum decoder is also a deep learning model used to convert the one-dimensional code into the corresponding spectrum. The method includes the following steps: S1, constructing a transmission spectrum adaptive encoder-decoder model, which includes a transmission spectrum adaptive encoder and a transmission spectrum adaptive decoder. These are independent deep learning models, and the output of the transmission spectrum adaptive encoder has the same input size as the input of the transmission spectrum adaptive decoder. S2, training the transmission spectrum adaptive encoder-decoder model. The training process is as follows: using transmission spectrum data as input and target, the transmission spectrum data is input into the transmission spectrum adaptive encoder to convert it into a one-dimensional code. The one-dimensional code is input into the transmission spectrum adaptive decoder, and the output is the transmission spectrum data. The prediction error is calculated and passed to the Adam optimizer. The Adam optimizer will then calculate the prediction error based on the target data. The parameters of the transmission spectrum adaptive encoder and the transmission spectrum adaptive decoder are automatically adjusted according to the magnitude of the error, so that the output transmission spectrum data gradually approaches the real transmission spectrum data. Multiple iterations of training are performed until the prediction error of the output transmission spectrum data converges. S3: The band image encoder is trained as follows: using the band image as input and the one-dimensional encoding of the transmission spectrum data obtained in step S2 as the target, the band image is input into the band image encoder to convert it into a one-dimensional encoding. The prediction error is calculated, and the prediction error is passed to the Adam optimizer to optimize the parameters of the band image encoder. Multiple iterations of training are performed until the prediction error of the output one-dimensional encoding converges. S4: The band-spectrum decoder is trained as follows: using the one-bit encoding (pseudo-transmission spectrum encoding) obtained in step S3 as input and the real transmission spectrum data as the target, the pseudo-transmission spectrum encoding is input into the band-spectrum decoder to convert it into a transmission spectrum. The prediction error is calculated, and the prediction error is passed to the Adam optimizer to optimize the parameters of the band-spectrum decoder. Multiple iterations of training are performed until the prediction error of the output transmission spectrum converges.

[0006] Furthermore, the network structure of the transmission spectrum adaptive encoder includes three linear layers and two ReLU activation functions. The input layer size of the transmission spectrum adaptive encoder is 321. After the first linear layer, the output size becomes 500. Then, a nonlinear transformation is performed through the ReLU activation function. After the second linear layer, the output size becomes 400. After another ReLU activation function, the output size becomes 300 after the third linear layer. The network structure of the transmission spectrum adaptive decoder also includes three linear layers and two ReLU activation functions. The input layer size of the transmission spectrum adaptive decoder is 300. After the first linear layer, the output size becomes 400. Then, a nonlinear transformation is performed through the ReLU activation function. After the second linear layer, the output size becomes 500. After another ReLU activation function, the output size becomes 321 after the third linear layer, which is the same size as the input layer of the transmission spectrum adaptive encoder.

[0007] Furthermore, the bandgap image encoder is constructed from convolutional layers and fully connected layers to convert a two-dimensional bandgap image into a one-dimensional code. The initial bandgap image size is 267×200 pixels. First, the image passes through a first convolutional layer, which uses three filters to stack the image for feature extraction. Then, it passes through a pooling layer, reducing the image size to 100×133 to reduce the number of parameters and retain important feature information. Next, the image is further reduced in size to 50×66 through a second convolutional and pooling layer; this step helps extract higher-level features. Then, it passes through a flattening layer, converting the 50×66 image into a one-dimensional code of size 13200. The flattening layer arranges the pixels in the image in a one-dimensional order for processing by subsequent fully connected layers. Next... The one-dimensional encoding progressively reduces the dimensionality through five linear layers. Each linear layer is a fully connected layer, where each neuron is connected to all neurons in the previous layer. Through these linear layers, the model progressively extracts and compresses key features from the input image, ultimately obtaining a one-dimensional code of size 300. The band-spectrum decoder's grid structure includes three linear layers and two ReLU activation functions. The input layer of the band-spectrum decoder is 300 in size. After the first linear layer, the output size becomes 800, then undergoes a nonlinear transformation using the ReLU activation function. Next, after the second linear layer, the output size becomes 500, again undergoing the ReLU activation function, and finally, after the third linear layer, the output size becomes 321, the same as the input layer size of the transmission spectrum adaptive encoder.

[0008] Furthermore, the structure, weights, and biases of the trained bandgap image encoder are configured as follows, in the order of module connection: 1) A convolutional layer with 3 input channels and 32 output channels, a kernel size of 3, and padding size of 1; 2) A nonlinear transformation of the output of the convolutional layer using the ReLU activation function; 3) A 2×2 max pooling layer to reduce the size of the feature map; 4) A convolutional layer with 32 input channels and 32 output channels, a kernel size of 3, and padding size of 1; 5) A nonlinear transformation of the output of the convolutional layer using the ReLU activation function. 6) A 2×2 max-pooling layer to further reduce the size of the feature map; 7) A convolutional layer with 32 input channels and 16 output channels, a kernel size of 3, and padding size of 1; 8) Applying the ReLU activation function to the output of the convolutional layer for non-linear transformation; 9) A 2×2 max-pooling layer to further reduce the size of the feature map; 10) Flattening the feature map into a one-dimensional vector; 11) A linear layer with an input size of 13200 and an output size of 5000; 12) Applying the ReLU activation function to the output of the linear layer for non-linear transformation. Nonlinear transformation; 13) A linear layer with an input size of 5000 and an output size of 2500; 14) Applying a nonlinear transformation to the output of the linear layer using the ReLU activation function; 15) A linear layer with an input size of 2500 and an output size of 1000; 16) Applying a nonlinear transformation to the output of the linear layer using the ReLU activation function; 17) A linear layer with an input size of 1000 and an output size of 500; 18) Applying a nonlinear transformation to the output of the linear layer using the ReLU activation function; 19) A linear layer with an input size of 500 and an output size of 300. The structure, weights, and biases of the trained band-spectrum decoder are configured in the following order of module connection: 1) A linear layer with an input size of 300 and an output size of 800; 2) A nonlinear transformation of the output of the linear layer using the ReLU activation function; 3) A linear layer with an input size of 800 and an output size of 500; 4) A nonlinear transformation of the output of the linear layer using the ReLU activation function; 5) A linear layer with an input size of 500 and an output size of 321; 6) A nonlinear transformation of the output of the linear layer using the Sigmoid activation function.

[0009] Furthermore, during the training process of the transmission spectrum adaptive encoder-decoder model, the root mean square error function is used to calculate the prediction error between the predicted output and the real transmission spectrum data; during the training process of the band image encoder, the smoothed mean absolute error is used to calculate the prediction error; during the training process of the band-spectrum decoder, the smoothed mean absolute error is used to calculate the prediction error.

[0010] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the training method for the photonic bandgap prediction transmission spectrum model as described above.

[0011] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the training method for the photonic bandgap prediction transmission spectrum model as described above.

[0012] The present invention also provides a method for predicting the transmission spectrum of photonic band structure, comprising the following steps: training the photonic band structure prediction transmission spectrum model using the training method described above; and processing the band structure image to be predicted using the trained photonic band structure prediction transmission spectrum model to obtain the transmission spectrum data result.

[0013] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for predicting the transmission spectrum of photonic bandgap as described above.

[0014] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the photon band prediction transmission spectrum prediction method as described above.

[0015] The beneficial effects of the technical solution adopted in this invention are as follows: This invention improves upon the problems of large training errors and difficulty in convergence of deep learning models with complex degrees of freedom in photon structures as input and output. It constructs a photon bandgap prediction transmission spectrum model, including a bandgap image encoder and a bandgap-spectrum decoder. The bandgap image encoder is a deep learning model used to convert a two-dimensional bandgap image into a one-dimensional code with a fixed length. The bandgap-spectrum decoder is a deep learning model used to convert the one-dimensional code into the corresponding spectrum. The input photon bandgap image is encoded through network encoding and decoding, converting the input data into a format easier to transmit or store, and the transmission spectrum is output through decoding. Drawing on the idea of ​​an adaptive encoder model, it constructs... A transmission spectrum adaptive encoder-decoder model is constructed, consisting of a transmission spectrum adaptive encoder and a transmission spectrum adaptive decoder. These are independent deep learning models, with the output of the transmission spectrum adaptive encoder having the same input size as the transmission spectrum adaptive decoder. The training process of the adaptive encoder is improved. Specifically, the transmission spectrum adaptive encoder-decoder model is trained as follows: using transmission spectrum data as both input and target, the transmission spectrum data is input into the transmission spectrum adaptive encoder to convert it into a one-dimensional code. This one-dimensional code is then input into the transmission spectrum adaptive decoder, where the output is the transmission spectrum data. The prediction error is calculated and passed to the Adam optimizer. The Adam optimizer will adjust the output based on the magnitude of the prediction error. The parameters of the automatic transmission spectrum adaptive encoder and decoder are adjusted to gradually approximate the true transmission spectrum data. This process is iterated multiple times until the prediction error of the output transmission spectrum data converges. The band image encoder is trained as follows: using the band image as input and the one-dimensional encoding of the transmission spectrum data obtained at the end of step S2 as the target, the band image is input into the band image encoder to convert it into a one-dimensional encoding. The prediction error is calculated and passed to the Adam optimizer to optimize the parameters of the band image encoder. This process is iterated multiple times until the prediction error of the output one-dimensional encoding converges. The band-spectrum decoder is trained as follows: using the above... In this step, the pseudo-transmission spectrum code obtained after training is used as input, and the real transmission spectrum data is used as the target. The pseudo-transmission spectrum code is input into the band-spectrum decoder to be converted into a transmission spectrum. The prediction error is calculated and passed to the Adam optimizer to optimize the parameters of the band-spectrum decoder. The training is iterated multiple times until the prediction error of the output transmission spectrum converges. In this way, the data is learned and trained, so that the encoder converts the input band image data into low-dimensional data features, and the decoder converts the low-dimensional data features into transmission spectrum data. Through the indirect training process, the problem of large training error and difficulty in convergence of deep learning models with two-dimensional photon band images as input and one-dimensional transmission spectra as output is solved. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the photonic bandgap prediction transmission spectrum model of the present invention;

[0017] Figure 2 This is the photonic band structure diagram of the present invention;

[0018] Figure 3 This is a schematic diagram of the transmission spectrum adaptive encoder-decoder model training process of the present invention;

[0019] Figure 4 This is a schematic diagram illustrating the convergence of training error in the transmission spectrum adaptive encoder-decoder model of the present invention;

[0020] Figure 5 This is a schematic diagram illustrating the effect of the transmission spectrum adaptive encoder-decoder model of the present invention;

[0021] Figure 6 This is the energy band image encoder network structure of the present invention;

[0022] Figure 7 This is a schematic diagram of the bandgap image encoder training process of the present invention;

[0023] Figure 8 This is a schematic diagram illustrating the convergence of training error in the bandgap image encoder of the present invention.

[0024] Figure 9 This is a schematic diagram of the band-spectrum decoder training process of the present invention;

[0025] Figure 10 This is a schematic diagram illustrating the convergence of training error in the band-spectrum decoder of the present invention;

[0026] Figure 11 This is a schematic diagram illustrating the decoding effect of the band-spectrum decoder of the present invention;

[0027] Figure 12 This is a schematic diagram of the bandgap image encoder network structure, weights, and biases of the present invention;

[0028] Figure 13 This is a schematic diagram of the band-spectrum decoder network structure, weights, and biases of the present invention;

[0029] Figure 14 This is a structural block diagram of the computer device of the present invention. Detailed Implementation

[0030] To make the objectives, technical solutions, and effects of the present invention clearer, the embodiments of the present invention will now be further described in conjunction with the accompanying drawings.

[0031] This invention addresses the problems of large training errors and difficulty in model convergence in deep learning models with complex degrees of freedom in photonic structures as input and output. It improves upon these issues by encoding the input photonic band structure through network encoding and decoding, converting the input data into a format that is easier to transmit or store, and outputting the transmission spectrum through decoding. This indirect training process solves the aforementioned technical problems.

[0032] An adaptive encoder consists of two main parts: an encoder and a decoder. The encoder transforms input data from different domains into low-dimensional data features, while the decoder transforms these low-dimensional features back into the original data.

[0033] Drawing inspiration from adaptive encoder models, this paper improves the training process of adaptive encoders. By learning and training on data, the encoder transforms the input bandgap image data into low-dimensional data features, while the decoder converts these low-dimensional features into transmission spectrum data. The improved training process is as follows:

[0034] ① Train the encoder on the target domain dataset to learn the feature representation of the target domain.

[0035] ② Define a new encoder and use the source domain data as input. Use the encoded features of the target domain dataset after passing through the original encoder as the target. Use the new encoder to map the source domain data to the feature space of the target domain.

[0036] ③ Define a new decoder, input the encoded source domain data, and use the target domain data to perform supervised training on the decoder to optimize its parameters. The source domain data is mapped to the target domain space through the encoder from step ② and the decoder from this step.

[0037] The photon band prediction transmission spectrum model of this invention is as follows: Figure 1 As shown, it includes a band image encoder and a band-spectral decoder. The band image encoder is a deep learning model used to convert a two-dimensional band image into a one-dimensional code with a fixed length. The band-spectral decoder is a deep learning model used to convert the one-dimensional code into the corresponding spectrum.

[0038] A bandgap image encoder is a deep learning model that encodes two-dimensional bandgap images (such as...). Figure 2 As shown, the trained bandgap image encoder converts the image into a fixed-length one-dimensional code. This code can be viewed as an abstract representation of the bandgap image, containing important information about the band structure. The one-dimensional code can then be further input into a trained band-spectral decoder, another deep learning model that transforms the one-dimensional code into the corresponding spectrum.

[0039] This model obtains transmission spectrum data by encoding and decoding the band image. When the band data passes through the mapping process of the encoder and decoder, the decoder can map the band data to the space of the transmission spectrum data, thereby realizing the conversion from band image data to transmission spectrum data.

[0040] This invention provides a training method for a photon bandgap prediction transmission spectrum model. The training of this model includes four stages: constructing a transmission spectrum adaptive encoder-decoder model, unsupervised learning training of the transmission spectrum adaptive encoder-decoder model, training of the bandgap image encoder, and training of the bandgap image-transmission spectrum decoder, as detailed below:

[0041] S1. Construct a transmission spectrum adaptive encoder-decoder model. The transmission spectrum adaptive encoder-decoder model includes a transmission spectrum adaptive encoder and a transmission spectrum adaptive decoder, which are independent deep learning models. The output of the transmission spectrum adaptive encoder has the same input size as the transmission spectrum adaptive decoder.

[0042] Specifically, the transmission spectrum adaptive encoder and the transmission spectrum adaptive decoder are two independent models. The output of the encoder has the same size as the input of the decoder, and they consist of multiple fully connected layers. The network structure of the transmission spectrum adaptive encoder includes three linear layers and two ReLU activation functions. The input layer size of the transmission spectrum adaptive encoder is 321. After the first linear layer, the output size becomes 500. Then, it undergoes a nonlinear transformation through the ReLU activation function. After the second linear layer, the output size becomes 400. After another ReLU activation function, the output size becomes 300 after the third linear layer. The network structure of the transmission spectrum adaptive decoder also includes three linear layers and two ReLU activation functions. The input layer size of the transmission spectrum adaptive decoder is 300. After the first linear layer, the output size becomes 400. Then, it undergoes a nonlinear transformation through the ReLU activation function. After the second linear layer, the output size becomes 500. After another ReLU activation function, the output size becomes 321 after the third linear layer, the same size as the input layer of the transmission spectrum adaptive encoder.

[0043] The transmission spectrum adaptive encoder encodes the 321 data points of transmission spectrum data into 300 data points of transmission spectrum feature encoding, and the transmission spectrum adaptive decoder decodes the transmission spectrum feature encoding into the input 321 data points of transmission spectrum data.

[0044] S2. Train the transmission spectrum adaptive encoder-decoder model. The transmission spectrum adaptive encoder and decoder are trained using an unsupervised learning model training method, with the transmission spectrum as input and the expected label.

[0045] like Figure 3 As shown, the training process is as follows: Using transmission spectrum data as both input and target, the transmission spectrum data is first input into the transmission spectrum adaptive encoder. The encoder converts the transmission spectrum data into a one-dimensional code, which contains key feature information from the transmission spectrum. Next, the one-dimensional code is input into the transmission spectrum adaptive decoder, which converts the one-dimensional code back into transmission spectrum data. Through the transmission spectrum adaptive decoder, the model can convert the code into an output transmission spectrum that matches the input transmission spectrum. During training, the root mean square error (RMSE) function is used to measure the difference between the predicted output and the true transmission spectrum. By calculating the prediction error, the error is passed to the Adam optimizer. The optimizer automatically adjusts the parameters of the transmission spectrum adaptive encoder and decoder based on the magnitude of the error, so that the model's output gradually approaches the true transmission spectrum. Through multiple iterations of training, the model continuously adjusts the parameters until the prediction error of the output transmission spectrum converges, meaning the difference between the model's output and the true transmission spectrum is small. In this way, a transmission spectrum adaptive encoder-decoder model can be constructed. This model can convert the transmission spectrum data into a one-dimensional code, and can be decoded according to this code to finally obtain the prediction result of the input transmission spectrum.

[0046] The training results at this stage are as follows: Figure 4 As shown in the figure, the error between the training set and the test set is less than 0.03, and the model accuracy is as high as 97%.

[0047] After training, the final encoding and decoding model is obtained. In this embodiment, the transmission spectrum data is input to the transmission spectrum encoder for encoding, and then the encoded result is input to the transmission spectrum decoder for decoding, finally obtaining the result as shown below. Figure 5 As shown, the left image is the actual transmission spectrum, and the right image is the transmission spectrum after encoding and decoding. From... Figure 5 As can be seen, the transmission spectrum adaptive encoder can successfully encode the original transmission spectrum data, and the encoded result can be decoded into the original transmission spectrum with good performance.

[0048] S3. Train the bandgap image encoder. In a preferred embodiment, such as... Figure 6As shown, the bandgap image encoder is constructed from convolutional layers and fully connected layers to convert a two-dimensional bandgap image into a one-dimensional code. The initial bandgap image size is 267×200 pixels. First, the image passes through a first convolutional layer, which uses three filters to stack the image for feature extraction. Then, it passes through a pooling layer, reducing the image size to 100×133 to reduce the number of parameters and retain important feature information. Next, the image is further reduced in size to 50×66 through a second convolutional layer and pooling layer. This step helps to extract higher-level features. Then, it passes through a flattening layer, converting the 50×66 image into a one-dimensional code of size 13200. The flattening layer arranges the pixels in the image in a one-dimensional order for processing by subsequent fully connected layers. Next, the one-dimensional code gradually reduces the dimension through five linear layers. The linear layers are fully connected layers, where each neuron is connected to all neurons in the previous layer. Through these linear layers, the model gradually extracts and compresses key features in the input image, finally obtaining a one-dimensional code of size 300.

[0049] like Figure 7 As shown, the training process is as follows: Using the band image as input and the one-dimensional encoding of the transmission spectrum data obtained at the end of training in step S2 as the target, the band image is input into the band image encoder during training. The encoder converts the band image into a one-dimensional encoding. The prediction error is calculated using the smoothed mean absolute error (Huber Loss), and the error is passed to the Adam optimizer to optimize the encoder parameters. Through multiple iterations of training, the model continuously adjusts its parameters until the prediction error of the output transmission spectrum converges. In this way, a band image encoder model can be constructed. This model can convert band image data into a one-dimensional encoding and decode it to obtain the final result of predicting the transmission spectrum from the band image.

[0050] The training results for this stage are as follows: Figure 8 It can be seen that the error between the training set and the test set of the bandgap image encoder model is less than 0.04 after continuous training, which indicates that the accuracy of predicting pseudo-transmission spectrum encoding is high.

[0051] S4. Train the band-spectral decoder.

[0052] For the pseudo transmission spectrum output in S3, although some pseudo transmission spectra can be completely decoded into the original transmission spectrum by the transmission spectrum decoder in S2, the error in encoding and decoding the pseudo transmission spectrum into the transmission spectrum is relatively large due to the 0.04 error on the test set.

[0053] Therefore, to solve this problem, it is necessary to train a "pseudo-transmission spectrum encoder" decoder based on the pseudo-transmission spectrum encoder output in S3, using the real transmission spectrum data as the prediction target. The pseudo-transmission spectrum encoder in S3 is input, and the output is the transmission spectrum data after pseudo-transmission spectrum encoder decoding.

[0054] Since the "pseudo-transmission spectrum encoding" decoder directly uses pseudo-transmission spectrum encoding as input and is guided by real transmission spectrum data, when the band image encoder is concatenated with the band-transmission spectrum decoder that performs pseudo-transmission spectrum encoding and decoding, the error of the entire model will be determined solely by the error of the band-transmission spectrum decoder.

[0055] In a preferred embodiment, the grid structure of the band-spectrum decoder includes three linear layers and two ReLU activation functions. The input layer of the band-spectrum decoder has a size of 300. After passing through the first linear layer, the output size becomes 800. Then, it undergoes a nonlinear transformation through the ReLU activation function. After passing through the second linear layer, the output size becomes 500. After passing through the ReLU activation function again, the output size becomes 321 after passing through the third linear layer, which is the same as the size of the input layer of the transmission spectrum adaptive encoder.

[0056] like Figure 9 As shown, the training process is as follows: The pseudo-transmission spectrum encoding obtained in S3 is used as the model input, and the real transmission spectrum is used as the target. During training, the pseudo-transmission spectrum encoding is input into the band-transmission spectrum decoder, converting it into a transmission spectrum. The prediction error is calculated using smoothed average absolute error, and this error is passed to the Adam optimizer to optimize the encoder parameters. Through multiple iterations of training, the model continuously adjusts its parameters based on the real transmission spectrum data until the prediction error of the output transmission spectrum converges. This training phase aims to train a decoding model that uses pseudo-transmission spectrum encoding as input, enabling the operation of predicting the transmission spectrum using pseudo-transmission spectrum encoding.

[0057] Figure 10 This is the training result of the band-transmission spectrum decoder model. It can be seen that the Huber Loss of the band-transmission spectrum decoder is below 0.012, and the model has high accuracy.

[0058] The model's decoding performance for pseudo-transmission spectrum encoding is as follows: Figure 11 As shown, the band-transmission spectrum decoder can effectively decode pseudo-transmission spectrum encoding, and the resulting predicted transmission spectrum data has higher accuracy compared to the original transmission spectrum data.

[0059] Since the final model only uses the trained band image encoder and band-transmission spectrum decoder, only the network structure, weights, and biases within these two models will be shown.

[0060] Among them, the bandgap image encoder model represents the structure, weights, and biases, such as Figure 12 The diagram shows: 1) A convolutional layer with 3 input channels and 32 output channels, a kernel size of 3, and padding of 1. 2) A non-linear transformation is applied to the output of the convolutional layer using the ReLU activation function. 3) A 2×2 max-pooling layer is used to reduce the size of the feature map. 4) A convolutional layer with 32 input channels and 32 output channels, a kernel size of 3, and padding of 1. 5) A non-linear transformation is applied to the output of the convolutional layer using the ReLU activation function. 6) A 2×2 max-pooling layer is used to further reduce the size of the feature map. 7) A convolutional layer with 32 input channels and 16 output channels, a kernel size of 3, and padding of 1. 8) A non-linear transformation is applied to the output of the convolutional layer using the ReLU activation function. 9) A 2×2 max-pooling layer is used to further reduce the size of the feature map. 10) The feature map is flattened into a one-dimensional vector. 11) A linear layer with an input size of 13200 and an output size of 5000. 12) Apply a non-linear transformation to the output of the linear layer using the ReLU activation function. 13) A linear layer with an input size of 5000 and an output size of 2500. 14) Apply a non-linear transformation to the output of the linear layer using the ReLU activation function. 15) A linear layer with an input size of 2500 and an output size of 1000. 16) Apply a non-linear transformation to the output of the linear layer using the ReLU activation function. 17) A linear layer with an input size of 1000 and an output size of 500. 18) Apply a non-linear transformation to the output of the linear layer using the ReLU activation function. 19) A linear layer with an input size of 500 and an output size of 300.

[0061] The structure, weights, and biases of the band-transmission spectrum decoder model are as follows: Figure 13 The diagram shows: 1) A linear layer with an input size of 300 and an output size of 800. 2) A nonlinear transformation of the output of the linear layer using the ReLU activation function. 3) A linear layer with an input size of 800 and an output size of 500. 4) A nonlinear transformation of the output of the linear layer using the ReLU activation function. 5) A linear layer with an input size of 500 and an output size of 321. 6) A nonlinear transformation of the output of the linear layer using the Sigmoid activation function.

[0062] In another embodiment of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the training method for the photonic bandgap prediction transmission spectrum model described above.

[0063] The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.

[0064] Another embodiment of the present invention provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the training method for the photonic bandgap prediction transmission spectrum model described above.

[0065] like Figure 14 As shown, the computer device may include: at least one processor 71, such as a CPU (Central Processing Unit), at least one communication interface 73, memory 74, and at least one communication bus 72. The communication bus 72 is used to enable communication between these components. The communication interface 73 may include a display screen and a keyboard; optionally, the communication interface 73 may also include a standard wired interface or a wireless interface. The memory 74 may be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk drive. Optionally, the memory 74 may also be at least one storage device located remotely from the aforementioned processor 71. The memory 74 stores application programs, and the processor 71 calls the program code stored in the memory 74 to execute any of the above-described method steps.

[0066] The communication bus 72 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 72 can be divided into an address bus, a data bus, and a control bus, etc. For ease of representation, Figure 14 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0067] The memory 74 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 74 may also include a combination of the above types of memory.

[0068] The processor 71 can be a central processing unit (CPU), a network processor (NP), or a combination of CPU and NP.

[0069] The processor 71 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0070] Optionally, memory 74 is also used to store program instructions. Processor 71 can invoke program instructions to implement the training method for the photonic bandgap prediction transmission spectrum model of the present invention.

[0071] Another embodiment of the present invention provides a method for predicting the transmission spectrum of photonic band structure, characterized by comprising the following steps: training the photonic band structure prediction transmission spectrum model using the training method of the photonic band structure prediction transmission spectrum model as described above; and processing the band structure image to be predicted using the trained photonic band structure prediction transmission spectrum model to obtain the transmission spectrum data result.

[0072] In another embodiment of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned method for predicting the transmission spectrum of photonic bandgap.

[0073] Another embodiment of the present invention provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the photon bandgap prediction transmission spectrum prediction method described above.

[0074] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A training method for a photonic bandgap prediction transmission spectrum model, wherein the photonic bandgap prediction transmission spectrum model includes a bandgap image encoder and a bandgap-spectrum decoder, wherein the bandgap image encoder is a deep learning model used to convert a two-dimensional bandgap image into a one-dimensional code with a fixed length, and the bandgap-spectrum decoder is a deep learning model used to convert the one-dimensional code into the corresponding spectrum; characterized in that, The process includes the following steps: S1. Constructing a transmission spectrum adaptive encoder-decoder model, which includes a transmission spectrum adaptive encoder and a transmission spectrum adaptive decoder. These are independent deep learning models, and the output of the transmission spectrum adaptive encoder has the same input size as the transmission spectrum adaptive decoder. S2. Training the transmission spectrum adaptive encoder-decoder model. The training process is as follows: Using transmission spectrum data as input and target, the transmission spectrum data is input into the transmission spectrum adaptive encoder to convert it into one-dimensional encoding. The one-dimensional encoding is then input into the transmission spectrum adaptive decoder to output transmission spectrum data. The prediction error is calculated and passed to the Adam optimizer. The Adam optimizer automatically adjusts the parameters of the transmission spectrum adaptive encoder and the transmission spectrum adaptive decoder according to the magnitude of the prediction error, gradually bringing the output transmission spectrum data closer to the true transmission spectrum data. This process is repeated iteratively until the output transmission spectrum data... The prediction error converges; S3. The band image encoder is trained, and the training process is as follows: using the band image as input and the one-dimensional encoding of the transmission spectrum data obtained after training in step S2 as the target, the band image is input into the band image encoder to be converted into one-dimensional encoding, the prediction error is calculated, and the prediction error is passed to the Adam optimizer to optimize the parameters of the band image encoder. The training is iterated multiple times until the prediction error of the output one-dimensional encoding converges; S4. The band-spectrum decoder is trained, and the training process is as follows: using the one-bit encoding, i.e., the pseudo transmission spectrum encoding, obtained after training in step S3 as input and the real transmission spectrum data as the target, the pseudo transmission spectrum encoding is input into the band-spectrum decoder to be converted into a transmission spectrum, the prediction error is calculated, and the prediction error is passed to the Adam optimizer to optimize the parameters of the band-spectrum decoder. The training is iterated multiple times until the prediction error of the output transmission spectrum converges.

2. The training method according to claim 1, characterized in that, The network structure of the transmission spectrum adaptive encoder includes three linear layers and two ReLU activation functions. The input layer size of the transmission spectrum adaptive encoder is 321. After the first linear layer, the output size becomes 500. Then, it undergoes a nonlinear transformation through the ReLU activation function. After the second linear layer, the output size becomes 400. After another ReLU activation function, the output size becomes 300 after the third linear layer. The network structure of the transmission spectrum adaptive decoder also includes three linear layers and two ReLU activation functions. The input layer size of the transmission spectrum adaptive decoder is 300. After the first linear layer, the output size becomes 400. Then, it undergoes a nonlinear transformation through the ReLU activation function. After the second linear layer, the output size becomes 500. After another ReLU activation function, the output size becomes 321 after the third linear layer, which is the same size as the input layer of the transmission spectrum adaptive encoder.

3. The training method according to claim 2, characterized in that, The bandgap image encoder, constructed from convolutional and fully connected layers, transforms a two-dimensional bandgap image into a one-dimensional code. The initial bandgap image size is 267×200 pixels. First, the image passes through a first convolutional layer, which uses three filters to stack the image for feature extraction. Then, a pooling layer reduces the image size to 100×133 pixels to reduce the number of parameters and retain important feature information. Next, the image is further reduced to 50×66 pixels through a second convolutional and pooling layer; this step helps extract higher-level features. Then, a flattening layer transforms the 50×66 image into a one-dimensional code of size 13200 pixels. The flattening layer arranges the pixels in a one-dimensional order for processing by subsequent fully connected layers. Next, a... The dimensionality of the one-dimensional encoding is gradually reduced through five linear layers. Each linear layer is a fully connected layer, where each neuron is connected to all neurons in the previous layer. Through these linear layers, the model progressively extracts and compresses key features from the input image, ultimately obtaining a one-dimensional code of size 300. The band-spectrum decoder's grid structure includes three linear layers and two ReLU activation functions. The input layer of the band-spectrum decoder is 300 in size. After the first linear layer, the output size becomes 800, then undergoes a nonlinear transformation using the ReLU activation function. After the second linear layer, the output size becomes 500, then again undergoes the ReLU activation function, and finally, after the third linear layer, the output size becomes 321, the same as the input layer size of the transmission spectrum adaptive encoder.

4. The training method according to claim 3, characterized in that, The structure, weights, and biases of the trained bandgap image encoder are arranged in the following order of module connection: 1) A convolutional layer with 3 input channels and 32 output channels, a kernel size of 3, and padding size of 1; 2) A non-linear transformation of the output of the convolutional layer using the ReLU activation function; 3) A 2×2 max pooling layer to reduce the size of the feature map; 4) A convolutional layer with 32 input channels and 32 output channels, a kernel size of 3, and padding size of 1; 5) A non-linear transformation of the output of the convolutional layer using the ReLU activation function; 6) 7) A 2×2 max pooling layer to further reduce the size of the feature map; 8) A convolutional layer with 32 input channels and 16 output channels, a kernel size of 3, and padding size of 1; 9) Applying the ReLU activation function to the output of the convolutional layer non-linearly; 10) A 2×2 max pooling layer to further reduce the size of the feature map; 11) Flattening the feature map into a one-dimensional vector; 12) A linear layer with an input size of 13200 and an output size of 5000; 13) Applying the ReLU activation function to the output of the linear layer non-linearly. 13) A linear layer with an input size of 5000 and an output size of 2500; 14) Apply the ReLU activation function to the output of the linear layer using a nonlinear transformation; 15) A linear layer with an input size of 2500 and an output size of 1000; 16) Apply the ReLU activation function to the output of the linear layer using a nonlinear transformation; 17) A linear layer with an input size of 1000 and an output size of 500; 18) Apply the ReLU activation function to the output of the linear layer using a nonlinear transformation; 19) A linear layer with an input size of 500 and an output size of 300; the structure, weights, and biases of the trained band-spectrum decoder are configured as follows according to the module connection order: 1) A linear layer with an input size of 300 and an output size of 800; 2) A nonlinear transformation is performed on the output of the linear layer using the ReLU activation function; 3) A linear layer with an input size of 800 and an output size of 500; 4) A nonlinear transformation is performed on the output of the linear layer using the ReLU activation function; 5) A linear layer with an input size of 500 and an output size of 321; 6) Apply a non-linear transformation to the output of the linear layer using the Sigmoid activation function.

5. The training method according to claim 4, characterized in that, During the training of the transmission spectrum adaptive encoder-decoder model, the root mean square error function is used to calculate the prediction error between the predicted output and the real transmission spectrum data; during the training of the band image encoder, the smoothed mean absolute error is used to calculate the prediction error; during the training of the band-spectrum decoder, the smoothed mean absolute error is used to calculate the prediction error.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the training method for the photonic bandgap prediction transmission spectrum model as described in any one of claims 1-5.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the training method for the photonic bandgap prediction transmission spectrum model as described in any one of claims 1-5.

8. A method for predicting the transmission spectrum of photon band structure, characterized in that, The process includes the following steps: training the photonic band prediction transmission spectrum model using the training method of the photonic band prediction transmission spectrum model as described in any one of claims 1-5; and processing the trained photonic band prediction transmission spectrum model to be predicted band image to obtain transmission spectrum data results.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method for predicting the transmission spectrum of photonic bandgap as described in claim 8.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the photonic bandgap prediction transmission spectrum prediction method as described in claim 8.