Coincidence event judgment method and device
Technical Field
The invention relates to the technical field of medical treatment, in particular to a coincidence event judgment method and device.
Background
Positron Emission Tomography (PET) system is an advanced molecular imaging diagnostic device in the medical field today, and is also called nuclear medicine device because it uses radionuclides as tracers. The PET system is widely applied to early tumor focus detection, radiotherapy and chemotherapy recovery effect evaluation, and system disease detection such as cardiac and cerebral nerves, and has irreplaceable advantages in some diagnostic fields.
An FDG (deoxyglucose) marker containing a positive electronic nuclide is selected as a tracer and is injected into a tested human body, and the tracer diffuses into various tissues along with blood after entering the human body and participates in the metabolic activity of the human body. In the process, a positron nuclide in the tracer releases a positron e +, and the released positron e + moves a certain distance in a human body and then is annihilated with a negative electron e-in the surrounding environment to generate a pair of gamma photons with equal energy and opposite propagation directions, which is called a positron annihilation event, and referring to fig. 1, fig. 1 is a schematic diagram of the positron annihilation event. The detection device of the PET system can be used for detecting gamma photon pairs, further analyzing the existence of positron e +, and obtaining the concentration distribution of the tracer in the detected human body. By analyzing the abnormal condition in the tracer concentration distribution, a doctor can judge the focus of diseases such as cancer.
Existing techniques for detecting gamma photon pairs take advantage of two characteristics of gamma photon pairs produced by positron annihilation events: firstly, the two gamma photons fly along the linear directions which are opposite in direction and form 180 degrees with each other; secondly, they all propagate forward at the speed of light, and the time difference of the gamma photon pair generated by the annihilation event occurring at any point on the straight line to reach the detection device is known in principle, but in fact, due to the physical inaccuracy principle and the measurement error of the instrument, the time difference of the two gamma photons from the same annihilation event to reach the detection device is difficult to be detected strictly and accurately, and there is generally a time interval range, which is called the coincidence time window, and the coincidence time window is generally between several nanoseconds and several tens nanoseconds. The process in which the detection means detects the arrival of a gamma photon at the detection means is referred to as an event, and the event in which only gamma photons detected within the coincidence time window arrive at the detection means is referred to as a coincidence event, i.e. such gamma photons originate from the same positron annihilation event.
A current international popular coincidence event judgment method is as follows: and finally, comparing the occurrence time difference of adjacent occurrence time information, and judging whether the occurrence time difference is within a preset coincidence time window, namely judging the so-called time coincidence. If the occurrence time difference of a plurality of events is within a preset coincidence time window, the spatial coincidence judgment is continuously carried out on the events, and if the events pass the time and spatial coincidence judgment at the same time, the events are proved to be capable of forming the coincidence events.
The sorting method in the coincidence event determination process is generally sorted according to the occurrence time of the recorded events, and in the prior art, when sorting the recorded events, the magnitude of the occurrence time of the events is generally compared through several rounds. For example, when N events are sorted in an ascending order, the occurrence time of adjacent events is compared in sequence, after the comparison is finished, the event with smaller occurrence time is placed in front, and the event with larger occurrence time is placed in the back, until all the events complete the first round of comparison. And secondly, continuously comparing the occurrence time of the events according to the first round rule until the events which are arranged according to the ascending order of the occurrence time are obtained after N rounds of comparison. That is, the process of sorting N events in an ascending order by the prior art sorting method has to be compared by (N-1) × M times of occurrence time.
Due to the fact that the sorting method adopted in the coincidence event judgment process in the prior art needs to compare the occurrence time of a plurality of times, the efficiency of sorting the recorded events according to the occurrence time is low, the time spent in sorting is long, and the efficiency of judging the coincidence events is low.
Disclosure of Invention
In order to improve the efficiency of coincidence event judgment, the invention provides a coincidence event judgment method and a coincidence event judgment device.
The invention provides a coincidence event judgment method, which is characterized in that M storage areas are pre-established, wherein M is a natural number, and the method comprises the following steps:
acquiring event information of more than M events to be processed, wherein the event information comprises occurrence time, occurrence positions and energy;
sequencing the M events to be processed according to the occurrence time to obtain M sequenced events to be processed;
respectively and sequentially placing the sequenced M events to be processed into the M storage areas;
determining any event to be processed except the M events to be processed as a target event, and executing a sequencing process: respectively acquiring the standard occurrence time of the M storage areas; when the size interval formed by the standard occurrence time of two adjacent memory areas comprises the occurrence time of the target event, determining any one of the adjacent memory areas as a target memory area, wherein the size interval is the time which is greater than the smaller standard occurrence time and less than the larger standard occurrence time; placing the target event into the target bucket; ordering the target events within the target bucket; determining any event to be processed, which does not execute the sequencing process, except the M events to be processed as a target event, continuing to execute the sequencing process until the events to be processed all complete the execution of the sequencing process, and acquiring the sequenced events to be processed;
according to the occurrence time, after time coincidence judgment is carried out on the sequenced events to be processed, time coincidence events are obtained;
and according to the occurrence position, after the time coincidence event is subjected to space coincidence judgment, acquiring the coincidence event.
Preferably, before the target event is placed into the target storage area, the method further includes:
when the occurrence time of the target event is greater than the maximum standard occurrence time of the M storage areas, determining the storage area corresponding to the maximum standard occurrence time as a target storage area;
or,
when the occurrence time of the target event is less than the minimum standard occurrence time of the M storage areas, determining the storage area corresponding to the minimum standard occurrence time as a target storage area;
or,
when the occurrence time of the target event is equal to the standard occurrence time of any bucket, the bucket is determined to be the target bucket.
Preferably, the obtaining a time coincidence event after performing time coincidence determination on the sorted to-be-processed events according to the occurrence time includes:
subtracting the occurrence time of two adjacent events to be processed in the sequenced events to be processed to obtain a difference value;
judging whether the absolute value of the difference value is smaller than a preset coincidence time interval or not, if so, marking the difference value as a coincidence mark, and if not, marking the difference value as a non-coincidence mark;
and acquiring a time coincidence event according to the coincidence identification and the non-coincidence identification.
Preferably, the acquiring a time coincidence event according to the coincidence identifier and the non-coincidence identifier includes:
determining two to-be-processed events corresponding to the coincidence identification as time coincidence events;
and/or the presence of a gas in the gas,
and determining three to-be-processed events corresponding to the two adjacent coincidence identifications as time coincidence events.
Preferably, the storage area is a register.
Preferably, the obtaining a coincidence event after performing the spatial coincidence determination on the time coincidence event according to the occurrence position includes:
when the time coincidence events comprise two events to be processed, acquiring the occurrence positions of the events to be processed in the time coincidence events;
judging whether the occurrence positions belong to a preset visual field range, if so, judging whether the occurrence positions all accord with preset position layer conditions, and if so, determining that the time coincidence event is a coincidence event; or judging whether the occurrence positions all accord with preset position layer conditions, if so, judging whether the occurrence positions all belong to a preset visual field range, and if so, determining that the time coincidence event is a coincidence event.
Preferably, the obtaining a coincidence event after performing the spatial coincidence determination on the time coincidence event according to the occurrence position includes:
when the time coincidence events comprise three events to be processed, acquiring the occurrence positions of the events to be processed in the time coincidence events, deleting the events to be processed except for two events with the largest energy sum in the time coincidence events under the condition that the occurrence positions all belong to a preset visual field range, and determining the time coincidence events as coincidence events.
The present invention provides a coincidence event determination device, including:
the device comprises an establishing module, a storage module and a control module, wherein the establishing module is used for establishing M storage areas in advance, and M is a natural number;
the system comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring event information of more than M events to be processed, and the event information comprises occurrence time, occurrence positions and energy;
the first sequencing module is used for sequencing the M events to be processed according to the occurrence time to obtain M sequenced events to be processed;
the first putting module is used for respectively putting the sequenced M events to be processed into the M storage areas in sequence;
the first determining module is used for determining any event to be processed except the M events to be processed as a target event;
the second acquisition module is used for respectively acquiring the standard occurrence time of the M storage areas;
a second determining module, configured to determine, when a size interval formed by standard occurrence times of two adjacent buckets includes an occurrence time of the target event, that any one of the adjacent buckets is a target bucket, where the size interval is a time greater than a smaller standard occurrence time and smaller than a larger standard occurrence time;
the second putting module is used for putting the target event into the target storage area;
the second sequencing module is used for sequencing the target events in the target storage area;
a third determining module, configured to determine, as a target event, any one of the events to be processed, other than the M events to be processed, that is not subjected to the sorting process, and trigger the second obtaining module, until the events to be processed all complete triggering the second obtaining module, and then obtain the sorted events to be processed;
the time judgment module is used for judging time coincidence of the sequenced events to be processed according to the occurrence time and acquiring time coincidence events;
and the space judgment module is used for obtaining the coincidence events after performing space coincidence judgment on the time coincidence events according to the occurrence positions.
Preferably, the apparatus further comprises:
a fourth determining module, configured to determine, when the occurrence time of the target event is greater than a maximum standard occurrence time of the M banks, a bank corresponding to the maximum standard occurrence time as a target bank;
or,
a fifth determining module, configured to determine, when the occurrence time of the target event is less than a minimum standard occurrence time of the M banks, a bank corresponding to the minimum standard occurrence time as a target bank;
or,
and the sixth determining module is used for determining the storage area as the target storage area when the occurrence time of the target event is equal to the standard occurrence time of any storage area.
Preferably, the time determination module includes:
the first obtaining submodule is used for subtracting the occurrence time of two adjacent events to be processed in the sequenced events to be processed to obtain a difference value;
the first judgment submodule is used for judging whether the absolute value of the difference value is smaller than a preset coincidence time interval or not;
the first marking submodule is used for marking the difference value as a coincidence identifier when the result of the judging module is yes;
the second marking submodule is used for marking the difference value as a non-conforming identifier when the result of the judging module is negative;
and the second obtaining submodule is used for obtaining the time coincidence event according to the coincidence identification and the non-coincidence identification.
Preferably, the second obtaining sub-module includes:
the first determining submodule is used for determining the two to-be-processed events corresponding to the coincidence identification as time coincidence events;
and/or the presence of a gas in the gas,
and the second determining submodule is used for determining three to-be-processed events corresponding to two adjacent coincidence identifications as time coincidence events.
Preferably, the space determination module includes:
the third obtaining sub-module is used for obtaining the occurrence position of the event to be processed in the time coincidence event when the time coincidence event comprises two events to be processed;
the second judgment submodule is used for judging whether the occurrence positions all belong to a preset visual field range;
a third judgment submodule, configured to judge whether the occurrence positions all meet a preset position layer condition when a result of the second judgment submodule is yes;
a third determining submodule, configured to determine that the time coincidence event is a coincidence event if the result of the third determining submodule is yes;
or,
the fourth judgment submodule is used for judging whether the occurrence positions all meet the preset position layer condition;
a fifth judging submodule, configured to judge whether the occurrence positions all belong to a preset visual field range when a result of the fourth judging submodule is yes;
and the fourth determining submodule is used for determining the time coincidence event as the coincidence event when the result of the fifth judging submodule is positive.
Preferably, the space determination module includes:
the fourth obtaining submodule is used for obtaining the occurrence position of the event to be processed in the time coincidence event when the time coincidence event comprises three events to be processed;
and the fifth determining submodule is used for determining the time coincidence event as the coincidence event after deleting the events to be processed except the two events with the maximum energy sum in the time coincidence event under the condition that the occurrence positions all belong to the preset visual field range.
The method establishes M storage areas in advance, wherein M is a natural number, the M storage areas are used for sequencing the events to be processed, and after the occurrence time of any event to be processed is read, the occurrence time is only compared with the standard occurrence time of the M storage areas.
Furthermore, the occurrence time of all the adjacent events to be processed in the ordered events to be processed is subtracted, so that the time coincidence events in the ordered events to be processed are obtained. The invention takes all the events to be processed as the processing objects, so that the time coincidence events acquired by the invention are more complete, and meanwhile, the time coincidence events are expressed by a marking method, so that the time coincidence events are more visual, and the efficiency of acquiring the time coincidence events is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1 is a schematic illustration of a positron annihilation event;
FIG. 2 is a flowchart of a coincidence event determination method according to an embodiment of the present invention;
FIG. 3 is a flowchart of a time coincidence determination method according to an embodiment of the present invention;
fig. 4 is a structural diagram of a coincidence event determining device according to a second embodiment of the present invention;
fig. 5 is a structural diagram of the time determination module according to a second embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
The sorting method used in the event judgment process in the prior art needs to compare the sizes of the events to be processed for a plurality of times, and the sorting efficiency is low, so the inventor of the invention thinks that the sorting efficiency is improved by reducing the comparison times.
In the embodiment, the storage areas are pre-established, the events to be processed are sorted in the storage areas at first, and the events to be processed are sorted in the storage areas again.
Referring to fig. 2, fig. 2 is a flowchart of a coincidence event determining method provided in this embodiment, which specifically includes:
step 201: m storage areas are established in advance, and M is a natural number.
Since the amount of event information collected by the front-end probe is large, if a software-based ranking method is selected, it is necessary to transmit event information collected by hardware to software as a ranking object, but since the amount of data of event information is too large, and accordingly, a large amount of data is transmitted to the transmission pressure of software, the present embodiment selects a hardware-based ranking method in order to avoid the pressure of transmitting event information.
In this embodiment, before ordering the events to be processed, M storage areas are first established, a specific storage area may be implemented by a register, and the storage area may be an array established on a hardware storage device.
In addition, there are many methods for establishing the storage area, and this embodiment does not limit this.
Step 202: acquiring event information of more than M events to be processed, wherein the event information comprises occurrence time, occurrence position and energy.
In this embodiment, event information of an event to be processed acquired by the front-end detection device is acquired, and occurrence time, occurrence position, and energy of the event to be processed detected by the front-end detection device are recorded, where the event information includes the occurrence time, the occurrence position, and the energy, specifically, the occurrence time is a time point when the event to be processed occurs, the occurrence position is a position of the front-end detection device where the event to be processed occurs, and the energy is the energy generated when the event to be processed occurs.
In actual operation, the number of the acquired events to be processed is greater than M, that is, the number of the acquired events to be processed is greater than the number of the pre-established storage areas. When the number of the acquired events to be processed is less than M, the sequencing method provided by the implementation can achieve the purpose of sequencing, but cannot solve the disadvantages of the sequencing method in the prior art.
Step 203: and sequencing the M events to be processed according to the occurrence time to obtain the sequenced M events to be processed.
In this embodiment, first, M to-be-processed events are obtained, and then, the M to-be-processed events are sorted, so that sorted to-be-processed events are finally obtained.
In practical operation, the method for sequencing the M events to be processed in this embodiment is not limited.
It is noted that step 201 may be performed after step 202 and step 203, may be performed before step 202 and step 203, and may be performed simultaneously with step 202 and step 203.
Step 204: and sequentially placing the sequenced M events to be processed into the M storage areas respectively.
In this embodiment, the ordered events to be processed are first obtained, and then M events to be processed in the ordered events to be processed are sequentially placed into M pre-established storage areas. The sorted events to be processed are M events to be processed which are arranged in an ascending order or a descending order, specifically, one event to be processed exists in each of the M storage areas, and meanwhile, an ascending order or a descending order relationship also exists in the M storage areas according to the occurrence time of the events to be processed in the storage areas.
Step 205: determining any event to be processed except the M events to be processed as a target event.
In this embodiment, before sequencing the events to be processed, any one of the events to be processed except for the M events to be processed is determined as a target event, and the target event may be used as a processing object in subsequent steps.
Step 206: and respectively acquiring the standard occurrence time of the M storage areas.
In this embodiment, the standard occurrence times of the M storage areas are respectively obtained, where the standard occurrence time may be a maximum value or a minimum value of the occurrence times of the to-be-processed events in the storage area.
Step 207: and when the size interval formed by the standard occurrence time of the two adjacent memory areas comprises the occurrence time of the target event, determining that any one of the adjacent memory areas is the target memory area, wherein the size interval is the time which is greater than the smaller standard occurrence time and less than the larger standard occurrence time.
In this embodiment, since the occurrence time of the event to be processed in the storage areas is used as a standard, and the M storage areas have ascending or descending relationship, a size interval formed by the standard occurrence times of two sorted adjacent storage areas is first obtained, and then, the size interval in which the occurrence time of the target event is located is determined, and after the size interval in which the occurrence time of the target event is located is determined, any one of the two storage areas corresponding to the occurrence time of the size interval is determined as the target storage area. Wherein the size interval is a time greater than a smaller standard occurrence time and less than a larger standard occurrence time.
Step 208: and placing the target event into the target storage area.
In this embodiment, a target storage area is obtained, and the target event is placed in the target storage area.
In practical operation, before the target event is placed in the target storage area, the following three methods for determining the target storage area may also be included in this embodiment, specifically as follows:
the first method comprises the following steps: and when the occurrence time of the target event is greater than the maximum standard occurrence time of the M memory areas, determining the memory area corresponding to the maximum standard occurrence time as a target memory area.
The maximum standard occurrence time of the M storage areas is first acquired, and when the occurrence time of the target event is greater than the maximum standard occurrence time, the storage area corresponding to the maximum standard occurrence time may be determined as the target storage area.
And the second method comprises the following steps: and when the occurrence time of the target event is less than the minimum standard occurrence time of the M memory areas, determining the memory area corresponding to the minimum standard occurrence time as a target memory area.
The minimum standard occurrence time of the M storage areas is first acquired, and when the occurrence time of the target event is less than the minimum standard occurrence time, the storage area corresponding to the minimum standard occurrence time may be determined as the target storage area.
And the third is that: when the occurrence time of the target event is equal to the standard occurrence time of any bucket, the bucket is determined to be the target bucket.
Step 209: within the target bucket, the target events are ordered.
In this embodiment, after the target event is placed in the target storage area, the target event and other to-be-processed events in the target storage area are sorted, and specifically, after the target event enters the target storage area, the target event is inserted between the other to-be-processed events in the target storage area according to the occurrence time of the target event. And when the occurrence time of the target event is between the occurrence times of two adjacent events to be processed, the target event is inserted between the two adjacent events to be processed, and the sequencing of the target event after the target event is placed in the target storage area is finished. For example, when the sequence of the occurrence time of other to-be-processed events in the target storage area is 2, 4, and 9, and the occurrence time of the target event is 5, the target events with the occurrence time of 5 may be sorted, that is, the target events are put between the to-be-processed events corresponding to the occurrence times 4 and 9, so as to form a sorting relationship of 2, 4, 5, and 9.
Step 210: and judging whether the events to be processed all complete the execution of the sorting flow, if so, entering step 212, and if not, entering step 211.
In this embodiment, after receiving the sequence of any one target event, it is determined whether the events to be processed all complete the execution of the sequence flow, if yes, the sequence flow is ended, and step 212 is entered, and if not, the other events to be processed continue to be sequenced, and step 211 is entered.
Step 211: and determining any one of the events to be processed, except the M events to be processed, for which the sequencing flow is not executed, as a target event, and continuing to execute step 206.
In this embodiment, the other events to be processed are continuously sequenced, any event to be processed, which does not execute the sequencing process, except the M events to be processed is determined as a target event, and step 206 is continuously executed.
Step 212: and acquiring the sequenced events to be processed.
In this embodiment, after the obtained to-be-processed events are all sorted, the sorted to-be-processed events are obtained. The sorted events to be processed are the events to be processed which are sorted in an ascending order or a descending order by taking the occurrence time as a standard.
In actual operation, because the events to be processed in the M storage areas are all arranged in ascending order or descending order, the present embodiment connects the events to be processed in the M storage areas according to the occurrence time to form the ordered events to be processed.
Step 213: and according to the occurrence time, obtaining the time coincidence event after performing time coincidence judgment on the sequenced events to be processed.
In actual operation, after the sequenced events to be processed are obtained, time coincidence judgment is carried out on the sequenced events to be processed according to occurrence time, and finally the time coincidence events are obtained.
In this embodiment, since the coincidence events are events that arrive at the detection device within the coincidence time window, the determination of the coincidence event has a large relationship with the occurrence time of the event. Referring to fig. 3, fig. 3 is a flowchart of a time coincidence determination method provided in this embodiment, which specifically includes:
step 301: and subtracting the occurrence time of two adjacent events to be processed in the sequenced events to be processed to obtain a difference value.
And subtracting the occurrence time of two adjacent events to be processed in the sorted events to be processed which are arranged in an ascending order or a descending order, and acquiring a difference value after subtraction.
Step 302: and judging whether the absolute value of the difference is smaller than a preset coincidence time interval or not, if so, entering step 303, and if not, entering step 304.
In this embodiment, after obtaining the difference, first calculate the absolute value of the difference, and then determine whether the absolute value of the difference is smaller than a preset coincidence interval, if so, go to step 303, otherwise, go to step 304. The coincidence interval may be set according to the material of the receiving module of the front-end detecting device.
Step 303: and marking the difference value as a coincidence mark.
Step 304: marking the difference as a non-compliant identification.
Specifically, when the absolute value of the difference is smaller than a preset coincidence time interval, the difference is marked as a coincidence mark, otherwise, the difference is marked as a non-coincidence mark. Wherein, the coincidence flag and the non-coincidence flag can be marked with "1" and "0", respectively.
Step 305: and acquiring a time coincidence event according to the coincidence identification and the non-coincidence identification.
In this embodiment, the time coincidence event is acquired according to the marked coincidence identifier and non-coincidence identifier. Wherein, two events to be processed corresponding to the coincidence identifier can be determined as time coincidence events; three to-be-processed events corresponding to two adjacent coincidence identifications can also be determined as time coincidence events. Specifically, the time meeting time standard can be determined according to the requirement.
For example, in the process of obtaining coincidence time, when the coincidence flag and the non-coincidence flag are marked by using "1" and "0", respectively, and the marked difference value is "11001", two adjacent to-be-processed events corresponding to the first, second, and fifth difference values, respectively, may be obtained as time coincidence events, and three adjacent to-be-processed events corresponding to the first and second difference values may also be obtained as time coincidence events.
Step 214: and according to the occurrence position, after the time coincidence event is subjected to space coincidence judgment, acquiring the coincidence event.
In this embodiment, the space coincidence determination of the time coincidence event includes two aspects, that is, on one hand, whether the occurrence position of the time coincidence event belongs to a preset visual field range needs to be determined, and on the other hand, whether the occurrence positions of the time coincidence event all accord with a preset position layer condition needs to be determined. A temporal coincidence event that is coincident for both of the above aspects may be determined as a coincidence event.
In actual operation, when the time coincidence event comprises two events to be processed, acquiring the occurrence position of the event to be processed in the time coincidence event;
firstly, judging whether the occurrence positions belong to a preset visual field range, if so, judging whether the occurrence positions all accord with preset position layer conditions, and if so, determining that the time coincidence event is a coincidence event;
or firstly judging whether the occurrence positions all accord with preset position layer conditions, if so, judging whether the occurrence positions all belong to a preset visual field range, and if so, determining that the time coincidence event is a coincidence event.
Specifically, the order of judgment in the above two aspects is not limited.
In addition, when the time coincidence events comprise three events to be processed, the occurrence positions of the events to be processed in the time coincidence events are obtained, and under the condition that the occurrence positions all belong to a preset visual field range, the events to be processed except two events with the largest energy sum in the time coincidence events are deleted, and then the time coincidence events are determined to be coincidence events.
Specifically, under the condition that the occurrence positions of three events to be processed included in the time coincidence event all belong to a preset visual field range, firstly, the energy sum of every two events to be processed in the three events to be processed is calculated, secondly, two events to be processed with the largest energy sum are obtained, meanwhile, the other event to be processed is deleted, and finally, the remaining two events to be processed with the largest energy sum are determined as the coincidence event.
In the embodiment, M storage areas are established in advance, wherein M is a natural number, M storage areas are used for sequencing the events to be processed, and after the occurrence time of any event to be processed is read, the occurrence time is only compared with the standard occurrence time of the M storage areas.
Further, in the embodiment, the occurrence times of all adjacent to-be-processed events in the sorted to-be-processed events are subtracted, so as to obtain a time coincidence event in the sorted to-be-processed events. According to the method and the device, all the events to be processed are used as processing objects, so that the time coincidence events are relatively complete, and meanwhile, the time coincidence events are represented by a marking method, so that the time coincidence events are relatively visual, the efficiency of acquiring the time coincidence events is improved, and the judgment efficiency of the coincidence events is further improved.
Example two
Referring to fig. 4, fig. 4 is a structural diagram of the coincidence event determining apparatus provided in this embodiment, which may specifically include:
an establishing module 401, configured to establish M storage areas in advance, where M is a natural number;
a first obtaining module 402, configured to obtain event information of more than M events to be processed, where the event information includes occurrence time, occurrence location, and energy;
a first ordering module 403, configured to order the M to-be-processed events according to occurrence time to obtain M ordered to-be-processed events;
a first putting module 404, configured to put the ordered M events to be processed into the M storage areas in sequence;
a first determining module 405, configured to determine any event to be processed, except the M events to be processed, as a target event;
a second obtaining module 406, configured to obtain the standard occurrence times of the M storage areas respectively;
a second determining module 407, configured to determine, when a size interval formed by the standard occurrence times of two adjacent buckets includes the occurrence time of the target event, that any one of the adjacent buckets is a target bucket, where the size interval is a time greater than a smaller standard occurrence time and smaller than a larger standard occurrence time;
a second placing module 408, configured to place the target event into the target storage area;
a second sorting module 409, configured to sort the target events in the target storage area;
a third determining module 410, configured to determine any event to be processed, which does not execute the sorting process, except the M events to be processed, as a target event, trigger the second obtaining module, and obtain the sorted events to be processed after the events to be processed all complete triggering the second obtaining module;
the time judgment module 411 is configured to perform time coincidence judgment on the sorted events to be processed according to occurrence time, and then acquire a time coincidence event;
and the space judgment module 412 is configured to perform space coincidence judgment on the time coincidence event according to the occurrence position, and then acquire the coincidence event.
In practice, there are three kinds of modules for determining the target storage area, and the apparatus may further include:
a fourth determining module, configured to determine, when the occurrence time of the target event is greater than a maximum standard occurrence time of the M banks, a bank corresponding to the maximum standard occurrence time as a target bank;
or,
a fifth determining module, configured to determine, when the occurrence time of the target event is less than a minimum standard occurrence time of the M banks, a bank corresponding to the minimum standard occurrence time as a target bank;
or,
and the sixth determining module is used for determining the storage area as the target storage area when the occurrence time of the target event is equal to the standard occurrence time of any storage area.
Referring to fig. 5, fig. 5 is a structural diagram of the time determination module, and the time determination module 411 may include:
the first obtaining sub-module 501 is configured to subtract occurrence times of two adjacent to-be-processed events in the sorted to-be-processed events to obtain a difference value;
a first determining submodule 502, configured to determine whether an absolute value of the difference is smaller than a preset coincidence interval;
the first marking submodule 503 is configured to mark the difference as a matching identifier if the result of the determining module is yes;
a second marking sub-module 504, configured to mark the difference as a non-compliance identifier if the result of the determining module is negative;
and the second obtaining submodule 505 is configured to obtain a time coincidence event according to the coincidence identifier and the non-coincidence identifier.
Wherein the second obtaining sub-module may include:
the first determining submodule is used for determining the two to-be-processed events corresponding to the coincidence identification as time coincidence events;
and/or the presence of a gas in the gas,
and the second determining submodule is used for determining three to-be-processed events corresponding to two adjacent coincidence identifications as time coincidence events.
Meanwhile, the space determination module may include:
the third obtaining sub-module is used for obtaining the occurrence position of the event to be processed in the time coincidence event when the time coincidence event comprises two events to be processed;
the second judgment submodule is used for judging whether the occurrence positions all belong to a preset visual field range;
a third judgment submodule, configured to judge whether the occurrence positions all meet a preset position layer condition when a result of the second judgment submodule is yes;
a third determining submodule, configured to determine that the time coincidence event is a coincidence event if the result of the third determining submodule is yes;
or,
the fourth judgment submodule is used for judging whether the occurrence positions all meet the preset position layer condition;
a fifth judging submodule, configured to judge whether the occurrence positions all belong to a preset visual field range when a result of the fourth judging submodule is yes;
and the fourth determining submodule is used for determining the time coincidence event as the coincidence event when the result of the fifth judging submodule is positive.
In addition, the space determination module may further include:
the fourth obtaining submodule is used for obtaining the occurrence position of the event to be processed in the time coincidence event when the time coincidence event comprises three events to be processed;
and the fifth determining submodule is used for determining the time coincidence event as the coincidence event after deleting the events to be processed except the two events with the maximum energy sum in the time coincidence event under the condition that the occurrence positions all belong to the preset visual field range.
In the embodiment, M storage areas are established in advance, wherein M is a natural number, M storage areas are used for sequencing the events to be processed, and after the occurrence time of any event to be processed is read, the occurrence time is only compared with the standard occurrence time of the M storage areas.
Further, in the embodiment, the occurrence times of all adjacent to-be-processed events in the sorted to-be-processed events are subtracted, so as to obtain a time coincidence event in the sorted to-be-processed events. The time coincidence event is represented by a marking method, so that the time coincidence event is more visual, the efficiency of obtaining the time coincidence event is improved, and the judgment efficiency of the coincidence event is further improved.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The term "comprising", without further limitation, means that the element so defined is not excluded from the group consisting of additional identical elements in the process, method, article, or apparatus that comprises the element.
The coincidence event determination method and device provided by the embodiment of the invention are described in detail, a specific example is applied in the description to explain the principle and the implementation of the invention, and the description of the embodiment is only used to help understanding the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.