Information reading method and device, electronic equipment and storage medium

CN116048410BActive Publication Date: 2026-09-25LYNXI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310070738.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-13
Publication Date
2026-09-25
Estimated Expiration
2043-01-13

AI Technical Summary

Technical Problem

[0004]然而,由于神经元发放是稀疏且无规律的,每个神经元所连接的突触数量又较少,导致每次从DDR中读取的是分散地址的小块数据,容易造成带宽利用不足,进而影响脑仿真系统的速度和效率

Benefits of technology

[0037]在本公开实施例中,根据多个神经元的输出信息,生成数据读取请求,并基于所述数据读取请求,从存储器中批量读取所述多个神经元的突触信息,可以有效提高神经元突触信息的读取速度和读取效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116048410B_ABST
    Figure CN116048410B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide an information reading method and device, electronic equipment and storage medium, the method comprising: obtaining output information of a plurality of neurons; generating a data reading request based on the output information; and based on the data reading request, batch reading synaptic information of the plurality of neurons from the memory, which can improve the reading speed and efficiency of the synaptic information of the neurons.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to an information reading method, apparatus, electronic device, and storage medium. Background Technology

[0002] In large-scale brain simulations, neuronal synaptic information is typically stored in DDR (Double Data Rate) synchronous dynamic random access memory.

[0003] In existing technologies, based on event-driven computing, the first step is to identify which neurons are firing, and then the synaptic information corresponding to each neuron is read from the DDR according to the neuron addressing DDR location.

[0004] However, since neuronal firing is sparse and irregular, and each neuron connects to a small number of synapses, each read from the DDR is a small block of data with scattered addresses, which can easily lead to insufficient bandwidth utilization and thus affect the speed and efficiency of the brain simulation system. Summary of the Invention

[0005] In view of the above, the present disclosure provides at least one information reading method, apparatus, electronic device, and storage medium.

[0006] According to a first aspect of this disclosure, an information reading method is provided, the method comprising:

[0007] Obtain the output information of multiple neurons;

[0008] Based on the output information, a data read request is generated;

[0009] Based on the data read request, the synaptic information of the multiple neurons is read in batches from the memory.

[0010] In some embodiments, the first reading duration for batch reading synaptic information of the plurality of neurons from the memory is less than the second reading duration, wherein the second reading duration is the sum of the durations for each of the plurality of neurons to initiate a data reading request to read synaptic information.

[0011] In some embodiments, generating a data read request based on the output information includes:

[0012] Based on the output information, the identification information of the neuron is determined;

[0013] Based on the identification information, batch information is determined; wherein, the batch information includes the identification information of multiple neurons to be read, and the first address information of the multiple neurons to be read, wherein the first address information is the address information of synaptic information, and the synaptic information is the synaptic information of the postsynaptic neuron corresponding to the neuron;

[0014] Based on the batch information, a data read request is generated.

[0015] In some embodiments, determining batch information based on the identification information includes:

[0016] Starting from any firing neuron, search forward and / or backward for firing neurons. If the multiple firing neurons and non-firing neurons found meet preset conditions, determine batch information, wherein the non-firing neurons are located among the multiple firing neurons.

[0017] In some embodiments, the preset conditions include at least one of the following:

[0018] The ratio between the number of fired neurons and the number of unfired neurons is greater than or equal to a ratio threshold.

[0019] The number of unfired neurons is no greater than a first quantity threshold;

[0020] The sum of the number of firing neurons and the number of unfiring neurons is not greater than a second quantity threshold.

[0021] In some embodiments, the plurality of neurons includes a first neuron and a second neuron, wherein the first neuron is the starting neuron included in the current batch, the second neuron is the last neuron included in the current batch, and the batch information also includes the synaptic information length corresponding to the second neuron;

[0022] The step of generating a data read request based on the batch information includes:

[0023] Based on the identification information of multiple neurons included in the current batch, the first address information corresponding to the first neuron and the second neuron is obtained respectively;

[0024] A data read request is generated 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.

[0025] In some embodiments, the step of reading the synaptic information of the plurality of neurons in batches from the memory based on the data read request includes:

[0026] Send the data read request to the memory;

[0027] Receive synaptic information of the plurality of neurons read in batches from the memory.

[0028] In some embodiments, obtaining the output information of multiple neurons includes:

[0029] Detect whether there is output information from multiple neurons;

[0030] If so, then obtain the output information of the multiple neurons.

[0031] According to a second aspect of this disclosure, an information reading device is provided, the device comprising:

[0032] The acquisition module is used to acquire the output information of multiple neurons;

[0033] The generation module is used to generate a data read request based on the output information;

[0034] The reading module is used to read the synaptic information of the multiple neurons in batches from the memory based on the data reading request.

[0035] According to a third aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory storing computer-readable instructions, which, when executed by the processor, implement the information reading method described in any embodiment of this disclosure.

[0036] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided, comprising: a computer program that, when executed by a processor, implements the information reading method described in any embodiment of this disclosure.

[0037] In this embodiment of the disclosure, a data read request is generated based on the output information of multiple neurons, and the synaptic information of the multiple neurons is read in batches from the memory based on the data read request, which can effectively improve the reading speed and efficiency of neuron synaptic information. Attached Figure Description

[0038] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which:

[0039] Figure 1 A flowchart illustrating an information reading method according to an embodiment of the present disclosure is shown schematically;

[0040] Figure 2 A schematic diagram illustrating a neuronal connection relationship is shown.

[0041] Figure 3 A schematic diagram illustrating synaptic information stored in memory is shown.

[0042] Figure 4 A flowchart illustrating another information reading method according to an embodiment of the present disclosure is shown schematically;

[0043] Figure 5 A schematic diagram of an information reading device according to an embodiment of the present disclosure is shown.

[0044] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown.

[0045] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation

[0046] The principles and spirit of this disclosure will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement this disclosure, and are not intended to limit the scope of this disclosure in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.

[0047] Those skilled in the art will recognize that embodiments of this disclosure can be implemented as a system, apparatus, device, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0048] Figure 1 A flowchart illustrating an information reading method according to an embodiment of this disclosure is shown schematically. The information reading method described above can be executed by a processing core, or it can be implemented by the processor calling computer-readable instructions stored in memory. For example... Figure 1 As shown, the method may include the following processes:

[0049] In step 101, the output information of multiple neurons is obtained.

[0050] As an example, the aforementioned neurons can be neurons in a spiking neural network. Due to their more realistic brain-inspired design, spiking neural networks are currently widely used in various fields such as pattern recognition, image processing, and computer vision.

[0051] In spiking neural networks, the connection between two neurons is called a synapse. Each synapse corresponds to a preneuron and a postneuron. The terms preneuron and postneuron are relative concepts used to describe the connection and firing relationships between the neurons corresponding to a synapse. For example, Figure 2 This is a schematic diagram illustrating the connection relationships of some neurons in an embodiment of this disclosure. For example... Figure 2 As shown, multiple neurons A and multiple neurons C are fully connected, with neurons A connected to neurons C via a synaptic array. For any synapse in the synaptic array, the neuron A corresponding to that synapse is a presynaptic neuron, and the neuron C corresponding to that synapse is a postsynaptic neuron. The postsynaptic neuron regulates the membrane potential by accumulating the pulses from the presynaptic neuron. When the membrane potential reaches a certain threshold potential, the neuron generates an output pulse signal and transmits it to the corresponding postsynaptic neuron. Neurons that output pulse signals are considered firing neurons, while neurons that do not output pulse signals are considered non-firing neurons. The output information of a neuron can be used to indicate whether the neuron is firing or non-firing. The aforementioned synaptic information typically includes synaptic weight information, delay information, and the corresponding postsynaptic neuron identifier.

[0052] In some alternative implementations, the synaptic information of the aforementioned multiple neurons can be stored in off-chip memory, which can be located outside the neuromorphic chip and can be double data rate synchronous dynamic random access memory (DDR).

[0053] by Figure 3 Taking the synaptic information stored in the memory shown as an example, where, It can represent firing neurons. This can represent unfired neurons, with each square storing information from one synapse. For example... Figure 3 As shown, the first, third, seventh, and eighth rows of the memory store the synaptic information of firing neurons, while the second, fourth, fifth, and sixth rows store the synaptic information of non-firing neurons.

[0054] In some optional implementations, the presence of output information from multiple neurons can be detected; if so, the output information of these multiple neurons can be acquired. Specifically, this can be achieved by detecting whether multiple firing neurons exist within a region composed of multiple neurons. If multiple firing neurons exist, the output information of these multiple neurons can be acquired. These multiple neurons may include multiple firing neurons, or they may include multiple firing neurons and multiple unfiring neurons. This specification does not specifically limit this aspect in the embodiments.

[0055] In step 102, a data read request is generated based on the output information.

