A ship lock electric-hydraulic simulation combined control method and system

By dynamically adjusting the communication timeout judgment threshold and intelligent compensation strategy, the problem of simulation result deviation in the ship lock electro-hydraulic simulation system under complex network environment is solved, ensuring the continuity and accuracy of the simulation process and providing reliable simulation data support.

CN120891759BActive Publication Date: 2025-12-09NANJING SURUN TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511403477.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2025-12-09
Estimated Expiration
2045-09-29

AI Technical Summary

Technical Problem

Existing ship lock electro-hydraulic simulation systems cannot adapt to uncertain delays in complex network environments, leading to deviations in simulation results. Traditional compensation mechanisms introduce time breakpoints, affecting the accuracy and continuity of simulation results.

Method used

By monitoring the round-trip communication time between the electrical control simulation platform and the hydraulic control simulation platform in real time, dynamically adjusting the communication timeout judgment threshold, and combining the statistical characteristics of the processed load value and data set, the system distinguishes between network congestion and server load delay, and adopts an intelligent compensation strategy to ensure the continuity and accuracy of the simulation process.

Benefits of technology

It achieves accuracy and continuity of simulation results in complex network environments, avoids simulation interruptions or data distortion caused by network jitter or delay, and provides reliable simulation data support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120891759B_ABST
    Figure CN120891759B_ABST
Patent Text Reader

Abstract

The application relates to the field of simulation control technology and discloses a ship lock electrical hydraulic simulation combined control method and system, which comprises the following steps: acquiring the communication round trip time of key instruction interaction between an electrical control simulation platform and a hydraulic simulation platform; maintaining a recent data set containing the communication round trip time of the latest preset number of times, the recent data set being updated by using a first-in-first-out mechanism, and calculating a communication timeout judgment limit according to the statistical characteristics of the recent data set; if the actual response time of the key instruction interaction is not within the communication timeout judgment limit, communication compensation is carried out, otherwise the simulation is continuously carried out normally; by monitoring the communication round trip time in real time and dynamically adjusting the communication timeout judgment limit, the complex network environment can be dynamically adapted, the misjudgment and unnecessary compensation caused by the fixed timeout setting value under network jitter are effectively avoided, the continuity and data accuracy of the simulation process are ensured, and the problem that the simulation result deviates due to communication fluctuation in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of simulation control, in particular to a ship lock electrical-hydraulic simulation joint control method and system. BACKGROUND

[0002] In modern water conservancy projects, the ship lock is the "throat" connecting different water level channels. In order to enable the ship to pass safely and efficiently between high and low water levels, the ship lock must rely on two core systems to work together. The electrical control subsystem is responsible for monitoring sensor data such as water level, gate position, and ship position, running PLC logic, and issuing instructions such as opening and closing the gate and starting and stopping the pump station to various actuators. The hydraulic drive subsystem drives the hydraulic pump, valve and oil cylinder according to the electrical instructions to complete the actual opening and closing of the gate and water pressure regulation and other "mechanical actions". In order to verify the design scheme, optimize the operation process and evaluate the potential risks before the actual construction and operation, the industry generally adopts a highly simulated digital system, of which the electrical control simulation platform and the hydraulic control simulation platform are the core components. In the simulation, stable and accurate joint control is required to truly reproduce the complete operation process of the ship lock. However, the existing simulation system has significant limitations. The data packets exchanged in the simulation process produce unpredictable queuing delays, i.e. "network jitter", in the switch queue. The traditional approach sets a fixed timeout threshold (such as 5ms) for communication. Once the network jitter causes the response to occasionally arrive at 6ms, the system will misjudge it as a packet loss and trigger the "wait-retry" compensation logic. Although the compensation avoids collapse, it leaves a small pause on the simulation time axis, causing the gate pressure curve to have burrs, which obscures the energy-saving effect that the new compact operation process should bring. Therefore, the fixed timeout threshold of the prior art cannot adapt to the uncertain delay in the shared network environment, and the time "breakpoint" introduced by the compensation retry will pollute the simulation results. Network jitter and internal transient load of the server are mixed together, making it difficult to distinguish the delay root cause.

[0003] In view of the above problems, the prior art needs to be improved. SUMMARY

[0004] In order to solve the problems of the prior art, the present application provides a ship lock electrical-hydraulic simulation joint control method and system, which can solve the problem of deviation in the simulation results of the ship lock due to the complexity of the network environment, the uncertainty of the communication delay and the limitations of the existing compensation mechanism.

[0005] In a first aspect, the present application provides a ship lock electrical-hydraulic simulation joint control method, comprising:

[0006] Obtaining the communication round trip time of the key instruction interaction between the electrical control simulation platform and the hydraulic control simulation platform;

[0007] maintain a recent data set containing a preset number of latest communication round trip times, the recent data set being updated in a first-in-first-out manner, and calculate a communication timeout judgment limit according to statistical characteristics of the recent data set;

[0008] If the actual response time of the key instruction interaction is not within the communication timeout judgment limit, communication compensation is performed, otherwise the simulation is continued normally.

[0009] The application can dynamically adapt to complex network environments by monitoring the communication round trip time in real time and dynamically adjusting the communication timeout judgment limit, effectively avoiding misjudgments and unnecessary compensation caused by fixed timeout settings under network jitter, thereby ensuring the continuity and data accuracy of the simulation process, and solving the problem of simulation result deviation caused by communication fluctuations in the prior art.

[0010] Further, the application also proposes that the step of obtaining the communication round trip time of the key instruction interaction between the electrical control simulation platform and the hydraulic control simulation platform comprises:

[0011] record the sending timestamp when sending the key instruction and embed the key instruction;

[0012] When the key instruction is received, record the receiving timestamp, calculate the one-way transmission delay according to the sending timestamp, and collect the processing load value, embed the one-way transmission delay and the processing load value in the response information and return;

[0013] When the response information is received, record the response receiving timestamp, and calculate the communication round trip time in combination with the response receiving timestamp and the one-way transmission delay.

