Optical computing systems, data processing methods, products, equipment and media

By iterating the optical signal in the optical computing system and alternately calculating the parameter matrix and transpose matrix, the high complexity and low efficiency problems caused by electrical computing are solved, and efficient data processing and dimensionality reduction effects are achieved.

CN120610601BActive Publication Date: 2025-10-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511067313.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-10-28
Estimated Expiration
2045-07-31

AI Technical Summary

Technical Problem

Existing technologies suffer from high processing complexity and low processing efficiency due to data processing via electrical computing.

Method used

An optical computing system is adopted, which sets up two input/output modules and an optical computing module. It uses the optical signal to perform calculations with the parameter matrix and its transpose matrix during the iteration process, realizes the forward and reverse input of the optical signal, and updates the parameter matrix to complete efficient calculation.

Benefits of technology

It reduces processing complexity, improves computational efficiency, reduces data processing time and data volume, and enhances model generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120610601B_ABST
    Figure CN120610601B_ABST
Patent Text Reader

Abstract

This application discloses an optical computing system, data processing method, product, device, and medium, relating to the field of optical computing technology. The system includes: setting up two input / output modules and an optical computing module; updating the parameter matrix in the optical computing module according to the feature matrix to be processed; in each iteration, inputting the optical signal modulated by the first input / output module in the forward direction to the optical computing module for calculation with the parameter matrix; inputting the optical signal modulated by the second input / output module in the reverse direction to the optical computing module for calculation with the transpose of the parameter matrix to obtain the output vector of the current iteration; and determining the key feature information of the feature matrix based on the output vector obtained in the last iteration at the end of the iteration. This solves the problem of high processing complexity and low processing efficiency caused by processing data through electrical computing, achieving the technical effect of efficiently calculating the parameter matrix and transpose matrix through optical computing, reducing processing complexity, and improving processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to optical computing systems, data processing methods, products, devices and media. Background Technology

[0002] Dimensionality reduction is an important preprocessing method in data analysis and machine learning. Its purpose is to map high-dimensional data to a lower-dimensional space while preserving as much of the key information as possible from the original data. High-dimensional data brings many problems, such as high computational complexity, high data storage and transmission costs, and a tendency to overfit. Dimensionality reduction techniques can improve computational efficiency, reduce storage requirements, eliminate noise and redundancy, and enhance the model's generalization ability.

[0003] However, the data dimensionality reduction process involves a large number of matrix operations. Related technologies use electronic computers to handle large-scale matrix operations, which results in high processing complexity and low processing efficiency. Summary of the Invention

[0004] This application provides an optical computing system, data processing method, product, device, and medium to at least solve the problems of high processing complexity and low processing efficiency caused by electrical computing in related technologies.

[0005] This application provides an optical computing system, including a first input / output module, a second input / output module, an optical computing module, and a processing module;

[0006] The first input / output module and the second input / output module are used to sequentially input an initial optical signal in each iteration of multiple iterations, and modulate the initial optical signal according to their latest output vector when they input the initial optical signal.

[0007] The optical computing module is used to input the optical signal modulated by the first input / output module in the forward direction, perform calculations with the parameter matrix, and output the calculated optical signal to the second input / output module; it also inputs the optical signal modulated by the second input / output module in the reverse direction, performs calculations with the transpose of the parameter matrix, and outputs the calculated optical signal to the first input / output module; the parameter matrix is ​​adjusted according to the feature matrix to be processed;

[0008] The first input / output module and the second input / output module are also used to convert the calculated optical signal into an electrical signal when they input the calculated optical signal, so as to obtain their respective output vectors;

[0009] The processing module is used to determine the end of the iteration when the change in the output vector obtained in two adjacent iterations is less than the target value, or when the number of iterations reaches the target number, and to determine the key feature information of the feature matrix based on the output vector obtained in the last iteration.

[0010] This application also provides a data processing method applied to any of the above-described optical computing systems, the method comprising:

[0011] Obtain the feature matrix to be processed;

[0012] The feature matrix is ​​processed; multiple iterations are performed during the data processing. In each iteration, the optical signal in the current iteration is modulated based on the output vector obtained from the previous iteration. The modulated optical signal is then sequentially calculated with the parameter matrix and the transpose of the parameter matrix, and the calculated optical signal is converted into an electrical signal to obtain the output vector of the current iteration. The parameter matrix is ​​updated based on the feature matrix. When the change in the output vector obtained between two adjacent iterations is less than the target value, or when the number of iterations reaches the target number, the iteration is considered to have ended. Based on the output vector obtained in the last iteration, the key feature information of the feature matrix is ​​determined.

[0013] This application also provides a computer program product, including:

[0014] The acquisition module is used to acquire the feature matrix to be processed;

[0015] A data processing module is used to process the feature matrix. During the data processing, multiple iterations are performed. In each iteration, the optical signal in the current iteration is modulated based on the output vector obtained from the previous iteration. The modulated optical signal is then sequentially calculated with the parameter matrix and its transpose to convert the calculated optical signal into an electrical signal, obtaining the output vector for the current iteration. The parameter matrix is ​​updated based on the feature matrix. When the change in the output vector between two adjacent iterations is less than a target value, or when the number of iterations reaches a target number, the iteration is considered complete. Based on the output vector obtained from the last iteration, the key feature information of the feature matrix is ​​determined.

[0016] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above data processing methods.

[0017] This application also provides a non-volatile computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described data processing methods.

[0018] This application sets up two input / output modules and an optical computing module. The parameter matrix in the optical computing module is updated according to the feature matrix to be processed. In each iteration, the optical signal modulated by the first input / output module is input forward to the optical computing module and calculated with the parameter matrix. The optical signal modulated by the second input / output module is input backward to the optical computing module and calculated with the transpose of the parameter matrix to obtain the output vector of the current iteration. At the end of the iteration, the key feature information of the feature matrix is ​​determined based on the output vector obtained in the last iteration. Therefore, it can solve the problem of high processing complexity and low processing efficiency caused by processing data through electrical computing in related technologies. It achieves the technical effect of completing the efficient calculation of the parameter matrix and transpose matrix through optical computing, reducing processing complexity and improving processing efficiency. Attached Figure Description

[0019] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the structure of an optical computing system provided in an embodiment of this application;

[0021] Figure 2 A schematic diagram of the basic structure of an MZI modulator in an optical computing system provided in this application embodiment;

[0022] Figure 3 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0023] Figure 4 A block diagram illustrating a computer program product provided in an embodiment of this application.

[0024] Figure label:

[0025] The system includes: a first input / output module 1; a second input / output module 2; an optical computing module 3; a processing module 4; a laser source 5; a first optical switch 6; an optical modulator 31; a phase modulator 11; a photodetector 12; a second optical switch 13; a first beam splitter 7; a second beam splitter 8; an input / output unit 20; a computer program product 10; an acquisition module 100; and a data processing module 200. Detailed Implementation

[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0027] It should be noted that, in the description of this application, 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. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0028] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0029] This application provides an optical computing system.

[0030] Specifically, Figure 1 This is a schematic diagram of the structure of an optical computing system provided according to an embodiment of this application. Figure 1 Solid lines in the diagram represent optical paths, while dashed lines represent electrical circuits.

[0031] like Figure 1 As shown, the optical computing system provided in this embodiment includes a first input / output module 1, a second input / output module 2, an optical computing module 3, and a processing module 4. The optical computing module 3 can be located between the first input / output module 1 and the second input / output module 2, so that the optical signal output from the first input / output module 1 can be input to the second input / output module 2 via the optical computing module 3, and the optical signal output from the second input / output module 2 can be input to the first input / output module 1 via the optical computing module 3. The processing module 4 can be electrically connected to both the first input / output module 1 and the second input / output module 2 to obtain the output vectors of the first input / output module 1 and the second input / output module 2, and to control the modulation parameters in the first input / output module 1 and the second input / output module 2, respectively.

