Data processing method and system based on artificial intelligence chip
Through data processing methods based on artificial intelligence chips, including feature extraction, sparse pulse sequence conversion, dynamic routing algorithms and photoelectric computing, the problem of insufficient real-time and data transmission accuracy in high-priority task processing is solved, and efficient and reliable data processing effects are achieved.
Patent Information
- Application Number
- CN202510416491.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-03
AI Technical Summary
The prior art has problems with insufficient real-time and data transmission accuracy when handling high-priority tasks, especially in scenarios such as autonomous driving, where delays and data loss may lead to serious consequences.
Using a data processing method based on artificial intelligence chips, the original data is acquired for preprocessing and feature extraction, converted into a sparse pulse sequence, and priority tags are attached according to the real-time requirements of the task. Then, the data transmission path is optimized using dynamic routing algorithms and time division multiplexing and wavelength division multiplexing technologies. The memristor array is activated by photoelectric conversion, the multiplication and accumulation operation is performed, and the conductance value is adjusted using the STDP rule to generate the final pulse sequence. Finally, the pulse sequence is subject to error detection and switch to the backup nanowire electronic link when necessary for verification bit transmission and retransmission request.
It realizes efficient feature extraction and data transmission, ensures real-time and data accuracy of high-priority tasks, and improves the overall reliability and calculation accuracy of the system.
Smart Images

