An exception handling method and an exception handling apparatus

CN122594915APending Publication Date: 2026-08-18SCIVITA MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610681298.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-18
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0005]鉴于此,本发明实施例提供了一种异常处理方法和异常处理装置,解决现有内窥镜电机操作效率低、安全性差、控制精度不足的技术问题

Benefits of technology

[0019]本发明提供的一种异常处理方法,应用于具有双电机驱动系统的内窥镜,响应于电机驱动指令,获取第一电机和第二电机各自对应的编码器反馈信号和负载电流信号,进而基于电机驱动指令中携带的目标控制信息与编码器反馈信号和负载电流信号进行偏差计算,得到步数偏差、转速偏差和电流偏差,实现了对双电机运行状态的实时量化表征,为后续多维度故障判定提供了统一的数据基础;进而将步数偏差、转速偏差和电流偏差与各自对应的预设偏差阈值进行比较,得到偏差比较结果并获取对应的偏差持续时间,进而按照预设故障判定逻辑确定当前故障类型,有效解决了现有技术因依赖单一信号检测而无法有效区分核心故障、误报警率高的问题;最后基于当前故障类型,按照预设处理策略中对应的异常处理操作,对内窥镜进行差异化异常处理,实现了不同故障的精准应对与及时保护,确保了内窥镜在体内操作中的安全性、可靠性与操作连续性,提升了手术或检查的效率与安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594915A_ABST
    Figure CN122594915A_ABST
Patent Text Reader

Abstract

This invention relates to an anomaly handling method and an anomaly handling device. The method includes: responding to a motor drive command, acquiring encoder feedback signals and load current signals corresponding to a first motor and a second motor respectively; the motor drive signals carrying target control information; obtaining step deviation, speed deviation, and current deviation based on the target control information, encoder feedback signals, and load current signals; comparing the step deviation, speed deviation, and current deviation with their respective preset deviation thresholds to obtain a deviation comparison result; and acquiring the deviation duration corresponding to the deviation comparison result; determining the current fault type based on the deviation comparison result and the deviation duration according to a preset fault judgment logic; and processing the endoscope according to a preset processing strategy based on the current fault type, thereby ensuring the reliability and continuity of the endoscope during operation and improving the efficiency and safety of the surgery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing and automatic control technology, and more specifically, to an anomaly handling method and an anomaly handling device. Background Technology

[0002] The electro-hydraulic endoscope uses a joystick to control a motor, which in turn moves the traction wire to adjust the angle of the bending section. In existing technologies, joystick control methods often employ direct Cartesian coordinate mapping, where the X-axis signal controls the left / right bending motor, and the Y-axis signal controls the up / down bending motor. The operator issues a bending command by pushing the joystick, and the motor responds, moving the corresponding traction wire to adjust the bending direction of the endoscope.

[0003] However, the existing methods described above have significant shortcomings. First, when the operator needs to achieve oblique bending, the Cartesian coordinate mapping outputs the left and right and up and down components independently. Due to the difference in response characteristics between the left and right bending motors and the up and down bending motors, as well as the nonlinearity of the traction wire retraction system, the actual bending amplitude in the two directions is difficult to precisely match the operator's intention, easily leading to problems such as bending direction deviation, jamming, and a stiff operating feel, making it impossible to achieve smooth oblique bending. Second, there is a deviation between the mechanical zero point and the electrical zero point of the joystick, which may drift over time. The existing methods do not effectively handle the neutral point of the joystick, causing the motor to still generate a slight rotation when the joystick returns to center, resulting in unnecessary slight oscillations of the endoscope's bending section, affecting operational stability and safety. In addition, different models of endoscopes have different mechanical parameters such as the maximum bending angle and traction wire stroke. The existing methods use a fixed ratio to map the joystick operation amplitude to the motor rotation angle, which cannot be flexibly adjusted according to the mechanical structure parameters of the endoscope and the motor transmission parameters. This makes it difficult for the same control algorithm to be adapted to different specifications of endoscopes, resulting in poor versatility.

[0004] In view of the shortcomings of the existing technologies, there is an urgent need for an endoscope anomaly handling method that can achieve continuous mapping in all directions, precise component coordination, and natural operation, so as to solve the problems of oblique operation lag, directional deviation, low control accuracy, and poor parameter adaptability in the existing solutions. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide an anomaly handling method and an anomaly handling device to solve the technical problems of low operating efficiency, poor safety, and insufficient control precision of existing endoscope motors.

[0006] One aspect of the present invention provides an anomaly handling method applied to an endoscope having a dual-motor drive system, the method comprising the following steps: In response to a motor drive command, the encoder feedback signals and load current signals corresponding to the first motor and the second motor are acquired respectively; the motor drive signals carry target control information. Based on the target control information, the encoder feedback signal, and the load current signal, deviation calculation is performed to obtain the step number deviation, speed deviation, and current deviation corresponding to the first motor and the second motor respectively; The step count deviation, the rotation speed deviation, and the current deviation are compared with their respective preset deviation thresholds to obtain a deviation comparison result; and the deviation duration corresponding to the deviation comparison result is obtained. Based on the deviation comparison results and the deviation duration, the current fault type of the endoscope is determined according to the preset fault determination logic; Based on the current fault type, the endoscope is subjected to differentiated fault handling according to the corresponding fault handling operation in the preset handling strategy.

[0007] Furthermore, the current fault type includes a first fault type; the preset deviation threshold includes a preset step deviation threshold, a preset rotation speed deviation threshold, and a preset current deviation threshold; the preset current deviation threshold includes a first current deviation threshold; the preset rotation speed threshold includes a preset rotation speed deviation threshold; the above-mentioned determination of the current fault type of the endoscope based on the deviation comparison result and the deviation duration, according to the preset fault determination logic, includes: Obtain the deviation time threshold; If the wall-collision sensor indicator head does not collide with a wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step number deviation is not less than the preset step number deviation threshold, the rotational speed deviation is not less than the preset rotational speed deviation threshold, and the current deviation is not less than the first current deviation threshold, then the current fault type is determined to be the first fault type.

[0008] Furthermore, the current fault type also includes a second fault type; the preset current deviation threshold also includes a second current deviation threshold; the above-mentioned determination of the current fault type of the endoscope based on the deviation comparison result and the deviation duration, according to the preset fault determination logic, further includes: Acquire the wall-collision sensor signal; If the wall-collision sensor head does not collide with the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step number deviation is not less than the preset step number deviation threshold, the speed deviation is less than the preset speed deviation threshold, and the current deviation is less than the second current deviation threshold, then the current fault type is determined to be the second fault type.

[0009] Furthermore, the current fault type also includes a third fault type; the preset speed threshold also includes a preset overload speed threshold; the above-mentioned determination of the current fault type of the endoscope based on the deviation comparison result and the deviation duration, according to the preset fault determination logic, further includes: Obtain the joystick push signal; If the joystick push signal is continuously monitored, the wall collision sensor signal indicates that the head end has collided with the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step number deviation is not less than the preset step number deviation threshold, the speed deviation is not less than the preset overload speed threshold, and the current deviation is not less than the first current deviation threshold, then the current fault type is determined to be the third fault type.

