A task processing method and apparatus based on an AI chip

By constructing a spiking neural network model and optimizing the pulse trigger threshold and membrane potential, combined with Bayes' theorem and a leaky integrated discharge model, the efficiency problem of AI chips in complex task processing was solved, achieving more efficient task processing results.

CN115879518BActive Publication Date: 2026-03-10CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-02
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing AI chips are inefficient in handling complex computational tasks, mainly due to insufficient optimization of pulse trigger threshold and membrane potential, resulting in low efficiency in spiking neural network applications.

Method used

By constructing a spiking neural network model, a threshold prediction model and a leaky integrated firing model are used to optimize the pulse triggering threshold and membrane potential. Bayes' theorem is combined to predict and adjust parameters, and the membrane potential is reset to improve model efficiency.

Benefits of technology

This improves the processing efficiency of spiking neural networks in AI chips and enhances the overall performance of task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115879518B_ABST
    Figure CN115879518B_ABST
Patent Text Reader

Abstract

This invention provides a task processing method and apparatus based on an AI chip. The method includes: constructing a spiking neural network model; optimizing parameters in the spiking neural network model, including at least a pulse trigger threshold and membrane potential, using a preset threshold prediction model and a leaky integrated release model; receiving a task request and determining the task type of the request; determining a target spiking neural network model based on the task type, and calling the target spiking neural network model to process the task request to obtain a processing result. This invention enables task processing using an optimized spiking neural network model within an AI chip, and improves model processing efficiency by optimizing the pulse trigger threshold and membrane potential within the spiking neural network model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a task processing method and device based on an AI chip. BACKGROUND

[0002] With the AI (Artificial Inteligence) boom sweeping all walks of life, the AI chip as the core of artificial intelligence has become hot, which is an essential core device for all intelligent devices and is specially used for processing AI-related computing tasks. However, with the increase of computing demand and computing complexity, the processing efficiency of the existing AI chip gradually becomes difficult to adapt. SUMMARY

[0003] In view of the above problems, a task processing method and device based on an AI chip are provided to overcome the above problems or at least partially solve the above problems, comprising:

[0004] A task processing method based on an AI chip, the method comprising:

[0005] Constructing a spiking neural network model;

[0006] Using a preset threshold prediction model and a leaky integrate-and-fire model to optimize parameters in the spiking neural network model, including at least a spiking threshold and a membrane potential;

[0007] Receiving a task request and determining a task type of the task request;

[0008] According to the task type, determining a target spiking neural network model and calling the target spiking neural network model to process the task request to obtain a processing result.

[0009] Optionally, the using of the preset threshold prediction model and the leaky integrate-and-fire model to optimize the parameters in the spiking neural network model, including at least the spiking threshold and the membrane potential, comprises:

[0010] Using a threshold prediction model to optimize the spiking threshold in the spiking neural network model, and using a leaky integrate-and-fire model to optimize the membrane potential in the spiking neural network model.

[0011] Optionally, the using of the threshold prediction model to optimize the spiking threshold in the spiking neural network model comprises:

[0012] Obtaining historical spiking input data of the spiking neural network model;

[0013] adopting a preset threshold prediction model, predicting a relationship between a pulse input synapse and a pulse trigger threshold according to the historical pulse input data, and optimizing the pulse trigger threshold in the pulse neural network model based on the relationship between the pulse input synapse and the pulse trigger threshold.

[0014] Optionally, the adopting the leaky integrate-and-fire model to optimize the membrane potential in the pulse neural network model comprises:

[0015] acquiring leakage data of a synaptic potential in the pulse neural network model;

[0016] adopting a preset leaky integrate-and-fire model to optimize the membrane potential in the pulse neural network model according to the leakage data.

[0017] Optionally, the method further comprises:

[0018] adopting a reset scheme to reset the membrane potential in the pulse neural network model.

[0019] Optionally, the adopting the reset scheme to reset the membrane potential in the pulse neural network model comprises:

[0020] resetting the membrane potential in the pulse neural network model to a constant value;

[0021] or, subtracting a reset value from the membrane potential in the pulse neural network model.