[0056] In some optional implementations, the identification information of multiple neurons corresponding to the above output information can be determined based on the above output information. Then, the first address information corresponding to the above identification information can be determined based on the above identification information. After that, a data reading request can be generated based on the above multiple first address information. The above first address information can be the address information of synaptic information, and the above synaptic information can be the synaptic information of the postsynaptic neuron corresponding to the above identification information.

[0057] Alternatively, in some optional implementations, some preset conditions can be set in advance. In this way, after obtaining the above output information, the identification information of multiple neurons that meet the preset conditions can be determined from the above output information based on the above preset conditions. Then, based on the above identification information, multiple first address information corresponding to them can be determined. After that, based on the above multiple first address information, a data reading request can be generated, thereby realizing the batch reading of the synaptic information of a preset number of neurons based on the generated data reading request.

[0058] As an example, the aforementioned preset condition can be a preset quantity condition, that is, preset quantity information can be set in advance. This preset quantity information can be the number of neurons to be read in batches, etc. In this way, after obtaining the above output information, the identification information of the preset quantity of neurons to be read can be determined based on the above output information and the preset quantity information. Then, based on the above preset quantity of identification information, the corresponding preset quantity of first address information can be determined. Afterwards, a data reading request can be generated based on the above preset quantity of first address information. Thus, based on the data reading request generated above, the synaptic information of the preset quantity of neurons can be read in batches.

[0059] As an example, the aforementioned preset condition could also be that the number of unfired neurons between any two adjacent firing neurons is less than a preset threshold. Specifically, multiple neurons whose number of unfired neurons between any two adjacent firing neurons is less than a preset threshold can be identified as neuron information to be read in a batch. It should be noted that the embodiments in this specification do not specifically limit the aforementioned preset conditions and the specific implementation method of generating the data reading request.

[0060] In step 103, based on the data read request, the synaptic information of multiple neurons is read in batches from the memory.

[0061] In some alternative implementations, after generating a data read request through step 102 above, the data read request can be sent to a memory. Then, the synaptic information of multiple neurons read in batches from the memory can be received. In this way, after receiving the synaptic information returned from the memory, that is, after the synaptic information is read into the chip, the synaptic information that needs to be retained can be selected as the final synaptic information based on the identification information of the neuron to which the synaptic information belongs.

[0062] Since reading large blocks of data from DDR is much more efficient than reading small blocks of data—for example, reading a 128KB data block is 8 times more efficient than reading a 1KB data block—by adopting the above processing method, data read requests are generated based on the output information of multiple neurons. Based on these data read requests, synaptic information of multiple neurons is read in batches from memory. Compared to reading the synaptic information of one neuron at a time from memory, this effectively improves the reading speed and efficiency of neuron synaptic information.

[0063] In some alternative implementations, the first read duration for batch reading synaptic information of multiple neurons from memory is less than the second read duration, where the second read duration is the sum of the times for each neuron to initiate a data read request and read its synaptic information. For example, if two adjacent neurons in a region fire, a single transmission can be initiated to simultaneously read the synaptic information corresponding to these two neurons, consuming a first read duration far less than the sum of the read durations for two independent reads.

[0064] In some alternative implementations, for multiple neurons in a region, a first read duration and a second read duration can be compared to batch read synaptic information from memory. The second read duration is the sum of the times for each neuron to initiate a data read request and read synaptic information. If the first read duration is much shorter than the second read duration, the synaptic information of the multiple neurons can be read in batches, thereby effectively improving the efficiency of synaptic information reading.

[0065] like Figure 4 As shown, there are many ways to process step 102 above. Here is another optional processing method. For details, please refer to the specific processing procedures of steps 1021-1023 below.

[0066] In step 1021, the identification information of neurons is determined based on the output information. This identification information may include the identification information of firing neurons and the identification information of non-firing neurons.

[0067] In some alternative implementations, the firing pulse sequence can be determined based on the output information, and then the neuron's identification information can be determined based on the firing pulse sequence.

[0068] As an example, the above-mentioned firing pulse sequence can be represented by the identification information of the neurons, or it can be represented by the identification information of the firing neurons, or it can be represented by a binary sequence (e.g., a 0 / 1 sequence), etc. The embodiments in this specification do not specifically limit this.

[0069] In the case where the firing pulse sequence is represented by the identification information (ID) of the firing neurons, Figure 3 For example, the firing pulse sequence can be represented as [0,2,6,7]. Then, the IDs of the firing neurons can be determined to be 0, 2, 6, and 7, and the IDs of the unfiring neurons can be determined to be 1, 3, 4, and 5.