Figure CN119918596A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a data processing method and system based on an artificial intelligence chip. Background Art
[0002] With the development of artificial intelligence technology, data processing methods are becoming increasingly complex and diverse. Current processing methods mostly rely on traditional computing architectures, which face many challenges when processing large-scale image and voice stream data. Traditional methods usually involve complex feature extraction processes and use CPUs or GPUs for subsequent data processing, which not only consumes a lot of computing resources, but also has processing delay problems. In recent years, technologies such as convolutional neural networks (CNN) and Mel-frequency cepstral coefficients (MFCC) have been widely used in image and voice data processing, but they are often limited by hardware performance and algorithm efficiency, and there is still room for improvement in real-time and accuracy.
[0003] Although existing technologies perform well in certain specific application scenarios, they are still insufficient in processing high-priority tasks. For example, in autonomous driving scenarios, the real-time requirements are extremely high, and any delay may lead to serious consequences. In addition, existing technologies lack an effective error detection mechanism during data transmission, which can easily lead to data loss or errors, affecting the accuracy of the final result. Summary of the invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a data processing method based on an artificial intelligence chip to solve the problem of balancing the real-time performance of high-priority tasks and the accuracy of data transmission.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: In a first aspect, the present invention provides a data processing method based on an artificial intelligence chip, which comprises: Obtain the raw data to be processed, perform preprocessing to extract feature vectors, convert the feature vectors into sparse pulse sequences through a spatiotemporal encoder, and add priority tags to the sparse pulse sequences according to the real-time requirements of the task; Based on the sparse pulse sequence with additional priority labels, a dynamic routing algorithm is used to allocate the pulses to the corresponding wavelengths for transmission, and the time division multiplexing and wavelength division multiplexing technologies are used to calculate the shortest optical path. The photon pulse stream transmitted through the shortest optical path triggers the memristor array through photoelectric conversion. The multiplication and accumulation operations are performed in the memristor unit based on Ohm's law and Kirchhoff's law, and the conductance value is adjusted online using the STDP rule to generate the final pulse sequence. The final pulse sequence is subjected to error detection. When the bit error rate is detected to exceed the set threshold, the backup nanowire electronic link is switched to perform check bit transmission and retransmission request, and the check result is output.
[0007] As a preferred solution of the data processing method based on artificial intelligence chip described in the present invention, wherein: the raw data to be processed includes image data and voice stream data; For image data, convolution kernel is used to perform convolution operation, identify edge and texture features in the image, and obtain high-dimensional feature vector; For speech stream data, the Mel frequency cepstral coefficient filter bank is used to process it and obtain the MFCC feature vector; The high-dimensional feature vectors in the image data and the MFCC feature vectors in the speech stream are converted into feature vectors suitable for pulse coding processing.
[0008] As a preferred solution of the data processing method based on artificial intelligence chip described in the present invention, wherein: converting the feature vector into a sparse pulse sequence through a space-time encoder comprises the following steps: For each eigenvalue of the feature suitable for pulse coding processing, the spatiotemporal coding formula is applied to convert the feature vector into a sparse pulse sequence according to the position of each eigenvalue in the feature vector, which is expressed as: ; in, For time The sparse pulse sequence, is the current time point, is the eigenvalue index in the eigenvector, is the number of features in the feature vector, represents a step function, is the first feature vector eigenvalues, is the feature scaling factor, To indicate relative to the current time past time point, is the time decay constant, The threshold for controlling the frequency of pulse triggering.
[0009] As a preferred solution of the data processing method based on artificial intelligence chip described in the present invention, wherein: adding priority tags to sparse pulse sequences according to the real-time requirements of the task includes the following steps: Clarify the application scenarios of artificial intelligence chips and set priority levels for different application scenarios; Based on the converted sparse pulse sequence, determine the task type corresponding to the sparse pulse sequence; According to the priority level corresponding to the task type, the corresponding task is converted into a binary label of the corresponding priority level; The converted binary label of the priority level is inserted into the head of the sparse pulse sequence to generate a new sparse pulse sequence.
[0010] As a preferred solution of the data processing method based on artificial intelligence chip described in the present invention, wherein: based on the sparse pulse sequence with additional priority tags, a dynamic routing algorithm is used to allocate to the corresponding wavelength for transmission, and time division multiplexing and wavelength division multiplexing technology are used to calculate the shortest optical path, including the following steps: Determine the priority level of each pulse stream according to the binary priority tag at the head of the new sparse pulse sequence; Divide the available time resources into multiple time periods of fixed length. For each pulse stream to be transmitted, determine the corresponding time period according to the priority level, and use wavelength division multiplexing technology to allocate wavelengths of optical signals of different wavelengths on the same optical fiber; During network operation, the load on each wavelength is continuously monitored, and the pulse flow distribution on each wavelength is adjusted in real time according to the current network load; Construct a directed weighted graph based on the actual physical layout and logical connection relationship, and determine the starting node of the pulse flow and the end node corresponding to the target computing module; Create a distance array, a predecessor node array, and a priority queue, and calculate the distance from all nodes to the starting node, and add them to the priority queue; Take the node with the smallest distance from the priority queue and calculate the distance from the node with the smallest distance to the adjacent node. When the distance from the smallest node to the adjacent node is less than the smallest distance taken from the priority queue, update the distance of the adjacent node until a path to the end point is found. The predecessor node array traces the path to the end point in reverse order to obtain the shortest light path from the start point to the end point.
[0011] As a preferred solution of the data processing method based on artificial intelligence chip described in the present invention, the photon pulse stream transmitted through the shortest optical path triggers the memristor array through photoelectric conversion, performs multiplication and accumulation operations in the memristor unit based on Ohm's law and Kirchhoff's law, and uses the STDP rule to adjust the conductance value online, and generates the final pulse sequence, including the following steps: Each photon pulse in the pulse stream is absorbed by the photodetector when it is transmitted along the shortest optical path, and a corresponding electrical signal is generated according to the intensity of the photon pulse; The electrical signal activates the memcluster array, and performs a multiplication-accumulation operation on each memcluster unit in the memcluster array according to its conductance value, so as to obtain the sum of the output currents of all the memcluster units; Based on the STDP rule, when a new pulse stream event occurs, the weight change is calculated according to the time difference between the previous and next pulses, and the conductance value of the corresponding memristor unit is updated; A voltage threshold is defined. When the sum of the output currents of all memory cells exceeds the voltage threshold, a new pulse output is triggered to generate the final pulse sequence.
[0012] As a preferred solution of the data processing method based on artificial intelligence chip described in the present invention, wherein: error detection is performed on the final pulse sequence, and when the error rate is detected to exceed the set threshold, the backup nanowire electronic link is switched to perform check bit transmission and retransmission request, and outputting the check result includes the following steps: Extracting the timestamp of each photon pulse from the final pulse train and calculating the time interval between each pair of adjacent photon pulses; Perform bitwise XOR operation on all time intervals to get the final hash value; Compare the final hash value with the reference hash value. If the two are inconsistent, it indicates a bit error. Calculate the bit error rate based on the number of detected error bits and the total number of bits; A bit error rate threshold is set, and when the calculated bit error rate exceeds the bit error rate threshold, the backup nanowire electronic link is immediately switched to perform a retransmission request and redundant check bit transmission; After receiving the retransmitted data packet and redundant check bits, a secondary error detection is performed to confirm whether the retransmission is successful.
[0013] In a second aspect, the present invention provides a data processing system based on an artificial intelligence chip, comprising: The data processing module obtains the raw data to be processed, performs preprocessing to extract feature vectors, converts the feature vectors into sparse pulse sequences through a spatiotemporal encoder, and adds priority tags to the sparse pulse sequences according to the real-time requirements of the task; The routing allocation module uses a dynamic routing algorithm to allocate the sparse pulse sequence with additional priority labels to the corresponding wavelength for transmission, and uses time division multiplexing and wavelength division multiplexing technology to calculate the shortest optical path; The photoelectric computing module triggers the memristor array through photoelectric conversion of the photon pulse stream transmitted through the shortest optical path. The multiplication and accumulation operations are performed in the memristor unit based on Ohm's law and Kirchhoff's law, and the conductance value is adjusted online using the STDP rule to generate the final pulse sequence. The error checking module performs error checking on the final pulse sequence. When it is detected that the error rate exceeds the set threshold, it switches to the backup nanowire electronic link to perform check bit transmission and retransmission request, and outputs the check result.
[0014] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the data processing method based on the artificial intelligence chip as described in the first aspect of the present invention is implemented.
[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the data processing method based on the artificial intelligence chip as described in the first aspect of the present invention.
[0016] The beneficial effects of the present invention are as follows: through efficient feature extraction and space-time coding conversion, the original data is quickly converted into a sparse pulse sequence suitable for pulse coding processing, and priority tags are added according to task requirements to ensure that key tasks are processed first; a dynamic routing algorithm is used in combination with time division multiplexing and wavelength division multiplexing technology to optimize the data transmission path and improve transmission efficiency and reliability; the memristor array is activated by photoelectric conversion and multiplication and accumulation operations are performed, and the conductance value is adjusted online using the STDP rule to generate the final pulse sequence, further improving the calculation accuracy and speed; the final pulse sequence is detected by error detection and, when necessary, switched to a spare nanowire electronic link for check bit transmission and retransmission request, thereby ensuring the integrity and accuracy of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0018] Figure 1 This is a flow chart of the data processing method based on the artificial intelligence chip in Example 1.
[0019] Figure 2 This is a system diagram of the data processing system based on the artificial intelligence chip in Example 1. DETAILED DESCRIPTION
[0020] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0022] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0023] Example 1, reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, and provides a data processing method based on an artificial intelligence chip, comprising the following steps: S1. Obtain the raw data to be processed, perform preprocessing to extract feature vectors, convert the feature vectors into sparse pulse sequences through a space-time encoder, and add priority tags to the sparse pulse sequences according to the real-time requirements of the task.
[0024] S1.1. The original data to be processed includes image data and voice stream data.
[0025] S1.1.1 For image data, use convolution kernel to perform convolution operation to identify edge and texture features in the image and obtain high-dimensional feature vectors; for speech stream data, process it through Mel frequency cepstral coefficient filter group to obtain MFCC feature vectors; convert the high-dimensional feature vectors in the image data and the MFCC feature vectors in the speech stream into feature vectors suitable for pulse coding processing.
[0026] Specifically, the convolution operation refers to selecting a set of convolution kernels (such as the Sobel operator or custom learned convolution kernels), each of which focuses on detecting edges or other features in a specific direction.
[0027] The specific steps of processing the speech stream data through the Mel frequency cepstral coefficient filter bank include: Frame segmentation and windowing: The continuous voice stream data is divided into short time frames of 20-40ms, and a Hamming window is applied to each frame to reduce spectrum leakage.
[0028] Fast Fourier Transform (FFT): Perform fast Fourier transform on each frame to obtain a spectrum.
[0029] Mel filtering: Use a set of triangular filter groups to filter the spectrum to simulate the human ear's perception of sounds of different frequencies.
[0030] Take logarithm and DCT: Take the logarithm of the filtered result and apply DCT to get the final MFCC feature vector.
[0031] S1.2. For each eigenvalue of a feature suitable for pulse coding processing, the feature vector is converted into a sparse pulse sequence by applying the spatiotemporal coding formula according to the position of each eigenvalue in the feature vector, which is expressed as: ; in, For time The sparse pulse sequence, is the current time point, is the eigenvalue index in the eigenvector, is the number of features in the feature vector, represents a step function, is the first feature vector eigenvalues, is the feature scaling factor, To indicate relative to the current time past time point, is the time decay constant, The pulse trigger threshold is used to control the frequency of pulse triggering.
[0032] Furthermore, the step function is used to determine whether a pulse is generated at a given time point. The specific expression is: ; in, Represents the input variable The result after applying the step function operation, Represents the input variable, that is, the integral result minus the pulse trigger threshold The difference determines the time point Whether to trigger a pulse, if the integral result minus the pulse trigger threshold If it is greater than 0, it will output 1 (i.e. trigger pulse); otherwise it will output 0 (no trigger pulse). If If the value of is less than or equal to 0, the step function output is 0, which means that at the current time point , the accumulated characteristic value does not meet the criteria for triggering a pulse, so no pulse is generated.
[0033] It should be noted that features suitable for pulse coding processing usually refer to those that can effectively represent and convey key information through pulse coding. The following are several common feature selection criteria: Saliency: Feature values should have high discrimination and be able to highlight important patterns or structures in the data. For example, in image processing, edge and texture features are usually salient.
[0034] Stability: The feature value should remain consistent and stable between different samples to avoid noise interference. For example, MFCC features are relatively stable in speech recognition tasks.
[0035] Interpretability: Feature values should have physical meaning or be easy to interpret to facilitate subsequent analysis and understanding. For example, the high-dimensional feature vectors extracted by convolutional neural networks (CNNs) can intuitively reflect the edge and texture information in an image.
[0036] S1.3. Attach priority tags to sparse pulse sequences according to the real-time requirements of the task.
[0037] S1.3.1. Clarify the application scenarios of artificial intelligence chips, for example, and set priority levels for different application scenarios.
[0038] Specifically, application scenarios include autonomous driving, speech recognition, and image classification.
[0039] The priority level is set using a 3-bit (0-7) label system to indicate the priority: Autonomous driving system: Since it has the highest real-time requirement, its priority is set to 7.
[0040] Voice recognition system: Compared with autonomous driving, its real-time requirements are lower, but it still requires a faster response, so its priority is set to 5.
[0041] Image classification system: Compared with the first two, it has the lowest real-time requirement, so its priority is set to 3.
[0042] S1.3.2. Based on the converted sparse pulse sequence, determine the task type corresponding to the sparse pulse sequence; according to the priority level corresponding to the task type, convert the corresponding task into a binary label of the corresponding priority level; insert the converted binary label of the priority level into the head of the sparse pulse sequence to generate a new sparse pulse sequence.
[0043] For example, when the task type is autonomous driving, the priority 7 of autonomous driving is converted to the binary label 111, when the task type is speech recognition, the priority 5 of speech recognition is converted to the binary label 101, and when the task type is image classification, the priority 3 of image classification is converted to the binary label 011.
[0044] S2. Based on the sparse pulse sequence with additional priority labels, a dynamic routing algorithm is used to allocate them to the corresponding wavelengths for transmission, and time division multiplexing and wavelength division multiplexing technology are used to calculate the shortest optical path.
[0045] S2.1. Determine the priority level of each pulse stream based on the binary priority label at the head of the new sparse pulse sequence; divide the available time resources into multiple time periods of fixed length. For each pulse stream to be transmitted, determine the corresponding time period based on the priority level, and use wavelength division multiplexing technology to allocate wavelengths of optical signals of different wavelengths on the same optical fiber.
[0046] Specifically, for high-priority data streams (such as priority ≥ 5), they are allocated to low-loss wavelengths, such as 1550nm. This wavelength supports bandwidths up to 10Tbps and is suitable for tasks that require fast response.
[0047] For low-priority data streams (such as priority <5), they are assigned to higher-loss wavelengths, such as 1310nm. Although this wavelength supports a lower bandwidth (about 5Tbps), it is sufficient for tasks that do not require high real-time performance.
[0048] S2.2. During network operation, the load on each wavelength is continuously monitored, and the pulse flow distribution on each wavelength is adjusted in real time according to the current network load.
[0049] Specifically, for newly arrived high-priority data flows, even if their priority is ≥ 5, if all high-bandwidth wavelengths are fully loaded, a suboptimal low-loss wavelength can be selected and attempts can be made to reschedule lower-priority data flows to other time slots or wavelengths.
[0050] For low-priority data flows, if the currently used wavelength is congested, its transmission time can be delayed until an idle wavelength is available.
[0051] S2.3. Construct a directed weighted graph based on the actual physical layout and logical connection relationship, and determine the starting node of the pulse flow with assigned wavelength and time period and the end node corresponding to the target computing module; create a distance array, a predecessor node array and a priority queue, and calculate the distance from all nodes to the starting node, and add them to the priority queue; take out the node with the smallest distance from the priority queue, and calculate the distance from the node with the smallest distance to the adjacent node. When the distance from the smallest node to the adjacent node is less than the smallest distance taken out from the priority queue, update the distance of the adjacent node until the path to the end point is found; the predecessor node array traces the path to the end point in reverse to obtain the shortest optical path from the starting point to the end point.
[0052] S3. The photon pulse stream transmitted through the shortest optical path triggers the memristor array through photoelectric conversion, and multiplication and accumulation operations are performed in the memristor unit based on Ohm's law and Kirchhoff's law, and the conductance value is adjusted online using the STDP rule to generate the final pulse sequence.
[0053] S3.1. Each photon pulse in the pulse stream is absorbed by the photodetector when it is transmitted along the shortest optical path, and generates a corresponding electrical signal according to the intensity of the photon pulse; the electrical signal activates the memcluster array, and performs a multiplication and accumulation operation on each memcluster unit in the memcluster array according to its conductance value, and obtains the sum of the output currents of all memcluster units, which is expressed as: ; in, represents the sum of the output currents of all memcluster units, Indicates The conductance of a memristor unit, Indicates The input voltage of each memory cell.
[0054] S3.2. Based on the STDP rule, when a new pulse stream event occurs, the weight change is calculated according to the time difference between the previous and next pulses, and the conductance value of the corresponding memristor unit is updated.
[0055] STDP is a learning rule used to simulate the synaptic plasticity of biological neurons. It adjusts the synaptic weight (expressed as the conductance value in the memristor) based on the time difference between the discharge (i.e., the generation of pulses) of the front neuron and the back neuron. This mechanism enables the neural network to self-adjust based on experience, thereby achieving learning and memory functions.
[0056] The expression of weight change is: ; in, Indicates memory unit and the The change in conductance between the memory cells is Represents the learning rate parameter, which controls the magnitude of each weight adjustment. A higher learning rate means a larger weight change, while a lower learning rate means a smaller weight change. represents the time difference between adjacent pulses, and Indicates positive and negative time constants.
[0057] S3.3. Define a voltage threshold. When the sum of the output currents of all memory group units exceeds the voltage threshold, a new pulse output is triggered to generate a final pulse sequence.
[0058] Specifically, the final pulse sequence is different from the sparse pulse sequence. The sparse pulse sequence is in the form of a feature vector after conversion through the space-time coding formula, which is mainly used to represent data features and has priority labels attached according to task requirements. The new pulse sequence refers to a new pulse output triggered by the calculation results of the memristor array, which is used for subsequent processing or feedback signals.
[0059] S4. Perform bit error detection on the final pulse sequence. When it is detected that the bit error rate exceeds the set bit error rate threshold, switch to the backup nanowire electronic link to perform check bit transmission and retransmission request, and output the check result.
[0060] S4.1. Extract the timestamp of each photon pulse from the final pulse sequence, and calculate the time interval between each pair of adjacent photon pulses; perform bitwise XOR operation on all time intervals to obtain the final hash value.
[0061] It should be noted that hash values provide a fast and effective error detection mechanism, which determines whether there is a transmission error by comparing the consistency of hash values; the bitwise XOR operation has good distribution characteristics and can effectively detect bit flip errors within a small range.
[0062] S4.2. Compare the final hash value with the reference hash value. When the two are inconsistent, it indicates that there is a bit error. Calculate the bit error rate based on the number of detected erroneous bits and the total number of bits.
[0063] Specifically, the calculation of the bit error rate refers to the ratio of the number of erroneous bits to the total number of bits.
[0064] S4.3. Set a bit error rate threshold. When the calculated bit error rate exceeds the bit error rate threshold, immediately switch to the backup nanowire electronic link to make a retransmission request and redundant check bit transmission; after receiving the retransmitted data packet and redundant check bit, perform secondary bit error detection to confirm whether the retransmission is successful.
[0065] To further illustrate, after receiving the retransmitted data packet and redundant check bits, the receiving end re-executes the error detection process, calculates the hash value again and compares it with the reference hash value to confirm that the data is correct.
[0066] It should be noted that the secondary error detection further verifies the integrity and accuracy of the data, ensures that the quality of the retransmitted data meets the requirements, and enhances the overall reliability of the system.
[0067] This embodiment also provides a data processing system based on an artificial intelligence chip, including: The data processing module obtains the raw data to be processed, performs preprocessing to extract feature vectors, converts the feature vectors into sparse pulse sequences through a space-time encoder, and adds priority tags to the sparse pulse sequences according to the real-time requirements of the task; the routing allocation module uses a dynamic routing algorithm to allocate the sparse pulse sequences with added priority tags to the corresponding wavelengths for transmission, and uses time division multiplexing and wavelength division multiplexing technology to calculate the shortest optical path; the optoelectronic calculation module triggers the memristor array through optoelectronic conversion of the photon pulse stream transmitted through the shortest optical path, performs multiplication and accumulation operations in the memristor unit based on Ohm's law and Kirchhoff's law, and uses the STDP rule to adjust the conductance value online to generate the final pulse sequence; the error check module performs error detection on the final pulse sequence. When the error rate is detected to exceed the set threshold, it switches to the backup nanowire electronic link to transmit the check bit and retransmission request, and outputs the verification result.
[0068] This embodiment also provides a computer device, which is suitable for the case of a data processing method based on an artificial intelligence chip, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the data processing method based on an artificial intelligence chip as proposed in the above embodiment.
[0069] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0070] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the data processing method based on the artificial intelligence chip proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0071] In summary, the present invention quickly converts raw data into a sparse pulse sequence suitable for pulse coding processing through efficient feature extraction and spatiotemporal coding conversion, and adds priority tags according to task requirements to ensure priority processing of key tasks; a dynamic routing algorithm is used in combination with time division multiplexing and wavelength division multiplexing technology to optimize the data transmission path and improve transmission efficiency and reliability; the memristor array is activated by photoelectric conversion and multiplication and accumulation operations are performed, and the conductance value is adjusted online using the STDP rule to generate the final pulse sequence, further improving the calculation accuracy and speed; the integrity and accuracy of the data are guaranteed by performing error detection on the final pulse sequence and switching to the spare nanowire electronic link for check bit transmission and retransmission request when necessary.
[0072] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A data processing method based on an artificial intelligence chip, characterized in that: include, Obtain the raw data to be processed, perform preprocessing to extract feature vectors, convert the feature vectors into sparse pulse sequences through a spatiotemporal encoder, and add priority tags to the sparse pulse sequences according to the real-time requirements of the task; Based on the sparse pulse sequence with additional priority labels, a dynamic routing algorithm is used to allocate the pulses to the corresponding wavelengths for transmission, and the time division multiplexing and wavelength division multiplexing technologies are used to calculate the shortest optical path. The photon pulse stream transmitted through the shortest optical path triggers the memristor array through photoelectric conversion. The multiplication and accumulation operations are performed in the memristor unit based on Ohm's law and Kirchhoff's law, and the conductance value is adjusted online using the STDP rule to generate the final pulse sequence. The final pulse sequence is subjected to error detection. When the bit error rate is detected to exceed the set threshold, the backup nanowire electronic link is switched to perform check bit transmission and retransmission request, and the check result is output.
2. The data processing method based on an artificial intelligence chip according to claim 1, characterized in that: The raw data to be processed includes image data and voice stream data; For image data, convolution kernel is used to perform convolution operation, identify edge and texture features in the image, and obtain high-dimensional feature vector; For speech stream data, the Mel frequency cepstral coefficient filter bank is used to process it and obtain the MFCC feature vector; The high-dimensional feature vectors in the image data and the MFCC feature vectors in the speech stream are converted into feature vectors suitable for pulse coding processing.
3. The data processing method based on artificial intelligence chip according to claim 2, characterized in that: The conversion of the feature vector into a sparse spike train through a spatiotemporal encoder includes the following steps: For each eigenvalue of the feature suitable for pulse coding processing, the spatiotemporal coding formula is applied to convert the feature vector into a sparse pulse sequence according to the position of each eigenvalue in the feature vector, which is expressed as: ; in, For time The sparse pulse sequence, is the current time point, is the eigenvalue index in the eigenvector, is the number of features in the feature vector, represents a step function, is the first feature vector eigenvalues, is the feature scaling factor, To indicate relative to the current time past time point, is the time decay constant, The threshold for controlling the frequency of pulse triggering.
4. The data processing method based on artificial intelligence chip according to claim 3, characterized in that: Attach priority tags to sparse pulse trains based on task real-time requirements The following steps are included: Clarify the application scenarios of artificial intelligence chips and set priority levels for different application scenarios; Based on the converted sparse pulse sequence, determine the task type corresponding to the sparse pulse sequence; According to the priority level corresponding to the task type, the corresponding task is converted into a binary label of the corresponding priority level; The converted binary label of the priority level is inserted into the head of the sparse pulse sequence to generate a new sparse pulse sequence.
5. The data processing method based on artificial intelligence chip according to claim 4, characterized in that: Based on the sparse pulse sequence with additional priority labels, a dynamic routing algorithm is used to allocate the pulses to the corresponding wavelengths for transmission, and the shortest optical path is calculated using time division multiplexing and wavelength division multiplexing technology. The following steps are included: Determine the priority level of each pulse stream according to the binary priority tag at the head of the new sparse pulse sequence; Divide the available time resources into multiple fixed-length time periods. For each pulse stream to be transmitted, determine the corresponding time period according to the priority level, and use wavelength division multiplexing technology to allocate wavelengths of optical signals of different wavelengths on the same optical fiber; During network operation, the load on each wavelength is continuously monitored, and the pulse flow distribution on each wavelength is adjusted in real time according to the current network load; Construct a directed weighted graph based on the actual physical layout and logical connection relationship, and determine the starting node of the pulse flow and the end node corresponding to the target computing module; Create a distance array, a predecessor node array, and a priority queue, and calculate the distance from all nodes to the starting node, and add them to the priority queue; Take the node with the smallest distance from the priority queue and calculate the distance from the node with the smallest distance to the adjacent node. When the distance from the smallest node to the adjacent node is less than the smallest distance taken from the priority queue, update the distance of the adjacent node until a path to the end point is found. The predecessor node array traces the path to the end point in reverse order to obtain the shortest light path from the start point to the end point.
6. The data processing method based on an artificial intelligence chip according to claim 5, characterized in that: The photon pulse stream transmitted through the shortest optical path triggers the memristor array through photoelectric conversion. The multiplication and accumulation operations are performed in the memristor unit based on Ohm's law and Kirchhoff's law, and the conductance value is adjusted online using the STDP rule to generate the final pulse sequence. The following steps are included: Each photon pulse in the pulse stream is absorbed by the photodetector when it is transmitted along the shortest optical path, and a corresponding electrical signal is generated according to the intensity of the photon pulse; The electrical signal activates the memcluster array, and performs a multiplication-accumulation operation on each memcluster unit in the memcluster array according to its conductance value, so as to obtain the sum of the output currents of all the memcluster units; Based on the STDP rule, when a new pulse stream event occurs, the weight change is calculated according to the time difference between the previous and next pulses, and the conductance value of the corresponding memristor unit is updated; A voltage threshold is defined. When the sum of the output currents of all memory cells exceeds the voltage threshold, a new pulse output is triggered to generate the final pulse sequence.
7. The data processing method based on artificial intelligence chip according to claim 6, characterized in that: The final pulse sequence is subjected to error detection. When the error rate exceeds the set threshold, the backup nanowire electronic link is switched to perform check bit transmission and retransmission request, and the check result is output. The following steps are included: Extracting the timestamp of each photon pulse from the final pulse train and calculating the time interval between each pair of adjacent photon pulses; Perform bitwise XOR operation on all time intervals to get the final hash value; Compare the final hash value with the reference hash value. If the two are inconsistent, it indicates a bit error. Calculate the bit error rate based on the number of detected error bits and the total number of bits; A bit error rate threshold is set, and when the calculated bit error rate exceeds the bit error rate threshold, the backup nanowire electronic link is immediately switched to perform a retransmission request and redundant check bit transmission; After receiving the retransmitted data packet and redundant check bits, a secondary error detection is performed to confirm whether the retransmission is successful.
8. A data processing system based on an artificial intelligence chip, based on the data processing method based on an artificial intelligence chip according to any one of claims 1 to 7, characterized in that: include, The data processing module obtains the raw data to be processed, performs preprocessing to extract feature vectors, converts the feature vectors into sparse pulse sequences through a spatiotemporal encoder, and adds priority tags to the sparse pulse sequences according to the real-time requirements of the task; The routing allocation module uses a dynamic routing algorithm to allocate the sparse pulse sequence with additional priority labels to the corresponding wavelength for transmission, and uses time division multiplexing and wavelength division multiplexing technology to calculate the shortest optical path; The photoelectric computing module triggers the memristor array through photoelectric conversion of the photon pulse stream transmitted through the shortest optical path. The multiplication and accumulation operations are performed in the memristor unit based on Ohm's law and Kirchhoff's law, and the conductance value is adjusted online using the STDP rule to generate the final pulse sequence. The error checking module performs error detection on the final pulse sequence. When it is detected that the error rate exceeds the set threshold, it switches to the backup nanowire electronic link to perform check bit transmission and retransmission request, and outputs the check result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the data processing method based on the artificial intelligence chip described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data processing method based on an artificial intelligence chip according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
High-dimensional multiplexing quantum communication system based on chip integrated optical path
CN110198189A
Space route prediction method based on spiking neural network
CN113285875A
Peak time sequence correlation plasticity weight updating method suitable for memristor
CN114528985A
Sensing, storing and computing integrated artificial retina system based on multiple core particles
CN118675037A
Task processing method and apparatus, electronic device and storage medium
US11640319B1