[0022] Optionally, the threshold prediction model is a data model constructed based on Bayes' theorem.

[0023] An AI chip-based task processing device, the device comprising:

[0024] a pulse neural network model construction module configured to construct a pulse neural network model;

[0025] a parameter optimization module configured to adopt a preset threshold prediction model and a leaky integrate-and-fire model to optimize parameters in the pulse neural network model, the parameters including at least a pulse trigger threshold and a membrane potential;

[0026] a task determination module configured to receive a task request and determine a task type of the task request;

[0027] a task processing module configured to determine a target pulse neural network model according to the task type, and invoke the target pulse neural network model to process the task request to obtain a processing result.

[0028] An electronic device includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor, which, when executed by the processor, implements the AI chip-based task processing method as described above.

[0029] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the AI chip-based task processing method as described above.

[0030] Embodiments of the present application have the following advantages:

[0031] In the embodiments of the present application, by constructing a pulse neural network model, using a preset threshold prediction model and a leaky integrate-and-fire model, parameters including at least a pulse trigger threshold and a membrane potential in the pulse neural network model are optimized, a task request is received, a task type of the task request is determined, according to the task type, a target pulse neural network model is determined, and the target pulse neural network model is called to process the task request to obtain a processing result, which realizes calling the optimized pulse neural network model in the AI chip for task processing, and by optimizing the pulse trigger threshold and the membrane potential in the pulse neural network model, the model processing efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS

[0032] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the description of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0033] Figure 1 is a step flow chart of an AI chip-based task processing method provided by an embodiment of the present application;

[0034] Figure 2 is a schematic diagram of a pulse neural network model provided by an embodiment of the present application;

[0035] Figure 3 is a step flow chart of another AI chip-based task processing method provided by an embodiment of the present application;

[0036] Figure 4 is a step flow chart of another AI chip-based task processing method provided by an embodiment of the present application;

[0037] Figure 5 is a step flow chart of another AI chip-based task processing method provided by an embodiment of the present application;

[0038] Figure 6 is a structural block diagram of a task processing device based on an AI chip provided by an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the above objectives, characteristics and advantages of the present application more apparent, comprehensible and easier to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0040] In a biological brain, biological neurons transmit information to the next neuron layer in the form of pulses. Whenever a neuron emits a pulse signal, the pulse signal is transmitted to the connected neurons for processing, at which time only the synaptic connection delay exists, and the information coding is extremely efficient. In a biological brain, highly nonlinear operation is adopted, among about 8.7 billion neurons, each neuron has up to 10,000 connections with other neurons both externally and internally, and internally carries tens of thousands of coordinated parallel processes (mediated by millions of proteins and nucleic acid molecules).

[0041] Compared with today's most advanced systems, chips that mimic the structure of the brain have higher efficiency and lower power consumption, and neural networks that simulate such brain behavior are often referred to as neuromorphic networks, and the representative is the spiking neural network (SNN, Spiking Neural Network). The emergence of this so-called third generation of neural networks is to bridge the gap between neuroscience and machine learning, and to use biologically realistic neuron models for information coding and computation to fully utilize the efficiency of neural networks.

[0042] Among them, the spiking neural network contains neuron nodes with time sequence dynamics, synapse structures with steady-state plasticity balance, network loops with functional specificity, etc., and highly draws on biological optimization methods of local unsupervised (such as pulse time-dependent plasticity, short-term synaptic plasticity, local steady-state regulation, etc.), global weak supervision (such as dopamine reward learning, energy-based function optimization, etc.) biological optimization methods, and therefore has strong space-time information representation, asynchronous event information processing, network self-organizing learning, etc.

[0043] Spiking neural networks, which model neurons more closely to reality, take into account the effects of temporal information in addition to this. The idea is that neurons in a dynamic neural network are not activated at every iteration of the propagation (as in a typical multi-layer perceptron network), but only when their membrane potential reaches a certain specific value. When a neuron is activated, it generates a signal that is passed to other neurons, increasing or decreasing their membrane potential.