[0070] Even when the firing pulse sequence is represented as a binary sequence, it is still... Figure 3 For example, the firing pulse sequence can be represented as [1,0,1,0,0,0,1,1], where 1 represents a firing neuron, 0 represents a non-firing neuron, and the sequence length is the number of neurons. By traversing this sequence from the beginning, the identifier (ID) of the current neuron can be obtained. Based on this firing pulse sequence, the IDs of the firing neurons can be determined to be 0, 2, 6, and 7, and the corresponding IDs of the non-firing neurons can be determined to be 1, 3, 4, and 5.

[0071] In step 1022, batch information is determined based on the identification information; wherein, the batch information includes the identification information of the multiple neurons to be read and the first address information of the multiple neurons to be read, wherein the first address information is the address information of the synaptic information and the synaptic information is the synaptic information of the postsynaptic neuron corresponding to the neuron.

[0072] In some alternative implementations, since the synaptic information of unfired neurons is useless, the identification information of firing neurons can be filtered out based on the above identification information, and the batch information can be determined based on the identification information of the firing neurons.

[0073] There are various ways to implement step 1022 above. Here is another optional processing method, which can be found in the following processing procedure.

[0074] Starting from any firing neuron, search forward and / or backward for firing neurons. If the multiple firing neurons and non-firing neurons found meet preset conditions, determine batch information, wherein the non-firing neurons are located among the multiple firing neurons.

[0075] In some optional implementations, the firing pulse sequence can be traversed. Specifically, starting from any firing neuron in the firing pulse sequence, a search for firing neurons can be performed forward and / or backward. For example, the search can begin with the first firing neuron corresponding to the firing pulse sequence and proceed backward; alternatively, it can begin with the last firing neuron corresponding to the firing pulse sequence and proceed forward; or it can begin with any firing neuron in the middle portion of the firing pulse sequence and proceed forward or backward. This specification does not specifically limit the specific process of finding firing neurons in the embodiments described above.

[0076] Next, for each newly found firing neuron, it is determined whether all found firing neurons and the unfired neurons between these firing neurons meet the preset conditions. If the preset conditions are met, the newly found firing neurons are included in the batch for batch reading, and together with the previously found firing neurons, the synaptic information of these neurons is read in batch using data reading requests.

[0077] In some optional implementations, the preset condition that the above-mentioned multiple firing neurons and non-firing neurons must meet may be that the ratio between the number of firing neurons and the number of non-firing neurons is greater than or equal to a ratio threshold.

[0078] Specifically, whether a newly found firing neuron should be included in a batch can be determined by analyzing the numerical relationship between the ratio of the number of firing neurons to the number of non-firing neurons after the newly found firing neurons have been included in a batch of data that has been determined for batch reading.

[0079] For example, for a newly found firing neuron A, if, after being included in a batch that has already been determined to be merged and read, firing neuron A will cause the number of firing neurons to be less than the number of non-firing neurons in the batch to be less than a certain ratio threshold, then it indicates that the inclusion of firing neuron A will result in too much invalid data in the batch, and it is not within the scope of this batch's reading. Firing neuron A can then be used as the starting neuron for the next batch. Conversely, if, after including firing neuron A in the batch, the number of firing neurons to the number of non-firing neurons is greater than or equal to the ratio threshold, then it is determined that firing neuron A can be included in the batch, and the search for new firing neurons continues. In the embodiments of this disclosure, the ratio threshold can be set, for example, to 0.25 or 0.5, etc. This specification does not specifically limit the specific value of the above ratio threshold in the embodiments.

[0080] In some alternative implementations, the above-mentioned preset condition may also be that the number of unfired neurons is not greater than a first quantity threshold.

[0081] Specifically, it can be determined whether the newly found firing neuron should be included in the batch by judging the numerical relationship between the number of unfired neurons and a first quantity threshold after the newly found firing neuron has been included in the batch that has been determined for batch reading.

[0082] For example, for a newly found firing neuron B, if the number of unfired neurons exceeds the first threshold after being included in a batch that has already been merged and read, it indicates that the inclusion of firing neuron B will result in too much invalid data in the batch, making it outside the scope of this batch's reading. Firing neuron B can then be used as the starting neuron for the next batch. Conversely, if the number of unfired neurons is still less than or equal to the first threshold after including firing neuron B in the batch, it is determined that firing neuron B can be included in the batch, and the search for new firing neurons continues. In this embodiment, the first threshold can be, for example, 3 or 5, etc. This specification does not specifically limit the value of the first threshold in this embodiment.

