Method, system and equipment for timing synchronization control of flaw detection inkjet line

By establishing a master-slave node relationship with the inkjet head on the copper tube production line, collecting and packaging the flaw detection signal time stamp in real time, combining the delay prediction model and clock deviation verification, dynamically adjusting the inkjet trigger time, the problem of copper tube mark position offset is solved, and high-precision copper tube defect marking is achieved.

CN120382739BActive Publication Date: 2025-08-29常州润来科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

On the copper tube automation production line, the timing synchronization of flaw detection and inkjet marks has problems such as network delay and equipment clock deviation, resulting in mark position offset and affecting product quality.

Method used

The master-slave node relationship is established with the inkjet head through the flaw detection device, and the flaw detection signal is collected in real time and the timestamp is encapsulated. Combined with the network transmission delay prediction model and clock deviation verification, the inkjet trigger time is dynamically adjusted to ensure accurate marking.

Benefits of technology

It realizes high synchronization accuracy of copper tube defect marking, solves the mark offset problem caused by network jitter and clock drift on high-speed production lines, and ensures the accurate marking position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120382739B_ABST
    Figure CN120382739B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of copper tube flaw detection technology, and in particular to a method, system, and device for controlling the timing synchronization of a flaw detection inkjet line. The method comprises: establishing a master-slave node relationship between the flaw detection device and the inkjet head according to a 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 collects the flaw detection signal of the copper tube in real time, encapsulates the flaw detection signal into a data packet carrying a timestamp, and transmits it 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 a network transmission delay prediction model; generates a synchronous inkjet instruction based on the inkjet trigger compensation time, and controls the inkjet head to mark the defect location of the copper tube; and 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. The present invention effectively solves the core problem of mark position offset caused by insufficient clock synchronization accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of copper tube flaw detection, and in particular to a flaw detection inkjet line timing synchronization control method, system and equipment. Background Art

[0002] On automated copper tube production lines, the synchronization of flaw detection and inkjet marking is crucial for ensuring product quality. The flaw detection equipment must identify internal defects in the copper tubes in real time, while the inkjet head must mark the defect location with millisecond-level accuracy. Due to the high production line speed, factors such as network latency in transmitting the flaw detection signal to the inkjet head and clock skew between devices can cause mark position deviations, which can lead to the scrapping of batches of products in severe cases.

[0003] However, traditional methods rely primarily on fixed delay compensation techniques and preset static parameters, making them unable to adapt to dynamic delay variations caused by network jitter and temperature fluctuations. Bidirectional delay estimation techniques can misjudge one-way delays due to the asymmetry of industrial network transmission paths (e.g., differences in uplink and downlink delays). In high-speed production scenarios, these methods can lead to significant mark position offsets, far exceeding the allowable tolerance, becoming a core bottleneck hindering accurate defect marking.

[0004] The information disclosed in this background technology section is only intended to deepen the understanding of the overall background technology of the present disclosure and should not be regarded as an admission or any form of suggestion that the 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 equipment for a flaw detection inkjet line, which can effectively solve the problems in the background technology.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is:

[0007] A method for controlling the timing synchronization of a flaw detection inkjet line, the method comprising:

[0008] The flaw detection device and the inkjet head establish a master-slave node relationship according to a communication network protocol, wherein the flaw detection device serves as a master node and the inkjet head serves as a slave node;

[0009] The master node collects the flaw detection signal of the copper pipe in real time, encapsulates the flaw detection signal into a data packet carrying a timestamp, and transmits it to the slave node according to the communication network protocol;

[0010] After receiving the data packet from the node, the timestamp is parsed and the inkjet trigger compensation time is calculated based on the network transmission delay prediction model;

[0011] Generate a synchronous inkjet instruction according to the inkjet trigger compensation time, and control the inkjet head to mark the defect position of the copper tube;

[0012] Based on the communication network protocol, the clock deviation data of the master and slave nodes are periodically checked and the network transmission delay prediction model is dynamically updated.

[0013] Furthermore, the communication network protocol includes:

[0014] The master node and the slave node align clocks by periodically broadcasting synchronization frames, wherein the synchronization frames include the master node local clock value and transmission delay calibration parameters;

[0015] 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 codes the timestamp with the flaw detection signal;

[0016] 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 in combination with the transmission delay calibration parameter;

[0017] If the network transmission delay in multiple consecutive cycles exceeds a preset threshold, the master and slave nodes are triggered to switch to the backup communication channel to transmit the data packet.

[0018] Furthermore, associating and encoding the timestamp with the flaw detection signal comprises:

[0019] Embed the timestamp into a header field of a data packet containing the flaw detection signal, and append a cyclic redundancy check code at the end, wherein the cyclic redundancy check code is generated by jointly calculating the header field and the payload of the flaw detection signal;

[0020] The data packet is fragmented and encoded, each fragment including a timestamp fragment, a flaw detection signal fragment and a fragment sequence identifier, and each fragment is transmitted through an independent communication channel;

[0021] After receiving the fragments from the slave node, reassemble the data packet according to the fragment sequence identifier and verify the integrity of the cyclic redundancy check code;

[0022] If the cyclic redundancy check fails, a request is made to the master node to retransmit the target segment, and the calculation of the inkjet trigger compensation time is delayed until the data packet is completely received.

[0023] Furthermore, the data packet is fragment-encoded, including:

[0024] dynamically calculating a fragment length threshold based on a current network jitter parameter and the data packet size, and dividing the data packet into a plurality of fragments, wherein the length of each fragment does not exceed the fragment length threshold;

[0025] Allocating the independent communication channel to each shard based on a load balancing strategy, wherein the load balancing strategy dynamically selects a priority channel based on the real-time delay and packet loss rate of each independent communication channel;

[0026] Inserting redundant slices into each slice, wherein the number of the redundant slices is positively correlated with the network jitter parameter, and the redundant slices contain cross-check codes of adjacent slices;

[0027] Adding an encrypted identifier to the fragment sequence identifier of each fragment, wherein the encrypted identifier is generated based on clock synchronization data of the master and slave nodes;

[0028] Before transmitting the fragments, the logical consistency of the fragment sequence identifier and the timestamp segment is pre-verified. If the verification fails, the fragment is discarded and a local fragment reassembly alarm is triggered.

[0029] Furthermore, a network transmission delay prediction model is established, including:

[0030] Initializing the network transmission delay prediction model, and constructing a reference delay matrix using initial clock synchronization data between the master and slave nodes, wherein the reference delay matrix includes theoretical transmission delay values ​​under different incoming material transmission speeds;

[0031] During real-time communication, the clock deviation data and network jitter parameters of the master and slave nodes are periodically collected to generate a dynamic delay correction coefficient;

[0032] Performing 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;

[0033] If the variance of the clock deviation data exceeds a preset threshold value in a plurality of consecutive cycles, it is determined that the network status is abnormal, and a re-initialization operation of the network transmission delay prediction model is triggered.

[0034] Furthermore, the inkjet trigger compensation time is calculated, including:

[0035] Acquire a historical transmission delay data set, wherein the historical transmission delay data set includes the clock deviation data between the master and slave nodes, the network jitter parameter, and the incoming material transmission speed;

[0036] Based on the historical transmission delay data set, an initial delay prediction model is trained by a time series analysis algorithm to output a delay prediction value;

[0037] Calculating a theoretical inkjet triggering time based on the timestamp parsed by the slave node and the current incoming material transmission speed;

[0038] The delay prediction value is superimposed on the theoretical inkjet triggering time to generate the inkjet triggering compensation time.

[0039] Furthermore, periodically checking the clock deviation data of the master and slave nodes based on the communication network protocol includes:

[0040] The master node sends a synchronization request instruction to the slave node, wherein the synchronization request instruction carries the local clock value of the master node and the current ambient temperature parameter;

[0041] After receiving the synchronization request instruction, the slave node records the receiving timestamp, and encapsulates the receiving timestamp and the local clock value into a synchronization response data packet and returns it to the master node;

[0042] 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 ambient temperature parameter;

[0043] If the variance of the clock deviation data for multiple consecutive periods exceeds a 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.

[0044] Furthermore, triggering the recalibration of the network transmission delay prediction model includes:

[0045] Periodically collect real-time communication data between master and slave nodes, including the current clock deviation data, network jitter parameters and incoming material transmission speed;

[0046] Comparing the real-time communication data with the theoretical transmission delay values ​​in the reference delay matrix to generate a delay error matrix;

[0047] Optimizing the delay error matrix based on a gradient descent algorithm to calculate an updated amount of weight parameters of the network transmission delay prediction model;

[0048] Dynamically adjust the learning rate according to the incoming material transmission speed, and reduce the learning rate when the incoming material transmission speed exceeds a preset threshold to suppress model oscillation;

[0049] If the prediction error of the recalibrated network transmission delay prediction model does not converge, the historical data backtracking mechanism is triggered, and the benchmark delay matrix of the previous K cycles is loaded for local weight rollback, where K takes an arbitrary value.

[0050] A timing synchronization control system for a flaw detection inkjet line, the system comprising:

[0051] In the node establishment module, 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;

[0052] Data encapsulation module: the master node collects the flaw detection signals of the copper tube in real time, encapsulates the flaw detection signals into data packets with timestamps, and transmits them to the slave nodes according to the communication network protocol;

[0053] The compensation calculation module, after receiving the data packet from the node, parses the timestamp and calculates the inkjet trigger compensation time based on the network transmission delay prediction model;

[0054] The synchronous marking module generates synchronous inkjet instructions according to the inkjet trigger compensation time, and controls the inkjet head to mark the defect position of the copper tube;

[0055] The 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.

[0056] The timing synchronization control device of the flaw detection inkjet line is used to implement the timing synchronization control method of the flaw detection inkjet line.

[0057] The technical solution of the present invention can achieve the following technical effects:

[0058] Through the dynamic delay prediction model and ambient temperature compensation mechanism, combined with the precise correction of the asymmetric delay of the master and slave nodes, high synchronization accuracy of copper tube defect marking can be achieved, solving the marking offset problem caused by network jitter and clock drift on high-speed production lines.

[0059] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0061] Figure 1 The figure is a flow chart of a timing synchronization control method for an inkjet line for flaw detection;

[0062] Figure 2 It is a schematic diagram of the structure of the communication network protocol;

[0063] Figure 3 A flowchart for establishing a network transmission delay prediction model;

[0064] Figure 4The figure is a flowchart for periodically checking clock deviation data. DETAILED DESCRIPTION

[0065] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0067] Embodiment 1;

[0068] like Figure 1 As shown, the present application provides a method for timing synchronization control of a flaw detection inkjet line, the method comprising:

[0069] S10: 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;

[0070] S20: The master node collects the flaw detection signal of the copper tube in real time, encapsulates the flaw detection signal into a data packet with a timestamp, and transmits it to the slave node according to the communication network protocol;

[0071] S30: After receiving the data packet from the node, the timestamp is parsed and the inkjet trigger compensation time is calculated based on the network transmission delay prediction model;

[0072] S40: Generate a synchronous inkjet instruction according to the inkjet trigger compensation time, and control the inkjet head to mark the defect position of the copper tube;

[0073] S50: Periodically verify 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.

[0074] Specifically, the flaw detection equipment 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 the clocks by periodically broadcasting synchronization frames. These synchronization frames contain the local clock value of the master node and the transmission delay calibration parameters. The master node (flaw detection equipment) collects the flaw detection signal of the copper tube in real time, encapsulates the collected signal, and attaches a timestamp. The data packet contains a 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 the slave node receives the data packet transmitted by the master node, it parses the timestamp in the data packet and calculates the inkjet trigger compensation time based on factors such as the current network transmission delay and clock difference by using the network transmission delay prediction model. This compensation time is used to adjust the marking time of the inkjet head to ensure that the inkjet mark is accurately marked on the defective position of the copper tube; based on the calculated inkjet trigger compensation time, the slave node generates a synchronous inkjet instruction and passes the instruction to the inkjet head. The inkjet head accurately marks the defective position of the copper tube according to the synchronous instruction to ensure that the marking position is synchronized with the flaw detection signal; according to the communication network protocol, the clock deviation data will be regularly checked between the master and slave nodes. In each cycle, the master node will send a synchronization request, carrying local clock value and ambient temperature data; the slave node will return its local clock value based on the received synchronization request, and compare and calculate the clock deviation. 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 to ensure the accuracy of timing synchronization.

[0075] The technical solution of the present invention solves the problem of mark offset caused by network jitter and clock drift in high-speed production lines.

[0076] Further, if Figure 2 As shown, the communication network protocol includes:

[0077] The master node and slave nodes align their clocks by periodically broadcasting synchronization frames, which contain the master node's local clock value and transmission delay calibration parameters.

[0078] 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 the timestamp with the flaw detection signal for encoding;

[0079] After receiving the data packet from the node, the network transmission delay is calculated based on the difference between the timestamp and the local clock value, combined with the transmission delay calibration parameters;

[0080] If the network transmission delay exceeds the preset threshold in multiple consecutive cycles, the master and slave nodes are triggered to switch to the backup communication channel to transmit data packets.