[0044] In spiking neural networks, the current activation level of a neuron (modeled as some differential equation) is generally considered the current state, and an input spike causes this value to rise for a certain amount of time and then decay. There are many encodings that interpret these spike trains as actual numbers, taking into account both the spike frequency and the interspike interval.

[0045] With the help of research in neuroscience, it is possible to precisely establish a spiking neural network model based on the time of spike generation. This new type of neural network uses spike coding, and by obtaining the precise time of spike generation, this new type of neural network can obtain more information and stronger computing power.

[0046] However, in spiking neural networks, there is a lack of prediction between the spike trigger threshold and the leakage rate, resulting in low efficiency of AI chips using spiking neural networks.

[0047] Based on this, in the spiking neural network model, the spiking neural network is optimized by LIF (Leaky Integrate-and-Fire, leaky integrate-and-fire) technology. At the same time, Bayesian prediction is used to make a secondary prediction of the relationship between the spiking synapse and the spike trigger threshold, and then the threshold is set accurately, partially replacing the refractory period parameter function in LIF. The refractory period is a period of time in which the membrane potential of a neuron does not exceed the threshold and the neuron is not excited. In addition, due to the existence of leakage, the membrane potential between two input spikes will continuously decrease according to the leakage rate, so the membrane potential of the neuron can be optimized by LIF.

[0048] Reference Figure 1 , a step flowchart of a task processing method based on an AI chip is shown, which can specifically include the following steps:

[0049] Step 101, constructing a spiking neural network model.

[0050] As an example, spiking neural networks can be classified into three topologies, feed-forward spiking neural networks, recurrent spiking neural networks and hybird spiking neural networks.

[0051] In a feed-forward spiking neural network, neurons in the network are arranged in layers in a multi-layer feed-forward spiking neural network structure. The spike trains of neurons in the input layer represent the encoding of the input data of a specific problem and are input to the next layer of the spiking neural network. The last layer is the output layer, and the spike trains of neurons in the output layer constitute the output of the network. There can be one or more hidden layers between the input layer and the output layer.

[0052] In addition, in a traditional feed-forward artificial neural network, there is only one synaptic connection between two neurons, while a spiking neural network can use a network structure with multiple synaptic connections between two neurons, each with different delays and modifiable connection weights. The different delays of multiple synapses enable the spikes of the presynaptic neuron to have an impact on the firing of the postsynaptic neuron over a longer time range. Multiple spikes transmitted by the presynaptic neuron produce different postsynaptic potentials according to the size of the synaptic weight.

[0053] In a recurrent neural network, unlike a multi-layer feed-forward neural network and a single-layer neural network, the network structure has a feedback loop, i.e., the output of a neuron in the network is a recursive function of the output of the neuron at a previous time step. Recurrent neural networks can simulate time series and be used to complete control, prediction and other tasks. Their feedback mechanism enables them to represent more complex time-varying systems, and also makes the design of effective learning algorithms and their convergence analysis more difficult. The two classical learning algorithms of traditional recurrent artificial neural networks are real-time recurrent learning (RTRL) and backpropagation through time (BPTT), both of which are learning algorithms that recursively calculate gradients.

[0054] Recurrent spiking neural networks (RSNs) are spiking neural networks with feedback loops. Because their information encoding and feedback mechanisms differ from traditional recurrent artificial neural networks, the construction of their learning algorithms and the analysis of their dynamics are more challenging. RSNs can be applied to solving many complex problems, such as language modeling, handwritten digit recognition, and speech recognition. RSNs can be divided into two main categories: fully recurrent spiking neural networks and locally recurrent spiking neural networks.

[0055] Hybrid spiking neural networks include both feedforward and recursive structures.

[0056] In spiking neural networks, biological nervous systems encode information using the timing of neuronal pulses, not just the "firing frequency" of neuronal pulses. In fact, the firing frequency of neurons cannot fully capture the information contained in the pulse sequence. For example, it has been found that populations of neurons in the primary auditory cortex can coordinate the relative timing of action potentials by grouping adjacent pulses in a short period without changing the number of pulses fired per second. Thus, neurons can even deliver specific stimulus signals without altering the average firing frequency.