[0083] In some alternative implementations, the aforementioned preset condition can also be that the sum of the number of firing neurons and the number of non-firing neurons does not exceed a second quantity threshold. Specifically, whether a newly found firing neuron should be included in a batch can be determined by comparing the sum of the number of firing neurons and the number of non-firing neurons with the second quantity threshold after the newly found firing neuron has been included in a batch that has been determined for batch reading.

[0084] For example, for a newly found firing neuron C, if the sum of the number of firing neurons and the number of non-firing neurons after being included in a batch that has already been determined for batch reading is greater than a second quantity threshold, it indicates that the inclusion of firing neuron C will make the data volume of this batch too large, which does not meet the transmission bandwidth requirements, and therefore it is not within the scope of this batch for reading. Firing neuron C can then be used as the starting neuron for the next batch. Conversely, if the sum of the number of firing neurons and the number of non-firing neurons after including firing neuron C in the batch is still less than or equal to the second quantity threshold, then it is determined that firing neuron C can be included in this batch, and the search for new firing neurons continues. In the embodiments of this disclosure, the second quantity threshold can be, for example, 5 or 10, and the specific value of the second quantity threshold is not specifically limited in the embodiments of this specification.

[0085] In this embodiment of the disclosure, the aforementioned ratio threshold, first quantity threshold, and second quantity threshold can be used to determine batch information. These thresholds can be determined based on the transmission bandwidth between the processing core and the memory executing the information reading method, which helps to better utilize the transmission bandwidth and thus effectively improve the reading speed and efficiency of neuronal synaptic information.

[0086] In step 1023, a data read request is generated based on the batch information.

[0087] In some optional implementations, multiple neurons may include a first neuron and a second neuron, where the first neuron is the starting neuron in the current batch and the second neuron is the last neuron in the current batch. The batch information also includes the synaptic information length corresponding to the second neuron.

[0088] Specifically, based on the identification information of multiple neurons included in the current batch, the first address information corresponding to the first neuron and the second neuron can be obtained respectively; and based on the first address information corresponding to the first neuron, the first address information corresponding to the second neuron, and the length of the synaptic information corresponding to the second neuron, a data reading request is generated; wherein, the first address information can be the address information of multiple synaptic information, and the synaptic information can be the synaptic information of the postsynaptic neurons corresponding to the multiple neurons.

[0089] For example, assuming the first address information of the first neuron is A1, the first address information of the second neuron is A2, and the synaptic information length corresponding to the second neuron is L1, then the total data length to be read is L = A2 + L1 - A1. Thus, the first address A1 and the data length L can be sent to the signaling assembly module, which generates a data read request. The signaling assembly module can be used to assemble a DDR read request signaling, which includes the first address A1 and the data length L.

[0090] In some optional implementations, a data read request can be generated based on the first address information corresponding to each neuron in the current batch of multiple neurons.

[0091] In some optional implementations, after each batch is determined, a data read request can be generated based on the batch information. Alternatively, after multiple batches are determined based on the firing pulse sequence, multiple data read requests can be generated based on the information of these multiple batches. As an example, after each batch is determined, a data read request corresponding to that batch can be generated through the signaling assembly module, and then synaptic information can be read using the generated data read requests. This approach helps to better utilize DDR bandwidth and achieve continuous transmission. Alternatively, after multiple batches are determined based on the firing pulse sequence, multiple data read requests corresponding to the information of these multiple batches can be generated through the signaling assembly module, and then synaptic information can be read based on the generated multiple data read requests. This specification does not specifically limit the method for generating the data read requests described above in the embodiments.

[0092] In some optional implementations, after generating the data read request, the data read request may be sent to a memory; since the data read request indicates the address information of the synaptic information to be read in the current batch, by receiving the synaptic information of neurons corresponding to the address information returned from the memory, batch reading of synaptic information of multiple neurons from the memory can be implemented.

[0093] After receiving the synaptic information of multiple neurons read in batch from the memory, neuron identification information corresponding to the synaptic information may be determined; and the synaptic information is filtered based on the neuron identification information, and the filtered synaptic information is determined as the synaptic information that needs to be retained.

[0094] Hereinafter, taking a firing spike sequence represented by IDs of firing neurons as an example, the method for determining batch information in the information reading method provided by at least one embodiment of the present disclosure is described in detail.

[0095] The fired spike sequence is represented by neuron IDs, where the IDs are one-dimensional continuously increasing numbers. The sequence can be traversed starting from the beginning.