[0081] As a preference of the above embodiment, in this embodiment, the master node and the slave node align their clocks by periodically broadcasting synchronization frames. These synchronization frames contain the master node's local clock value and transmission delay calibration parameters. In each cycle, the master node broadcasts its local clock value (i.e., the current timestamp) and the delay calibration data transmitted by 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 a current timestamp. The timestamp is generated based on the master node's local clock value and is used to accurately mark the collection moment of the flaw detection signal. Subsequently, the timestamp is encoded and packaged together with the flaw detection signal for subsequent transmission. The structure of the data packet will include information such as the timestamp, flaw detection signal data, and calibration parameters. When the slave node receives a 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, and calculates the difference between the timestamp and the local clock value. This difference represents the difference between the timestamp and the local clock value. The delay when the slave node receives the data packet is combined with the transmission delay calibration parameters in the synchronization frame, allowing the slave node to accurately calculate the network transmission delay. During implementation, the network transmission delay calculated in each cycle is monitored. If the calculated network transmission delay exceeds a preset threshold for multiple consecutive cycles (for example, the delay exceeds a certain maximum value or the deviation exceeds a preset range), it automatically triggers the master and slave nodes to switch to a backup communication channel. This backup channel can be another physical link, a wireless link, or other redundant network channel. Switching to the backup channel is intended to improve data transmission reliability and reduce timing asynchrony and data loss caused by network congestion or interference. Once switched to the backup communication channel, 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 real-time and accurate data transmission. The backup channel switching and data transmission process can be monitored in real time to ensure that transmission quality and timing synchronization issues can be resolved in a relatively short time.

[0082] Furthermore, the timestamp is associated with the flaw detection signal and coded, including:

[0083] The timestamp is embedded in the header field of the data packet containing the flaw detection signal, and a cyclic redundancy check code is appended to the end. The cyclic redundancy check code is generated by jointly calculating the header field and the payload of the flaw detection signal.

[0084] The data packet is fragmented and encoded, 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;

[0085] After receiving the fragments from the node, the data packet is reassembled according to the fragment sequence identifier and the integrity of the cyclic redundancy check code is verified;

[0086] If the cyclic redundancy check fails, the master node is requested to retransmit the target segment, and the calculation of the inkjet trigger compensation time is delayed until the data packet is completely received.

[0087] As a preferred embodiment of the above embodiment, in this embodiment, when the master node encapsulates the flaw detection signal data into a data packet, it will embed the 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 the data packet type, sequence number, etc.). At the end of the data packet, a cyclic redundancy check code (CRC) will be 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 to ensure that the data packet is not erroneous or damaged during transmission. In order to cope with network bandwidth or transmission limitations, the master node fragments the data packet. Each fragment contains a timestamp fragment, a flaw detection signal fragment and a fragment sequence identifier. The timestamp fragment is part of the entire timestamp information, the flaw detection signal fragment is part of the complete flaw detection signal, and the fragment sequence identifier is used to mark the order of the fragments in the data packet. Each fragment will be transmitted through an independent communication channel to increase transmission reliability and bandwidth utilization. After receiving all the fragments, the slave node will reassemble the data packet according to the fragment sequence identifier in each fragment and use the sequence identifier to reassemble the data packet. The master node will retransmit the damaged or lost fragment according to the request. In the process of re-requesting the fragment and receiving the target fragment, the slave node will delay the calculation of the inkjet trigger compensation time until the complete data packet is received. This ensures that the inkjet trigger time will be correctly calculated only when the data packet is complete and correct, avoiding marking errors or timing problems caused by incomplete data. The fragments 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. Transmission through redundant channels can improve the reliability and anti-interference ability of transmission, ensuring stable transmission of data packets in the network.

[0088] Furthermore, the data packet is fragmented and encoded, including:

[0089] Dynamically calculate the fragment length threshold based on the current network jitter parameters and packet size, and divide the packet into multiple fragments, where the length of each fragment does not exceed the fragment length threshold;

[0090] Based on the load balancing strategy, an independent communication channel is allocated to each shard. The load balancing strategy dynamically selects the priority channel based on the real-time delay and packet loss rate of each independent communication channel.

[0091] Insert redundant fragments into each fragment. The number of redundant fragments is positively correlated with the network jitter parameter, and the redundant fragments contain the cross-check code of adjacent fragments.

[0092] Add an encrypted identifier to the shard order identifier of each shard, the encrypted identifier is generated based on the clock synchronization data of the master and slave nodes;

[0093] Before transmitting a fragment, the logical consistency of the fragment sequence identifier and the timestamp segment is pre-verified. If the verification fails, the fragment is discarded and a local fragment reassembly alarm is triggered.