[0032] The first input / output module 1 and the second input / output module 2 are used to sequentially input the initial optical signal in each of the multiple iterations, and to modulate the initial optical signal according to their latest output vector when inputting the initial optical signal. Specifically, in the first iteration, the first input / output module 1 modulates the initial optical signal according to a random vector when inputting the initial optical signal.

[0033] The optical computing module 3 is used to input the optical signal modulated by the first input / output module 1 in the forward direction, perform calculations with the parameter matrix, and output the calculated optical signal to the second input / output module 2; it also inputs the optical signal modulated by the second input / output module 2 in the reverse direction, performs calculations with the transpose of the parameter matrix, and outputs the calculated optical signal to the first input / output module 1; the parameter matrix is ​​adjusted according to the feature matrix to be processed.

[0034] The first input / output module 1 and the second input / output module 2 are also used to convert the calculated optical signal into an electrical signal when they are respectively input, to obtain their respective output vectors. The output vector obtained by the first input / output module 1 in the current iteration can be used as the output vector obtained in the current iteration.

[0035] Processing module 4 is used to end the iteration when the change in the output vector obtained from two adjacent iterations is less than the target value, or when the number of iterations reaches the target number. Based on the output vector obtained from the last iteration, it determines the key feature information of the feature matrix.

[0036] During data processing, the first input / output module 1 and the second input / output module 2 alternately input the initial optical signal. Multiple iterations are performed during data processing; in each iteration, the first input / output module 1 inputs the initial optical signal first, followed by the second input / output module 2.

[0037] Before performing multiple iterations, based on the feature matrix to be processed A For the parameter matrix in optical computing module 3 B The update process is performed to preload the optical computing parameters. The input vector is then randomly initialized (i.e., a random vector is determined). ).

[0038] In the first iteration, processing module 4 uses a random vector. The modulation parameters in the first input / output module 1 and the second input / output module 2 are updated. The first input / output module 1 receives the initial optical signal and modulates the input initial optical signal according to the updated modulation parameters. The modulated optical signal represents a random vector. To achieve random vectors The first input / output module 1 outputs the modulated optical signal to the optical computing module 3. The optical computing module 3 receives the modulated optical signal in the forward direction and compares the modulated optical signal with the parameter matrix. B The optical signal undergoes a multiplication-addition calculation, and the calculated signal is output to the second input-output module 2. The second input-output module 2 converts the calculated optical signal into an electrical signal, obtaining the output vector. .

[0039] Processing module 4 obtains the output vector of the second input / output module 2. And based on the output vector of the second input / output module 2 The modulation parameters in the first input / output module 1 and the second input / output module 2 are updated. The second input / output module 2 receives the initial optical signal and modulates the input initial optical signal according to the updated modulation parameters. The modulated optical signal represents the output vector. To achieve the output vector The second input / output module 2 outputs the modulated optical signal to the optical computing module 3. The optical computing module 3 inputs the modulated optical signal in reverse and compares the modulated optical signal with the parameter matrix. B transpose matrix The optical signal is multiplied and added, and the calculated signal is output to the first input / output module 1. The first input / output module 1 converts the calculated optical signal into an electrical signal to obtain the output vector. .

[0040] Processing module 4 obtains the output vector of the first input / output module 1. The output vector obtained from the first input / output module 1 can be... As the output vector of the first iteration.

[0041] In the k In the next iteration k >1, the processing module 4, based on the latest output vector obtained by the first input / output module 1 (i.e., the first input / output module 1 in the first...), k The output vector obtained in -1 iterations The modulation parameters in the first input / output module 1 and the second input / output module 2 are updated. The first input / output module 1 receives an initial optical signal and modulates the input initial optical signal according to the updated modulation parameters. The modulated optical signal represents the state of the first input / output module 1 in the first input / output module 2 during the second input / output phase. k The output vector obtained in -1 iterations The first input / output module 1 outputs the modulated optical signal to the optical computing module 3. The optical computing module 3 receives the modulated optical signal in the forward direction and compares the modulated optical signal with the parameter matrix. B The optical signal undergoes a multiplication-addition calculation, and the calculated signal is output to the second input-output module 2. The second input-output module 2 converts the calculated optical signal into an electrical signal, obtaining the output vector. .

[0042] Processing module 4 obtains the latest output vector obtained by the second input / output module 2. And based on the output vector of the second input / output module 2 The modulation parameters in the second input / output module 2 are updated. The second input / output module 2 receives the initial optical signal and modulates the input initial optical signal according to the updated modulation parameters. The modulated optical signal represents the output vector. To achieve the output vector The second input / output module 2 outputs the modulated optical signal to the optical computing module 3. The optical computing module 3 inputs the modulated optical signal in reverse and compares the modulated optical signal with the parameter matrix. B transpose matrix The optical signal is then processed by a multiplication-addition operation and output to the first input / output module 1. The first input / output module 1 converts the processed optical signal into an electrical signal, resulting in an output vector. .

[0043] Processing module 4 obtains the output vector of the first input / output module 1. The output vector obtained from the first input / output module 1 can be... As the first k The output vector of the next iteration.

[0044] Processing module 4 can also normalize the output vector of each iteration. For example, the output vector of the first iteration after normalization. The output vector of the kth iteration after normalization. .in, Represents the magnitude of a vector.

[0045] Processing module 4 checks whether the iteration termination condition is met. For example, the iteration termination condition includes whether the modulo of the difference between the output vector obtained in the current iteration and the output vector obtained in the previous iteration is less than the target value, or whether the number of iterations has reached the target number. The target value and the target number of iterations can be preset according to actual needs.

[0046] When the iteration termination condition is met, the iteration stops, and processing module 4 can determine the feature matrix based on the output vector obtained from the last iteration. A Key feature information.

[0047] For example, after the normalization process, the processing module 4... k The output vector of the next iteration After that, it was detected Less than the target value, or, the number of iterations was detected. k Stop iterating once the target number of iterations is reached.

[0048] The key feature information of the feature matrix may include the largest eigenvalue and its corresponding eigenvector, and the eigenvector includes the left eigenvector and the right eigenvector.

[0049] After normalizationk The output vector of the next iteration That is, the characteristic matrix A The right eigenvector corresponding to the largest eigenvalue (i.e., the largest singular value in SVD) v (i.e., the right singular vector in SVD). Based on the right eigenvector corresponding to the largest eigenvalue. v and characteristic matrix A The characteristic matrix can be calculated. A Maximum eigenvalue Based on the right eigenvector corresponding to the largest eigenvalue. v Feature matrix A and characteristic matrix A Maximum eigenvalue The characteristic matrix can be calculated. A The left eigenvector corresponding to the largest eigenvalue (i.e., the left singular vector in SVD).

[0050] This embodiment sets up two input / output modules and an optical computing module 3. The parameter matrix in the optical computing module 3 is updated according to the feature matrix to be processed. In each iteration, the optical signal modulated by the first input / output module 1 is input forward to the optical computing module 3 and calculated with the parameter matrix. The optical signal modulated by the second input / output module 2 is input backward to the optical computing module 3 and calculated with the transpose of the parameter matrix. By multiple forward and backward multiplexing of the optical path, the efficient calculation of the parameter matrix and the transpose matrix is ​​completed.

[0051] In this embodiment, the time complexity of the optical computation matrix transpose is O(n), while the time complexity of electrical computation in related technologies is O(mn). In this embodiment, the amount of data that needs to be transmitted for the optical computation matrix transpose is only O(n) (the input and output dimensions of the two input / output modules are both n, so the data volume is O(n)), whereas in related technologies, for electrical computation, the amount of information transmitted depends on the size of the feature matrix, so the amount of data that needs to be transmitted is O(mn).