[0010] Furthermore, the current fault type also includes a fourth fault type; the preset rotational speed threshold also includes a preset stall deviation threshold; the above-mentioned determination of the current fault type of the endoscope based on the deviation comparison result and the deviation duration, according to the preset fault determination logic, further includes: If the wall-collision sensor indicator head does not collide with the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step number deviation is not less than the preset step number deviation threshold, the speed deviation is not less than the preset stall deviation threshold, and the current deviation is not less than the first current deviation threshold, then the current fault type is determined to be the fourth fault type.

[0011] Furthermore, the differentiated anomaly handling of the endoscope based on the current fault type and according to the corresponding anomaly handling operation in the preset handling strategy includes: If the current fault type is the first fault type or the second fault type, disconnect the power supply to the first motor and the second motor in the endoscope; If the current fault type is the third fault type, the power supply to the first motor and the second motor in the endoscope is cut off, and the motors are controlled to perform a micro-reverse operation. If the current fault type is the fourth fault type, the power supply to the first motor and the second motor in the endoscope is cut off, and a voltage fine-tuning operation is performed to attempt to restore motor operation; if the current fault type is still the fourth fault type after performing a preset number of voltage fine-tuning operations, the shutdown state is maintained.

[0012] Furthermore, before responding to the motor drive command, the above method also includes: The system controls the first and second motors to operate under no-load conditions according to preset target parameters, and collects the actual parameters fed back by the encoder. Calculate the maximum deviation between the actual parameter and the preset target parameter; Based on the maximum deviation value and the preset redundancy, the preset step number deviation threshold and the preset speed deviation threshold are determined in the preset deviation threshold.

[0013] Furthermore, after performing differential anomaly processing on the endoscope, the above method also includes: The system detects a reset operation signal, and upon detection, clears the current fault type, restores the normal motor control logic, and allows the endoscope to re-enter a workable state.

[0014] Furthermore, the aforementioned wall-collision sensing signal is obtained through the following methods: Obtain the current contact pressure and preset pressure threshold collected by the pressure sensor set at the end of the endoscope; The current contact pressure is compared with the preset pressure threshold to obtain the wall-collision sensing signal.

[0015] Furthermore, the aforementioned wall-collision sensing signal is obtained through the following methods: Acquire the current bending angle and target bending angle from the attitude sensor located at the endoscope insertion site; Based on the current bending angle and the target bending angle, the angle deviation is calculated to obtain the bending angle deviation; The bending angle deviation is compared with a preset angle deviation threshold to obtain the wall-collision sensing signal.

[0016] Another aspect of the present invention provides an anomaly handling device for an endoscope having a dual-motor drive system, the device comprising: The information acquisition module is used to acquire the encoder feedback signals and load current signals corresponding to the first motor and the second motor in response to the motor drive command; the motor drive signal carries target control information. The deviation calculation module is used to perform deviation calculation based on the target control information, the encoder feedback signal and the load current signal to obtain the step deviation, speed deviation and current deviation of the first motor and the second motor respectively. The deviation comparison module is used to compare the step deviation, the rotation speed deviation, and the current deviation with their respective preset deviation thresholds to obtain a deviation comparison result; and to obtain the deviation duration corresponding to the deviation comparison result. The fault type determination module is used to determine the current fault type of the endoscope based on the deviation comparison result and the deviation duration, according to a preset fault judgment logic. The anomaly handling module is used to perform differentiated anomaly handling on the endoscope based on the current fault type and according to the corresponding anomaly handling operation in the preset handling strategy.

[0017] Another aspect of the present invention provides an electronic device, comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the exception handling method described in any one of the above descriptions.

[0018] Another aspect of the present invention provides a computer-readable storage medium that, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform any of the above-described exception handling methods.

[0019] This invention provides an anomaly handling method applied to an endoscope with a dual-motor drive system. Responding to motor drive commands, it acquires encoder feedback signals and load current signals corresponding to the first and second motors, respectively. Then, based on the target control information carried in the motor drive commands and the encoder feedback and load current signals, it calculates the deviations to obtain step count deviation, speed deviation, and current deviation, achieving real-time quantitative characterization of the dual-motor operating status and providing a unified data foundation for subsequent multi-dimensional fault determination. Furthermore, it compares the step count deviation, speed deviation, and current deviation with their respective preset deviation thresholds to obtain the deviation comparison results and corresponding deviation durations. Then, it determines the current fault type according to a preset fault determination logic, effectively solving the problem of existing technologies relying on single signal detection, which cannot effectively distinguish core faults and has a high false alarm rate. Finally, based on the current fault type, it performs differentiated anomaly handling on the endoscope according to the corresponding anomaly handling operation in the preset handling strategy, achieving precise response and timely protection for different faults. This ensures the safety, reliability, and operational continuity of the endoscope during intraoperative procedures, improving the efficiency and safety of surgery or examinations. Attached Figure Description

[0020] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating an exception handling method according to an exemplary embodiment; Figure 2This is a schematic diagram of a process for acquiring a wall collision sensing signal according to an exemplary embodiment; Figure 3 This is a schematic diagram of another process for acquiring a wall collision sensing signal according to an exemplary embodiment; Figure 4 This is a schematic diagram of a process for determining a preset deviation threshold according to an exemplary embodiment; Figure 5 This is a schematic diagram of a process for handling differential anomalies in an endoscope according to an exemplary embodiment; Figure 6 This is a schematic diagram of an exception handling device provided according to an exemplary embodiment. Detailed Implementation

[0022] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] It should be noted that the terms "first," "second," etc., in the specification and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0025] Figure 1This is a flowchart illustrating an exception handling method according to an exemplary embodiment. This specification provides method operation steps as shown in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual system or server product execution, the method can be executed in the order shown in the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown... Figure 1 As shown, an embodiment of an anomaly handling method of this application is described, using an endoscope with a dual-motor drive system as the executing entity, with the controller in the endoscope system as the executing entity. The method may include: S101: In response to the motor drive command, acquire the encoder feedback signal and load current signal corresponding to the first motor and the second motor respectively; the motor drive command carries target control information.

[0026] In one specific embodiment, the motor drive command can be a command signal controlling the coordinated rotation of the first motor and the second motor. Optionally, the motor drive command can be generated by the controller based on the operator's joystick operation. Specifically, the motor drive command carries target control information, which may include the target number of steps and the target speed. The encoder feedback signal can be a signal reflecting the actual rotation state of the motor. Optionally, the encoder feedback signal is a signal collected and fed back in real time by a corresponding incremental encoder. Accordingly, the encoder feedback signal may include the number of pulses corresponding to the actual number of motor rotation steps and / or the actual motor speed signal. The load current signal can be a signal collected and fed back in real time by the current detection function built into the stepper motor drive module, used to reflect the actual load current of the first motor and the second motor. Specifically, in response to the motor drive command, the controller reads the joystick operation command in real time, outputs the corresponding target control information, drives the dual motors to operate in conjunction, and drives the endoscope insertion part to achieve bending operation by traction ribbon. Then, the controller synchronously acquires the encoder feedback signal and load current signal corresponding to the first motor and the second motor at a preset sampling period.

[0027] S103: Based on the target control information, encoder feedback signal and load current signal, perform deviation calculation to obtain the step number deviation, speed deviation and current deviation of the first motor and the second motor respectively.

[0028] In a specific embodiment, after obtaining the target control information, encoder feedback signal, and load current signal, the rated current of the motor is obtained. Then, based on the actual number of motor rotation steps and the actual motor speed signal in the encoder feedback signal, the target number of steps and the target speed in the target control information, and the load current signal and the rated current of the motor, the corresponding differences are calculated to obtain the step deviation, speed deviation, and current deviation for the first motor and the second motor respectively. Specifically, the step deviation is equal to the absolute value of the difference between the actual number of steps and the target number of steps; the speed deviation is equal to the absolute value of the difference between the actual speed and the target speed; and the current deviation is equal to the absolute value of the difference between the actual load current and the rated current of the motor.

[0029] S105: Compare the step count deviation, speed deviation, and current deviation with their respective preset deviation thresholds to obtain the deviation comparison results; and obtain the deviation duration corresponding to the deviation comparison results.

[0030] In a specific embodiment, the deviation comparison result is used to indicate whether the step number deviation is less than the corresponding preset deviation threshold, whether the speed deviation is less than the corresponding preset deviation threshold, and whether the current deviation is less than the corresponding preset deviation threshold. The deviation duration can be the length of time that the deviation exceeds the limit from the moment the deviation comparison result first meets the preset deviation threshold condition until the current sampling time. Specifically, the obtained step number deviation, speed deviation, and current deviation corresponding to the first motor and the second motor are compared one by one with the preset step number deviation threshold, preset speed deviation threshold, and preset current deviation threshold in the preset deviation threshold to obtain the deviation comparison result. Further, when a certain deviation first reaches or exceeds the corresponding preset deviation threshold, the duration of the deviation state begins to accumulate. If the deviation continues to exceed the limit in subsequent sampling periods, the deviation duration continues to accumulate. If the deviation falls back below the preset deviation threshold, the deviation duration is cleared to zero. Thus, the controller obtains the deviation comparison result of each deviation of each motor and its corresponding deviation duration.

[0031] S107: Based on the deviation comparison results and deviation duration, determine the current fault type of the endoscope according to the preset fault judgment logic.

[0032] In a specific embodiment, the preset fault determination logic can be a set of determination rules for distinguishing and determining the current fault type based on the deviation comparison result and the deviation duration; the current fault type can be the fault category that the endoscope is currently experiencing; specifically, based on the aforementioned deviation comparison result and deviation duration, the current fault type of the endoscope is determined according to the type determination rules in the preset fault determination logic.

[0033] In an optional embodiment, the current fault type includes a first fault type; the preset deviation threshold includes a preset step deviation threshold, a preset speed deviation threshold, and a preset current deviation threshold; the preset current deviation threshold includes a first current deviation threshold; the preset speed threshold includes a preset speed deviation threshold; the above determination of the current fault type based on the deviation comparison result and the deviation duration, according to the preset fault determination logic, includes: Obtain the deviation time threshold; If the duration of the deviation is not less than the deviation time threshold, and the deviation comparison result indicates that the step deviation is not less than the preset step deviation threshold, the speed deviation is not less than the preset speed deviation threshold, and the current deviation is not less than the first current deviation threshold, then the current fault type is determined to be the first fault type.

[0034] In a specific embodiment, the first fault type can be a fault type in which the first motor or the second motor in the dual-motor drive system of the endoscope is stuck; optionally, motor stuck refers to an abnormal state in which the motor cannot rotate normally according to the control command due to mechanical obstruction (such as foreign object stuck, bearing damage, gear jamming, etc.), resulting in the endoscope insertion part being unable to achieve the expected bending action; the preset step deviation threshold can be a critical value for judging whether the deviation between the actual number of motor rotation steps and the target number of steps is abnormal; the preset speed deviation threshold can be a critical value for judging whether the deviation between the actual speed of the motor and the target speed is abnormal; the preset current deviation threshold can be a critical value for judging whether the motor load current is abnormal; optionally, the preset current deviation threshold can include a first current deviation threshold, specifically, the first current deviation threshold can be a critical value for judging whether the motor load current exceeds the standard corresponding to the first fault type; the preset speed deviation threshold can be a critical value for judging whether the deviation between the actual speed of the motor and the target speed is abnormal corresponding to the first fault type. Specifically, during the fault detection process, the main control unit first obtains the deviation time threshold and further judges whether the deviation duration and deviation comparison result meet three parallel conditions: First, the deviation duration is not less than the deviation time threshold, indicating that the abnormal state is not an instantaneous interference, but a real fault that persists; Second, the step number deviation is not less than the preset step number deviation threshold, indicating that there is a significant deviation between the actual number of rotation steps of the motor and the target number of steps; Third, the speed deviation is not less than the preset speed deviation threshold and the current deviation is not less than the first current deviation threshold, indicating that the motor speed is far lower than the target value and the load current is significantly exceeded; Correspondingly, when the above three conditions are met at the same time, the main control unit determines that the current fault type is the first fault type, namely, motor jamming fault. Optionally, the physical basis of this judgment logic is that when the motor is jammed, the rotor is mechanically jammed and cannot rotate, and the actual number of steps and the actual speed are close to zero, forming a huge deviation from the target parameters; At the same time, due to the stall effect, the motor winding current rises sharply to several times the rated current.

[0035] In the above embodiments, by combining the deviation duration, step deviation, speed deviation and current deviation for judgment, the motor jamming fault can be accurately identified, effectively reducing the false alarm rate and preventing the motor from burning out due to continuous stalling.

[0036] In an optional embodiment, the current fault type further includes a second fault type; the preset current deviation threshold further includes a second current deviation threshold; the above-mentioned determination of the current fault type based on the deviation comparison result and the deviation duration, according to the preset fault determination logic, further includes: Acquire the wall-collision sensor signal; If the wall-touching sensor signal indicator head does not touch the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step deviation is not less than the preset step deviation threshold, the speed deviation is less than the preset speed deviation threshold, and the current deviation is less than the second current deviation threshold, then the current fault type is determined to be the second fault type.

