Abnormality detection method and device, electronic equipment and computer readable storage medium

By using the encoder to record the changes in the slot size in the collimator for CT detection, efficient and accurate abnormality detection of the collimator is achieved, and the image abnormality caused by inaccurate motion stroke after use of the collimator moving parts is solved, and the accuracy and real-time detection are improved.

CN120189141APending Publication Date: 2025-06-24SHANGHAI UNITED IMAGING HEALTHCARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311793613.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-23
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

In the existing CT detection technology, after long-term use and X-ray irradiation, the motion stroke is no longer accurate, resulting in abnormal image imaging, such as artifacts and ghosting. The existing technology requires manual data link inspection, long inspection period and the cause of the abnormality cannot be accurately determined, and the entire collimator is usually required to be replaced.

Method used

By recording changes in the slot size in the collimator using an encoder and performing abnormality detection based on these changes, efficient and accurate abnormality detection of the collimator is achieved. The specific steps include recording the Z-phase value of the encoder when the moving part moves, detecting abnormalities through changes in the slot size, and calculating the difference value to determine the abnormal type.

Benefits of technology

It improves the accuracy and real-time performance of collimator abnormality detection, reduces the cycle of manual inspection, avoids unnecessary collimator replacement, and reduces maintenance costs and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120189141A_ABST
    Figure CN120189141A_ABST
Patent Text Reader

Abstract

The invention is suitable for the field of medical equipment, and provides an anomaly detection method and device, electronic equipment and a computer readable storage medium, the anomaly detection method is applied to a collimator, the collimator comprises a moving part and an encoder, the moving part is used for adjusting the size of a slit of the collimator, and the encoder is used for adjusting the size of the slit of the collimator. The encoder is used for recording the change of the size of the slit, and the anomaly detection method comprises the following steps: recording the size of the slit of the collimator based on the encoder under the condition that the moving part moves, and performing anomaly detection on the collimator by using the change of the size of the slit to obtain an anomaly detection result. According to the invention, the accuracy of performing anomaly detection on the collimator can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of medical devices, and particularly relates to an anomaly detection method, apparatus, electronic device, and computer-readable storage medium. Background Art

[0002] In Computed Tomography (CT) detection, the slit is adjusted by a collimator, and the radiation dose between the X-ray (i.e., the focal point) and the detector is adjusted based on the slit size, thereby reducing the radiation dose received by the patient and ensuring good image quality. Referring to Figure 1 As shown, the collimator is located between the X-ray source and the patient, and the slit of the collimator is adjusted by moving components in the collimator (such as a filter assembly and a slice assembly, etc.).

[0003] In the prior art, the moving components in the collimator (such as a filter assembly and a slice assembly, etc.) may be worn after long-term use and irradiated by X-rays, which may cause their moving strokes to be inaccurate, affecting the slit of the collimator, and further resulting in abnormal image formation. For example, artifacts, ghosts, etc. appear in the image. When abnormal image formation occurs, it is necessary to manually check the entire data link of the CT examination, and the troubleshooting period is long. And when it is determined that the collimator is abnormal, the entire collimator will be directly replaced because the cause of the collimator abnormality cannot be accurately determined. Summary of the Invention

[0004] Embodiments of this application provide an anomaly detection method, apparatus, electronic device, and computer-readable storage medium, which can improve the accuracy of anomaly detection for a collimator.

[0005] In a first aspect, embodiments of this application provide an anomaly detection method. The anomaly detection method is applied to a collimator. The collimator includes a moving component and an encoder. The moving component is used to adjust the slit size of the collimator, and the encoder is used to record the change in the slit size. The anomaly detection method includes:

[0006] When the moving component is moving, record the slit size of the collimator based on the encoder;

[0007] Use the change in the slit size to perform anomaly detection on the collimator to obtain an anomaly detection result.

[0008] Optionally, before recording the slit size of the collimator based on the encoder, it further includes:

[0009] Perform a zeroing process on the collimator. The zeroing process is used to adjust the moving component and the encoder in the collimator to an initial state.

[0010] Optionally, recording the slit size of the collimator based on the encoder includes:

[0011] Recording the Z-phase value of the encoder at the current moment to obtain a first Z-phase value, where the first Z-phase value is used to reflect the slit size of the collimator at the current moment.

[0012] Optionally, using the change in the slit size to perform anomaly detection on the collimator to obtain an anomaly detection result includes:

[0013] Performing anomaly detection on the collimator based on the first Z-phase value and a second Z-phase value to obtain an anomaly detection result, where the second Z-phase value is the Z-phase value recorded before the first Z-phase value was recorded.

[0014] Optionally, performing anomaly detection on the collimator based on the first Z-phase value and the second Z-phase value to obtain an anomaly detection result includes:

[0015] Calculating the difference between the first Z-phase value and a third Z-phase value to obtain a first difference, where the third Z-phase value is the Z-phase value adjacent to the first Z-phase value among the second Z-phase values;

[0016] In the case where the first difference is greater than a preset first threshold, determining that the anomaly detection result of the collimator is an encoder anomaly.

[0017] Optionally, performing anomaly detection on the collimator based on the first Z-phase value and the second Z-phase value to obtain an anomaly detection result includes:

[0018] In the case where the first difference is not greater than the preset first threshold and

[0019] when the collimator has been calibrated, performing anomaly detection on the collimator using the first Z-phase value and an initial Z-phase value to obtain an anomaly detection result, where the initial Z-phase value is the second Z-phase value recorded for the first time after the collimator was calibrated.

[0020] Optionally, performing anomaly detection on the collimator using the first Z-phase value and the initial Z-phase value to obtain an anomaly detection result includes:

[0021] Calculating a second difference between the first Z-phase value and the initial Z-phase value;

[0022] In the case where the second difference is greater than a preset second threshold, determining that the anomaly detection result of the collimator is an anomaly of the optoelectronic switch associated with the moving component.

[0023] Second aspect, an embodiment of the present application provides an anomaly detection device, which is applied to a collimator. The collimator includes a moving component and an encoder. The moving component is used to adjust the slit size of the collimator, and the encoder is used to record the change in the slit size, including:

[0024] A slit recording module, configured to record the slit size of the collimator based on the encoder when the moving component is moving;

[0025] An anomaly detection module, configured to perform anomaly detection on the collimator by using the change in the slit size to obtain an anomaly detection result.

[0026] Third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the anomaly detection method described in the first aspect above are implemented.

[0027] Fourth aspect, an embodiment of the present application provides a computer-readable storage medium. The computer storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the anomaly detection method described in the first aspect above are implemented.

[0028] Fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device is caused to execute the anomaly detection method described in any item of the first aspect above.

[0029] The beneficial effects of the embodiments of the present application compared with the prior art are as follows:

[0030] By monitoring the change in the slit size of the collimator, the present application can perform anomaly detection on the collimator efficiently and accurately. Specifically, since the collimator controls the slit size through the movement of its moving component, it means that the state of the collimator and its internal components can be reflected by the above slit size. Therefore, when the moving component is moving, the encoder in the collimator is used to record the slit size of the collimator, and anomaly detection on the collimator can be accurately performed through the change in the slit size. At the same time, compared with the prior art that requires stopping the CT device and performing manual troubleshooting, the present application can perform real-time anomaly detection on the collimator when the collimator is working (i.e., the moving component is moving), improving the real-time performance and efficiency of anomaly detection on the collimator. Description of the Drawings

[0031] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0032] Figure 1 is a schematic diagram of the working of a collimator provided by an embodiment of the present application;

[0033] Figure 2 is a schematic flowchart of an anomaly detection method provided by an embodiment of the present application;

[0034] Figure 3 is a schematic structural diagram of the moving components inside the collimator provided by an embodiment of the present application;

[0035] Figure 4 is a schematic flowchart of performing anomaly detection on the collimator provided by an embodiment of the present application;

[0036] Figure 5 is a schematic structural diagram of an anomaly detection device provided by an embodiment of the present application;

[0037] Figure 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0038] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are proposed to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, the detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0039] It should be understood that when used in the specification of the present application and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0040] It should also be understood that the term "and / or" used in the specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the related listed items, and includes these combinations.