[0052] Therefore, this embodiment can reduce time complexity and the amount of computational data, thereby reducing data processing complexity and improving data processing efficiency.

[0053] It should be noted that this embodiment can be applied to the feature matrix. A By performing multiple data processing steps, key feature information can be obtained from each step. Through multiple data processing steps, a feature matrix can be obtained. A The most critical feature information is contained within. The number of data processing iterations can be set according to actual needs.

[0054] By analyzing the characteristic matrix APerform dimensionality reduction on the data, and retain the feature matrix after dimensionality reduction. A The key feature information in the data can be extracted, and subsequent processing of the dimensionality-reduced data can improve computational efficiency, reduce storage requirements, eliminate noise and redundancy, and enhance the model's generalization ability.

[0055] For example, in image recognition, a 100×100 pixel grayscale image has 10,000 dimensions. Dimensionality reduction can yield low-dimensional image data, which retains the key feature information of the original grayscale image. Subsequent processing and recognition of this low-dimensional image data can effectively improve image recognition efficiency.

[0056] In some embodiments, the optical computing system further includes a laser source 5 and a first optical switch 6. The first optical switch 6 may be located on the light-emitting side of the laser source 5. The first optical switch 6 may be an MZI switch, which has the same structure as an MZI modulator, except that it is only used for switching functions. The first optical switch 6 may also be other types of optical switches, which are not specifically limited here.

[0057] Laser source 5 is used to generate the initial optical signal.

[0058] The first optical switch 6 is used to switch the transmission direction of the optical signal so that in each iteration, the initial optical signal generated by the laser source 5 is transmitted in the forward direction to the first input / output module 1 and in the reverse direction to the second input / output module 2.

[0059] The first optical switch 6 can alternately switch the transmission direction of the optical signal in both forward and reverse directions. In each iteration, the first optical switch 6 first switches the transmission direction of the optical signal to forward, so that the optical signal generated by the laser source 5 is transmitted in the forward direction to the first input / output module 1. After the second input / output module 2 obtains the output vector, the first optical switch 6 switches the transmission direction of the optical signal to reverse, so that the optical signal generated by the laser source 5 is transmitted in the reverse direction to the second input / output module 2. After the first input / output module 1 obtains the output vector, the iteration is completed.

[0060] The processing module 4 can also be electrically connected to the laser source 5 to control the laser source 5 to generate an initial optical signal. The processing module 4 can also be electrically connected to the first optical switch 6 to control the first optical switch 6 to switch the transmission direction of the optical signal.

[0061] In this embodiment, the transmission direction of the optical signal is switched by the first optical switch 6, so as to realize the alternating transmission of the optical signal in the forward and reverse directions. There is no need to set up laser sources at the two input and output modules respectively, which simplifies the system structure and reduces costs.

[0062] In some embodiments, the optical computing module 3 includes a cascaded optical modulator. The cascaded optical modulator includes multiple stages of optical modulators, each stage including at least one optical modulator 31. For example... Figure 1As shown, the optical modulator 31 closest to the first input / output module 1 is the first-stage optical modulator, and the optical modulator 31 closest to the second input / output module 2 is the last-stage optical modulator.

[0063] The optical computing module 3 is also used to input the optical signal modulated by the first input / output module 1 to the first-stage optical modulator, and to perform calculations on the parameter matrix formed by the cascaded optical modulators in the forward direction. The calculated optical signal is then output from the last-stage optical modulator to the second input / output module 2. The optical signal modulated by the second input / output module 2 is input to the last-stage optical modulator, and to perform calculations on the transpose matrix formed by the cascaded optical modulators in the reverse direction. The calculated optical signal is then output from the first-stage optical modulator to the first input / output module 1.

[0064] In each iteration, the optical signal modulated by the first input / output module 1 is transmitted from the first-stage optical modulator to the last-stage optical modulator, performing multiplication and addition operations with the parameter matrix. Then, the optical signal modulated by the second input / output module 2 is transmitted from the last-stage optical modulator to the first-stage optical modulator, performing multiplication and addition operations with the transpose of the parameter matrix.

[0065] In this embodiment, by inputting the modulated optical signal in both the forward and reverse directions to the optical computing module 3, efficient calculation of the parameter matrix and transpose matrix can be achieved, reducing computational complexity and improving computational efficiency.

[0066] In some embodiments, the optical modulator 31 is an MZI (Mach-Zehnder interferometer) modulator.

[0067] MZI modulators are commonly used silicon photonic devices and are also the natural smallest matrix kernels. A matrix network constructed by cascading MZI modulators according to specific rules can perform arbitrary matrix multiplication. For example... Figure 2 As shown, the basic structure of an MZI modulator consists of two couplers and two sets of interferometer arms, which are waveguides in which light propagates. One of the interferometer arms in each set is equipped with an adjustable phase shifter, providing... and Phase shifting is represented by black rectangles indicating couplers and white rectangles indicating adjustable phase shifters. The MZI modulator has two inputs, In1 and In2, and two outputs, Out1 and Out2. The input-output relationship can be represented by a unitary rotation matrix. ,Right now:

[0068] ;

[0069] .

[0070] By modulating the phase of the adjustable phase shifter and That can change This enables arbitrary unitary rotation matrices. Phase modulation is achieved through external electrical signals. Currently, commonly used adjustable phase shifters include electro-optic phase shifters and thermo-optic phase shifters, which adjust the input voltage or device temperature via electrical signals to achieve phase modulation. and The input optical signal is output from two ports at the power allocated by this matrix, and the calculation results can be obtained by measurement.

[0071] According to the triangle decomposition algorithm, any n×n unitary matrix can theoretically be decomposed into the product of n(n-1) / 2 unitary rotation matrices. For example, a 3×3 unitary matrix can be decomposed according to the following... ,in , , It has the following form:

[0072] , , .

[0073] here Each and It can be modulated individually. The maximum executable unitary matrix is ​​determined by the number of inputs and outputs of the triangular network; a 3×3 unitary matrix requires 3 pairs of inputs and outputs.

[0074] This demonstrates that optical interference calculations based on cascaded MZI modulators are highly adjustable and can achieve arbitrary calculation processes.

[0075] In each iteration of this embodiment, the first input / output module 1 inputs the modulated optical signal in the forward direction to the cascaded optical modulator, as follows:

[0076] .

[0077] in, The parameter matrix represents the cascaded optical modulators. The right arrow indicates input from the left (i.e., positive input, i.e., input from the first input / output module 1). It is the beam splitter matrix in an optical modulator. It is the phase shifter matrix in an optical modulator.

[0078] The second input / output module 2 inverts the modulated optical signal and inputs it back into the cascaded optical modulator, as follows:

[0079] .

[0080] As can be seen from the two formulas, for the same set of parameter matrices of a cascaded optical modulator, the matrix corresponding to the forward input optical signal and the matrix corresponding to the reverse input optical signal are exactly transposes of each other. Without loss of generality, we can assume that the matrix of the cascaded optical modulator corresponding to the forward input is... The matrix of the cascaded optical modulator corresponding to the reverse input is: .

[0081] In some embodiments, the processing module 4 is electrically connected to the cascaded optical modulator and is also used to update the parameters of the cascaded optical modulator according to the feature matrix to adjust the parameter matrix.

[0082] The processing module 4 can be electrically connected to each optical modulator 31 in the cascaded optical modulator to adjust the parameters of each optical modulator 31.

[0083] When the optical modulator 31 is an MZI modulator, the processing module 4 processes the characteristic matrix. A The parameters of each optical modulator 31 can be determined and set, such as the first one. i Parameters of an optical modulator and .

[0084] For example, for the feature matrix A It can be decomposed using SVD. For the three matrices after decomposition Implement the hardware and determine all parameters in the interference gating module (i.e., in each MZI modulator). and ).

[0085] in, For diagonal matrices:

[0086] .

[0087] The parameters in the table can directly correspond to the n-1 parameters of the n-1 MZI modulators. The i-th MZI modulator , In addition, the interference arms without parameters in these n-1 MZI modulators must be discarded.

[0088] Since it is an orthogonal matrix, a matrix block diagonalization scheme can be used to decompose it and obtain the remaining parameters in the corresponding gating module. U For example, the calculation process for block diagonalization is as follows:

[0089] .

[0090] in, It is the element in the nth row and jth column. It is the element in the j-th row and n-th column. The second equation can be made true through block diagonalization, where... The matrix generated for the j-th MZI in the n-th column ( ).

[0091] The specific calculation method is as follows:

[0092] make .

[0093] Then according to the formula It can be obtained and Then substitute into the second line Seek and And so on, to obtain all the parameters of this group of n-1 MZI modulators.

[0094] This completes the decomposition of the last row, achieving block diagonalization of the last row and the first n-1 rows. Next, the U(n-1) matrix is ​​block diagonalized. The block diagonalization formula for the general form U(k) is as follows:

[0095] .

[0096] Until U(1) until. The same calculation method can be used.

[0097] In this embodiment, the processing module 4 accurately adjusts the parameters of the cascaded optical modulator according to the feature matrix, thereby realizing the dynamic control of the cascaded optical modulator.

[0098] In some embodiments, the first input / output module 1 and the second input / output module 2 respectively include a phase modulator 11, a photodetector 12, and a second optical switch 13.

[0099] The photodetector 12 is used to convert the input calculated optical signal into an electrical signal to obtain an output vector.

[0100] The phase modulator 11 is used to modulate the input initial optical signal according to a random vector or the latest output vector obtained by the photodetector 12.

[0101] The second optical switch 13 is used to switch the transmission direction of the optical signal, transmitting the optical signal modulated by the phase modulator 11 to the optical computing module 3, or transmitting the calculated optical signal output by the optical computing module 3 to the photodetector 12.

[0102] In each iteration, the initial optical signal is first input to the first input / output module 1. The phase modulator 11 in the first input / output module 1 modulates the input initial optical signal according to a random vector (used in the first iteration) or the latest output vector (i.e., the output vector obtained in the previous iteration). The second optical switch 13 in the first input / output module 1 switches the transmission direction of the optical signal from the phase modulator 11 in the first input / output module 1 to the optical computing module 3, so that the signal modulated by the phase modulator 11 in the first input / output module 1 is transmitted to the optical computing module 3. When the optical computing module 3 completes the calculation, the second optical switch 13 in the second input / output module 2 switches the transmission direction of the optical signal from the optical computing module 3 to the photodetector 12 in the second input / output module 2, so that the calculated optical signal output by the optical computing module 3 is transmitted to the photodetector 12 in the second input / output module 2. The photodetector 12 in the second input / output module 2 converts the calculated optical signal into an electrical signal, obtaining the output vector of the second input / output module 2.

[0103] Then, the initial optical signal is input to the second input / output module 2. The phase modulator 11 in the second input / output module 2 modulates the input initial optical signal according to the latest obtained output vector. The second optical switch 13 in the second input / output module 2 switches the transmission direction of the optical signal from the phase modulator 11 in the second input / output module 2 to the optical computing module 3, so that the signal modulated by the phase modulator 11 in the second input / output module 2 is transmitted to the optical computing module 3. When the optical computing module 3 completes the calculation, the second optical switch 13 in the first input / output module 1 switches the transmission direction of the optical signal from the optical computing module 3 to the photodetector 12 in the first input / output module 1, so that the calculated optical signal output by the optical computing module 3 is transmitted to the photodetector 12 in the first input / output module 1. The photodetector 12 in the first input / output module 1 converts the calculated optical signal into an electrical signal to obtain the output vector of the first input / output module 1, which is the output vector of the current iteration.

[0104] In this embodiment, a phase modulator and a photodetector are set in both input and output modules. The two input and output modules are switched between input and output by the second optical switch 13, realizing forward and reverse multiplexing optical paths, which is simple in structure.

[0105] The second optical switch 13 can be an MZI switch. The structure of an MZI switch is the same as that of an MZI modulator, except that it is only used for switching functions. The second optical switch 13 can also be other types of optical switches, which are not specifically limited here.

[0106] In some embodiments, the processing module 4 is electrically connected to the phase modulator 11 and the photodetector 12 respectively, and is used to acquire the output vector through the photodetector 12; and update the parameters of the phase modulator 11 according to the random vector or the latest acquired output vector.

[0107] In the first iteration, processing module 4 can obtain a random vector and update the parameters of each phase modulator 11 according to the random vector. The phase modulator 11 in the first input / output module 1 modulates the initial optical signal based on the updated parameters, and the modulated optical signal represents the random vector.

[0108] For example, based on random vectors The parameters of each phase modulator 11 can be calculated. j Parameters of a phase modulator The calculation formula is as follows:

[0109] .

[0110] in, It is a random vector The largest element in It is a random vector The Middle j Each element.

[0111] After the photodetector 12 in the first input / output module 1 obtains the output vector, the processing module 4 acquires the output vector of the first input / output module 1 through the photodetector 12 in the first input / output module 1, and updates the parameters of each phase modulator 11 according to the latest acquired output vector. The phase modulator 11 in the first input / output module 1 modulates the initial optical signal based on the updated parameters, and the modulated optical signal represents the latest acquired output vector (i.e., the latest output vector obtained by the first input / output module 1).

[0112] After the photodetector 12 in the second input / output module 2 obtains the output vector, the processing module 4 acquires the output vector of the second input / output module 2 through the photodetector 12 in the second input / output module 2, and updates the parameters of each phase modulator 11 according to the output vector. The phase modulator 11 in the second input / output module 2 modulates the initial optical signal based on the updated parameters, and the modulated optical signal represents the latest acquired output vector (i.e., the latest output vector obtained by the second input / output module 2).

[0113] The processing module 4 can also be electrically connected to the second optical switch 13 to control the second optical switch 13 to switch the transmission direction of the optical signal.

[0114] In this embodiment, the parameters of the phase modulator 11 are adjusted in real time and accurately by the processing module 4, so as to realize the dynamic control of the phase modulator 11.

[0115] In some embodiments, the optical computing system further includes a first beam splitter 7 and a second beam splitter 8. The first input / output module 1 and the second input / output module 2 each include a plurality of input / output units 20, and each input / output unit 20 includes a phase modulator 11, a photodetector 12, and a second optical switch 13.

[0116] The first beam splitter 7 is used to split the forward-transmitting initial optical signal into multiple beams, each beam corresponding to a phase modulator 11 in one of the multiple input / output units 20 of the first input / output module 1. The phase modulators 11 in the multiple input / output units 20 of the first input / output module 1 modulate their respective input initial optical signals and output the modulated optical signals to the optical computing module 3. The calculated optical signals output by the optical computing module 3 have multiple beams, each corresponding to a photodetector 12 in one of the multiple input / output units 20 of the second input / output module 2. The photodetectors 12 in the multiple input / output units 20 of the second input / output module 2 convert their respective input calculated optical signals into electrical signals, and the electrical signals converted by the photodetectors 12 in the multiple input / output units 20 of the second input / output module 2 constitute the output vector of the second input / output module 2.