[0037] In one specific embodiment, the wall-touching sensing signal can be a sensing signal characterizing whether the endoscope tip touches the inner wall of the human body. Optionally, the wall-touching sensing signal can be used to indicate whether the head tip touches the wall. The second fault type can be a fault type in which the traction wire connected to the first motor or the second motor in the dual-motor drive system of the endoscope breaks; optionally, the traction wire is a key transmission component connecting the motor and the endoscope insertion part, used to convert the rotational motion of the motor into the bending motion of the insertion part. Therefore, when the traction wire breaks, although the motor can rotate normally, the power cannot be transmitted to the insertion part through the broken traction wire, resulting in the motor operating in a near-no-load state, and the insertion part cannot achieve the expected bending motion; the second current deviation threshold can be the critical value corresponding to the second fault type for judging whether the motor load current exceeds the standard. Specifically, during the fault detection process, when the wall-touching sensor signal indicates that the head end has not touched the wall, and external resistance factors have been ruled out, the main control unit determines whether the following conditions are met simultaneously: the deviation duration is not less than the deviation time threshold, ensuring that the abnormal state is continuous rather than a momentary disturbance; the step deviation is not less than the preset step deviation threshold, indicating that although the motor is rotating, it has failed to effectively drive the traction wire, resulting in the accumulation of deviation between the actual number of steps and the target number of steps; the speed deviation is less than the preset speed deviation threshold, indicating that the motor can normally follow the target speed; the current deviation is less than the second current deviation threshold, indicating that the motor load current is significantly low and is in a near-no-load state. Therefore, when the above conditions are met simultaneously, the main control unit determines that the current fault type is the second fault type, namely, the traction wire breakage fault. Optionally, the physical basis of this determination logic is that after the traction wire breaks, the motor loses the load constraint, and the rotor can rotate freely, so the speed can follow the target value well, and the speed deviation is small; however, since the traction wire cannot transmit power to the insertion part, the actual number of steps executed and the commanded number of steps continue to deviate and accumulate; at the same time, because there is no load, the motor operating current is far lower than the normal load level.

[0038] In the above embodiments, a unique parameter combination of "small speed deviation, large step number deviation, and low current" accurately determines the traction wire breakage fault. This combination accurately captures the physical characteristics of the motor idling (normal speed), inability to transmit power (accumulated step number deviation), and loss of load (current drop) after breakage, clearly distinguishing it from the three types of faults: jamming, hitting the wall, and stalling. This facilitates timely shutdown and replacement of the traction wire, avoiding damage to the snake-bone structure.

[0039] Figure 2 This is a schematic flowchart illustrating the acquisition of a wall-collision sensing signal according to an exemplary embodiment. In an optional embodiment, the acquisition of the wall-collision sensing signal includes: S201: Obtain the current contact pressure and preset pressure threshold collected by the pressure sensor set at the endoscope lens; S203: Compare the current contact pressure with the preset pressure threshold to obtain the wall-collision sensing signal.

[0040] In a specific embodiment, the current contact pressure can be a signal value reflecting the magnitude of the contact force between the endoscope tip and the inner wall of the human body; the preset pressure threshold can be a critical pressure value for determining whether the endoscope tip has hit the wall; specifically, a pressure sensor is integrated into the endoscope tip, optionally with a range of 0N to 5N. During device operation, the pressure sensor collects the current contact pressure received by the endoscope tip in real time and transmits the current contact pressure to the controller. Specifically, under normal conditions, when the endoscope tip is not in contact with the inner wall of the human body, the current contact pressure is close to zero; when the endoscope tip touches the inner wall of the human body and experiences reverse resistance, the current contact pressure will increase significantly; further, the real-time acquired current contact pressure is compared with the preset pressure threshold to generate a wall-hitting sensing signal. Optionally, if the current contact pressure is not less than the preset pressure threshold, it indicates that the pressure received by the tip has exceeded the safe range, and it is determined that the tip has hit the inner wall of the human body, and the wall-hitting sensing signal indicates that the tip has hit the wall; when the current contact pressure is less than the preset pressure threshold, it indicates that the tip has not experienced abnormal pressure or has only experienced slight normal contact force, and the wall-hitting sensing signal indicates that the tip has not hit the wall.

[0041] Figure 3 This is a schematic diagram of another process for acquiring a wall-collision sensing signal according to an exemplary embodiment. In an optional embodiment, acquiring the wall-collision sensing signal includes: S301: Acquire the current bending angle and target bending angle collected by the attitude sensor set at the endoscope insertion part; S303: Based on the current bending angle and the target bending angle, calculate the angle deviation to obtain the bending angle deviation; S305: Compare the bending angle deviation with the preset angle deviation threshold to obtain the wall collision sensing signal.

[0042] In one specific embodiment, the current bending angle can be a signal value of the actual bending degree of the endoscope insertion part. Optionally, the current bending angle is collected and fed back in real time by an attitude sensor installed on the endoscope insertion part; the target bending angle can be a parameter value of the expected bending degree of the endoscope insertion part; the bending angle deviation can be the difference between the current bending angle and the target bending angle, used to measure the degree of deviation between the actual bending state and the expected bending state of the endoscope insertion part; the preset angle deviation threshold can be a critical value for judging whether the bending angle deviation of the endoscope insertion part is abnormal. Specifically, an attitude sensor is integrated into the endoscope insertion section. Optionally, the attitude sensor is preferably an IMU attitude sensor, which can accurately sense the bending state changes of the insertion section within the body in real time. During device operation, the attitude sensor collects the current bending angle of the insertion section in real time and transmits this angle to the controller. Simultaneously, the controller calculates and generates a target bending angle in real time based on the operator's joystick operation commands. Further, the acquired current bending angle is compared with the target bending angle to calculate the bending angle deviation. The calculation formula is: Bending angle deviation = |Current bending angle - Target bending angle|. Optionally, when the insertion section bends normally, the current bending angle changes synchronously with the change in the target bending angle. The deviation is small; when the endoscope tip touches the inner wall of the human body and is obstructed, although the operator continues to push the joystick and the controller continues to output the target bending angle, the insertion part cannot continue to bend due to the external force. The current bending angle no longer increases synchronously with the target bending angle, resulting in the bending angle deviation accumulating and increasing significantly. Furthermore, the calculated bending angle deviation is compared with the preset angle deviation threshold to generate a wall-hitting sensor signal. Optionally, when the bending angle deviation is not less than the preset angle deviation threshold, it indicates that the bending of the insertion part is severely obstructed, and it is determined that the tip has touched the inner wall of the human body. The wall-hitting sensor signal indicates that the tip has hit the wall. When the bending angle deviation is less than the preset angle deviation threshold, it indicates that the bending state of the insertion part is basically consistent with the expectation, and the wall-hitting sensor signal indicates that the tip has not hit the wall.

[0043] The above embodiments provide two methods for acquiring collision sensing signals: one based on a pressure sensor and the other based on a posture sensor. Together, they achieve dual-path redundancy coverage for the collision detection scheme, enabling the present invention to flexibly adapt to endoscope devices with different hardware configurations. Whether equipped with a pressure sensor or only a posture sensor, it can accurately generate collision sensing signals, effectively distinguishing between head-end collisions and fault types such as motor jamming and motor stalling, reducing false alarm rates, and improving the versatility and reliability of fault detection.

[0044] In an optional embodiment, the current fault type further includes a third fault type; the preset speed threshold further includes a preset overload speed threshold; the above-mentioned determination of the current fault type based on the deviation comparison result and the deviation duration, according to the preset fault determination logic, further includes: Obtain the joystick push signal; If the joystick push signal is continuously monitored, the wall collision sensor signal indicates that the head end has collided with the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step deviation is not less than the preset step deviation threshold, the speed deviation is not less than the preset overload speed threshold, and the current deviation is not less than the first current deviation threshold, then the current fault type is determined to be the third fault type.