[0014] By accurately measuring the communication round trip time and distinguishing between network transmission delay and server processing load, a more detailed data basis is provided for subsequent communication state judgment and compensation strategies, thereby improving the accuracy of communication state judgment.

[0015] Further, the application also proposes that it further comprises:

[0016] When the processing load value is lower than the preset load judgment threshold value, and the communication round trip time is higher than the preset delay reference threshold value, it is determined that the network transmission is congested and the timeout waiting time of this communication is relaxed;

[0017] When the processing load value is higher than or equal to the load judgment threshold value, and the communication round trip time is higher than the delay reference threshold value, it is determined that the server load is delayed and the simulation data of this interaction is marked;

[0018] The processing load value includes CPU occupancy or task queue length.

[0019] By distinguishing network congestion and server load delay according to the processing load value and the communication round trip time, and taking targeted processing strategies, the compensation mechanism is more intelligent and effective.

[0020] Further, the application also proposes the step of maintaining a recent data set containing the latest preset number of communication round trip times, and the step of updating the recent data set using a first-in-first-out mechanism includes:

[0021] Continuously calculating the statistical characteristics of the recent data set;

[0022] Judging whether there is a deviation exceeding a preset threshold between the newly acquired communication round trip time and the statistical characteristics;

[0023] When there is a deviation exceeding the preset threshold, emptying the communication round trip times in the recent data set that are earlier than a specific time point to accelerate the adaptation of the recent data set to the current communication mode.

[0024] The recent data set can adapt to the current network communication mode more quickly, and when the network environment changes significantly, the communication timeout judgment limit can be quickly adjusted to avoid misjudgment caused by historical data, thereby improving the response speed and adaptability.

[0025] Further, the application also proposes the step of calculating the communication timeout judgment limit based on the statistical characteristics of the recent data set includes:

[0026] Based on the recent data set, a moving average μ and a standard deviation σ are calculated, and the communication timeout judgment limit T1 is calculated according to the formula T1=μ+K·σ, where K is a preset confidence coefficient.

[0027] Further, the application also proposes further comprising:

[0028] Sorting the communication round trip times in the recent data set, calculating the median M and the interquartile range IQR of the communication round trip times;

[0029] Based on the median M, the interquartile range IQR and the confidence coefficient K, the communication timeout judgment limit T1 is calculated according to the formula T1=M+K·IQR.

[0030] Further, the application also proposes further comprising:

[0031] Setting a connection maintenance threshold T2 greater than the communication timeout judgment limit T1, which is used to judge whether the communication between the two simulation platforms is completely interrupted;

[0032] If the actual response time ≤ the communication timeout judgment limit T1, the simulation continues normally;

[0033] If the communication timeout judgment limit T1 < actual response time ≤ connection maintenance threshold T2, it is marked as a timeout event;

[0034] If the actual response time > connection maintenance threshold T2, it is determined that the communication is interrupted and communication compensation is performed.

[0035] By introducing the connection maintenance threshold T2, the communication anomaly is subdivided into timeout events and communication interruptions, and targeted processing is performed, avoiding the same compensation for all delays, so that the compensation strategy is more refined and efficient.

[0036] Further, the present application also proposes that if the actual response time > connection maintenance threshold T2, the step of determining that the communication is interrupted and performing compensation includes:

[0037] Obtaining the occurrence frequency of the timeout event and the duration of the timeout event, and determining whether the timeout event meets the preset adjustment condition;

[0038] When the timeout event meets the adjustment condition, stop performing communication compensation, and start a non-blocking compensation mode, the non-blocking compensation mode includes: recording timeout event information, marking simulation data points affected by the timeout event, continuing normal simulation and periodically attempting to restore communication.

[0039] By intelligently judging whether to switch from blocking compensation to non-blocking compensation mode according to the occurrence frequency and duration of the timeout event, the influence of long-time blocking compensation on simulation continuity is avoided, while the integrity of simulation data is ensured, and the fault tolerance is improved.

[0040] Further, the present application also proposes that the step of determining whether the timeout event meets the preset adjustment condition includes:

[0041] According to the occurrence frequency of the timeout event and the duration of the timeout event, a comprehensive abnormality index of the timeout event is calculated;

[0042] The comprehensive abnormality index is compared with a preset abnormality threshold to determine whether the timeout event meets the adjustment condition.

[0043] By quantifying the severity of the timeout event through the comprehensive abnormality index, it can more accurately determine when to start the non-blocking compensation mode, further optimizing the intelligence and adaptability of the compensation strategy.

[0044] In the second aspect, the present application proposes a ship lock electrical hydraulic simulation joint control system for executing the above-mentioned ship lock electrical hydraulic simulation joint control method, which comprises:

[0045] A data acquisition unit is configured to acquire the communication round trip time of key instruction interaction between the electrical control simulation platform and the hydraulic control simulation platform.

[0046] maintaining and analyzing unit: configured to maintain a recent data set containing a preset number of communication round trip times, update the recent data set using a first-in first-out mechanism, and calculate a communication timeout judgment limit according to statistical characteristics of the recent data set;

[0047] joint control unit: configured to perform communication compensation if an actual response time of the key instruction interaction is not within the communication timeout judgment limit, or continue to normally perform simulation.

[0048] In summary, the ship lock electrical hydraulic simulation joint control method and system provided by the present application dynamically acquires and analyzes the communication round trip time of the key instruction interaction between the electrical control simulation platform and the hydraulic control simulation platform, and dynamically calculates the communication timeout judgment limit based on the statistical characteristics of the recent data set, effectively solving the simulation result deviation problem caused by the fixed timeout setting value that cannot adapt to the complex network environment in the prior art. By monitoring the communication state in real time, when the actual response time exceeds the dynamically adjusted communication timeout judgment limit, communication compensation can be performed in a timely manner, thereby avoiding simulation interruption or data distortion caused by network jitter or delay. Compared with the simple "waiting-retrying" compensation logic in the prior art, the present application can more accurately identify communication abnormalities and adopt a more intelligent compensation strategy, avoiding the generation of tiny "breakpoints" on the simulation time axis, thereby ensuring strict time consistency between the two simulation platforms, so that the simulation result can accurately reflect the energy consumption optimization effect and potential safety risk of the ship lock, providing reliable technical support for the design optimization and operation management of the ship lock. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 A flowchart of a ship lock electrical hydraulic simulation joint control method provided by an embodiment of the present application.