[0117] The second beam splitter 8 is used to split the initial optical signal transmitted in reverse into multiple beams. These multiple initial optical signals are respectively transmitted to the phase modulators 11 in the multiple input / output units 20 of the second input / output module 2. The phase modulators 11 in the multiple input / output units 20 of the second input / output module 2 modulate their respective input initial optical signals and output the modulated optical signals to the optical computing module 3. The calculated optical signals output by the optical computing module 3 have multiple beams, which are respectively output to the photodetectors 12 in the multiple input / output units 20 of the first input / output module 1. The photodetectors 12 in the multiple input / output units 20 of the first input / output module 1 convert their respective input calculated optical signals into electrical signals. The electrical signals converted by the photodetectors 12 in the multiple input / output units 20 of the first input / output module 1 constitute the output vector of the first input / output module 1.

[0118] This embodiment divides the initial optical signal into multiple beams using a first beam splitter 7 and a second beam splitter 8. It is suitable for feature matrices of various dimensions and has a simple structure.

[0119] According to the optical computing system provided in the embodiments of this application, the optical path is reused by specifically designing the waveguide and logic circuit of optical computing; efficient calculation of parameter matrix and transpose matrix is ​​achieved through the forward and reverse dual calculation process, thereby improving the performance of optical computing in handling calculation problems involving matrix transpose; the time complexity and the amount of data to be transmitted are reduced by optical computing, thereby reducing data processing complexity and improving data processing efficiency.

[0120] This application also provides a data processing method applicable to the optical computing system described above. The method will be described in detail below, following its execution flow.

[0121] Specifically, Figure 3 This is a flowchart of a data processing method provided according to an embodiment of this application.

[0122] like Figure 3 As shown, the data processing method includes steps 110 to 120.

[0123] Step 110: Obtain the feature matrix to be processed.

[0124] For example, this data processing method can be applied to the identification of core nodes. In step 110, the adjacency matrix of multiple nodes is obtained, and this adjacency matrix is ​​used as the feature matrix. A In this context, multiple nodes can represent a server cluster consisting of multiple server nodes, with the core node being a server that needs to communicate with multiple servers and / or multiple devices. The adjacency matrix can be constructed based on the connection status of multiple nodes at different time slices (e.g., hourly traffic records). A ij It can be represented as a node i In time slice j Traffic.

[0125] Step 120: Process the feature matrix. During the data processing, perform multiple iterations. In each iteration, modulate the optical signal in the current iteration based on the output vector obtained from the previous iteration. Calculate the modulated optical signal sequentially with the parameter matrix and the transpose of the parameter matrix. Convert the calculated optical signal into an electrical signal to obtain the output vector of the current iteration. Update the parameter matrix based on the feature matrix. When the change in the output vector between two adjacent iterations is less than the target value, or when the number of iterations reaches the target number, the iteration ends. Determine the key feature information of the feature matrix based on the output vector obtained from the last iteration.

[0126] Combination Figure 1 As shown, during the data processing process, processing module 4 determines the processing module based on the feature matrix to be processed. AThe parameter matrix is ​​then updated. In each iteration of the multiple iterations, the laser source 5 sequentially outputs a positive initial optical signal and a negative initial optical signal through the first optical switch 6.

[0127] In the first iteration, processing module 4 processes the data based on the random vector. The parameters of each phase modulator 11 are updated. The phase modulator of the first input / output module 1 receives a forward initial optical signal, modulates the forward initial optical signal, and outputs the modulated optical signal to the optical computing module 3. The optical computing module 3 receives the modulated optical signal in the forward direction and compares the modulated optical signal with the parameter matrix. B The optical signal is multiplied and added, and the calculated signal is output to the photodetector 12 of the second input / output module 2. The photodetector 12 of the second input / output module 2 converts the calculated optical signal into an electrical signal to obtain the output vector. .

[0128] Processing module 4 obtains the output vector through photodetector 12 of second input / output module 2. And based on the output vector Update the parameters of each phase modulator 11. The phase modulator 11 of the second input / output module 2 receives the reversed initial optical signal, modulates the reversed initial optical signal, and outputs the modulated optical signal to the optical computing module 3. The optical computing module 3 receives the modulated optical signal in reverse and compares the modulated optical signal with the parameter matrix. B transpose matrix The optical signal is multiplied and added, and the calculated signal is output to the photodetector 12 of the first input / output module 1. The photodetector 12 of the first input / output module 1 converts the calculated optical signal into an electrical signal to obtain the output vector. The processing module 4 obtains the output vector through the photodetector 12 of the first input / output module 1. and output vector As the output vector of the first iteration.

[0129] In the k In the next iteration k >1, the processing module 4, based on the latest output vector obtained by the first input / output module 1 (i.e., the first input / output module 1 in the first...), k The output vector obtained in -1 iterations The parameters of each phase modulator 11 are updated. The phase modulator 11 of the first input / output module 1 receives a forward initial optical signal, modulates the forward initial optical signal, and outputs the modulated optical signal to the optical computing module 3. The optical computing module 3 receives the modulated optical signal in the forward direction and compares the modulated optical signal with the parameter matrix. BThe optical signal is multiplied and added, and the calculated signal is output to the photodetector 12 of the second input / output module 2. The photodetector 12 of the second input / output module 2 converts the calculated optical signal into an electrical signal to obtain the output vector. .

[0130] Processing module 4 obtains the output vector through photodetector 12 of second input / output module 2. And based on the output vector Update the modulation parameters of each phase modulator 11. The phase modulator 11 of the second input / output module 2 receives the reversed initial optical signal, modulates the reversed initial optical signal, and outputs the modulated optical signal to the optical computing module 3. The optical computing module 3 receives the modulated optical signal in reverse and compares the modulated optical signal with the parameter matrix. B transpose matrix The optical signal is multiplied and added, and the calculated signal is output to the photodetector 12 of the first input / output module 1. The photodetector 12 of the first input / output module 1 converts the calculated optical signal into an electrical signal to obtain the output vector. The processing module 4 obtains the output vector through the photodetector 12 of the first input / output module 1. and output vector As the first k The output vector of the next iteration.

[0131] At the end of the iteration, the feature matrix is ​​determined based on the output vector obtained from the last iteration. A The key feature information is preserved in the feature matrix. A Key information in the feature matrix, and the key information in the feature matrix. A Dimensionality reduction is then performed. Subsequent steps involve adjusting the feature matrix. A The key feature information is processed to improve processing efficiency, reduce storage requirements, eliminate noise and redundancy, and enhance the model's generalization ability.

[0132] In this embodiment, the parameter matrix is ​​updated based on the feature matrix to be processed. In each iteration, the modulated optical signal is calculated with the parameter matrix through the forward optical path, and then calculated with the transpose of the parameter matrix through the reverse optical path. By multiple forward and reverse optical paths, the parameter matrix and transpose matrix are efficiently calculated.

[0133] In this embodiment, the time complexity of the optical computation matrix transpose is O(n), while the time complexity of electrical computation in related technologies is O(mn). In this embodiment, the amount of data that needs to be transmitted for the optical computation matrix transpose is only O(n) (the input and output dimensions of the two input / output modules are both n, so the data volume is O(n)), whereas in related technologies, for electrical computation, the amount of information transmitted depends on the size of the feature matrix, so the amount of data that needs to be transmitted is O(mn).

[0134] Therefore, this embodiment can effectively reduce time complexity and the amount of computational data, thereby reducing the complexity of data processing and improving data processing efficiency.

[0135] In some embodiments, after obtaining the output vector of the current iteration, the data processing method further includes:

[0136] The output vector obtained in the current iteration is normalized.

[0137] In the current iteration, after obtaining the output vector of the current iteration, processing module 4 can directly perform subsequent processing on the output vector obtained in the current iteration (such as determining the end of the iteration, determining key feature information, etc.), or it can normalize the output vector obtained in the current iteration and then perform subsequent processing on the normalized output vector. For example, the first... k The output vector of the next iteration .

