Metasurface unit spectrum prediction method and device, equipment and storage medium

By constructing a target spectrum recognition model through progressive training, the problems of long spectrum prediction time and low accuracy are solved, and fast and accurate spectrum prediction is achieved in the design of metasurface unit structures.

CN118470346BActive Publication Date: 2026-08-04TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, spectrum prediction in metasurface unit structure design suffers from low accuracy and long time, especially when using deep learning methods for prediction, it is difficult to improve accuracy while shortening the time.

Method used

A progressive training method is adopted. By acquiring image sets of metasurface unit structures with different numbers of sampling points, the original spectrum recognition model is trained in ascending order of the number of sampling points to construct the target spectrum recognition model. The amplitude spectrum and phase spectrum are obtained by inversion calculation through the transmission coefficient.

Benefits of technology

While shortening the training time, it significantly improved the accuracy of spectrum prediction and reduced the prediction error from 10⁻³ to 10⁻⁴, thus enhancing the model's prediction performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470346B_ABST
    Figure CN118470346B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a metasurface unit spectrum prediction method, device and equipment and a storage medium, belonging to the technical field of metasurfaces. The method comprises: obtaining at least two target metasurface unit structure image sets; wherein the number of sampling points of images of different image sets is different; training a preset original spectrum recognition model based on each image set in turn according to the order of the number of sampling points from small to large to obtain a target spectrum recognition model; obtaining a to-be-predicted metasurface unit structure image, inputting the to-be-predicted metasurface unit structure image into the target spectrum recognition model for prediction, and outputting a target transmission coefficient; and performing inversion calculation on the target transmission coefficient to obtain an amplitude spectrum and a phase spectrum of the to-be-predicted metasurface unit structure image. By using the progressive training mode, the number of training images is reduced, the training time is shortened, and the target spectrum recognition model trained has a short prediction time and a high prediction result accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of metasurface technology, and in particular to a method, apparatus, device and storage medium for predicting the spectrum of metasurface units. Background Technology

[0002] Metasurface structures offer significant advantages in controlling optical responses, efficiently adjusting the phase magnitude, polarization angle, and propagation mode of electromagnetic waves during transmission. They are widely used in beam control, super-resolution imaging, and nonlinear optics. The optical spectrum, comprising amplitude and phase spectra, plays a crucial role in the design of metasurface unit structures. Two main methods exist for spectrum prediction: full-wave numerical simulation, which offers high accuracy but is time-consuming, and deep learning methods, which yield lower accuracy. Therefore, improving prediction accuracy while reducing prediction time has become a pressing technical challenge. Summary of the Invention

[0003] The main objective of this application is to propose a method, apparatus, device, and storage medium for predicting the spectrum of metasurface units, aiming to improve the accuracy of prediction while shortening the spectrum prediction time.

[0004] To achieve the above objectives, a first aspect of this application proposes a method for predicting the spectrum of metasurface units, the method comprising:

[0005] Acquire at least two sets of target metasurface unit structure images; wherein the number of sampling points of the metasurface unit structure images in each set of target metasurface unit structure images is different;

[0006] According to the order of the number of sampling points from smallest to largest, the preset original spectrum recognition model is trained sequentially based on the image set of each target metasurface unit structure to obtain the target spectrum recognition model;

[0007] Obtain an image of the metasurface unit structure to be predicted, input the image of the metasurface unit structure to be predicted into the target spectrum recognition model for prediction, and output the target transmission coefficient;

[0008] The amplitude spectrum and phase spectrum of the metasurface unit structure image to be predicted are obtained by inverting the transmission coefficient of the target.

[0009] In some embodiments, before acquiring at least two sets of target metasurface unit structure images, the method further includes:

[0010] Based on preset metasurface unit structure parameters, an original metasurface unit structure image set is constructed; wherein, the original metasurface unit structure image set includes original metasurface unit structure images of different shapes and different periods;

[0011] A preset image processing operation is performed on the original metasurface unit structure image to obtain an input image; wherein the image processing operation is a binarization operation, or a binarization operation and a stitching operation.

[0012] The input image is sampled at different preset sampling points to obtain at least two sets of images of the target metasurface unit structure.

[0013] In some embodiments, if the image processing operation is a binarization operation and a stitching operation, performing a preset image processing operation on the original metasurface unit structure image to obtain an input image includes:

[0014] The original metasurface unit structure image is binarized to obtain a binarized image;

[0015] The metasurface unit structure image with the smallest period is used as the reference unit structure image.

[0016] Based on the period size relationship between the reference unit structure image and each of the metasurface unit structure images, the scaling factor layer of each of the metasurface unit structure images is obtained;

[0017] The binarized image and the corresponding scaling factor layer are concatenated to obtain the input image.

[0018] In some embodiments, the original spectrum identification model includes an encoder, a real part decoder, and an imaginary part decoder;

[0019] The process of training a preset original spectrum recognition model on each target metasurface unit structure image set in ascending order of the number of sampling points to obtain a target spectrum recognition model includes:

[0020] The image set of the target metasurface unit structure is input into the encoder for encoding feature extraction to obtain image features;

[0021] The image features are input into the real part decoder for real part prediction to obtain the real part of the predicted transmission coefficient;

[0022] The image features are input into the imaginary part decoder for imaginary part prediction to obtain the imaginary part of the predicted transmission coefficient; wherein, the predicted transmission coefficient is constructed based on the real part and the imaginary part of the predicted transmission coefficient.

[0023] The predicted transmission coefficient and the preset simulated transmission coefficient are subjected to loss calculation using a preset first loss function to obtain the first loss data;

[0024] The model parameters of the encoder, the real part decoder, and the imaginary part decoder are adjusted based on the first loss data to obtain the target spectrum recognition model.

[0025] In some embodiments, after calculating the loss of the predicted transmission coefficient and the preset simulated transmission coefficient using a preset first loss function to obtain first loss data, the method further includes:

[0026] The predicted transmission coefficient is inverted to obtain the predicted amplitude spectrum and the predicted phase spectrum;

[0027] The predicted amplitude spectrum and the preset simulated amplitude spectrum are subjected to loss calculation using a preset second loss function to obtain second loss data;

[0028] The predicted phase spectrum and the preset simulated phase spectrum are subjected to loss calculation using a preset third loss function to obtain third loss data;

[0029] The original spectrum identification model is adjusted based on the first loss data, the second loss data, and the third loss data to obtain the target spectrum identification model.

[0030] In some embodiments, if at least two target metasurface unit structure image sets are set to three, and the three target metasurface unit structure image sets are respectively defined as a first metasurface unit structure image set, a second metasurface unit structure image set, and a third metasurface unit structure image set, the step of training a preset original spectrum recognition model based on each target metasurface unit structure image set in ascending order of the number of sampling points to obtain a target spectrum recognition model includes:

[0031] The original spectrum recognition model is trained based on the first metasurface unit structure image set to obtain the first spectrum recognition model;

[0032] The first spectrum recognition model is trained based on the second metasurface unit structure image set to obtain the second spectrum recognition model;

[0033] The second spectrum recognition model is trained based on the image set of the third metasurface unit structure to obtain the target spectrum recognition model.

[0034] In some embodiments, after acquiring at least two sets of target metasurface unit structure images, the method further includes:

[0035] The order of the metasurface unit structure images in at least two of the target metasurface unit structure image sets is shuffled.

[0036] To achieve the above objectives, a second aspect of this application provides a metasurface unit spectrum prediction device, the device comprising:

[0037] An acquisition module is used to acquire at least two target metasurface unit structure image sets; wherein the number of sampling points of the metasurface unit structure images in each target metasurface unit structure image set is different;

[0038] The training module is used to train the preset original spectrum recognition model sequentially based on each set of target metasurface unit structure images in ascending order of the number of sampling points to obtain the target spectrum recognition model.

[0039] The prediction module is used to acquire an image of the metasurface unit structure to be predicted, input the image of the metasurface unit structure to be predicted into the target spectrum recognition model for prediction, and output the target transmission coefficient.

[0040] The calculation module is used to perform inversion calculation on the transmission coefficient of the target to obtain the amplitude spectrum and phase spectrum of the metasurface unit structure image to be predicted.

[0041] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.

[0042] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.