[0050] Figure 2 A structural diagram of a ship lock electrical hydraulic simulation joint control system provided by an embodiment of the present application.

[0051] Label explanation: 210, data acquisition unit; 220, maintaining and analyzing unit; 230, joint control unit. DETAILED DESCRIPTION

[0052] The technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. The components of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0053] It should be noted that similar reference numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Meanwhile, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0054] In the field of modern water conservancy engineering, the ship lock, as a key hub connecting different water level channels, directly affects the smoothness and economic benefits of water transportation in terms of operation efficiency and safety. In order to fully verify the design scheme of the ship lock, optimize the operation process and evaluate potential risks before actual construction and operation, a highly simulated digital system is usually constructed, among which the most core are the electrical control simulation platform and the hydraulic control simulation platform. These two platforms are closely related and interact in the actual operation of the ship lock, for example, after the electrical system issues an opening order, the hydraulic system can drive the gate to open. Therefore, in the simulation environment, it is the key to verify the design and optimize the process to achieve stable, accurate and consistent joint control between the two platforms, so as to truly reproduce the complete operation process of the ship lock system. The traditional existing ship lock electrical and hydraulic simulation joint control method usually uses fixed timeout setting value or simple retry mechanism when dealing with the communication between the electrical control simulation platform and the hydraulic control simulation platform. This is prone to cause deviation or inaccuracy of simulation results when facing complex and variable network environment and high real-time requirement simulation tasks. If the fixed timeout setting value is still used, when the network appears irregular fluctuation, even millisecond level delay may cause the feedback information to arrive later than the set value, triggering unnecessary "waiting-retry" compensation logic, thereby destroying the strict time consistency between the two platforms, causing simulation results to appear glitches and distortion, and even covering up the energy optimization effect or displaying safety risks. If the above problems are not solved, the simulation platform will not be able to draw correct conclusions when verifying new efficient operation processes.

[0055] To this end, in a first aspect, see Figure 1The application provides a ship lock electrical hydraulic simulation combined control method for jointly controlling simulation processes of an electrical control simulation platform and a hydraulic control simulation platform of a ship lock, and the method comprises the following steps:

[0056] Obtaining a communication round trip time of key instruction interaction between the electrical control simulation platform and the hydraulic control simulation platform;

[0057] Maintaining a recent data set containing a preset number of recent communication round trip times, updating the recent data set by using a first-in-first-out mechanism, and calculating a communication timeout judgment limit according to statistical characteristics of the recent data set;

[0058] If the actual response time of the key instruction interaction is not within the communication timeout judgment limit, communication compensation is performed, otherwise the simulation is continued normally.

[0059] The electrical control simulation platform refers to a simulation environment simulating the operation logic and control instructions of the ship lock electrical system, which is responsible for issuing various operation instructions, such as gate opening, closing, water level adjustment, etc. The hydraulic control simulation platform refers to a simulation environment simulating the physical characteristics and response behavior of the ship lock hydraulic system, which receives the instructions of the electrical control simulation platform and simulates the actions and state changes of the hydraulic actuators (such as hydraulic cylinders, valves, etc.). The key instruction interaction refers to the instructions sent by the electrical control simulation platform to the hydraulic control simulation platform, which have a decisive influence on the simulation process, and the response information of the hydraulic control simulation platform to these instructions. The communication round trip time refers to the total time from sending the key instruction by the electrical control simulation platform to receiving the response information of the hydraulic control simulation platform. The recent data set is a dynamically updated data set for storing the communication round trip time of the key instruction interaction in the recent period, which ensures that it reflects the latest communication condition by using the first-in-first-out mechanism. The statistical characteristics can include but are not limited to the moving average, the standard deviation, the median, the interquartile range, etc., for quantifying the distribution characteristics of the recent data set. The communication timeout judgment limit is a threshold dynamically calculated according to these statistical characteristics, for judging whether the actual response time of the key instruction interaction is normal. The communication compensation refers to the corrective measures taken when the actual response time exceeds the communication timeout judgment limit, to ensure the continuity and accuracy of the simulation process.

[0060] In one implementation, when the electrical control simulation platform sends a critical instruction, a sending timestamp is recorded and embedded into the critical instruction. When the hydraulic control simulation platform is received, a receiving timestamp is recorded and a one-way transmission delay is calculated based on the sending timestamp. Meanwhile, the hydraulic control simulation platform can collect its own processing load value, such as CPU occupancy or task queue length. Subsequently, the hydraulic control simulation platform embeds the one-way transmission delay and the processing load value into the response information and returns it to the electrical control simulation platform. When the response information is received, a response receiving timestamp is recorded and the complete communication round-trip time is calculated in combination with the response receiving timestamp and the one-way transmission delay. In another implementation, the electrical control simulation platform sends a probe packet to the hydraulic control simulation platform, which returns an acknowledgement packet immediately after receiving it. The electrical control simulation platform calculates the communication round-trip time by recording the time of sending the probe packet and the time of receiving the acknowledgement packet. It continuously adds newly acquired communication round-trip times to the recent data set and removes the oldest communication round-trip time to maintain a constant amount of data in the set. For example, the recent data set can be set to store the last 100 communication round-trip times. When the 101st communication round-trip time is acquired, it is added to the set and the earliest 1st communication round-trip time is removed. The recent data set can also be maintained according to a preset time window, for example, only communication round-trip times within the past 5 seconds are retained. When a new communication round-trip time is generated, it is added to the set and all communication round-trip times older than 5 seconds are removed. When the actual response time exceeds the communication timeout judgment limit, a preset communication compensation mechanism is started, for example, the waiting time can be simply extended or the critical instruction can be re-sent. If the actual response time is within the communication timeout judgment limit, the communication is considered normal and the simulation process continues unaffected.