[0138] This embodiment normalizes the output vector obtained in the current iteration before proceeding with subsequent processing, which can reduce numerical errors and improve the accuracy of subsequent calculations.

[0139] In some embodiments, key feature information includes the maximum eigenvalue and the corresponding eigenvector, wherein the eigenvector includes a left eigenvector and a right eigenvector.

[0140] Based on the output vector obtained from the last iteration, the key feature information of the feature matrix is ​​determined, including:

[0141] The output vector obtained from the last iteration is taken as the right eigenvector corresponding to the largest eigenvalue.

[0142] Calculate the maximum eigenvalue based on the right eigenvector and eigenmatrix corresponding to the maximum eigenvalue;

[0143] Calculate the left eigenvector corresponding to the largest eigenvalue based on the right eigenvector, eigenmatrix, and the largest eigenvalue.

[0144] Singular Value Decomposition (SVD) is an effective method for data dimensionality reduction. The core idea of ​​SVD is to decompose any m×n dimensional matrix A into the product of three specific matrices, i.e. .in, It is an m×m orthogonal matrix, and its column vectors are called left singular vectors; It is an m×n diagonal matrix, and the non-negative elements on its diagonal are called singular values, which are arranged in descending order; It is an n×n orthogonal matrix, and its column vectors are called right singular vectors.

[0145] From a geometric perspective, SVD reveals the transformation properties of matrix A in high-dimensional space. When matrix A acts on a vector, it can be viewed as first transforming... Rotate, then pass Scaling is performed, and finally... Rotation is performed. The magnitude of the singular values ​​reflects the degree to which the matrix "scales" in different directions, while the singular vectors indicate these directions. This decomposition method not only provides an intuitive way to understand the intrinsic structure of a matrix, but also offers a powerful tool for solving many practical problems.

[0146] In the field of data processing and analysis, Singular Value Decomposition (SVD) is widely used for tasks such as dimensionality reduction, noise removal, and pattern recognition. For example, in image processing, by retaining the first few singular values ​​of a matrix and their corresponding singular vectors, images can be effectively compressed and denoised while preserving their main features. In recommender systems, SVD can uncover the potential relationships between users and items. By decomposing the user-item rating matrix, it extracts the implicit features of users and items, thereby achieving more accurate personalized recommendations.

[0147] Furthermore, SVD has wide applications in various fields such as signal processing, statistics, machine learning, and computer graphics. In signal processing, SVD can be used for signal denoising and feature extraction, helping to extract useful information from complex signals. In statistics, SVD is closely related to Principal Component Analysis (PCA), providing another perspective for dimensionality reduction and analysis of data. In machine learning, SVD is used for tasks such as algorithm optimization, feature selection, and model compression, helping to improve model performance and efficiency. In computer graphics, SVD can be used for 3D model transformation, animation creation, and image synthesis, providing powerful support for graphics generation and processing.

[0148] Singular Value Decomposition (SVD), as a powerful mathematical tool, has demonstrated wide-ranging applications in practice, providing an effective approach to solving various complex problems. The total computational complexity of SVD is typically O(n log n). arrive The exact value depends on the size of the matrix and the algorithm used. For large-scale matrices, the computational complexity of SVD can be very high. Therefore, in practical applications, approximation algorithms or acceleration techniques are usually used to reduce the computational complexity.

[0149] In some embodiments, the formula for calculating the maximum eigenvalue is:

[0150] ;

[0151] in, The largest eigenvalue, For the characteristic matrix, It is the right eigenvector corresponding to the largest eigenvalue.

[0152] The formula for calculating the left eigenvector corresponding to the largest eigenvalue is:

[0153] ;

[0154] in, This is the left eigenvector corresponding to the largest eigenvalue.

[0155] After completing the k-th iteration, the iteration is considered complete, and the output vector of the k-th iteration is normalized. That is, the right eigenvector corresponding to the largest eigenvalue of the feature matrix A (i.e., the largest singular value in SVD). (i.e., the right singular vector in SVD). Based on the right eigenvector corresponding to the largest eigenvalue. and characteristic matrix A The characteristic matrix can be calculated. A Maximum eigenvalue Based on the right eigenvector corresponding to the largest eigenvalue. Feature matrix A and characteristic matrix A Maximum eigenvalue The characteristic matrix can be calculated. A The left eigenvector corresponding to the largest eigenvalue (i.e., the left singular vector in SVD).

[0156] This embodiment extracts the feature matrix based on SVD. A The key feature information is extracted and dimensionality is reduced to reduce computational complexity while retaining key information, improve the model's generalization ability, and have wide applicability.

[0157] After normalization, the first k The output vector of the next iteration After that, it was detected If the result is less than the target value, the iteration is stopped, thus effectively ensuring the accuracy of the result.

[0158] Or, the iteration count is detected. k Stop iterating once the target number of iterations is reached to avoid infinite loops caused by non-convergence of results.

[0159] At the end of the iteration, based on the normalized result of the first iteration... k The output vector of the next iteration To determine the key feature information of the feature matrix.

[0160] For example, this data processing method can be applied to the identification of core nodes. By processing the adjacency matrix, key feature information can be obtained, namely the maximum eigenvalue and the corresponding eigenvector. The maximum eigenvalue represents optimal communication performance, and the eigenvector includes weights for multiple nodes, indicating the probability that the corresponding node possesses optimal communication performance. The node with the largest weight in the eigenvector is identified as the core node.

[0161] By using data processing methods to identify core nodes among multiple nodes, core nodes can be protected (e.g., by deploying redundancy and prioritizing monitoring) to prevent large-scale network paralysis caused by core node failures and reduce the risk of core node attacks; more bandwidth resources can be allocated to core nodes to optimize load balancing and improve overall efficiency.

[0162] In some embodiments, data processing of the feature matrix includes:

[0163] The feature matrix is ​​processed multiple times, with multiple iterations during each processing step. The parameter matrix in the current processing step is updated based on the feature matrix of the current processing step. After determining the key feature information of the feature matrix of the current processing step, the feature matrix of the current processing step is reduced in order to obtain the feature matrix of the next processing step.

[0164] By performing one data processing operation on the feature matrix, the most critical feature information can be obtained. By performing two data processing operations on the feature matrix, the secondary critical feature information can be obtained. Therefore, by performing multiple data processing operations on the feature matrix, multiple key feature information can be obtained. The number of data processing operations can be set according to actual needs.

[0165] For example, this data processing method can be applied to the identification of core nodes. Each data processing step can identify one core node. The number of data processing steps is determined based on the number of core nodes to be identified.

[0166] The feature matrix needs to be updated after each data processing step. (Feature matrix from the first data processing step) A 1 represents the feature matrix obtained in step 110. A .

[0167] In the first data processing, based on the feature matrix of the first data processing... A 1. Update the parameter matrix and determine the feature matrix of the first data processing through multiple iterations. A The key feature information of 1, namely the feature matrix of the first data processing. A The largest eigenvalue of 1 and the corresponding feature vectors .

[0168] Then, the feature matrix of the first data processing A 1. Perform a reduction in order to obtain the feature matrix of the second data processing. A 2.

[0169] In the second data processing, based on the feature matrix of the second data processing... A 2. Update the parameter matrix and determine the feature matrix for the second data processing through multiple iterations. A The key feature information of 2, namely the feature matrix of the second data processing. A The largest eigenvalue of 2 and the corresponding feature vectors .

[0170] Then, the feature matrix of the second data processing A 2. Perform a reduction in order to obtain the feature matrix of the third data processing step. A 3.