[0043] The metasurface unit spectrum prediction method, apparatus, device, and storage medium proposed in this application acquire at least two target metasurface unit structure image sets, wherein the number of sampling points in the metasurface unit structure images of different target metasurface unit structure image sets is different; a preset original spectrum recognition model is trained sequentially based on each target metasurface unit structure image set in ascending order of the number of sampling points (progressive training method) to obtain a target spectrum recognition model; an image of the metasurface unit structure to be predicted is acquired, and the image of the metasurface unit structure to be predicted is input into the target spectrum recognition model for prediction, and the target transmission coefficient is output; the target transmission coefficient is inverted to calculate the amplitude spectrum and phase spectrum of the image of the metasurface unit structure to be predicted. By adopting a progressive training method, the number of training images is reduced, the training time is shortened, and the trained target spectrum recognition model has a short prediction time and high prediction accuracy. Attached Figure Description

[0044] Figure 1 This is an optional flowchart of the metasurface unit spectrum prediction method provided in the embodiments of this application;

[0045] Figure 2 This is a flowchart of the metasurface unit spectrum prediction method provided in the second embodiment of this application;

[0046] Figure 3 This is a schematic diagram of the image processing operation provided in the first embodiment of this application;

[0047] Figure 4 yes Figure 2 The flowchart of step S202 in the document;

[0048] Figure 5 This is a schematic diagram of the image processing operation provided in the second embodiment of this application;

[0049] Figure 6 This is provided in the first embodiment of the present application. Figure 1 The flowchart of step S102 in the document;

[0050] Figure 7 This is a schematic diagram of the structure of the spectrum identification model provided in the embodiments of this application;

[0051] Figure 8 This is a flowchart of the metasurface unit spectrum prediction method provided in the third embodiment of this application;

[0052] Figure 9 This is provided by the second embodiment of the present application. Figure 1 The flowchart of step S102 in the document;

[0053] Figure 10This is a schematic diagram of the structure of the metasurface unit spectrum prediction device provided in the embodiments of this application;

[0054] Figure 11 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0056] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0058] First, let's analyze some of the terms used in this application:

[0059] A metasurface element is an artificial surface structure designed to control the propagation of electromagnetic waves. The basic structure of a metasurface element consists of tiny two-dimensional metals (such as metal nanowires, metal wedges, and metal strips) or dielectric materials (such as dielectric nanospheres and dielectric hexagonal prisms) arranged according to certain rules to form a periodic array structure. By optimizing and controlling the design of these elements, electromagnetic waves can be controlled, such as adjusting their propagation speed, phase, amplitude, and polarization, thereby achieving various advanced electromagnetic wave control functions.

[0060] The amplitude and phase spectra of metasurface elements are important parameters describing the reflection, transmission, and scattering properties of incident electromagnetic waves within the wavelength range. The amplitude spectrum describes the energy loss of the electromagnetic wave as it passes through the metasurface element, while the phase spectrum describes the phase change of the electromagnetic wave after passing through the metasurface element. The prediction of the amplitude and phase spectra is commonly used in the design and optimization process of metasurface element structures.

[0061] In related technologies, there are two methods for predicting the spectrum. One method is to predict the spectrum of metasurface structures using full-wave numerical simulation, which has high accuracy but a long prediction time. The second method is to predict the spectrum using deep learning methods, which has a fast prediction time but lower accuracy.

[0062] Based on this, embodiments of this application provide a method, apparatus, device, and storage medium for predicting the spectrum of metasurface units. The aim is to obtain a target spectrum recognition model by training a preset original spectrum recognition model sequentially based on different target metasurface unit structure image sets, arranged in ascending order of the number of sampling points. The target spectrum recognition model is used to predict the metasurface unit structure image to be predicted, resulting in fast prediction time and high accuracy.

[0063] The metasurface unit spectrum prediction method, apparatus, device, and storage medium provided in this application are specifically described through the following embodiments. First, the metasurface unit spectrum prediction method in this application is described.

[0064] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0065] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0066] The metasurface unit spectrum prediction method provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the metasurface unit spectrum prediction method, etc., but is not limited to the above forms.

[0067] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0068] Please refer to Figure 1 , Figure 1 This is an optional flowchart of the metasurface unit spectrum prediction method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S104.

[0069] Step S101: Obtain at least two target metasurface unit structure image sets; wherein the number of sampling points of the metasurface unit structure images in each target metasurface unit structure image set is different;

[0070] Step S102: Train the preset original spectrum recognition model sequentially based on the image set of each target metasurface unit structure according to the order of the number of sampling points from smallest to largest, so as to obtain the target spectrum recognition model.

