Intelligent light calculation attention mechanism model, method and system
Through the intelligent optical computing attention mechanism model, photon calculation is performed using the light field intermodulation propagation sub-modeling model, which solves the problems of high power consumption and calculation delay of electronic computing architecture when dealing with large-scale attention mechanism operations, and realizes efficient matrix operations and weighted calculations.
Patent Information
- Application Number
- CN202510379734.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-28
AI Technical Summary
Existing electronic computing architectures face problems of high power consumption and computational delay when dealing with large-scale attention mechanism operations.
An intelligent optical computing attention mechanism model is proposed. Through the light field intermodulation propagation sub-model, the high-speed parallel processing advantages of photon computing are utilized to realize matrix operations and weighted calculations in the attention mechanism.
Significantly accelerate the inference process of the model, reduce energy consumption, and improve the ability to process large-scale data.
Smart Images

Figure CN119886212A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of optical computing technology, and in particular to an intelligent optical computing attention mechanism model, method and system. Background Art
[0002] With the development of deep learning and large models, the complexity and scale of computing requirements for the model training process of large models are also increasing. Among them, the attention mechanism model is a key component to improve model performance, such as being widely used in the Transformer architecture. However, existing electronic computing architectures may face high power consumption and computing delays when processing large-scale attention mechanism operations. Optical computing uses photons for information transmission and processing, and has high bandwidth, low latency and parallel processing capabilities. Based on this, optical computing technology that uses photons instead of electrons as computing carriers is seen as the key to breaking the existing computing bottleneck. Summary of the invention
[0003] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.
[0004] To this end, the first purpose of the present invention is to propose an intelligent optical computing attention mechanism model. Through the light field intermodulation propagation sub-model, the high-speed parallel processing advantages of photonic computing are utilized to realize the matrix operations and weighted calculations in the attention mechanism, greatly accelerate the reasoning process of the model, reduce energy consumption, and improve the ability to process large-scale data.
[0005] The second objective of the present disclosure is to provide a question-answering processing method.
[0006] To achieve the above-mentioned purpose, the first aspect of the present disclosure proposes an intelligent optical computing attention mechanism model, and the attention mechanism model is embedded in a large model. The attention mechanism model includes multiple light field intermodulation propagation sub-models, wherein each light field intermodulation propagation sub-model is applied to each sub-head in each phrase window, wherein the phrase window is a window divided by a word vector, and the sub-head is a sub-head divided by a feature vector in each window, and the light field intermodulation propagation sub-model includes a spatial calculation module, a temporal calculation module and an output module, wherein, The spatial calculation module encodes the acquired first subvector and second subvector into the phase and / or amplitude of the spatial light field, and calculates the first subvector and the second subvector through light propagation to obtain a target first subvector; The time calculation module maps the acquired first sub-vector and second sub-vector to the phase and / or amplitude of the time-series optical signal, and calculates the first sub-vector and the second sub-vector through optical propagation to obtain a target second sub-vector; The output module performs a first fusion of the target first subvector of the space calculation module and the target second subvector of the time calculation module to obtain a target subvector.
[0007] Optionally, after the attention mechanism model obtains the target sub-vector in each light field intermodulation propagation sub-model, the target sub-vector in each light field intermodulation propagation sub-model is secondly fused to obtain a target vector, wherein the target vector is the output of the attention mechanism model.
[0008] Optionally, parallel computing of the multiple spatial computing modules is achieved through spatial multiplexing SMUX.
[0009] Optionally, the parallel calculation of the multiple time calculation modules is implemented by wavelength multiplexing WMUX.
[0010] Optionally, the intelligent optical computing attention mechanism model is used for question and answer processing.
[0011] To achieve the above-mentioned purpose, the second aspect of the present disclosure proposes a question-answering processing method, including: Get the data to answer the questions you need; Input the problem data into the large model, and determine a first vector and a second vector of an input attention mechanism model in the large model; The first vector and the second vector are calculated through the attention mechanism model to obtain a target vector, and the target vector is transmitted to a subsequent model for calculation to obtain a target answer to the question data.
[0012] Optionally, the attention mechanism model includes multiple light field intermodulation propagation sub-models; and calculating the first vector and the second vector through the attention mechanism model to obtain the target vector includes: The attention mechanism model divides the first vector and the second vector into a plurality of first sub-vectors and a plurality of second sub-vectors; Inputting the first sub-vector and the second sub-vector into corresponding light field intermodulation propagation sub-models to obtain a target sub-vector of each light field intermodulation propagation sub-model; The target sub-vectors of each light field intermodulation propagation sub-model are fused to obtain a target vector.
[0013] Optionally, the light field intermodulation propagation submodel includes a space calculation module, a time calculation module and an output module; the step of inputting the first subvector and the second subvector into the corresponding light field intermodulation propagation submodel to obtain a target subvector of each light field intermodulation propagation submodel includes: The first sub-vector and the second sub-vector are encoded into the phase and / or amplitude of the spatial light field by the spatial calculation module, and the first sub-vector and the second sub-vector are calculated by light propagation to obtain a target first sub-vector; Mapping the first sub-vector and the second sub-vector to the phase and / or amplitude of the time-series optical signal through the time calculation module, and calculating the first sub-vector and the second sub-vector through light propagation to obtain a target second sub-vector; The target subvector is obtained by fusing the target first subvector of the spatial calculation module and the target second subvector of the temporal calculation module through the output module.
[0014] Optionally, fusing the target sub-vectors of each light field intermodulation propagation sub-model to obtain the target vector includes: performing weighted fusion on the target sub-vectors of each light field intermodulation propagation sub-model to obtain the target vector.
[0015] Another object of the present invention is to provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods described in the above two aspects.
[0016] Another object of the present invention is to provide a computer storage medium, wherein the computer storage medium stores computer executable instructions; after the computer executable instructions are executed by a processor, the computer executes the methods described in the above two aspects.
[0017] In summary, the intelligent optical computing attention mechanism model, method and system provided by the present invention, through the light field intermodulation propagation sub-model, utilizes the high-speed parallel processing advantages of photonic computing to realize the matrix operations and weighted calculations in the attention mechanism, greatly accelerates the reasoning process of the model, reduces energy consumption, and improves the ability to process large-scale data.
[0018] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which: Figure 1 A schematic diagram of the structure of an intelligent optical computing attention mechanism model provided by an embodiment of the present disclosure; Figure 2 A schematic diagram of the structure of a multi-head multi-window distributed architecture proposed in an embodiment of the present disclosure; Figure 3 A flowchart of a question-answering processing method proposed in an embodiment of the present disclosure; Figure 4 A structural diagram of a question-answering processing system provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0021] The present disclosure is described in detail below with reference to specific embodiments.
[0022] Figure 1 This is a schematic diagram of the structure of an intelligent optical computing attention mechanism model provided by an embodiment of the present disclosure. Figure 1 As shown, the attention mechanism model includes multiple light field intermodulation propagation sub-models, wherein the light field intermodulation propagation sub-model includes a spatial calculation module 101, a time calculation module 102 and an output module 103, wherein, The spatial calculation module 101 encodes the acquired first sub-vector and second sub-vector into the phase and / or amplitude of the spatial light field, and calculates the first sub-vector and second sub-vector through light propagation to obtain a target first sub-vector; The time calculation module 102 maps the acquired first sub-vector and second sub-vector to the phase and / or amplitude of the time-series optical signal, and calculates the first sub-vector and second sub-vector through optical propagation to obtain a target second sub-vector; The output module 103 performs a first fusion on the target first sub-vector of the space calculation module and the target second sub-vector of the time calculation module to obtain a target sub-vector.
[0023] In one embodiment of the present disclosure, the above-mentioned large model can be applied to a variety of scenarios, such as intelligent question and answer processing scenarios.
[0024] Among them, in one embodiment of the present disclosure, the above-mentioned light field intermodulation propagation model can complete continuous light calculation in dimensions such as space and time, and proposes a spatial multiplexing and spectral multiplexing calculation model to match the space-time domain light calculation dimension for the intrinsic dimensional mismatch problem of the spatial light field and the time-series light field. Among them, all spatial and time-series calculation operations are completed in the optical simulation domain. Based on this, the speed of space-time domain light calculation is not restricted by the transmission and reading and writing of electronic memory, so as to support high-speed reasoning of complex visual intelligence tasks.
[0025] In one embodiment of the present disclosure, the light field intermodulation propagation submodel includes a spatial calculation module, a temporal calculation module and an output module. The spatial calculation module encodes the acquired first subvector and second subvector into the phase and / or amplitude of the spatial light field, and calculates the first subvector and second subvector through light propagation to obtain the target first subvector. The spatial calculation module can perform a large number of operations at the speed of light and fully extract spatial information from each time frame. And the temporal calculation module maps the acquired first subvector and second subvector into the phase and / or amplitude of the time-series optical signal, and calculates the first subvector and second subvector through light propagation to obtain the target second subvector.
[0026] Among them, in one embodiment of the present disclosure, parallel computing of multiple spatial computing modules can be achieved through spatial multiplexing SMUX and parallel computing of multiple time computing modules can be achieved through wavelength multiplexing WMUX to solve the problem of most information loss caused by coupling of spatial content to a single-mode timing channel.
[0027] Furthermore, in one embodiment of the present disclosure, after the attention mechanism model obtains the target sub-vector in each light field intermodulation propagation sub-model, the target sub-vector in each light field intermodulation propagation sub-model can be secondly fused to obtain a target vector, wherein the target vector is the output of the attention mechanism model.
[0028] Further, in one embodiment of the present disclosure, each of the above-mentioned light field intermodulation propagation sub-models is applied to each sub-head in each phrase window, where the phrase window is a window divided by a word vector, and the sub-head is a sub-head divided by a feature vector in each window. Specifically, in one embodiment of the present disclosure, through a multi-head multi-window distributed architecture, large feature dimension network operations and large matrix operations are implemented with parallel optical computing units, achieving high energy efficiency and high speed large model reasoning and training.
[0029] In one embodiment of the present disclosure, Figure 2 This is a schematic diagram of a multi-head multi-window distributed architecture proposed in an embodiment of the present disclosure. Figure 2 As shown, the multi-head multi-window distributed architecture can include a distributed multi-window computing architecture and a distributed multi-head computing architecture. Among them, the input of the large model network composed of a certain number of word vectors can be evenly decomposed into multiple phrase windows along the word vector dimension to obtain a distributed multi-window computing architecture. In addition, the self-attention mechanism model takes effect in each phrase window to collect the correlation information between the word vectors in the window. At the same time, the information exchange between the windows is used to realize the global radiation of the self-attention mechanism and build context-related connections.
[0030] And, in one embodiment of the present disclosure, in each of the above windows, the features can be evenly decomposed into several sub-heads containing partial information along the word feature dimension to obtain a distributed multi-head computing architecture. Among them, in one embodiment of the present disclosure, after obtaining the multi-head multi-window distributed architecture through the above steps, the above light field intermodulation propagation sub-model can be applied to each sub-head in each phrase window, so that a feature processing network with large feature dimensions can be realized by using efficient parallel optical computing, supporting high-speed calculation of feature mapping in the Transformer unit.
[0031] The intelligent optical computing attention mechanism model of the disclosed embodiment, through the light field intermodulation propagation sub-model, utilizes the high-speed parallel processing advantages of photonic computing to realize matrix operations and weighted calculations in the attention mechanism, greatly accelerates the reasoning process of the model, reduces energy consumption, and improves the ability to process large-scale data.
[0032] In order to implement the above embodiment, Figure 3 The present disclosure also proposes a question-answering processing method, which may include the following steps: Step 301, obtaining question data that needs to be answered; Step 302, input the problem data into the large model, and determine the first vector and the second vector of the input attention mechanism model in the large model; Step 303, calculate the first vector and the second vector through the attention mechanism model to obtain a target vector, and transmit the target vector to a subsequent model for calculation to obtain a target answer to the question data.
[0033] In one embodiment of the present disclosure, the attention mechanism model includes multiple light field intermodulation propagation sub-models; and a method for obtaining a target vector by calculating a first vector and a second vector through the attention mechanism model may include the following steps: Step 1: The attention mechanism model divides the first vector and the second vector into multiple first sub-vectors and multiple second sub-vectors; Step 2: input the first sub-vector and the second sub-vector into the corresponding light field intermodulation propagation sub-model to obtain the target sub-vector of each light field intermodulation propagation sub-model; Step 3: Fuse the target sub-vectors of each light field intermodulation propagation sub-model to obtain the target vector.
[0034] In one embodiment of the present disclosure, the light field intermodulation propagation submodel includes a space calculation module, a time calculation module and an output module; the method of inputting the first subvector and the second subvector into the corresponding light field intermodulation propagation submodel to obtain the target subvector of each light field intermodulation propagation submodel may include the following steps: Step a: encoding the first subvector and the second subvector into the phase and / or amplitude of the spatial light field through a spatial calculation module, and calculating the first subvector and the second subvector through light propagation to obtain a target first subvector; Step b, mapping the first subvector and the second subvector to the phase and / or amplitude of the time-series optical signal through a time calculation module, and calculating the first subvector and the second subvector through optical propagation to obtain a target second subvector; Step c: fusing the target first subvector of the spatial calculation module and the target second subvector of the temporal calculation module through the output module to obtain a target subvector.
[0035] In one embodiment of the present disclosure, the method of fusing the target first subvector of the spatial calculation module and the target second subvector of the time calculation module through the output module to obtain the target subvector may include: performing weighted fusion of the target first subvector of the spatial calculation module and the target second subvector of the time calculation module through the output module to obtain the target subvector. In one embodiment of the present disclosure, the weights in the weighted fusion may be set by manual experience.
[0036] In the disclosed embodiment, the question-answering processing method uses multiple light field intermodulation propagation sub-models and the high-speed parallel processing advantages of photon computing to realize matrix operations and weighted calculations in the attention mechanism, greatly accelerate the reasoning process of the model, reduce energy consumption, and improve the ability to process large-scale data.
[0037] In order to implement the above embodiment, Figure 4 The present disclosure also proposes a question-answering processing system, which may include: The acquisition module 401 is used to acquire the question data that needs to be answered; A determination module 402 is used to input the problem data into the large model and determine the first vector and the second vector of the input attention mechanism model in the large model; The calculation module 403 is used to calculate the first vector and the second vector through the attention mechanism model to obtain the target vector, and transmit the target vector to the subsequent model for calculation to obtain the target answer to the question data.
[0038] In one embodiment of the present disclosure, the attention mechanism model includes multiple light field intermodulation propagation sub-models; the above-mentioned calculation module is specifically used to: The attention mechanism model divides the first vector and the second vector into multiple first sub-vectors and multiple second sub-vectors; Inputting the first sub-vector and the second sub-vector into the corresponding light field intermodulation propagation sub-model to obtain a target sub-vector of each light field intermodulation propagation sub-model; The target sub-vectors of each light field intermodulation propagation sub-model are fused to obtain the target vector.
[0039] In one embodiment of the present disclosure, the light field intermodulation propagation sub-model includes a spatial calculation module, a temporal calculation module and an output module; the above-mentioned calculation module is specifically used to: The first sub-vector and the second sub-vector are encoded into the phase and / or amplitude of the spatial light field by a spatial calculation module, and the first sub-vector and the second sub-vector are calculated by light propagation to obtain a target first sub-vector; Mapping the first sub-vector and the second sub-vector to the phase and / or amplitude of the time-series optical signal through a time calculation module, and calculating the first sub-vector and the second sub-vector through optical propagation to obtain a target second sub-vector; The target subvector is obtained by fusing the target first subvector of the spatial calculation module and the target second subvector of the temporal calculation module through the output module.
[0040] In one embodiment of the present disclosure, the above-mentioned calculation module is also used to: perform weighted fusion of the target first subvector of the spatial calculation module and the target second subvector of the temporal calculation module through the output module to obtain the target subvector.
[0041] In the disclosed embodiment, the question-and-answer processing system uses multiple light field intermodulation propagation sub-models and the high-speed parallel processing advantages of photonic computing to implement matrix operations and weighted calculations in the attention mechanism, greatly accelerate the reasoning process of the model, reduce energy consumption, and improve the ability to process large-scale data.
[0042] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this disclosure shall comply with the relevant laws and regulations and shall not violate public order and good morals.
[0043] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0044] The present disclosure anticipates providing implementation schemes for users to selectively block the use or access of personal information data. That is, the present disclosure anticipates providing hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, risks can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.
[0045] The acquisition, transmission, storage, use, and processing of data in the technical solution disclosed in this disclosure are in compliance with the relevant provisions of national laws and regulations.
[0046] It should be noted that in the embodiments of the present disclosure, certain software, components, models and other existing solutions in the industry may be mentioned, which should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0047] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they contradict each other.
[0048] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0049] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.
[0050] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0051] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0052] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0053] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0054] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.
Claims
1. An intelligent optical computing attention mechanism model, characterized in that: The attention mechanism model is embedded in the large model, wherein the attention mechanism model includes multiple light field intermodulation propagation sub-models, wherein each light field intermodulation propagation sub-model is applied to each sub-head in each phrase window, wherein the phrase window is a window divided by a word vector, and the sub-head is a sub-head divided by a feature vector in each window, and the light field intermodulation propagation sub-model includes a spatial calculation module, a temporal calculation module and an output module, wherein, The spatial calculation module encodes the acquired first subvector and second subvector into the phase and / or amplitude of the spatial light field, and calculates the first subvector and the second subvector through light propagation to obtain a target first subvector; The time calculation module maps the acquired first sub-vector and second sub-vector to the phase and / or amplitude of the time-series optical signal, and calculates the first sub-vector and the second sub-vector through optical propagation to obtain a target second sub-vector; The output module performs a first fusion of the target first subvector of the space calculation module and the target second subvector of the time calculation module to obtain a target subvector.
2. The model according to claim 1, characterized in that After the attention mechanism model obtains the target sub-vector in each light field intermodulation propagation sub-model, the target sub-vector in each light field intermodulation propagation sub-model is secondly fused to obtain a target vector, wherein the target vector is the output of the attention mechanism model.
3. The model according to claim 1, characterized in that The parallel computing of the multiple spatial computing modules is realized through spatial multiplexing SMUX.
4. The model according to claim 1, characterized in that The parallel calculation of the multiple time calculation modules is realized by wavelength multiplexing WMUX.
5. The intelligent optical computing attention mechanism model according to any one of claims 1 to 4, characterized in that: Used for question and answer processing.
6. A question-answering processing method, characterized in that: include: Get the data to answer the questions you need; Input the problem data into the large model, and determine a first vector and a second vector of an input attention mechanism model in the large model; The first vector and the second vector are calculated through the attention mechanism model to obtain a target vector, and the target vector is transmitted to a subsequent model for calculation to obtain a target answer to the question data.
7. The method according to claim 6, characterized in that The attention mechanism model includes a plurality of light field intermodulation propagation sub-models; and calculating the first vector and the second vector through the attention mechanism model to obtain a target vector includes: The attention mechanism model divides the first vector and the second vector into a plurality of first sub-vectors and a plurality of second sub-vectors; Inputting the first sub-vector and the second sub-vector into corresponding light field intermodulation propagation sub-models to obtain a target sub-vector of each light field intermodulation propagation sub-model; The target sub-vectors of each light field intermodulation propagation sub-model are fused to obtain a target vector.
8. The method according to claim 7, characterized in that The light field intermodulation propagation submodel includes a space calculation module, a time calculation module and an output module; the first subvector and the second subvector are input into the corresponding light field intermodulation propagation submodel to obtain the target subvector of each light field intermodulation propagation submodel, including: The first sub-vector and the second sub-vector are encoded into the phase and / or amplitude of the spatial light field by the spatial calculation module, and the first sub-vector and the second sub-vector are calculated by light propagation to obtain a target first sub-vector; Mapping the first sub-vector and the second sub-vector to the phase and / or amplitude of the time-series optical signal through the time calculation module, and calculating the first sub-vector and the second sub-vector through light propagation to obtain a target second sub-vector; The target first sub-vector of the spatial calculation module and the target second sub-vector of the temporal calculation module are merged through the output module to obtain a target sub-vector.
9. The method according to claim 6, characterized in that The step of fusing the target first subvector of the spatial calculation module and the target second subvector of the temporal calculation module through the output module to obtain the target subvector includes: performing weighted fusion of the target first subvector of the spatial calculation module and the target second subvector of the temporal calculation module through the output module to obtain the target subvector.
10. A computer storage medium, wherein: The computer storage medium stores computer executable instructions; after the computer executable instructions are executed by the processor, the method according to any one of claims 6 to 9 can be implemented.
Citation Information
Patent Citations
Optical diffraction neural network online training method and system
CN110929864A
Question answering method and device, electronic equipment and storage medium
CN112131364A
Neuromorphic intelligent optical computing architecture system and device
CN116739064A
Photoelectric calculation method and system for realizing multi-modal machine learning
CN117371503A
Neurocomputer
GB8915308D0