[0041] As used in the specification of this application and the appended claims, the term "if" can be construed contextually as "when" or "once" or "in response to determining" or "in response to detecting". Similarly, the phrases "if determined" or "if [the described condition or event] is detected" can be construed contextually to mean "once determined" or "in response to determining" or "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]".

[0042] In addition, in the description of the specification of this application and the appended claims, the terms "first", "second", "third", etc. are used only for differential description and should not be construed as indicating or implying relative importance.

[0043] Reference to "one embodiment" or "some embodiments" or the like described in the specification of this application means that a particular feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized.

[0044] In a CT examination, the size of the slit is controlled by the change of the moving part in the collimator. For the change of the moving part in the collimator, such as pulling the moving part by a motor, the distance of the change of the moving part is detected by a photoelectric switch associated with the moving part in the collimator, and the angle of the motor rotation is determined by an encoder. Among them, the encoder disk includes a Z-phase scale. Each time the encoder disk rotates more than one circle (that is, each time the motor rotates through the Z-phase), the encoder uploads a Z-phase value to reflect the angle of the motor rotation. Thus, the change of the slit size is determined by the distance detected by the photoelectric switch and the angle reflected by the encoder. Due to the long-term use and wear of the moving parts (filter assembly and slice assembly) in the collimator and X-ray irradiation, it may cause the drift of the photoelectric switch (that is, the phenomenon that the detection distance, sensitivity, etc. of the photoelectric switch change due to external environmental factors or the photoelectric switch itself, thus affecting the accuracy of the detection distance) or the encoder losing the line (that is, due to the loss of digital signals, the rotation angle of the motor cannot be normally converted into digital signals, thus affecting the normal feedback of the motor) and other problems. Since the probability of abnormal phenomena such as the drift of the photoelectric switch or the encoder losing the line of the moving parts in the collimator is relatively small, when the CT examination imaging is abnormal, it is necessary to manually check the entire data link of the CT examination, and the inspection efficiency is low. Even if it is located that the reason is the collimator, the specific abnormal problem cannot be judged, and only the whole collimator can be replaced, which consumes huge manpower and material resources and cannot accurately detect the abnormality of the collimator.

[0045] In order to improve the efficiency of abnormal detection, the present application provides an abnormal detection method for judging whether the collimator is abnormal by the slit size of the collimator.

[0046] Figure 2 The flowchart of an abnormal detection method provided by an embodiment of the present application is shown. The abnormal detection method is applied to a collimator. The collimator includes a moving part and an encoder. The moving part is used to adjust the slit size of the collimator, and the encoder is used to record the change of the slit size. The abnormal detection method is described in detail as follows:

[0047] S1. When the above-mentioned moving part is moving, based on the above-mentioned encoder, record the slit size of the above-mentioned collimator.

[0048] In an embodiment of the present application, assume that the above-mentioned collimator is a CT collimator, that is, a device in a CT device that controls the X-ray radiation dose by the slit size. Refer to Figure 3As shown, the above-mentioned moving components include a filter component and a slicing component. Among them, the above-mentioned filter component is used to filter the X-rays emitted by the ray source, and the above-mentioned filter component can be adjusted by moving to adjust the X-rays irradiated by the ray source; the above-mentioned slicing component includes a plurality of slices, and the distance between different slices is adjusted to further adjust the dose and irradiation range of the X-rays, etc. The movement of the above-mentioned moving components means the movement of the above-mentioned filter component and / or the above-mentioned tangent component.

[0049] The above-mentioned encoder is a sensor used to record the movement changes of the collimator in the CT device, and can include an optoelectronic encoder and a magnetoelectric encoder. Assuming that the above-mentioned encoder is an incremental optoelectronic encoder, the above-mentioned optoelectronic encoder is composed of a code disk, a light-emitting element and a photosensitive element. Among them, the code disk is a disk engraved with regular light-transmitting and non-light-transmitting stripes, that is, the above-mentioned code disk includes alternating gratings; the light flux received by the above-mentioned photosensitive element changes synchronously with the light-transmitting stripes, and then becomes a pulse signal through the photosensitive element. The above-mentioned pulse signal has three types: phase A, phase B and phase Z. Among them, the two groups of signals A and B are orthogonal pulse signals generated by the alternating passing of the gratings on the code disk (that is, the phase difference between the two groups of pulses A and B is 90 degrees), and the rotation direction of the motor can be conveniently judged according to the front and back output moments of phase A and phase B, and the current rotational speed of the motor can be calculated according to the number of pulses per second; the Z-phase signal is a pulse signal generated only when the code disk rotates one circle, that is, the number of rotations of the code disk can be judged through the above-mentioned Z-phase signal, so as to determine the slit size of the collimator.