[0071] Step S103: Obtain the image of the metasurface unit structure to be predicted, input the image of the metasurface unit structure to be predicted into the target spectrum recognition model for prediction, and output the target transmission coefficient.

[0072] Step S104: Invert the transmission coefficient of the target to obtain the amplitude spectrum and phase spectrum of the metasurface unit structure image to be predicted.

[0073] In step S101 of some embodiments, a metasurface unit structure image with a high number of sampling points can be pre-acquired, and then downsampling processing can be performed on the high-sampling-point metasurface unit structure image to obtain metasurface unit structure images with different sampling points. For example, the high-sampling-point metasurface unit structure image is 256*256, and after downsampling processing, metasurface unit structure images of sizes 128*128 and 64*64 are obtained respectively. Among them, metasurface unit structure images with the same number of sampling points form a target metasurface unit structure image set, and the number of sampling points of the metasurface unit structure images in different image sets is different.

[0074] In step S102 of some embodiments, to ensure successful conversion between different sampling point sizes, the model's learning rate decreases sequentially as the number of sampling points increases. Also, to ensure sufficient memory, the batch size for each training iteration decreases sequentially as the number of sampling points increases. After training the preset original spectrum recognition model on each target metasurface unit structure image set in ascending order of sampling point size, the target spectrum recognition model is obtained.

[0075] In practical applications, when the number of image sampling points used to train the model is large, a sufficient number of images are needed to train the model; otherwise, the trained model will have low accuracy. However, training the model with a sufficient number of images can also lead to long training times and the model being prone to getting stuck in local optima. Therefore, in this embodiment, the model is first trained using an image set with a smaller number of sampling points, and then trained using an image set with a larger number of sampling points. The number of network layers remains unchanged, and only the size of the input metasurface unit structure image is gradually changed, with the learning rate and batch size adaptively adjusted. This results in faster and more stable training, as well as better generalization performance. It also improves the model's prediction accuracy while reducing the number of samples.

[0076] In step S103 of some embodiments, an image of the metasurface unit structure to be predicted is obtained, the image of the metasurface unit structure to be predicted is input into the target spectrum recognition model for prediction, and the target transmission coefficient is output.

[0077] Specifically, the amplitude and phase responses of metasurface unit structures exhibit abrupt changes near the resonant frequency (especially the phase), resulting in low accuracy when directly predicting the amplitude and phase spectra. Therefore, during the training of the spectrum recognition model, the transmission coefficient of the metasurface unit structure is selected as the prediction target. The amplitude and phase spectra are then obtained through formula inversion based on the transmission coefficient, reducing the prediction error from 10... -3 Reduced to 10 -4 This improved the accuracy of predictions.

[0078] In step S104 of some embodiments, the target transmission coefficient is inverted to obtain the amplitude spectrum and phase spectrum of the metasurface unit structure image to be predicted. The transmission coefficient includes a real part and an imaginary part, and the corresponding amplitude spectrum and phase spectrum can be calculated using the following formulas 1 and 2.

[0079]

[0080]

[0081] Where Amplitude is the amplitude spectrum, Phase is the phase spectrum, and Real(S) is the amplitude spectrum. 21 ) represents the real part of the transmission coefficient, Imag(S) 21 ) represents the imaginary part of the transmission coefficient.

[0082] Steps S101 to S104 of this embodiment involve acquiring at least two sets of target metasurface unit structure images; wherein the number of sampling points in each set of target metasurface unit structure images is different; training a preset original spectrum recognition model sequentially based on each set of target metasurface unit structure images in ascending order of the number of sampling points (progressive training method) to obtain a target spectrum recognition model; acquiring the metasurface unit structure image to be predicted, inputting the image to be predicted into the target spectrum recognition model for prediction, and outputting the target transmission coefficient; performing inversion calculation on the target transmission coefficient to obtain the amplitude spectrum and phase spectrum of the image to be predicted. By adopting a progressive training method, the number of training images is reduced, the training time is shortened, and the trained target spectrum recognition model has a short prediction time and high prediction accuracy.

[0083] Please see Figure 2 In some embodiments, prior to step S101, the metasurface unit spectrum prediction method may also include, but is not limited to, steps S201 to S203:

[0084] Step S201: Construct an original metasurface unit structure image set according to the preset metasurface unit structure parameters; wherein, the original metasurface unit structure image set includes metasurface unit structure images of different shapes and different periods;

