A signal encoding and decoding method and system suitable for optical convolution computation
By employing signal encoding and decoding methods and systems in optical convolution calculations, the signal distortion problem was solved, the accuracy and system integration of optical convolution calculations were improved, and an efficient encoding and decoding process was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-04
- Publication Date
- 2026-03-31
AI Technical Summary
In existing optical convolution operations, signal distortion occurs after the signal is finally converted into an electrical signal, especially DC imbalance caused by long '0' and long '1' signals, which affects the accuracy of sampling results. There is a lack of effective encoding and decoding methods and systems.
A signal encoding and decoding method and system suitable for optical convolution calculation is adopted. By mapping the N-bit original signal to the M-bit signal, the DC balance of the signal is ensured. Encoding and decoding are performed under the condition of K optical channels. The encoding module, optical convolution calculation module, signal sampling module and decoding module are used to ensure that the signal is not distorted in optical convolution calculation.
It improves the accuracy of optical convolution calculation, reduces the probability of signal demodulation errors, and achieves efficient encoding and decoding processes and high system integration.
Smart Images

Figure CN116846514B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optoelectronic technology, and specifically relates to a signal encoding and decoding method and system suitable for optical convolution calculation. Background Technology
[0002] In recent years, many emerging fields, especially artificial intelligence, have pursued powerful computing capabilities in order to utilize neural networks to study problems such as image processing, text recognition, object classification, and natural language processing. However, a simple neural network may contain hundreds of millions of parameters, and in order to achieve good results, it is often necessary to continuously train a network, which means that massive amounts of computation are required.
[0003] Especially for ChatGPT, which exploded in popularity in 2023, its predecessor, GPT3, boasted a staggering 175 billion parameters and a massive 45TB of data, requiring tens of thousands of the most advanced GPUs available at the time for training. However, due to the current state of semiconductor lithography manufacturing processes approaching physical limits, with transistor units nearing the molecular scale, the growth in computing power of electronic chips is constrained. Furthermore, along with the increase in computing power, power consumption is also increasing. Therefore, there is an urgent need to find a computing method that offers significant improvements in computing power while maintaining low power consumption.
[0004] Optical computing is currently a highly attractive computing method, considered one of the most promising ways to solve the Moore's Law dilemma and the von Neumann architecture problem, i.e., to address the current issues of computing power and power consumption. Optical computing possesses inherent parallel computing characteristics, with extremely high processing speed and low power consumption. Currently, various optical computing methods have been proposed, such as spatial optical computing and programmable optical computing based on Mach-Zehnder interferometer arrays. Optical convolution is a hot topic. In 2021, Nature published an article titled "11TOPS photonic convolutional accelerator for optical neural networks." This article demonstrates a general-purpose optical vector convolution accelerator with a computation speed exceeding 10 TOPS (10 trillion operations per second). Optical convolutional neural networks based on this accelerator can recognize handwritten digit images with a success rate of up to 88%.
[0005] The significant advantages of optical convolution operations have been discovered and utilized in a wider range of scenarios. Currently, in optical convolution architectures, optical signals must be converted into electrical signals before sampling, thus introducing signal distortion. Aside from external factors, one of the most significant sources of interference is the encoding of the electrical signal applied to the electro-optic modulator. Long '0' and long '1' signals result in a non-DC-equalized electrical signal output by the photodetector, which is then interfered with by filtering in subsequent sampling circuits, distorting the sampled signal and leading to a significant discrepancy between the final sampled result and the theoretical value. However, there is currently limited research on signal encoding for optical convolution operations, and no widely used encoding / decoding methods or mature optical convolution encoding / decoding systems exist. Summary of the Invention
[0006] To address the signal encoding and decoding problems in optical convolution operations as described in the background, this invention aims to provide a signal encoding and decoding method and system suitable for optical convolution calculations. This system can completely perform encoding, decoding, computation, and sampling operations on signals during optical convolution operations, thereby obtaining accurate convolution results. The encoding and decoding method of this invention can ensure that, when performing optical convolution calculations on massive amounts of data, it avoids code distortion and decoding errors caused by DC imbalance, reducing the probability of signal demodulation errors in optical convolution calculations.
[0007] To achieve the above-mentioned technical objectives, the technical solution adopted by the present invention is as follows:
[0008] A signal encoding and decoding method suitable for optical convolution computation includes a signal encoding method and a signal decoding method for optical convolution computation.
[0009] The aforementioned signal encoding method for optical convolution computation converts an N-bit original signal into an M-bit signal using an encoding mapping method. The N-bit signal contains 2^M bits of information. N Considering both positive and non-positive RD values, there are a total of 2 N+1 Each encoding pair, with one N-bit encoding uniquely corresponding to one M-bit encoding based on the current RD conditions.
[0010] The signal encoding method for optical convolution calculation further includes the following: the original signal length N, the encoded signal length M, and the number of optical channels K should satisfy the following:
[0011] M≥N+K-1.
[0012] The signal encoding method for optical convolution computation further includes: finding 2 through computation. N+1 A set of encoding pairs is used to map an N-bit signal to an M-bit signal. All non-repeating M-bit codes in the encoding pair are convolved to obtain codes that are not identical to each other.
[0013] The signal encoding method for optical convolution computation described above results in an M-bit signal stream that is a DC-equalized signal stream.
[0014] The signal decoding method for optical convolution computation described above can directly map back to the original M-bit signal after K-wavelength optical convolution operations, based on the decoding mapping method.
[0015] The mapping method in the signal decoding method of optical convolution calculation, based on calculation 2 N+1 The result of convolving the encoded pairs with the convolution kernel and the theoretical convolution value of the original signal with the convolution kernel are used to obtain 2 N+1 Each decoder uniquely corresponds to the result of convolving an original N-bit signal with K wavelengths of light.
[0016] A signal encoding and decoding system suitable for optical convolution calculation includes an encoding module, an optical convolution calculation module, a signal sampling module, and a decoding module.
[0017] The encoding module encodes the signal sequentially into an M-bit signal, using an encoding method, with each N-bit bit as a unit.
[0018] The optical convolution calculation module includes an electro-optic modulator, a dispersive fiber, a photodetector, and an optical intensity weighting adjustment module.
[0019] The encoded signal is loaded onto an electro-optic modulator to modulate the K-channel optical signals. The modulated optical signal is then output to a dispersive fiber.
[0020] Due to the dispersion effect, the K optical signals input to the dispersive fiber have a 1-bit time delay between each other before entering the photodetector.
[0021] The photodetector converts the input optical signal into an electrical signal and then outputs it to the sampling module.
[0022] The light intensity weighting adjustment module adjusts the light intensity values of different wavelengths using instruments and devices including, but not limited to, programmable filters and wavelength-selective switches. Its position within the optical convolution calculation module is flexible; it can be inserted before the electro-optic modulator, between the electro-optic modulator and the dispersive fiber, or between the dispersive fiber and the photodetector.
[0023] The signal sampling module includes an analog-to-digital converter (ADC). The ADC receives the electrical signal output from the optical convolution calculation module, samples it according to the sampling frequency, and outputs the digital signal to the decoding module.
[0024] The decoding module, through a decoding method, restores the original N-bit signal after convolution with K wavelengths of light into an electrical signal output from the signal sampling module.
[0025] The beneficial effects of adopting the above technical solution are as follows:
[0026] (1) The signal encoding and decoding method for optical convolution calculation described in this invention has low complexity and the encoding and decoding process is simple and easy to implement.
[0027] (2) The signal encoding and decoding method for optical convolution calculation described in this invention solves the problem of code distortion that occurs when optical convolution calculation processes non-DC equalized signals, thereby improving the accuracy of optical convolution calculation.
[0028] (3) The signal encoding and decoding system for optical convolution calculation described in this invention has a high degree of module integration, systematically solves the encoding and decoding problem of optical convolution operation, has few input parameters, and is simple to control. Attached Figure Description
[0029] Figure 1 This is a framework diagram of a signal encoding and decoding system suitable for optical convolution computation;
[0030] Figure 2 This is a schematic diagram illustrating the process of obtaining effective convolution information by performing convolution operations on M bits and K wavelengths in one embodiment.
[0031] Figure 3 This is a schematic diagram of electrical signal encoding in the embodiment;
[0032] Figure 4 This is a framework diagram of the optical convolution calculation module in the embodiment;
[0033] Figure 5 This is a schematic diagram of the delay effect of the dispersive fiber in the embodiment;
[0034] Figure 6 This is a schematic diagram of the optical convolution calculation process in the embodiment;
[0035] Figure 7 This is a schematic diagram of signal decoding in the embodiment;
[0036] Figure 8 This is a schematic diagram of the 4x4 matrix vectorization and encoding process in the embodiment;
[0037] Figure 9 This is a schematic diagram illustrating the optical convolution calculation and decoding process of the encoded data in the embodiment.
[0038] Figure 10 This is the theoretical result of convolving a 4x4 matrix with a convolution kernel in the example.
[0039] Figures 11-1 to 11-4These are the encoding pairs in the embodiments;
[0040] Figures 12-1 to 12-4 These are the decoding pairs in the embodiments;
[0041] Figure 13 This is a comparison diagram of the demodulation effects of uncoded and coded signals in the embodiment.
[0042] Figure labeling: 100, encoding module; 200, optical convolution calculation module; 300, signal sampling module; 400, decoding module; 201, electro-optic modulator; 202, dispersive fiber; 302, photodetector. N, original signal length; M, encoded signal length; K, number of optical channels, also the number of convolution kernel elements. Detailed Implementation
[0043] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0044] This invention designs a signal encoding and decoding system suitable for optical convolution calculations. The system is as follows: Figure 1 As shown, the system includes an encoding module 100, an optical convolution calculation module 200, a signal sampling module 300, and a decoding module 400. Signals passing through this system can undergo optical convolution operations.
[0045] First, describe 2 in detail. N+1 Algorithm for calculating and finding N-bit–M-bit encoded and decoded pairs:
[0046] a) For N bits, there are a total of 2^N bit combinations. N There are two categories: Category A: DC balanced (equal number of '0's and '1's) and the length of consecutive '0's or '1's does not exceed 5, i.e., perfectly balanced code; Category B: all others. Category A codes already meet the DC balanced condition and do not need to consider the current RD value encoding; therefore, their encoding can be the same or different for both RD value cases (RD is positive or negative). Category B codes, however, must be encoded according to the current RD value for DC compensation. Therefore, there are a total of 2... N+1 N-bit–M-bit encoded pairs. The RD value refers to a statistic of the data stream disparity, which is the difference between the number of '1's and '0's.
[0047] b) Since the convolution kernel has K elements, K-1 bits will inevitably be lost during optical convolution. To ensure information integrity, the following must be satisfied:
[0048] M≥N+K-1
[0049] Therefore, M starts by incrementing its value from N+K-1.
[0050] c) For an M-bit number, we can find all combinations where the number of '0's and '1's is the same and the length of consecutive '0's or '1's does not exceed 5. For a 4-bit number, we can find 6 such combinations. When M is large, the conditions can be relaxed: the difference in the number of '0's and '1's in the combinations does not exceed 2, and the length of consecutive '0's or '1's does not exceed 5. Assume we find a total of Q combinations that meet these conditions. Q ≥ 2 N+1 Otherwise, increment the value of M by 1 and continue searching.
[0051] d) For Q M-bit combinations, convolve each of them with K wavelengths to obtain Q types of effective convolution information, such as... Figure 2 As shown. Two values are arbitrarily extracted from Q types of valid convolutional information. N+1 Two non-repeating elements, corresponding to which convolution operations are performed. N+1 An M-bit combination is an encoding combination, which, together with all N-bit numbers, forms an N-bit-M-bit encoding pair. If the number of non-repeating elements in the Q types of effective convolutional information is less than 2... N+1 If M is incremented by 1, step c is repeated.
[0052] e) The one-to-one correspondence requirement in the N-bit-M-bit encoding pair is: if the RD value in the N-bit code is positive, the corresponding RD value in the M-bit code is negative; conversely, if the RD value in the N-bit code is negative, the corresponding RD value in the M-bit code is positive. After fixing the encoding pair correspondence, all N-bit combinations are convolved with K wavelengths to obtain 2T... N The effective convolution values constitute the decoded combination. This is combined with the 2 obtained in step d). N+1 Each valid convolutional information corresponds to and 2 N+1 Each valid convolutional information is mapped unidirectionally back to the decoded combination. The decoding relationship is not a one-to-one correspondence; rather, multiple code patterns may correspond to the same decoder, but each code pattern uniquely corresponds to one decoder. This yields the encoded pair and the decoded pair.
[0053] The working process of the system is described below:
[0054] K optical signal inputs of different wavelengths, which are not limited to those from multi-wavelength lasers or K separate single-wavelength lasers.
[0055] The signal that needs to be convolved is encoded by the encoding module. The encoding process is as follows: Figure 3 As shown, a mapping transformation is performed sequentially on a continuous N-bit signal. Based on the sign of the current RD value, the N-bit signal is mapped to a DC-balanced M-bit signal. The mapping method is based on 2... N+1 A pair of N-bit–M-bit codes.
[0056] K optical signals enter the optical convolution calculation module, the overall framework of which is as follows: Figure 4 As shown, the encoded signal is loaded onto an electro-optic modulator to modulate light of different wavelengths. Different voltages applied to the electro-optic modulator result in different output light intensities. Therefore, after modulation, the information carried by the original encoded signal is transmitted to the optical signal through the modulator; that is, the optical signals of different wavelengths now carry the encoded original data signal to be used for convolution. The K optical signals carrying this information are then input into a dispersive fiber. Due to the dispersion effect, the K different wavelengths of light will have a certain propagation delay between each other. Appropriate wavelengths and dispersive fiber parameters can be selected to create a 1-bit delay between the K optical signals, such as... Figure 5 As shown.
[0057] In optical convolution calculations, the intensity of light signals at different wavelengths plays the role of kernel elements in ordinary convolution calculations. The weighting of these kernel elements is achieved through a light intensity weighting module. K different wavelengths of light enter this module, and their intensity is adjusted by instruments and devices, including but not limited to programmable filters, wavelength selection switches, and waveform shapers, to assign weights. These devices can apply different attenuations to light signals of different wavelengths, achieving a similar effect to weighting. Furthermore, the weight values are relative; therefore, they are not limited to 0 and 1, but can be infinitely expanded while meeting instrument accuracy requirements. It is worth noting that the light intensity weighting module is flexible in its placement; it can be placed anywhere before the photodetector in the optical convolution calculation module, such as... Figure 4 As shown by the dashed line.
[0058] Finally, the modulated, dispersion-delayed, and weighted optical signals are received by the photodetector and converted into electrical signals. Since the responsivity of the photodetector does not vary significantly within a certain wavelength range, it can be considered a natural linear adder. K optical signals, each offset by 1 bit, pass through the photodetector, where their intensities are superimposed and converted into an electrical signal output. This output electrical signal carries information about the convolution operation result. The specific convolution calculation process and formula are as follows: Figure 6 As shown. Due to signal loss in the optical convolution module, an optical signal amplifier may be needed to amplify the signal intensity, depending on the loss characteristics. The optical signal amplifier is flexible in placement and can be located anywhere before the photodetector in the optical convolution calculation module.
[0059] The electrical signal carrying the result of the convolution operation, output by the photodetector, enters the signal sampling module. This module uses an analog-to-digital converter (ADC) to sample the input signal and outputs the sampled data to the decoding module.
[0060] Because the optical signal is misaligned by 1 bit during convolution calculation, and the preceding M-bit encoded signal is completely unrelated to the following M-bit encoded signal, the convolution result will contain invalid convolution information, such as... Figure 6 As shown. To prevent the loss of original information during convolution, the original signal length N, the encoded signal length M, and the number of optical channels K should satisfy the following:
[0061] M≥N+K-1
[0062] This condition involves adding a certain amount of redundancy to the encoding. At this point, the encoding efficiency is...
[0063] The decoding module only retains valid convolutional information. The overall decoding method is as follows: Figure 7 As shown, the decoding module calculates 2 N+1 The result of convolving the encoded pair with the convolution kernel and the theoretical convolution value of the original N-bit signal with the convolution kernel are used to obtain 2 N+1 Each decoding pair directly obtains the result of the original M-bit signal after convolution calculation by mapping the effective convolution information.
[0064] The following example uses a randomly generated 4x4 matrix and a convolution kernel kernel = [[1,0],[1,0]] to perform a convolution operation with a stride of 2, to illustrate the overall operation of the encoding / decoding method and system proposed in this invention.
[0065] First, the matrix data is vectorized into a 1x16 vector based on the kernel size and stride parameter, such as... Figure 8 As shown. In this embodiment, 8 bits are selected as the encoding unit, encoding into a 14-bit encoded signal. The number of optical channels is the number of elements in the convolutional kernel. Parameters N=8, M=14, K=4, and the encoding efficiency is 57.14%. At this point, through calculation, a suitable encoding pair and decoding pair are found: 2 9 A pair of codes, such as Figures 11-1 to 11-4 As shown, and 2 9 A decoding pair, such as Figures 12-1 to 12-4 As shown
[0066] The vector is encoded sequentially in 8-bit units by the encoding module into a 1x28 vector, with the initial RD value set to 0. The encoded signal is loaded onto the electro-optic modulator to modulate the four optical signals. The four optical signals are first input to the light intensity weight adjustment module. According to the convolution kernel kernel = [[1,0], [1,0]], the intensity is adjusted to 1, 1, 0, and 0 light intensity units respectively, i.e., the weights are 1, 1, 0, and 0, before being output to the optical convolution calculation module. After passing through the optical convolution calculation module, convolution data information, including valid and invalid convolution information, is obtained. This information is received by the sampling module and passed to the decoding module. The decoding module directly obtains the convolution operation result of the original data through decoding mapping based on the 11-bit valid convolution information. Finally, after removing the intermediate redundant data in the convolution calculation, the convolution calculation result of the initial 4x4 matrix and the kernel convolution is obtained. The entire calculation and decoding process is as follows: Figure 9 As shown. The theoretical convolution calculation result is as follows: Figure 10 As shown, the results are completely consistent with those obtained from optical convolution calculations.
[0067] This invention also compares the demodulation effects of uncoded signals and coded signals, such as... Figure 13 As shown, when performing calculations on unbalanced DC signals, the unencoded signal suffers from DC imbalance, resulting in signal distortion and a significant difference between the demodulation result and the theoretical value. However, after encoding the signal using the encoding method of this invention, the signal achieves DC balance, and the decoding and demodulation result basically matches the theoretical value.
[0068] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A signal coding method suitable for optical convolution computation, characterized by: The application relates to a signal encoding method and a signal decoding method of optical convolution calculation. The signal coding method of the optical convolution calculation comprises: converting an N bit original signal into an M bit signal through an encoding mapping method; the information capacity contained in the N bit signal is 2 N , and there are 2 N+1 encoding pairs in total considering the cases that the RD value is positive or non-positive, one N bit encoding uniquely corresponds to one M bit encoding according to the current RD condition; 2 N+1 encoding pairs are found through calculation, so that the N bit signal is mapped into the M bit signal according to the encoding pairs; all non-repeated M bit encodings in the encoding pairs are not repeated with each other after K wavelength optical convolution operations; and the encoded M bit signal stream is a DC balanced signal stream. The signal encoding method of optical convolution calculation comprises the following steps: 。 2. The signal encoding and decoding method for optical convolution computation according to claim 1, characterized in that: The signal decoding method of optical convolution calculation comprises the following steps: the M bit signal obtained after the K wavelength optical convolution operation of the encoded signal can be directly mapped back to the signal after the K wavelength optical convolution operation of the original M bit signal according to a decoding mapping method.
3. The signal encoding and decoding method for optical convolution computation according to claim 2, characterized in that: The mapping method in the signal decoding method of the light convolution calculation, according to the calculation of two N+1 encoding pairs and the theoretical convolution value of the original signal and the convolution kernel, two decoding pairs are obtained N+1 One decoding corresponds to one original N bit signal and the result of the convolution calculation of K wavelengths of light.
4. A signal coding system suitable for optical convolution computation for implementing the method of any one of claims 1 to 3, characterized in that: The system comprises an encoding module, an optical convolution calculation module, a signal sampling module and a decoding module. The encoding module is used for encoding the signal into an M bit signal by the encoding method in N bit units. The optical convolution calculation module comprises an electro-optical modulator, a dispersion optical fiber, a photoelectric detector and an optical intensity weight adjusting module. The signal sampling module comprises an analog-digital converter (ADC). The decoding module is used for restoring the electrical signal output by the signal sampling module into the signal after the K wavelength optical convolution operation of the original N bit signal by the decoding method.
5. A signal encoding and decoding system suitable for optical convolutional computation according to claim 4, characterized in that: The optical intensity weight adjusting module adopts an instrument device comprising a programmable filter and an optical wavelength selection switch.
6. A signal encoding and decoding system suitable for optical convolutional computation according to claim 4 or 5, characterized in that: The optical intensity weight adjusting module can be inserted before the electro-optical modulator, between the electro-optical modulator and the dispersion optical fiber or between the dispersion optical fiber and the photoelectric detector.
Citation Information
Patent Citations
Line coding method and apparatus
CN102844988A
Coding method and apparatus and decoding method and apparatus in optical communication system, system
CN103795492A