[0050] S2. Use the change of the above-mentioned slit size to perform abnormal detection on the above-mentioned collimator to obtain an abnormal detection result.

[0051] In the embodiment of the present application, assuming that the above-mentioned collimator is a CT collimator, the change of the above-mentioned slit size represents the change of the moving components in the CT collimator, so it can reflect whether the moving components in the CT collimator are abnormal; at the same time, the change of the slit size is recorded by the encoder, so the encoder can be detected for abnormalities through the change of the above-mentioned slit size. The above-mentioned abnormal detection results include encoder abnormalities (such as encoder wire loss) and / or moving component abnormalities (such as photoelectric switch drift corresponding to the slicing component), etc. By using the change of the slit size to perform abnormal detection on the collimator, it can be timely judged whether the photoelectric switch drifts or the encoder loses wires in the collimator, etc., improving the timeliness and accuracy of collimator inspection.

[0052] It should be noted that the above-mentioned abnormal detection result can be alarmed by using the display device of the CT device, including one or more of voice reminder, text reminder, etc. Of course, it can also be alarmed through other devices, such as alarm through an audible and visual alarm, etc., which is not limited here.

[0053] In an alternative embodiment, refer to Figure 3As shown, the slicing component adjusts the slit between slices through the photoelectric switches at both ends. That is, the state of the photoelectric switches can be reflected by the change in the size of the above-mentioned slit. When recording the size of the slit through the encoder, if the change in the slit is too large, for example, when the difference between the size of the slit recorded by the encoder and the size of the slit recorded at the beginning is too large, it indicates that the photoelectric switch has drifted.

[0054] In this application, by monitoring the change in the size of the collimator slit, the collimator can be efficiently and accurately detected for abnormalities. Specifically, since the collimator controls the size of the slit through the movement of its moving parts, it means that the state of the collimator and its internal parts can be reflected by the size of the above-mentioned slit. Therefore, when the above-mentioned moving parts are moving, the encoder in the collimator is used to record the size of the collimator slit, and the abnormality of the collimator can be accurately detected through the change in the size of this slit. At the same time, compared with the prior art that requires stopping the CT device and conducting manual troubleshooting, this application can detect the abnormality of the collimator in real time when the collimator is working (that is, the moving parts are moving), improving the real-time performance and efficiency of detecting the abnormality of the collimator.

[0055] In another optional embodiment of this application, before recording the size of the collimator slit based on the above-mentioned encoder, it further includes:

[0056] Performing a zeroing process on the above-mentioned collimator, and the above-mentioned zeroing process is used to adjust the above-mentioned moving parts and the above-mentioned encoder in the above-mentioned collimator to the initial state.

[0057] In some embodiments, since the above-mentioned collimator includes various components (moving parts, encoders, etc.), in the actual use of the collimator, in order to adjust the size of the slit, the change states of the various components in the collimator may not be completely unified. In order to avoid inaccurate recording by the encoder due to the differences in the change states of the various components, resulting in inaccurate detection of the collimator, the various components of the collimator can be subjected to a zeroing process (zeroing movement). For example, after the collimator is powered on, the moving parts and the encoder in the collimator can be adjusted to the initial state.

[0058] In the embodiment of this application, the above-mentioned recording of the size of the collimator slit based on the above-mentioned encoder includes:

[0059] Recording the Z-phase value of the above-mentioned encoder at the current moment to obtain a first Z-phase value, and the above-mentioned first Z-phase value is used to reflect the size of the collimator slit at the current moment.

[0060] In some embodiments, since the encoder generates a Z-phase pulse signal only when it rotates one full circle, that is, every time the encoder rotates past the Z-phase signal slit (i.e., the grating) on the code disk, the encoder reports the Z-phase value. By obtaining the above-mentioned first Z-phase value at the current moment through each reported Z-phase value, it can be used to reflect the size of the collimator slit at the current moment.