[0085] Step S202: Perform a preset image processing operation on the original metasurface unit structure image to obtain an input image; wherein, the image processing operation is a binarization operation, or a binarization operation and a stitching operation.

[0086] Step S203: Sample the input image according to different preset sampling points to obtain at least two target metasurface unit structure image sets.

[0087] In step S201 of some embodiments, a metasurface unit structure is constructed in electromagnetic simulation software according to preset metasurface unit structure parameters. Then, the top view of the metasurface unit structure is used to extract the structure, resulting in a metasurface unit structure image. This method yields metasurface unit structure images of different shapes and periods, thereby constructing an original set of metasurface unit structure images.

[0088] In steps S202 to S203 of some embodiments, the metasurface unit structure image is converted to grayscale to obtain a grayscale image. The grayscale image is then binarized to obtain an input image. The input image is sampled at different preset sampling point numbers to obtain at least two target metasurface unit structure image sets. For example... Figure 3 As shown, (a) is the grayscale image obtained after grayscale processing of the extracted metasurface unit structure image, and (b) is the input image obtained after binarization processing.

[0089] In this embodiment, steps S201 to S203 involve binarizing the original metasurface unit structure image, enabling the obtained input image to represent metasurface unit structure images of different shapes and sizes.

[0090] Please see Figure 4 In some embodiments, if the image processing operation is a binarization operation and a stitching operation, then step S202 may include, but is not limited to, steps S401 to S404:

[0091] Step S401: The original metasurface unit structure image is binarized to obtain a binarized image;

[0092] Step S402: Use the metasurface unit structure image with the smallest period as the reference unit structure image;

[0093] Step S403: Based on the period size relationship between the reference unit structure image and each metasurface unit structure image, obtain the scaling factor layer of each metasurface unit structure image.

[0094] Step S404: The binarized image and the corresponding scaling factor layer are concatenated to obtain the input image.

[0095] In steps S401 and S403 of some embodiments, the scaling factor layer is a two-dimensional image. When the size of the metasurface unit structure image is 256*256, the corresponding scaling factor layer is also 256*256. The value of each pixel in the scaling factor layer is the scaling factor value. The scaling factor values ​​in a scaling factor layer are all the same. After obtaining the scaling factor values, the scaling factor layer is obtained.

[0096] Specifically, the value of the scaling factor is determined by the relationship between the period of the reference unit cell structure image and the period of each metasurface unit cell structure image. For example, if the period of the metasurface unit cell structure image with the smallest period is 400*400, and the period of a certain metasurface unit cell structure image is 600*600, then the period of this metasurface unit cell structure image is 1.5 times that of the reference unit cell structure image, and the corresponding scaling factor value is 1.5. Since the size of the binarized image is generally between 0 and 1, the scaling factor value also needs to be normalized. After normalization, the scaling factor value is 0.5.

[0097] In step S404 of some embodiments, such as Figure 5 As shown, (c) represents the scaling factor layer, s is the scaling factor value, and (d) represents the input image obtained by stitching the scaling factor layer and the binarized image. When the scaling factor layer is two-dimensional (256*256) in size and the binarized image is also two-dimensional (256*256) in size, the stitched input image is three-dimensional (2*256*256) in size.

[0098] The metasurface unit structures obtained after proportional scaling have different sizes, resulting in different transmission coefficients, i.e., different amplitude and phase spectra. However, related spectrum recognition models cannot distinguish between proportionally scaled metasurface unit structures, leading to identical prediction results and inaccurate predictions. Steps S401 to S404 in this embodiment, by stitching the scaling factor layer and the binarized image to obtain the input image, allow the input image to represent multiple proportionally scaled metasurface unit structures. This enables the target spectrum recognition model to distinguish between the proportionally scaled metasurface unit structures, improving prediction accuracy.

[0099] Please see Figure 6 In some embodiments, the original spectrum identification model includes an encoder, a real part decoder, and an imaginary part decoder, and step S102 may include, but is not limited to, steps S601 to S605:

[0100] Step S601: Input the target metasurface unit structure image set into the encoder for encoding feature extraction to obtain image features;

[0101] Step S602: Input the image features into the real part decoder to perform real part prediction and obtain the real part of the predicted transmission coefficient;

[0102] Step S603: Input the image features into the imaginary part decoder to perform imaginary part prediction and obtain the imaginary part of the predicted transmission coefficient; wherein, the predicted transmission coefficient is constructed based on the real part and the imaginary part of the predicted transmission coefficient.

[0103] Step S604: Calculate the loss of the predicted transmission coefficient and the preset simulated transmission coefficient using a preset first loss function to obtain the first loss data.

[0104] Step S605: Adjust the model parameters of the encoder, real part decoder and imaginary part decoder according to the first loss data to obtain the target spectrum recognition model.

[0105] In steps S601 to S603 as illustrated in some embodiments, such as Figure 7 As shown, the original spectrum recognition model includes one encoder and two decoders: a real part decoder and an imaginary part decoder. The encoder extracts image features, the real part decoder establishes a mapping relationship between image features and the real part of the transmission coefficient, and the imaginary part decoder establishes a mapping relationship between image features and the imaginary part of the transmission coefficient.

[0106] In steps S604 to S605 as illustrated in some embodiments, a first loss data is obtained by calculating the loss between the predicted transmission coefficient and the preset simulated transmission coefficient using a preset first loss function; the model parameters of the encoder, real part decoder, and imaginary part decoder are adjusted based on the first loss data to obtain the target spectrum recognition model. The simulated transmission coefficient is obtained by simulating the metasurface structure unit using an electromagnetic simulation model.

[0107] In related technologies, two separate networks are used to predict the real and imaginary parts, resulting in the network predicting the real part only having the dataset of the real part, and the network predicting the imaginary part only having the dataset of the imaginary part. However, the encoder can only extract image features by utilizing all the information from both the real and imaginary parts, thus making the encoder's prediction based on image features more accurate. Steps S601 to S605 of this embodiment improve the accuracy of the prediction results by making the original spectrum recognition model include an encoder, a real part decoder, and an imaginary part decoder, and then training the encoder, real part decoder, and imaginary part decoder.

[0108] Please see Figure 8 In some embodiments, after step S604, the metasurface unit spectrum prediction method further includes, but is not limited to, steps S801 to S804:

[0109] Step S801: Perform inversion calculation on the predicted transmission coefficient to obtain the predicted amplitude spectrum and the predicted phase spectrum;

[0110] Step S802: Calculate the loss between the predicted amplitude spectrum and the preset simulated amplitude spectrum using a preset second loss function to obtain the second loss data;

[0111] Step S803: Calculate the loss of the predicted phase spectrum and the preset simulated phase spectrum using a preset third loss function to obtain the third loss data;

[0112] Step S804: Adjust the model parameters of the original spectrum identification model based on the first loss data, the second loss data, and the third loss data to obtain the target spectrum identification model.

[0113] In steps S801 to S804 of some embodiments, to make the prediction results of the target spectrum identification model more accurate, after obtaining the first loss data, the predicted transmission coefficient is inverted to obtain the predicted amplitude spectrum and the predicted phase spectrum. A second loss function is used to calculate the loss between the predicted amplitude spectrum and a preset simulated amplitude spectrum to obtain second loss data. A third loss function is used to calculate the loss between the predicted phase spectrum and a preset simulated phase spectrum to obtain third loss data. Based on the first loss data, the second loss data, and the third loss data, the model parameters of the original spectrum identification model are adjusted to obtain the target spectrum identification model. The simulated amplitude spectrum and simulated phase spectrum are obtained by simulating the metasurface unit structure using electromagnetic simulation software.

[0114] Please see Figure 9 In some embodiments, if at least two target metasurface unit structure image sets are set to three, and the three target metasurface unit structure image sets are respectively defined as the first metasurface unit structure image set, the second metasurface unit structure image set, and the third metasurface unit structure image set, then step S102 may include, but is not limited to, steps S901 to S903:

[0115] Step S901: Train the original spectrum recognition model based on the first metasurface unit structure image set to obtain the first spectrum recognition model;

[0116] Step S902: Train the first spectrum recognition model based on the second metasurface unit structure image set to obtain the second spectrum recognition model;

[0117] Step S903: The second spectrum recognition model is trained based on the image set of the third metasurface unit structure to obtain the target spectrum recognition model.