[0057] More biologically interpretable spiking neural networks use precisely timed pulse sequences to encode neural information. Information transmission within the neural network is accomplished through pulse sequences, which are time series composed of discrete pulse time points. Therefore, the simulation and computation of spiking neural networks involve the following steps: ① When input data or neurons are stimulated by external stimuli, the data or external stimuli are encoded into specific pulse sequences using a specific pulse sequence encoding method; ② The pulse sequences are transmitted between neurons and processed, and then the output pulse sequences are decoded using a specific decoding method to provide a specific response.

[0058] For the problem of pulse sequence encoding of neural information, researchers have proposed many pulse sequence encoding methods for spiking neural networks, drawing on the information encoding mechanism of biological neurons. Examples include first-pulse triggering time encoding, delayed phase encoding, and population encoding.

[0059] In practical implementation, a spiking neural network model can be constructed for use by AI chips, such as... Figure 2 A spiking neural network model can include spiking neurons, which can communicate through synapses (such as...) Figure 2 P1 to P3) and other spiking neurons (e.g. Figure 2After the connection between X1 to X3 is made and the signal transmitted and integrated, the threshold function is triggered to output signal y1.

[0060] The spiking neural network model can include a spiking input point, a synapse point, a firing function, an output point, and a reset time.

[0061] In step 102, a preset threshold prediction model and a leaky integrate-and-fire model are used to optimize parameters in the spiking neural network model, including at least a spiking threshold and a membrane potential.

[0062] To optimize the spiking neural network model, a threshold prediction model and a leaky integrate-and-fire model can be constructed in advance, and then the threshold prediction model and the leaky integrate-and-fire model can be used to optimize parameters in the spiking neural network model, including at least a spiking threshold and a membrane potential.

[0063] In an embodiment of the present application, the use of a preset threshold prediction model and a leaky integrate-and-fire model to optimize parameters in the spiking neural network model, including at least a spiking threshold and a membrane potential, can include:

[0064] The threshold prediction model is used to optimize the spiking threshold in the spiking neural network model, and the leaky integrate-and-fire model is used to optimize the membrane potential in the spiking neural network model.

[0065] In a specific implementation, the threshold prediction model can be used to optimize the spiking threshold in the spiking neural network model, and the leaky integrate-and-fire model can be used to optimize the membrane potential in the spiking neural network model.

[0066] In an embodiment of the present application, the use of a threshold prediction model to optimize the spiking threshold in the spiking neural network model can include:

[0067] The historical spiking input data of the spiking neural network model is obtained, a preset threshold prediction model is used to predict the relationship between the spiking input synapse and the spiking threshold based on the historical spiking input data, and the spiking threshold in the spiking neural network model is optimized based on the relationship between the spiking input synapse and the spiking threshold.

[0068] In a specific implementation, a threshold prediction model is constructed using Bayes' theorem, and the relationship between multiple spiking input synapses and the spiking threshold is predicted again through historical spiking input data analysis, so as to accurately set the threshold.

[0069] The threshold prediction model is a data model constructed based on Bayes' theorem.

[0070] Bayes' theorem is the basis of Naive Bayesian Classifier, if there are M categories in the given data set, through Naive Bayesian Classifier, it can be predicted that whether a given observation belongs to a specific category with the highest posterior probability, that is, Naive Bayesian classification method predicts that X belongs to category C, which means that:

[0071] P(C i |X)>P(C j |X)1≤j≤m,j≠i

[0072] At this time, if P(C i |X) is maximized, the class C i with the maximum P(C i |X) is called the maximum posterior hypothesis, according to Bayes' theorem:

[0073]

[0074] It can be known that since P(X) is equal for all categories, only P(X|C i )P(C i ) needs to be maximized.

[0075] In order to predict the category of an unknown sample X, the corresponding P(X|C i )P(C i ) can be estimated for each category C i .

[0076] P(C i |X)>P(C j |X)1≤j≤m,j≠i

[0077] In an embodiment of the present application, the membrane potential in the pulse neural network model is optimized by using the leaky integrate-and-fire model.

[0078] Leakage data of the synaptic potential in the pulse neural network model is obtained, and the membrane potential in the pulse neural network model is optimized according to the leakage data by using the preset leaky integrate-and-fire model.

[0079] A neuron has many input pulses and outputs a pulse when the pulse trigger threshold is exceeded. The synaptic potential will decay over time, which takes into account the leakage effect of the RC time constant in the circuit, so it is called the leaky integrate-and-fire model. By considering the leakage effect of neurons in the pulse neural network, the membrane potential in the pulse neural network model is optimized according to the leakage data of the synaptic potential.

[0080] The basic parameters of LIF neurons are membrane threshold voltage, reset voltage, refractory period and leak rate. The membrane potential of neuron j in the I-th layer at each time point t can be described as

[0081]

[0082] where the parameter λ corresponds to the leak, w i,j is the synaptic enhancement. Note that these parameters can be defined using models that include complex internal mechanisms, rather than constant scalar values. After integrating all input pulses of a given time step, the potential is compared to the threshold and the output is defined by the following equation:

[0083]

[0084] where t spike is the last time point at which neuron j in the I-th layer sends a signal.

[0085] In an embodiment of the present application, the following can also be included:

[0086] Resetting the membrane potential in the spiking neural network model using a reset scheme.

[0087] In an embodiment of the present application, the resetting the membrane potential in the spiking neural network model using a reset scheme can include:

[0088] resetting the membrane potential in the spiking neural network model to a constant value; or subtracting a reset value from the membrane potential in the spiking neural network model.

[0089] In a specific implementation, the resetting can be performed according to different schemes, resetting the potential to a constant value or subtracting a reset value from the current membrane potential.

[0090] Step 103, receiving a task request and determining the task type of the task request.

[0091] In a specific implementation, for an upper-layer application, an AI chip can be called to perform task processing, and when a task request of the upper-layer application is received, the task type of the task request can be determined.

[0092] Step 104, determining a target spiking neural network model according to the task type, and calling the target spiking neural network model to process the task request to obtain a processing result.

[0093] For some task requests, a spiking neural network model does not need to be used for processing, and for other task requests, a spiking neural network model can be used for processing to improve the efficiency of the AI chip in performing task processing.

[0094] For a task request requiring calling a spiking neural network model for processing, a target neural network model can be selected from a plurality of pre-established spiking neural network models according to a task type of the task request, and then the target spiking neural network model can be called to process the task request to obtain a processing result.

[0095] In the embodiment of the present application, by constructing a spiking neural network model, a preset threshold prediction model and a leaky integrate-and-fire model are used to optimize parameters in the spiking neural network model, including at least a spike trigger threshold and a membrane potential, a task request is received, a task type of the task request is determined, a target spiking neural network model is determined according to the task type, and the target spiking neural network model is called to process the task request to obtain a processing result, thereby realizing calling an optimized spiking neural network model in an AI chip for task processing, and improving model processing efficiency by optimizing the spike trigger threshold and the membrane potential in the spiking neural network model.

[0096] Referring to Figure 3 , a step flowchart of another AI chip-based task processing method provided by an embodiment of the present application is shown, which can specifically include the following steps:

[0097] Step 301, constructing a spiking neural network model.

[0098] In a specific implementation, a spiking neural network model can be constructed for calling by an AI chip, such as Figure 2 The spiking neural network model can include spiking neurons, which can be connected between other spiking neurons (such as X1 to X3 in Figure 2 ) through synapses (such as P1 to P3 in Figure 2 ), integrate signals transmitted thereby, and then excite through a threshold function to output a signal y1.

[0099] The spiking neural network model can include five parts: a spike input point, a synapse point, an excitation function, an output point, and a reset time.

[0100] Step 302, obtaining historical spike input data of the spiking neural network model.

[0101] Step 303, using a preset threshold prediction model to predict a relationship between a spike input synapse and a spike trigger threshold according to the historical spike input data, and optimizing the spike trigger threshold in the spiking neural network model based on the relationship between the spike input synapse and the spike trigger threshold.

[0102] In a specific implementation, the threshold prediction model is constructed by using the Bayes theorem, and the relationship between the multi-pulse input synapse and the pulse trigger threshold is predicted again through the analysis of the historical pulse input data, so as to accurately set the threshold.

[0103] In step 304, the membrane potential in the pulse neural network model is optimized by using a leaky integrate-and-fire model.

[0104] In step 305, a task request is received, and a task type of the task request is determined.

[0105] In a specific implementation, for an upper application, an AI chip can be called to process a task, and when a task request of the upper application is received, a task type of the task request can be determined.

[0106] In step 306, according to the task type, a target pulse neural network model is determined, and the target pulse neural network model is called to process the task request to obtain a processing result.

[0107] For some task requests, a pulse neural network model does not need to be used for processing, and for other task requests, the pulse neural network model can be used for processing, so as to improve the efficiency of the AI chip in processing tasks.

[0108] For a task request that needs to call a pulse neural network model for processing, a target neural network model can be selected from a plurality of pulse neural network models that are established in advance according to the task type of the task request, and then the target pulse neural network model can be called to process the task request to obtain a processing result.

[0109] Referring to Figure 4 , a step flowchart of another task processing method based on an AI chip is shown, which can specifically include the following steps:

[0110] In step 401, a pulse neural network model is constructed.

[0111] In a specific implementation, a pulse neural network model can be constructed for an AI chip to call, such as Figure 2 The pulse neural network model can include pulse neurons, and the pulse neurons can be connected with other pulse neurons (such as X1 to X3 in Figure 2 ) through synapses (such as P1 to P3 in Figure 2 ), and the signals transmitted by the pulse neurons are integrated and then excited by a threshold function to output a signal y1.

[0112] The pulse neural network model can include five parts of a pulse input point, a synapse point, an excitation function, an output point, and a reset time.

[0113] Step 402, a threshold prediction model is used to optimize the pulse trigger threshold in the pulse neural network model.

[0114] Step 403, leakage data of the synaptic potential in the pulse neural network model is obtained.

[0115] Step 404, a preset leaky integrate-and-fire model is used to optimize the membrane potential in the pulse neural network model according to the leakage data.

[0116] A neuron has many input pulses and outputs a pulse when the pulse trigger threshold is exceeded. The synaptic potential will decay over time, which is a leakage effect considering the RC time constant in the circuit, so it is called a leaky integrate-and-fire model. By considering the leakage effect of neurons in the pulse neural network, the membrane potential in the pulse neural network model is optimized according to the leakage data of the synaptic potential.

[0117] Step 405, a task request is received, and the task type of the task request is determined.

[0118] In a specific implementation, for an upper application, an AI chip can be called to process a task, and when a task request of the upper application is received, the task type of the task request can be determined.

[0119] Step 406, according to the task type, a target pulse neural network model is determined, and the target pulse neural network model is called to process the task request to obtain a processing result.

[0120] For some task requests, a pulse neural network model does not need to be used for processing, and for another part of the task requests, a pulse neural network model can be used for processing to improve the efficiency of the AI chip in processing tasks.

[0121] For a task request that needs to be processed by calling a pulse neural network model, a target neural network model can be selected from a plurality of pulse neural network models established in advance according to the task type, and then the target pulse neural network model can be called to process the task request to obtain a processing result.

[0122] Referring to Figure 5 , another step flowchart of a task processing method based on an AI chip is shown, which can specifically include the following steps:

[0123] Step 501, a pulse neural network model is constructed.

[0124] In a specific implementation, a pulse neural network model can be constructed for an AI chip to call, such as Figure 2, the spiking neural network model can include spiking neurons, the spiking neurons can be connected with other spiking neurons (such as X1 to X3 in FIG. 1) through synapses (such as P1 to P3 in FIG. 1), integrate signals transmitted by the synapses, and be excited by a threshold function to output a signal y1. Figure 2 Figure 2

[0125] The spiking neural network model can include a spiking input point, a synapse point, an excitation function, an output point, and a reset time.

[0126] In step 502, historical spiking input data of the spiking neural network model is obtained.

[0127] In step 503, a preset threshold prediction model is used to predict a relationship between a spiking input synapse and a spiking trigger threshold according to the historical spiking input data, and the spiking trigger threshold in the spiking neural network model is optimized based on the relationship between the spiking input synapse and the spiking trigger threshold.

[0128] In a specific implementation, a threshold prediction model is constructed by using Bayes' theorem, and a relationship between multiple spiking input synapses and an excitation threshold is predicted again through analysis of historical spiking input data, so as to accurately set the threshold.

[0129] In step 504, leakage data of a synapse potential in the spiking neural network model is obtained.

[0130] In step 505, a preset leaky integrate-and-fire model is used to optimize the membrane potential in the spiking neural network model according to the leakage data.

[0131] A neuron has many input pulses and outputs a pulse when the pulse trigger threshold is exceeded. The synapse potential decays over time, which takes into account the leakage effect of the RC time constant in the circuit, so it is called a leaky integrate-and-fire model. By considering the leakage effect of the neuron in the spiking neural network, the membrane potential in the spiking neural network model is optimized according to the leakage data of the synapse potential.

[0132] In step 506, a task request is received, and a task type of the task request is determined.

[0133] In a specific implementation, for an upper-layer application, an AI chip can be called to process a task, and when a task request of the upper-layer application is received, the task type of the task request can be determined.

[0134] In step 507, a target spiking neural network model is determined according to the task type, and the target spiking neural network model is called to process the task request to obtain a processing result.

[0135] ​​For some task requests, it is not necessary to use the spiking neural network model for processing, while for other task requests, the spiking neural network model can be used to process them, thereby improving the efficiency of AI chip in task processing.

[0136] For task requests that require the use of a spiking neural network model, a target neural network model can be selected from a number of pre-established spiking neural network models based on the task type. The target spiking neural network model can then be invoked to process the task request and obtain the processing result.

[0137] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0138] Reference Figure 6 The diagram illustrates a structural schematic of a task processing device based on an AI chip according to an embodiment of the present invention, which may specifically include the following modules:

[0139] The spiking neural network model building module 601 is used to build spiking neural network models.

[0140] The parameter optimization module 602 is used to optimize the parameters in the spiking neural network model, including at least the pulse trigger threshold and the membrane potential, using a preset threshold prediction model and a leak-integrated release model.

[0141] The task determination module 603 is used to receive a task request and determine the task type of the task request.

[0142] The task processing module 604 is used to determine the target spiking neural network model according to the task type, and call the target spiking neural network model to process the task request and obtain the processing result.

[0143] In one embodiment of the present invention, the parameter optimization module 602 includes:

[0144] The optimization submodule is used to optimize the pulse trigger threshold in the spiking neural network model using a threshold prediction model, and to optimize the membrane potential in the spiking neural network model using a leakage integrated discharge model.

[0145] In one embodiment of the present invention, the differentiation optimization submodule includes:

[0146] A historical pulse input data acquisition unit is used to acquire historical pulse input data of the spiking neural network model;

[0147] The historical data optimization unit is used to predict the relationship between the pulse input synapse and the pulse trigger threshold based on the historical pulse input data using a preset threshold prediction model, and to optimize the pulse trigger threshold in the spiking neural network model based on the relationship between the pulse input synapse and the pulse trigger threshold.

[0148] In one embodiment of the present invention, the differentiation optimization submodule includes:

[0149] The leakage current data acquisition unit is used to acquire leakage current data of synaptic potentials in the pulse neural network model;

[0150] The leakage current data optimization unit is used to optimize the membrane potential in the pulse neural network model based on the leakage current data using a preset integrated discharge model with leakage.

[0151] In one embodiment of the present invention, it further includes:

[0152] The membrane potential reset module is used to reset the membrane potential in the spiking neural network model using a reset scheme.

[0153] In one embodiment of the present invention, the membrane potential reset module includes:

[0154] The Reset to Constant Value submodule is used to reset the membrane potential in the spiking neural network model to a constant value;

[0155] The reset value submodule is used to subtract the reset value from the membrane potential in the spiking neural network model.

[0156] In one embodiment of the present invention, the threshold prediction model is a data model constructed based on Bayes' theorem.

[0157] In this embodiment of the invention, by constructing a spiking neural network model and employing a preset threshold prediction model and a leaky integrated delivery model, the parameters of the spiking neural network model, including at least the pulse trigger threshold and membrane potential, are optimized. A task request is received, and the task type of the task request is determined. Based on the task type, a target spiking neural network model is determined, and the target spiking neural network model is called to process the task request to obtain the processing result. This enables the AI ​​chip to call the optimized spiking neural network model for task processing, and by optimizing the pulse trigger threshold and membrane potential in the spiking neural network model, the model processing efficiency is improved.

