A Data Acquisition Method and System for Flat Wire Motor Production Line Based on Distributed Middleware

By using distributed middleware to determine device status and calculate semantic importance in real time, and dynamically adjust the data transmission frequency, the problem of network resource supply and demand mismatch and data loss in data acquisition of flat wire motor production lines is solved, achieving efficient data transmission and integrity assurance.

CN122240337BActive Publication Date: 2026-07-17UPTEC INTELLIGENT MANUFACTURING (WUXI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UPTEC INTELLIGENT MANUFACTURING (WUXI) CO LTD
Filing Date
2026-05-21
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

In existing technologies, the data acquisition scheme for flat wire motor production lines leads to a mismatch between network resource supply and demand, resulting in redundant data packets, occupied network bandwidth, and easy loss of critical data during congestion, which fails to meet the data integrity requirements of high-end manufacturing.

Method used

By employing distributed middleware and connecting devices through a multi-protocol driver pool, the system can determine device status in real time, calculate semantic importance coefficients, dynamically adjust data transmission frequency, and reassemble data at the receiving end to ensure the timely transmission and integrity of critical data.

Benefits of technology

It significantly improves network bandwidth utilization, reduces invalid traffic by 40% to 60%, ensures zero loss of critical data, achieves distributed self-discipline and collaboration, and has strong adaptability and good scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240337B_ABST
    Figure CN122240337B_ABST
Patent Text Reader

Abstract

This invention relates to the field of data acquisition technology for motor production lines, specifically to a method and system for data acquisition in flat wire motor production lines based on distributed middleware. The method includes: loading a driver pool and connecting devices through distributed middleware; mapping register addresses to standard key-value pairs; using state mask logic to determine whether the device is in processing or standby mode; calculating a semantic importance coefficient by combining device status and numerical changes; querying the length of the transmission buffer; calculating a dynamic transmission interval based on the buffer length, capacity, and semantic importance coefficient, increasing the interval as the buffer length increases, and suppressing the increase through an exponential decay term of the importance coefficient; if the received data interval is greater than the sampling period, using a linear interpolation algorithm to complete the data points and write them to the database. This invention improves bandwidth utilization, reduces redundant traffic, and ensures zero-loss and low-latency transmission of critical business data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data acquisition technology for motor production lines. More specifically, this invention relates to a method and system for data acquisition in flat wire motor production lines based on distributed middleware. Background Technology

[0002] As a typical high-end discrete manufacturing scenario, the flat wire motor stator production line integrates a large number of heterogeneous devices from multiple sources, including Siemens PLCs, industrial robots, laser welding machines, and servo presses. To achieve a digital twin of the production line and full-process quality traceability, it is necessary to deploy distributed data acquisition middleware to acquire massive amounts of production process data in real time. This data exhibits typical "dual-modal" characteristics, containing both millisecond-level high-frequency process waveforms such as welding current and press displacement curves, and second-level low-frequency status signals such as equipment alarms and operating modes.

[0003] Currently, most mainstream data acquisition solutions employ a "static periodic polling" mechanism. This means that regardless of whether the equipment is in a critical processing stage or is idle and awaiting materials, the acquisition system packages and sends data at a preset fixed frequency. In practical applications, this mechanism leads to a mismatch between network resource supply and demand. In flat wire motor production, the proportion of non-processing time for equipment is often high, during which time data changes are minimal. Continuous high-frequency transmission generates a large number of redundant data packets, severely consuming valuable network bandwidth and resulting in inflated operating costs.

[0004] Secondly, when multiple high-bandwidth devices simultaneously enter high-load operation, the instantaneous network traffic surges, often exceeding the processing capacity of switches or gateways, leading to buffer overflows. Under the existing "indiscriminate transmission" mechanism, this congestion causes data packets to be randomly dropped, resulting in the loss of critical quality waveform data in the welding process. This directly causes the quality backtracking function of the digital twin system to fail, creating irreparable data gaps and failing to meet the stringent requirements of high-end manufacturing for data integrity. Summary of the Invention

[0005] The purpose of this invention is to propose a data acquisition method and system for flat wire motor production lines based on distributed middleware, in order to solve the problems in the prior art where continuous high-frequency transmission of ordinary data leads to a mismatch between the supply and demand of network resources, and where data packet congestion easily causes important data to fail to be uploaded in a timely manner or to be lost. To this end, this invention provides solutions in the following two aspects.

[0006] In a first aspect, the present invention provides a method for data acquisition in a flat wire motor production line based on distributed middleware, comprising: A multi-protocol driver pool is loaded through distributed middleware, connecting to the underlying production equipment. Register addresses of different devices are uniformly mapped to a standard key-value pair structure. Based on a preset device status mask logic, the system determines in real-time whether a device is in an active processing state or an idle standby state. Based on the determined device status and the collected data values, the semantic importance coefficient of the collected data at the current moment is calculated. This semantic importance coefficient is positively correlated with the device status value and with the magnitude of change in the data value relative to the previous transmission value. The system calls the operating system interface in real-time to query the number of unacknowledged data packets in the transmission buffer to obtain the current transmission buffer length. Based on the current transmission buffer length, the preset maximum buffer capacity, and the semantic importance coefficient, the dynamic transmission interval for the next frame of data is calculated. The calculation logic includes increasing the transmission interval when the buffer length increases, but reducing the increase in transmission interval through an exponential decay term as the semantic importance coefficient increases. The maximum buffer capacity is the product of the estimated link bottleneck bandwidth and the estimated minimum round-trip time (RTT). The estimated link bottleneck bandwidth is obtained by taking the maximum value of the data packet rate that successfully returns an ACK within the sliding observation window, and the estimated minimum RTT is obtained by taking the minimum RTT sample within the sliding observation window. The receiving end parses the sampling time and current interval in the received data packet. For the time gap between adjacent receiving points, if the interval is greater than the minimum physical sampling period, the data points at intermediate moments are automatically filled in based on the linear interpolation algorithm, and the completed continuous time series data is written into the time series database.

[0007] In this way, by judging the equipment status in real time and normalizing the data, the middleware can accurately identify whether the current production line is in a critical processing period or a non-critical idle period, providing basic business semantic support for subsequent data value assessment and avoiding the waste of resources caused by treating all data the same.

[0008] Preferably, calculating the semantic importance coefficient of the data collected at the current moment includes: multiplying the state weight factor and the device state value as the state component; taking the absolute value of the difference between the original data value collected at the current moment and the data value successfully transmitted last time as the data change amplitude; dividing the data change amplitude by the sum of the current data absolute value and the normalization deviation constant to obtain the normalized data change amplitude; multiplying the data fluctuation weight and the normalized data change amplitude as the data fluctuation component; wherein, the data fluctuation weight is equal to one minus the state weight factor; and the sum of the state component and the data fluctuation component is the semantic importance coefficient.

[0009] In this way, by constructing a semantic importance formula that includes two dimensions: business status and data fluctuation, the system can accurately evaluate the value of each frame of data. When the device is in processing mode, the importance remains high regardless of whether the data changes. When the device is in standby mode, the importance will only increase if the data changes abruptly, thus realizing the digital evaluation of data value.

[0010] Preferably, determining in real time whether the device is in an active processing state or an idle standby state based on a preset device status mask logic includes: reading the device's automatic signal, running signal, and fault signal; in response to the automatic signal being valid, the running signal being valid, and the fault signal being invalid, determining that the device is in an active processing state and assigning the device status value a first value; otherwise, determining that the device is in an idle standby state and assigning the device status value a second value; wherein, the first value is greater than the second value.

[0011] In this way, by making specific signal logic judgments, the actual working status of the equipment can be accurately captured, and the abstract production process can be mapped into numerical parameters that the algorithm can understand, ensuring that the algorithm's decisions are closely aligned with actual production operations.

[0012] Preferably, the calculation of the dynamic transmission interval for the next frame of data includes: the product of the maximum congestion penalty time, the square of the buffer occupancy ratio, and the exponential decay factor of the semantic importance coefficient, which is the congestion delay time; the sum of the minimum physical sampling period and the congestion delay time is the dynamic transmission interval; wherein, the buffer occupancy ratio is the ratio of the current transmission buffer length to the maximum buffer capacity; and the exponential decay factor of the semantic importance coefficient is a natural constant. The base is denoted by , and the exponent is the negative of the product of the importance decay slope and the semantic importance coefficient.

[0013] In this way, the middleware can sense the degree of network congestion and dynamically adjust the sending frequency. In particular, the exponential form of importance exemption ensures that high-importance data can still obtain extremely low latency when the network is congested, thus realizing the transmission of critical data.

[0014] Preferably, obtaining the current sending buffer length includes: the middleware calling the operating system's socket interface in real time to query the number of unacknowledged data packets in the current sending queue as the current sending buffer length; during calculation, if the obtained current sending buffer length is greater than the maximum buffer capacity, then the current sending buffer length is taken as the maximum buffer capacity; the maximum buffer capacity is periodically refreshed with the update of the aforementioned sliding observation window.

[0015] Preferably, the multi-protocol driver pool includes drivers adapted to different device communication protocols, and the drivers are loaded through configuration files; the drivers are used to connect to the underlying production devices and map the read register addresses of different devices into a standard key-value pair structure.

[0016] Preferably, when calculating the normalized data change amplitude, the normalization deviation constant is introduced as an addition to the denominator. When the absolute value of the original data value at the current moment is zero, the normalization deviation constant is used to avoid division by zero errors in the calculation process, and the normalization deviation constant is used to smooth the impact of small numerical fluctuations on the semantic importance coefficient. The normalization deviation constant adopts a chain-like adaptive update method. After each successful data transmission, it is updated according to the relationship that the current normalization deviation constant is equal to the product of the normalization deviation constant and the forgetting factor at the previous moment, plus the sum of the product of the current data fluctuation amplitude and the forgetting factor.

[0017] Thus, through the denominator compensation mechanism, while completely eliminating computational logic dead ends, it ensures that the semantic evaluation coefficients can stably and accurately represent the core data features.

[0018] Preferably, the data reassembly process at the receiving end specifically includes: parsing the sampling time and current interval in the data packet header; determining whether the time difference between the currently received data point and the previous data point exceeds the minimum physical sampling period; if it exceeds, generating interpolation points between the two data points according to the step size of the minimum physical sampling period, the value of the interpolation points being calculated by a linear interpolation formula; and writing the original data points and the generated interpolation points into the time series database in chronological order.

[0019] Preferably, the equipment includes a laser welding machine, a servo press, an industrial robot, and a programmable logic controller.

[0020] In the second aspect, the flat wire motor production line data acquisition system based on distributed middleware includes: processor; The memory stores computer instructions for data acquisition from a flat wire motor production line based on distributed middleware. When the computer instructions are executed by the processor, the system performs the aforementioned data acquisition method for a flat wire motor production line based on distributed middleware.

[0021] The beneficial effects of this invention are as follows: It proposes a service perception and flow control engine, which solves the drawbacks of traditional data collection schemes through the collaborative work of the perception layer, decision layer and execution layer, and significantly improves network bandwidth utilization. When the device is in standby or running smoothly, it automatically and significantly reduces the transmission frequency, which can reduce 40% to 60% of invalid redundant traffic, and significantly reduce traffic tariffs and network construction costs.

[0022] Ensuring zero loss of critical business data: Through an "importance exemption mechanism," the priority of critical data is established from a mathematical model. Even under severe network congestion and significantly increased latency of ordinary data, the transmission latency of critical process data can still be locked near the minimum physical sampling period, completely solving the industry problem of critical data loss due to congestion.

[0023] It achieves distributed, self-regulating collaboration: there is no need to deploy a centralized traffic controller, each node makes independent decisions based on local information, and the system has strong scalability and robustness. Attached Figure Description

[0024] Figure 1 The flowchart illustrating the steps of the flat wire motor production line data acquisition method based on distributed middleware in this embodiment is shown in the schematic diagram. Figure 2 The illustration shows the dynamic frequency scheduling response based on service awareness. Figure 3 This illustration shows a comparison of transmission delays under network congestion conditions. Detailed Implementation

[0025] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0026] like Figure 1 As shown, the flat wire motor production line data acquisition method based on distributed middleware in this embodiment includes the following steps: Step S1: Load the multi-protocol driver pool through distributed middleware, connect to the underlying production equipment, map the register addresses of different devices to a standard key-value pair structure, and determine in real time whether the device is in an active processing state or an idle standby state according to the preset device status mask logic.

[0027] In this embodiment, the flat wire motor production line includes equipment such as programmable logic controllers (PLCs) and industrial robots.

[0028] The distributed middleware has a built-in multi-protocol driver pool, which includes drivers adapted to different device communication protocols.

[0029] Specifically, drivers adapted to different device communication protocols can be loaded through configuration files. These drivers connect to the underlying production equipment and map the read register addresses of different devices into a standard key-value pair structure, thus normalizing the data. The register addresses include data block addresses, etc.

[0030] Furthermore, a "device status mask" is preset in the distributed middleware, which is logically bound to three signal points of the device: "running," "faulting," and "automatic." The system reads these three signals in real time.

[0031] Specifically, the system reads the device's automatic signals, operating signals, and fault signals. When the automatic signal is valid, the operating signal is valid, and the fault signal is invalid, the device is determined to be in an active processing state, and the device status value is assigned a first value. Otherwise, it is determined to be in an idle standby state, and the device status value is assigned a second value. The first value is greater than the second value. This status will serve as the core input for subsequent calculations.

[0032] For example, for a laser welding machine, when the automatic mode bit and the running status bit output by its PLC are valid, and there is no fault alarm, the system marks it as an active processing state; if the welding is completed and it is in the waiting for feeding stage, the running status bit becomes invalid, and the system marks it as an idle standby state.

[0033] In this way, through the normalization of multi-source heterogeneous data and the state mapping based on signal logic, the system can perceive the business context of the device in real time and accurately, providing a reliable decision basis for subsequent data classification processing.

[0034] Step S2: Based on the determined device status and the collected data values, calculate the semantic importance coefficient of the collected data at the current moment. The semantic importance coefficient is positively correlated with the device status value and positively correlated with the change in data value relative to the previous sent value.

[0035] In this embodiment, to intelligently distinguish between "data that should be sent" and "data that can be delayed," the system evaluates the value of each frame of data. The value of data depends on two dimensions: business dimension and information dimension. Within the business dimension, data in the processing state is far more valuable than data in the standby state; within the information dimension, data undergoing drastic changes is far more valuable than data with unchanged values.

[0036] Specifically, at the current moment The semantic importance coefficient of the collected data satisfies the expression: ; In the formula, The semantic importance coefficient of the data collected at the current moment, with a value range of [value range missing]. ; This is the state weighting factor; for example, the state weighting factor is 0.6. This is the device status value. If the device is in an active processing state, then... If it is in idle standby mode, then ; This represents the raw data value collected at the current moment; The data value of the last successfully sent data; Let be the normalized deviation constant, denoted as . Its value is no longer fixed, but is updated adaptively in a chain based on the recent background noise level of the sensor in the device. Specifically, after each data transmission is completed, it is updated according to the following relationship. : Normalized deviation constant at the current time Equal to the previous moment With forgetting factor The product of these factors, plus the magnitude of the data fluctuations in this instance. and The sum of the products of . Where the forgetting factor is . The preferred value is 0.95, and the initial value is... Take 0.05.

[0037] Understandably, this update method borrows the idea of ​​chained inheritance, making the current... The value of simultaneously carries both the "stable baseline of the previous moment" and the "incremental information of the current data fluctuation," thus forming a noise baseline trajectory that slowly evolves with the operating status of the equipment. In this way, It can adaptively characterize the recent background noise level of the sensor in the device, which is particularly useful for sensors with inherently large fluctuations, such as laser welding current. Automatically raised to filter out background noise; suitable for sensors with extremely small baseline fluctuations, such as those used in servo press displacement. Automatic convergence amplifies minute mutations, thereby significantly improving the sensitivity of semantic importance coefficients in identifying truly anomalous events.

[0038] It should be noted that this chained update only needs to retain the previous time step. A scalar, requiring no maintenance of historical window cache, can run stably on resource-constrained edge nodes.

[0039] Among them, state weight factor The configuration is based on the principle of simultaneously monitoring full volume during processing and capturing anomalies in standby mode. It acts as a balance, enabling the system to intelligently schedule operations to conserve bandwidth during idle periods (focusing on data fluctuations) and maintain quality during busy periods (focusing on business status). Operators can manually intervene based on the data environment. For example, when bandwidth is extremely limited, operators can reduce the state weighting factor. This allows the system to rely more on data changes to determine the transmission frequency, thereby minimizing bandwidth usage without losing critical data. During network expansion or quality traceability upgrades, operators can increase the state weighting factor. This allows us to obtain data with higher smoothness and continuity, providing a basis for higher-level quality analysis. The normalized data variation range is calculated by introducing the normalization deviation constant as an addition to the denominator when calculating the normalized data variation range. When the absolute value of the original data value at the current moment is zero, the normalization deviation constant is used to avoid division by zero errors in the calculation process, and the normalization deviation constant is used to smooth the influence of small numerical fluctuations on the semantic importance coefficient.

[0040] It should be noted that, due to the integration of multiple heterogeneous devices into this system, and to meet strict mathematical calculation standards, the raw data values ​​collected at the current moment in the above formulas are... And the data value of the last successful transmission Before addition operations in the denominator and difference operations in the numerator, the values ​​were pre-divided by the reference physical units corresponding to the respective sensor ranges to achieve dimensionless processing. Therefore, the normalized deviation constant... It can be used as a pure numerical value to directly participate in zero-point smooth addition operations.

[0041] Assuming the equipment is in an active processing state and the data is stable, the equipment status value at this time is... Assuming the currently collected welding current value The last successfully sent data value A.

[0042] Data change range =2A; denominator part =210; Data fluctuation term is .

[0043] The calculated semantic importance coefficient is 0.6038.

[0044] It is evident that when the device is in an active processing state, even with minimal data fluctuations, the semantic importance coefficient remains high, above 0.6.

[0045] Assuming the device is in idle standby mode and the data remains unchanged, what is the device status value at this time? Assuming the currently collected welding current value The last successfully sent data value A.

[0046] The calculated semantic importance coefficient is 0.06. At this point, the semantic importance coefficient is extremely low, and the system determines that the data is non-critical data.

[0047] Suppose the device is in idle standby mode, but an alarm suddenly occurs. What is the device status value at this time? Assuming an alarm code is currently being read. (Sudden malfunction), last time .

[0048] Data change range =50A; Denominator part =60; Data fluctuation term is .

[0049] The calculated semantic importance coefficient is 0.3932.

[0050] It is evident that even in standby mode, sudden data changes can significantly increase importance and prevent missed faults.

[0051] On the forgetting factor The basis for the setting: The closer to 1, The smoother the evolution, the stronger the resistance to sudden noise, but the slower the tracking speed. The closer to 0, the stronger the opposite. Preferred =0.95 is based on: taking the typical cycle time of the production line (approximately 20 sampling points to complete one complete process action), from 1 β = 1 / 20 is derived by working backwards, and this value makes The effective memory length just covers one process cycle, thus filtering out instantaneous jitter within the cycle and updating the baseline in a timely manner when switching cycles.

[0052] In this way, through the evaluation of the above formula, the system can accurately score each frame of data, ensuring that critical business moments and key data changes can be identified as high-value data.

[0053] Step S3: In real time, the operating system interface is invoked to query the number of unacknowledged data packets in the sending buffer to obtain the current sending buffer length. Based on the current sending buffer length, the preset maximum buffer capacity, and the semantic importance coefficient, the dynamic sending interval for the next frame of data is calculated. The calculation logic includes increasing the sending interval when the buffer length increases, but reducing the increase in the sending interval by an exponential decay term as the semantic importance coefficient increases. The buffer length refers to the total number of data packets submitted by the sending end to the operating system protocol stack at the current moment but not yet acknowledged by the receiving end. The buffer length directly reflects the instantaneous backlog of unacknowledged data and is the core state variable of dynamic flow control.

[0054] In this embodiment, the middleware uses the back pressure signal of network congestion as the level of accumulation in the send buffer. The middleware calls the operating system's socket interface in real time to query the number of unacknowledged data packets in the current send queue, which is used as the current send buffer length. The maximum buffer capacity... Instead of using static preset values, online estimation is performed using dynamic bandwidth-delay product based on actual link measurements. The update logic is as follows: The middleware uses a fixed window W as the period, preferably 10 seconds, to count the number of data packets that successfully return ACKs within the window, thus obtaining the instantaneous delivery rate of that window. Simultaneously, record the round-trip time from sending to receiving the ACK for each data packet within this window. From the sliding observation sequence of the K most recent windows (preferably K=10), select... The maximum value is used as the estimated bottleneck bandwidth of the link. The minimum round-trip delay sample is taken as the minimum round-trip delay estimate for the link. Then the maximum capacity of the current buffer. Depend on and The product is obtained.

[0055] Understandably, This reflects the true carrying capacity of the link when no queuing occurs. The product of the two is the "upper limit of data in transit" when the link is in a critical non-congestion state, which is the bandwidth-delay product known in the field of network communication.

[0056] During calculation, if the current send buffer length is greater than Then the current send buffer length value will be used as... This ensures that the buffer occupancy rate is never greater than 1.

[0057] Thus, the buffer occupancy rate The system has been upgraded from a static threshold ratio that relied on manual presets to a dynamic pipeline occupancy ratio that evolves online based on the actual state of the link. This allows for situations where the link experiences a short-term congestion due to downstream jitter but the actual bandwidth remains sufficient. Maintaining a high level makes Synchronous boosting avoids incorrect frequency reduction due to misjudgment of congestion; when the actual bandwidth of the link decreases (e.g., due to switch speed reduction or uplink congestion), Automatic contraction makes As the bandwidth shrinks, the transmission interval automatically expands, achieving node-level autonomous bandwidth adaptation.

[0058] The parameters for the aforementioned sliding observation window are set based on the following: the optimal value for the window length W is 10 seconds, based on the median value of typical process cycle times (5–15 seconds) on the production line, ensuring that each window covers at least one complete process action and avoiding miscalculation of bandwidth reduction due to momentary silence within the cycle; the optimal value for the number of sliding windows K is 10, based on ensuring that the overall observation time (W×K=100 seconds) is approximately equal to the minimum time scale of one changeover / batch change on the flat wire motor production line, ensuring... and The parameters exhibit statistical stability over a changeover cycle. During initial deployment on the production line, both parameters can be fine-tuned based on actual cycle time data without requiring online tuning.

[0059] The dynamic transmission interval of the next frame of data satisfies the expression: ; In the formula, The dynamic transmission interval for the next frame of data; The minimum physical sampling period; Maximum congestion penalty time; For example, the maximum capacity of the buffer. It is 1000; This is the current length of the transmit buffer; The importance decay slope; The semantic importance coefficient of the data collected at the current moment; This is an exemption item based on importance.

[0060] The minimum physical sampling period is determined by the sampling frequency. When the value is 10ms, it means that data is collected once every 10ms. The smaller the minimum physical sampling period, the higher the sampling frequency. Usually, the value is the reciprocal of the sampling frequency required for the data. For example, if the current changes rapidly, the minimum physical sampling period corresponding to the current should be smaller. If the value is too large, it will lead to the loss of high-frequency features.

[0061] Maximum congestion penalty time: When the network is extremely congested, and devices are in standby mode with no data fluctuations (i.e., extremely low semantic importance), the transmission interval will approach [a certain value]. At this point, the dynamic transmission interval reaches its maximum value, reducing the sampling frequency of the data. By actively reducing the transmission frequency of the data packet in the network, network bandwidth is released to the maximum extent, thus avoiding further congestion.

[0062] Importance decay slope: reflects the semantic importance coefficient of the data collected at the current moment. Regarding the impact on the dynamic transmission interval, with a fixed semantic importance coefficient, the greater the slope of importance decay, the greater the decrease in the dynamic transmission interval driven by the exponential term. In other words, the larger this parameter is set, the more sensitive the system's transmission scheduling is to fluctuations in the semantic importance coefficient, and the better it can ensure that critical data instantly receives priority transmission rights during congestion.

[0063] The above formula system is based on the deep integration of semantic communication theory and the dynamic backpressure scheduling mechanism in network control systems. Firstly, the semantic importance coefficient in S2 abandons the traditional dead-zone triggering mechanism that only considers numerical deviation, and instead introduces device state values. The weighted fusion with real-time data fluctuations accurately maps the "information entropy value" of data in the context of industrial control; secondly, the dynamic transmission interval in this step constructs a dual-channel game model, in which the quadratic congestion factor... Based on Lyapunov's drift principle, a nonlinear backoff restraint is applied during cache surges, resulting in an exponential exemption term. It acts as a "privileged pass" for high-value data. The orthogonal product of the two enables an intelligent traffic shaping mechanism that can still guarantee core business flows with deterministic low latency, such as in the event of sudden alarms or drastic current changes, even when the network is extremely congested.

[0064] For example, It takes 10ms; It takes 500ms; The value is 5.0; assuming the current network is severely congested, the send buffer has accumulated 800 data packets, i.e. .

[0065] Given that the current data is key data, the semantic importance coefficient... When it is 0.6038; according to calculations, Index Exemption ; Dynamic transmission interval ms. As can be seen, although the network was very congested (the buffer was 80% full), because the data was important, the transmission interval only increased slightly from 10ms to 25.6ms, which was almost unaffected, thus ensuring the transmission of critical data.

[0066] Given that the current data is non-critical, semantic importance coefficient When it is 0.06; according to calculations, Index Exemption ; Dynamic transmission interval ms. As can be seen, under network congestion, the transmission interval of non-critical data is significantly extended to 247ms, and the system actively reduces the frequency to give up bandwidth for critical data.

[0067] Thus, by introducing network backpressure and importance exemption mechanisms, the system achieves intelligent adaptive scheduling: it automatically suppresses the transmission frequency of low-value data during congestion, while forcibly ensuring low-latency transmission of high-value data, effectively solving the problem of data congestion causing critical data to fail to be uploaded in a timely manner or to be lost.

[0068] Step S4: The receiving end parses the sampling time and current interval in the received data packet. For time gaps between adjacent receiving points, if the interval is greater than the minimum physical sampling period, the data points at intermediate moments are automatically filled in, and the completed continuous time series data is written into the time series database. Specifically, the data points at intermediate moments can be automatically filled in based on linear interpolation algorithms, etc.

[0069] In this embodiment, because the transmitting end employs a dynamic frequency conversion strategy, the data received by the receiving server is uneven along the time axis. To meet the data continuity requirements of digital twin playback, the receiving server performs data reassembly.

[0070] Specifically, the data reconstruction process at the receiving end includes: Parse the sampling time and current interval in the data packet header. Determine whether the time difference between the currently received data point and the previous data point exceeds the minimum physical sampling period; if it does, generate interpolation points between the two data points according to the step size of the minimum physical sampling period, and the values ​​of the interpolation points are calculated by the linear interpolation formula; write the original data points and the generated interpolation points into the time series database in chronological order.

[0071] For two receiving points, assume the data at time point t1 is v1 and the data at time point t2 is v2. If t2 If t1>Tmin, it means that there are data points that were not transmitted due to frequency reduction.

[0072] The system uses a linear interpolation algorithm to generate supplementary data points between t1 and t2 with a step size of Tmin. For example, at the intermediate time t... x value .

[0073] The completed continuous timing data is written into the timing database to ensure that the front-end application is unaware of the underlying frequency conversion transmission.

[0074] Thus, by reassembling the timing at the receiving end, this invention saves transmission bandwidth while shielding the application layer from the unevenness of data sampling, ensuring the integrity and continuity of the final data stored.

[0075] like Figure 2 As shown, when the importance of data services fluctuates at a low level, it indicates that the device is in standby mode. At this time, the transmission interval is high, indicating that the system is implementing a frequency reduction strategy to save bandwidth. When the importance of data services rises to a high level, it indicates that the device has entered a critical processing stage, and the transmission interval drops to its lowest point, indicating that the system immediately switches to full-speed acquisition mode. This intuitively verifies the system's scheduling logic of "saving bandwidth during idle times and ensuring quality during busy times".

[0076] like Figure 3As shown, with the increase of network congestion (X-axis), the latency of existing technologies increases linearly and fluctuates greatly; in this invention, the latency of ordinary data increases sharply and is actively avoided; while the latency of critical data remains close to the bottom, even when the congestion is extremely high (congestion > 80%), it remains at an extremely low level. This strongly demonstrates the absolute guarantee capability of the "importance exemption mechanism" for core business data in extreme environments.

[0077] This invention also provides a flat wire motor production line data acquisition system based on distributed middleware. The system includes a processor and a memory, the memory storing computer program instructions. When the processor executes the computer program instructions, it implements the flat wire motor production line data acquisition method based on distributed middleware described above according to this invention.

[0078] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and therefore will not be described in detail here.

[0079] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented by computer-readable / executable instructions stored or otherwise maintained on such a computer-readable medium.

[0080] In the description of this specification, "multiple" means at least two, such as two, three or more, etc., unless otherwise expressly and specifically defined.

[0081] While various embodiments of the invention have been shown and described in this specification, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention.

Claims

1. A data acquisition method for flat wire motor production lines based on distributed middleware, characterized in that, include: By loading a multi-protocol driver pool through distributed middleware, connecting to the underlying production equipment, uniformly mapping the register addresses of different devices to a standard key-value pair structure, and determining in real time whether the device is in an active processing state or an idle standby state based on the preset device status mask logic; Based on the determined device status and the collected data values, the semantic importance coefficient of the collected data at the current moment is calculated. The semantic importance coefficient is positively correlated with the device status value and positively correlated with the change in the data value relative to the previous sent value. The system continuously calls the operating system interface to query the number of unacknowledged data packets in the transmission buffer to obtain the current transmission buffer length. Based on the current transmission buffer length, the preset maximum buffer capacity, and the semantic importance coefficient, the dynamic transmission interval for the next frame of data is calculated. The calculation logic includes increasing the transmission interval when the buffer length increases, but reducing the increase rate of the transmission interval through an exponential decay term as the semantic importance coefficient increases. The maximum buffer capacity is the product of the estimated link bottleneck bandwidth and the estimated minimum round-trip time. The estimated link bottleneck bandwidth is obtained by taking the maximum value of the data packet rate that successfully returns ACK within the sliding observation window, and the estimated minimum round-trip time is obtained by taking the minimum value of the round-trip time sample within the sliding observation window. The receiving end parses the sampling time and current interval in the received data packet. For the time gap between adjacent receiving points, if the interval is greater than the minimum physical sampling period, it automatically fills in the data points at the intermediate time and writes the completed continuous time series data into the time series database.

2. The method for data acquisition in a flat wire motor production line based on distributed middleware according to claim 1, characterized in that, Calculating the semantic importance coefficient of the data collected at the current moment includes: The product of the state weight factor and the device state value is used as the state component; The absolute value of the difference between the raw data value collected at the current moment and the data value successfully sent last time is taken as the magnitude of the data change; The normalized data variation is obtained by dividing the magnitude of the data change by the sum of the absolute value of the current data and the normalization deviation constant. The product of the data fluctuation weight and the normalized data change amplitude is the data fluctuation component; wherein, the data fluctuation weight is equal to one minus the state weight factor; The sum of the state component and the data fluctuation component is the semantic importance coefficient.

3. The method for data acquisition of flat wire motor production line based on distributed middleware according to claim 2, characterized in that, Based on a preset device status mask logic, the system determines in real time whether the device is in an active processing state or an idle standby state, including: Read the automatic signals, operating signals, and fault signals of the equipment; In response to the automatic signal being valid, the running signal being valid, and the fault signal being invalid, the equipment is determined to be in an active processing state, and the equipment status value is assigned a first value. Otherwise, the device is determined to be in an idle standby state, and the device status value is assigned the second value; The first value is greater than the second value.

4. The method for data acquisition of flat wire motor production line based on distributed middleware according to claim 1, characterized in that, Calculating the dynamic transmission interval for the next frame of data includes: The congestion delay time is the product of the maximum congestion penalty time, the square of the buffer occupancy ratio, and the exponential decay factor of the semantic importance coefficient. The sum of the minimum physical sampling period and the congestion delay time is the dynamic transmission interval; Wherein, the buffer occupancy ratio is the ratio of the current sending buffer length to the maximum buffer capacity; The exponential decay factor of the semantic importance coefficient is a natural constant. The base is denoted by , and the exponent is the negative of the product of the importance decay slope and the semantic importance coefficient.

5. The method for data acquisition of flat wire motor production line based on distributed middleware according to claim 4, characterized in that, Obtaining the current send buffer length includes: The middleware calls the operating system's socket interface in real time to query the number of unacknowledged data packets in the current sending queue as the current sending buffer length; During calculation, if the current transmission buffer length is greater than the maximum buffer capacity, the current transmission buffer length is taken as the maximum buffer capacity; the maximum buffer capacity is periodically refreshed as the sliding observation window is updated.

6. The method for data acquisition of flat wire motor production line based on distributed middleware according to claim 1, characterized in that, The multi-protocol driver pool includes drivers adapted to different device communication protocols. The drivers are loaded through configuration files. The drivers are used to connect to the underlying production devices and map the read register addresses of different devices into a standard key-value pair structure.

7. The method for data acquisition of flat wire motor production line based on distributed middleware according to claim 2, characterized in that, When calculating the normalized data change amplitude, the normalization deviation constant is introduced as an addition to the denominator. When the absolute value of the original data value at the current moment is zero, the normalization deviation constant is used to avoid division by zero errors in the calculation process, and to smooth the impact of small numerical fluctuations on the semantic importance coefficient. The normalization deviation constant adopts a chain-like adaptive update method. After each successful data transmission, it is updated according to the relationship that the current normalization deviation constant is equal to the product of the normalization deviation constant and the forgetting factor at the previous moment, plus the sum of the product of the current data fluctuation amplitude and the forgetting factor.

8. The method for data acquisition of flat wire motor production line based on distributed middleware according to claim 1, characterized in that, The data reconstruction process at the receiving end specifically includes: Parse the sampling time and current interval in the data packet header; Determine whether the time difference between the currently received data point and the previous data point exceeds the minimum physical sampling period; If the value exceeds the limit, an interpolation point is generated between the two data points according to the step size of the minimum physical sampling period. The value of the interpolation point is calculated by the linear interpolation formula. The original data points and the generated interpolation points are written into the time series database in chronological order.

9. The method for data acquisition of flat wire motor production line based on distributed middleware according to claim 1, characterized in that, The equipment includes a laser welding machine, a servo press, an industrial robot, and a programmable logic controller.

10. A flat wire motor production line data acquisition system based on distributed middleware, characterized in that, include: processor; A memory storing computer instructions for data acquisition of a flat wire motor production line based on distributed middleware, wherein when the computer instructions are executed by the processor, the system performs the data acquisition method for a flat wire motor production line based on distributed middleware according to any one of claims 1-9.