[0061] The application effectively solves the simulation synchronization problem caused by the traditional fixed timeout mechanism in a complex network environment by dynamically adjusting the communication timeout judgment limit. The prior art usually uses a fixed timeout setting value. This static judgment mechanism cannot adapt to irregular communication jitter in a public backbone network, resulting in frequent triggering of unnecessary compensation logic when communication delay fluctuates, thereby destroying the continuity of the simulation time axis and causing glitches and distortions in the simulation results. The core innovation of the application lies in introducing a dynamically adaptive communication timeout judgment mechanism. By continuously obtaining the communication round-trip time and maintaining a recent data set updated using a first-in-first-out mechanism, the current network communication condition can be mastered in real time. When the actual response time exceeds the dynamically adjusted communication timeout judgment limit, communication compensation is performed, thereby effectively reducing unnecessary compensation operations and ensuring the smoothness and time consistency of the simulation process. For example, in a laboratory public backbone network, when other devices perform large-scale data backup or engineers download large data sets, the processing queue of the network switching device may become long, resulting in uncertain queuing waiting time of the synchronization information packet between the ship lock simulation platforms. The application can perceive this fluctuation in communication round-trip time and accordingly relax or tighten the communication timeout judgment limit, thereby avoiding false triggering of the compensation mechanism due to temporary network jitter and ensuring the accuracy and reliability of the simulation results. Therefore, the application can more realistically reproduce the complete operation process of the ship lock system, providing more accurate and reliable simulation data for verifying design schemes, optimizing operation processes, and evaluating potential risks.

[0062] Further, the step of obtaining the communication round-trip time of the key instruction interaction between the electrical control simulation platform and the hydraulic control simulation platform comprises:

[0063] Record the sending timestamp when sending the key instruction and embed the key instruction;

[0064] When the key instruction is received, record the receiving timestamp, calculate the one-way transmission delay according to the sending timestamp, and collect the processing load value, embed the one-way transmission delay and the processing load value in the response information and return;

[0065] When the response information is received, record the response receiving timestamp, and calculate the communication round-trip time in combination with the response receiving timestamp and the one-way transmission delay.

[0066] Wherein, when an electrical control simulation platform or a hydraulic control simulation platform sends a key instruction, the exact time point when the instruction is sent out is recorded synchronously, and this time stamp is embedded into the instruction data packet as part of the instruction. This sending time stamp is transmitted to the receiving side along with the instruction as a reference for subsequent time calculation. When the receiving side receives the key instruction, it will immediately record its own receiving time stamp. By comparing the receiving time stamp with the sending time stamp embedded in the instruction, the one-way transmission delay of the instruction from the sending side to the receiving side can be calculated. At the same time, the receiving side also collects its current system processing load value, such as CPU occupancy or task queue length, to reflect its processing capability state. These calculated one-way transmission delays and collected processing load values are then packaged into a response information and returned to the sending side of the instruction. Thus, when the sending side of the instruction receives the response information from the receiving side, it will record the exact time point when the response information is received, i.e. the response receiving time stamp. Combined with the sending time stamp recorded by the sending side before, the one-way transmission delay fed back by the receiving side, and the current response receiving time stamp, the complete communication round-trip time from instruction issuance to response return can be accurately calculated.

[0067] The present application realizes fine measurement of communication round-trip time by introducing time stamp and load value collection mechanism in the process of key instruction interaction, can realize accurate and real-time measurement of communication round-trip time of key instruction interaction between ship lock electrical control simulation platform and hydraulic control simulation platform, not only considers network transmission delay, but also indirectly reflects processing capability of receiving end by collecting processing load value, so that the calculated communication round-trip time is more practical. Thus, more accurate and comprehensive data support is provided for subsequent communication timeout judgment, which helps to improve the robustness and reliability of simulation joint control and ensures stable simulation process in complex communication environment.

[0068] Further, the above method further comprises:

[0069] When the processing load value is lower than the preset load judgment threshold value, and the communication round-trip time is higher than the preset delay reference threshold value, it is determined that the network transmission is congested and the timeout waiting time of this communication is relaxed;

[0070] When the processing load value is higher than or equal to the load judgment threshold value, and the communication round-trip time is higher than the delay reference threshold value, it is determined that the server load delay and the simulation data of this interaction are marked;

[0071] The processing load value includes CPU occupancy or task queue length.

[0072] wherein the processing load value refers to the computational or processing pressure that the simulation platform bears in processing the key instruction interaction process, which can be specifically manifested as CPU occupancy rate or task queue length. The CPU occupancy rate reflects the percentage of the processor occupied in a specific time, and the task queue length indicates the number of tasks waiting for the processor to execute. The load judgment threshold is a preset critical value for distinguishing whether the current is in a normal load or a high load state. The delay reference threshold is a preset value for judging whether the communication round-trip time is abnormally high. When the communication round-trip time exceeds this threshold, it indicates that there is communication delay. When it is detected that the processing load value is low (lower than the load judgment threshold), but the communication round-trip time is abnormally high (higher than the delay reference threshold), it usually indicates that the server itself has processing capacity, and the delay is mainly caused by the congestion on the network transmission path. In this case, in order to avoid misjudgment of communication interruption due to temporary network fluctuations, the timeout waiting time of this communication is relaxed, giving the network more time to transmit data. On the contrary, when the processing load value is high (higher than or equal to the load judgment threshold), and the communication round-trip time is also abnormally high, it indicates that the server may be in a high load state, causing its response to slow down. At this time, the delay is not mainly caused by the network, but by the insufficient internal processing capacity of the server. In this case, it is judged that the server is in a load delay, and the simulation data of this interaction is marked for subsequent analysis or processing. For example, these marked data points may need to be re-verified or specially focused on in the simulation results.

