Search

CN-121996566-A - Multi-detector data acquisition method, coincidence processing method, reconstruction method, system, imaging device, electronic device and storage medium

CN121996566ACN 121996566 ACN121996566 ACN 121996566ACN-121996566-A

Abstract

The application discloses a multi-detector data acquisition method, a coincidence processing method, a reconstruction method, a system, imaging equipment, electronic equipment and a storage medium. The multi-detector data acquisition method comprises the steps of providing a unified memory pool for a plurality of detectors of imaging equipment, continuously receiving detection event data from the plurality of detectors, and writing the detection event data from the plurality of detectors into the unified memory pool according to the arrival time sequence. The scheme of the application realizes time-series writing and physical continuous storage of the data into the unified memory pool, eliminates the calculation overhead of multi-path merging and sorting, and obviously reduces the time complexity of data reading, thereby obviously improving the data acquisition efficiency of the multi-detector system.

Inventors

  • LIU ZIXIAO
  • WAN LIN

Assignees

  • 苏州瑞派宁科技有限公司

Dates

Publication Date
20260508
Application Date
20251231

Claims (20)

  1. 1. A method for multi-detector data acquisition, comprising: Providing a unified memory pool for a plurality of detectors of an imaging device; Continuously receiving detection event data from the plurality of detectors; and writing detection event data from the plurality of detectors into the unified memory pool according to the arrival time sequence.
  2. 2. The method of claim 1, wherein the unified memory pool comprises: a total write atomic variable for identifying a total number of packets written; a free atom variable for identifying the number of writeable packets remaining; a full state atomic flag for identifying whether the unified memory pool is full, and And the read-write lock is used for controlling concurrent access for writing or reading the unified memory pool.
  3. 3. The method of claim 2, wherein the unified memory pool further comprises: a memory pool data array for storing probe event data; a length array for storing the length of each data packet, and And the offset array is used for storing the starting position of each data packet in the data array.
  4. 4. The method of claim 1, wherein writing the probe event data from the plurality of probes to the unified memory pool in time-of-arrival order comprises: acquiring positioning metadata of a data packet from each network interface connected with the plurality of detectors through a first acquisition thread; Writing the positioning metadata into a first queue through the first acquisition thread; Reading the positioning metadata from the first queue through a second acquisition thread, acquiring detection event data in the data packet according to the positioning metadata, and And writing the detection event data into the unified memory pool through the second acquisition thread.
  5. 5. The method of claim 4, wherein the obtaining, by the first collection thread, location metadata of the data packets from each network interface connecting the plurality of probes, comprises: acquiring data packets from network interfaces of the plurality of probes; Analyzing a network protocol stack of a data packet to determine whether the data packet accords with a preset protocol type; And extracting the positioning metadata of the data packet from the data packet conforming to the preset protocol type according to the protocol format of the preset protocol type.
  6. 6. The method of claim 5, wherein parsing the network protocol stack of the data packet to determine whether the data packet conforms to a predetermined protocol type comprises: Sequentially analyzing the network protocol stack of the data packet according to the multi-layer protocol sequence of the preset protocol type; If the data packet meets the multi-layer protocol sequence, determining that the data packet accords with the preset protocol format; and if the data packet does not meet any layer of protocol in the multi-layer protocol sequence, discarding the data packet.
  7. 7. The method of claim 5, wherein the obtaining, by the first collection thread, location metadata of the data packets from each network interface connecting the plurality of probes, further comprises: And carrying out validity check on the data packet conforming to the preset protocol type to determine whether the data packet is a valid data packet, wherein the method specifically comprises the following steps of: extracting source address information from the data packet; comparing the source address information with corresponding detector address information; if the data packets are consistent, determining that the data packets are valid data packets; and if not, discarding the data packet.
  8. 8. The method of claim 4, wherein the obtaining, by the first collection thread, location metadata for the data packets from each network interface connecting the plurality of probes, further comprises: Writing the positioning metadata into a stack buffer of the first acquisition thread; wherein the writing, by the first collection thread, the positioning metadata into a first queue includes: And when the writing quantity of the stack buffer zone of the first acquisition thread reaches a preset condition, writing a plurality of positioning metadata in the stack local buffer zone into the first queue in batches.
  9. 9. The method of claim 4, wherein the first queue is a ring queue, the first queue comprising: a first queue array including a plurality of data spaces for accessing the positioning metadata, each data space having a first data read semaphore, a first data write semaphore; a first atomic variable for identifying a write location of the first queue; a second atomic variable for identifying a read location of the first queue; A first queue read semaphore for identifying an available data volume for the first queue; A first queue write semaphore for identifying an amount of free slot bits for the first queue.
  10. 10. The method of claim 9, wherein the writing of the location metadata to a first queue by the first collection thread comprises: Acquiring the first queue write signal quantity to determine whether the first queue has an idle slot position; Under the condition of having an idle slot, performing atomic increment operation on the first atomic variable and acquiring a value before increment so as to determine the writing position written in the first queue at this time; and writing the positioning metadata into a data space in the first queue array corresponding to the writing position.
  11. 11. The method of claim 10, wherein the determining the write location of the current write in the first queue comprises: And carrying out a remainder operation on the value before the increment of the first atomic variable and the size of the first queue number group to obtain the index of the writing position.
  12. 12. The method of claim 10, wherein the writing, by the first collection thread, the location metadata to the first queue prior to writing the location metadata to the data space corresponding to the write location, further comprises: and acquiring a first data write signal quantity of the data space corresponding to the writing position so as to ensure that the data space corresponding to the writing position is not accessed by other threads.
  13. 13. The method of claim 10, wherein the obtaining the first queue write semaphore to determine whether the first queue has a free slot comprises: if the value of the first queue write signal quantity is not greater than zero, the corresponding first acquisition thread enters a blocking state; And if the value of the first queue write signal quantity is larger than zero, determining that the first queue has an idle slot.
  14. 14. The method of claim 10, wherein the writing of the location metadata to a first queue by the first collection thread further comprises: And after the positioning metadata are written into the data space corresponding to the writing position, sequentially releasing the first data reading semaphore and the first queue reading semaphore so that the positioning metadata in the data space can be read by a second acquisition thread.
  15. 15. The method of claim 9, wherein the reading, by a second collection thread, the positioning metadata from the first queue comprises: Acquiring the first queue read semaphore to determine whether the first queue has available data; Under the condition that available data exists, performing atomic increment operation on the second atomic variable and acquiring a value before increment so as to determine a reading position of the current reading in the first queue; and reading the positioning metadata from the data space in the first queue array corresponding to the reading position.
  16. 16. The method of claim 15, wherein determining the read-out location of the current read in the first queue comprises: And carrying out a remainder operation on the value before the increment of the second atomic variable and the size of the first queue number group so as to obtain the index of the reading position.
  17. 17. The method of claim 15, wherein prior to reading the positioning metadata from the data space corresponding to the read-out location, further comprising: and acquiring a first data read signal quantity of the data space corresponding to the read-out position so as to ensure that the data space corresponding to the read-out position is not accessed by other threads.
  18. 18. The method of claim 15, wherein the obtaining the first queue read semaphore to determine whether the first queue has data available comprises: if the value of the first queue reading signal quantity is not greater than zero, the corresponding second acquisition thread enters a blocking state; and if the value of the first queue read signal quantity is greater than zero, determining that the first queue has available data.
  19. 19. The method of claim 15, wherein the obtaining, by a second collection thread, the positioning metadata from the first queue, further comprises: And after the positioning metadata are read from the data space corresponding to the reading position, sequentially releasing the first data writing semaphore and the first queue writing semaphore so that the data space can be written with new positioning metadata by a first acquisition thread.
  20. 20. The method of claim 4, wherein said obtaining probe event data in said data packet from said location metadata comprises: Copying the data packet to a stack buffer area of the second acquisition thread according to the first address and the length in the positioning metadata; The writing of the detection event data into the unified memory pool through the second acquisition thread comprises writing the detection event data in a stack buffer of the second acquisition thread into the unified memory pool.

Description

Multi-detector data acquisition method, coincidence processing method, reconstruction method, system, imaging device, electronic device and storage medium Technical Field The application relates to the field of image imaging, in particular to a multi-detector data acquisition method, a coincidence processing method, a reconstruction method, a system, imaging equipment, electronic equipment and a storage medium. Background In the field of medical imaging, positron emission tomography (Positron Emission Tomography, PET) plays an important role in clinical diagnosis and scientific research as an important molecular imaging technique. The full-digital PET system adopts a plurality of detectors to receive gamma ray events, and the data acquisition and calculation subsystem is used for acquiring and processing signals generated by the detectors in real time. When processing high throughput probe data, the existing data acquisition method has certain limitations in terms of network load, processing efficiency, computational resource occupation and the like when facing increasing data volume. In addition, for application scenes such as dynamic imaging, which need to screen and process data according to time periods, the existing method has great limitation in terms of data access and calculation efficiency. It is therefore desirable to provide a solution that can accommodate large-scale detector systems, improving data acquisition and processing efficiency. The description of the background art is only for the purpose of facilitating an understanding of the relevant art and is not to be taken as an admission of the prior art. Disclosure of Invention Therefore, embodiments of the present application aim to provide a method and system for acquiring multi-detector data, a coincidence processing method and system, a reconstruction method and system, an imaging device, an electronic device, and a storage medium, which can solve or alleviate at least one technical problem mentioned above, and improve efficiency of multi-detector data acquisition. In a first aspect, an embodiment of the present application provides a multi-detector data acquisition method, including: Providing a unified memory pool for a plurality of detectors of an imaging device; Continuously receiving detection event data from the plurality of detectors; and writing detection event data from the plurality of detectors into the unified memory pool according to the arrival time sequence. In some embodiments, the unified memory pool includes: a total write atomic variable for identifying a total number of packets written; a free atom variable for identifying the number of writeable packets remaining; a full state atomic flag for identifying whether the unified memory pool is full, and And the read-write lock is used for controlling concurrent access for writing or reading the unified memory pool. In some embodiments, the unified memory pool further comprises: a memory pool data array for storing probe event data; a length array for storing the length of each data packet, and And the offset array is used for storing the starting position of each data packet in the data array. In some embodiments, the writing the detection event data from the plurality of detectors into the unified memory pool in time-of-arrival order includes: acquiring positioning metadata of a data packet from each network interface connected with the plurality of detectors through a first acquisition thread; Writing the positioning metadata into a first queue through the first acquisition thread; Reading the positioning metadata from the first queue through a second acquisition thread, acquiring detection event data in the data packet according to the positioning metadata, and And writing the detection event data into the unified memory pool through the second acquisition thread. In some embodiments, the acquiring, by the first acquisition thread, positioning metadata of the data packet from each network interface connected to the plurality of probes includes: acquiring data packets from network interfaces of the plurality of probes; Analyzing a network protocol stack of a data packet to determine whether the data packet accords with a preset protocol type; And extracting the positioning metadata of the data packet from the data packet conforming to the preset protocol type according to the protocol format of the preset protocol type. In some embodiments, the parsing the network protocol stack of the data packet to determine whether the data packet conforms to a preset protocol type includes: Sequentially analyzing the network protocol stack of the data packet according to the multi-layer protocol sequence of the preset protocol type; If the data packet meets the multi-layer protocol sequence, determining that the data packet accords with the preset protocol format; and if the data packet does not meet any layer of protocol in the multi-layer protocol sequence, discarding the data packe