A task execution method and device based on a differential equation solver
Patent Information
- Application Number
- CN202311518734.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-11-13
AI Technical Summary
[0002]目前,微分方程在科学和工程领域有广泛的应用,而当前微分方程的求解都是在电子处理器上执行的,其中,由于求解过程越复杂的微分方程所需占用电子处理器件的计算资源越多,所以,通过电子处理器件求解微分方程的方法在计算效率,计算能耗等方面受到越来越严峻的挑战
[0046]In the task execution method based on a differential equation solver provided in this specification, an electrical processor receives a computation request input by the user. Based on the computation request, it determines the parameters of the differential equation to be solved, configured by the user. Based on these parameters, it determines the iteration matrix and iteration vector of the differential equation, and randomly generates an initial solution. Through multiple iterations, it obtains the target solution of the differential equation, and executes the task based on the target solution. Specifically, for each iteration, it determines the input parameters for that iteration. Based on the input parameters, the iteration matrix, and the iteration vector, it generates a modulation voltage that is input to the optical processor. This voltage is then transmitted through optical... The optical processor, based on the modulation voltage, obtains the optical input signal and processes it through the on-chip optical structures contained in the optical processor to obtain the optical output signal. Based on the optical output signal, the intermediate solution of the differential equation to be solved in the current iteration is determined, and the intermediate solution is used as the input parameter in the next iteration. The optical output signal is used to characterize the matrix calculation result between the input parameter and the iteration matrix and iteration vector. The input parameter in this iteration is obtained by iterating the initial solution to the previous iteration. When it is determined that the intermediate solution meets the preset convergence condition, the iteration is terminated, and the intermediate solution is used as the target solution of the differential equation to be solved.
Smart Images