[0096] First, let the starting neuron ID be ID1, which can usually be obtained from the judgment process of the previous batch, or be equal to the first ID in the sequence when starting, and set ValidID = invalidID = 0, where ValidID can represent the number of valid IDs, that is, the number of firing neurons, and invalidID can represent the number of invalid IDs, that is, the number of non-firing neurons.

[0097] Next, the above firing spike sequence is traversed to find the next subscript whose output information is 1 in the sequence, which is recorded as ID2. The number of invalid IDs invalidID is obtained by calculating the difference between the two, that is, invalidID += ID2-ID1-1. And the number of valid IDs is accumulated and counted by a counter: validID++.

[0098] In a case where validID / invalidID < p and / or invalidID > M, or in a case where validID+invalidID > n, it is determined that ID2 does not belong to the reading range of the current batch, and is used as the starting neuron ID of the next batch (that is, ID1 of the next batch); otherwise, ID2 is classified into the current batch, and the next ID is continuously read. Wherein, the above p, m, n may be empirical values. As an example, p may be the above proportional threshold, m may be the above first quantity threshold, and n may be the above second quantity threshold.

[0099] After traversing the above-mentioned firing spike train, the batch information for batch reading of a plurality of neurons corresponding to the firing spike train can be determined.

[0100] Hereinafter, taking a firing spike train represented in a dense storage form as an example, the method for determining batch information in the information reading method provided by at least one embodiment of the present disclosure is described in detail.

[0101] In the dense storage form, that is, regardless of whether firing occurs or not, the output information of neurons is represented by a 0 / 1 sequence, wherein 0 can represent no firing and 1 can represent firing, the sequence length can represent the number of neurons, and the firing spike train is traversed from the beginning to obtain the ID of the current neuron.

[0102] First, let the starting neuron ID be ID1, which can usually be obtained from the judgment process of the previous batch, or be equal to the subscript of the first output information with a value of 1 in the sequence at the very beginning, denoted as ID1, and set ValidID=invalidID=0, wherein ValidID can represent the number of valid IDs, that is, the number of firing neurons, and invalidID can represent the number of invalid IDs, that is, the number of non-firing neurons.

[0103] Next, the above-mentioned firing spike train is traversed, the subscript of the next output information with a value of 1 in the sequence is denoted as ID2, and the number of invalid IDs `invalidID` is obtained by calculating the difference between the two, that is, invalidID += ID2-ID1-1. And the number of valid IDs is accumulated and counted by a counter: validID++.

[0104] In a case where validID / invalidID < p, and / or invalidID > m, or in a case where validID+invalidID > n, it is determined that the ID2 does not belong to the reading range of the current batch, and is used as the starting neuron ID of the next batch (that is, ID1 of the next batch); otherwise, the ID2 is classified into the current batch, and the next ID is continued to be read. Wherein, the above p, m and n can be empirical values. As an example, p can be the above proportional threshold, m can be the above first quantity threshold, and n can be the above second quantity threshold.

[0105] After traversing the above-mentioned firing spike train, the batch information for batch reading of a plurality of neurons corresponding to the firing spike train can be determined.

[0106] Hereinafter, taking the synaptic information stored in the memory shown in Figure 3 as an example, the method for determining batch information in the information reading method provided by at least one embodiment of the present disclosure is described in detail. In Figure 3In this example, the firing information of neurons can be represented as [1,0,1,0,0,0,1,1] (dense storage form, i.e. binary sequence representation) or [0,2,6,7] (ID sequence representation of firing neurons); assuming that in this example, the proportion threshold p = 0.25, the first quantity threshold m = 3, and the second quantity threshold n = 10.

[0107] The first firing neuron in the sequence is taken as the starting neuron, ID1=0, the next firing neuron ID2=2, the number of invalid IDs invalidID=1, and the number of valid IDs validID=2. It can be seen that m, p, and n all meet the requirements. Therefore, the firing neuron with ID2=2 can be read in the same batch (batch 1) as the firing neuron with ID=0.

[0108] The process continues iterating. Since the third firing neuron has ID2 = 6, invalidID = 4, which exceeds m and cannot be included in the first batch. Therefore, the first batch only contains the first two pulses. At the same time, ID1 = 6 is assigned to the second batch. Next, when iterating to ID2 = 7, invalidID = 0. Therefore, it needs to be included in batch 2, that is, the firing neurons with ID2 = 7 and ID1 = 6 are read in the same batch (batch 2).

[0109] Since all firing neurons in the sequence have been traversed, the batch decision-making process is complete.