[0073] The application can distinguish the specific cause of communication delay by monitoring the processing load value and comprehensively judging in combination with the communication round trip time. When the communication round trip time abnormally rises, if the processing load value is detected to be low at the same time, it indicates that the server processing capability is sufficient, and the delay is more likely caused by network congestion. In this case, by relaxing the timeout waiting time, the misjudgment and unnecessary communication compensation caused by network instantaneous congestion can be avoided, and time for network system self-recovery is given. On the contrary, if the communication round trip time abnormally rises and the processing load value is high, it indicates that there may be a processing bottleneck on the server side, and the delay is caused by the server load being too high. At this time, the affected simulation data is marked, which is helpful for subsequent accuracy evaluation of simulation results and optimization of simulation process. For example, server resource allocation or simulation task scheduling strategy can be targetedly optimized instead of blindly performing communication compensation at the network level, intelligent diagnosis of the cause of communication delay in the ship lock electrical hydraulic simulation combined control process can be realized, and the limitation of the single compensation strategy for all timeout events in the traditional method is avoided. By distinguishing network congestion and server load delay, differentiated processing is adopted. For network congestion, the timeout waiting time is relaxed, the tolerance to network fluctuations is improved, and unnecessary communication interruption and compensation operation are reduced. For server load delay, the affected simulation data is marked, which provides key information for subsequent data analysis and system optimization, and helps to improve the reliability of simulation data and the stability of the overall simulation system.

[0074] Further, a recent data set containing the last preset number of communication round trip times is maintained, and the step of updating the recent data set using a first-in first-out mechanism comprises:

[0075] The statistical characteristics of the recent data set are continuously calculated;

[0076] It is judged whether there is a deviation exceeding a preset threshold between the newly acquired communication round trip time and the statistical characteristics;

[0077] When there is a deviation exceeding the preset threshold, the communication round trip times earlier than a specific time point in the recent data set are emptied to accelerate the adaptation of the recent data set to the current communication mode.

[0078] Specifically, all communication round trip times in the current recent data set are analyzed continuously to obtain their statistical properties, such as mean, median, standard deviation or variance, etc., to master the baseline performance and fluctuation range of the current communication environment in real time. Among them, the newly measured communication round trip time is compared with the statistical characteristics (such as mean or median) of the recent data set, and it is checked whether the difference exceeds the pre-set tolerance range. The pre-set threshold can be configured according to the sensitivity requirement of the actual system to the change of communication mode, which can identify the signal that the communication mode may change significantly. In actual application, when there is a deviation exceeding the pre-set threshold, the communication round trip times earlier than a certain time point in the recent data set are emptied, for example, all data before a certain time point can be removed from the set, or the old data points that do not match the current communication mode significantly are removed, which can quickly eliminate the old data that no longer represents the current communication condition, so that the recent data set can reflect the latest communication environment more quickly, thereby ensuring that the subsequent communication timeout judgment limit can adapt to the new communication mode in time and accurately.

[0079] The present application solves the problem of insufficient adaptability of the traditional first-in-first-out mechanism when the communication mode changes dramatically by introducing the continuous monitoring of the statistical characteristics of the recent data set and the deviation judgment mechanism between the newly acquired communication round trip time and the statistical characteristics. When it is detected that there is a significant deviation between the newly acquired communication round trip time and the historical statistical characteristics, it indicates that the communication environment may have changed fundamentally. At this time, by actively emptying the communication round trip times earlier than a certain time point in the recent data set, the influence of the old data that no longer conforms to the current communication mode can be quickly eliminated. It is this active and deviation-based adjustment mechanism that enables the recent data set to quickly "forget" the outdated communication conditions, thereby speeding up its adaptation to the current communication mode and ensuring that the subsequent communication timeout judgment limit can accurately reflect the latest network conditions in time, so that the communication timeout judgment limit can adapt to sudden changes in the communication mode more quickly and accurately, avoiding false judgments or delayed responses caused by the retention of old data. As a result, unnecessary communication compensation or timely detection of real communication interruptions can be effectively reduced, thereby improving the stability and reliability of the entire simulation joint control system, especially in scenarios where the network fluctuates frequently or the communication environment is variable, the advantages are more obvious.

[0080] Further, the step of calculating the communication timeout judgment limit according to the statistical characteristics of the recent data set comprises:

[0081] The moving average μ and the standard deviation σ are calculated based on the recent data set, and the communication timeout judgment limit T1 is calculated according to the formula T1=μ+K·σ, wherein K is a pre-set confidence coefficient.

[0082] Specifically, the moving average μ refers to the arithmetic mean of the communication round-trip time in the recent data set, which reflects the central tendency of the recent communication round-trip time. The standard deviation σ is used to measure the degree of fluctuation or dispersion of the communication round-trip time in the recent data set. The confidence coefficient K is a preset constant, and its selection depends on the strictness and tolerance of the communication timeout judgment. For example, the larger the value of K, the more relaxed the calculated communication timeout judgment limit T1, and vice versa. By combining the average level and fluctuation range of the communication round-trip time, a reasonable timeout threshold is dynamically determined.

[0083] Through the above technical solution, the calculation of the communication timeout judgment limit T1 is no longer a static fixed value, but can be dynamically adjusted according to the recent actual communication round-trip time data. This calculation method based on statistical characteristics can better adapt to changes in the network environment, such as network congestion or load fluctuations. As a result, the accuracy and robustness of the communication timeout judgment can be significantly improved, reducing false positives caused by network transient fluctuations, thereby ensuring the stability and reliability of the ship lock electrical and hydraulic simulation combined control process.

[0084] Further, the method further comprises:

[0085] The communication round-trip times in the recent data set are sorted, and the median M and the interquartile range IQR of the communication round-trip times are calculated;

[0086] Based on the median M, the interquartile range IQR, and the confidence coefficient K, the communication timeout judgment limit T1 is calculated according to the formula T1=M+K·IQR.

