Flaw detection ink jet line time sequence synchronization control method, system and equipment
Through the relationship between the master-slave nodes of the flaw detection device and the inkjet head and the network delay prediction model, the inkjet trigger time is dynamically adjusted, which solves the problem of marking position offset on the copper tube production line, and achieves high-precision copper tube defect marking.
Patent Information
- Application Number
- CN202510781367.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-06-12
AI Technical Summary
On the copper tube automation production line, there are network delay and clock deviation problems in synchronization with the timing of flaw detection and inkjet marks, resulting in mark position offset and affecting product quality.
The flaw detection device establishes a master-slave node relationship with the inkjet head, transmits data packets carrying timestamps in real time through the communication network protocol, combines the network transmission delay prediction model and clock deviation verification, and dynamically adjusts the inkjet trigger time to achieve high-precision marking.
It realizes high synchronization accuracy of copper tube defect marking on high-speed production lines, solving the mark offset problems caused by network jitter and clock drift.
Smart Images

Figure CN120382739A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of copper tube flaw detection, and particularly to a timing synchronization control method, system and device for a flaw detection inkjet line. Background Art
[0002] On an automated copper tube production line, the timing synchronization between flaw detection and inkjet marking is a core link to ensure product quality. The flaw detection device needs to identify internal defects of the copper tube in real time, and the inkjet head needs to mark the defect positions within millisecond-level accuracy. Due to the high-speed operation of the production line, factors such as the network delay of transmitting the flaw detection signal to the inkjet head and the clock deviation between devices will cause the marking position to shift, and in severe cases, it will lead to the scrapping of batch products.
[0003] However, traditional methods mainly rely on fixed-delay compensation technology that depends on preset static parameters and cannot adapt to dynamic delay changes caused by network jitter and temperature fluctuations; the two-way delay estimation technology has a one-way delay misjudgment due to the asymmetry of the industrial network transmission path (such as the difference in uplink / downlink delays). These methods result in too large a shift in the marking position in high-speed production scenarios, far higher than the allowable tolerance, becoming the core bottleneck restricting accurate defect marking.
[0004] The information disclosed in this background art section is only intended to deepen the understanding of the overall background art of the present disclosure, and should not be regarded as an admission or any form of implication that this information constitutes the prior art known to those skilled in the art. Summary of the Invention
[0005] The present invention provides a timing synchronization control method, system and device for a flaw detection inkjet line, which can effectively solve the problems in the background art.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is: A timing synchronization control method for a flaw detection inkjet line, the method comprising: The flaw detection device and the inkjet head establish a master-slave node relationship according to the communication network protocol, wherein the flaw detection device serves as the master node and the inkjet head serves as the slave node; The master node real-time collects the flaw detection signal of the copper tube, encapsulates the flaw detection signal into a data packet carrying a timestamp, and transmits the data packet to the slave node according to the communication network protocol; After receiving the data packet, the slave node parses the timestamp and calculates the inkjet trigger compensation time based on the network transmission delay prediction model; Generates a synchronous inkjet instruction according to the inkjet trigger compensation time, and controls the inkjet head to mark at the defect position of the copper tube; Periodically checks the clock deviation data of the master-slave nodes based on the communication network protocol, and dynamically updates the network transmission delay prediction model.
[0007] Further, the communication network protocol includes: The master node and the slave node align the clock by periodically broadcasting synchronization frames, and the synchronization frames include the local clock value of the master node and the transmission delay calibration parameter; When the master node encapsulates the flaw detection signal into a data packet, it generates a timestamp based on the current clock value and associates and encodes the timestamp with the flaw detection signal; After receiving the data packet, the slave node calculates the network transmission delay according to the difference between the timestamp and the local clock value, in combination with the transmission delay calibration parameter; If the network transmission delay in multiple consecutive periods exceeds a preset threshold, the master and slave nodes are triggered to switch to an alternate communication channel to transmit the data packet.
[0008] Further, associating and encoding the timestamp with the flaw detection signal includes: Embedding the timestamp into the header field of the data packet containing the flaw detection signal, and appending a cyclic redundancy check code at the tail, and the cyclic redundancy check code is generated based on the joint calculation of the header field and the payload of the flaw detection signal; Performing fragmentation encoding on the data packet, each fragment includes a timestamp fragment, a flaw detection signal fragment and a fragmentation sequence identifier, and each fragment is transmitted through an independent communication channel; After the slave node receives the fragments, it reorganizes the data packet according to the fragmentation sequence identifier and verifies the integrity of the cyclic redundancy check code; If the cyclic redundancy check fails, it requests the master node to retransmit the target fragment and delays the calculation of the inkjet trigger compensation time until the data packet is completely received.
[0009] Further, performing fragmentation encoding on the data packet includes: Dynamically calculating a fragmentation length threshold according to the current network jitter parameter and the size of the data packet, and dividing the data packet into multiple fragments, where the length of each fragment does not exceed the fragmentation length threshold; Allocating the independent communication channel for each fragment based on a load balancing strategy, and the load balancing strategy dynamically selects a preferred channel according to the real-time delay and packet loss rate of each independent communication channel; Inserting redundant fragments into each fragment, the number of redundant fragments is positively correlated with the network jitter parameter, and the redundant fragments include cross-check codes of adjacent fragments; Appending an encryption identifier to the fragmentation sequence identifier of each fragment, and the encryption identifier is generated based on the clock synchronization data of the master and slave nodes; Before transmitting the fragments, pre-verify the logical consistency between the fragmentation sequence identifier and the timestamp fragment, and if the verification fails, discard the fragment and trigger a local fragmentation reorganization alarm.
[0010] Further, establish a network transmission delay prediction model, including: Initialize the network transmission delay prediction model, and construct a reference delay matrix through the initial clock synchronization data between the master and slave nodes. The reference delay matrix contains theoretical transmission delay values under different incoming material transmission speeds; During real-time communication, periodically collect the clock deviation data and network jitter parameters of the master and slave nodes to generate a dynamic delay correction coefficient; Perform a convolution operation on the dynamic delay correction coefficient and the reference delay matrix to update the weight parameters of the network transmission delay prediction model; If the variance of the clock deviation data exceeds a preset threshold for multiple consecutive periods, determine that the network state is abnormal and trigger the re-initialization operation of the network transmission delay prediction model.
[0011] Further, calculate the inkjet trigger compensation time, including: Obtain a historical transmission delay data set, which contains the clock deviation data, the network jitter parameters, and the incoming material transmission speed between the master and slave nodes; Based on the historical transmission delay data set, train an initial delay prediction model through a time series analysis algorithm and output a delay prediction value; Calculate the theoretical inkjet trigger time according to the timestamp parsed by the slave node and the current incoming material transmission speed; Superimpose the delay prediction value and the theoretical inkjet trigger time to generate the inkjet trigger compensation time.
[0012] Further, periodically verify the clock deviation data of the master and slave nodes based on the communication network protocol, including: The master node sends a synchronization request instruction to the slave node, and the synchronization request instruction carries the local clock value of the master node and the current environmental temperature parameter; After receiving the synchronization request instruction, the slave node records the reception timestamp and encapsulates the reception timestamp and the local clock value into a synchronization response data packet and returns it to the master node; The master node calculates the one-way transmission delay between the master and slave nodes according to the difference between the synchronization request sending time and the synchronization response receiving time, and corrects the clock deviation data in combination with the environmental temperature parameter; If the variance of the clock deviation data for multiple consecutive periods exceeds a preset threshold, determine that the clock synchronization is abnormal, shorten the sending period of the synchronization request, and trigger the recalibration of the network transmission delay prediction model.
[0013] Further, triggering the recalibration of the network transmission delay prediction model includes: Periodically collect the real-time communication data between the master and slave nodes, including the current clock deviation data, network jitter parameters, and incoming material transmission speed; Compare the real-time communication data with the theoretical transmission delay values in the reference delay matrix to generate a delay error matrix; Optimize the delay error matrix based on the gradient descent algorithm, and calculate the update amount of the weight parameters of the network transmission delay prediction model; Dynamically adjust the learning rate according to the incoming material transmission speed. When the incoming material transmission speed exceeds the preset threshold, reduce the learning rate to suppress model oscillation; If the prediction error of the network transmission delay prediction model after recalibration does not converge, trigger the historical data backtracking mechanism, and load the reference delay matrix of the previous K cycles for local weight rollback, where K can take any value.
[0014] A timing synchronization control system for a flaw detection inkjet line, the system includes: A node establishment module, where the flaw detection device and the inkjet head establish a master-slave node relationship according to the communication network protocol, with the flaw detection device as the master node and the inkjet head as the slave node; A data encapsulation module, where the master node collects the flaw detection signals of the copper tube in real time, encapsulates the flaw detection signals into data packets carrying timestamps, and transmits them to the slave node according to the communication network protocol; A compensation calculation module, after the slave node receives the data packet, parses the timestamp and calculates the inkjet trigger compensation time based on the network transmission delay prediction model; A synchronization marking module, generates a synchronous inkjet instruction according to the inkjet trigger compensation time, and controls the inkjet head to mark at the defect position of the copper tube; A data verification module, periodically verifies the clock deviation data of the master and slave nodes based on the communication network protocol, and dynamically updates the network transmission delay prediction model.
[0015] A timing synchronization control device for a flaw detection inkjet line, used to implement the timing synchronization control method of the flaw detection inkjet line.
[0016] Through the technical solution of the present invention, the following technical effects can be achieved: Through the dynamic delay prediction model and the environmental temperature compensation mechanism, combined with the accurate correction of the asymmetric delay between the master and slave nodes, high synchronization accuracy of copper tube defect marking is achieved, and the marking offset problem caused by network jitter and clock drift in high-speed production lines is solved.
[0017] The above description is only an overview of the technical solution of this application. In order to be able to understand the technical means of this application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of this application more obvious and understandable, the following specifically illustrates the specific implementation manners of this application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0019] Figure 1 It is a schematic flowchart of the timing synchronization control method for the flaw detection inkjet line; Figure 2 It is a schematic structural diagram of the communication network protocol; Figure 3 It is a schematic flowchart of establishing a network transmission delay prediction model; Figure 4 It is a schematic flowchart of periodically verifying clock deviation data. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs. The terms used in the description of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0022] Embodiment 1; As Figure 1 shown, the present application provides a timing synchronization control method for a flaw detection inkjet line, and the method includes: S10: The flaw detection device and the inkjet head establish a master-slave node relationship according to the communication network protocol, where the flaw detection device is the master node and the inkjet head is the slave node; S20: The master node real-time collects the flaw detection signals of the copper pipe, encapsulates the flaw detection signals into data packets carrying timestamps, and transmits them to the slave node according to the communication network protocol; S30: After receiving the data packet, the slave node parses the timestamp and calculates the inkjet trigger compensation time based on the network transmission delay prediction model; S40: Generate a synchronous inkjet instruction according to the inkjet trigger compensation time, and control the inkjet head to mark at the defect position of the copper pipe; S50: Periodically check the clock deviation data of the master and slave nodes based on the communication network protocol, and dynamically update the network transmission delay prediction model.
[0023] Specifically, the flaw detection device serves as the master node, and the inkjet head serves as the slave node. The two establish a master-slave node relationship through a standard communication network protocol. The master node and the slave node align their clocks by periodically broadcasting synchronization frames, which contain the local clock value of the master node and the transmission delay calibration parameters. The master node (flaw detection device) will collect the flaw detection signals of the copper pipe in real time, encapsulate the collected signals, and attach a timestamp. The data packet contains the timestamp, which is generated based on the current clock value of the master node. This data packet is then transmitted to the slave node (inkjet head) according to the communication protocol. After receiving the data packet transmitted by the master node, the slave node will parse the timestamp in the data packet. By using the network transmission delay prediction model, the slave node calculates the inkjet trigger compensation time based on factors such as the current network transmission delay and clock difference. This compensation time is used to adjust the marking time of the inkjet head to ensure that the inkjet mark is accurately marked at the defect position of the copper pipe. Based on the calculated inkjet trigger compensation time, the slave node generates a synchronous inkjet instruction and transmits the instruction to the inkjet head. The inkjet head makes an accurate mark at the defect position of the copper pipe according to the synchronous instruction to ensure the synchronization of the marking position and the flaw detection signal. According to the communication network protocol, the master and slave nodes will regularly check the clock deviation data. In each cycle, the master node will send a synchronization request, carrying data such as the local clock value and the ambient temperature. The slave node will return its local clock value according to the received synchronization request, and calculate the clock deviation by comparison. If the variance of the clock deviation data exceeds the preset threshold, the network transmission delay prediction model will be dynamically updated to adjust the calculation accuracy of the network delay and ensure the accuracy of the timing synchronization.
[0024] Through the technical solution of the present invention, the problem of mark offset caused by network jitter and clock drift in high-speed production lines is solved.
[0025] Furthermore, as Figure 2 shown, the communication network protocol includes: The master node and the slave node align their clocks by periodically broadcasting synchronization frames, and the synchronization frames contain the local clock value of the master node and the transmission delay calibration parameters; When the master node encapsulates the flaw detection signal into a data packet, it generates a timestamp based on the current clock value and associates and encodes the timestamp with the flaw detection signal; After receiving the data packet, the slave node calculates the network transmission delay based on the difference between the timestamp and the local clock value, combined with the transmission delay calibration parameters; If the network transmission delay in multiple consecutive cycles exceeds the preset threshold, trigger the master and slave nodes to switch to the backup communication channel to transmit data packets.
[0026] Preferably, as in the above embodiments, in this embodiment, the master node and the slave node align their clocks by periodically broadcasting synchronization frames, which include the local clock value of the master node and the transmission delay calibration parameters. In each period, the master node broadcasts its local clock value (i.e., the current timestamp) and the transmission delay calibration data of the network to the slave node. The slave node adjusts its local clock according to the received synchronization frame to ensure that the clocks of the master and slave nodes can be synchronized as much as possible. After the flaw detection signal is collected, the master node encapsulates the flaw detection signal data into a data packet and generates the current timestamp, which is generated based on the local clock value of the master node and is used to accurately mark the collection moment of the flaw detection signal. Subsequently, the timestamp and the flaw detection signal are encoded and packed together for subsequent transmission. The structure of the data packet will include information such as the timestamp, the flaw detection signal data, and the calibration parameters. When the slave node receives the data packet transmitted by the master node, the slave node extracts the timestamp in the data packet and compares it with the local clock value, calculates the difference between the timestamp and the local clock value. This difference represents the transmission delay when the slave node receives the data packet. Combining the transmission delay calibration parameters in the synchronization frame, the slave node can accurately calculate the network transmission delay. During the implementation process, the network transmission delay calculated in each period is monitored. If the calculated network transmission delay exceeds the preset threshold (for example, the delay exceeds a certain maximum value or the deviation exceeds the preset range) for multiple consecutive periods, the master and slave nodes automatically switch to the backup communication channel. This backup channel can be another physical link, wireless link, or other redundant network channels. The purpose of switching the backup channel is to improve the reliability of data transmission and reduce the timing asynchronization and data loss caused by network congestion or interference. Once switched to the backup communication channel, the data packets between the master and slave nodes will be transmitted through the new channel. The backup channel should have sufficient bandwidth and stability to ensure the real-time and accuracy of data transmission. The switching of the backup channel and the data transmission process can be monitored in real time to ensure that the transmission quality and timing synchronization problems can be solved in a short time.
[0027] Furthermore, the association encoding of the timestamp and the flaw detection signal includes: Embedding the timestamp into the header field of the data packet containing the flaw detection signal and appending a cyclic redundancy check code at the end. The cyclic redundancy check code is generated based on the joint calculation of the header field and the payload of the flaw detection signal; Fragmenting and encoding the data packet. Each fragment contains a timestamp fragment, a flaw detection signal fragment, and a fragment sequence identifier, and each fragment is transmitted through an independent communication channel; After the slave node receives the fragments, it reorganizes the data packet according to the fragment sequence identifier and verifies the integrity of the cyclic redundancy check code; If the cyclic redundancy check fails, request the master node to retransmit the target fragment and delay the calculation of the inkjet trigger compensation time until the data packet is completely received.
[0028] Preferably, in this embodiment, when the main node encapsulates the flaw detection signal data into a data packet, it embeds a timestamp into the header field of the data packet. The header field not only contains the current timestamp but may also contain other control information (such as data packet type, sequence number, etc.). At the end of the data packet, a cyclic redundancy check code (CRC) is appended. The CRC code is generated based on the joint calculation of the header field and the flaw detection signal payload. The CRC is used to detect the integrity and correctness of the data during transmission, ensuring that the data packet has not been corrupted or damaged during transmission. To address network bandwidth or transmission limitation issues, the main node performs fragmentation encoding on the data packet. Each fragment contains a timestamp fragment, a flaw detection signal fragment, and a fragment sequence identifier. The timestamp fragment is partial information of the entire timestamp, the flaw detection signal fragment is a part of the complete flaw detection signal, and the fragment sequence identifier is used to mark the order of the fragment in the data packet. Each fragment will be transmitted through an independent communication channel to increase the reliability of transmission and bandwidth utilization. After receiving all the fragments, the slave node will reconstruct the data packet according to the fragment sequence identifier in each fragment. Through the sequence identifier, it ensures that all fragments are merged into a complete data packet in the correct order. After reconstruction, the slave node will also perform a CRC check to verify the integrity and correctness of the data packet. If the CRC check passes, the content of the data packet will be further used for timing synchronization processing. If the slave node finds that the CRC check fails during the reconstruction of the data packet, it indicates that data loss or damage may have occurred during data transmission. At this time, the slave node will request the main node to retransmit the target fragment. The retransmission request includes the identifier of the incorrect fragment, and the main node will retransmit the damaged or lost fragment according to the request. During the process of the slave node re-requesting the fragment and receiving the target fragment, the slave node will delay the calculation of the inkjet trigger compensation time until it receives the complete data packet. This can ensure that the inkjet trigger time is correctly calculated only when the data packet is complete and error-free, avoiding marking errors or timing problems caused by incomplete data. The fragmentation of the data packet can be transmitted through multiple redundant transmission channels. These channels may be physical links, wireless links, or other types of network channels. By means of redundant channel transmission, the reliability of transmission and the anti-interference ability can be improved, ensuring the stable transmission of the data packet in the network.
[0029] Furthermore, performing fragmentation encoding on the data packet includes: Dynamically calculating a fragmentation length threshold according to the current network jitter parameter and the data packet size, and dividing the data packet into multiple fragments, where the length of each fragment does not exceed the fragmentation length threshold; Allocating an independent communication channel for each fragment based on a load balancing strategy, and the load balancing strategy is to dynamically select a preferred channel according to the real-time delay and packet loss rate of each independent communication channel; Insert redundant shards into each shard. The number of redundant shards is positively correlated with the network jitter parameter, and the redundant shards contain the cross-check codes of adjacent shards; Attach an encrypted identifier to the shard sequence identifier of each shard. The encrypted identifier is generated based on the clock synchronization data of the master and slave nodes; Before transmitting the shard, pre-verify the logical consistency between the shard sequence identifier and the timestamp segment. If the verification fails, discard the shard and trigger a local shard recombination alarm.
[0030] As a preference of the above embodiments, in this embodiment, the master node dynamically calculates the maximum length of each data shard according to the jitter parameter of the current network (such as network delay fluctuation and transmission speed fluctuation) and the size of the data packet to be transmitted. This can ensure that the size of each shard is suitable for the transmission capacity of the network and avoid problems such as timeouts or packet losses caused by over-large shards; the master node will allocate different communication channels for each data shard according to the load balancing strategy. This load balancing strategy will monitor the network conditions (such as delay and packet loss rate) of each communication channel in real time and dynamically select a suitable transmission channel according to this real-time data. If the delay of a certain channel is relatively high or the packet loss rate is too large, automatically select other channels with better performance to transmit the corresponding shard, thereby improving the stability and efficiency of data transmission; in each data shard, the master node will insert redundant shards. The number of redundant shards will be adjusted according to the network jitter situation. When the network jitter is large, the number of redundant shards will increase to enhance the fault tolerance of the data. Each redundant shard will contain the cross-check codes of adjacent shards, which helps to detect and repair possible errors or losses during the transmission process and ensure the integrity and correctness of the data; an encrypted identifier will be attached to the shard sequence identifier of each data shard to ensure that the sequence identifier will not be tampered with during the transmission process. This encrypted identifier is generated based on the clock synchronization data of the master and slave nodes, thereby ensuring the uniqueness and security of the sequence identifier. Through this mechanism, the slave node can verify the order of the data packets and ensure their consistency; before transmitting the data shards, the master node will pre-verify the logical consistency between the shard sequence identifier and the timestamp segment. If it is found that the association between the shard sequence identifier and the timestamp segment is inconsistent, the shard will be discarded, and at the same time, a local shard recombination alarm will be triggered. This pre-verification step can prevent subsequent timing problems caused by incorrect order or data loss, thereby ensuring the reliability and accuracy of data transmission; after receiving all the shards, the slave node will recombine the data packets according to the sequence identifier and the timestamp segment. If it is found that there are errors or inconsistencies between the shards, the system will issue an alarm and try to re-request the lost or incorrect shards. After the recombination is completed, the slave node will verify the integrity of the data packet and perform timing synchronization processing based on the recombination result.
[0031] Furthermore, as Figure 3As shown, a network transmission delay prediction model is established, including: Initialize the network transmission delay prediction model, and construct a reference delay matrix through the initial clock synchronization data between the master and slave nodes. The reference delay matrix contains the theoretical transmission delay values under different incoming material transmission speeds; During real-time communication, periodically collect the clock deviation data and network jitter parameters of the master and slave nodes to generate a dynamic delay correction coefficient; Perform a convolution operation on the dynamic delay correction coefficient and the reference delay matrix to update the weight parameters of the network transmission delay prediction model; If the variance of the clock deviation data exceeds a preset threshold for multiple consecutive periods, it is determined that the network state is abnormal, and the re-initialization operation of the network transmission delay prediction model is triggered.
[0032] As a preference of the above embodiments, in this embodiment, the initialization of the network transmission delay prediction model is based on the initial clock synchronization data between the master and slave nodes. At startup, the master and slave nodes will perform a preliminary clock synchronization and construct a reference delay matrix based on the synchronization result. This matrix contains the theoretical transmission delay values under different incoming material transmission speeds. The establishment process of the reference delay matrix takes into account the initial state of the network and known transmission characteristics, including factors such as the bandwidth, delay, and path selection of the physical layer, to form a reference model for predicting subsequent network transmission delays. During operation, the master and slave nodes will regularly collect clock deviation data and network jitter parameters (such as the fluctuation amplitude of network delay, packet loss rate, etc.). These data are the key to dynamically adjusting the network transmission delay prediction model. The clock deviation data reflects the accuracy of the clock synchronization between the master and slave nodes, while the network jitter parameters provide information on the instability of network transmission. By regularly collecting these data, the system can timely detect changes in network transmission and make corresponding adjustments. According to the periodically collected clock deviation data and network jitter parameters, a dynamic delay correction coefficient is generated. The dynamic delay correction coefficient is used to correct the transmission delay prediction values in the reference delay matrix. The generation of the dynamic delay correction coefficient takes into account the current real-time situation of the network (such as factors like delay fluctuation and packet loss) to ensure that the transmission delay prediction model better fits the current network environment. The dynamic delay correction coefficient is convolved with the reference delay matrix to update the weight parameters of the network transmission delay prediction model. Convolution operation can perform weighted processing on the historical data of the model, making the model more accurately reflect the current network transmission delay. As the data is continuously accumulated and updated, the network transmission delay prediction model can gradually improve the prediction accuracy, ensuring that the inkjet head can be synchronized according to the most accurate transmission delay information during precise marking. During real-time operation, if the variance of the clock deviation data exceeds a preset threshold for multiple consecutive cycles, it is determined that the network state is abnormal. The increase in variance means that there are large fluctuations in the clock deviation, which may be caused by a sharp change in the network condition or a device failure. At this time, a re-initialization operation of the network transmission delay prediction model is triggered. The re-initialization operation will reconstruct the delay prediction model based on the current network state and clock synchronization data to ensure that the system can return to the normal synchronization state. The re-initialization operation involves clearing the old data in the current network transmission delay prediction model and recalculating the reference delay matrix and correction coefficient with the new clock synchronization information and network transmission parameters. This process is usually carried out after the network state returns to normal to avoid incorrect delay prediction affecting the inkjet head marking synchronization.
[0033] Furthermore, calculating the inkjet trigger compensation time includes: Obtaining a historical transmission delay data set, which contains the clock deviation data, network jitter parameters, and incoming material transmission speed between the master and slave nodes; Based on the historical transmission delay data set, train an initial delay prediction model through a time series analysis algorithm and output a delay prediction value; Calculate the theoretical inkjet trigger time according to the timestamp parsed by the slave node and the current incoming material transmission speed; Superimpose the delay prediction value and the theoretical inkjet trigger time to generate an inkjet trigger compensation time.
[0034] Preferably, as in the above embodiments, in this embodiment, it is first necessary to collect and obtain a historical transmission delay data set, which includes clock deviation data, network jitter parameters, and incoming material transmission speed between the master and slave nodes. These data record the transmission delay, clock synchronization, and network fluctuation characteristics between the master and slave nodes in different network environments. The clock deviation data represents the difference between the clocks of the master and slave nodes, the network jitter parameters reflect the volatility of network latency, and the incoming material transmission speed is a key factor in network transmission rate. By collecting these historical data, the network transmission characteristics are modeled, providing a basis for subsequent delay prediction; based on the obtained historical transmission delay data set, a time series analysis algorithm is used to train an initial delay prediction model. The time series analysis algorithm can include autoregressive model (AR), moving average model (MA), ARIMA (autoregressive integrated moving average model), etc., aiming to extract the change pattern of delay from historical data and predict the future network transmission delay. Through this method, a preliminary delay prediction model is generated, which can predict the transmission delay between the master and slave nodes according to historical data. Finally, the time series analysis algorithm outputs a delay prediction value for the subsequent calculation of the inkjet trigger compensation time; after the slave node parses the timestamp, the theoretical inkjet trigger time is calculated in combination with the current incoming material transmission speed. The theoretical inkjet trigger time refers to the time when the inkjet head should be triggered without considering network delay and clock deviation to mark the defects on the copper tube. The calculation of this time point is usually based on the timestamp of the flaw detection signal collected by the master node and the transmission speed of the copper tube (incoming material transmission speed) to ensure that the inkjet mark accurately corresponds to the defect position. Through these parameters, the system can generate a theoretical inkjet trigger time; to ensure that the inkjet head can accurately synchronize to the defect position, the delay prediction value is superimposed on the theoretical inkjet trigger time to generate the inkjet trigger compensation time. The delay prediction value is derived from the previously trained delay prediction model and represents the expected network transmission delay. By adding this delay prediction value to the theoretical inkjet trigger time, the inkjet trigger time is adjusted to compensate for the effects of network delay and clock deviation. Finally, the generated inkjet trigger compensation time can ensure that the inkjet head accurately marks at the actual defect position; once the inkjet trigger compensation time is generated, the master and slave nodes can synchronize based on this compensation time. The master node adjusts the time of the inkjet trigger command to ensure that the inkjet head marks at the correct position according to the new compensation time. In this way, even in the presence of network delay and clock deviation, the inkjet mark can still be accurate to the defect position.
[0035] Furthermore, as Figure 4 shown, the clock deviation data of the master and slave nodes is periodically verified based on the communication network protocol, including: The master node sends a synchronization request instruction to the slave node, and the synchronization request instruction carries the local clock value of the master node and the current environmental temperature parameter; After receiving the synchronization request instruction, the slave node records the reception timestamp and encapsulates the reception timestamp and the local clock value into a synchronization response data packet and returns it to the master node; The master node calculates the one-way transmission delay between the master and slave nodes based on the difference between the synchronization request sending time and the synchronization response reception time, and corrects the clock deviation data in combination with the environmental temperature parameter; If the variance of the clock deviation data for multiple consecutive cycles exceeds the preset threshold, it is determined that the clock synchronization is abnormal, the sending period of the synchronization request is shortened, and the recalibration of the network transmission delay prediction model is triggered.
[0036] As a preference of the above embodiments, during normal operation, the master node periodically sends a synchronization request instruction to the slave node to align the clocks between the master and slave nodes. The instruction carries the local clock value of the current master node to represent the specific time when the request is sent. At the same time, it also includes the current ambient temperature parameter for subsequent temperature compensation of the clock deviation. The ambient temperature data is sourced from a temperature sensor inside or outside the master node and can reflect the temperature fluctuations of the environment where the device is located in real time. The slave node immediately records the timestamp of receiving the synchronization request instruction locally at the moment of receiving it, and encapsulates the timestamp and the current local clock value of the slave node into a synchronization response data packet and returns it to the master node. The response packet not only contains the receiving timestamp and the clock value, but also can append a confirmation flag of the receiving time for the master node to verify the validity of the response. After receiving the synchronization response data packet, the master node compares the time when it sent the request with the time when it received the response, and calculates the one-way transmission delay between the master and slave nodes therefrom. Subsequently, the master node combines the received timestamp of the slave node and calculates the clock deviation between the two. To ensure more accurate calculation, the ambient temperature parameter is used to correct the calculation result because temperature changes will affect the frequency of the crystal oscillator inside the device, resulting in clock drift. Therefore, the temperature compensation mechanism can effectively improve the accuracy of clock synchronization. Continuously record the clock deviation data between the master and slave nodes in each cycle and perform statistical analysis on these data. If the fluctuation amplitude of the clock deviation data (i.e., the variance of the deviation) exceeds the stable threshold set by the system in multiple consecutive cycles, it indicates that the clock synchronization between the master and slave nodes is abnormal and may be affected by factors such as network jitter, drastic temperature changes, and hardware instability. Once it is determined that the clock synchronization is abnormal, the following two measures will be taken immediately. One is to shorten the sending cycle of the synchronization request, that is, the master node increases the sending frequency of the synchronization request to perform synchronization more densely, enhance the timeliness of clock alignment, and reduce error accumulation. The other is to trigger the recalibration of the network transmission delay prediction model. At the same time, start the recalibration process of the delay prediction model, re-evaluate the network transmission characteristics and update the model parameters to adapt to the new network state and transmission conditions to ensure that the subsequent inkjet trigger control can still maintain high precision.
[0037] Furthermore, triggering the recalibration of the network transmission delay prediction model includes: Periodically collect the real-time communication data between the master and slave nodes, including the current clock deviation data, network jitter parameters, and incoming material transmission speed; Compare the real-time communication data with the theoretical transmission delay values in the reference delay matrix to generate a delay error matrix; Optimize the delay error matrix based on the gradient descent algorithm and calculate the update amount of the weight parameters of the network transmission delay prediction model; Dynamically adjust the learning rate according to the incoming material transmission speed. When the incoming material transmission speed exceeds the preset threshold, reduce the learning rate to suppress model oscillation; If the prediction error of the network transmission delay prediction model after recalibration does not converge, trigger the historical data backtracking mechanism, and load the benchmark delay matrix of the previous K cycles for local weight rollback, where K can take any value.
[0038] As a preference of the above embodiment, in this embodiment, real-time communication data between the master and slave nodes are periodically collected. These data include: clock deviation data, which indicates the synchronization error between the master and slave node clocks; network jitter parameters, which reflect the delay fluctuation in the network transmission process, mainly including the variation amplitude of the network delay, packet loss rate, etc.; incoming material transmission speed, which refers to the actual transmission speed of the copper pipe on the production line, affecting the timing of data transmission; by collecting these real-time data, the time delay and network status between the master and slave nodes are monitored and analyzed in real time, thereby providing basic data for updating the delay prediction model; after the real-time communication data is collected, the current clock deviation data, network jitter parameters and incoming material transmission speed are compared with the previously established benchmark delay matrix. The theoretical transmission delay values are compared. The benchmark delay matrix reflects the theoretical transmission delay under different network conditions. By comparison, a delay error matrix is generated. This matrix represents the difference between the actual transmission delay and the theoretical transmission delay in the current communication process. The delay error matrix provides key data for subsequent optimization steps. Based on the generated delay error matrix, the delay error is optimized using the gradient descent algorithm. The gradient descent algorithm calculates the gradient of the error and adjusts the model parameters in the direction of minimizing the error, thereby continuously optimizing the delay prediction model. Specifically, by calculating the gradient of the delay error, the weight parameters of the network transmission delay prediction model are updated, making the model more in line with the actual network transmission characteristics and improving the accuracy of delay prediction. When optimizing the delay, the learning rate is adjusted dynamically according to the incoming transmission speed. When the incoming transmission speed is high, the data transmission speed is accelerated and the delay changes more dramatically. At this time, the system needs to reduce the learning rate to avoid the model being too sensitive and to prevent excessive fluctuations or oscillations. On the contrary, when the incoming transmission speed is low, the learning rate can be appropriately increased to adapt to changes more quickly. In this way, the learning process is adjusted according to the actual situation to ensure stable convergence. If the error of the delay prediction model fails to converge during the recalibration process, the historical data backtracking mechanism is triggered. The function of this mechanism is to load the benchmark delay matrix of the previous K cycles and perform local weight rollback. By backtracking the data of the previous few cycles and referring to the stable data in the past, Adjust the weight parameters of the current model so that the model can better adapt to the transmission characteristics of the actual network, thereby avoiding model oscillations caused by the instability of the current network status or other sudden problems. Among them, K can be set to any value according to actual needs. Usually, a smaller value (such as 5 or 10) is selected to roll back the weights of the recent period to help better restore to a more stable state. Through the above optimization and backtracking mechanism, a more accurate network transmission delay prediction model can be finally obtained during the recalibration process. This optimized model will be applied to the subsequent inkjet timing synchronization control to ensure accurate delay prediction based on the latest network status and transmission characteristics, thereby maintaining accurate marking of the inkjet head on the high-speed production line.
[0039] Embodiment 2 Based on the same inventive concept as the time-sequence synchronization control method for a flaw detection inkjet line in the foregoing embodiment, the present invention further provides a time-sequence synchronization control system for a flaw detection inkjet line, and the system includes: A node establishment module, where the flaw detection device and the inkjet head establish a master-slave node relationship according to the communication network protocol, and the flaw detection device serves as the master node and the inkjet head serves as the slave node; A data encapsulation module, where the master node collects the flaw detection signals of the copper tube in real time, encapsulates the flaw detection signals into data packets carrying time stamps, and transmits them to the slave node according to the communication network protocol; A compensation calculation module, after receiving the data packet, the slave node analyzes the time stamp and calculates the inkjet trigger compensation time based on the network transmission delay prediction model; A synchronization marking module, generates a synchronous inkjet instruction according to the inkjet trigger compensation time, and controls the inkjet head to mark at the defect position of the copper tube; A data verification module, periodically verifies the clock deviation data of the master and slave nodes based on the communication network protocol, and dynamically updates the network transmission delay prediction model.
[0040] The above adjustment system in the present invention can be effectively implemented, and the technical effects that can be achieved are as described in the foregoing embodiment, and will not be elaborated here.
[0041] Embodiment 3 Based on the same inventive concept as the time-sequence synchronization control method for a flaw detection inkjet line in the foregoing embodiment, the present invention further provides a time-sequence synchronization control device for a flaw detection inkjet line, which is used to implement a time-sequence synchronization control method for a flaw detection inkjet line.
[0042] The above adjustment system in the present invention can be effectively implemented, and the technical effects that can be achieved are as described in the foregoing embodiment, and will not be elaborated here.
[0043] Although the present application has been described in combination with specific features and their embodiments, it is obvious that various modifications and combinations can be made without departing from the spirit and scope of the present application. Accordingly, the present specification and the drawings are merely exemplary descriptions of the present application defined by the appended claims, and are considered to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalent technologies, the present application is intended to include these changes and modifications.
Claims
1. A method for timing synchronization control of a flaw detection inkjet line, characterized in that, The method includes: The flaw detection device and the inkjet head establish a master-slave node relationship according to the communication network protocol, where the flaw detection device serves as the master node and the inkjet head serves as the slave node; The master node collects the flaw detection signals of the copper tube in real time, encapsulates the flaw detection signals into data packets carrying timestamps, and transmits them to the slave node according to the communication network protocol; After receiving the data packet, the slave node parses the timestamp and calculates the inkjet trigger compensation time based on the network transmission delay prediction model; Generate a synchronous inkjet instruction according to the inkjet trigger compensation time, and control the inkjet head to mark at the defect position of the copper tube; Periodically verify the clock deviation data of the master-slave nodes based on the communication network protocol, and dynamically update the network transmission delay prediction model.
2. The flaw detection inkjet line timing synchronization control method according to claim 1, wherein The communication network protocol includes: The master node and the slave node align the clocks by periodically broadcasting synchronization frames, and the synchronization frames include the local clock value of the master node and the transmission delay calibration parameter; When the master node encapsulates the flaw detection signal into a data packet, it generates a timestamp based on the current clock value, and associates and encodes the timestamp with the flaw detection signal; After receiving the data packet, the slave node calculates the network transmission delay according to the difference between the timestamp and the local clock value, combined with the transmission delay calibration parameter; If the network transmission delay in multiple consecutive periods exceeds the preset threshold, trigger the master-slave nodes to switch to the backup communication channel to transmit the data packet.
3. The flaw detection inkjet line timing synchronization control method according to claim 2, characterized in that, Associating and encoding the timestamp with the flaw detection signal includes: Embedding the timestamp into the header field of the data packet containing the flaw detection signal, and appending a cyclic redundancy check code at the tail, and the cyclic redundancy check code is generated based on the joint calculation of the header field and the payload of the flaw detection signal; Fragment the data packet for encoding, each fragment contains a timestamp fragment, a flaw detection signal fragment and a fragment sequence identifier, and each fragment is transmitted through an independent communication channel; After the slave node receives the fragments, it recombines the data packet according to the fragment sequence identifier, and verifies the integrity of the cyclic redundancy check code; If the cyclic redundancy check fails, request the master node to retransmit the target fragment, and delay the calculation of the inkjet trigger compensation time until the data packet is completely received.
4. The flaw detection inkjet line timing synchronization control method according to claim 3, wherein Fragmenting and encoding the data packet includes: Dynamically calculate the fragment length threshold according to the current network jitter parameter and the size of the data packet, and divide the data packet into multiple fragments, where the length of each fragment does not exceed the fragment length threshold; Allocate the independent communication channels for each fragment based on the load balancing strategy, and the load balancing strategy dynamically selects the priority channel according to the real-time delay and packet loss rate of each independent communication channel; Insert redundant fragments into each fragment, and the number of redundant fragments is positively correlated with the network jitter parameter, and the redundant fragments contain cross-check codes of adjacent fragments; Append an encryption identifier to the fragment sequence identifier of each fragment, and the encryption identifier is generated based on the clock synchronization data of the master-slave nodes; Before transmitting the fragment, pre-verify the logical consistency of the fragment sequence identifier and the timestamp fragment, and if the verification fails, discard the fragment and trigger a local fragment recombination alarm.
5. The flaw detection inkjet line timing synchronization control method according to claim 1, wherein Establish a network transmission delay prediction model, including: Initialize the network transmission delay prediction model, and construct a reference delay matrix through the initial clock synchronization data between the master and slave nodes. The reference delay matrix contains theoretical transmission delay values under different incoming material transmission speeds; During real-time communication, periodically collect the clock deviation data and network jitter parameters of the master and slave nodes to generate a dynamic delay correction coefficient; Perform a convolution operation on the dynamic delay correction coefficient and the reference delay matrix to update the weight parameters of the network transmission delay prediction model; If the variance of the clock deviation data exceeds a preset threshold for multiple consecutive periods, determine that the network state is abnormal and trigger the re-initialization operation of the network transmission delay prediction model.
6. The flaw detection inkjet line timing synchronization control method according to claim 5, characterized in that Calculate the inkjet trigger compensation time, including: Obtain a historical transmission delay data set, which contains the clock deviation data, the network jitter parameters, and the incoming material transmission speed between the master and slave nodes; Based on the historical transmission delay data set, train an initial delay prediction model through a time series analysis algorithm and output a delay prediction value; Calculate the theoretical inkjet trigger time according to the timestamp parsed by the slave node and the current incoming material transmission speed; Superimpose the delay prediction value and the theoretical inkjet trigger time to generate the inkjet trigger compensation time.
7. The method for timing synchronization control of the flaw detection inkjet line according to claim 1, wherein Periodically verify the clock deviation data of the master and slave nodes based on the communication network protocol, including: The master node sends a synchronization request instruction to the slave node, and the synchronization request instruction carries the local clock value of the master node and the current environmental temperature parameter; After receiving the synchronization request instruction, the slave node records the reception timestamp and encapsulates the reception timestamp and the local clock value into a synchronization response data packet and returns it to the master node; The master node calculates the one-way transmission delay between the master and slave nodes according to the difference between the synchronization request sending time and the synchronization response reception time, and corrects the clock deviation data in combination with the environmental temperature parameter; If the variance of the clock deviation data for multiple consecutive periods exceeds a preset threshold, determine that the clock synchronization is abnormal, shorten the sending period of the synchronization request, and trigger the re-calibration of the network transmission delay prediction model.
8. The flaw detection inkjet line timing synchronization control method according to claim 7, characterized in that Trigger the re-calibration of the network transmission delay prediction model, including: Periodically collect real-time communication data between the master and slave nodes, including the current clock deviation data, network jitter parameters, and incoming material transmission speed; Compare the real-time communication data with the theoretical transmission delay values in the reference delay matrix to generate a delay error matrix; Optimize the delay error matrix based on the gradient descent algorithm and calculate the update amount of the weight parameters of the network transmission delay prediction model; Dynamically adjust the learning rate according to the incoming material transmission speed. When the incoming material transmission speed exceeds a preset threshold, reduce the learning rate to suppress model oscillation; If the prediction error of the network transmission delay prediction model after re-calibration does not converge, trigger the historical data backtracking mechanism, and load the reference delay matrix of the previous K periods for local weight rollback, where K takes any value.
9. The timing synchronization control system of the flaw detection inkjet line is characterized in that, The system includes: A node establishment module, where the flaw detection device and the inkjet head establish a master-slave node relationship according to the communication network protocol, with the flaw detection device as the master node and the inkjet head as the slave node; A data encapsulation module, where the master node collects the flaw detection signals of the copper tube in real time, encapsulates the flaw detection signals into data packets carrying time stamps, and transmits them to the slave node according to the communication network protocol; A compensation calculation module, where after receiving the data packet, the slave node parses the time stamp and calculates the inkjet trigger compensation time based on the network transmission delay prediction model; A synchronization marking module, which generates a synchronous inkjet instruction according to the inkjet trigger compensation time and controls the inkjet head to mark at the defect position of the copper tube; A data verification module, which periodically verifies the clock deviation data of the master and slave nodes based on the communication network protocol and dynamically updates the network transmission delay prediction model.
10. The time sequence synchronization control device for the flaw detection inkjet line is characterized in that It is used to implement the timing synchronization control method of the flaw detection inkjet line as described in claims 1-8.
Citation Information
Patent Citations
Ground marking method for eliminating time drift of crystal oscillator
CN101986095A
Clock synchronization system and method of industrial wireless network
CN114374462A
Method for optimizing synchronization precision of clock synchronization system
CN115941103A
PTP precise time synchronization method for predicting asymmetric time delay
CN115987438A
Automatic ink-jet marking system and method based on flaw detection result of copper pipe
CN116674300A
Cited By
Data processing method and device in solid state disk, electronic equipment and storage medium
CN120724468A
Urban drainage pipe network digital monitoring management system
CN120946956A
Visual alignment method and device for printing draft intelligent deflection and spraying vehicle cooperative control
CN121033161A
Ethernet clock phase synchronization method and related device
CN121308898A