Figure CN117609674B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of optical computing technology, and in particular to a task execution method and apparatus based on a differential equation solver. Background Technology
[0002] Currently, differential equations have wide applications in science and engineering. However, the solution of differential equations is currently performed on electronic processors. As the solution process of a differential equation becomes more complex, it requires more computing resources from electronic processing devices. Therefore, the method of solving differential equations using electronic processing devices faces increasingly severe challenges in terms of computational efficiency and energy consumption.
[0003] Therefore, how to improve the efficiency of solving differential equations using electronic processors is an urgent problem to be solved. Summary of the Invention
[0004] This specification provides a task execution method and apparatus based on a differential equation solver, in order to partially solve the aforementioned problems existing in the prior art.
[0005] The following technical solution is adopted in this specification:
[0006] This specification provides a task execution method based on a differential equation solver. The method is applied to a differential equation solver, which includes an electrical processor and an optical processor.
[0007] The electrical processor receives a computation request input by the user. Based on the computation request, it determines the parameters of the differential equation to be solved, configured by the user. Based on the parameters, it determines the iteration matrix and iteration vector of the differential equation to be solved, and randomly generates an initial solution for the differential equation to be solved. Through multiple iterations, it obtains the target solution of the differential equation to be solved, and performs task execution based on the target solution.
[0008] For each iteration, the input parameters to be input in that iteration are determined. Based on the input parameters, the iteration matrix, and the iteration vector, a modulation voltage is generated and input to the optical processor. The optical processor obtains an optical input signal based on the modulation voltage. The optical input signal is then processed by the on-chip optical structures included in the optical processor to obtain an optical output signal. Based on the optical output signal, an intermediate solution of the differential equation to be solved in that iteration is determined, and the intermediate solution is used as the input parameters to be input in the next iteration. The optical output signal is used to characterize the matrix calculation result between the input parameters, the iteration matrix, and the iteration vector. The input parameters to be input in this iteration are obtained by iterating the initial solution to the previous iteration.
[0009] Once it is determined that the intermediate solution satisfies the preset convergence condition, the iteration is terminated, and the intermediate solution in this iteration is taken as the target solution of the differential equation to be solved.
[0010] Optionally, the optical processor includes: an optical signal generation module, an optical signal processing module, and an optical signal detection module;
[0011] The optical processor obtains an optical input signal based on the modulation voltage, and processes the optical input signal using the on-chip optical structures included in the optical processor to obtain an optical output signal. Based on the optical output signal, the intermediate solution of the differential equation to be solved in this iteration is determined, specifically including:
[0012] The optical input signal is obtained by the optical signal generation module based on the modulation voltage.
[0013] The optical input signal is processed by the on-chip optical structures included in the optical signal processing module to obtain the optical output signal;
[0014] The optical signal detection module interferes with the optical output signal to perform phase differential coherence detection, thereby obtaining the amplitude and phase of the optical output signal. Based on the amplitude and phase, the intermediate solution of the differential equation to be solved corresponding to the optical output signal in this iteration is determined.
[0015] Optionally, the optical input signal is processed by the on-chip optical structures included in the optical signal processing module to obtain an optical output signal, specifically including:
[0016] From the on-chip optical structures included in the optical signal processing module, at least one on-chip optical structure is determined as the target on-chip optical structure. The on-chip optical structures include at least one of the following: on-chip 4f system, reverse-engineered optical structure, optical mode coupling interference structure, and Y-type waveguide network structure.
[0017] For each target on-chip optical structure, the optical input signal is processed through the on-chip optical structure to obtain the optical output signal output by the on-chip optical structure.
[0018] The optical signal detection module interferes with the optical output signal to perform phase differential coherence detection, obtaining the amplitude and phase of the optical output signal. Based on the amplitude and phase, the intermediate solution of the differential equation to be solved corresponding to the optical output signal in this iteration is determined, specifically including:
[0019] The optical signal detection module interferes with the optical output signal output by the on-chip optical structure to perform phase differential coherent detection on the optical output signal output by the on-chip optical structure, thereby obtaining the amplitude and phase of the optical output signal output by the on-chip optical structure. Based on the amplitude and phase, the candidate intermediate solution of the differential equation to be solved corresponding to the optical output signal output by the on-chip optical structure in this iteration is determined.
[0020] Based on each candidate intermediate solution, the intermediate solution of the differential equation to be solved in this round of iteration is determined.
[0021] Optionally, the optical input signal is processed through the on-chip optical structure to obtain the optical output signal output by the on-chip optical structure, specifically including:
[0022] If the on-chip optical structure is an on-chip 4f system, then according to the transfer function corresponding to the differential equation to be solved, the control coefficients of the modulation unit contained in the on-chip optical structure are configured to obtain the configured modulation unit.
[0023] By inputting the optical input signal into the first microlens contained in the on-chip optical structure, the Fourier transform optical signal corresponding to the optical input signal is obtained, and the phase of the Fourier transform optical signal corresponding to the optical input signal is modulated by the modulation unit to obtain the modulated optical signal.
[0024] The optical signal obtained by the inverse Fourier transform of the modulated optical signal is obtained through the second microlens contained in the optical structure on the chip, and is used as the optical output signal.
[0025] Optionally, the optical input signal is processed through the on-chip optical structure to obtain the optical output signal output by the on-chip optical structure, specifically including:
[0026] If the on-chip optical structure is a reverse-designed optical structure, then by inputting the optical input signal into the optical diffraction unit contained in the on-chip optical structure, the optical output signal is obtained through the optical diffraction unit.
[0027] Optionally, the optical input signal is processed through the on-chip optical structure to obtain the optical output signal output by the on-chip optical structure, specifically including:
[0028] If the on-chip optical structure is an optical mode coupling interference structure, then by inputting the optical input signal into the optical mode coupling unit contained in the on-chip optical structure, an optical output signal can be obtained through the optical mode coupling unit.
[0029] Optionally, the optical input signal is processed through the on-chip optical structure to obtain the optical output signal output by the on-chip optical structure, specifically including:
[0030] If the on-chip optical structure is a Y-type waveguide network structure, then the modulation parameters of the Y-type waveguide stacked structure included in the Y-type waveguide network structure are determined according to the type of the differential equation to be solved.
[0031] According to the modulation parameters, the weighted modulation units of the upper arm length and lower arm length of each straight waveguide in the Y-type waveguide stacking structure are modulated to obtain the modulated Y-type waveguide stacking structure.
[0032] By inputting the optical input signal into the modulated Y-shaped waveguide stacked structure, an optical output signal is obtained through the modulated Y-shaped waveguide stacked structure.
[0033] Optionally, based on the parameters, the iteration matrix and iteration vector of the differential equation to be solved are determined, and an initial solution of the differential equation to be solved is randomly generated. Through multiple iterations, the target solution of the differential equation to be solved is obtained, specifically including:
[0034] Based on the parameters, determine whether the differential equation to be solved is a first-order differential equation or a second-order differential equation.
[0035] If not, the user-configured differential equation to be solved is decomposed into basic differential equations, which include: first-order differential equations and / or second-order differential equations.
[0036] For each fundamental differential equation, the iteration matrix and iteration vector corresponding to the fundamental differential equation are determined based on the parameters of the fundamental differential equation.
[0037] An initial solution to the fundamental differential equation is randomly generated, and the target solution is obtained through multiple iterations.
[0038] Based on the objective solutions of each fundamental differential equation, the objective solution of the differential equation to be solved is obtained.
[0039] This specification provides a task execution device based on a differential equation solver, the device comprising:
[0040] The first processing module is configured to receive a calculation request input by a user via an electrical processor, determine the parameters of the differential equation to be solved configured by the user according to the calculation request, determine the iteration matrix and iteration vector of the differential equation to be solved according to the parameters, randomly generate an initial solution of the differential equation to be solved, obtain the target solution of the differential equation to be solved through multiple iterations, and perform task execution according to the target solution; wherein;
[0041] The second processing module is used to determine the input parameters for each iteration, generate a modulation voltage input to the optical processor based on the input parameters, the iteration matrix, and the iteration vector, obtain an optical input signal based on the modulation voltage through the optical processor, process the optical input signal through the on-chip optical structures included in the optical processor to obtain an optical output signal, determine the intermediate solution of the differential equation to be solved in the iteration based on the optical output signal, and use the intermediate solution as the input parameters for the next iteration. The optical output signal is used to characterize the matrix calculation result between the input parameters, the iteration matrix, and the iteration vector. The input parameters for the current iteration are obtained by iterating the initial solution to the previous iteration.
[0042] The determination module is used to terminate the iteration when it is determined that the intermediate solution satisfies the preset convergence condition, and to take the intermediate solution in this round of iteration as the target solution of the differential equation to be solved.
[0043] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described task execution method based on a differential equation solver.
[0044] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described task execution method based on a differential equation solver.
[0045] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:
[0046] In the task execution method based on a differential equation solver provided in this specification, an electrical processor receives a computation request input by the user. Based on the computation request, it determines the parameters of the differential equation to be solved, configured by the user. Based on these parameters, it determines the iteration matrix and iteration vector of the differential equation, and randomly generates an initial solution. Through multiple iterations, it obtains the target solution of the differential equation, and executes the task based on the target solution. Specifically, for each iteration, it determines the input parameters for that iteration. Based on the input parameters, the iteration matrix, and the iteration vector, it generates a modulation voltage that is input to the optical processor. This voltage is then transmitted through optical... The optical processor, based on the modulation voltage, obtains the optical input signal and processes it through the on-chip optical structures contained in the optical processor to obtain the optical output signal. Based on the optical output signal, the intermediate solution of the differential equation to be solved in the current iteration is determined, and the intermediate solution is used as the input parameter in the next iteration. The optical output signal is used to characterize the matrix calculation result between the input parameter and the iteration matrix and iteration vector. The input parameter in this iteration is obtained by iterating the initial solution to the previous iteration. When it is determined that the intermediate solution meets the preset convergence condition, the iteration is terminated, and the intermediate solution is used as the target solution of the differential equation to be solved.
[0047] As can be seen from the above method, the server can solve differential equations by using a differential equation solver that includes both optical and electrical processors. In this case, by having the electrical and optical processors work together to determine the target solution of the differential equation, the high bandwidth, high parallelism, low power consumption, and low latency characteristics of each photonic device can be utilized to improve the efficiency of the electrical processor in solving various complex differential equations. Attached Figure Description
[0048] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:
[0049] Figure 1 This is a flowchart illustrating a task execution method based on a differential equation solver provided in this specification.
[0050] Figure 2 This is a schematic diagram of the differential equation solver provided in this specification;
[0051] Figure 3 This is a schematic diagram of the on-chip 4f system provided in this specification;
[0052] Figure 4 This is a schematic diagram of the reverse-engineered optical structure provided in this specification.
[0053] Figure 5This is a schematic diagram of the optical mode coupling interference structure provided in this specification;
[0054] Figure 6 This is a schematic diagram of the Y-type waveguide network structure provided in this specification;
[0055] Figure 7 This is a schematic diagram of an animation generation device provided in this specification;
[0056] Figure 8 This specification provides a corresponding Figure 1 A schematic diagram of an electronic device. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0058] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0059] Figure 1 This document provides a flowchart illustrating a task execution method based on a differential equation solver, comprising the following steps:
[0060] S101: The electrical processor receives a calculation request input by the user, determines the parameters of the differential equation to be solved configured by the user according to the calculation request, determines the iteration matrix and iteration vector of the differential equation to be solved according to the parameters, randomly generates an initial solution of the differential equation to be solved, obtains the target solution of the differential equation to be solved through multiple iterations, and performs task execution according to the target solution; wherein.
[0061] In this specification, a differential equation solver can be pre-deployed in the business platform. During the execution of business requests in response to user input, it calculates the target solution of the user-configured differential equation based on the user's input computation request. The target solution can then be displayed to the user through their client, allowing the user to execute tasks based on the target solution. The user-configured differential equation can be of any type, such as a first-order homogeneous differential equation, a first-order non-homogeneous differential equation, a second-order differential equation, or a multi-order differential equation. The structure of the differential equation solver is as follows: Figure 2 As shown.
[0062] Figure 2 This is a schematic diagram of the differential equation solver provided in this specification.
[0063] Combination Figure 2 As can be seen, the aforementioned differential equation solver consists of two parts: an electrical processor and an optical processor. During task execution, the business platform can receive user-input computation requests via the differential equation solver deployed within the platform. Based on the received computation requests, it can determine the parameters of the user-configured differential equation to be solved. Then, based on the determined parameters, it can determine the iteration matrix and iteration vector of the differential equation, randomly generate an initial solution, and through multiple iterations, obtain the target solution. Finally, it executes the task based on the target solution.
[0064] The iteration matrix and iteration vector of the differential equation to be solved are obtained by discretizing the solution domain of the differential equation configured by the user. See the following formula for details:
[0065] h t+1 =(I-αA + A)h t +αA + b
[0066] In the above formula, h t and h t+1 These represent the intermediate solutions of the differential equation to be solved at the t-th and t+1-th iterations, respectively. The iteration matrix A and iteration vector b are obtained by discretizing the solution domain determined by the parameters of the differential equation to be solved according to the user configuration. Matrix A + Let represent the conjugate transpose of the iteration matrix A. α is a scaling factor used to control the convergence speed of the iteration, thereby ensuring that the iteration converges normally.
[0067] As can be seen from the above formula, the electrical processor of the differential equation solver can, for the user-configured differential equation to be solved, use the randomly generated initial solution of the differential equation to be solved as the input of the first iteration in the multi-round iterative process of determining the target solution of the differential equation. For each iteration, the electrical processor can convert the parameters that need to be differentiated in that iteration into the form of optical signals and input them into the optical processor of the differential equation solver. By controlling the optical processor of the differential equation solver to execute the specific differentiation operation in that iteration, the calculation result is obtained. Thus, the high bandwidth, high parallelism, low power consumption, and low latency of the optical processor can improve the computational efficiency of the differential equation to be solved and reduce the computer memory and computing resources required to solve the differential equation.
[0068] In the above context, the business platform can execute tasks based on the target solution, for example, by displaying the target solution to the user through the device the user is using.
[0069] In this specification, the execution subject used to implement the task execution method based on the differential equation solver can refer to a designated device set up in the business platform, such as a server, or a terminal device such as a laptop, desktop computer, or mobile phone. The following description uses the server as the execution subject as an example to illustrate the task execution based on the differential equation solver provided in this specification.
[0070] S102: For each iteration, determine the input parameters to be input in that iteration. Based on the input parameters, the iteration matrix, and the iteration vector, generate a modulation voltage input to the optical processor. Through the optical processor, based on the modulation voltage, obtain an optical input signal. Process the optical input signal through the on-chip optical structures included in the optical processor to obtain an optical output signal. Based on the optical output signal, determine the intermediate solution of the differential equation to be solved in that iteration and use the intermediate solution as the input parameters to be input in the next iteration. The optical output signal is used to characterize the matrix calculation result between the input parameters, the iteration matrix, and the iteration vector. The input parameters to be input in this iteration are obtained by iterating the initial solution to the previous iteration.
[0071] S103: When it is determined that the intermediate solution satisfies the preset convergence condition, the iteration is terminated, and the intermediate solution in this round of iteration is taken as the target solution of the differential equation to be solved.
[0072] For each iteration, the server can determine the input parameters for that iteration using the electrical processor contained in the differential equation solver, and generate the modulation voltage input to the optical processor based on the determined input parameters, iteration matrix, and iteration vector.
[0073] Specifically, the server can use the electrical processor contained in the differential equation solver to determine the transfer matrix of the Mach-Zehnder interferometer corresponding to the input parameters, iteration matrix, and iteration vector, based on the determined input parameters, iteration matrix, and iteration vector. Then, based on the determined transfer matrix of the Mach-Zehnder interferometer, it can determine the relationship between the modulation weight and the phase of the phase shifter attachment. Finally, based on the pre-determined mapping relationship between the phase shifter attachment phase and the modulation voltage, it can determine the modulation voltage input to the optical processor.
[0074] Furthermore, the server can obtain an optical input signal based on the modulation voltage through an optical processor, and process the optical input signal through the on-chip optical structures contained in the optical processor to obtain an optical output signal. Based on the optical output signal, the intermediate solution of the differential equation to be solved in this iteration is determined, and the intermediate solution is used as the input parameter to be solved in the next iteration. The aforementioned optical output signal is used to characterize the matrix calculation result between the input parameter and the iteration matrix and iteration vector. The input parameter to be solved in this iteration is obtained by iterating the initial solution to the previous iteration. When it is determined that the intermediate solution satisfies the preset convergence condition, the iteration is terminated, and the intermediate solution in this iteration is used as the target solution of the differential equation to be solved.
[0075] Specifically, the aforementioned optical processor includes: an optical signal generation module, an optical signal processing module, and an optical signal detection module. The server can obtain an optical input signal based on a modulation voltage through the optical signal generation module, process the optical input signal through the on-chip optical structures included in the optical signal processing module to obtain an optical output signal, and interfere with the optical output signal through the optical signal detection module to perform phase differential coherent detection on the optical output signal to obtain the amplitude and phase of the optical output signal. Based on the amplitude and phase, the intermediate solution of the differential equation to be solved corresponding to the optical output signal in this iteration is determined.
[0076] It should be noted that, since the electrical processing module can determine the modulation voltage corresponding to the optical signal that needs to be input into the optical processor in each iteration based on the differential equation to be solved configured by the user, the optical processor only needs to perform differential operations. Therefore, the on-chip optical devices included in the optical signal processor can be composed of passive optical devices.
[0077] The aforementioned on-chip optical structures may include at least one of the following: on-chip 4f system, reverse-engineered optical structure, optical mode coupling interference structure, and Y-type waveguide network structure.
[0078] Based on this, the server can use the optical signal detection module to interfere with the optical output signal output by the on-chip optical structure to perform phase differential coherent detection on the optical output signal output by the on-chip optical structure, thereby obtaining the amplitude and phase of the optical output signal output by the on-chip optical structure. Based on the amplitude and phase, the server can determine the candidate intermediate solutions of the differential equation to be solved in the current iteration corresponding to the optical output signal output by the on-chip optical structure. Based on each candidate intermediate solution, the server can determine the intermediate solution of the differential equation to be solved in the current iteration.
[0079] Specifically, if the aforementioned on-chip optical structure is an on-chip 4f system, the modulation coefficients of the modulation unit contained in the on-chip optical structure can be configured according to the transfer function corresponding to the differential equation to be solved, resulting in a configured modulation unit. This unit inputs an optical input signal into a first microlens contained in the on-chip optical structure to obtain a Fourier transform optical signal corresponding to the input signal. The modulation unit then modulates the phase of this Fourier transform optical signal to obtain a modulated optical signal. Finally, through a second microlens contained in the on-chip optical structure, the unit obtains an inverse Fourier transform optical signal corresponding to the modulated signal, which serves as the optical output signal. Specifically, as follows... Figure 3 As shown.
[0080] Figure 3 This is a schematic diagram of the on-chip 4f system provided in this specification.
[0081] Combination Figure 3 As can be seen, the on-chip 4f system consists of a first microlens, a modulation unit, and a second microlens. The server can receive the optical input signal transmitted through the waveguide to the input end face of the first microlens via the on-chip 4f system. Its distribution can be represented by E(x), where x is the spatial coordinate. The function of the first microlens is equivalent to a Fourier transform. At the output end face of the first microlens, the spatial light signal has been transformed into its frequency signal under the action of the first microlens, and its distribution can be represented as follows: x ′ For the spectral coordinates, according to the Fourier transform principle, the transfer function of the first-order differential operation on its spectrum must satisfy H(x) ′ )=ix ′ Therefore, each signal input to the modulation unit via the first microlens can be phase-modulated to obtain a modulated optical signal, the magnitude of which satisfies the expression form of the transfer function. The modulated optical signal then undergoes an inverse Fourier transform via the second microlens to transform the spectral signal of the modulated optical signal back into real space. The optical output signal at this point is the first-order differential form of the optical input signal.
[0082] Furthermore, if the on-chip optical structure is a reverse-designed optical structure, the server can obtain an optical output signal by inputting an optical input signal into the optical diffraction unit contained in the on-chip optical structure and then processing the signal through the diffraction unit. Specifically, as follows... Figure 4 As shown.
[0083] Figure 4 This is a schematic diagram of the reverse-engineered optical structure provided in this specification.
[0084] Combination Figure 4As can be seen, the reverse-engineered optical structure includes: optical diffraction units and parameter optimization modules. The server can input optical input signals into the optical diffraction units contained in the on-chip optical structure and obtain optical output signals through the optical diffraction units. Before that, the server needs to adjust the refractive index distribution of the optical diffraction units in order to apply the optical diffraction units to practical application scenarios.
[0085] Specifically, the server can randomly initialize the refractive index distribution of the optical diffraction unit so that the sample optical input signal, after diffraction by the diffraction unit, forms a sample optical output signal. The sample optical output signal is then compared with a preset target signal to generate an error signal. This error signal, after passing through a parameter optimization module, yields an optimized gradient of the refractive index in the optical diffraction unit. The refractive index distribution of the optical diffraction unit can then be adjusted based on this optimized gradient until the deviation between the sample optical output signal and the target signal is less than a preset deviation threshold, at which point the iteration stops.
[0086] The parameter optimization methods used in the above parameter optimization module include at least one of the following: particle swarm optimization algorithm, objective priority optimization algorithm, forward mode difference method, and adjoint method.
[0087] Furthermore, if the on-chip optical structure is an optical mode coupling interference structure, the server can input an optical input signal into the optical mode coupling unit contained in the on-chip optical structure to obtain an optical output signal through the optical mode coupling unit, as specifically... Figure 5 As shown.
[0088] Figure 5 This is a schematic diagram of the optical mode coupling interference structure provided in this specification.
[0089] Combination Figure 5 As can be seen, the optical mode coupling interference structure includes an optical mode coupling unit, and the server can describe the optical field distribution of the entire system through the spatial coupling mode equation. Furthermore, for a system with one port and one resonant mode, the spatial coupling mode equation corresponds to the transfer function form of the spatial angular spectrum as shown in the following formula.
[0090]
[0091] In the above formula, k x Let θ0 be the spatial angular spectrum, β0 be the incident angle, β0 be the propagation constant of the resonance mode, and α be the propagation constant of the resonance mode. l Let α0 represent the leakage loss and intrinsic absorption loss of the resonant mode, and φ be the phase change of the output optical field relative to the input optical field without considering resonant coupling. When the leakage loss and intrinsic absorption loss are consistent, the above transfer function can be approximated as:
[0092]
[0093] Since the above formula is proportional to the transfer function of the first-order differentiator, the first-order differential operation of the optical field can be realized through the above formula.
[0094] Furthermore, if the on-chip optical structure is a Y-shaped waveguide network structure, the modulation parameters of the Y-shaped waveguide stack structure included in the Y-shaped waveguide network structure can be determined according to the type of the differential equation to be solved (here, the type can be a first-order differential equation or a second-order differential equation). Based on the modulation parameters, the weighted modulation units of the upper and lower arm lengths of each straight waveguide in the Y-shaped waveguide stack structure are modulated to obtain the modulated Y-shaped waveguide stack structure. By inputting the optical input signal into the modulated Y-shaped waveguide stack structure, an optical output signal is obtained through the modulated Y-shaped waveguide stack structure, specifically as follows... Figure 6 As shown.
[0095] Figure 6 This is a schematic diagram of the Y-type waveguide network structure provided in this specification.
[0096] Combination Figure 6 As can be seen, the above-mentioned Y-type waveguide network structure includes: a Y-type waveguide stacking structure. The server can couple a portion of the energy from the Y-type waveguide through the straight waveguide structure designed in the upper and lower arms of the Y-type waveguide. The magnitude of energy coupling is proportional to the length of the straight waveguide. Thus, the expected weight modulation can be achieved by adjusting different straight waveguide lengths, resulting in the modulated Y-type waveguide stacking structure.
[0097] Furthermore, convolution operations can be performed using a Y-shaped waveguide stacked structure. For example, assuming the weighting coefficients of the upper and lower walls of the Y-shaped waveguides in the modulated Y-shaped waveguide stacked structure are a1 and a2 respectively, and assuming that all Y-shaped waveguide modulation coefficients are consistent, then in the case of a single-layer Y-shaped waveguide, the relationship between the output signal and the input signal can be expressed by a linear matrix, i.e., S out =AS in Matrix A is represented as follows:
[0098]
[0099] The matrix above shows that each node in the output is related to its two adjacent nodes in the input, meaning the receptive field size is 2. By stacking Y-shaped waveguides in depth, convolution operations with arbitrary receptive field sizes can be achieved.
[0100] Furthermore, for the first and second order differential matrices with a receptive field size of 3, the server can perform calculations using a two-layer Y-shaped waveguide array structure. For example, suppose matrices A and B represent the linear matrices of the first and second layers implemented by the Y-shaped waveguide array, respectively, where the modulation parameters are a... i ,b i (i∈1,2). The magnitude of the modulation parameters can be obtained from the expression of the differential matrix. Specifically, the modulation parameters corresponding to the first-order differential matrix are as follows:
[0101] a1=α; a2=α; b1=-α; b2=α
[0102] The modulation parameters corresponding to the second-order differential matrix are as follows:
[0103] a1=α; a2=-α; b1=α; b2=-α
[0104] Where α is an arbitrary constant. Using these modulation parameters, the length of the coupled straight waveguide can be designed to control the corresponding weighting coefficients.
[0105] Furthermore, the detection method of the optical signal detection part in the optical processor described above can be to interfere the optical output signal and the preset reference optical signal through a Mach-Zehnder interferometer, and use a detection process of phase differential coherence technology to detect the amplitude and phase of each optical output signal.
[0106] As can be seen from the above, since all the on-chip optical structures mentioned above are passive optical devices (that is, during the processing of optical input signals, no photoelectric energy conversion occurs inside the optical signal processing module, and only the optical input signals transmitted from the optical signal generation module need to be processed), the server can process larger-scale data through the optical processor and can complete the processing of optical input signals quickly in a higher degree of parallelism.
[0107] Furthermore, since the optical signal processing module in the optical processor is composed of various passive optical devices, the packaging difficulty of the optical signal processing module is reduced, thereby enabling the fabrication of larger-sized optical signal processing modules. Larger-sized optical signal processing modules can effectively improve the parallelism of optical signal processing, thereby improving the processing efficiency for optical input signals.
[0108] In practical applications, the differential equations configured by the user may be multi-order differential equations. As can be seen from the above, the optical processor composed of passive optical devices can only solve first-order or second-order differential equations. Therefore, the server can also determine whether the differential equation to be solved is a first-order or second-order differential equation based on the parameters of the user-configured differential equation. If not, the user-configured differential equation can be decomposed into basic differential equations. Then, for each basic differential equation, the iteration matrix and iteration vector corresponding to the basic differential equation can be determined according to the parameters of the basic differential equation. The initial solution of the basic differential equation can be randomly generated. Through multiple iterations, the target solution of the basic differential equation can be obtained. Based on the target solutions of the basic differential equations, the target solution of the differential equation to be solved can be obtained.
[0109] The aforementioned fundamental differential equations can be first-order and / or second-order differential equations.
[0110] To facilitate understanding, the following example uses a second-order differential equation and a first-order fundamental differential equation to illustrate the process of determining the differential equation to be solved using the above method.
[0111] Specifically, the form of the above second-order differential equation can be found in the following formula.
[0112] c1(x,y)u xx +c2(x,y)u xy +c3(x,y)u yy +c4(x,y)u x +c5(x,y)u y +c6(x,y)u
[0113] =f(x,y)
[0114] Among them, c i (i = 1, 2… 6) represent the coefficients of the differential equation to be solved, f(x, y) represents the distribution of the source of the differential equation, and u(x, y) represents the solution to the equation. The x and y in the subscripts of u indicate the partial derivatives with respect to the function u. Discretizing the solution domain yields the iteration matrix A and iteration vector b mentioned above. In the above iterative formula, vector h… t To represent the data distribution of the two-dimensional solution domain, assume matrix H t To represent a two-dimensional data distribution, where rows and columns represent the data distribution in the x and y directions respectively, it is stipulated that according to matrix H... t The traversal order based on the column direction priority principle is used as vector h. t The data storage order. Furthermore, the above transformation process can be simplified and represented by the function Vec(·):
[0115] h t =Vec(H t )
[0116] Matrices A and b in a linear equation can be represented in the following form:
[0117]
[0118] b = Vec(F)
[0119] Where C i =diag(Vec(c i (jΔx,kΔy))), (i=1,2…6) is a diagonal matrix corresponding to the coefficients c in the equation. i Δx and Δy represent the grid sizes in the x and y directions, respectively. The matrix elements in matrix F are defined as Fx... ij = f(iΔx, jΔy). Matrix For differential operators, the superscript (2) indicates that the operation is performed in the two-dimensional solution domain, and the subscript indicates different differential directions. Furthermore, the two-dimensional differential operator and the one-dimensional differential operator can be linked using Kronecker notation, and their relationship can be expressed as follows:
[0120]
[0121]
[0122]
[0123]
[0124]
[0125] Among the symbols For the Kronecker product, I N It is represented as an N×N identity matrix. It is a one-dimensional differential operator.
[0126] As can be seen from the above, in this specification, since the optical processor supports the differential operation of one-dimensional signals, the server can represent the two-dimensional differential matrix as a one-dimensional differential matrix. The optical processor can complete a series of one-dimensional differential operations, thereby ultimately completing the two-dimensional differential operation equivalently.
[0127] Under the Dirichlet boundary conditions The specific expression is as follows:
[0128]
[0129]
[0130] The above For antisymmetric matrices, i.e. It is a symmetric matrix, that is
[0131] Furthermore, matrix A, vector b, and coefficient α can be calculated. Then, A can be processed using a collaborative approach involving both electrical and optical processors. + Ah t Partial calculations. Operator A mainly includes differential operators. and the diagonal matrix C i (i∈1,2…6), while for operator A + It can be represented as:
[0132]
[0133] Based on the relationship between two-dimensional and one-dimensional differential matrices, and the symmetry of one-dimensional differential matrices, the conjugate transpose of a two-dimensional differential matrix can be calculated:
[0134]
[0135]
[0136]
[0137]
[0138]
[0139] The calculation results above show that operator A + It also includes differential operators. x, y) and diagonal matrix Therefore A + Ah t The calculation mainly involves the operation of the above operators on vector h. t The calculation.
[0140] Furthermore, the server can leverage the properties of the Kronecker product calculation, with operator D... x and D xx With vector h t The function of can be expressed mathematically as follows:
[0141]
[0142]
[0143] The above formula represents a two-dimensional differential operator. With vector h tIts function can be equivalent to a one-dimensional differential operator. With two-dimensional matrix H t After multiplication, the matrix is transformed into a one-dimensional vector according to the column precedence principle. Acting on a two-dimensional matrix H t The operation can be implemented on a light processor. Specifically, it involves scanning along the column dimension, each time from matrix H... t One column of data is taken from the image and sent to the optical processor. The result of the differential operation is then extracted and placed into the corresponding column.
[0144] Finally, once the electrical processor determines that the intermediate solution satisfies the preset convergence condition, it terminates the iteration and returns the intermediate solution h of that iteration. t .
[0145] As can be seen from the above, when the user-configured differential equation to be solved is a second-order differential equation, the server can directly determine the solution of the second-order differential equation configured by the user through the optical processor. Alternatively, it can decompose the second-order differential equation into individual first-order differential equations and calculate the calculation results of each first-order differential equation through the optical processor. Thus, the calculation result of the second-order differential equation can be obtained based on the calculation results of each first-order differential equation.
[0146] Similarly, when the user-configured differential equation to be solved is a multi-order differential equation, the server can decompose the user-configured multi-order differential equation into each first-order differential equation and / or each second-order differential equation. Then, the optical processor can determine the solution of each first-order differential equation or second-order differential equation, thereby obtaining the solution of the user-configured multi-order differential equation.
[0147] As can be seen from the above method, the server can solve differential equations by using a differential equation solver that includes both optical and electrical processors. In this case, by having the electrical and optical processors work together to determine the target solution of the differential equation, the high bandwidth, high parallelism, low power consumption, and low latency characteristics of each photonic device can be utilized to improve the efficiency of the electrical processor in solving various complex differential equations.
[0148] The above describes one or more implementations of a task execution method based on a differential equation solver in this specification. Based on the same approach, this specification also provides corresponding task execution devices based on differential equation solvers, such as... Figure 7 As shown.
[0149] Figure 7 A schematic diagram of a task execution device based on a differential equation solver provided in this specification includes:
[0150] The first processing module 701 is configured to receive a calculation request input by a user via an electrical processor, determine the parameters of the differential equation to be solved configured by the user according to the calculation request, determine the iteration matrix and iteration vector of the differential equation to be solved according to the parameters, randomly generate an initial solution of the differential equation to be solved, obtain the target solution of the differential equation to be solved through multiple iterations, and perform task execution according to the target solution; wherein;
[0151] The second processing module 702 is used to determine the input parameters for each iteration, generate a modulation voltage input to the optical processor based on the input parameters, the iteration matrix, and the iteration vector, obtain an optical input signal based on the modulation voltage through the optical processor, process the optical input signal through the on-chip optical structures included in the optical processor to obtain an optical output signal, determine the intermediate solution of the differential equation to be solved in the iteration based on the optical output signal, and use the intermediate solution as the input parameters for the next iteration. The optical output signal is used to characterize the matrix calculation result between the input parameters, the iteration matrix, and the iteration vector. The input parameters for the current iteration are obtained by iterating the initial solution to the previous iteration.
[0152] The determination module 703 is used to terminate the iteration when it is determined that the intermediate solution satisfies the preset convergence condition, and to take the intermediate solution as the target solution of the differential equation to be solved.
[0153] Optionally, the optical processor includes: an optical signal generation module, an optical signal processing module, and an optical signal detection module;
[0154] The second processing module 702 is specifically used to: obtain an optical input signal based on the modulation voltage through the optical signal generation module; process the optical input signal through the on-chip optical structures included in the optical signal processing module to obtain an optical output signal; interfere with the optical output signal through the optical signal detection module to perform phase differential coherence detection on the optical output signal to obtain the amplitude and phase of the optical output signal; and determine the intermediate solution of the differential equation to be solved corresponding to the optical output signal in this iteration based on the amplitude and phase.
[0155] Optionally, the second processing module 702 is specifically configured to: determine at least one on-chip optical structure from the on-chip optical structures included in the optical signal processing module as a target on-chip optical structure; the on-chip optical structures include at least one of: on-chip 4f system, reverse-engineered optical structure, optical mode coupling interference structure, and Y-type waveguide network structure; for each target on-chip optical structure, process the optical input signal through the on-chip optical structure to obtain the optical output signal output by the on-chip optical structure; through the optical signal detection module, interfere with the optical output signal output by the on-chip optical structure to perform phase differential coherence detection on the optical output signal output by the on-chip optical structure to obtain the amplitude and phase of the optical output signal output by the on-chip optical structure; based on the amplitude and phase, determine the candidate intermediate solution of the differential equation to be solved in the iteration corresponding to the optical output signal output by the on-chip optical structure; and based on each candidate intermediate solution, determine the intermediate solution of the differential equation to be solved in the iteration.
[0156] Optionally, the second processing module 702 is specifically used to: if the on-chip optical structure is an on-chip 4f system, configure the modulation coefficients of the modulation unit contained in the on-chip optical structure according to the transfer function corresponding to the differential equation to be solved, to obtain the configured modulation unit; obtain the Fourier transform optical signal corresponding to the optical input signal by inputting the optical input signal into the first microlens contained in the on-chip optical structure, and modulate the phase of the Fourier transform optical signal corresponding to the optical input signal through the modulation unit to obtain the modulated optical signal; and obtain the inverse Fourier transform optical signal corresponding to the modulated optical signal through the second microlens contained in the on-chip optical structure as the optical output signal.
[0157] Optionally, the second processing module 702 is specifically used to, if the on-chip optical structure is a reverse-designed optical structure, input the optical input signal into the optical diffraction unit included in the on-chip optical structure, and obtain the optical output signal through the optical diffraction unit.
[0158] Optionally, the second processing module 702 is specifically used to, if the on-chip optical structure is an optical mode coupling interference structure, input the optical input signal into the optical mode coupling unit included in the on-chip optical structure, so as to obtain an optical output signal through the optical mode coupling unit.
[0159] Optionally, the second processing module 702 is specifically used to: if the on-chip optical structure is a Y-type waveguide network structure, determine the modulation parameters of the Y-type waveguide stacked structure included in the Y-type waveguide network structure according to the type of the differential equation to be solved; modulate the weighted modulation units of the upper arm length and lower arm length of each straight waveguide in the Y-type waveguide stacked structure according to the modulation parameters to obtain the modulated Y-type waveguide stacked structure; and obtain the optical output signal by inputting the optical input signal into the modulated Y-type waveguide stacked structure.
[0160] Optionally, the second processing module 702 is specifically used to: determine whether the differential equation to be solved is a first-order differential equation or a second-order differential equation based on the parameters; if not, decompose the user-configured differential equation to be solved into basic differential equations, the basic differential equations including: first-order differential equations and / or second-order differential equations; for each basic differential equation, determine the iteration matrix and iteration vector corresponding to the basic differential equation based on the parameters of the basic differential equation; randomly generate the initial solution of the basic differential equation, and obtain the target solution of the basic differential equation through multiple iterations; obtain the target solution of the differential equation to be solved based on the target solutions of each basic differential equation.
[0161] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 This paper presents a task execution method based on a differential equation solver.
[0162] This instruction manual also provides Figure 8 The one shown corresponds to Figure 1 A schematic diagram of the structure of an electronic device. (e.g.) Figure 8 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The described task execution method is based on a differential equation solver. Of course, besides software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software. In other words, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.
[0163] Improvements in a technology can be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many improvements to the methodology can now be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that an improvement in methodology cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are the most commonly used. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0164] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0165] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0166] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0167] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0168] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0169] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0170] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0171] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0172] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0173] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0174] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0175] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0176] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification 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.
[0177] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0178] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A task execution method based on a differential equation solver, characterized in that, The method is applied to a differential equation solver, which includes an electrical processor and an optical processor. The electrical processor receives a computation request input by the user. Based on the computation request, it determines the parameters of the differential equation to be solved, configured by the user. Based on the parameters, it determines the iteration matrix and iteration vector of the differential equation to be solved, and randomly generates an initial solution for the differential equation to be solved. Through multiple iterations, it obtains the target solution of the differential equation to be solved, and performs task execution based on the target solution. For each iteration, the input parameters to be input in that iteration are determined. Based on the input parameters, the iteration matrix, and the iteration vector, a modulation voltage is generated and input to the optical processor. The optical processor obtains an optical input signal based on the modulation voltage. The optical input signal is then processed by the on-chip optical structures included in the optical processor to obtain an optical output signal. Based on the optical output signal, an intermediate solution of the differential equation to be solved in that iteration is determined, and the intermediate solution is used as the input parameters to be input in the next iteration. The optical output signal is used to characterize the matrix calculation result between the input parameters, the iteration matrix, and the iteration vector. The input parameters to be input in this iteration are obtained by iterating the initial solution to the previous iteration. Once it is determined that the intermediate solution satisfies the preset convergence condition, the iteration is terminated, and the intermediate solution in this iteration is taken as the target solution of the differential equation to be solved.
2. The method as described in claim 1, characterized in that, The optical processor includes: an optical signal generation module, an optical signal processing module, and an optical signal detection module; The optical processor obtains an optical input signal based on the modulation voltage, and processes the optical input signal using the on-chip optical structures included in the optical processor to obtain an optical output signal. Based on the optical output signal, the intermediate solution of the differential equation to be solved in this iteration is determined, specifically including: The optical input signal is obtained by the optical signal generation module based on the modulation voltage. The optical input signal is processed by the on-chip optical structures included in the optical signal processing module to obtain the optical output signal; The optical signal detection module interferes with the optical output signal to perform phase differential coherence detection, thereby obtaining the amplitude and phase of the optical output signal. Based on the amplitude and phase, the intermediate solution of the differential equation to be solved corresponding to the optical output signal in this iteration is determined.
3. The method as described in claim 2, characterized in that, The optical input signal is processed by the on-chip optical structures included in the optical signal processing module to obtain an optical output signal, specifically including: From the on-chip optical structures included in the optical signal processing module, at least one on-chip optical structure is determined as the target on-chip optical structure. The on-chip optical structures include at least one of the following: on-chip 4f system, reverse-engineered optical structure, optical mode coupling interference structure, and Y-type waveguide network structure. For each target on-chip optical structure, the optical input signal is processed through the on-chip optical structure to obtain the optical output signal output by the on-chip optical structure. The optical signal detection module interferes with the optical output signal to perform phase differential coherence detection, obtaining the amplitude and phase of the optical output signal. Based on the amplitude and phase, the intermediate solution of the differential equation to be solved corresponding to the optical output signal in this iteration is determined, specifically including: The optical signal detection module interferes with the optical output signal output by the on-chip optical structure to perform phase differential coherent detection on the optical output signal output by the on-chip optical structure, thereby obtaining the amplitude and phase of the optical output signal output by the on-chip optical structure. Based on the amplitude and phase, the candidate intermediate solution of the differential equation to be solved corresponding to the optical output signal output by the on-chip optical structure in this iteration is determined. Based on each candidate intermediate solution, the intermediate solution of the differential equation to be solved in this round of iteration is determined.
4. The method as described in claim 3, characterized in that, The optical input signal is processed through the on-chip optical structure to obtain the optical output signal output by the on-chip optical structure, specifically including: If the on-chip optical structure is an on-chip 4f system, then according to the transfer function corresponding to the differential equation to be solved, the control coefficients of the modulation unit contained in the on-chip optical structure are configured to obtain the configured modulation unit. By inputting the optical input signal into the first microlens contained in the on-chip optical structure, the Fourier transform optical signal corresponding to the optical input signal is obtained, and the phase of the Fourier transform optical signal corresponding to the optical input signal is modulated by the modulation unit to obtain the modulated optical signal. The optical signal obtained by the inverse Fourier transform of the modulated optical signal is obtained through the second microlens contained in the optical structure on the chip, and is used as the optical output signal.
5. The method as described in claim 1, characterized in that, The optical input signal is processed through the on-chip optical structure to obtain the optical output signal output by the on-chip optical structure, specifically including: If the on-chip optical structure is a reverse-designed optical structure, then by inputting the optical input signal into the optical diffraction unit contained in the on-chip optical structure, the optical output signal is obtained through the optical diffraction unit.
6. The method as described in claim 1, characterized in that, The optical input signal is processed through the on-chip optical structure to obtain the optical output signal output by the on-chip optical structure, specifically including: If the on-chip optical structure is an optical mode coupling interference structure, then by inputting the optical input signal into the optical mode coupling unit contained in the on-chip optical structure, an optical output signal can be obtained through the optical mode coupling unit.
7. The method as described in claim 1, characterized in that, The optical input signal is processed through the on-chip optical structure to obtain the optical output signal output by the on-chip optical structure, specifically including: If the on-chip optical structure is a Y-type waveguide network structure, then the modulation parameters of the Y-type waveguide stacked structure included in the Y-type waveguide network structure are determined according to the type of the differential equation to be solved. According to the modulation parameters, the weighted modulation units of the upper arm length and lower arm length of each straight waveguide in the Y-type waveguide stacking structure are modulated to obtain the modulated Y-type waveguide stacking structure. By inputting the optical input signal into the modulated Y-shaped waveguide stacked structure, an optical output signal is obtained through the modulated Y-shaped waveguide stacked structure.
8. The method as described in claim 1, characterized in that, Based on the parameters, the iteration matrix and iteration vector of the differential equation to be solved are determined, and an initial solution of the differential equation to be solved is randomly generated. Through multiple iterations, the target solution of the differential equation to be solved is obtained, specifically including: Based on the parameters, determine whether the differential equation to be solved is a first-order differential equation or a second-order differential equation. If not, the user-configured differential equation to be solved is decomposed into basic differential equations, which include: first-order differential equations and / or second-order differential equations. For each fundamental differential equation, the iteration matrix and iteration vector corresponding to the fundamental differential equation are determined based on the parameters of the fundamental differential equation. An initial solution to the fundamental differential equation is randomly generated, and the target solution is obtained through multiple iterations. Based on the objective solutions of each fundamental differential equation, the objective solution of the differential equation to be solved is obtained.
9. A task execution device based on a differential equation solver, characterized in that, The device includes: The first processing module is configured to receive a calculation request input by a user via an electrical processor, determine the parameters of the differential equation to be solved configured by the user according to the calculation request, determine the iteration matrix and iteration vector of the differential equation to be solved according to the parameters, randomly generate an initial solution of the differential equation to be solved, obtain the target solution of the differential equation to be solved through multiple iterations, and perform task execution according to the target solution; wherein; The second processing module is used to determine the input parameters for each iteration, generate a modulation voltage input to the optical processor based on the input parameters, the iteration matrix, and the iteration vector, obtain an optical input signal based on the modulation voltage through the optical processor, process the optical input signal through the on-chip optical structures included in the optical processor to obtain an optical output signal, determine the intermediate solution of the differential equation to be solved in the iteration based on the optical output signal, and use the intermediate solution as the input parameters for the next iteration. The optical output signal is used to characterize the matrix calculation result between the input parameters, the iteration matrix, and the iteration vector. The input parameters for the current iteration are obtained by iterating the initial solution to the previous iteration. The determination module is used to terminate the iteration when it is determined that the intermediate solution satisfies the preset convergence condition, and to take the intermediate solution in this round of iteration as the target solution of the differential equation to be solved.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Systems and Methods for Computational Windowing
US20200226310A1
Method and system for secure and private forward trading platform in transactive microgrids
WO2019070357A1