[0087] Specifically, all the communication round-trip time values in the set are arranged in ascending or descending order. This step is the basis for calculating the median M and the interquartile range IQR. The median M refers to the value in the middle position after sorting a set of data. If the number of data points is odd, the median M is the middle value; if the number of data points is even, the median M usually takes the average of the two middle values. The median M is less sensitive to extreme values (outliers) in the data and can better reflect the true trend of the data set. The interquartile range IQR is the difference between the upper quartile (Q3) and the lower quartile (Q1), i.e. IQR=Q3-Q1. The lower quartile Q1 is the 25th percentile value in the data set, and the upper quartile Q3 is the 75th percentile value in the data set. The interquartile range IQR measures the dispersion of the middle 50% of the data, and is also robust to outliers, accurately reflecting the fluctuation range of the data and avoiding the influence of extreme values on the estimation of dispersion. The confidence coefficient K is a preset constant used to adjust the looseness of the communication timeout judgment limit T1, and its value can be set according to the strictness requirement of the communication timeout judgment in the actual application scenario.

[0088] The application effectively solves the problem of sensitivity to abnormal values when calculating based on the moving average μ and the standard deviation σ by introducing the median M and the interquartile range IQR to calculate the communication timeout judgment limit T1. Specifically, when occasional and abnormally high communication round trip times occur in the recent data set, since the median M only depends on the middle position value after sorting the data, and the interquartile range IQR only focuses on the distribution of the middle 50% of the data, the influence of these abnormal values on the median M and the interquartile range IQR is much smaller than that on the moving average μ and the standard deviation σ. Therefore, even in the case of transient fluctuations or noise in the communication environment, the calculated communication timeout judgment limit T1 can remain relatively stable and accurate, thereby avoiding the over-expansion or contraction of the judgment limit T1 due to a small number of abnormal data points, and improving the reliability of the judgment. Compared with the traditional method based on mean and standard deviation, the median M and the interquartile range IQR can more accurately reflect the time distribution characteristics under normal communication mode, effectively reducing the misjudgment rate caused by occasional network jitter or server transient load peak. This makes it possible to more stably and reliably perform communication timeout judgment and compensation in a complex and variable communication environment, thereby ensuring the continuity and accuracy of the simulation process.

[0089] Further, the method further comprises:

[0090] Setting a connection maintenance threshold T2 greater than the communication timeout judgment limit T1 for judging whether the communication between the two simulation platforms is completely interrupted;

[0091] If the actual response time ≤ the communication timeout judgment limit T1, the simulation continues normally;

[0092] If the communication timeout judgment limit T1 < the actual response time ≤ the connection maintenance threshold T2, it is marked as a timeout event;

[0093] If the actual response time > the connection maintenance threshold T2, it is determined as a communication interruption and communication compensation is performed.

[0094] Specifically, the connection maintenance threshold T2 is set to a value significantly larger than the communication timeout judgment limit T1, providing a wider tolerance interval to distinguish between temporary communication delay and complete communication interruption. When the actual response time falls within the communication timeout judgment limit T1, it indicates that the communication condition is good, and the simulation process can proceed normally. When the actual response time exceeds the communication timeout judgment limit T1 but still does not exceed the connection maintenance threshold T2, it is considered a timeout event. Timeout events usually indicate that there is some degree of delay in communication, but it has not reached the level of complete interruption, for example, it may be caused by temporary network congestion or short-term response delay of the server. In this case, the event is marked first, but full communication compensation may not be started immediately, but a certain degree of tolerance or light processing is allowed. However, once the actual response time exceeds the connection maintenance threshold T2, it indicates that the communication link may have been completely interrupted or in a highly unstable state, at which point it is determined to be a communication interruption and the corresponding communication compensation mechanism is immediately started to ensure the continuity and data consistency of the simulation process.

[0095] The present application builds a layered communication state judgment model by introducing the connection maintenance threshold T2 in combination with the communication timeout judgment limit T1. It is precisely due to this layered judgment that different degrees of communication abnormalities can be identified in detail. When the communication response time only slightly exceeds T1, it is identified as a tolerable timeout event, avoiding overreaction to temporary delays and reducing unnecessary communication compensation operations. At the same time, when the communication response time seriously exceeds T2, it can be quickly and clearly determined as a communication interruption, ensuring that compensation can be started in time when the communication link is truly faulty, preventing large-scale deviation of simulation data or complete stagnation of the simulation process. This enables more intelligent and robust management of communication between simulation platforms in the face of complex network environments and server load changes, improving the accuracy of decision-making and the rationality of response. The present application can achieve more accurate and fine-grained judgment of the communication state in the process of joint control of ship lock electrical and hydraulic simulation, compared to the scheme relying only on a single timeout limit, the present application can effectively distinguish between temporary communication delay and complete communication interruption, thereby avoiding overcompensation for temporary delays and reducing waste of system resources and unnecessary simulation interruptions. In addition, by identifying and responding to real communication interruptions in a timely manner, the present application ensures that effective compensation measures can be taken quickly when a serious communication failure occurs, allowing the simulation process to proceed more smoothly and efficiently, even in poor communication environments.

[0096] The step of determining a communication interruption and performing compensation when the actual response time is greater than the connection maintenance threshold T2 includes:

[0097] an occurrence frequency of the timeout event and a duration of the timeout event, and determining whether the timeout event meets a preset adjustment condition;

[0098] When the timeout event meets the adjustment condition, stopping execution of the communication compensation, and starting a non-blocking compensation mode, the non-blocking compensation mode comprising:

[0099] recording timeout event information, marking simulation data points affected by the timeout event, continuing normal simulation, and periodically attempting to recover communication.

[0100] Specifically, after detecting that the actual response time exceeds the connection maintenance threshold T2 and triggering the communication interruption determination, instead of simply executing a single compensation strategy, detailed information about the interruption event is further collected. The occurrence frequency of the timeout event can be understood as the number of communication interruption events occurring within a certain time window; the duration of the timeout event refers to the length of time from the occurrence of each communication interruption event to the recovery of communication or reaching a certain preset upper limit. The acquisition of this information aims to provide data support for subsequent intelligent decision-making. According to the occurrence frequency and duration of the timeout event, in combination with preset rules or thresholds, the nature of the current communication interruption is evaluated. For example, the adjustment condition can be set as: when the occurrence frequency of the timeout event reaches a certain high threshold within a short period of time, but each duration is short; or when the duration of the timeout event is long, but there are still sporadic communication successes. These conditions aim to distinguish between temporary, intermittent or non-fatal communication problems and complete communication link interruption.