[0061] In an optional embodiment of the present application, the Z-phase value (i.e., the first Z-phase value) of the encoder at the current moment can be represented as Current_Z_Value, and the calculation method of the first Z-phase value can be:

[0062] Current_Z_Value = Last_Z_Value + Per_Cicle_Real_Value

[0063] wherein, Last_Z_Value represents the Z-phase value recorded at the previous moment, and Per_Cicle_Real_Value represents the Z-phase value when the encoder actually rotates one circle.

[0064] In an embodiment of the present application, the above-mentioned method for detecting anomalies in the collimator by using the change in the above-mentioned slit size to obtain an anomaly detection result includes:

[0065] Detecting anomalies in the collimator according to the first Z-phase value and the second Z-phase value to obtain an anomaly detection result, where the second Z-phase value is the Z-phase value recorded before the first Z-phase value is recorded.

[0066] In some embodiments, since the second Z-phase value is the Z-phase value recorded by the encoder before the first Z-phase value is recorded, that is, the second Z-phase value represents the Z-phase value recorded by the encoder at a previous moment, therefore, detecting anomalies in the collimator according to the first Z-phase value and the second Z-phase value means detecting anomalies in the collimator according to the slit size of the collimator at the current moment and the slit size of the collimator at the previous moment.

[0067] In an embodiment of the present application, the above-mentioned method for detecting anomalies in the collimator according to the first Z-phase value and the second Z-phase value to obtain an anomaly detection result includes:

[0068] Calculating the difference between the first Z-phase value and the third Z-phase value to obtain a first difference, where the third Z-phase value is the Z-phase value adjacent to the first Z-phase value among the second Z-phase values;

[0069] When the first difference is greater than a preset first threshold, determining that the anomaly detection result of the collimator is an encoder anomaly.

[0070] In some embodiments, when the encoder is abnormal, for example, when the encoder loses the wire or loses the pulse signal, the encoder cannot normally convert the rotation angle of the motor into a digital signal, that is, the encoder will lose the digital signal. That is, when the encoder records the Z-phase value, the inaccuracy of the Z-phase value recording will be caused by the loss of some digital signals. Therefore, the above-mentioned first difference determined according to the Z-phase value (i.e., the first Z-phase value) recorded by the encoder at the current moment and the Z-phase value (i.e., the third Z-phase value) recorded by the encoder at the previous moment can represent the digital signal lost by the encoder. In the case where the first difference is greater than a preset first threshold, it can be determined that the above-mentioned collimator has an encoder abnormality.

[0071] In an alternative embodiment, the above-mentioned first difference can be expressed as Z_Value_Diff1. Since the rotation of the encoder includes forward rotation and reverse rotation, when the encoder rotates forward, the Z-phase value continuously increases, and when the encoder rotates in reverse, the Z-phase value continuously decreases. Therefore, when comparing the Z-phase values before and after through the above-mentioned first difference, the positive and negative need to be considered. The above-mentioned first difference can be calculated by the following method:

[0072] Z_Value_Diff1 = (Max(Current_Z_Value, Last_Z_Value) - Min(Current_Z_Value, Last_Z_Value)) % Per_Cicle_Normal_Value

[0073] Wherein, Current_Z_Value represents the Z-phase value recorded at the current moment, that is, the first Z-phase value, Last_Z_Value represents the Z-phase value recorded at the previous moment, and Per_Cicle_Normal_Value represents the Z-phase value of the encoder rotating normally for one circle.

[0074] It should be noted that assuming that the encoder abnormality is that the encoder loses the wire, it will cause the Z-phase value Per_Cicle_Real_Value of the actual rotation for one circle to change, that is, it will cause the change of Current_Z_Value, and then cause the change of Z_Value_Diff1 (i.e., the first difference); under normal circumstances, the difference Z_Value_Diff1 between the Z-phases before and after should be 0, and occasionally there will be some single-digit wire losses. Therefore, it is judged whether Z_Value_Diff1 exceeds the first threshold. If it exceeds the first threshold, it is considered that the encoder has lost the wire. If it does not exceed the threshold, the influence can be ignored.

