A method for controlling a hot plug process of a communication device connector
Patent Information
- Application Number
- CN202511503129.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2045-10-21
AI Technical Summary
[0005]本发明提供一种通讯设备连接器的热插拔过程控制方法,其主要目的在于解决现有工业智能网关将任何物理连接瞬断都直接判读为通信崩溃,从而缺乏一种能够主动维持上层逻辑连续性以适应瞬时物理扰动的问题
[0022] 1. When an industrial smart gateway detects that the physical layer link status of any of its ports changes from connected to disconnected, it does not directly pass this interruption event up to the protocol stack. Instead, it immediately starts a logical maintenance timer inside the gateway and actively takes over the external communication responses of that port within a limited time period during which the gateway is active. Specifically, when the gateway receives data or status queries for the connected device during this period, it responds based on the last valid data cached before the link was disconnected or a preset non-fatal communication status. This maintains a logical appearance for the upper-layer application that the device on that port is still online. This process separates the logical communication stability of the industrial network from the instantaneous state of the physical connection, avoiding protocol layer crashes and upper-layer application downtime caused by brief physical contact failures or field hot-plug operations that last much longer than the physical interruption itself.
Smart Images

Figure CN121077937B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for controlling the hot-plugging process of a connector in a communication device, belonging to the field of communication technology for industrial intelligent gateways. Background Technology
[0002] Currently, in industrial automation systems, to ensure real-time state synchronization, a common design of industrial smart gateways is to directly and quickly report the disconnection of the physical layer link of the communication port to the protocol stack to trigger device communication interruption processing. This design works reliably in applications with fixed device connections, but in dynamic operating environments where devices need to be frequently replaced or maintained online, or where cable contact is likely to occur, the aforementioned working method will cause problems. Even a physical connection interruption lasting only a few seconds will be treated by the gateway as a definite communication failure, thereby triggering a long reconnection at the protocol layer and topology reconstruction of the upper-layer application, causing the system to pay an excessively long recovery cost for a brief physical disturbance.
[0003] Analyzing existing technologies, their main shortcomings in dealing with such transient physical disturbances are as follows: 1. Their judgment logic usually lacks the ability to distinguish between time dimensions, making it impossible to differentiate between transient disturbances and persistent faults, resulting in a single response strategy; 2. During physical connection interruptions, the gateway itself lacks a corresponding mechanism to maintain the logical connection state upon which the upper-layer protocols depend, causing the protocol stack to directly bear the uncertainty of the physical layer; 3. Existing improvement methods, such as strengthening the physical connection or setting fault tolerance at the application layer, are ineffective in handling planned plugging and unplugging operations, and cannot prevent the occurrence of underlying protocol interruptions, thus failing to fundamentally solve the problem.
[0004] For example, Chinese invention patent CN116014699A discloses a hot-swap control circuit and method. This solution, through the cooperation of a hot-swap pre-start unit and a power switch unit, controls the surge current when a plug-in board is powered on. Essentially, it's a refined hardware power-on timing management system designed to ensure electrical safety. However, this method doesn't provide any effective logical maintenance or buffering mechanism for momentary connection interruptions caused by vibration or accidental contact after the board has successfully powered on and is running. This physical disturbance is still directly transmitted to the upper-layer protocol, leading to the aforementioned communication crash problem, failing to achieve immunity to physical layer transient disturbances. Therefore, how to establish a new control mechanism within an industrial intelligent gateway, enabling it to proactively maintain the port's logical connection state at the protocol layer when a momentary physical connection interruption is detected, and preventing the momentary interruption from escalating into a system-level communication failure, becomes the technical problem this invention aims to solve. Summary of the Invention
[0005] This invention provides a method for controlling the hot-plugging process of a communication device connector. Its main purpose is to solve the problem that existing industrial smart gateways directly interpret any momentary physical connection interruption as a communication failure, thus lacking a method that can actively maintain the continuity of upper-layer logic to adapt to momentary physical disturbances.
[0006] To achieve the above objectives, the present invention provides a method for controlling the hot-plugging process of a communication device connector, executed by a device acting as an industrial intelligent gateway, the method comprising:
[0007] Step a: Monitor the link status register of the physical layer chip at the corresponding port of the communication device connector;
[0008] Step b: When the value of the link state register changes from a state indicating connection to a state indicating disconnection, this is used as the trigger for a physical layer link disconnection event.
[0009] Step c: In response to the physical layer link disconnection event, execute the following adaptive timing setting rules: query the pre-configured device profile information associated with the port, and determine the timer duration corresponding to this logical maintenance process based on the timeliness critical level defined in the device profile information;
[0010] Step d: Based on the determined timer duration, start the logical maintenance timer, and during the period when the logical maintenance timer is activated, execute the following coordinated protocol layer maintenance rules: When a data query for a port is received, return the last valid data value cached by the port before the physical layer link disconnection event and a status bit indicating that the data is stale; When a status query for a port is received, return a preset non-fatal communication status.
[0011] Step e: During the activation period of the logical sustain timer, execute the following mutually exclusive state transition rules: Step e1: If the value of the link state register is detected to return to the state representing the connection, terminate the protocol layer sustain rule and restore normal communication of the port; at the same time, record the event of successfully executing the protocol layer sustain rule and restoring normal communication; Step e2: If the value of the link state register is not detected to return to the state representing the connection until the logical sustain timer expires, terminate the protocol layer sustain rule and report a device communication interruption alarm to the upper layer application.
[0012] Preferably, the step of determining the timer duration corresponding to this logic maintenance process is as follows: the timeliness critical level includes at least two levels; if the timeliness critical level is a level that represents high real-time requirements, then a timer duration shorter than the first preset duration is determined; if the timeliness critical level is a level that represents high fault tolerance requirements, then a timer duration longer than the second preset duration is determined, and the second preset duration is longer than the first preset duration.
[0013] Preferably, the method further includes the following physical layer connection health status diagnosis steps: step f, counting the recorded events of successfully executing protocol layer maintenance rules and restoring normal communication to obtain a successful recovery event count within a preset time period; step g, when the recovery event count reaches a preset event quantity threshold within the preset time period, generating a predictive maintenance alarm characterizing the physical layer connection instability of the port.
[0014] Preferably, the physical layer connection health status diagnosis step further includes: calculating a quantitative characterization index representing the instability of the physical layer connection before performing the judgment in step g. Quantitative characterization indicators The calculation rules are as follows: ,in, To restore the event count; The preset time period will be used to quantify the performance indicators. With a preset alarm trigger threshold Compare; if and only if Greater than Only then will the method execute the judgment based on the event quantity threshold in step g.
[0015] Preferably, the method further includes the following diagnostic model adaptive adjustment step: obtaining real-time operating condition information related to the device connected to the port from the industrial network; based on the real-time operating condition information, selecting an event number threshold that matches the real-time operating condition information from multiple preset event number thresholds for performing the judgment in step g; specifically, when the real-time operating condition information indicates that the device is in a preset high vibration operating condition type, selecting a higher event number threshold; when the real-time operating condition information indicates that the device is in a preset standby operating condition type, selecting a lower event number threshold.
[0016] Preferably, the method further includes the following collaborative diagnosis and root cause tracing steps: When generating a predictive maintenance alarm in step g, a preset collaborative diagnosis time window is initiated centered on the time of occurrence of this alarm event; the time series of events recorded on different ports of the industrial intelligent gateway that successfully execute protocol layer maintenance rules and restore normal communication are analyzed within the collaborative diagnosis time window; based on the analysis results of the time series, it is determined whether there is a time correlation between the events of different ports and the events of the ports; if the time correlation exists, the predictive maintenance alarm includes indication information indicating that the root cause of the fault is an abnormal shared resource; if the time correlation does not exist, the predictive maintenance alarm includes indication information indicating that the root cause of the fault is an abnormal port connection.
[0017] Preferably, in step d, when a status query for the port is received, the step of returning a preset non-fatal communication status is to return a preset communication status code that indicates online silence.
[0018] Preferably, the step of returning the last valid data value and the state bit representing the data as stale is specifically a non-zero preset state value for the state bit representing the data as stale.
[0019] Preferably, the operation of the link status register of the physical layer chip corresponding to the port of the communication device connector is continuously executed at a frequency higher than that of the protocol polling of the port by the upper layer application.
[0020] Preferably, step c, which involves querying the pre-configured device profile information associated with the port, specifically involves querying the preset timeliness critical level associated with the device connected to the port, stored internally by the industrial intelligent gateway, based on the port's identifier.
[0021] Compared with the prior art, the beneficial effects of the present invention are:
[0022] 1. When an industrial smart gateway detects that the physical layer link status of any of its ports changes from connected to disconnected, it does not directly pass this interruption event up to the protocol stack. Instead, it immediately starts a logical maintenance timer inside the gateway and actively takes over the external communication responses of that port within a limited time period during which the gateway is active. Specifically, when the gateway receives data or status queries for the connected device during this period, it responds based on the last valid data cached before the link was disconnected or a preset non-fatal communication status. This maintains a logical appearance for the upper-layer application that the device on that port is still online. This process separates the logical communication stability of the industrial network from the instantaneous state of the physical connection, avoiding protocol layer crashes and upper-layer application downtime caused by brief physical contact failures or field hot-plug operations that last much longer than the physical interruption itself.
[0023] 2. This method further introduces a differentiated response mechanism based on device profile information. Before the aforementioned logical sustain timer is triggered by a physical layer link disconnection event, the gateway first queries the internally configured profile information related to the device connected to the port based on the port's identifier. Then, based on the timeliness criticality level defined by this information, it determines the specific duration of the logical sustain timer. For example, for a port connected to a high-speed motion controller, the gateway uses an extremely short timer duration to quickly confirm the actual communication failure; while for a port connected to a non-critical environmental monitoring sensor, a longer timer duration is used to tolerate longer connection jitter. By combining static, a priori device knowledge with dynamic, real-time link interruption event handling, the gateway's communication protection strategy can adapt to the heterogeneous needs of different devices in the network. Within the same system, it simultaneously provides different types of devices with fault judgment timeliness and connection robustness that match their engineering realities.
[0024] 3. This method also transforms each successful logical maintenance process into a basis for diagnosing the health status of the physical connection. The gateway counts the events on each port that successfully restore normal communication after the logical maintenance timer is activated and before the timer expires. When the cumulative count of such events on a certain port reaches a preset threshold within a preset time period, the gateway will not generate a regular communication interruption alarm, but will generate a new predictive maintenance alarm that characterizes the instability of the physical layer connection of that port. This method analyzes the frequency of internal actions performed by the system to maintain communication stability, providing an objective data source for judging the deterioration trend of physical components such as connectors and cables without relying on any external sensors. This enables the system to provide early warning of potential physical connection problems before a real and continuous communication interruption occurs. Attached Figure Description
[0025] Fig. 1 This is a flowchart illustrating the adaptive control method for hot-plugging process of the present invention.
[0026] Fig. 2 This is a schematic diagram of the quantitative diagnostic model for the health status of the physical layer connection in this invention;
[0027] Fig. 3 This is a system application architecture diagram for implementing hot-swap control in the industrial intelligent gateway of this invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the scope of protection of the invention.
[0029] The hot-plugging process control method for a communication device connector claimed in this invention is executed by a device acting as an industrial intelligent gateway. This industrial intelligent gateway is equipped with a processor and memory, and runs firmware to implement the method. Its overall operation includes real-time monitoring of the port's physical layer link status, immediate capture and response to link disconnection events, adaptive timing settings based on device profile information, execution of protocol layer maintenance rules, and mutually exclusive state transition rules. In some embodiments, the method also integrates physical layer connection health status diagnosis, adaptive adjustment of the diagnostic model, and collaborative diagnosis and root cause analysis, collectively constituting a control method for ensuring the logical continuity of industrial networks. In industrial automated production environments... As a data node connecting upper-layer controllers and field terminal devices, the communication continuity of the industrial intelligent gateway directly impacts the production process. However, field maintenance operations often lead to brief physical connection interruptions. To address this, steps a and b of this invention are configured to execute a high-frequency physical layer connection status detection procedure. Specifically, the underlying driver of the industrial intelligent gateway is set to continuously read the link status registers inside the physical layer chip corresponding to each communication port it manages at a frequency higher than the upper-layer application protocol polling frequency, i.e., an interval of 10 milliseconds. When the upper-layer application's protocol polling cycle is 100 milliseconds, this detection procedure can complete approximately 10 physical status reads between two protocol queries. Once a connection is detected at a certain end... The value of the link status register changes from a connected state to a disconnected state, and the system uses this as the trigger for a physical layer link disconnection event. This procedure captures the initial disturbance of the physical layer before the protocol stack responds, providing input conditions for the subsequent logic buffering mechanism to start. Given the different real-time requirements of different devices in industrial networks, a uniform fault judgment timing is not optimal in some scenarios. Therefore, step c of this invention introduces an adaptive timing setting rule based on device profile information. A device profile information table is pre-configured in the non-volatile memory of the industrial intelligent gateway. This table is a data structure that includes at least port identifier, associated device type, and timeliness critical level. The device associated with port 1 is a servo driver, whose timeliness critical level is configured to represent a high real-time requirement, while the device associated with port 2 is an ambient temperature sensor, whose timeliness critical level is configured to represent a high fault tolerance requirement. When a physical layer link disconnection event is detected in step b, the control method queries the device profile information table based on the port identifier that triggered the event. If the event occurs on port 1, the system determines a timer duration shorter than the first preset duration, set to 500 milliseconds, based on its high real-time requirement level. If the event occurs on port 2, the system determines a timer duration longer than the second preset duration, set to 5 seconds, based on its high fault tolerance requirement level. The second preset duration is longer than the first preset duration.This approach combines static device configuration information with dynamic link interruption event handling, enabling the fault response strategy of industrial intelligent gateways to adapt to the needs of heterogeneous devices in the network.
[0030] For the timeliness critical level defined in different device profile information, the specific value of the corresponding logic hold timer duration is determined according to a standardized engineering calibration procedure. This procedure first obtains two key objective time constraint parameters: the communication watchdog timeout duration limited by the device's own firmware. Minimum data validity period required by the upper-level application process The smaller of the two values is then defined as the basic time constraint for this calibration. Based on this, the final logic sustain timer duration is calculated. ,in For a preset safety factor ranging from 0.5 to 0.8, this procedure directly links the timer duration setting to the inherent technical specifications of the connected device and the requirements of its actual application scenario. To prevent transient disturbances at the physical layer from being transmitted to the protocol layer, step d of this invention, after determining the timer duration in step c, initiates a set of coordinated protocol layer maintenance rules. These rules are executed by the protocol stack proxy module of the industrial intelligent gateway during the timer's activation period. When this module receives a data query request from the upper-layer network for a device connected to a disconnected port, it prevents the query from being transmitted to the lower layer. The module directly accesses the last valid data value cached during normal communication before the physical layer link disconnection event occurs on the port, and appends a status bit indicating that the data is stale, i.e., a non-zero preset status value of 1. Both are packaged together and returned to the upper-layer application. At the same time, if the received data is a status query for the device, the module returns a preset non-fatal communication status code, i.e., a communication status indicating online silence, rather than a fatal status such as communication interruption or device loss. This procedure maintains the state of the device still online for the upper-layer application by constructing a temporary logical connection appearance inside the gateway.
[0031] During the activation of the logical sustain timer, the final outcome of the system depends on whether the physical connection is restored. Therefore, step e of this invention designs a set of mutually exclusive state transition rules. During the timer activation period, the underlying driver of the industrial intelligent gateway continues to monitor the port's link status register at the high frequency set in step a. If, before the timer expires, in the second second of the set 5-second duration, the register value is detected to have returned to the state representing a connection, the system executes rule e1, immediately terminating the aforementioned protocol layer sustain rule and restoring the normal communication flow of the port, allowing upper-layer queries to be normally transmitted to the physical device. Simultaneously, an event of successfully executing the protocol layer sustain rule and restoring normal communication is recorded in the system log. Conversely, if the link is not detected to have recovered by the timer expires, the system executes rule e2, determining this as a persistent communication failure. In this case, the system will also terminate the protocol layer sustain rule, but the subsequent action is to report a standard device communication interruption alarm to the upper-layer application. This set of rules ensures that the system can handle... Even transient disturbances can trigger a timely and definite response when a fault occurs. It should be noted that while protocol layer maintenance rules can effectively handle single disturbances, frequent transient interruptions are often a sign of physical connection component degradation or loosening. To monitor this degradation trend, this invention further provides a physical layer connection health status diagnostic step. The industrial intelligent gateway maintains a counter in memory for each port to record successful recovery events (i.e., recovery event count) and a timestamp for time window calculation. Whenever a successful recovery event occurs in step e1, the counter for the corresponding port is incremented. A diagnostic task within the system periodically checks, or triggers a check after each count update, to determine whether the recovery event count has reached a preset event quantity threshold (i.e., 10 times) within a preset time period (i.e., 1 hour). If so, the system generates a predictive maintenance alarm indicating unstable physical layer connection for that port. This procedure transforms the frequency of internal actions performed by the system to maintain stability into a diagnostic basis for the physical connection health status.
[0032] Regarding the event quantity threshold and alarm trigger threshold mentioned in the physical layer connection health status diagnosis function. The setting is not a fixed empirical value, but is generated through a baseline data modeling procedure oriented towards specific operating conditions. Specifically, this procedure requires that, in the initial stage of equipment deployment, the equipment be tested under each preset, representative, and stable operating condition. The system continuously runs for a complete statistical cycle, collecting time series of successful recovery events during this period, and then analyzes each operating condition. For each dataset, the mean frequency of recovery events is calculated independently. with standard deviation Based on this, the alarm trigger threshold for this operating condition is set as follows: ,in This is an adjustment coefficient characterizing alarm sensitivity, typically with an engineering value between 3 and 6. This procedure ensures that the diagnostic model's judgment benchmark matches the normal connection jitter level of the device under different physical operating environments. To improve the accuracy of the aforementioned diagnostic model, in some implementations, a quantitative characterization index is introduced. Pre-judgment is performed, and its calculation rule is as follows: ;in, To restore the event count, For a preset time period; in a specific scenario, if the port is in Recorded within a time period of seconds The calculation is performed on the first successful recovery event. times / second; the system will first... The value is related to a preset alarm trigger threshold. ,Right now Comparisons are made using times per second, if and only if the calculated... Greater than Only when the number of events reaches a threshold will the system continue to execute the aforementioned judgment, that is, whether 15 times is greater than the preset 10 times; this judgment method makes the diagnostic logic prioritize responding to connection instability events that occur in a concentrated period of time.
[0033] Furthermore, considering that the operating conditions of the equipment can affect the stability of the physical connection, to avoid false alarms, the present invention also provides a diagnostic model adaptive adjustment step; the industrial intelligent gateway obtains real-time operating condition information related to the equipment connected to the port by parsing the industrial protocol messages flowing through it, and parses parameters representing the current operating frequency or output power from the messages sent by the PLC to a frequency converter; the gateway has a preset configuration table containing multiple sets of diagnostic thresholds, which maps different operating condition types to different event number thresholds. When the parsed operating condition information indicates that the equipment is in a high vibration condition, the diagnostic logic automatically selects a higher event number threshold, such as 20 times / hour; while when the operating condition information indicates that the equipment is in a standby condition, it automatically switches to a lower event number threshold, such as 5 times / hour; this procedure dynamically associates the judgment baseline of the diagnostic model with the real-time operating status of the equipment, improving the accuracy of predictive maintenance alarms; finally, when predicting When a predictive maintenance alarm is triggered, to assist maintenance personnel in locating the root cause of the fault, this invention also provides a collaborative diagnosis and root cause tracing step. When a port, namely port X, generates a predictive maintenance alarm, the system initiates a preset collaborative diagnosis time window centered on the time of occurrence of this alarm event, i.e., 30 seconds before and after the alarm time. The system then analyzes the time sequence of successful recovery events of all ports recorded on the industrial intelligent gateway within this time window. Based on the analysis of this time sequence, it determines whether there is a time synchronization phenomenon between the events of other ports and the events of port X. If there is a strong time correlation, i.e., if ports Y and Z, which share the same power module as port X, also have dense recovery events at similar time points, the system will include an indication message in the generated predictive maintenance alarm indicating that the root cause of the fault is an abnormality of the shared resource. Conversely, if other ports remain silent, the alarm message will include an indication message indicating that the root cause of the fault is an abnormality of the port's own connection.
[0034] Example 1: In an automated automotive body welding workstation application, a six-axis robot performs spot welding on car doors. The robot's movement is controlled by a high-performance servo drive, and its end effector welding clamp integrates a photoelectric sensor for detecting workpiece positioning. Both the servo drive and the photoelectric sensor are connected to corresponding ports of an industrial intelligent gateway (as described in this embodiment of the invention) via independent communication cables. Port 1, connected to the servo drive, is configured in the gateway's device profile information to represent a high real-time performance requirement, while port 2, connected to the photoelectric sensor, is configured to represent a high fault tolerance requirement. During continuous operation of the workstation, a maintenance worker needs to replace the photoelectric sensor online without interrupting production due to intermittent malfunctions. When the worker approaches the robot to disconnect the photoelectric sensor's communication connector, their arm touches the communication cable connecting the servo drive to port 1, causing a momentary physical connection interruption of approximately 200 milliseconds. The method deployed on the industrial intelligent gateway involves a high-frequency physical layer link status monitoring procedure that captures the change in the link status register value of port 1 from connected to disconnected, thereby triggering a physical layer link disconnection event. In response to this event, the method queries the device profile information, identifies the timeliness critical level of port 1 as a level representing high real-time requirements, and determines the timer duration corresponding to this logic maintenance process to be 500 milliseconds. During the period when this logic maintenance timer is activated, the upstream programmable logic controller sends a status query for the servo drive, and the gateway's protocol layer maintenance rule responds to the query, returning a preset non-fatal communication status. 200 milliseconds after the timer is activated, the physical connection of port 1 is restored, the gateway detects that the value of the link status register has returned to the connected state, and then terminates the protocol layer maintenance rule and restores normal communication on the port. For the upstream programmable logic controller, the entire process manifests as a response delay to a control command, and the robot's welding action remains continuous throughout, without triggering a shutdown procedure.
[0035] Subsequently, the maintenance personnel disconnected the communication device connector connected to the photoelectric sensor on port 2 as planned and replaced it with a new sensor. At this time, the gateway detected a physical layer link disconnection event on port 2. Unlike the previous process, this time, after querying the device profile information, the system determined a 5-second logic sustain timer based on the high fault tolerance requirement level of port 2. During the active period of this timer, the programmable logic controller performed two data queries on the photoelectric sensor, and the gateway's protocol layer sustain rules responded to both, returning the last valid data value cached on the port before the physical layer link disconnection event and a status bit indicating that the data was stale. The maintenance personnel completed the installation of the new sensor and connected the communication cable approximately 3 seconds later, and the gateway detected the end... When the 2-link was restored, the logical maintenance process was terminated and normal communication was restored. The upper-layer application logic did not classify the sensor as offline, thus avoiding workstation topology reconstruction and process interruption caused by a planned maintenance operation. After the two consecutive physical disturbance events of different natures were handled, the workstation's production process was not affected. The industrial intelligent gateway's control method, through the synergy of high-frequency monitoring and equipment profile information, provided differentiated logical connection maintenance windows for equipment with different timeliness requirements. At the same time, by transforming the physical layer link loss event into a trigger signal to activate the internal buffer mechanism, instead of directly reporting it as a communication failure, the uncertainty of the physical connection was transformed into an instantaneous state that could be managed within the system.
[0036] Example 2: To objectively verify the technical effectiveness of the method of the present invention in dealing with transient disturbances at the physical layer, this example designed and executed a comparative experiment. The purpose was to quantitatively compare the duration of upper-layer application system-level service interruption caused by an industrial intelligent gateway using the method of the present invention and a conventional industrial intelligent gateway using existing technology when faced with the same physical connection interruption. The test platform consisted of a programmable logic controller (PLC) as the upper-layer application, a signal generator, a high-speed relay module controlled by the signal generator, and two sets of gateway systems under test. Except for the gateway firmware, the hardware configuration and network topology of the two systems were identical. The gateway serving as the control group ran standard firmware that directly reported physical layer disconnection events to the protocol stack, while the gateway serving as the sample group of the present invention ran the firmware disclosed in the aforementioned specific embodiments, which integrates logic maintenance and adaptive timing functions. In the experiment, the high-speed relay module was connected in series between the gateway and a remote I / O module. In the communication cable, a physical layer link disconnection event with precisely controllable duration is generated; the upper-layer programmable logic controller is programmed to poll the remote I / O module at a period of 100ms and record any communication timeout events and the total system-level service interruption duration from the first timeout to the resumption of normal communication; in the configuration of the sample group of this invention, the device profile information of the port connected to the remote I / O module is set to a level representing medium real-time requirements, and the corresponding logic hold timer duration is set to 3000ms; the test process is as follows: under the test environment of the control group and the sample group of this invention, the high-speed relay module is controlled by the signal generator to generate four sets of physical layer link disconnection events with durations of 500ms, 1000ms, 2000ms and 4000ms in sequence. Each set of events is repeated 10 times, the communication status and service interruption duration of the upper-layer programmable logic controller are recorded, and the average value is calculated. The test results are shown in Table 1.
[0037] Table 1: Comparison of system response data for two groups of gateways under different physical disconnection durations.
[0038]
[0039] According to the data shown in Table 1, for the control group, physical disconnections of 500ms or longer caused the upper-layer programmable logic controller (PLC) to report a communication interruption and trigger protocol layer reconnection, resulting in a system-level service interruption duration of more than 35 seconds. For the sample group of this invention, when the physical disconnection duration was 500ms, 1000ms, and 2000ms, since this duration did not exceed the internally set 3000ms logic sustain timer duration, its protocol layer sustaining rule was activated, the upper-layer PLC did not report a communication interruption, and the system-level service interruption duration was 0. When the physical disconnection duration was... When the timer duration was increased to 4000ms, exceeding the preset timer duration, the sample group of this invention performed the same as the control group, reporting a communication interruption to the upper layer. This result indicates that this method retains the ability to respond to persistent faults while suppressing the impact of transient disturbances. Experimental data confirms that the industrial intelligent gateway using the method of this invention can suppress the impact of transient physical layer disturbances on upper layer applications within a preset duration without affecting the determination of persistent faults, reducing the communication service interruption time caused by transient physical connection jitter or hot-plugging operations from more than 35 seconds to 0.
[0040] Example 3: This example combines Figs. 1 to 3 A description of a hot-plugging process control method for a communication device connector, such as... Fig. 1 As shown, the process begins with high-frequency monitoring of the physical layer link status of the corresponding port of the communication device connector to determine if the link is disconnected. If not disconnected, monitoring continues. If a link disconnection is detected, this is used as the trigger for a physical layer link disconnection event, and pre-configured device profile information is immediately queried. Based on the timeliness criticality level defined by this information, the timer duration corresponding to this logical maintenance process is adaptively determined. For example, a shorter duration is set for devices with high real-time requirements, and a longer duration is set for devices with high fault tolerance requirements. Subsequently, during the period when the timer is active, cooperative protocol layer maintenance rules are executed. When an external query is received, the last valid data value cached by the port before the link disconnection or a preset non-fatal signal is returned. During the timer's active period, the system continuously checks whether the link recovers before the timer expires. If the link recovers successfully, the protocol layer maintenance rule is immediately terminated and normal communication on the port is restored, so that the upper-layer application is unaware of this momentary interruption. At the same time, the successful recovery event is recorded for subsequent physical layer connection health status diagnosis. In this diagnosis step, the successful recovery events within a cycle are statistically counted. When the count value reaches a preset threshold, a predictive maintenance alarm indicating that the physical layer connection of the port is unstable is generated. Conversely, if the link does not recover until the logical maintenance timer expires, the protocol layer maintenance rule is terminated and a device communication interruption alarm is reported to the upper-layer application to confirm that the event is a continuous communication failure.
[0041] like Fig. 2 As shown, the vertical axis represents the quantitative characterization index of physical layer connection instability. The value is expressed in times per second, and the horizontal axis represents a continuous time window divided into hours. The graph contains three curves, which are used to represent the values of port A. Value, port B Values and system preset alarm thresholds As shown in the figure, the physical layer connection instability quantification index between port A and port B is... All show dynamic fluctuations over time, but within multiple time windows ranging from 8-10h to 18-20h, port A's The value remains higher than the preset alarm threshold. This will trigger the system to generate a predictive maintenance alarm for port A, while for port B... The value remained below the alarm threshold throughout the entire monitoring period. Therefore, no alarm is triggered. The figure intuitively illustrates how the present invention achieves differentiated and predictive online diagnosis of the health status of different port connections by comparing quantitative indicators with thresholds.
[0042] like Fig. 3 As shown, the architecture is divided into a field device layer, an industrial intelligent gateway layer, and a host control and monitoring layer from bottom to top. The field device layer includes various terminal devices that connect to the system through physical connection ports, such as servo drives with high real-time requirements, photoelectric sensors with high fault tolerance requirements, and remote I / O modules with medium real-time requirements, as shown in the figure. The industrial intelligent gateway layer, as the core control method execution body, integrates core functional modules such as high-frequency monitoring of physical links, adaptive timing based on device profiles, protocol layer logic maintenance, and connection health status diagnosis. The gateway interacts with the field device layer through physical connection ports 1 to N and opens communication interfaces to the upper layer. The host control and monitoring layer includes a programmable logic controller (PLC) for performing routine data and status queries and an operation and maintenance monitoring center for receiving and displaying predictive maintenance alarms. Under this architecture, the industrial intelligent gateway manages the physical connections of devices below and maintains the logical continuity of communication above, thereby ensuring the reliability and high availability of the entire industrial communication link without changing the existing host computer program and field devices.
[0043] Example 4: This example provides a systematic engineering calibration procedure for the logic sustain timer duration, and the event quantity threshold and time window threshold in the physical layer connection health status diagnosis step; in a newly built automated assembly unit, an industrial intelligent gateway using the method of this invention needs to connect to a high-speed visual inspection camera that is sensitive to communication latency and whose internal communication watchdog timeout is set to 800ms, and a conventional frequency converter installed on a conveyor frame subject to periodic vibration and requiring high communication stability; during the on-site deployment and commissioning of the gateway, in order to ensure that its hot-swap control and predictive maintenance functions achieve performance adapted to this specific application scenario, the aforementioned key parameters need to be calibrated; for the purposes of... The calibration process for the logic hold timer duration of the port connected to the high-speed vision inspection camera is as follows: First, obtain the camera's technical specifications and determine its internal communication watchdog timeout duration to be 800ms. Simultaneously, obtain the program scan cycle of the host computer's programmable logic controller (PLC) to be 20ms. The calibration principle is that the logic hold timer duration should be less than the device's communication watchdog timeout duration to prevent triggering the device's own offline protection during the logic hold period. Simultaneously, this duration should cover several PLC scan cycles to provide a buffer. Therefore, the logic hold timer duration of this port can be set to a value between 50% and 80% of the camera watchdog timeout duration. In this embodiment, 60% is used, and the calculated duration is... This value is configured in the device profile information corresponding to the port, and its timeliness critical level is set accordingly to represent the level of high real-time requirements.
[0044] For ports connected to conventional frequency converters, the calibration process for the event count threshold and time window threshold in the physical layer connection health status diagnosis function is as follows: First, a time window threshold of 1 hour is set. Then, during the trial operation phase of the assembly unit, events in which the port successfully executes the protocol layer maintenance rules and restores normal communication within 24 consecutive time windows are counted to establish baseline data reflecting the normal physical connection jitter under current operating conditions. Statistics show that the average number of recovery events per hour over 24 hours is 2.1, with a standard deviation of 1.5. The calibration principle is that the trigger threshold for predictive maintenance alarms should be higher than the fluctuation level under normal operating conditions; it can be set as the sum of the average value and three times the standard deviation. The calculated event count threshold is... The number of times is rounded up to 7 in engineering practice. Therefore, the predictive maintenance alarm rule for this port is configured to generate a predictive maintenance alarm indicating physical layer connection instability when the recovery event count reaches 7 times within 1 hour. By executing the above calibration procedure, all core parameters of the industrial intelligent gateway have obtained traceable setting basis that matches the specific characteristics of the connected equipment and the working conditions, enabling its hot-swap process control method to be configured based on specific application scenarios.
[0045] Example 5: This example provides a pre-calibration procedure for constructing a mapping relationship between operating conditions and diagnostic models. In a device environment with three distinct operating conditions—standby, low-speed operation, and high-intensity operation—initially, independent parameter configuration sets are created for these three operating conditions in the industrial intelligent gateway. Subsequently, the device is run continuously for 8 hours under each of these three operating conditions. During this period, the gateway independently executes a baseline data statistical procedure for each operating condition, thereby calculating an independent set of average and standard deviation of recovery event counts for each operating condition. Based on this, a lower event count threshold is set for the standby condition, a medium threshold is set for the low-speed operation condition, and a higher threshold is set for the high-intensity operation condition. The correspondence between these three sets of operating conditions and thresholds is stored in the gateway's configuration file, forming a mapping relationship.
[0046] For the time correlation judgment of collaborative diagnosis and root cause tracing functions, the algorithmic judgment logic is set as follows: When a predictive maintenance alarm is triggered on a certain port X, the processor of the industrial intelligent gateway sets a collaborative diagnosis time window with a width of 20 seconds, centered on the time of occurrence of the alarm event, i.e., 10 seconds before and after the alarm time; the processor then searches within this 20-second time window to see if the transient event counters of all other ports on the gateway, except for port X, have also increased in value, and accumulates the number of other ports whose counts have increased; if the accumulated number of ports is greater than a preset threshold for the number of common cause fault ports, which can be configured to 2 according to the physical grouping of the shared resources of the connected devices, then it is determined that there is a time correlation between this alarm and the events of other ports, and the alarm information includes information indicating that the root cause of the fault is an abnormality of the shared resources; otherwise, it indicates that the port itself is connected abnormally.
[0047] Example 6: To ensure the data continuity of the physical layer connection health status diagnostic function after a power outage and restart of the industrial smart gateway, the gateway's processor is configured to write the recovery event count and the first event timestamp of each port from volatile memory to a dedicated data area of non-volatile memory after each successful recovery event is counted, or at a preset time period. When the gateway is powered on again, its initialization program first reads these parameters back from the data area of the non-volatile memory to the volatile memory as the initial state for the diagnostic function, thus ensuring that the power outage and restart do not affect the continuity of diagnostic data. The configuration of key parameters in the collaborative diagnostic and root cause tracing functions is based on a calibration method based on system topology. First, the electrical and network cabling on site is analyzed. The drawings identify port groups that share the same physical resources, such as sharing the same power module or being installed on the same vibrating equipment body. The threshold for the number of ports with common causes of failure is set based on the fact that when more than half of the ports in a group show unstable symptoms at the same time, it can be determined as a common cause failure. Accordingly, for a group consisting of 3 to 4 ports, the threshold can be set to 2. The collaborative diagnosis time window is set based on the assessment of the spread time of the common cause failure event. By simulating the instantaneous voltage drop of a shared power supply in offline testing and recording the time span from the momentary interruption of the first affected port to the recovery of the last affected port, the time window is set to a preset multiple of the maximum time span to cover the complete occurrence and recovery cycle of a common cause failure event.
[0048] To further verify the technical features of the technical solution claimed in this invention, especially the necessity of the adaptive timing setting rules based on device profile information and the substantial technical effects they bring, the following comparative examples are provided.
[0049] Comparative Example 1: To verify the necessity and superiority of the adaptive timing setting rule based on device profile information in complex industrial scenarios compared to conventional technical solutions, this comparative example uses the same hardware configuration and application scenario as Example 1, namely, an industrial intelligent gateway simultaneously connects a servo driver (port 1) representing high real-time requirements and a photoelectric sensor (port 2) representing high fault tolerance requirements. The only difference from this invention is that the firmware of the industrial intelligent gateway in this comparative example is modified to adopt an improvement scheme most readily conceived by those skilled in the art when facing transient disturbances: that is, setting a unified fixed-duration logic sustain timer for all ports, in order to filter out most short-term connection jitter without increasing system complexity, based on the trade-off principles in engineering practice. The fixed timer duration was set to a medium value, namely 1000 milliseconds. The test process and results are as follows: For planned hot-swap maintenance of port 2 (photoelectric sensor): As in Example 1, the maintenance personnel replaced the photoelectric sensor online. The entire process (unplugging the old device to replacing it with the new device and connecting it) took about 3 seconds (3000 milliseconds). During this period, since the physical disconnection duration of 3000 milliseconds was much longer than the fixed timer duration of 1000 milliseconds set by the gateway, the timer expired normally. Therefore, after the timer expired, the industrial intelligent gateway terminated the protocol layer maintenance rule and reported a device communication interruption alarm of the photoelectric sensor to the upper programmable logic controller (PLC). This alarm triggered the topology reconstruction and process interruption of the upper layer application, and failed to achieve the expected online maintenance effect.
[0050] For transient physical disturbances to Port 1 (servo drive): Similar to Example 1, a physical connection interruption lasting 200 milliseconds due to cable contact was simulated. Since 200 milliseconds is less than the fixed timer duration of 1000 milliseconds, the gateway successfully maintained the logical connection, preventing the PLC from reporting a communication interruption, and the servo drive continued to operate continuously. For persistent physical faults to Port 1 (servo drive): After completing the above tests, the connector of Port 1 was manually disconnected to simulate a real, persistent equipment fault. According to the background information known in Example 4, the communication watchdog timeout duration inside the servo drive is 800 milliseconds. In this comparative example, since the fixed timer duration of the gateway is 1000 milliseconds, after the fault occurs... The servo drive's watchdog timer expired first at 800 milliseconds and entered a safe shutdown state; however, the gateway did not report the communication interruption to the upper-level PLC until the timer expired at 1000 milliseconds. This resulted in a 200-millisecond delay in status reporting between the fault source (servo drive) and the fault management node (gateway), which disrupted the coordination and determinism of the system's fault response. The test results show that the conventional technical approach of using a fixed-duration logic-maintained timer cannot simultaneously meet the timeliness requirements of different heterogeneous devices in the network. For maintenance operations requiring high fault tolerance, the timer duration is too short, leading to unnecessary downtime; while for critical equipment requiring high real-time performance, the timer duration is too long, delaying the response to real faults.
[0051] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for controlling the hot-plugging process of a communication device connector, characterized in that, Performed by a device acting as an industrial smart gateway, the method includes: Step a: Monitor the link status register of the physical layer chip at the corresponding port of the communication device connector; Step b: When the value of the link state register changes from a state indicating connection to a state indicating disconnection, this is used as the trigger for a physical layer link disconnection event. Step c: In response to the physical layer link disconnection event, execute the following adaptive timing setting rules: query the pre-configured device profile information associated with the port, and determine the timer duration corresponding to this logical maintenance process based on the timeliness critical level defined in the device profile information; Step d: Based on the determined timer duration, start the logical maintenance timer, and during the period when the logical maintenance timer is activated, execute the following coordinated protocol layer maintenance rules: When a data query for a port is received, return the last valid data value cached by the port before the physical layer link disconnection event and a status bit indicating that the data is stale; When a status query for a port is received, return a preset communication status code indicating online silence. Step e: During the activation period of the logical sustain timer, execute the following mutually exclusive state transition rules: Step e1: If the value of the link state register is detected to return to the state representing the connection, terminate the protocol layer sustain rule and restore normal communication of the port; at the same time, record the event of successfully executing the protocol layer sustain rule and restoring normal communication; Step e2: If the value of the link state register is not detected to return to the state representing the connection until the logical sustain timer expires, terminate the protocol layer sustain rule and report a device communication interruption alarm to the upper layer application.
2. The method for controlling the hot-plugging process of a communication device connector according to claim 1, characterized in that, The steps for determining the timer duration corresponding to this logic maintenance process are as follows: the timeliness critical level includes at least two levels; if the timeliness critical level is a level that represents high real-time requirements, then a timer duration shorter than the first preset duration is determined; if the timeliness critical level is a level that represents high fault tolerance requirements, then a timer duration longer than the second preset duration is determined, and the second preset duration is longer than the first preset duration.
3. The method for controlling the hot-plugging process of a communication device connector according to claim 1, characterized in that, The method also includes the following physical layer connection health status diagnosis steps: Step f, count the recorded events of successfully executing protocol layer maintenance rules and restoring normal communication to obtain a count of successful recovery events within a preset time period; Step g, when the count of recovery events reaches a preset event quantity threshold within the preset time period, generate a predictive maintenance alarm characterizing the physical layer connection instability of the port.
4. The hot-plugging process control method for a communication equipment connector according to claim 3, characterized in that, The physical layer connection health status diagnosis step further includes: before performing the judgment in step g, calculating a quantitative characterization index to represent the instability of the physical layer connection. Quantitative characterization indicators The calculation rules are as follows: ,in, To restore the event count; The preset time period will be used to quantify the performance indicators. With a preset alarm trigger threshold Compare; if and only if Greater than Only then will the method execute the judgment based on the event quantity threshold in step g.
5. The hot-plugging process control method for a communication equipment connector according to claim 3, characterized in that, The method also includes the following diagnostic model adaptive adjustment steps: obtaining real-time operating condition information related to the devices connected to the ports from the industrial network; Based on real-time operating condition information, select the event number threshold that matches the real-time operating condition information from multiple preset event number thresholds, and use it to perform the judgment in step g. Specifically, when the real-time operating condition information indicates that the equipment is in a preset high vibration operating condition type, a threshold value for the number of events with a higher value is selected. When the real-time operating condition information indicates that the device is in a preset standby operating condition type, select a lower event quantity threshold.
6. The hot-plugging process control method for a communication equipment connector according to claim 3, characterized in that, The method also includes the following collaborative diagnostic and root cause tracing steps: In step g, when port X generates a predictive maintenance alarm, a preset collaborative diagnostic time window is initiated centered on the time of occurrence of this alarm event; the time series of events recorded by different ports on the industrial intelligent gateway that successfully execute protocol layer maintenance rules and restore normal communication are analyzed within the collaborative diagnostic time window; based on the analysis results of the time series, it is determined whether there is a time correlation between the events of other ports and the events of port X; if the time correlation exists, the predictive maintenance alarm includes indication information indicating that the root cause of the fault is an abnormal shared resource; if the time correlation does not exist, the predictive maintenance alarm includes indication information indicating that the root cause of the fault is an abnormal port connection itself.
7. The method for controlling the hot-plugging process of a communication device connector according to claim 1, characterized in that, The step of returning the last valid data value and the state bit representing the data as stale is specifically a non-zero preset state value for the state bit representing the data as stale.
8. The method for controlling the hot-plugging process of a communication equipment connector according to claim 1, characterized in that, The operation of the link status register of the physical layer chip corresponding to the port of the communication device connector is continuously executed at a frequency higher than that of the protocol polling of the port by the upper layer application.
9. The method for controlling the hot-plugging process of a communication device connector according to claim 1, characterized in that, Step c, which involves querying the pre-configured device profile information associated with the port, specifically involves querying the preset timeliness critical level associated with the device connected to the port, stored internally by the industrial smart gateway, based on the port's identifier.
Citation Information
Patent Citations
Hot plug control circuit and hot plug control method
CN116014699A
Method, device and system for monitoring network running states
CN103813368A
Link processing method, system, equipment and medium
CN118093236A