[0110] This disclosure also provides an information reading device. Figure 5 A schematic diagram of the structure of an information reading device according to an embodiment of this disclosure is shown. For example, this device can be applied to an electronic device. In the following description, the functions of each module of the device will be briefly described; detailed processing can be found in conjunction with the description of the information reading method of any embodiment of this disclosure described above. Figure 5 As shown, the device may include:

[0111] The acquisition module 501 is used to acquire the output information of multiple neurons;

[0112] The generation module 502 is used to generate a data read request based on the output information;

[0113] The reading module 503 is used to read the synaptic information of the multiple neurons in batches from the memory based on the data reading request.

[0114] In some embodiments, the first reading duration for batch reading synaptic information of the plurality of neurons from the memory is less than the second reading duration, wherein the second reading duration is the sum of the durations for each of the plurality of neurons to initiate a data reading request to read synaptic information.

[0115] In some embodiments, the generation module includes:

[0116] The first determining unit is used to determine the identification information of the neuron based on the output information;

[0117] The second determining unit is used to determine batch information based on the identification information; wherein the batch information includes identification information of multiple neurons to be read and first address information of multiple neurons to be read, the first address information being the address information of synaptic information, and the synaptic information being the synaptic information of the postsynaptic neuron corresponding to the neuron.

[0118] The generation unit is used to generate a data read request based on the batch information.

[0119] In some embodiments, the second determining unit described above is configured to:

[0120] Starting from any firing neuron, searching forward and / or backward for firing neurons, and determining batch information if the found plurality of firing neurons and non-firing neurons meet preset conditions, wherein the non-firing neurons are located among the plurality of firing neurons. In some embodiments, the preset conditions include at least one of the following:

[0121] The ratio between the number of fired neurons and the number of unfired neurons is greater than or equal to a ratio threshold.

[0122] The number of unfired neurons is no greater than a first quantity threshold;

[0123] The sum of the number of firing neurons and the number of unfiring neurons is not greater than a second quantity threshold.

[0124] In some embodiments, the plurality of neurons includes a first neuron and a second neuron, wherein the first neuron is the starting neuron included in the current batch, the second neuron is the last neuron included in the current batch, and the batch information also includes the synaptic information length corresponding to the second neuron;

[0125] When the generation module generates a data read request based on the batch information, it is specifically used for:

[0126] Based on the identification information of multiple neurons included in the current batch, the first address information corresponding to the first neuron and the second neuron is obtained respectively;

[0127] A data read request is generated 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.

[0128] In some embodiments, the method is applied to processing a core; the apparatus further includes a first determining module, configured to:

[0129] Based on the transmission bandwidth between the processing core and the memory, at least one of the ratio threshold, the first quantity threshold, and the second quantity threshold is determined, and the ratio threshold, the first data threshold, and the second data threshold are respectively used to determine batch information.

[0130] In some embodiments, the reading module is specifically used for:

[0131] Send the data read request to the memory;

[0132] Receive synaptic information of the plurality of neurons read in batches from the memory.

[0133] In some embodiments, the apparatus further includes:

[0134] The second determining module is used to determine the neuron identification information corresponding to the synaptic information;

[0135] The third determining module is used to filter the synaptic information based on the neuron identification information, and determine the filtered synaptic information as the synaptic information to be retained. In some embodiments, the obtaining module is specifically used for:

[0136] Detect whether there is output information from multiple neurons;

[0137] If so, then obtain the output information of the multiple neurons.

[0138] Figure 6 An electronic device provided in at least one embodiment of the present disclosure includes a memory and a processor. The memory is used to store computer instructions that can be executed on the processor, and the processor is used to implement the information reading method described in any embodiment of the present disclosure when executing the computer instructions.

[0139] At least one embodiment of this disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the information reading method described in any embodiment of this disclosure.

[0140] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, circuit, or computer program product. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product 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.

[0141] This specification also provides a computer-readable storage medium on which a computer program can be stored. When executed by a processor, the program implements the steps of the intelligent driving method described in any embodiment of this specification. The term "and / or" indicates at least one of two options; for example, "A and / or B" includes three options: A, B, and "A and B".

[0142] The same or similar parts between the various embodiments in this specification can be referred to mutually, and each embodiment focuses on describing the differences from other embodiments. In particular, for the method embodiments, since the various steps are basically similar to the functions implemented by the various modules of the intelligent driving device, the description is relatively simple, and relevant parts can be referred to the description of the device embodiments.