[0075] In the embodiments of the present application, the above-mentioned collimator is subjected to abnormality detection according to the above-mentioned first Z-phase value and the second Z-phase value, and the abnormality detection result includes:

[0076] When the first difference is not greater than a preset first threshold and the collimator has been calibrated, the collimator is subjected to anomaly detection by using the first Z-phase value and the initial Z-phase value, and an anomaly detection result is obtained. The initial Z-phase value is the second Z-phase value recorded for the first time after the collimator is calibrated.

[0077] In some embodiments, when the first difference is not greater than a preset first threshold and the collimator has been calibrated, it indicates that no encoder anomaly has occurred in the collimator and the collimator has been calibrated. At the same time, the initial Z-phase value, which is the second Z-phase value recorded for the first time after the collimator is calibrated, can represent the "initial position" of the moving part. If the gap between this "initial position" and the Z-phase value recorded by the encoder at the current moment is too large, it means that the movement of the moving part deviates too much from the "initial position", that is, the moving part may be abnormal. Therefore, the Z-phase value recorded by the encoder at the current moment and the initial Z-phase value can be used to perform anomaly detection on the collimator, so as to determine whether the moving part has an abnormal change.

[0078] In the embodiments of the present application, the collimator is subjected to anomaly detection by using the first Z-phase value and the initial Z-phase value, and an anomaly detection result is obtained, including:

[0079] Calculating a second difference between the first Z-phase value and the initial Z-phase value;

[0080] When the second difference is greater than a preset second threshold, it is determined that the anomaly detection result of the collimator is that the photoelectric switch associated with the moving part is abnormal.

[0081] In some embodiments, the second difference can be represented as Z_Value_Diff2, and the second difference can be calculated by the following method:

[0082] Z_Value_Diff2 = (Current_Z_Value - First_Z_Value) % Per_Cicle_Normal_Value

[0083] Wherein, Current_Z_Value represents the Z-phase value recorded at the current moment, that is, the first Z-phase value, First_Z_Value represents the initial Z-phase value, and Per_Cicle_Normal_Value represents the Z-phase value when the encoder rotates normally for one circle.

[0084] It should be noted that after each collimator calibration (and / or performing a homing movement), the newly obtained Current_Z_Value represents the latest Z-phase value re-obtained based on the zero point of this calibration and / or homing. If the zero point position of the moving part does not drift, the Z-phase value after each calibration and / or homing should be the same. If there is a drift, the Z-phase value after calibration and / or homing will necessarily be different from the initially recorded Z-phase code value (i.e., the initial Z-phase value). At the same time, since it has been determined through the above first difference that the abnormality of Current_Z_Value is not caused by encoder wire loss, when Z_Value_Diff2 exceeds the second threshold, it can be considered that the photoelectric switch associated with the moving part has a large drift. If Z_Value_Diff2 does not exceed the second threshold, the influence can be ignored.

[0085] In an optional embodiment of the present application, referring to Figure 4 As shown, it is a schematic flowchart for abnormal detection of the collimator by recording the Z-phase value of the encoder. After the collimator is powered on, it starts to scan whether the collimator has an abnormality. First, a homing movement is performed to adjust the moving part and the encoder in the collimator to the initial state; then, it is determined whether to report the Z-phase value according to whether the encoder rotates more than one circle. When the encoder rotates less than one circle, the encoder will not report the Z-phase value until the encoder rotates more than one circle, and the encoder reports the Z-phase value; according to the Z-phase value reported each time, record the Z-phase value of the encoder at the current moment, and compare the Z-phase value at the current moment with the Z-phase value at the previous moment to obtain the first difference; if the first difference after comparison exceeds the first threshold, the scan is interrupted and it is determined that there is an encoder wire loss error; if the first difference after comparison does not exceed the first threshold, it is determined whether the collimator has been calibrated. If the collimator has not been calibrated, the collimator is calibrated and the Z-phase value of the encoder is recorded after re-homing; if the collimator has been calibrated, the Z-phase value at the current moment is compared with the initial Z-phase value (i.e., the Z-phase value recorded for the first time after homing) to obtain the second difference; if the second difference does not exceed the second threshold, continue the collimator scan, and if the second difference exceeds the second threshold, pause the scan and report the photoelectric switch drift. By detecting the abnormality of the collimator by recording the Z-phase value of the encoder, manual intervention can be reduced, the automation degree of collimator inspection can be improved, the time for R & D to investigate problems can also be reduced, and the maintenance cost can be lowered.