[0118] In steps S901 to S903 of some embodiments, the number of sampling points for the metasurface unit structure images in the first, second, and third metasurface unit structure image sets increases sequentially. Steps S901 to S903 represent a progressive training method, which results in faster and more stable training and better generalization. It also improves the accuracy of model predictions while reducing the number of samples.

[0119] In some embodiments, the order of the metasurface unit structure images in the target metasurface unit structure image set is shuffled, so that the images in the image set are in a sequence of different shapes and sizes, preventing the model from getting trapped in local optima during training. The shuffled dataset is then divided into a training set, a test set, and a validation set, with proportions of 70%, 15%, and 15%, respectively.

[0120] Please see Figure 10 This application also provides a metasurface unit spectrum prediction device that can implement the above-described metasurface unit spectrum prediction method. The device includes:

[0121] The acquisition module 1001 is used to acquire at least two target metasurface unit structure image sets; wherein the number of sampling points of the metasurface unit structure images in each target metasurface unit structure image set is different;

[0122] Training module 1002 is used to train the preset original spectrum recognition model on each target metasurface unit structure image set in ascending order of the number of sampling points to obtain the target spectrum recognition model.

[0123] Prediction module 1003 is used to acquire the image of the metasurface unit structure to be predicted, input the image of the metasurface unit structure to be predicted into the target spectrum recognition model for prediction, and output the target transmission coefficient.

[0124] The calculation module 1004 is used to perform inversion calculation on the target transmission coefficient to obtain the amplitude spectrum and phase spectrum of the metasurface unit structure image to be predicted.

[0125] The specific implementation of this metasurface unit spectrum prediction device is basically the same as the specific embodiment of the metasurface unit spectrum prediction method described above, and will not be repeated here.

[0126] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described metasurface unit spectrum prediction method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0127] Please see Figure 11 , Figure 11 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:

[0128] The processor 1101 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0129] The memory 1102 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1102 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1102 and is called and executed by the processor 1101 using the metasurface unit spectrum prediction method of the embodiments of this application.

[0130] Input / output interface 1103 is used to implement information input and output;

[0131] The communication interface 1104 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0132] Bus 1105 transmits information between various components of the device (e.g., processor 1101, memory 1102, input / output interface 1103, and communication interface 1104);

[0133] The processor 1101, memory 1102, input / output interface 1103 and communication interface 1104 are connected to each other within the device via bus 1105.

[0134] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described metasurface unit spectrum prediction method.

[0135] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0136] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0137] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0138] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0139] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0140] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0141] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0142] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the apparatus or units may be electrical, mechanical, or other forms.

[0143] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0144] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0145] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0146] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for predicting the spectrum of metasurface units, characterized in that, The method includes: Acquire at least two sets of target metasurface unit structure images; wherein the number of sampling points of the metasurface unit structure images in each set of target metasurface unit structure images is different; According to the order of the number of sampling points from smallest to largest, the preset original spectrum recognition model is trained sequentially based on the image set of each target metasurface unit structure to obtain the target spectrum recognition model; Obtain an image of the metasurface unit structure to be predicted, input the image of the metasurface unit structure to be predicted into the target spectrum recognition model for prediction, and output the target transmission coefficient; The amplitude spectrum and phase spectrum of the metasurface unit structure image to be predicted are obtained by inverting the transmission coefficient of the target. The original spectrum recognition model includes an encoder, a real part decoder, and an imaginary part decoder. The process of training a preset original spectrum recognition model on each target metasurface unit structure image set in ascending order of the number of sampling points to obtain a target spectrum recognition model includes: The image set of the target metasurface unit structure is input into the encoder for encoding feature extraction to obtain image features; The image features are input into the real part decoder for real part prediction to obtain the real part of the predicted transmission coefficient; The image features are input into the imaginary part decoder for imaginary part prediction to obtain the imaginary part of the predicted transmission coefficient; wherein, the predicted transmission coefficient is constructed based on the real part and the imaginary part of the predicted transmission coefficient. The predicted transmission coefficient and the preset simulated transmission coefficient are subjected to loss calculation using a preset first loss function to obtain the first loss data; The model parameters of the encoder, the real part decoder, and the imaginary part decoder are adjusted based on the first loss data to obtain the target spectrum recognition model.