[0158] An embodiment of the present invention also provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the above-described task processing method based on an AI chip.

[0159] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the above-described task processing method based on an AI chip.

[0160] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0161] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0162] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0163] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0164] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.

[0165] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0166] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0167] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0168] The above provides a detailed description of a task processing method and apparatus based on an AI chip. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A task processing method based on an AI chip, characterized in that, The method comprises: constructing a spiking neural network model; adopting a preset threshold prediction model and a leaky integrate-and-fire model to optimize parameters in the spiking neural network model, at least including a spike trigger threshold and a membrane potential; wherein the threshold prediction model is a data model constructed based on Bayes theorem; receiving a task request and determining a task type of the task request; determining a target spiking neural network model according to the task type, and calling the target spiking neural network model to process the task request to obtain a processing result; The method comprises: adopting a threshold prediction model to optimize the spike trigger threshold in the spiking neural network model, and adopting a leaky integrate-and-fire model to optimize the membrane potential in the spiking neural network model; The method comprises: obtaining historical spike input data of the spiking neural network model; adopting a preset threshold prediction model to predict a relationship between a spike input synapse and a spike trigger threshold according to the historical spike input data, and optimizing the spike trigger threshold in the spiking neural network model based on the relationship between the spike input synapse and the spike trigger threshold; The method comprises: obtaining leakage data of a synapse potential in the spiking neural network model; adopting a preset leaky integrate-and-fire model to optimize the membrane potential in the spiking neural network model according to the leakage data.