[0086] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0087] Corresponding to the abnormal detection method described in the above embodiments, Figure 5The structure diagram of the anomaly detection device provided by the embodiments of the present application is shown. For ease of illustration, only the parts related to the embodiments of the present application are shown.

[0088] Referring to Figure 5 , the device may be an anomaly detection device 51, and the anomaly detection device 51 may include a slit recording module 511 and an anomaly detection module 512.

[0089] Referring to Figure 5 , the anomaly detection device 51 includes:

[0090] The slit recording module 511 is configured to record the slit size of the collimator based on the encoder when the moving part is in motion.

[0091] The anomaly detection module 512 is configured to perform anomaly detection on the collimator by using the change in the slit size to obtain an anomaly detection result.

[0092] In some embodiments, the anomaly detection device 51 further includes an adjustment module, and the adjustment module is configured to, before recording the slit size of the collimator based on the encoder, include:

[0093] Perform a zeroing process on the collimator, and the zeroing process is used to adjust the moving part and the encoder in the collimator to an initial state.

[0094] In some embodiments, the slit recording module 511 records the slit size of the collimator based on the encoder through the following steps, including:

[0095] Record the Z-phase value of the encoder at the current moment to obtain a first Z-phase value, and the first Z-phase value is used to reflect the slit size of the collimator at the current moment.

[0096] In some embodiments, the anomaly detection module 512 performs anomaly detection on the collimator by using the change in the slit size through the following steps to obtain an anomaly detection result, including:

[0097] Perform anomaly detection on the collimator according to the first Z-phase value and the second Z-phase value to obtain an anomaly detection result, where the second Z-phase value is the Z-phase value recorded before recording the first Z-phase value.

[0098] In some embodiments, the anomaly detection module 512 performs anomaly detection on the collimator according to the first Z-phase value and the second Z-phase value through the following steps to obtain an anomaly detection result, including:

[0099] Calculate the difference between the first Z-phase value and the third Z-phase value to obtain a first difference, where the third Z-phase value is the Z-phase value adjacent to the first Z-phase value among the second Z-phase values;

[0100] When the first difference is greater than a preset first threshold, determine that the abnormal detection result of the collimator is an encoder abnormality.

[0101] In some embodiments, the abnormal detection module 512 performs abnormal detection on the collimator according to the first Z-phase value and the second Z-phase value through the following steps to obtain an abnormal detection result, including:

[0102] When the first difference is not greater than a preset first threshold and the collimator has been calibrated, use the first Z-phase value and the initial Z-phase value to perform abnormal detection on the collimator to obtain an abnormal detection result, where the initial Z-phase value is the second Z-phase value recorded for the first time after the collimator is calibrated.

[0103] In some embodiments, the abnormal detection module 512 performs abnormal detection on the collimator by using the first Z-phase value and the initial Z-phase value through the following steps to obtain an abnormal detection result, including:

[0104] Calculate a second difference between the first Z-phase value and the initial Z-phase value;

[0105] When the second difference is greater than a preset second threshold, determine that the abnormal detection result of the collimator is an abnormality of the optoelectronic switch associated with the moving component.

[0106] It should be noted that for the information interaction, execution process, etc. between the devices / units, since they are based on the same concept as the method embodiments of the present application, their specific functions and the technical effects brought, specifically, reference can be made to the method embodiment part, and details are not described herein again.

[0107] Figure 6 This is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 6 shown, the electronic device 6 of this embodiment includes: at least one processor 60 ( Figure 6 only one is shown in the figure), a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60. When the processor 60 executes the computer program 62, the steps in any of the method embodiments are implemented.

[0108] The electronic device 6 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The electronic device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art can understand, Figure 6This is only an example of the electronic device 6, which does not constitute a limitation on the electronic device 6. It may include more or fewer components than those shown in the figure, or combine some components, or different components. For example, the electronic device may also include an input sending device, a network access device, a bus, etc.