[0101] When the timeout event meets the adjustment condition, the original communication compensation strategy will be stopped and a non-blocking compensation mode will be started. Stopping the execution of the communication compensation means that aggressive measures that may cause the simulation to pause or rollback are no longer taken. The non-blocking compensation mode is a more flexible processing mechanism, the core of which is to allow the simulation process to continue in the case of communication anomalies, while recording and managing these anomalies. Specifically, the non-blocking compensation mode includes: recording timeout event information, such as the time of occurrence, duration, affected instruction or data type, etc., for subsequent analysis and troubleshooting; marking simulation data points affected by the timeout event, which means that in the simulation data stream, those data generated or transmitted during the communication anomaly will be specially marked to indicate that they may have incompleteness or delay, but the simulation itself will not be interrupted; continuing normal simulation, which is the key of the non-blocking mode, ensuring the continuity of the simulation process; periodically attempting to recover communication, i.e., sending probe signals or attempting to re-establish connection at a preset frequency, to recover normal communication in time when the communication conditions improve.

[0102] The application can more finely identify the type of communication anomaly by introducing the judgment of the frequency and duration of communication interruption events. When the communication interruption is determined to meet certain adjustment conditions, such as intermittent or non-fatal problems, instead of taking rigid compensation measures that may cause simulation stagnation, it switches to a non-blocking compensation mode. This mode allows the simulation process to continue running in the background of communication anomalies, avoiding simulation interruption due to temporary or intermittent communication problems, thereby improving the continuity and efficiency of the simulation. By recording timeout event information and marking affected simulation data points, the continuity of the simulation is ensured while providing necessary information for subsequent data analysis and problem diagnosis. At the same time, periodic attempts to restore communication mechanisms ensure that when communication conditions improve, the system can switch back to normal communication state from the non-blocking mode, achieving a balance between flexibility and recovery ability.

[0103] Through the above technical solutions, the application can effectively solve the problem of simulation interruption and efficiency reduction caused by traditional communication compensation strategies in the face of non-comprehensive or intermittent communication interruption. By intelligently judging the nature of communication anomalies, unnecessary aggressive compensation measures are avoided, significantly improving the robustness and continuous operation ability of the ship lock electrical and hydraulic simulation system. Even when there is a certain degree of fluctuation or abnormality in the communication link, the simulation process can continue, and only the affected data is marked, thereby minimizing the risk of simulation interruption and improving simulation efficiency and user experience.

[0104] The application further proposes a step of judging whether the timeout event meets the preset adjustment condition, comprising:

[0105] According to the frequency of the timeout event and the duration of the timeout event, a comprehensive abnormality index of the timeout event is calculated;

[0106] The comprehensive abnormality index is compared with a preset abnormality threshold to determine whether the timeout event meets the adjustment condition.

[0107] Specifically, the comprehensive abnormality index is a composite numerical value that quantifies the severity of the timeout event. The calculation of this index can take into account the frequency and duration of the timeout event, for example, it can be generated by weighted average, nonlinear function mapping or statistical model-based methods. The purpose is to provide a more comprehensive and accurate abnormality evaluation result than a single index. The abnormality threshold is a pre-set value that defines what level of comprehensive abnormality index needs to trigger the adjustment of the compensation strategy. This threshold can be calibrated and optimized based on historical running data, communication stability requirements and expert experience to ensure that when the communication anomaly reaches a certain level, the non-blocking compensation mode can be started in time and appropriately.

[0108] The application can more comprehensively and accurately evaluate the severity of the timeout event by introducing a comprehensive abnormality index, which effectively integrates the occurrence frequency and duration of the timeout event, avoiding the one-sidedness that may be caused by a single index. Thus, whether the communication abnormality reaches the degree that requires adjustment of the compensation strategy is judged based on a more representative value, thereby ensuring that the non-blocking compensation mode is started only when necessary, avoiding unnecessary resource consumption or insufficient compensation, and more intelligently and accurately judging the severity of the communication abnormality, thereby optimizing the adjustment timing of the communication compensation strategy. This helps to avoid misjudgment caused by simple judgment, ensures that the non-blocking compensation mode is activated at the most appropriate time, and guarantees the continuity and effectiveness of the simulation process.

[0109] In a second aspect, referring to Figure 2 The application also proposes a ship lock electrical and hydraulic simulation combined control system for executing the above-mentioned ship lock electrical and hydraulic simulation combined control method. The system includes a data acquisition unit 210, a maintenance analysis unit 220, and a combined control unit 230.

[0110] The data acquisition unit 210 can monitor and record the entire process from sending a key instruction to receiving a response, thereby accurately measuring the communication round-trip time. For example, the data acquisition unit 210 can be integrated with a timestamp recording module and a communication interface module to record the sending timestamp when sending the key instruction and the response receiving timestamp when receiving the response information, and then calculate the communication round-trip time.

[0111] The maintenance analysis unit 220 continuously receives the communication round-trip time data from the data acquisition unit 210 and adds it to the recent data set according to the first-in-first-out principle, and is also responsible for real-time statistical analysis of the recent data set, such as calculating the moving average, standard deviation, median, or interquartile range, and dynamically calculating the communication timeout judgment limit based on these statistical characteristics.

[0112] The combined control unit 230 receives the actual response time from the data acquisition unit 210 and the communication timeout judgment limit from the maintenance analysis unit 220, and determines whether the actual response time exceeds the communication timeout judgment limit according to the preset logic. If it exceeds, it triggers the communication compensation mechanism, such as data retransmission, adjustment of the simulation step, or starting of the non-blocking compensation mode; if it does not exceed, it allows the simulation process to proceed normally, ensuring the continuity and accuracy of the simulation data.

[0113] The core technical concept of the present application is to abandon the traditional method of using fixed communication timeout judgment in joint simulation, and instead introduce a timeout judgment strategy that can adjust itself according to real-time network communication conditions. By continuously collecting and analyzing the round-trip time of recent key instruction interactions, the average level and fluctuation range of the current network delay are calculated, and based on this, the timeout waiting limit for the next communication is flexibly set, so that the uncertainty brought by the shared network environment is no longer passively borne, but the network changes can be actively adapted, thereby significantly reducing unnecessary communication compensation operations, ensuring the continuity of the simulation time axis and the accuracy of the simulation results, and especially suitable for tight operation process verification with extremely high time consistency requirements.

[0114] The above only describes the embodiments of the present application and is not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A ship lock electric-hydraulic simulation combined control method, used for combined control of simulation processes of an electric control simulation platform and a hydraulic control simulation platform of a ship lock, characterized in that, The method comprises the following steps: acquiring a communication round-trip time of a key instruction interaction between the electrical control simulation platform and the hydraulic control simulation platform; maintaining a recent data set containing a preset number of the communication round-trip times, updating the recent data set in a first-in-first-out mechanism, calculating a communication timeout judgment limit according to statistical characteristics of the recent data set; if an actual response time of the key instruction interaction is not within the communication timeout judgment limit, performing communication compensation, otherwise, continuing normal simulation; the step of calculating the communication timeout judgment limit according to the statistical characteristics of the recent data set comprises: calculating a moving average μ and a standard deviation σ based on the recent data set, and calculating the communication timeout judgment limit T1 according to a formula T1=μ+K·σ, wherein K is a preset confidence coefficient; The method further comprises: sorting the communication round-trip times in the recent data set, calculating a median M and an interquartile range IQR of the communication round-trip times; calculating the communication timeout judgment limit T1 according to a formula T1=M+K·IQR based on the median M, the interquartile range IQR and the confidence coefficient K; The method further comprises: setting a connection maintenance threshold T2 greater than the communication timeout judgment limit T1, for judging whether the communication between the two simulation platforms is completely interrupted; if the actual response time is less than or equal to the communication timeout judgment limit T1, continuing normal simulation; if the communication timeout judgment limit T1 is less than the actual response time and the actual response time is less than or equal to the connection maintenance threshold T2, marking as a timeout event; if the actual response time is greater than the connection maintenance threshold T2, determining that the communication is interrupted and performing communication compensation; the step of determining that the communication is interrupted and performing compensation if the actual response time is greater than the connection maintenance threshold T2 comprises: acquiring a frequency of occurrence of the timeout event and a duration of the timeout event, and judging whether the timeout event meets a preset adjustment condition; when the timeout event meets the adjustment condition, stopping performing communication compensation and starting a non-blocking compensation mode, the non-blocking compensation mode comprising: recording the timeout event information, marking simulation data points affected by the timeout event, continuing normal simulation and periodically attempting to recover the communication; the step of judging whether the timeout event meets the preset adjustment condition comprises: calculating a comprehensive abnormality index of the timeout event according to the frequency of occurrence of the timeout event and the duration of the timeout event; comparing the comprehensive abnormality index with a preset abnormality threshold to judge whether the timeout event meets the adjustment condition.

2. The ship lock electro-hydraulic simulation combined control method according to claim 1, characterized in that, The step of acquiring the communication round-trip time of the key instruction interaction between the electrical control simulation platform and the hydraulic control simulation platform comprises: recording a sending timestamp when the key instruction is sent and embedding the key instruction; when the key instruction is received, recording a receiving timestamp, calculating a one-way transmission delay according to the sending timestamp, collecting a processing load value, embedding the one-way transmission delay and the processing load value in response information and returning the response information; When the response information is received, a response receiving timestamp is recorded, and the communication round trip time is calculated based on the response receiving timestamp and the one-way transmission delay.

3. The electric-hydraulic simulation combined control method for a ship lock according to claim 2, characterized by, Further comprising: When the processing load value is lower than a preset load judgment threshold, and the communication round trip time is higher than a preset delay reference threshold, it is determined that the network transmission is congested and the timeout waiting time of the current communication is relaxed; When the processing load value is higher than or equal to the load judgment threshold, and the communication round trip time is higher than the delay reference threshold, it is determined that the server load is delayed, and the simulation data of the current interaction is marked; The processing load value includes CPU occupancy or task queue length.

4. The electric-hydraulic simulation combined control method for a ship lock according to claim 1, characterized by, The maintenance includes a recent data set of the communication round trip time in the last preset number of times, and the step of updating the recent data set using a first-in first-out mechanism comprises: Continuously calculating the statistical characteristics of the recent data set; Determine whether there is a deviation exceeding a preset threshold between the newly obtained communication round trip time and the statistical characteristics; When there is a deviation exceeding the preset threshold, the communication round trip time earlier than a specific time point in the recent data set is emptied to accelerate the adaptation of the recent data set to the current communication mode.

5. A ship lock electro-hydraulic combined simulation control system for performing the ship lock electro-hydraulic simulation combined control method according to any one of claims 1 to 4, characterized in that, The system comprises: A data acquisition unit is configured to acquire the communication round trip time of the key instruction interaction between the electrical control simulation platform and the hydraulic control simulation platform; A maintenance analysis unit is configured to maintain a recent data set containing the communication round trip time in the last preset number of times, update the recent data set using a first-in first-out mechanism, and calculate the communication timeout judgment limit based on the statistical characteristics of the recent data set; A joint control unit is configured to perform communication compensation if the actual response time of the key instruction interaction is not within the communication timeout judgment limit, otherwise continue normal simulation.

Citation Information

Patent Citations

  • Power and communication system coupling simulation platform and method based on application integration

    CN102999674A

  • Communication data receiving method and device, electronic equipment and storage medium

    CN116980294A