[0171] And so on, in the... k In the second data processing, according to the first k Feature matrix of secondary data processing A k Update the parameter matrix and determine the first step through multiple iterations. k Feature matrix of secondary data processing A k Key feature information, namely the first k Feature matrix of secondary data processing A k Maximum eigenvalue and the corresponding feature vectors .

[0172] Then, for the first k Feature matrix of secondary data processing A k Perform order reduction processing to obtain the first... k+ Feature matrix of one data processing A k+1 .

[0173] The processing ends when the number of key feature information obtained reaches a specified number L, i.e., when the number of processing iterations reaches a specified number L. The L largest eigenvalues ​​constitute the eigenvalue matrix (i.e., the singular value matrix in SVD). The first L diagonal elements of the left eigenvector matrix (i.e., the left singular vector matrix U in SVD) are formed by the L left eigenvectors, and the L right eigenvectors form the right eigenvector matrix (i.e., the right singular vector matrix U in SVD). The first L column of ).

[0174] This embodiment extracts the most critical feature information from the feature matrix sequentially by reducing the order of the feature matrix, thus avoiding information redundancy and reducing computational complexity.

[0175] In some embodiments, the feature matrix of the current data processing is reduced in order to obtain the feature matrix of the next data processing, including:

[0176] Based on the key feature information of the feature matrix of the current data processing, determine the feature contribution value of the current data processing.

[0177] Subtract the feature contribution value of the current data processing from the feature matrix of the current data processing to obtain the feature matrix of the next data processing.

[0178] In some embodiments, the formula for calculating the feature matrix of the (k+1)th data processing step is:

[0179] ;

[0180] in, The feature matrix of the (k+1)th data processing iteration. Let be the feature matrix of the k-th data processing. The feature contribution value for the kth data processing iteration. Let be the largest eigenvalue of the feature matrix in the k-th data processing iteration. Let be the right eigenvector corresponding to the largest eigenvalue in the k-th data processing iteration. Let be the left eigenvector corresponding to the largest eigenvalue in the k-th data processing, where k ≥ 1.

[0181] In the k In the second data processing step, the first... k Feature matrix of secondary data processing A k Key feature information, namely the first k Feature matrix of secondary data processing A k Maximum eigenvalue and the corresponding feature vectors Afterwards, according to the first k Feature matrix of secondary data processing A k Maximum eigenvalue and the corresponding feature vectors Calculate the first k Contribution value of this data processing The first k Feature matrix of secondary data processing A k Subtract the first k Contribution value of this data processing You can get the first k+ Feature matrix of one data processing .

[0182] This embodiment reduces the order of the feature matrix of the current data processing by subtracting the feature contribution value of the current data processing, which can minimize information loss and improve the accuracy of key feature information extraction.

[0183] According to the data processing method provided in the embodiments of this application, the parameter matrix in the optical computing module is updated according to the feature matrix to be processed. In each iteration, the modulated optical signal is input forward with the parameter matrix for calculation, and then input backward with the transpose matrix of the parameter matrix for calculation, so as to complete the efficient calculation of the parameter matrix and the transpose matrix through optical computing. At the end of the iteration, the key feature information of the feature matrix is ​​determined according to the output vector obtained in the last iteration, thereby reducing the processing complexity and improving the processing efficiency.

[0184] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0185] Embodiments of this application also provide a computer program product.

[0186] Figure 4 This is a block diagram of a computer program product provided according to an embodiment of this application.

[0187] like Figure 4 As shown, the computer program product 10 includes an acquisition module 100 and a data processing module 200.

[0188] Module 100 is used to acquire the feature matrix to be processed.

[0189] The data processing module 200 is used to process the feature matrix. During the data processing, multiple iterations are performed. In each iteration, the optical signal in the current iteration is modulated based on the output vector obtained from the previous iteration. The modulated optical signal is then sequentially calculated with the parameter matrix and the transpose of the parameter matrix to convert the calculated optical signal into an electrical signal, obtaining the output vector for the current iteration. The parameter matrix is ​​updated based on the feature matrix. When the change in the output vector between two adjacent iterations is less than a target value, or when the number of iterations reaches a target number, the iteration is determined to end. Based on the output vector obtained from the last iteration, the key feature information of the feature matrix is ​​determined.

[0190] In some embodiments, the key feature information includes the maximum eigenvalue and the corresponding eigenvector, wherein the eigenvector includes a left eigenvector and a right eigenvector. The data processing module 200 includes a first determining unit, a first calculating unit, and a second calculating unit.

[0191] The first determining unit is used to take the output vector obtained from the last iteration as the right feature vector corresponding to the maximum feature value;

[0192] The first calculation unit is used to calculate the maximum eigenvalue based on the right eigenvector corresponding to the maximum eigenvalue and the eigenmatrix.

[0193] The second calculation unit is used to calculate the left eigenvector corresponding to the maximum eigenvalue based on the right eigenvector corresponding to the maximum eigenvalue, the eigenma matrix, and the maximum eigenvalue.

[0194] In some embodiments, the formula for calculating the maximum eigenvalue is:

[0195] ;

[0196] in, The largest eigenvalue, The feature matrix, The right eigenvector corresponding to the largest eigenvalue;

[0197] The formula for calculating the left eigenvector corresponding to the largest eigenvalue is:

[0198] ;

[0199] in, This is the left eigenvector corresponding to the largest eigenvalue.

[0200] In some embodiments, the computer program product further includes a normalization processing module.

[0201] The normalization module is used to normalize the output vector of the current iteration.

[0202] In some embodiments, the data processing module 200 is further configured to:

[0203] The feature matrix is ​​subjected to multiple data processing steps, with multiple iterations performed during each data processing step. The parameter matrix in the current data processing step is updated based on the feature matrix of the current data processing step. After determining the key feature information of the feature matrix of the current data processing step, the feature matrix of the current data processing step is reduced in order to obtain the feature matrix of the next data processing step.

[0204] In some embodiments, the data processing module 200 includes a second determining unit and a third determining unit.

[0205] The second determining unit is used to determine the feature contribution value of the current data processing based on the key feature information of the feature matrix of the current data processing.

[0206] The third determining unit is used to subtract the feature contribution value of the current data processing from the feature matrix of the current data processing to obtain the feature matrix of the next data processing.

[0207] In some embodiments, the formula for calculating the feature matrix of the (k+1)th data processing step is:

[0208] ;

[0209] in, The feature matrix of the (k+1)th data processing iteration. Let be the feature matrix of the k-th data processing. The feature contribution value for the kth data processing iteration. Let be the largest eigenvalue of the feature matrix in the k-th data processing iteration. Let be the right eigenvector corresponding to the largest eigenvalue in the k-th data processing iteration. Let be the left eigenvector corresponding to the largest eigenvalue in the k-th data processing, where k ≥ 1.

[0210] For a description of the features in the embodiment corresponding to the computer program product 10, please refer to the relevant description in the embodiment corresponding to the data processing method, which will not be repeated here.

[0211] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described data processing method embodiments.

[0212] Embodiments of this application also provide a non-volatile computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above data processing method embodiments when running.

[0213] In one exemplary embodiment, the aforementioned non-volatile computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0214] Embodiments of this application also provide another computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above data processing method embodiments.

[0215] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above data processing method embodiments.