[0143] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0144] The embodiments of the subject matter and functional operation described in this specification can be implemented in the following ways: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or combinations thereof. 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 a data processing apparatus or for controlling the operation of a data processing apparatus. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the 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 combinations thereof.

[0145] The processing and logic flow described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by operating on input data and generating output. The processing and logic flow can also be executed by dedicated logic circuitry—such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits), and the device can also be implemented as dedicated logic circuitry.

[0146] Suitable computers 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 receives instructions and data from read-only memory and / or random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer will be operatively coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer can 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.

[0147] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.

[0148] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.

[0149] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various circuit modules and components in the above embodiments should not be construed 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.

[0150] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.

[0151] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.

Claims

1. An information reading method, characterized in that, The method includes: Obtain the output information of multiple neurons; Based on the output information, a data read request is generated; Based on the data read request, the synaptic information of the multiple neurons is read in batches from the memory, wherein the first read duration of reading the synaptic information of the multiple neurons in batches from the memory is less than the second read duration, and the second read duration is the sum of the durations for each of the multiple neurons to initiate a data read request to read the synaptic information; The step of generating a data read request based on the output information includes: Based on the output information, the identification information of the neuron is determined; Based on the identification information, batch information is determined; wherein, the batch information includes the identification information of multiple neurons to be read, and the first address information of the multiple neurons to be read, wherein the first address information is the address information of synaptic information, and the synaptic information is the synaptic information of the postsynaptic neuron corresponding to the neuron; Based on the batch information, a data read request is generated; The step of determining batch information based on the identification information includes: Starting from any firing neuron, search forward and / or backward for firing neurons. If the found firing neurons and non-firing neurons meet preset conditions, determine batch information, wherein the non-firing neurons are located among the multiple firing neurons. The preset conditions include at least one of the following: the ratio between the number of firing neurons and the number of non-firing neurons is greater than or equal to a ratio threshold; the number of non-firing neurons is not greater than a first quantity threshold; and the sum of the number of firing neurons and the number of non-firing neurons is not greater than a second quantity threshold.

2. The method according to claim 1, characterized in that, The plurality of neurons includes a first neuron and a second neuron, wherein the first neuron is the starting neuron included in the current batch, the second neuron is the last neuron included in the current batch, and the batch information also includes the synaptic information length corresponding to the second neuron; The step of generating a data read request based on the batch information includes: Based on the identification information of multiple neurons included in the current batch, the first address information corresponding to the first neuron and the second neuron is obtained respectively; A data read request is generated 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.

3. The method according to claim 2, characterized in that, The step of reading synaptic information of the multiple neurons in batches from the memory based on the data read request includes: Send the data read request to the memory; Receive synaptic information of the plurality of neurons read in batches from the memory.

4. The method according to claim 1, characterized in that, The acquisition of output information from multiple neurons includes: Detect whether there is output information from multiple neurons; If so, then obtain the output information of the multiple neurons.

5. An information reading device, characterized in that, The device includes: The acquisition module is used to acquire the output information of multiple neurons; The generation module is used to generate a data read request based on the output information; The reading module is used to read the synaptic information of the plurality of neurons in batches from the memory based on the data reading request, wherein the first reading time for reading the synaptic information of the plurality of neurons in batches from the memory is less than the second reading time, and the second reading time is the sum of the time for each of the plurality of neurons to initiate a data reading request to read the synaptic information; The generation module is used to: determine the identification information of neurons based on the output information; determine batch information based on the identification information; wherein the batch information includes the identification information of multiple neurons to be read, the first address information of the multiple neurons to be read, the first address information being the address information of synaptic information, and the synaptic information being the synaptic information of the postsynaptic neuron corresponding to the neuron; and generate a data reading request based on the batch information. When determining batch information based on the identification information, the generation module is used to: Starting from any firing neuron, search forward and / or backward for firing neurons. If the found firing neurons and non-firing neurons meet preset conditions, determine batch information, wherein the non-firing neurons are located among the multiple firing neurons. The preset conditions include at least one of the following: the ratio between the number of firing neurons and the number of non-firing neurons is greater than or equal to a ratio threshold; the number of non-firing neurons is not greater than a first quantity threshold; and the sum of the number of firing neurons and the number of non-firing neurons is not greater than a second quantity threshold.

6. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory is used to store computer instructions that can be executed on the processor, and the processor is used to implement the information reading method according to any one of claims 1 to 4 when executing the computer instructions.

Citation Information

Patent Citations

  • Picture reading method and device and computer readable storage medium

    CN109922117A

  • Weight data storage method and device, chip, electronic equipment and readable medium

    CN114781630A