CN116048410A - Information reading method, device, electronic equipment and storage medium - Google Patents

Information reading method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116048410A
CN116048410A CN202310070738.4A CN202310070738A CN116048410A CN 116048410 A CN116048410 A CN 116048410A CN 202310070738 A CN202310070738 A CN 202310070738A CN 116048410 A CN116048410 A CN 116048410A
Authority
CN
China
Prior art keywords
neurons
information
neuron
synaptic
batch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310070738.4A
Other languages
Chinese (zh)
Inventor
吴臻志
祝夭龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Lynxi Technology Co Ltd
Original Assignee
Beijing Lynxi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Lynxi Technology Co Ltd filed Critical Beijing Lynxi Technology Co Ltd
Priority to CN202310070738.4A priority Critical patent/CN116048410A/en
Publication of CN116048410A publication Critical patent/CN116048410A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/061Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using biological neurons, e.g. biological neurons connected to an integrated circuit
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Neurology (AREA)
  • Molecular Biology (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Memory System (AREA)

Abstract

The embodiment of the disclosure provides an information reading method, an information reading device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring output information of a plurality of neurons; generating a data reading request based on the output information; based on the data reading request, the synaptic information of the plurality of neurons is read in batches from the memory, so that the reading speed and the reading efficiency of the synaptic information of the neurons can be improved.

Description

Information reading method, device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to an information reading method, an information reading device, electronic equipment and a storage medium.
Background
In large-scale brain simulation, neuronal synaptic information is typically stored in DDR (Doub l eData Rate, double rate) synchronous dynamic random access memory.
In the prior art, according to an event-driven calculation mode, which neurons are issued first is confirmed, and then the synaptic information corresponding to each neuron is read from the DDR according to the DDR addressing positions of the neurons.
However, since the neuron release is sparse and irregular, the number of synapses connected to each neuron is small, so that small blocks of data with scattered addresses are read from the DDR at a time, and the bandwidth utilization is easily insufficient, thereby affecting the speed and efficiency of the brain simulation system.
Disclosure of Invention
In view of this, embodiments of the present disclosure at least provide an information reading method, an information reading device, an electronic device, and a storage medium.
According to a first aspect of the present disclosure, there is provided an information reading method, the method comprising:
acquiring output information of a plurality of neurons;
generating a data reading request based on the output information;
based on the data read request, the synaptic information of the plurality of neurons is read from the memory in bulk.
In some embodiments, a first read duration of the synaptic information of the plurality of neurons is less than a second read duration, the second read duration being a sum of durations of the synaptic information reads for respectively initiating data read requests to the plurality of neurons.
In some embodiments, the generating a data read request based on the output information includes:
determining identification information of the neuron based on the output information;
determining batch information based on the identification information; the batch information comprises identification information of a plurality of neurons to be read currently and first address information of the plurality of neurons to be read currently, wherein the first address information is address information of synaptic information, and the synaptic information is synaptic information of postsynaptic neurons corresponding to the neurons;
Based on the batch information, a data read request is generated.
In some embodiments, the determining the lot information based on the identification information includes:
searching for a firing neuron forward and/or backward starting from any firing neuron, and determining batch information in a case where a plurality of firing neurons and non-firing neurons found are satisfied with a preset condition, wherein the non-firing neurons are located between the plurality of firing neurons.
In some embodiments, the preset conditions include at least one of:
the ratio between the number of issued neurons and the number of undischarged neurons is greater than or equal to a ratio threshold;
the number of undischarged neurons is not greater than a first number threshold;
the sum of the number of issued neurons and the number of non-issued neurons is not greater than a second number threshold.
In some embodiments, the plurality of neurons includes a first neuron and a second neuron, the first neuron is a starting neuron included in a current batch, the second neuron is a last neuron included in the current batch, and the batch information further includes a synaptic information length corresponding to the second neuron;
The generating a data read request based on the batch information includes:
based on the identification information of a plurality of neurons contained in the current batch, respectively acquiring first address information corresponding to the first neurons and the second neurons;
based on the first address information corresponding to the first neuron, the first address information corresponding to the second neuron, and the synaptic information length corresponding to the second neuron, a data read request is generated.
In some embodiments, the reading, from memory, the synaptic information of the plurality of neurons in bulk based on the data read request comprises:
sending the data reading request to a memory;
synaptic information of the plurality of neurons is received as a batch read from the memory.
In some embodiments, the obtaining output information of the plurality of neurons comprises:
detecting whether output information of a plurality of neurons exists;
if yes, obtaining the output information of the neurons.
According to a second aspect of the present disclosure, there is provided an information reading apparatus, the apparatus comprising:
the acquisition module is used for acquiring output information of a plurality of neurons;
The generation module is used for generating a data reading request based on the output information;
and the reading module is used for reading the synaptic information of the neurons in batches from the memory based on the data reading request.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: a processor; and a memory having stored thereon computer readable instructions which when executed by the processor implement the information reading method of any of the embodiments of the present disclosure.
According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium comprising: a computer program which, when executed by a processor, implements the information reading method according to any of the embodiments of the present disclosure.
In the embodiment of the disclosure, the data reading request is generated according to the output information of the plurality of neurons, and the synaptic information of the plurality of neurons is read in batches from the memory based on the data reading request, so that the reading speed and the reading efficiency of the synaptic information of the neurons can be effectively improved.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present disclosure will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings, in which:
Fig. 1 schematically illustrates a flowchart of an information reading method according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a schematic diagram of a neuron connection relationship;
FIG. 3 schematically illustrates a schematic diagram of synaptic information stored in a memory;
fig. 4 schematically illustrates a flowchart of another information reading method according to an embodiment of the present disclosure;
fig. 5 schematically shows a structural view of an information reading apparatus according to an embodiment of the present disclosure;
fig. 6 schematically shows a structural schematic diagram of an electronic device according to an embodiment of the present disclosure.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are presented merely to enable one skilled in the art to better understand and practice the present disclosure and are not intended to limit the scope of the present disclosure in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Those skilled in the art will appreciate that embodiments of the present disclosure may be implemented as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the following forms, namely: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
Fig. 1 schematically illustrates a flowchart of an information reading method provided according to an embodiment of the present disclosure. The information reading method may be executed by a processing core, or may be implemented by a processor calling computer readable instructions stored in a memory. As shown in fig. 1, the method may include the following processes:
in step 101, output information of a plurality of neurons is acquired.
As an example, the neurons described above may be neurons in a impulse neural network. The impulse neural network is more suitable for the actual brain bionic design, and is widely applied to a plurality of fields such as pattern recognition, image processing, computer vision and the like.
In a impulse neural network, the connection between two neurons may be referred to as synapses, each of which may correspond to one pre-neuron and one post-neuron, where the pre-neuron and the post-neuron may be relative concepts that may be used to describe the connection and firing relationships of the neurons to which the synapses correspond. For example, fig. 2 is a schematic diagram of connection relationships of a portion of neurons in an embodiment of the disclosure. As shown in fig. 2, the plurality of neurons a are in full connection with the plurality of neurons C, and the plurality of neurons a are connected with the plurality of neurons C through a synaptic array. Wherein, for any one of the synapses in the synapse array, the neuron A corresponding to the synapse is a presynaptic neuron, and the neuron C corresponding to the synapse is a postsynaptic neuron. The post-synaptic neuron regulates and controls the membrane potential by accumulating the pulse of the pre-synaptic neuron, and when the membrane potential reaches a certain threshold potential, the neuron can generate an output pulse signal and transmit the output pulse signal to the corresponding post-synaptic neuron. The neurons outputting the pulse signals may be firing neurons, and the neurons not outputting the pulse signals may be non-firing neurons. The output information of a neuron may be used to indicate that the neuron is a firing neuron or a non-firing neuron. The synaptic information may generally include synaptic weight information, delay information, corresponding post-synaptic neuron identification, and the like.
In some alternative implementations, the synaptic information for the plurality of neurons may be stored in off-chip memory, which may be external to the neuromorphic chip, and the off-chip memory may be double-rate synchronous dynamic random access memory (Doub l e Data Rate SDRAM, DDR).
Taking the synaptic information stored in the memory shown in fig. 3 as an example, wherein,
Figure BDA0004065535220000051
can indicate that neurons are issued, < >>
Figure BDA0004065535220000052
It may be indicated that neurons are not issued and each square may store information of one synapse. As shown in FIG. 3, the first, third, seventh and eighth rows of memory store the synapse information for the issued neurons and the second, fourth, fifth and sixth rows store the synapse information for the un-issued neurons.
In some alternative implementations, it may be detected whether there is output information of a plurality of neurons; if yes, obtaining output information of the neurons. Specifically, whether a plurality of issued neurons exist in an area formed by a plurality of neurons may be detected, and if a plurality of issued neurons exist, output information of the plurality of neurons may be obtained, where the plurality of neurons may include a plurality of issued neurons, or may also include a plurality of issued neurons and a plurality of non-issued neurons, which is not specifically limited in this embodiment of the present disclosure.
In step 102, a data read request is generated based on the output information.
In some alternative implementations, identification information of a plurality of neurons corresponding to the output information may be determined based on the output information, then, first address information corresponding to the identification information may be determined based on the identification information, and then, a data read request may be generated based on the plurality of first address information, where the first address information may be address information of synaptic information, and the synaptic information may be synaptic information of a post-synaptic neuron corresponding to the identification information.
Or, in some alternative implementations, some preset conditions may be preset, so after the output information is acquired, identification information of a plurality of neurons meeting the preset conditions may be determined from the output information based on the preset conditions, then a corresponding plurality of first address information is determined based on the identification information, and then a data reading request may be generated based on the plurality of first address information, so that a batch reading of synaptic information of a preset number of neurons is realized based on the generated data reading request.
As an example, the preset condition may be a preset number condition, that is, preset number information may be preset, the preset number information may be neuron number information to be read in batch, etc., so after the output information is obtained, identification information of a preset number of neurons to be read may be determined based on the output information and the preset number information, then, a corresponding preset number of first address information may be determined based on the preset number of identification information, and then, a data reading request may be generated based on the preset number of first address information. Thus, the synapse information of the preset number of neurons can be read in batches based on the generated data reading request.
As an example, the above-mentioned preset condition may also be that between any adjacent two firing neurons, the number of non-firing neurons is smaller than a preset number threshold, or the like. Specifically, between any two adjacent issued neurons, a plurality of pieces of neuron information in which the number of non-issued neurons is smaller than a preset number threshold may be determined as a piece of batch-read neuron information or the like. It should be noted that, in the embodiment of the present disclosure, the preset conditions and the specific implementation manner of generating the data read request are not specifically limited.
In step 103, the synaptic information of the plurality of neurons is read in bulk from the memory based on the data read request.
In some alternative implementations, after the data read request is generated through the processing in step 102, the data read request may be sent to the memory, and then the synaptic information of the plurality of neurons read in batches from the memory is received, so after the synaptic information returned from the memory is received, that is, after the synaptic information is read to the chip, the synaptic information to be retained may be selected as the final synaptic information according to the identification information of the neuron to which the synaptic information belongs.
Since the efficiency of reading large data from DDR is far higher than that of reading small data, for example, the reading efficiency of reading a data block of 128KB is 8 times that of reading a data block of 1KB, by adopting the processing mode, a data reading request is generated according to the output information of a plurality of neurons, and the synaptic information of the plurality of neurons is read in batches from a memory based on the data reading request, so that compared with the synaptic information of one neuron read from the memory at a time, the reading speed and the reading efficiency of the synaptic information of the neurons are effectively improved.
In some optional implementations, the first read duration for reading the synaptic information of the plurality of neurons in batches from the memory is less than the second read duration, where the second read duration is a sum of durations for respectively initiating data read requests to the plurality of neurons for reading the synaptic information. As an example, when two adjacent neurons issue in a certain area, a transmission may be started to read the synaptic information corresponding to the two neurons at the same time, and the first reading time consumed by the transmission is far less than the sum of the two reading time durations of the independent reading.
In some alternative implementations, for a plurality of neurons in an area, a first read duration for bulk reading of synaptic information for the plurality of neurons from memory may be compared to a second read duration that is the sum of the durations for which the plurality of neurons respectively initiate data read requests for synaptic information reading. Under the condition that the first reading time length is far smaller than the second reading time length, the synaptic information of the plurality of neurons can be read in batches, and then the synaptic information reading efficiency of the neurons is effectively improved.
As shown in fig. 4, the processing method of step 102 may be varied, and an alternative processing method is provided below, and specific reference may be made to the specific processing procedures of steps 1021-1023 below.
In step 1021, identification information of the neuron is determined based on the output information. The identification information may include identification information of issued neurons and identification information of non-issued neurons.
In some alternative implementations, the firing pulse sequence may be determined based on the output information, and the identification information of the neuron may be determined based on the firing pulse sequence.
The above-described firing pulse sequence may be represented by identification information of neurons, or may be represented by identification information of firing neurons, or may be represented by a binary sequence (e.g., 0/1 sequence), or the like, which is not particularly limited in the embodiment of the present specification.
In the case where the firing pulse sequence is represented by identification Information (ID) of a firing neuron, for example, in fig. 3, the firing pulse sequence may be represented as [0,2,6,7], it may be determined that the ID of a firing neuron is 0,2,6,7, and accordingly, it may be determined that the ID of a non-firing neuron is 1, 3, 4, 5.
In the case where the firing pulse sequence is represented by a binary sequence, still as exemplified in fig. 3, the firing pulse sequence may be represented by [1,0,1,0,0,0,1,1], where 1 may represent firing neurons and 0 may represent non-firing neurons, the sequence length being the number of neurons. Traversing this sequence from scratch, the identification Information (ID) of the current neuron can be obtained. From this firing pulse sequence, it can be determined that the IDs of the firing neurons are 0,2,6,7, and accordingly, the IDs of the non-firing neurons can be determined to be 1, 3, 4, 5.
In step 1022, batch information is determined based on the identification information; the batch information comprises identification information of a plurality of neurons to be read currently and first address information of the plurality of neurons to be read currently, wherein the first address information is address information of synaptic information, and the synaptic information is synaptic information of postsynaptic neurons corresponding to the neurons;
in some alternative implementations, since the synapse information for the non-issued neurons is not useful, the identification information for the issued neurons may be filtered based on the identification information, and the batch information may be determined based on the identification information for the issued neurons.
The implementation of step 1022 may be varied and an alternative process is provided below, see in particular the process described below.
Searching for a firing neuron forward and/or backward from any firing neuron, and determining batch information in a case where a plurality of firing neurons and non-firing neurons located between the plurality of firing neurons are searched for, satisfy a preset condition.
In some alternative implementations, the firing pulse sequence may be traversed based on the firing pulse sequence, and in particular, firing neurons may be searched forward and/or backward starting from any firing neuron based on the firing pulse sequence. As an example, the firing neurons may be searched backward starting from the first firing neuron corresponding to the firing pulse sequence; alternatively, based on the firing pulse sequence, the last firing neuron corresponding to the firing pulse sequence may be searched for a firing neuron; alternatively, based on the firing pulse sequence, the firing neurons may be searched forward or backward from any firing neuron in the middle portion corresponding to the firing pulse sequence. The embodiment of the present specification is not particularly limited to the above specific procedure of searching for the issuing neurons.
And then, judging whether all the searched dispensing neurons and the non-dispensing neurons among the dispensing neurons meet the preset conditions or not according to each newly searched dispensing neuron, classifying the newly searched dispensing neurons into batches for batch reading under the condition that the preset conditions are met, and batch reading the synaptic information of the neurons by using a data reading request together with the previously searched dispensing neurons.
In some alternative implementations, the preset condition that the plurality of issued neurons and the non-issued neurons need to satisfy may be that a ratio between the number of issued neurons and the number of non-issued neurons is greater than or equal to a ratio threshold.
Specifically, it may be determined whether the newly found dispensing neuron should be classified into the lot by judging a numerical relationship between a ratio between the number of dispensing neurons and the number of non-dispensing neurons and a ratio threshold after the newly found dispensing neuron is classified into the lot determined to be read in bulk.
For example, for newly found issuing neuron A, if the issuing neuron A falls into a batch for which it has been determined that the combined reads are less than the ratio threshold, then it is indicated that the incorporation of issuing neuron A would result in too much invalid data in the batch, not belonging to the batch read range, and that issuing neuron A may be the starting neuron for the next batch; otherwise, if the number of issued neurons and the number of non-issued neurons are greater than or equal to the ratio threshold after the issued neurons a are classified into the batch, it is determined that the issued neurons a may be classified into the batch, and new issued neurons continue to be searched. In the embodiment of the present disclosure, the ratio threshold may be set to, for example, 0.25 or 0.5, and the specific numeric values of the ratio threshold are not specifically limited in the embodiment of the present disclosure.
In some alternative implementations, the preset condition may be that the number of non-issued neurons is not greater than a first number threshold.
Specifically, whether the newly found dispensing neuron should be classified into the lot may be determined by judging a numerical relationship between the number of non-dispensing neurons and the first number threshold after the newly found dispensing neuron is classified into the lot which has been determined to be read in bulk.
For example, for newly found issued neuron B, if the number of non-issued neurons is greater than the first number threshold after the issued neurons fall into the batch that has been determined to merge reads, it is indicated that the incorporation of issued neuron B will cause the invalid data in the batch to be excessive, not belonging to the batch read range, and that issued neuron B may be considered as the starting neuron of the next batch; otherwise, if the number of non-issued neurons is still less than or equal to the first number threshold after the issued neurons B are classified into the lot, it is determined that the issued neurons B may be classified into the lot, and new issued neurons continue to be searched. In the embodiment of the present disclosure, the first number threshold may be, for example, 3 or 5, and the specific value of the first number threshold is not specifically limited in the embodiment of the present disclosure.
In some alternative implementations, the preset condition may be that a sum of the number of issued neurons and the number of non-issued neurons is not greater than a second number threshold. Specifically, whether the newly found dispensing neuron should be classified into the lot may be determined by judging a numerical relationship between a sum of the number of dispensing neurons and the number of non-dispensing neurons and a second number threshold after the newly found dispensing neuron is classified into the lot which has been determined to be read in bulk.
For example, for newly found issuing neuron C, if the sum of the number of issuing neurons and the number of non-issuing neurons is greater than the second number threshold after the batch read has been determined, it is indicated that the incorporation of the issuing neuron C will make the data volume of the batch too large, not conform to the requirement of the transmission bandwidth, not belong to the batch read range, and the issuing neuron C may be used as the starting neuron of the next batch; otherwise, if the sum of the number of issued neurons and the number of non-issued neurons is still less than or equal to the second number threshold after the issued neurons C are classified into the lot, it is determined that the issued neurons C may be classified into the lot, and new issued neurons continue to be searched. In the embodiment of the present disclosure, the second number threshold may be, for example, 5 or 10, and the specific value of the second number threshold is not specifically limited in the embodiment of the present disclosure.
In the embodiment of the disclosure, the above ratio threshold, the first number threshold, and the second number threshold may be used to determine batch information, and these thresholds may be determined according to a transmission bandwidth between a processing core executing the information reading method and a memory, so as to better utilize the transmission bandwidth, and further effectively improve a reading speed and a reading efficiency of neuronal synaptic information.
In step 1023, a data read request is generated based on the batch information.
In some alternative implementations, the plurality of neurons may include a first neuron and a second neuron, the first neuron being a starting neuron included in the current batch, the second neuron being a last neuron included in the current batch, the batch information further including a synaptic information length corresponding to the second neuron.
Specifically, first address information corresponding to the first neuron and the second neuron may be obtained based on identification information of a plurality of neurons included in the current batch, respectively; generating a data reading request based on the first address information corresponding to the first neuron, the first address information corresponding to the second neuron and the synaptic information length corresponding to the second neuron; the first address information may be address information of a plurality of synaptic information, and the synaptic information may be synaptic information of a post-synaptic neuron corresponding to the plurality of neurons.
For example, assuming that the first address information of the first neuron is A1, the first address information of the second neuron is A2, and the length of the synaptic information corresponding to the second neuron is L1, the total read data length l=a2+l1-A1. In this way, the first address A1 and the data length L may be sent to the signaling assembly module, and the signaling assembly module may generate a data read request. The signaling assembling module may be configured to assemble a DDR read request signaling, where the signaling includes the first address A1 and the data length L.
In some optional implementations, the data reading request may also be generated according to the first address information corresponding to each neuron in the plurality of neurons included in the current batch.
In some alternative implementations, the data reading request may be generated based on the batch information after determining one batch, or a plurality of data reading requests may be generated based on the determined plurality of batch information after determining a plurality of batches based on the issuing pulse sequence, or the like. As an example, after each determination of a batch, a data read request corresponding to the batch may be generated by the signaling assembly module, and then the synaptic information read may be performed using the generated data read request. In this way, the DDR bandwidth can be better utilized, and continuous transmission can be realized. Alternatively, after a plurality of batches are determined based on the issuing pulse sequence, a plurality of data read requests corresponding to the plurality of batch information may be generated by the signaling assembly module, and then the synaptic information read may be performed based on the generated plurality of data read requests. The specific method of generating the data read request described above is not particularly limited in the embodiments of the present disclosure.
In some alternative implementations, after the data read request is generated, the data read request may be sent to memory; since the data read request indicates the address information of the batch of the synaptic information to be read, the batch of the synaptic information of the plurality of neurons can be read from the memory by receiving the synaptic information of the neurons corresponding to the address information returned from the memory.
After receiving the synaptic information of the plurality of neurons read in batch from the memory, determining the neuron identification information corresponding to the synaptic information; and screening the synaptic information based on the neuron identification information, and determining the screened synaptic information as the synaptic information to be reserved.
A method of determining batch information in an information reading method according to at least one embodiment of the present disclosure will be described in detail below by taking a firing pulse sequence represented by an ID of a firing neuron as an example.
The issued pulse sequence is represented by the ID of the neuron, which is a one-dimensional, continuously increasing number. This sequence may be traversed from scratch.
First, let the starting neuron ID be ID1, which can be generally obtained by the judgment process of the previous batch, or be equal to the first ID in this sequence at the beginning, concatenate validid=invalidid=0, where ValidID may represent the number of valid IDs, i.e. the number of issued neurons, and invalidID may represent the number of invalid IDs, i.e. the number of non-issued neurons.
Then, the above-mentioned issued pulse sequence is traversed, the angle mark whose next output information is 1 is found and is marked as ID2, and the number of invalid IDs, i.e., invalidid+=id2-ID 1-1, is obtained by calculating the difference between them. And counts the number validid++ of valid IDs by a counter accumulation.
In the case of validID/invalidID < p, and/or invalidID > M, or in the case of validid+invalidid > n, it is determined that this ID2 does not belong to the present batch read range, and it is taken as the starting neuron ID of the next batch (i.e., ID1 of the next batch); otherwise, the ID2 is classified into the current batch, and the next ID is read continuously. Wherein p, m, n may be empirical values, p may be the proportional threshold, m may be the first number threshold, and n may be the second number threshold, as examples.
After traversing the firing pulse sequence, batch information for batch reading of a plurality of neurons corresponding to the firing pulse sequence can be determined.
A method for determining batch information in an information reading method according to at least one embodiment of the present disclosure will be described in detail below by taking a burst pulse sequence represented by a densely stored form as an example.
The densely stored form, i.e. whether or not issued, the output information of the neurons is represented by a 0/1 sequence, wherein 0 can represent non-issued, 1 can represent issued, the sequence length can represent the number of neurons, the issued pulse sequence is traversed from the beginning, and the ID of the current neuron is obtained.
First, let the starting neuron ID be ID1, which can be generally obtained by the judgment process of the previous batch, or be the corner mark with the first output information value equal to 1 in this sequence at the beginning, denoted as ID1, and validid=invalidid=0, where ValidID may represent the number of valid IDs, i.e. the number of issued neurons, and invalidID may represent the number of invalid IDs, i.e. the number of non-issued neurons.
Then, the above-mentioned issued pulse sequence is traversed, the angle with the next output information of 1 in the sequence is marked as ID2, and the invalid ID number, namely, invalididID+ =ID 2-ID1-1, is obtained by calculating the difference between the two. And counts the number validid++ of valid IDs by a counter accumulation.
In the case of validID/invalidID < p, and/or invalidID > M, or in the case of validid+invalidid > n, it is determined that this ID2 does not belong to the present batch read range, and it is taken as the starting neuron ID of the next batch (i.e., ID1 of the next batch); otherwise, the ID2 is classified into the current batch, and the next ID is read continuously. Wherein p, m, n may be empirical values, p may be the proportional threshold, m may be the first number threshold, and n may be the second number threshold, as examples.
After traversing the firing pulse sequence, batch information for batch reading of a plurality of neurons corresponding to the firing pulse sequence can be determined.
The method for determining batch information in the information reading method according to at least one embodiment of the present disclosure will be described in detail below taking as an example the synaptic information stored in the memory shown in fig. 3. In FIG. 3, the firing information of the neurons may be represented as [1,0,1,0,0,0,1,1] (densely stored morphology, i.e., binary sequence representation), or [0,2,6,7] (ID sequence representation of the firing neurons); assume in this example that the proportional threshold p=0.25, the first number threshold m=3, and the second number threshold n=10.
Taking the first firing neuron in the sequence as the starting neuron, id1=0, the next firing neuron id2=2, the number of invalid IDs invalidid=1, the number of valid IDs validid=2, it can be seen that m, p, n all meet the requirements, so that the firing neurons id2=2 can be read in the same batch (batch 1) as the firing neurons id2=0.
Continuing the traversal, since the third issued neuron id2=6, at which time the invalidid=4, exceeds m, the first batch cannot be incorporated, and therefore the first batch contains only the first two pulses, while the id1=6 of the second batch is specified. Next, continuing to traverse id2=7, at which time invalidid=0, it is therefore necessary to incorporate batch 2, i.e. to read the issuing neurons of id2=7 and id1=6 in the same batch (batch 2).
Since all firing neurons in the sequence have been traversed, the batch decision process ends.
The embodiment of the disclosure also provides an information reading device. Fig. 5 schematically shows a schematic structure of an information reading apparatus according to an embodiment of the present disclosure, which may be applied to an electronic device, for example. In the following description, the functions of the respective modules of the apparatus will be briefly described, and detailed processing thereof may be combined with the description of the information reading method of any one of the embodiments of the present disclosure described above. As shown in fig. 5, the apparatus may include:
an obtaining module 501, configured to obtain output information of a plurality of neurons;
a generating module 502, configured to generate a data reading request based on the output information;
a reading module 503, configured to read, in batch, the synaptic information of the plurality of neurons from the memory based on the data reading request.
In some embodiments, a first read duration of the synaptic information of the plurality of neurons is less than a second read duration, the second read duration being a sum of durations of the synaptic information reads for respectively initiating data read requests to the plurality of neurons.
In some embodiments, the generating module comprises:
a first determining unit configured to determine identification information of a neuron based on the output information;
a second determining unit configured to determine batch information based on the identification information; the batch information comprises identification information of a plurality of neurons to be read currently and first address information of the plurality of neurons to be read currently, wherein the first address information is address information of synaptic information, and the synaptic information is synaptic information of postsynaptic neurons corresponding to the neurons;
and a generation unit configured to generate a data reading request based on the batch information.
In some embodiments, the second determining unit is configured to:
searching for a firing neuron forward and/or backward starting from any firing neuron, and determining batch information in a case where a plurality of firing neurons and non-firing neurons found are satisfied with a preset condition, wherein the non-firing neurons are located between the plurality of firing neurons. In some embodiments, the preset conditions include at least one of:
the ratio between the number of issued neurons and the number of undischarged neurons is greater than or equal to a ratio threshold;
The number of undischarged neurons is not greater than a first number threshold;
the sum of the number of issued neurons and the number of non-issued neurons is not greater than a second number threshold.
In some embodiments, the plurality of neurons includes a first neuron and a second neuron, the first neuron is a starting neuron included in a current batch, the second neuron is a last neuron included in the current batch, and the batch information further includes a synaptic information length corresponding to the second neuron;
the generation module is specifically configured to, when configured to generate a data read request based on the batch information:
based on the identification information of a plurality of neurons contained in the current batch, respectively acquiring first address information corresponding to the first neurons and the second neurons;
based on the first address information corresponding to the first neuron, the first address information corresponding to the second neuron, and the synaptic information length corresponding to the second neuron, a data read request is generated.
In some embodiments, the method is applied to a processing core; the apparatus further comprises a first determining module for:
And determining at least one of the proportion threshold value, the first quantity threshold value and the second quantity threshold value according to the transmission bandwidth between the processing core and the memory, wherein the proportion threshold value, the first data threshold value and the second data threshold value are respectively used for determining batch information.
In some embodiments, the reading module is specifically configured to:
sending the data reading request to a memory;
synaptic information of the plurality of neurons is received as a batch read from the memory.
In some embodiments, the apparatus further comprises:
the second determining module is used for determining neuron identification information corresponding to the synaptic information;
and the third determining module is used for screening the synaptic information based on the neuron identification information and determining the screened synaptic information as the synaptic information to be reserved. In some embodiments, the obtaining module is specifically configured to:
detecting whether output information of a plurality of neurons exists;
if yes, obtaining the output information of the neurons.
Fig. 6 is an electronic device provided in at least one embodiment of the present disclosure, the device including a memory for storing computer instructions executable on the processor for implementing the information reading method of any of the embodiments of the present disclosure when the computer instructions are executed.
At least one embodiment of the present disclosure also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the information reading method according to any of the embodiments of the present disclosure.
One skilled in the relevant art will recognize that one or more embodiments of the present description may be provided as a method, circuit, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present description also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the intelligent driving method described in any of the embodiments of the present description. Wherein the term "and/or" means at least one of the two, e.g., "a and/or B" includes three schemes: A. b, and "a and B".
The same and similar parts of the embodiments in this specification are mutually referred to, and each embodiment focuses on the differences from the other embodiments. In particular, for the method embodiment, since the steps are substantially similar to the functions implemented by the modules of the intelligent driving apparatus, the description is relatively simple, and reference should be made to the description of the apparatus embodiment for relevant points.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Embodiments of the subject matter and the functional operations described in this specification can be implemented in: digital electronic circuitry, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and structural equivalents thereof, or a combination of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by, or to control the operation of, data processing apparatus. Alternatively or additionally, the program instructions may be encoded on a manually-generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode and transmit information to suitable receiver apparatus for execution by data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented AS, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an AS ic (application-specific integrated circuit).
Computers suitable for executing computer programs include, for example, general purpose and/or special purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit will receive instructions and data from a read only memory and/or a random access memory. The essential elements of a computer include a central processing unit for carrying out or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks, etc. However, a computer does not have to have such a device. Furthermore, the computer may be embedded in another device, such as a mobile phone, a Personal Digital Assistant (PDA), a mobile audio or video player, a game console, a global positioning circuit (GPS) receiver, or a portable storage device such as a Universal Serial Bus (USB) flash drive, to name a few.
Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices including, for example, semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disk or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features of specific embodiments of particular inventions. Certain features that are described in this specification in the context of separate embodiments can also be implemented in combination in a single embodiment. On the other hand, the various features described in the individual embodiments may also be implemented separately in the various embodiments or in any suitable subcombination. Furthermore, although features may be acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.
Similarly, although operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various circuit modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and circuits can generally be integrated together in a single software product or packaged into multiple software products.
Thus, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. Furthermore, the processes depicted in the accompanying drawings are not necessarily required to be in the particular order shown, or sequential order, to achieve desirable results. In some implementations, multitasking and parallel processing may be advantageous.
The foregoing description of the preferred embodiment(s) is (are) merely intended to illustrate the embodiment(s) of the present invention, and it is not intended to limit the embodiment(s) of the present invention to the particular embodiment(s) described.

Claims (10)

1. An information reading method, characterized in that the method comprises:
acquiring output information of a plurality of neurons;
generating a data reading request based on the output information;
based on the data read request, the synaptic information of the plurality of neurons is read from the memory in bulk.
2. The method of claim 1, wherein a first read duration for bulk reading of synaptic information for the plurality of neurons from memory is less than a second read duration, the second read duration being a sum of durations for respectively initiating data read requests for the plurality of neurons for synaptic information reading.
3. The method of claim 1, wherein generating a data read request based on the output information comprises:
determining identification information of the neuron based on the output information;
determining batch information based on the identification information; the batch information comprises identification information of a plurality of neurons to be read currently and first address information of the plurality of neurons to be read currently, wherein the first address information is address information of synaptic information, and the synaptic information is synaptic information of postsynaptic neurons corresponding to the neurons;
Based on the batch information, a data read request is generated.
4. A method according to claim 3, wherein said determining batch information based on said identification information comprises:
searching for a firing neuron forward and/or backward starting from any firing neuron, and determining batch information in a case where a plurality of firing neurons and non-firing neurons found are satisfied with a preset condition, wherein the non-firing neurons are located between the plurality of firing neurons.
5. The method according to any one of claims 1-4, wherein the preset conditions include at least one of:
the ratio between the number of issued neurons and the number of undischarged neurons is greater than or equal to a ratio threshold;
the number of undischarged neurons is not greater than a first number threshold;
the sum of the number of issued neurons and the number of non-issued neurons is not greater than a second number threshold.
6. The method of claim 5, wherein the plurality of neurons comprises a first neuron and a second neuron, the first neuron being a starting neuron comprised by a current batch, the second neuron being a last neuron comprised by the current batch, the batch information further comprising a synaptic information length corresponding to the second neuron;
The generating a data read request based on the batch information includes:
based on the identification information of a plurality of neurons contained in the current batch, respectively acquiring first address information corresponding to the first neurons and the second neurons;
based on the first address information corresponding to the first neuron, the first address information corresponding to the second neuron, and the synaptic information length corresponding to the second neuron, a data read request is generated.
7. The method of claim 6, wherein the bulk reading of the synaptic information for the plurality of neurons from memory based on the data read request comprises:
sending the data reading request to a memory;
synaptic information of the plurality of neurons is received as a batch read from the memory.
8. The method of claim 1, wherein the obtaining output information of a plurality of neurons comprises:
detecting whether output information of a plurality of neurons exists;
if yes, obtaining the output information of the neurons.
9. An information reading apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring output information of a plurality of neurons;
The generation module is used for generating a data reading request based on the output information;
and the reading module is used for reading the synaptic information of the neurons in batches from the memory based on the data reading request.
10. An electronic device comprising a memory for storing computer instructions executable on the processor for implementing the information reading method of any one of claims 1 to 8 when the computer instructions are executed.
CN202310070738.4A 2023-01-13 2023-01-13 Information reading method, device, electronic equipment and storage medium Pending CN116048410A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310070738.4A CN116048410A (en) 2023-01-13 2023-01-13 Information reading method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310070738.4A CN116048410A (en) 2023-01-13 2023-01-13 Information reading method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116048410A true CN116048410A (en) 2023-05-02

Family

ID=86116195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310070738.4A Pending CN116048410A (en) 2023-01-13 2023-01-13 Information reading method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116048410A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117349033A (en) * 2023-12-05 2024-01-05 北京灵汐科技有限公司 Brain simulation processing method and device, electronic equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117349033A (en) * 2023-12-05 2024-01-05 北京灵汐科技有限公司 Brain simulation processing method and device, electronic equipment and computer readable storage medium
CN117349033B (en) * 2023-12-05 2024-03-08 北京灵汐科技有限公司 Brain simulation processing method and device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
Hu et al. Dynamic feature fusion for semantic edge detection
Shermin et al. Adversarial network with multiple classifiers for open set domain adaptation
US11188816B2 (en) Neuromorphic chip and method and apparatus for detecting spike event
US20170372169A1 (en) Method and apparatus for recognizing image content
AU2020315983B2 (en) Event-based classification of features in a reconfigurable and temporally coded convolutional spiking neural network
Oster et al. Computation with spikes in a winner-take-all network
CN111417963A (en) Improved spiking neural network
US20240020514A1 (en) Improper neural network input detection and handling
WO2015154206A1 (en) A method and a system for face verification
EP3324344B1 (en) Digital electronic circuit and system implementing a spiking neural network for performing unsupervised detection of patterns
Huo et al. Vehicle type classification and attribute prediction using multi-task RCNN
CN116048410A (en) Information reading method, device, electronic equipment and storage medium
KR20210040415A (en) Object classification method and device
Minhas et al. Anomaly detection in images
Zhang et al. Oracle character recognition by nearest neighbor classification with deep metric learning
CN110020715B (en) Neural network identification method and device using mixed coding of fluctuation and pulse signals
CN112329730B (en) Video detection method, device, equipment and computer readable storage medium
Bhattacharya et al. Interleaved deep artifacts-aware attention mechanism for concrete structural defect classification
CN111340194B (en) Pulse convolution neural network neural morphology hardware and image identification method thereof
KR102091498B1 (en) Unsupervised learning device and learning method therefore
Cong et al. CAN: Contextual aggregating network for semantic segmentation
Song et al. DeepAct: a deep neural network model for activity detection in untrimmed videos
CN117523218A (en) Label generation, training of image classification model and image classification method and device
CN114742213A (en) Neuron information processing method, device, chip and storage medium
CN114882247A (en) Image processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination