Grating simulation method and device, electronic equipment and readable storage medium
By dividing the simulation tasks of the raster structure into sub-simulation tasks by the number of layers, and aggregating the matrix of each layer in real time during the parallel computing process, the problem of high memory consumption in parallel computing is solved, and efficient computing and resource utilization is achieved.
Patent Information
- Application Number
- CN202510451003.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-11
AI Technical Summary
Parallel computing has a high memory consumption problem in raster simulation.
By dividing the simulation tasks of the raster structure into sub-simulation tasks by number of layers, and aggregating the matrix of each layer in real time during parallel computing, reducing memory overhead.
It realizes the method of adding local serial under the global parallel framework, real-time aggregation matrix, reduces memory overhead, makes full use of cluster computing power and accelerates computing, and improves the balance between computing efficiency and resource utilization.
Smart Images

Figure CN119989734A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of optical technology, and in particular, relates to a grating simulation method, device, electronic device and readable storage medium. Background Art
[0002] At present, grating simulation is used to simulate the scattering characteristics of optical elements with periodic structures. The specific process is to set the light parameters, layer the entire measured grating structure, calculate the structure matrix of each layer in parallel, aggregate the structure matrix into a total structure matrix, and calculate the scattering characteristics through the relationship between the incident light field, the scattered light field and the total structure matrix.
[0003] However, parallel computing has the problem of high memory consumption. Summary of the invention
[0004] The embodiments of the present application provide a grating simulation method, device, electronic device, readable storage medium and computer program product, which can solve the problem of high memory consumption in parallel computing.
[0005] In a first aspect, an embodiment of the present application provides a grating simulation method, comprising: Get the simulation task of grating structure; Dividing the simulation task of the grating structure according to the number of layers of the grating structure to obtain at least two sub-simulation tasks, wherein the sub-simulation task includes simulation tasks of at least two grating layers; In the process of parallel calculation of each of the sub-simulation tasks, for each of the sub-simulation tasks, a matrix of the current grating layer is calculated; Aggregating the matrix of the current grating layer with the historical intermediate structure matrix to obtain a new intermediate structure matrix, wherein the historical intermediate structure matrix is the result of aggregating the matrices of the historical grating layers, and the historical grating layers include the grating layers before the current grating layer; After taking the next grating layer as the current grating layer according to the layer order, returning to the step of: calculating the matrix of the current grating layer; When the sub-simulation task is completed, a sub-structure matrix is obtained; After all the substructure matrices are obtained, the substructure matrices are aggregated to obtain a total structure matrix.
[0006] In one embodiment, the sub-simulation task includes simulation tasks of at least two consecutive grating layers.
[0007] In one embodiment, aggregating the substructure matrices to obtain a total structure matrix includes: The substructure matrices are aggregated in reverse order of layers to obtain the total structure matrix.
[0008] In one embodiment, the aggregation methods include block aggregation, hierarchical aggregation and algorithmic aggregation.
[0009] In one embodiment, the grating structure is a double-period grating structure.
[0010] In one embodiment, the substructure matrix is a sparse matrix or a dense matrix.
[0011] In a second aspect, an embodiment of the present application provides a grating simulation device, comprising: An acquisition module, used for acquiring a simulation task of a grating structure; A simulation module, used for dividing the simulation task of the grating structure according to the number of layers of the grating structure to obtain at least two sub-simulation tasks, wherein the sub-simulation task includes simulation tasks of at least two grating layers; It is also used for calculating the matrix of the current grating layer for each of the sub-simulation tasks in parallel; aggregating the matrix of the current grating layer with the historical intermediate structure matrix to obtain a new intermediate structure matrix, wherein the historical intermediate structure matrix is the result of the matrix aggregation of the historical grating layer, and the historical grating layer includes the grating layer before the current grating layer; after taking the next grating layer as the current grating layer according to the layer order, returning to the execution step: calculating the matrix of the current grating layer; and obtaining the sub-structure matrix when the sub-simulation task is completed; It is also used to aggregate the substructure matrices after obtaining all the substructure matrices to obtain the total structure matrix.
[0012] In one embodiment, the simulation module is specifically used to aggregate each of the substructure matrices in reverse order of layers to obtain the total structure matrix.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method as described in any one of the above-mentioned first aspects when executing the computer program.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described in any one of the above-mentioned first aspects is implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes any one of the methods described in the first aspect.
[0016] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: The embodiment of the present application obtains a simulation task of a grating structure; divides the simulation task of the grating structure according to the number of layers of the grating structure to obtain at least two sub-simulation tasks, wherein the sub-simulation tasks include simulation tasks of at least two grating layers; in the process of parallel calculation of each sub-simulation task, for each sub-simulation task, calculates the matrix of the current grating layer; aggregates the matrix of the current grating layer with the historical intermediate structure matrix to obtain a new intermediate structure matrix, wherein the historical intermediate structure matrix is the result of matrix aggregation of historical grating layers, and the historical grating layers include grating layers before the current grating layer; after taking the next grating layer as the current grating layer according to the layer order, returns to the execution step: calculates the matrix of the current grating layer; when the sub-simulation task is completed, obtains the sub-structure matrix; after obtaining all the sub-structure matrices, aggregates the sub-structure matrices to obtain the total structure matrix, combines parallel calculation with serial calculation, and adds a local serial method under the framework of global parallelism to realize matrix calculation and real-time aggregation of each layer, which can reduce memory overhead through real-time aggregation, while making full use of cluster computing power and accelerated computing, achieving a balance between computing efficiency and resource utilization, and optimizing the computing power and memory data allocation of the cluster.
[0017] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 It is a flowchart of a grating simulation method provided by an embodiment of the present application; Figure 2 is a schematic diagram of the steps of a grating simulation method provided by an embodiment of the present application; Figure 3 is a structural schematic diagram of a grating simulation device provided in one embodiment of the present application; Figure 4 It is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0020] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0021] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0022] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0023] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0024] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0025] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0026] In one embodiment, Figure 1 FIG. 1 is a flow chart of a grating simulation method provided by an embodiment of the present application. Figure 1As shown, the method comprises: S11: Get the simulation task of the grating structure.
[0027] S12: Divide the simulation task of the grating structure according to the number of layers of the grating structure to obtain at least two sub-simulation tasks.
[0028] The sub-simulation task includes simulation tasks of at least two grating layers.
[0029] For example, the grating structure has 100 layers, and the simulation task of the 100 layers is divided into 10 sub-simulation tasks, each of which includes 10 layers of simulation tasks.
[0030] In one possible implementation, the sub-simulation task includes simulation tasks for at least two continuous grating layers, so that each sub-simulation task is for a continuous grating layer, rather than a grating layer simulation task in a random allocation or thread pool manner, ensuring that the calculation order of the sub-simulation tasks is consistent with the data dependency, that is, ensuring that the boundaries of the sub-simulation tasks are clear, reducing the data transfer and synchronization overhead caused by random allocation and thread pool methods.
[0031] For example, for a 100-layer simulation task, each sub-simulation task includes 10 consecutive layers of simulation tasks. The first one calculates layers 1-10, the second one calculates layers 11-20, and so on.
[0032] S13: During the parallel calculation of each sub-simulation task, the matrix of the current grating layer is calculated for each sub-simulation task.
[0033] In the application, the parallel computing framework and cluster task scheduling are used to allocate appropriate threads or computing nodes according to the sub-simulation tasks, and the substructure matrix of each sub-simulation task is calculated in parallel through each thread or computing node. The number of threads or computing nodes is the same as the number of sub-simulation tasks. For example, 10 sub-simulation tasks can be allocated to 10 threads or computing nodes.
[0034] Among them, the parallel computing framework can be selected according to the computing environment, hardware resources, task scale and performance requirements. For example, when the shared memory parallel computing environment is simple to operate and small-scale parallel tasks are required, select openMP (OpenMulti-Processing). When distributed memory parallel computing is used for large-scale computing clusters, select MPI (MessagePassing Interface). When parallel computing is accelerated by GPU (Graphics Processing Unit) and high-throughput computing is required, select CUDA (Compute Unified Device Architecture).
[0035] The cluster task scheduling system is responsible for resource allocation and task scheduling. The cluster task scheduling system can be selected according to the cluster scale and task characteristics. For example, when large-scale cluster task scheduling, flexible configuration, and complex scheduling requirements are required, choose Slurm (Simple Linux Utility for Resource Management). When it is easy to configure and has small and medium-sized clusters, choose PBS (Portable Batch System). When high-throughput computing tasks require dynamic load balancing, choose HTCondor (High-Throughput Computing Condor). When scheduling containerized computing tasks, elastic expansion, and multi-node deployment, choose Kubernetes.
[0036] For each sub-simulation task, within the sub-simulation task, input parameters: wavelength, incident angle, polarization state, layer parameters and select optical model; then calculate the electromagnetic field distribution and determine the boundary conditions; then construct the matrix and output the matrix.
[0037] S14: Aggregate the matrix of the current grating layer with the historical intermediate structure matrix to obtain a new intermediate structure matrix.
[0038] The historical intermediate structure matrix is the result of matrix aggregation of historical grating layers, and the historical grating layers include grating layers before the current grating layer.
[0039] In the application, within a thread or computing node, after calculating the matrix of the current grating layer, the matrix is directly aggregated with the historical intermediate structure matrix maintained within the thread or computing node to generate a new intermediate structure matrix, so that during the aggregation process, the matrix of a single layer is not stored, but is aggregated in real time to reduce storage requirements.
[0040] S15: After taking the next grating layer as the current grating layer according to the layer order, return to execute step S13: calculate the matrix of the current grating layer.
[0041] In the application, after the matrix calculation of the current grating layer is completed, the next grating layer is selected according to the layer order. At this time, the next grating layer is the current grating layer, and the steps are executed: the matrix of the current grating layer is calculated, and then the obtained matrix is aggregated with the historical intermediate structure matrix maintained in the thread or computing node to generate a new intermediate structure matrix, and so on, so that the above steps S13 to S15 are executed for each grating layer.
[0042] S16: When the sub-simulation task is completed, the sub-structure matrix is obtained.
[0043] In the application, threads or computing nodes serially calculate the matrices of each layer to complete the sub-simulation task and obtain a sub-structure matrix.
[0044] For example, the first thread or computing node calculates layers 1-10. The current raster layer is layer 1, and the matrix of layer 1 is calculated, which is used as the historical intermediate structure matrix. The current raster layer is layer 2, and the matrix of layer 2 is calculated. The matrix is aggregated with the historical intermediate structure matrix to obtain a new intermediate structure matrix (the result of the aggregation of the matrices of layers 1 and 2). The current raster layer is layer 3, and the matrix of layer 3 is calculated. The matrix is aggregated with the historical intermediate structure matrix (the result of the aggregation of the matrices of layers 1 and 2) to obtain a new intermediate structure matrix (the result of the aggregation of the matrices of layers 1-3). And so on, after aggregating the matrix of layer 10 with the historical intermediate structure matrix, the substructure matrix is obtained.
[0045] Please refer to Figure 2 , Figure 2 1 is a schematic diagram of the steps of the grating simulation method provided by an embodiment of the present application. The grating structure is layered to obtain n grating layers. Then, the grating structure is grouped to obtain sub-simulation tasks, and the sub-simulation tasks include simulation tasks of two consecutive grating layers. Real-time matrix aggregation is performed within a thread or a computing node. After each sub-simulation task is completed, each sub-structure matrix is aggregated to obtain a total structure matrix.
[0046] In a possible implementation, the substructure matrix is a sparse matrix or a dense matrix. Sparse matrix storage is used to reduce memory overhead and computational complexity, or dense matrix storage is used to improve computational performance.
[0047] In a possible implementation, when a matrix has symmetry, the symmetry is used to reduce the storage and calculation amount of the matrix.
[0048] By making the substructure matrix a sparse matrix or a dense matrix, or utilizing symmetry to store the matrix, different forms of structure matrices can be flexibly replaced to adapt to specific requirements of the algorithm and eliminate redundant calculations.
[0049] S17: After all substructure matrices are obtained, the substructure matrices are aggregated to obtain a total structure matrix.
[0050] In a possible implementation, each substructure matrix is aggregated in reverse order of layers to obtain a total structure matrix.
[0051] In the application, after each thread or computing node completes the calculation, the substructure matrix of each sub-simulation task is obtained, and each substructure matrix is aggregated in reverse order from the bottom layer to the top layer to generate the total structure matrix.
[0052] In a possible implementation, the aggregation methods include block aggregation, hierarchical aggregation, and algorithmic aggregation. During the aggregation process, the appropriate aggregation method can be selected according to the actual situation to aggregate the structure matrix. Among them, when reducing the computational complexity of a single aggregation, the block aggregation method is selected to divide the matrix into small blocks and aggregate them step by step. When the simulation task has an obvious hierarchical structure, hierarchical aggregation is selected to aggregate the matrix locally first and then globally. When the aggregation process needs to be accelerated, algorithmic aggregation is selected to optimize the aggregation, such as an efficient matrix operation library or a divide-and-conquer algorithm.
[0053] Each substructure matrix can directly participate in the aggregation of the final structure matrix, and the aggregation is performed in reverse order of the layers, thereby improving the overall computing efficiency and system stability.
[0054] The embodiment obtains a simulation task of a grating structure; divides the simulation task of the grating structure according to the number of layers of the grating structure to obtain at least two sub-simulation tasks, wherein the sub-simulation tasks include simulation tasks of at least two grating layers; in the process of parallel calculation of each sub-simulation task, for each sub-simulation task, calculates the matrix of the current grating layer; aggregates the matrix of the current grating layer with the historical intermediate structure matrix to obtain a new intermediate structure matrix, wherein the historical intermediate structure matrix is the result of matrix aggregation of historical grating layers, and the historical grating layers include grating layers before the current grating layer; after taking the next grating layer as the current grating layer according to the layer order, returns to the execution step of calculating the matrix of the current grating layer; when the sub-simulation task is completed, obtains the sub-structure matrix; after obtaining all the sub-structure matrices, aggregates the sub-structure matrices to obtain the total structure matrix, combines parallel calculation with serial calculation, and implements matrix calculation and real-time aggregation of each layer by adding a local serial method under the framework of global parallelism, which can reduce memory overhead through real-time aggregation, while making full use of cluster computing power and accelerated computing, achieving a balance between computing efficiency and resource utilization, and optimizing the computing power and memory data allocation of the cluster.
[0055] Please refer to the following table, which shows the calculation time and memory usage of various solutions when the cluster is configured with 5 128-core nodes and each node has 512G memory:
[0056] It is understandable that the use of parallel computing strategies and parallel computing of each sub-simulation task can shorten the time required for simulation, give full play to the performance of the cluster in large-scale computing tasks, improve the overall computing efficiency of grating simulation, and increase the overall computing speed. That is, in simulation tasks with large matrix operations, cluster parallel computing can optimize the operating efficiency. At the same time, introducing local serial computing in computing sub-simulation tasks can solve the problem of low efficiency of parallel computing under the serial computing framework, further improve the overall computing efficiency of grating simulation, and increase the overall computing speed.
[0057] And in the calculation sub-simulation task, local serial calculation and layer-by-layer aggregation are introduced. After each single-layer matrix is calculated, it is aggregated with the historical intermediate structure matrix. There is no need to store the matrices of all layers. An independent intermediate structure matrix is maintained, which effectively reduces memory usage and effectively solves the problems of excessive memory pressure or memory overflow caused by storing matrices of all layers and the problem of system instability caused by insufficient memory. It can also reduce the resource overhead of matrix transmission and synchronization operations under parallel computing.
[0058] This makes the simulation method suitable for large-scale matrix computing and aggregation in the fields of physical simulation, material design, etc.
[0059] In one embodiment, the grating structure is a dual-periodic grating structure. Through parallel computing and local serial computing, the stability and task scalability of the computer cluster are improved, while reducing memory overhead, providing an efficient and reliable solution for the simulation of complex dual-periodic grating structures, especially grating structures with complex structures and many layers.
[0060] It should be noted that the method of the above embodiment can be applied to the simulation of other periodic grating structures, such as plane gratings, diffraction gratings and photonic crystals.
[0061] It should be understood that the order of execution of the steps in the above embodiments does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. In addition, the data collection in the above embodiments is compliant, and its use or implementation does not involve any infringement on the public interest.
[0062] Corresponding to the method described in the above embodiment, for the convenience of explanation, only the part related to the embodiment of the present application is shown.
[0063] In one embodiment, Figure 3 Schematic diagram of the structure of a grating simulation device provided by an embodiment of the present application. Figure 3 As shown, the device comprises: An acquisition module 10 is used to acquire a simulation task of a grating structure; A simulation module 11 is used to divide the simulation task of the grating structure according to the number of layers of the grating structure to obtain at least two sub-simulation tasks, where the sub-simulation task includes simulation tasks of at least two grating layers; It is also used for calculating the matrix of the current grating layer for each sub-simulation task in parallel; aggregating the matrix of the current grating layer with the historical intermediate structure matrix to obtain a new intermediate structure matrix, where the historical intermediate structure matrix is the result of the matrix aggregation of the historical grating layer, and the historical grating layer includes the grating layer before the current grating layer; after taking the next grating layer as the current grating layer according to the layer order, returning to the execution step: calculating the matrix of the current grating layer; when the sub-simulation task is completed, obtaining the sub-structure matrix; It is also used to aggregate the substructure matrices to obtain the total structure matrix after all substructure matrices are obtained.
[0064] In one embodiment, the simulation module is specifically used to aggregate each substructure matrix in reverse order of layers to obtain a total structure matrix.
[0065] Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 4 As shown, the electronic device 2 of this embodiment includes: at least one processor 20 ( Figure 4 Only one is shown in the figure), a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, wherein the processor 20 implements the steps of any of the above-mentioned method embodiments when executing the computer program 22.
[0066] The electronic device 2 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 2 may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will appreciate that Figure 4 It is only an example of the electronic device 2 and does not constitute a limitation on the electronic device 2. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0067] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0068] In some embodiments, the memory 21 may be an internal storage unit of the electronic device 2, such as a hard disk or memory of the electronic device 2. In other embodiments, the memory 21 may also be an external storage device of the electronic device 2, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 2. Further, the memory 21 may also include both an internal storage unit and an external storage device of the electronic device 2. The memory 21 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 21 may also be used to temporarily store data that has been output or is to be output.
[0069] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0070] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0071] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0072] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0073] If the integrated unit is implemented in the form of 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 present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some cases, the computer-readable medium cannot be an electric carrier signal and a telecommunication signal.
[0074] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0075] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0076] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0077] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0078] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A grating simulation method, characterized in that: include: Get the simulation task of grating structure; Dividing the simulation task of the grating structure according to the number of layers of the grating structure to obtain at least two sub-simulation tasks, wherein the sub-simulation task includes simulation tasks of at least two grating layers; In the process of parallel calculation of each of the sub-simulation tasks, for each of the sub-simulation tasks, a matrix of the current grating layer is calculated; Aggregating the matrix of the current grating layer with the historical intermediate structure matrix to obtain a new intermediate structure matrix, wherein the historical intermediate structure matrix is the result of aggregating the matrices of the historical grating layers, and the historical grating layers include the grating layers before the current grating layer; After taking the next grating layer as the current grating layer according to the layer order, returning to the step of: calculating the matrix of the current grating layer; When the sub-simulation task is completed, a sub-structure matrix is obtained; After all the substructure matrices are obtained, the substructure matrices are aggregated to obtain a total structure matrix.
2. The method according to claim 1, characterized in that The sub-simulation task includes simulation tasks of at least two consecutive grating layers.
3. The method according to claim 1, characterized in that The step of aggregating the substructure matrices to obtain a total structure matrix includes: The substructure matrices are aggregated in reverse order of layers to obtain the total structure matrix.
4. The method according to claim 3, characterized in that Aggregation methods include block aggregation, hierarchical aggregation and algorithmic aggregation.
5. The method according to any one of claims 1 to 4, characterized in that: The grating structure is a double-period grating structure.
6. The method according to claim 5, characterized in that The substructure matrix is a sparse matrix or a dense matrix.
7. A grating simulation device, characterized in that: include: An acquisition module, used for acquiring a simulation task of a grating structure; A simulation module, used for dividing the simulation task of the grating structure according to the number of layers of the grating structure to obtain at least two sub-simulation tasks, wherein the sub-simulation task includes simulation tasks of at least two grating layers; It is also used for calculating the matrix of the current grating layer for each of the sub-simulation tasks in parallel calculation; aggregating the matrix of the current grating layer with the historical intermediate structure matrix to obtain a new intermediate structure matrix, wherein the historical intermediate structure matrix is the result of the matrix aggregation of the historical grating layer, and the historical grating layer includes the grating layer before the current grating layer; After taking the next grating layer as the current grating layer according to the layer order, returning to the execution step: calculating the matrix of the current grating layer; when the sub-simulation task is completed, obtaining the sub-structure matrix; It is also used to aggregate the substructure matrices after obtaining all the substructure matrices to obtain the total structure matrix.
8. The device according to claim 7, characterized in that: The simulation module is specifically used to aggregate each of the substructure matrices in reverse order of layers to obtain the total structure matrix.
9. An electronic 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 computer program, the method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Simulating and routing method of communication between component models and concurrent transaction level simulation system
CN102761473A
Accelerated simulation method of gradient period polarization holographic grating and related device
CN119493270A
Functional component compensation reconfiguration system and method
US8711161B1
Parallel computing operating system and META-operating system
WO2007040510A2