[0109] The so-called processor 60 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0110] In some embodiments, the memory 61 may be an internal storage unit of the electronic device 6, such as the hard disk or memory of the electronic device 6. The memory 61 may also be an external storage device of the electronic device 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 6. Further, the memory 61 may also include both the internal storage unit and the external storage device of the electronic device 6. The memory 61 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program, etc. The memory 61 may also be used to temporarily store data that has been sent or will be sent.

[0111] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of the functional units and modules are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0112] An embodiment of this application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the processor executes the computer program, the steps in any of the foregoing method embodiments are implemented.

[0113] An embodiment of this application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in each of the foregoing method embodiments can be implemented.

[0114] An embodiment of this application provides a computer program product. When the computer program product runs on an electronic device, the electronic device is enabled to implement the steps in each of the foregoing method embodiments.

[0115] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the method of the above embodiments in this application, a computer program can be used to instruct the relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / electronic device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0116] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0117] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0118] In the embodiments provided in this application, it should be understood that the disclosed device / network device and method can be implemented in other ways. For example, the device / network device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.

[0119] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0120] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An anomaly detection method, characterized in that, The abnormal detection method is applied to a collimator, which includes a moving part and an encoder. The moving part is used to adjust the slit size of the collimator, and the encoder is used to record the change in the slit size. The abnormal detection method includes: When the moving part is moving, record the slit size of the collimator based on the encoder; Use the change in the slit size to perform abnormal detection on the collimator to obtain an abnormal detection result.

2. The anomaly detection method according to claim 1, wherein Before recording the slit size of the collimator based on the encoder, it further includes: Perform a zeroing process on the collimator, and the zeroing process is used to adjust the moving part and the encoder in the collimator to the initial state.

3. The anomaly detection method according to claim 1, wherein Recording the slit size of the collimator based on the encoder includes: Record the Z-phase value of the encoder at the current moment to obtain a first Z-phase value, and the first Z-phase value is used to reflect the slit size of the collimator at the current moment.

4. The anomaly detection method according to claim 3, wherein Using the change in the slit size to perform abnormal detection on the collimator to obtain an abnormal detection result includes: Perform abnormal detection on the collimator according to the first Z-phase value and the second Z-phase value to obtain an abnormal detection result. The second Z-phase value is the Z-phase value recorded before recording the first Z-phase value.

5. The anomaly detection method according to claim 4, wherein Performing abnormal detection on the collimator according to the first Z-phase value and the second Z-phase value to obtain an abnormal detection result includes: Calculate the difference between the first Z-phase value and the third Z-phase value to obtain a first difference. The third Z-phase value is the Z-phase value adjacent to the first Z-phase value in the second Z-phase values; When the first difference is greater than a preset first threshold, determine that the abnormal detection result of the collimator is an encoder abnormality.

6. The anomaly detection method according to claim 5, characterized in that, Performing abnormal detection on the collimator according to the first Z-phase value and the second Z-phase value to obtain an abnormal detection result includes: When the first difference is not greater than the preset first threshold and When the collimator has been calibrated, use the first Z-phase value and the initial Z-phase value to perform abnormal detection on the collimator to obtain an abnormal detection result. The initial Z-phase value is the second Z-phase value recorded for the first time after the collimator is calibrated.

7. The anomaly detection method according to claim 6, wherein Using the first Z-phase value and the initial Z-phase value to perform abnormal detection on the collimator to obtain an abnormal detection result includes: Calculate the second difference between the first Z-phase value and the initial Z-phase value; When the second difference is greater than a preset second threshold, determine that the abnormal detection result of the collimator is an abnormality of the photoelectric switch associated with the moving part.

8. An anomaly detection device, characterized in that, The abnormal detection device is applied to a collimator, which includes a moving part and an encoder. The moving part is used to adjust the slit size of the collimator, and the encoder is used to record the change in the slit size, and includes: A slit recording module, configured to record the slit size of the collimator based on the encoder when the moving part is moving; An abnormal detection module, configured to use the change in the slit size to perform abnormal detection on the collimator to obtain an abnormal detection result.

9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.