[0094] As a preference of the above embodiment, in this embodiment, the master node dynamically calculates the maximum length of each data fragment based on the jitter parameters of the current network (such as network delay fluctuations and transmission speed fluctuations) and the size of the data packet to be transmitted. This ensures that the size of each fragment is suitable for the transmission capacity of the network and avoids timeout or packet loss problems caused by excessive fragmentation. The master node allocates different communication channels to each data fragment according to the load balancing strategy. This load balancing strategy monitors the network status of each communication channel in real time (such as delay and packet loss rate) and dynamically selects the appropriate transmission channel based on these real-time data. If the delay of a channel is high or the packet loss rate is too large, other channels with better performance will be automatically selected for transmission. Corresponding shards are created to improve the stability and efficiency of data transmission. In each data shard, the master node inserts redundant shards. The number of redundant shards is adjusted according to the network jitter. When the network jitter is large, the number of redundant shards increases to enhance the fault tolerance of the data. Each redundant shard contains the cross-check code of the adjacent shards, which helps to detect and repair errors or losses that may occur during transmission and ensure the integrity and correctness of the data. An encrypted identifier is attached to the shard sequence identifier of each data shard to ensure that the sequence identifier will not be tampered with during transmission. 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 packet and ensure its consistency; before the data fragment is transmitted, the master node will pre-verify the logical consistency of the fragment sequence identifier and the timestamp fragment. If it is found that the association between the fragment sequence identifier and the timestamp fragment is inconsistent, the fragment will be discarded and the local fragment reassembly alarm will be triggered. This pre-verification step can prevent subsequent timing problems caused by sequence errors or data loss, thereby ensuring the reliability and accuracy of data transmission; after receiving all fragments, the slave node will reassemble the data packet according to the sequence identifier and timestamp fragment. If errors or inconsistencies are found between the fragments, the system will issue an alarm and try to re-request the lost or erroneous fragment. After the reassembly is completed, the slave node will verify the integrity of the data packet and perform timing synchronization based on the reassembly results.

[0095] Further, if Figure 3 As shown, a network transmission delay prediction model is established, including:

[0096] Initialize the network transmission delay prediction model and build a benchmark delay matrix based on the initial clock synchronization data between the master and slave nodes. The benchmark delay matrix contains theoretical transmission delay values ​​at different incoming material transmission speeds.

[0097] During real-time communication, the clock deviation data and network jitter parameters of the master and slave nodes are periodically collected to generate dynamic delay correction coefficients.

[0098] Perform 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;

[0099] If the variance of the clock deviation data exceeds a preset threshold over multiple consecutive cycles, the network status is determined to be abnormal, triggering the reinitialization of the network transmission delay prediction model.

[0100] As a preferred embodiment of the above, in this embodiment, the network transmission delay prediction model is initialized 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 build a reference delay matrix based on the synchronization results. The matrix contains theoretical transmission delay values ​​under different incoming material transmission speeds. The process of establishing the reference delay matrix takes into account the initial state of the network and known transmission characteristics, including physical layer bandwidth, delay, path selection and other factors, 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 range of network delay, packet loss rate, etc.) are the key to dynamically adjusting the network transmission delay prediction model. Clock deviation data reflects the accuracy of clock synchronization between master and slave nodes, while network jitter parameters provide information on network transmission instability. By regularly collecting this data, the system can promptly detect changes in network transmission and make corresponding adjustments. Based on 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 value in the reference delay matrix. The generation of the dynamic delay correction coefficient takes into account the current real-time status of the network (such as delay fluctuation and packet loss). To ensure that the transmission delay prediction model is more in line with 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. The convolution operation can weight the historical data of the model so that the model can more accurately reflect the current network transmission delay. With the continuous accumulation and update of data, the network transmission delay prediction model can gradually improve the accuracy of the prediction, ensuring that the inkjet head can be synchronized according to the most accurate transmission delay information during precise marking. In real-time operation, if the variance of the clock deviation data exceeds the preset threshold for multiple consecutive cycles, the network status is judged to be abnormal, and the variance is The increase means that there are large fluctuations in the clock deviation, which may be caused by a sharp change in network conditions or equipment failure. At this time, the re-initialization operation of the network transmission delay prediction model is triggered. The re-initialization operation will re-build the delay prediction model based on the current network status and clock synchronization data to ensure that the system can return to a 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 performed after the network status returns to normal, so as to avoid the influence of erroneous delay prediction on inkjet head marking synchronization.

[0101] Specifically, the inkjet trigger compensation time is calculated, including:

[0102] Obtain a historical transmission delay data set, which includes clock deviation data between master and slave nodes, network jitter parameters, and incoming material transmission speed;

[0103] Based on the historical transmission delay data set, the initial delay prediction model is trained through the time series analysis algorithm to output the delay prediction value;

[0104] Calculate the theoretical inkjet trigger time based on the timestamp parsed from the node and the current incoming material transmission speed;

[0105] The predicted delay value is superimposed on the theoretical inkjet trigger time to generate the inkjet trigger compensation time.

[0106] As a preference for the above embodiment, in this embodiment, it is first necessary to collect and obtain a historical transmission delay data set, which includes clock deviation data between master and slave nodes, network jitter parameters, and incoming material transmission speed. These data record the transmission delay, clock synchronization, and network fluctuation characteristics of the master and slave nodes in different network environments. The clock deviation data represents the difference between the master and slave node clocks, and the network jitter parameters reflect the volatility of the network delay. The incoming material transmission speed is a key factor in the network transmission rate. By collecting these historical data, the network transmission characteristics are modeled and a basis for subsequent delay prediction is provided. Based on the acquired historical data, The transmission delay dataset uses a time series analysis algorithm to train an initial delay prediction model. Time series analysis algorithms can include autoregressive models (AR), moving average models (MA), ARIMA (autoregressive integrated moving average model), etc., which aim to extract the delay change pattern from historical data and predict future network transmission delays. Through this method, a preliminary delay prediction model is generated, which can predict the transmission delay between master and slave nodes based on historical data. Finally, the time series analysis algorithm will output a delay prediction value for the subsequent calculation of the inkjet trigger compensation time; after the slave node parses the timestamp, combined with the current The theoretical inkjet trigger time is calculated based on the incoming material transmission speed. The theoretical inkjet trigger time refers to when the inkjet head should be triggered in order to mark the defects on the copper tube without considering the network delay and clock deviation. 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; in order 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 comes from The previously trained delay prediction model 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 influence of network delay and clock deviation. Ultimately, the generated inkjet trigger compensation time can ensure that the inkjet head accurately marks the actual defect location; once the inkjet trigger compensation time is generated, the master and slave nodes can be synchronized based on this compensation time. The master node adjusts the time of the inkjet trigger instruction 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 marking can still be accurate to the defect location.

[0107] Further, if Figure 4 As shown, the clock deviation data of the master and slave nodes is periodically checked based on the communication network protocol, including:

[0108] The master node sends a synchronization request instruction to the slave node, which carries the local clock value of the master node and the current ambient temperature parameter;

[0109] After receiving the synchronization request instruction, the slave node records the receiving timestamp and encapsulates the receiving timestamp and the local clock value into a synchronization response data packet and returns it to the master node;

[0110] 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 receiving time, and corrects the clock deviation data in combination with the ambient temperature parameter;

[0111] If the variance of the clock deviation data for multiple consecutive cycles exceeds a preset threshold, the clock synchronization is determined to be abnormal, the sending cycle of the synchronization request is shortened, and the recalibration of the network transmission delay prediction model is triggered.

[0112] As a preferred embodiment of the above, 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, which is used to indicate the specific time of sending the request. At the same time, it also includes the current ambient temperature parameters for subsequent temperature compensation of the clock deviation. The ambient temperature data comes from the temperature sensor inside or outside the master node, which can reflect the temperature fluctuation of the environment where the device is located in real time. At the moment of receiving the synchronization request instruction, the slave node immediately records the timestamp of the local reception of the instruction, and encapsulates the timestamp together with 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 clock value, but also can attach a confirmation mark of the receiving time, which is used by 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 sends the request with the time when it receives the response, and infers the one-way transmission delay between the master and slave nodes. Subsequently, the master node combines the received slave node timestamp to calculate the clock deviation between the two, which is To ensure more accurate calculations, the ambient temperature parameter is used to correct the results. Temperature changes can affect the frequency of the device's internal crystal oscillator, leading to clock drift. Therefore, temperature compensation can effectively improve clock synchronization accuracy. Clock deviation data between the master and slave nodes is continuously recorded and statistically analyzed within each cycle. If the fluctuation amplitude of the clock deviation data (i.e., the variance of the deviation) exceeds the system-set stability threshold over multiple consecutive cycles, it indicates that the clock synchronization between the master and slave nodes is abnormal. This may be affected by factors such as network jitter, temperature fluctuations, and hardware instability. Once a clock synchronization anomaly is determined, the following two measures are immediately taken: first, the synchronization request transmission cycle is shortened. In other words, the master node will increase the frequency of synchronization requests to synchronize more frequently, enhance the timeliness of clock alignment, and reduce error accumulation. Second, the network transmission delay prediction model is triggered to recalibrate. At the same time, the delay prediction model recalibration process is initiated to reassess the network transmission characteristics and update the model parameters to adapt to the new network status and transmission conditions, ensuring that subsequent inkjet triggering control still maintains high accuracy.

[0113] Furthermore, triggering the recalibration of the network transmission delay prediction model includes:

[0114] Periodically collect real-time communication data between master and slave nodes, including current clock deviation data, network jitter parameters, and incoming material transmission speed;

[0115] Compare the real-time communication data with the theoretical transmission delay values ​​in the benchmark delay matrix to generate a delay error matrix;

[0116] Optimize the delay error matrix based on the gradient descent algorithm and calculate the updated weight parameters of the network transmission delay prediction model;

[0117] Dynamically adjust the learning rate based on the incoming material transmission speed. When the incoming material transmission speed exceeds the preset threshold, reduce the learning rate to suppress model oscillation.

[0118] If the prediction error of the recalibrated network transmission delay prediction model does not converge, the historical data backtracking mechanism is triggered, and the benchmark delay matrix of the previous K cycles is loaded for local weight rollback, where K takes an arbitrary value.

[0119] 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.

[0120] Embodiment 2;

[0121] Based on the same inventive concept as the timing synchronization control method for a flaw detection inkjet line in the aforementioned embodiment, the present invention further provides a timing synchronization control system for a flaw detection inkjet line, the system comprising:

[0122] In the node establishment module, 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;

[0123] Data encapsulation module: the master node collects the flaw detection signals of the copper tube in real time, encapsulates the flaw detection signals into data packets with timestamps, and transmits them to the slave nodes according to the communication network protocol;

[0124] The compensation calculation module, after receiving the data packet from the node, parses the timestamp and calculates the inkjet trigger compensation time based on the network transmission delay prediction model;

[0125] The synchronous marking module generates synchronous inkjet instructions according to the inkjet trigger compensation time, and controls the inkjet head to mark the defect position of the copper tube;

[0126] The 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.

[0127] The above-mentioned adjustment system in the present invention can be effectively implemented, and the technical effects that can be achieved are as described in the above-mentioned embodiments, which will not be repeated here.

[0128] Embodiment 3;

[0129] Based on the same inventive concept as the timing synchronization control method for a flaw detection inkjet line in the aforementioned embodiment, the present invention also provides a timing synchronization control device for a flaw detection inkjet line, which is used to implement a timing synchronization control method for a flaw detection inkjet line.

[0130] The above-mentioned adjustment system in the present invention can be effectively implemented, and the technical effects that can be achieved are as described in the above-mentioned embodiments, which will not be repeated here.

[0131] Although the present application has been described with reference to specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and drawings are merely illustrative of the present application as defined herein and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, the present application is intended to include such modifications and variations as fall within the scope of the present application and its equivalents.

Claims

1. A timing synchronization control method for a flaw detection inkjet line, characterized in that: The method comprises: The flaw detection device and the inkjet head establish a master-slave node relationship according to a communication network protocol, wherein the flaw detection device serves as a master node and the inkjet head serves as a slave node; The master node collects the flaw detection signal of the copper pipe in real time, encapsulates the flaw detection signal into a data packet carrying a timestamp, and transmits it to the slave node according to the communication network protocol; After receiving the data packet from the node, the timestamp is parsed and the inkjet trigger compensation time is calculated 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 the defect position of the copper tube; Periodically checking the clock deviation data of the master and slave nodes based on the communication network protocol, and dynamically updating the network transmission delay prediction model; Establish a network transmission delay prediction model, including: Initializing the network transmission delay prediction model, and constructing a reference delay matrix using initial clock synchronization data between the master and slave nodes, wherein the reference delay matrix includes theoretical transmission delay values ​​under different incoming material transmission speeds; During real-time communication, the clock deviation data and network jitter parameters of the master and slave nodes are periodically collected to generate a dynamic delay correction coefficient; Performing 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 value in a plurality of consecutive cycles, it is determined that the network status is abnormal, and a re-initialization operation of the network transmission delay prediction model is triggered.

2. The timing synchronization control method for flaw detection inkjet line according to claim 1 is characterized in that: The communication network protocol includes: The master node and the slave node align clocks by periodically broadcasting synchronization frames, wherein the synchronization frames include the master node local clock value and 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 codes 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 in combination with the transmission delay calibration parameter; If the network transmission delay in multiple consecutive cycles exceeds a preset threshold, the master and slave nodes are triggered to switch to the backup communication channel to transmit the data packet.

3. The timing synchronization control method for the flaw detection inkjet line according to claim 2 is characterized in that: Associating and encoding the timestamp with the flaw detection signal includes: Embed the timestamp into a header field of a data packet containing the flaw detection signal, and append a cyclic redundancy check code at the end, wherein the cyclic redundancy check code is generated by jointly calculating the header field and the payload of the flaw detection signal; The data packet is fragmented and encoded, each fragment including a timestamp fragment, a flaw detection signal fragment and a fragment sequence identifier, and each fragment is transmitted through an independent communication channel; After receiving the fragments from the slave node, reassemble the data packet according to the fragment sequence identifier and verify the integrity of the cyclic redundancy check code; If the cyclic redundancy check fails, a request is made to the master node to retransmit the target segment, and the calculation of the inkjet trigger compensation time is delayed until the data packet is completely received.

4. The timing synchronization control method for flaw detection inkjet line according to claim 3 is characterized in that: The data packet is fragmented and encoded, comprising: dynamically calculating a fragment length threshold based on a current network jitter parameter and the data packet size, and dividing the data packet into a plurality of fragments, wherein the length of each fragment does not exceed the fragment length threshold; Allocating the independent communication channel to each shard based on a load balancing strategy, wherein the load balancing strategy dynamically selects a priority channel based on the real-time delay and packet loss rate of each independent communication channel; Inserting redundant slices into each slice, wherein the number of the redundant slices is positively correlated with the network jitter parameter, and the redundant slices contain cross-check codes of adjacent slices; Adding an encrypted identifier to the fragment sequence identifier of each fragment, wherein the encrypted identifier is generated based on clock synchronization data of the master and slave nodes; Before transmitting the fragments, the logical consistency of the fragment sequence identifier and the timestamp segment is pre-verified. If the verification fails, the fragment is discarded and a local fragment reassembly alarm is triggered.

5. The timing synchronization control method for flaw detection inkjet line according to claim 1, characterized in that: Calculate the inkjet trigger compensation time, including: Acquire a historical transmission delay data set, wherein the historical transmission delay data set includes the clock deviation data between the master and slave nodes, the network jitter parameter, and the incoming material transmission speed; Based on the historical transmission delay data set, an initial delay prediction model is trained by a time series analysis algorithm to output a delay prediction value; Calculating a theoretical inkjet triggering time based on the timestamp parsed by the slave node and the current incoming material transmission speed; The delay prediction value is superimposed on the theoretical inkjet triggering time to generate the inkjet triggering compensation time.

6. The timing synchronization control method for flaw detection inkjet line according to claim 1, characterized in that: Periodically checking 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, wherein the synchronization request instruction carries the local clock value of the master node and the current ambient temperature parameter; After receiving the synchronization request instruction, the slave node records the receiving timestamp, and encapsulates the receiving 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 ambient temperature parameter; If the variance of the clock deviation data for multiple consecutive periods exceeds a 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.

7. The timing synchronization control method for flaw detection inkjet line according to claim 6, characterized in that: Triggering recalibration of the network transmission delay prediction model includes: Periodically collect real-time communication data between master and slave nodes, including the current clock deviation data, network jitter parameters and incoming material transmission speed; Comparing the real-time communication data with the theoretical transmission delay values ​​in the reference delay matrix to generate a delay error matrix; Optimizing the delay error matrix based on a gradient descent algorithm to calculate an updated amount of weight parameters of the network transmission delay prediction model; Dynamically adjust the learning rate according to the incoming material transmission speed, and reduce the learning rate when the incoming material transmission speed exceeds a preset threshold to suppress model oscillation; If the prediction error of the recalibrated network transmission delay prediction model does not converge, the historical data backtracking mechanism is triggered, and the benchmark delay matrix of the previous K cycles is loaded for local weight rollback, where K takes an arbitrary value.

8. The timing synchronization control system of the flaw detection inkjet line is characterized by: The method for controlling the timing synchronization of the flaw detection inkjet line according to claim 1 is adopted, wherein the system comprises: In the node establishment module, 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; Data encapsulation module: the master node collects the flaw detection signals of the copper tube in real time, encapsulates the flaw detection signals into data packets with timestamps, and transmits them to the slave nodes according to the communication network protocol; The compensation calculation module, after receiving the data packet from the node, parses the timestamp and calculates the inkjet trigger compensation time based on the network transmission delay prediction model; The synchronous marking module generates synchronous inkjet instructions according to the inkjet trigger compensation time, and controls the inkjet head to mark the defect position of the copper tube; The 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.

9. The timing synchronization control equipment of the flaw detection inkjet line is characterized by: Used to implement any one of the timing synchronization control methods for flaw detection inkjet lines as described in claims 1-7.

Citation Information

Patent Citations

  • Method for optimizing synchronization precision of clock synchronization system

    CN115941103A

  • Automatic ink-jet marking system and method based on flaw detection result of copper pipe

    CN116674300A