[0045] In a specific embodiment, the third fault type can be the fault type in which the endoscope tip touches the inner wall of the human body and is subjected to reverse resistance during the operation of the endoscope inside the body, causing the insertion part to be unable to continue to bend as intended by the operator; the joystick push signal can be the control status signal of whether the operator is actively pushing the joystick to control the bending of the endoscope; the preset overload speed threshold can be the critical value corresponding to the third fault type for judging whether the deviation between the actual speed of the motor and the target speed is abnormal. Specifically, during the fault detection process, the main control unit first acquires the joystick push signal to determine whether the operator is continuously pushing the joystick. Optionally, only when an abnormality occurs during the operator's active manipulation of the endoscope's bending process can it be determined as a wall-hitting fault. If the joystick has returned to center but the motor is still running, it belongs to other abnormal types. Further, the main control unit determines whether the wall-hitting sensor signal indicates that the head end is hitting the wall, that is, the current contact pressure is not less than the preset pressure threshold, or the bending angle deviation is not less than the preset angle deviation threshold, confirming that the head end has been subjected to external resistance. Afterwards, the main control unit verifies that the duration of the deviation is not less than the deviation time threshold, eliminating instantaneous contact interference; at the same time, it verifies that the step deviation is not less than the preset step deviation threshold, the speed deviation is not less than the preset overload speed threshold, and the current deviation is not less than the first current deviation threshold, confirming that the motor operating parameters have shown typical obstruction characteristics. When all the above conditions are met, the main control unit determines that the current fault type is the third fault type, namely, the head end hitting the wall fault. Optionally, the physical basis of this judgment logic is: after the endoscope touches the inner wall of the human body, it generates reverse resistance, causing the motor to be unable to rotate normally, the speed to drop significantly and deviate from the target value, the step deviation continues to accumulate, and the load current increases due to obstruction; at the same time, the wall-hitting sensor signal clearly indicates abnormal head end contact, and the continuous push signal of the joystick confirms the operator's bending intention.

[0046] In the above embodiments, by introducing a rocker push signal as a prerequisite, combined with the wall-collision sensing signal and the characteristics of motor resistance parameters, the wall-collision fault at the head end is accurately determined. The rocker signal effectively eliminates misjudgments in normal bending scenarios, and the wall-collision signal clarifies the source of external resistance, filling the gap in wall-collision detection not covered by existing technologies. This provides a trigger basis for subsequent micro-reversal operations, avoiding damage to human tissue and excessive stretching of the traction wire.

[0047] In an optional embodiment, the current fault type further includes a fourth fault type; the preset speed threshold further includes a preset stall deviation threshold; the above-mentioned determination of the current fault type based on the deviation comparison result and the deviation duration, according to the preset fault determination logic, further includes: If the wall-collision sensor signal indicator head does not collide with the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step deviation is not less than the preset step deviation threshold, the speed deviation is not less than the preset stall deviation threshold, and the current deviation is not less than the first current deviation threshold, then the current fault type is determined to be the fourth fault type.

[0048] In a specific embodiment, the fourth fault type can be a fault type in which the first motor or the second motor in the endoscope dual-motor drive system experiences motor stall; the preset stall deviation threshold can be the critical value corresponding to the fourth fault type for judging whether the deviation between the actual motor speed and the target speed is abnormal. Specifically, during the fault detection process, the main control unit first confirms that the contact sensor head has not hit the wall, meaning the current contact pressure is less than the preset pressure threshold, thus ruling out the possibility of external resistance causing abnormal motor operation. Further, the main control unit determines whether the following conditions are met simultaneously: the deviation duration is not less than the deviation time threshold, ensuring the abnormal state is continuous rather than a momentary fluctuation; the step deviation is not less than the preset step deviation threshold, indicating that the motor failed to drive the load to the target position as expected; the speed deviation is not less than the preset stall deviation threshold, indicating that the motor speed is significantly lower than the target value, but not completely jammed, and still has slight rotation; and the current deviation is not less than the first current deviation. The threshold indicates that the motor load current is continuously exceeding the standard and is in an overload state. When the above conditions are met simultaneously, the main control unit determines the current fault type as the fourth fault type, namely motor stall fault. Optionally, the physical basis of this judgment logic is that motor stall is mostly caused by internal factors such as voltage fluctuations, sudden load changes or motor aging, and is unrelated to whether the head end hits the wall. Therefore, the condition that the wall-hitting sensor signal indicates that the head end has not hit the wall must be met to eliminate the wall-hitting fault. When stalling, the motor still rotates but the output torque is insufficient and cannot drive the load to achieve the expected bending action. This is manifested as the speed being lower than the target value (but different from the speed approaching zero when stuck), the accumulation of step deviation, and the load current exceeding the standard.

[0049] In the above embodiments, by introducing a preset stall deviation threshold and combining it with the characteristics of "no wall-hitting signal" and "excessive current but not completely stalled speed", the motor stall fault is accurately determined. This combination effectively distinguishes between stall (with weak rotation) and jamming (complete stall), filling the gap in stall detection not covered by existing technology, providing a trigger basis for subsequent voltage fine-tuning operations, and avoiding damage to the motor due to continuous overload.

[0050] In an optional embodiment, the determination of the second, third, and fourth fault types can also be made without using the wall-bumping sensor signal. That is, in the absence of a pressure sensor and an IMU sensor, other information described above can be used to determine the corresponding fault type. Optionally, in the method of determining the fault type without using the wall-bumping sensor signal, the accuracy of the fault type determination will be reduced.

[0051] Figure 4 This is a flowchart illustrating the determination of a preset deviation threshold according to an exemplary embodiment. In an optional embodiment, the method further includes, prior to responding to an exception handling instruction: S401: Controls the first and second motors to run according to preset target parameters under no-load conditions; and collects the actual parameters fed back by the encoder; S403: Calculate the maximum deviation between the actual parameters and the preset target parameters; S405: Based on the maximum deviation value and the preset redundancy, determine the preset step number deviation threshold and the preset speed deviation threshold in the preset deviation threshold.

[0052] In one specific embodiment, the preset target parameters can be used to drive the first motor and the second motor to run at a predetermined number of steps and speed under no-load conditions. Optionally, the preset target parameters can include a preset target number of steps and a preset target speed. The actual parameters can be the actual operating data of the motor obtained in real time by the encoder during the process of controlling the motor to run according to the preset target parameters. The maximum deviation value can be the maximum value of the deviation between all recorded actual parameters and the preset target parameters. The preset redundancy can be an additional margin value added on the basis of the maximum deviation value. Specifically, the endoscope insertion section is positioned in an unobstructed straight line, ensuring the traction wire is secure and the motor is not jammed. After powering on the device, the main control unit enters parameter calibration mode. In this mode, the device does not perform endoscope bending operations, but only performs motor idling and signal acquisition. The main control unit controls the first motor to rotate forward and reverse multiple times according to a preset target number of steps. The encoder collects the actual number of rotations in real time for each step, calculates the deviation between the actual number of steps and the target number, and takes the maximum value among multiple tests as the maximum deviation value of the first motor's step count. Optionally, the same method is used to control the second motor to perform forward and reverse rotation tests according to the same target number of steps to obtain the maximum deviation value of the second motor's step count. Specifically, the larger of the two maximum deviation values ​​is taken as the maximum deviation value of the step count. Further, the first motor is controlled to run at different preset target speeds for preset times. The encoder collects the actual speed per unit time, calculates the deviation between the actual speed and the target speed for each time, and takes the maximum value among all speed range tests as the maximum deviation value of the first motor's speed. The same method is used to obtain the maximum deviation value of the second motor's speed. Specifically, the larger of the two maximum deviations in motor speed is taken as the maximum deviation value.

[0053] Furthermore, after obtaining the maximum deviation value of the number of steps and the maximum deviation value of the rotational speed, the main control unit calculates and determines the specific values ​​of each preset deviation threshold based on the maximum deviation value and the preset redundancy. Optionally, the calculation formula for the preset number of steps deviation threshold is: preset number of steps deviation threshold = maximum deviation value of the number of steps + preset redundancy; the calculation formula for the preset rotational speed deviation threshold is: preset rotational speed deviation threshold = maximum deviation value of the rotational speed + preset redundancy. Furthermore, after calibration, the main control unit stores the determined preset number of steps deviation threshold and preset rotational speed deviation threshold in the system.

[0054] In the above embodiments, through the parameter calibration step, the maximum deviation between the actual operation of the motor and the target parameters is measured under no-load conditions, and a preset deviation threshold is determined after adding a preset redundancy. This enables the fault judgment standard to adapt to different hardware operating conditions, avoiding false alarms or missed alarms due to individual differences in motors, transmission clearances, and other factors, significantly improving the versatility and accuracy of the fault detection method. At the same time, the detection accuracy can be maintained by recalibrating after replacing key components, reducing the debugging difficulty and engineering implementation cost.

[0055] S109: Based on the current fault type, perform differentiated fault handling on the endoscope according to the corresponding fault handling operation in the preset handling strategy.

[0056] In one specific embodiment, the preset processing strategy can be a set of rules for performing corresponding differentiated anomaly handling operations based on the determined current fault type. Specifically, when the current fault type of the endoscope is determined, the anomaly handling operation corresponding to the current fault type is found from the preset processing strategy, and then the endoscope is subjected to differentiated anomaly handling based on the corresponding anomaly handling operation.

[0057] Figure 5 This is a schematic flowchart illustrating differentiated anomaly handling for an endoscope according to an exemplary embodiment. In an optional embodiment, the differentiated anomaly handling for the endoscope based on the current fault type and according to the corresponding anomaly handling operation in a preset handling strategy includes: S501: If the current fault type is either the first fault type or the second fault type, disconnect the power supply to the first motor and the second motor in the endoscope. S503: When the current fault type is the third fault type, cut off the power supply to the first and second motors in the endoscope and control the motors to perform a micro-reverse operation; S505: If the current fault type is the fourth fault type, disconnect the power supply to the first and second motors in the endoscope and perform a voltage fine-tuning operation to attempt to restore motor operation; if the current fault type is still the fourth fault type after performing a preset number of voltage fine-tuning operations, maintain the shutdown state.

[0058] In one specific embodiment, the micro-reverse operation can be to control the motor to reverse in the opposite direction to the current bending direction by a preset number of steps, preferably 2 to 5 steps, and adjust according to the current step deviation, with a maximum of no more than 5 steps; the voltage fine-tuning operation can be to briefly increase the drive voltage if the device supports voltage regulation, preferably with an increase of no more than 2V. Specifically, when the current fault type is the first fault type (motor jamming) or the second fault type (traction wire breakage), the main control unit immediately cuts off the drive power of the first and second motors and stops the motor rotation; optionally, for motor jamming faults, emergency shutdown can prevent the motor from burning out the drive module and the motor itself due to continuous stalling, reducing equipment maintenance costs; for traction wire breakage faults, emergency shutdown can prevent the broken traction wire from getting tangled or pulling on the snake-bone structure of the insertion part due to the motor continuing to rotate, preventing the fault from further expanding; Specifically, when the current fault type is the third fault type (head end hitting the wall), the main control unit cuts off the dual motor drive power and additionally controls the corresponding motor to perform a micro-reverse operation; optionally, by micro-reversing the motor, the traction wire is slightly relaxed, causing the endoscope end to retract a small distance away from the human body wall, thereby relieving the squeezing pressure of the head end on the human body wall and effectively avoiding tissue damage caused by continuous pressure. Specifically, when the current fault type is the fourth fault type (motor stall), the main control unit, after cutting off the dual motor drive power supply, performs a voltage fine-tuning operation to attempt to restore the motor to normal operation. Optionally, after each voltage fine-tuning, the main control unit re-detects the motor's operating status to determine whether it is still in the fourth fault type. Optionally, if the motor returns to normal operation after one fine-tuning, the fault status is cleared and the equipment continues to operate normally. If the motor is still stalled after performing a preset number of voltage fine-tuning operations (preferably 3 times), it indicates that the fault is not caused by instantaneous voltage fluctuations, but may be a hardware fault such as motor aging or drive module damage. In this case, the main control unit remains in a stopped state, waiting for the operator to troubleshoot and repair.

[0059] In the above embodiments, a differentiated fault handling strategy is adopted to perform power cut-off, micro-reverse operation and voltage fine-tuning operation for four types of faults respectively, so as to achieve precise response to different faults: decisive shutdown protection for mechanical faults to avoid equipment damage; micro-reverse operation to release head pressure and prevent tissue damage for wall collision faults; and voltage recovery attempt for stall faults and maintain shutdown after multiple failures, taking into account automatic recovery opportunities and hardware protection, effectively improving operational safety and equipment availability.

[0060] In an optional embodiment, after performing differential anomaly processing on the endoscope, the method further includes: The system detects a reset operation signal, and upon detection, clears the current fault type, restores the normal motor control logic, and allows the endoscope to re-enter a workable state.

[0061] In one specific embodiment, the reset operation signal can be a level signal or a pulse signal instructing the main control unit to perform a fault reset operation. Specifically, after the differential anomaly handling is completed, the endoscope enters a fault shutdown state. The main control unit continuously monitors the reset operation signal, and upon detecting the signal, immediately executes the reset procedure: First, all fault flag bits are cleared, resetting the current fault type to normal; second, the normal motor control logic is restored, allowing the first and second motors to re-enter a controllable operating state, enabling the operator to normally manipulate the endoscope's bending operation via the joystick; simultaneously, the main control unit saves relevant parameters from the fault handling process (including fault type, fault occurrence time, target parameters and feedback parameters at the time of the fault, etc.) in its internal non-volatile memory for subsequent fault tracing and equipment maintenance. After the reset is completed, the endoscope re-enters normal operation, and the fault detection loop continues to execute, ensuring that new faults occurring during subsequent operation can be detected and handled promptly.

[0062] In the above embodiments, by setting a reset operation signal detection mechanism, the function of quickly restoring equipment operation after fault troubleshooting is realized. After the operator has troubleshooted and repaired the fault, they only need to press the reset button, and the main control unit will automatically clear the fault flag and restore the normal motor control logic without restarting the equipment or recalibrating the parameters, which significantly improves the convenience of operation and equipment availability; at the same time, the fault parameters are saved to the memory for easy fault tracing and equipment maintenance.

[0063] This invention provides an anomaly handling method applied to an endoscope with a dual-motor drive system. During the real-time coordinated rotation of the first and second motors in response to motor drive commands, the method simultaneously acquires the encoder feedback signals and load current signals corresponding to each motor. Based on the target control information carried in the motor drive commands and the encoder feedback signals, deviation calculations are performed to obtain step deviation, speed deviation, and current deviation. This achieves a refined quantitative characterization of the motor's operating state, laying the foundation for multi-dimensional fault determination. After comparing each deviation with a preset deviation threshold, the method obtains the deviation comparison results and the corresponding deviation duration. The current fault type is determined according to a preset fault determination logic, fundamentally solving the technical problem of existing technologies that rely on single signal detection, resulting in an inability to effectively distinguish core faults and a high false alarm rate. After determining the fault type, differentiated anomaly handling operations are executed according to a preset handling strategy. Emergency shutdown, micro-reverse pressure relief, and voltage fine-tuning recovery are implemented for different faults, forming a complete multi-layered safety protection mechanism to ensure the safety of bending operations and the reliability of equipment operation. Therefore, this invention improves the intelligence and comprehensiveness of endoscopic fault detection, fundamentally solving the technical problem that existing technologies cannot accurately distinguish and protect against four types of faults due to the lack of multi-dimensional parameter combination judgment and undifferentiated processing strategies. It achieves efficient synergy between detection accuracy and operational safety, significantly enhancing doctors' operational confidence and patients' surgical safety.

[0064] Figure 6 This is a schematic diagram of an exception handling device according to an exemplary embodiment. The following describes an embodiment of an exception handling device according to this application, specifically, as follows: Figure 6 As shown, the device includes: Information acquisition module 601 is used to acquire encoder feedback signals and load current signals corresponding to the first motor and the second motor respectively in response to motor drive commands; the motor drive signals carry target control information. The deviation calculation module 603 is used to perform deviation calculation based on the target control information, the encoder feedback signal and the load current signal to obtain the step deviation, speed deviation and current deviation corresponding to the first motor and the second motor respectively. The deviation comparison module 605 is used to compare the step number deviation, the rotation speed deviation, and the current deviation with their respective preset deviation thresholds to obtain a deviation comparison result; and to obtain the deviation duration corresponding to the deviation comparison result. The fault type determination module 607 is used to determine the current fault type of the endoscope based on the deviation comparison result and the deviation duration, according to a preset fault determination logic. The anomaly handling module 609 is used to perform differentiated anomaly handling on the endoscope based on the current fault type and according to the corresponding anomaly handling operation in the preset handling strategy.

[0065] In an optional embodiment, the current fault type includes a first fault type; the preset deviation threshold includes a preset step deviation threshold, a preset speed deviation threshold, and a preset current deviation threshold; the preset current deviation threshold includes a first current deviation threshold; the preset speed threshold includes a preset speed deviation threshold; the fault type determination module 607 includes: The threshold acquisition unit is used to acquire the deviation time threshold. The first type determination unit is used to determine the current fault type as a first fault type when the deviation duration is not less than the deviation time threshold and the deviation comparison result indicates that the step number deviation is not less than the preset step number deviation threshold, the speed deviation is not less than the preset speed deviation threshold, and the current deviation is not less than the first current deviation threshold.

[0066] In an optional embodiment, the current fault type further includes a second fault type; the preset current deviation threshold further includes a second current deviation threshold; the fault type determination module 607 further includes: The sensing signal acquisition unit is used to acquire the wall collision sensing signal; The second type determination unit is used to determine the current fault type as the second fault type when the wall-collision sensor signal indicates that the head end has not collided with the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step number deviation is not less than the preset step number deviation threshold, the rotation speed deviation is less than the preset rotation speed deviation threshold, and the current deviation is less than the second current deviation threshold.

[0067] In an optional embodiment, the current fault type further includes a third fault type; the preset speed threshold further includes a preset overload speed threshold; the fault type determination module 607 further includes: The joystick signal acquisition unit is used to acquire the joystick push signal; The third type determination unit is used to determine the current fault type as the third fault type when the joystick push signal is continuously monitored, the wall collision sensing signal indicates that the head end has collided with the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step number deviation is not less than the preset step number deviation threshold, the speed deviation is not less than the preset overload speed threshold, and the current deviation is not less than the first current deviation threshold.

[0068] In an optional embodiment, the current fault type further includes a fourth fault type; the preset speed threshold further includes a preset stall deviation threshold; the fault type determination module 607 further includes: The fourth type determination unit is used to determine the current fault type as the fourth fault type when the wall-collision sensor signal indicates that the head end has not collided with the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step number deviation is not less than the preset step number deviation threshold, the speed deviation is not less than the preset stall deviation threshold, and the current deviation is not less than the first current deviation threshold.

[0069] In an optional embodiment, the above-mentioned exception handling module 609 includes: The first processing unit is configured to cut off the power supply to the first motor and the second motor in the endoscope when the current fault type is the first fault type or the second fault type. The second processing unit is used to cut off the power supply to the first motor and the second motor in the endoscope when the current fault type is the third fault type, and to control the motor to perform a micro-reverse operation. The third processing unit is configured to, when the current fault type is the fourth fault type, cut off the power supply to the first motor and the second motor in the endoscope and perform a voltage fine-tuning operation to attempt to restore motor operation; if the current fault type is still the fourth fault type after performing a preset number of voltage fine-tuning operations, the shutdown state is maintained.

[0070] In an optional embodiment, the above-mentioned device further includes, prior to responding to a motor drive command: The parameter acquisition unit is used to control the first motor and the second motor to operate according to preset target parameters under no-load conditions; and to collect the actual parameters fed back by the encoder. A parameter deviation calculation unit is used to calculate the maximum deviation between the actual parameter and the preset target parameter; The threshold determination unit is used to determine the preset step number deviation threshold and the preset rotation speed deviation threshold in the preset deviation threshold based on the maximum deviation value and the preset redundancy amount.

[0071] In an optional embodiment, after differential anomaly handling of the endoscope, the device further includes a recovery unit for: The system detects a reset operation signal, and upon detection, clears the current fault type, restores the normal motor control logic, and allows the endoscope to re-enter a workable state.

[0072] In an optional embodiment, the information acquisition module 601 includes: The pressure information acquisition unit is used to acquire the current contact pressure and preset pressure threshold collected by the pressure sensor set at the end of the endoscope. The first collision acquisition unit is used to compare the current contact pressure with the preset pressure threshold to obtain the wall collision sensing signal.

[0073] In an optional embodiment, the information acquisition module 601 further includes: The bending angle acquisition unit is used to acquire the current bending angle and the target bending angle collected by the attitude sensor set in the endoscope insertion part; An angle deviation calculation unit is used to calculate the angle deviation based on the current bending angle and the target bending angle to obtain the bending angle deviation; The second collision acquisition unit is used to compare the bending angle deviation with a preset angle deviation threshold to obtain the wall collision sensing signal.

[0074] In an exemplary embodiment, an electronic device is also provided, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement an exception handling method as described in the embodiments of this disclosure.

[0075] In an exemplary embodiment, a computer-readable storage medium is also provided, which, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the exception handling method in the embodiments of this disclosure.

[0076] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the exception handling methods provided in the various optional implementations described above.

[0077] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0078] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the foregoing claims.

[0079] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims. The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. An anomaly handling method applied to an endoscope with a dual-motor drive system, characterized in that, The method includes: In response to a motor drive command, the encoder feedback signals and load current signals corresponding to the first motor and the second motor are acquired respectively; the motor drive signals carry target control information. Based on the target control information, the encoder feedback signal, and the load current signal, deviation calculation is performed to obtain the step number deviation, speed deviation, and current deviation corresponding to the first motor and the second motor respectively; The step count deviation, the rotation speed deviation, and the current deviation are compared with their respective preset deviation thresholds to obtain a deviation comparison result; and the deviation duration corresponding to the deviation comparison result is obtained. Based on the deviation comparison results and the deviation duration, the current fault type of the endoscope is determined according to the preset fault determination logic; Based on the current fault type, the endoscope is subjected to differentiated fault handling according to the corresponding fault handling operation in the preset handling strategy.

2. The method according to claim 1, characterized in that, The current fault type includes the first fault type; the preset deviation threshold includes a preset step number deviation threshold, a preset speed deviation threshold, and a preset current deviation threshold. The preset current deviation threshold includes a first current deviation threshold; the preset rotation speed threshold includes a preset rotation speed deviation threshold; determining the current fault type of the endoscope based on the deviation comparison result and the deviation duration, according to a preset fault determination logic, includes: Obtain the deviation time threshold; If the duration of the deviation is not less than the deviation time threshold, and the deviation comparison result indicates that the step deviation is not less than the preset step deviation threshold, the speed deviation is not less than the preset speed deviation threshold, and the current deviation is not less than the first current deviation threshold, then the current fault type is determined to be the first fault type.

3. The method according to claim 2, characterized in that, The current fault type also includes a second fault type; the preset current deviation threshold also includes a second current deviation threshold; determining the current fault type of the endoscope based on the deviation comparison result and the deviation duration, according to the preset fault determination logic, further includes: Acquire the wall-collision sensor signal; If the wall-collision sensor head does not collide with the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step number deviation is not less than the preset step number deviation threshold, the speed deviation is less than the preset speed deviation threshold, and the current deviation is less than the second current deviation threshold, then the current fault type is determined to be the second fault type.

4. The method according to claim 3, characterized in that, The current fault type also includes a third fault type; the preset speed threshold also includes a preset overload speed threshold; determining the current fault type of the endoscope based on the deviation comparison result and the deviation duration, according to the preset fault determination logic, further includes: Obtain the joystick push signal; If the joystick push signal is continuously monitored, the wall collision sensor signal indicates that the head end has collided with the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step number deviation is not less than the preset step number deviation threshold, the speed deviation is not less than the preset overload speed threshold, and the current deviation is not less than the first current deviation threshold, then the current fault type is determined to be the third fault type.

5. The method according to claim 3, characterized in that, The acquisition of the collision sensing signal includes: Obtain the current contact pressure and preset pressure threshold collected by the pressure sensor set at the end of the endoscope; The current contact pressure is compared with the preset pressure threshold to obtain the wall-collision sensing signal.

6. The method according to claim 3, characterized in that, The acquisition of the collision sensing signal includes: Acquire the current bending angle and target bending angle from the attitude sensor located at the endoscope insertion site; Based on the current bending angle and the target bending angle, the angle deviation is calculated to obtain the bending angle deviation; The bending angle deviation is compared with a preset angle deviation threshold to obtain the wall-collision sensing signal.

7. The method according to claim 4, characterized in that, The current fault type also includes a fourth fault type; the preset rotational speed threshold also includes a preset stall deviation threshold; determining the current fault type of the endoscope based on the deviation comparison result and the deviation duration, according to the preset fault determination logic, also includes: If the wall-collision sensor indicator head does not collide with the wall, the deviation duration is not less than the deviation time threshold, and the deviation comparison result indicates that the step number deviation is not less than the preset step number deviation threshold, the speed deviation is not less than the preset stall deviation threshold, and the current deviation is not less than the first current deviation threshold, then the current fault type is determined to be the fourth fault type.

8. The method according to claim 7, characterized in that, The step of performing differentiated anomaly handling on the endoscope based on the current fault type and according to the corresponding anomaly handling operation in the preset handling strategy includes: If the current fault type is the first fault type or the second fault type, disconnect the power supply to the first motor and the second motor in the endoscope; If the current fault type is the third fault type, the power supply to the first motor and the second motor in the endoscope is cut off, and the motors are controlled to perform a micro-reverse operation. If the current fault type is the fourth fault type, the power supply to the first motor and the second motor in the endoscope is cut off, and a voltage fine-tuning operation is performed to attempt to restore motor operation; if the current fault type is still the fourth fault type after performing a preset number of voltage fine-tuning operations, the shutdown state is maintained.

9. The method according to claim 1, characterized in that, Prior to responding to a motor drive command, the method further includes: The system controls the first and second motors to operate under no-load conditions according to preset target parameters, and collects the actual parameters fed back by the encoder. Calculate the maximum deviation between the actual parameter and the preset target parameter; Based on the maximum deviation value and the preset redundancy, the preset step number deviation threshold and the preset speed deviation threshold are determined in the preset deviation threshold.

10. The method according to claim 1, characterized in that, After performing differential anomaly processing on the endoscope, the method further includes: The system detects a reset operation signal, and upon detection, clears the current fault type, restores the normal motor control logic, and allows the endoscope to re-enter a workable state.

11. An anomaly handling device, applied to an endoscope with a dual-motor drive system, characterized in that, The device includes: The information acquisition module is used to acquire the encoder feedback signals and load current signals corresponding to the first motor and the second motor in response to the motor drive command; the motor drive signal carries target control information. The deviation calculation module is used to perform deviation calculation based on the target control information, the encoder feedback signal and the load current signal to obtain the step deviation, speed deviation and current deviation of the first motor and the second motor respectively. The deviation comparison module is used to compare the step deviation, the rotation speed deviation, and the current deviation with their respective preset deviation thresholds to obtain a deviation comparison result; and to obtain the deviation duration corresponding to the deviation comparison result. The fault type determination module is used to determine the current fault type of the endoscope based on the deviation comparison result and the deviation duration, according to a preset fault judgment logic. The anomaly handling module is used to perform differentiated anomaly handling on the endoscope based on the current fault type and according to the corresponding anomaly handling operation in the preset handling strategy.