2. The method of claim 1, wherein, Further comprising: adopting a reset scheme to reset the membrane potential in the spiking neural network model.

3. The method of claim 2, wherein, The method comprises: resetting the membrane potential in the spiking neural network model to a constant value; or subtracting a reset value from the membrane potential in the spiking neural network model.

4. An AI chip-based task processing apparatus, characterized by comprising: The device comprises: a spiking neural network model construction module for constructing a spiking neural network model; a parameter optimization module for adopting a preset threshold prediction model and a leaky integrate-and-fire model to optimize parameters in the spiking neural network model, at least including a spike trigger threshold and a membrane potential; wherein the threshold prediction model is a data model constructed based on Bayes theorem; a task determination module for receiving a task request and determining a task type of the task request; a task processing module for determining a target spiking neural network model according to the task type, and calling the target spiking neural network model to process the task request to obtain a processing result; The parameter optimization module comprises: a differentiated optimization submodule for adopting a threshold prediction model to optimize the spike trigger threshold in the spiking neural network model, and adopting a leaky integrate-and-fire model to optimize the membrane potential in the spiking neural network model; The differentiated optimization submodule comprises: A historical pulse input data acquisition unit is configured to acquire historical pulse input data of the pulse neural network model. A threshold value prediction model is preset, and a relationship between a pulse input synapse and a pulse trigger threshold value is predicted according to the historical pulse input data. The distinguishing optimization sub-module comprises: A leakage data acquisition unit is configured to acquire leakage data of a synapse potential in the pulse neural network model. A leakage data acquisition unit is configured to acquire leakage data of a synapse potential in the pulse neural network model.

5. An electronic device, comprising: The computer program is stored in the memory and can be run on the processor, and when the computer program is executed by the processor, the AI chip-based task processing method in any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium, characterized in that, The computer program is stored in the memory and can be run on the processor, and when the computer program is executed by the processor, the AI chip-based task processing method in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Brain-like chip and electronic equipment

    CN114372568A

  • Pulse neural network training method and device and chip

    CN114399041A