2. The method according to claim 1, characterized in that, Before acquiring at least two sets of target metasurface unit structure images, the method further includes: Based on preset metasurface unit structure parameters, an original metasurface unit structure image set is constructed; wherein, the original metasurface unit structure image set includes original metasurface unit structure images of different shapes and different periods; A preset image processing operation is performed on the original metasurface unit structure image to obtain an input image; wherein the image processing operation is a binarization operation, or a binarization operation and a stitching operation. The input image is sampled at different preset sampling points to obtain at least two sets of images of the target metasurface unit structure.

3. The method according to claim 2, characterized in that, If the image processing operation is a binarization operation and a stitching operation, the step of performing a preset image processing operation on the original metasurface unit structure image to obtain an input image includes: The original metasurface unit structure image is binarized to obtain a binarized image; The metasurface unit structure image with the smallest period is used as the reference unit structure image. Based on the period size relationship between the reference unit structure image and each of the metasurface unit structure images, the scaling factor layer of each of the metasurface unit structure images is obtained; The binarized image and the corresponding scaling factor layer are concatenated to obtain the input image.

4. The method according to claim 1, characterized in that, After calculating the loss of the predicted transmission coefficient and the preset simulated transmission coefficient using a preset first loss function to obtain the first loss data, the method further includes: The predicted transmission coefficient is inverted to obtain the predicted amplitude spectrum and the predicted phase spectrum; The predicted amplitude spectrum and the preset simulated amplitude spectrum are subjected to loss calculation using a preset second loss function to obtain second loss data; The predicted phase spectrum and the preset simulated phase spectrum are subjected to loss calculation using a preset third loss function to obtain third loss data; The original spectrum identification model is adjusted based on the first loss data, the second loss data, and the third loss data to obtain the target spectrum identification model.

5. The method according to claim 1, characterized in that, If at least two target metasurface unit structure image sets are set to three, and the three target metasurface unit structure image sets are respectively defined as the first metasurface unit structure image set, the second metasurface unit structure image set, and the third metasurface unit structure image set, the step of training a preset original spectrum recognition model based on each target metasurface unit structure image set in ascending order of the number of sampling points to obtain a target spectrum recognition model includes: The original spectrum recognition model is trained based on the first metasurface unit structure image set to obtain the first spectrum recognition model; The first spectrum recognition model is trained based on the second metasurface unit structure image set to obtain the second spectrum recognition model; The second spectrum recognition model is trained based on the image set of the third metasurface unit structure to obtain the target spectrum recognition model.

6. The method according to claim 1, characterized in that, After acquiring at least two sets of target metasurface unit structure images, the method further includes: The order of the metasurface unit structure images in at least two of the target metasurface unit structure image sets is shuffled.

7. A metasurface unit spectrum prediction device, characterized in that, The device includes: An acquisition module is used to acquire at least two target metasurface unit structure image sets; wherein the number of sampling points of the metasurface unit structure images in each target metasurface unit structure image set is different; The training module is used to train the preset original spectrum recognition model sequentially based on each set of target metasurface unit structure images in ascending order of the number of sampling points to obtain the target spectrum recognition model. The prediction module is used to acquire an image of the metasurface unit structure to be predicted, input the image of the metasurface unit structure to be predicted into the target spectrum recognition model for prediction, and output the target transmission coefficient. The calculation module is used to perform inversion calculation on the transmission coefficient of the target to obtain the amplitude spectrum and phase spectrum of the metasurface unit structure image to be predicted; The original spectrum recognition model includes an encoder, a real part decoder, and an imaginary part decoder. The process of training a preset original spectrum recognition model on each target metasurface unit structure image set in ascending order of the number of sampling points to obtain a target spectrum recognition model includes: The image set of the target metasurface unit structure is input into the encoder for encoding feature extraction to obtain image features; The image features are input into the real part decoder for real part prediction to obtain the real part of the predicted transmission coefficient; The image features are input into the imaginary part decoder for imaginary part prediction to obtain the imaginary part of the predicted transmission coefficient; wherein, the predicted transmission coefficient is constructed based on the real part and the imaginary part of the predicted transmission coefficient. The predicted transmission coefficient and the preset simulated transmission coefficient are subjected to loss calculation using a preset first loss function to obtain the first loss data; The model parameters of the encoder, the real part decoder, and the imaginary part decoder are adjusted based on the first loss data to obtain the target spectrum recognition model.

8. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the metasurface unit spectrum prediction method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the metasurface unit spectrum prediction method according to any one of claims 1 to 6.