[0216] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0217] The data processing method, product, device, and medium provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. An optical computing system, characterized in that, It includes a first input / output module, a second input / output module, an optical computing module, and a processing module; The first input / output module and the second input / output module are used to sequentially input the initial optical signal in each iteration of multiple iterations, and modulate the initial optical signal according to their latest output vector when they input the initial optical signal. The optical computing module is used to take the optical signal modulated by the first input-output module as a forward input, perform calculations with the parameter matrix, and output the calculated optical signal to the second input-output module. The optical signal modulated by the second input / output module is input in reverse order, and a calculation is performed with the transpose of the parameter matrix. The calculated optical signal is then output to the first input / output module. The parameter matrix is ​​adjusted according to the feature matrix to be processed. The first input / output module and the second input / output module are also used to convert the calculated optical signal into an electrical signal when they input the calculated optical signal, so as to obtain their respective output vectors; The processing module is used to determine the end of the iteration when the change in the output vector obtained in two adjacent iterations is less than the target value, or when the number of iterations reaches the target number. Based on the output vector obtained in the last iteration, the module determines the key feature information of the feature matrix. The key feature information includes the maximum eigenvalue and the corresponding eigenvector, and the eigenvector includes a left eigenvector and a right eigenvector. The processing module is further configured to use the output vector obtained from the last iteration as the right eigenvector corresponding to the maximum eigenvalue; calculate the maximum eigenvalue based on the right eigenvector corresponding to the maximum eigenvalue and the feature matrix; and calculate the left eigenvector corresponding to the maximum eigenvalue based on the right eigenvector corresponding to the maximum eigenvalue, the feature matrix, and the maximum eigenvalue.

2. The optical computing system according to claim 1, characterized in that, The optical computing system also includes a laser source and a first optical switch; The laser source is used to generate an initial optical signal; The first optical switch is used to switch the transmission direction of the optical signal so that, in each iteration, the initial optical signal generated by the laser source is transmitted in the forward direction to the first input / output module and in the reverse direction to the second input / output module.

3. The optical computing system according to claim 1, characterized in that, The optical computing module includes a cascaded optical modulator; The optical computing module is also used to input the optical signal modulated by the first input-output module to the first-stage optical modulator, and to calculate the parameter matrix formed by the cascaded optical modulators in the forward direction. The calculated optical signal is output from the last-stage optical modulator to the second input-output module. The optical signal modulated by the second input / output module is input to the last stage optical modulator, and the transpose matrix formed by the inverse of the cascaded optical modulator is used for calculation. The calculated optical signal is output from the first stage optical modulator to the first input / output module.

4. The optical computing system according to claim 3, characterized in that, The processing module is electrically connected to the cascaded optical modulator and is also used to update the parameters of the cascaded optical modulator according to the feature matrix, so as to adjust the parameter matrix.

5. The optical computing system according to claim 1, characterized in that, The first input / output module and the second input / output module each include a phase modulator, a photodetector, and a second optical switch; The photodetector is used to convert the input calculated optical signal into an electrical signal to obtain an output vector; The phase modulator is used to modulate the input initial optical signal according to a random vector or the latest output vector obtained by the photodetector; The second optical switch is used to switch the transmission direction of the optical signal, transmitting the optical signal modulated by the phase modulator to the optical computing module, or transmitting the calculated optical signal output by the optical computing module to the photodetector.

6. The optical computing system according to claim 5, characterized in that, The processing module is electrically connected to the phase modulator and the photodetector, respectively, and is used to obtain the output vector through the photodetector; and update the parameters of the phase modulator according to the random vector or the latest obtained output vector.

7. A data processing method, characterized in that, Applied to the optical computing system as described in any one of claims 1-6, the method comprises: Obtain the feature matrix to be processed; The feature matrix is ​​processed; multiple iterations are performed during the data processing. In each iteration, the optical signal in the current iteration is modulated based on the output vector obtained from the previous iteration. The modulated optical signal is then sequentially calculated with the parameter matrix and the transpose of the parameter matrix, and the calculated optical signal is converted into an electrical signal to obtain the output vector of the current iteration. The parameter matrix is ​​updated based on the feature matrix. When the change in the output vector obtained between two adjacent iterations is less than the target value, or when the number of iterations reaches the target number, the iteration is considered to have ended. Based on the output vector obtained from the last iteration, the key feature information of the feature matrix is ​​determined. The key feature information includes the maximum eigenvalue and the corresponding feature vector, and the feature vector includes a left feature vector and a right feature vector; The step of determining the key feature information of the feature matrix based on the output vector obtained from the last iteration includes: The output vector obtained from the last iteration is taken as the right eigenvector corresponding to the largest eigenvalue; The maximum eigenvalue is calculated based on the right eigenvector corresponding to the maximum eigenvalue and the feature matrix. Calculate the left eigenvector corresponding to the maximum eigenvalue based on the right eigenvector corresponding to the maximum eigenvalue, the eigenma matrix, and the maximum eigenvalue.

8. The data processing method according to claim 7, characterized in that, The formula for calculating the maximum eigenvalue is: ; in, The largest eigenvalue, The feature matrix, The right eigenvector corresponding to the largest eigenvalue; The formula for calculating the left eigenvector corresponding to the largest eigenvalue is: ; in, This is the left eigenvector corresponding to the largest eigenvalue.

9. The data processing method according to claim 7, characterized in that, The data processing of the feature matrix includes: The feature matrix is ​​subjected to multiple data processing steps, with multiple iterations performed during each data processing step. The parameter matrix in the current data processing step is updated based on the feature matrix of the current data processing step. After determining the key feature information of the feature matrix of the current data processing step, the feature matrix of the current data processing step is reduced in order to obtain the feature matrix of the next data processing step.

10. The data processing method according to claim 9, characterized in that, The step of reducing the order of the feature matrix of the current data processing to obtain the feature matrix of the next data processing includes: Based on the key feature information of the feature matrix of the current data processing, determine the feature contribution value of the current data processing. Subtract the feature contribution value of the current data processing from the feature matrix of the current data processing to obtain the feature matrix of the next data processing.

11. The data processing method according to claim 10, characterized in that, The key feature information includes the maximum eigenvalue and the corresponding feature vector, and the feature vector includes a left feature vector and a right feature vector; The formula for calculating the feature matrix of the (k+1)th data processing step is: ; in, The feature matrix of the (k+1)th data processing iteration. Let be the feature matrix of the k-th data processing. The feature contribution value for the kth data processing iteration. Let be the largest eigenvalue of the feature matrix in the k-th data processing iteration. Let be the right eigenvector corresponding to the largest eigenvalue in the k-th data processing iteration. Let be the left eigenvector corresponding to the largest eigenvalue in the k-th data processing, where k ≥ 1.

12. A computer program product, characterized in that, include: The acquisition module is used to acquire the feature matrix to be processed; The data processing module is used to process the feature matrix. In the data processing process, multiple iterations are performed. In each iteration, the optical signal in the current iteration is modulated based on the output vector obtained from the previous iteration. The modulated optical signal is then calculated sequentially with the parameter matrix and the transpose of the parameter matrix. The calculated optical signal is then converted into an electrical signal to obtain the output vector of the current iteration. The parameter matrix is ​​updated based on the feature matrix; when the change in the output vector obtained in two adjacent iterations is less than the target value, or when the number of iterations reaches the target number, the iteration is determined to end, and the key feature information of the feature matrix is ​​determined based on the output vector obtained in the last iteration. The key feature information includes the maximum eigenvalue and the corresponding feature vector, and the feature vector includes a left feature vector and a right feature vector; The data processing module includes: The first determining unit is used to take the output vector obtained from the last iteration as the right feature vector corresponding to the maximum feature value; The first calculation unit is used to calculate the maximum eigenvalue based on the right eigenvector corresponding to the maximum eigenvalue and the eigenmatrix. The second calculation unit is used to calculate the left eigenvector corresponding to the maximum eigenvalue based on the right eigenvector corresponding to the maximum eigenvalue, the eigenma matrix, and the maximum eigenvalue.

13. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the data processing method as described in any one of claims 7 to 11.

14. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the data processing method as described in any one of claims 7 to 11.

Citation Information

Patent Citations

  • Photon calculation solver for solving linear equation set

    CN115543012A