Industrial device control method based on multi-protocol fusion and related apparatus
By generating a unified data object through zero-copy parsing and dynamic protocol mapping, combined with sliding window feature fusion and dual-channel control, the problems of multi-protocol parsing delay and insufficient anomaly detection in industrial production lines are solved, achieving efficient and real-time equipment control and fault identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-03-27
AI Technical Summary
In modern industrial production lines, the parsing and conversion of multiple protocols of heterogeneous equipment leads to data link delays, making it difficult to meet the requirements of high-speed real-time response. Furthermore, traditional data analysis methods lack effective heterogeneous feature fusion mechanisms, making it impossible to accurately construct real-time operating condition models of equipment. Anomaly detection algorithms are not accurate enough in identifying specific faults, and control commands are easily blocked when the network fluctuates.
By employing a zero-copy parsing mechanism and dynamic protocol mapping, a unified standard data object is generated. The sliding window time series and static snapshot features are extracted and heterogeneously fused. Combined with an anomaly detection model and a dual-channel control strategy, efficient data processing and rapid control are achieved.
It significantly reduced data processing latency, improved the sensitivity to identify specific abnormal patterns, ensured low-latency transmission of critical control commands, and guaranteed the safety and timeliness of industrial production.
Smart Images

Figure CN121433172B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of industrial automation, and in particular to an industrial equipment control method based on multi-protocol fusion and related devices. BACKGROUND
[0002] With the improvement of industrial automation level, modern production lines usually integrate visual detection systems, programmable logic controllers and various environmental sensors. These heterogeneous devices often use different communication protocols for data interaction, resulting in challenges in system integration in terms of multi-protocol analysis and conversion. Existing data acquisition and conversion schemes usually rely on multiple memory copies and complex serialization processes. This processing method is prone to accumulate delay in the data link when facing high-frequency communication data streams, and it is difficult to meet the timeliness requirements of millisecond-level real-time response of high-speed production lines.
[0003] In addition, the running state representation of industrial equipment has multi-modal characteristics, including continuous time series data such as temperature and pressure, and non-continuous static physical attribute data such as product size and appearance defects. Traditional data analysis methods often lack effective heterogeneous feature fusion mechanisms, and usually process these two types of data separately or simply concatenate them, resulting in the inability to accurately construct real-time working condition models of equipment in a unified feature space, and the correlation between different dimensional features is easily ignored.
[0004] In the application of anomaly detection algorithms, there is a phenomenon of imbalance between positive and negative samples in industrial production scenarios, that is, the system has a large amount of normal running data, but only a small amount of fault samples. Conventional unsupervised anomaly detection algorithms usually make judgments based on the sparsity of data distribution, and cannot effectively utilize these scarce but valuable fault prior knowledge, resulting in insufficient recognition accuracy and pertinence of the algorithm to specific known fault types.
[0005] At the same time, at the control architecture level, traditional industrial control systems often mix state monitoring data reporting and control instruction issuing in the same communication channel, or excessively rely on remote cloud platform analysis and decision-making. When the network environment fluctuates or the monitoring data throughput instantaneously increases, critical shutdown control instructions are prone to queue congestion, causing the system to fail to complete the blocking of abnormal working conditions within a certain time window, which brings potential adverse effects to the safety and efficiency of industrial production. SUMMARY
[0006] In order to solve the problems of data processing delay accumulation in multi-protocol integration environment and lack of real-time and determinism in industrial anomaly control response, the present application provides an industrial equipment control method based on multi-protocol fusion and related devices.
[0007] In a first aspect, the application provides a multi-protocol fusion-based industrial equipment control method, which adopts the following technical solution:
[0008] A multi-protocol fusion-based industrial equipment control method, comprising the following steps:
[0009] S1. Obtain original communication data streams from different industrial equipment ends, parse the original communication data streams through a zero-copy parsing mechanism according to a preset dynamic protocol mapping relationship, and generate unified standard data objects containing timing information and quality codes;
[0010] S2. Perform shunting processing on the unified standard data objects, extract timing statistical features based on a sliding window and physical attribute features based on a static snapshot respectively, and perform heterogeneous fusion on the timing statistical features and the physical attribute features to construct real-time multi-dimensional feature vectors;
[0011] S3. Input the real-time multi-dimensional feature vectors into a pre-trained anomaly detection model, calculate an anomaly probability value of a current working condition belonging to an abnormal state through path determination logic based on prior sample weights inside the anomaly detection model;
[0012] S4. Compare the anomaly probability value with a dynamic adaptive threshold value, and trigger a double-channel control strategy according to a comparison result:
[0013] When it is determined to be abnormal, generate a high-priority shutdown instruction through a local rapid control channel and directly execute an actuator;
[0014] At the same time, encapsulate the real-time multi-dimensional feature vectors and a determination result into a message object and send them to a remote management platform through a data reporting channel.
[0015] Optionally, in the step S1, the original communication data streams are parsed through a zero-copy parsing mechanism according to a preset dynamic protocol mapping relationship, which comprises:
[0016] Load a preset protocol mapping configuration file, and the configuration file defines a data frame structure of a source end protocol, field definitions of unified standard data objects of a target end, and conversion operators between the data frame structure and the field definitions;
[0017] Based on the configuration file, a dynamic parsing delegate in memory is constructed, and original communication data streams in different protocol formats are mapped into unified standard data objects containing unique identifiers, normalized values, timing information and quality codes in real time.
[0018] Optionally, the zero-copy parsing mechanism in the step S1 comprises:
[0019] When receiving the original communication data stream, a data view is created directly on the receiving buffer using a memory slice technique instead of creating a new byte array copy;
[0020] The allocated unified standard data object memory block is reused through an object pool technique, and the parsed data is directly filled into the reused memory block, so as to reduce the delay caused by memory allocation and garbage collection.
[0021] Optionally, the step S2 of extracting the time series statistical features based on the sliding window comprises:
[0022] A time sliding window with a preset length is set, and the sensor continuous values in the window are statistically calculated;
[0023] The slope feature of the values in the window is extracted to represent the change trend, and the standard deviation feature of the values in the window is extracted to represent the fluctuation stability;
[0024] The time series statistical features are preprocessed by using a noise-resistant normalization method based on the interquartile range, so as to eliminate the influence of sensor noise points on feature distribution.
[0025] Optionally, the path determination logic based on the prior sample weight in the step S3 comprises:
[0026] In the tree structure splitting stage of constructing the anomaly detection model, the distribution difference of the known abnormal samples in each feature dimension is obtained;
[0027] The importance weight of each feature is calculated according to the distribution difference, and the probability of the feature being selected as a splitting point is adjusted according to the importance weight;
[0028] In the inference stage, when the input vector falls into an isolated path composed of high-weight features and the path length is less than a preset threshold, it is determined that the abnormal probability value of the current working condition is increased.
[0029] Optionally, the step S4 of comparing the abnormal probability value with the dynamic adaptive threshold comprises:
[0030] A reference queue is maintained for storing the abnormal probability value distribution of the normal working condition in a preset historical time period;
[0031] The high-side quantile of the reference queue is calculated in real time, and the high-side quantile is taken as the current dynamic adaptive threshold;
[0032] When the abnormal probability value exceeds the product of the dynamic adaptive threshold and a sensitivity coefficient, it is determined to be abnormal.
[0033] Optionally, the step S4 of triggering the double-channel control strategy comprises:
[0034] The local fast control channel is configured to use an industrial control protocol based on a TCP long connection, and a packet merging algorithm is disabled, and the channel is used to directly issue a control instruction to an actuator in a local area network;
[0035] The data reporting channel is configured to use a message queue protocol based on a publish / subscribe mode, and the channel is used to asynchronously transmit data;
[0036] When an exception is determined, the system preferentially schedules a write operation of the local fast control channel, and ensures that the sending of a control instruction is not blocked by communication of the data reporting channel.
[0037] In a second aspect, a computer device is provided, and the following technical solution is used:
[0038] A computer device includes:
[0039] One or more processors;
[0040] Memory;
[0041] One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to:
[0042] Perform the above-mentioned industrial equipment control method based on multi-protocol fusion.
[0043] In a third aspect, a computer readable storage medium is provided, and the following technical solution is used:
[0044] A computer readable storage medium stores a computer program that can be loaded and executed by a processor to perform the above-mentioned method.
[0045] The storage medium stores at least one instruction, at least one program, a code set or an instruction set, which is loaded and executed by the processor to achieve:
[0046] The above-mentioned industrial equipment control method based on multi-protocol fusion.
[0047] In summary, the present application includes at least one of the following beneficial technical effects:
[0048] 1. By using a zero-copy parsing mechanism in cooperation with a dynamic protocol mapping relationship, frequent memory allocation and repeated copying of multi-source heterogeneous data in the protocol conversion process are avoided, and the computational overhead and time delay of the data processing link are significantly reduced, thereby meeting the millisecond-level real-time parsing requirements of high-frequency communication data streams in industrial fields;
[0049] 2、By heterogeneously fusing the sliding window-based time series statistics features with the static snapshot-based physical property features, and combining with the prior sample weight-based path determination logic, not only the unified representation of multi-modal data is realized, but also the sparse fault prior knowledge is effectively utilized to guide the detection model, which improves the recognition sensitivity and generalization ability of the system to specific abnormal patterns;
[0050] 3、By constructing a dual-channel architecture with parallel local fast control channel and data reporting channel, the transmission path of high-priority control instructions and regular monitoring data is decoupled, ensuring that critical shutdown instructions can be directly executed by actuators with deterministic low latency under network fluctuations or data concurrency surges, effectively guaranteeing the safety and response timeliness of industrial production processes. BRIEF DESCRIPTION OF DRAWINGS
[0051] Figure 1 A flowchart of an industrial equipment control method based on multi-protocol fusion in an embodiment of the present application is shown.
[0052] Figure 2 A schematic diagram of a computer device in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0053] The present application will be further described below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are merely intended to explain the present application and not to limit the present application.
[0054] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the inventive concept. As part of this description, some of the diagrams in the drawings represent structures and devices in block diagram form in order to avoid obscuring the inventive concept. Some features of actual implementations can not be described in detail since they would be apparent from the description and drawings. Moreover, the language used in this disclosure has been principally selected for readability and instructional purposes and can not have been selected to delineate or circumscribe the subject application, resort to the claims being necessary to determine such an inventive subject. References in the specification to "one implementation", "an implementation", "a specific implementation" or "specific implementations" mean that a particular feature, structure, or characteristic following the provisions is included in at least one implementation, and multiple references to "one implementation" or "a specific implementation" do not necessarily all refer to the same implementation.
[0055] The terms "a," "an," and "the" are not intended to refer to singular entities but include the general class of which a specific example can be used for illustration. The use of the terms "a" or "an" can mean any number of, including "one," "one or more," "at least one," and "one or more than one." The term "or" means any one of the alternatives, as well as any combination of the alternatives, including all of the alternatives, unless the alternatives are expressly indicated to be mutually exclusive. The phrase "at least one of" in combination with a list of items is intended to refer to a single item from the list of items or any combination of items from the list of items. The phrase does not require all of the listed items.
[0056] In modern intelligent manufacturing scenarios, production sites are usually integrated with heterogeneous devices such as visual detection cameras, programmable logic controllers, and various environmental sensors. These devices often come from different manufacturers and follow different communication standards, such as the Modbus TCP protocol for industrial control, the OPC UA protocol for data exchange, and a custom TCP / IP protocol for visual data transmission. This results in a highly fragmented multi-protocol industrial environment with a large difference in data formats, including high-frequency time-series data such as temperature and pressure, and unstructured static data such as image feature codes. Without unified fusion processing and standardized analysis of this multi-source heterogeneous data, the system will face serious data island challenges. The lack of a unified data model makes it difficult for downstream control logic to handle state information from different sources simultaneously, and independent processing of these protocols can easily lead to the accumulation of analysis delays, making it difficult to achieve real-time synchronization between detection and control.
[0057] Existing conventional solutions usually adopt hard-coded analysis logic or serial forwarding mechanisms. Hard-coded analysis tightly couples business logic with specific communication protocols, requiring code recompilation when devices are replaced, and the system has poor scalability. The serial forwarding mechanism usually involves a process of reading data into application memory, serializing, and then forwarding, which introduces frequent memory allocation and copy operations. In high-frequency data interaction scenarios, this processing method can easily trigger frequent garbage collection mechanisms, causing uncertain jitter in system response time, and cannot meet the strict millisecond-level response time required for error prevention and safety control on high-speed production lines.
[0058] Therefore, the embodiments of the present application disclose an industrial device control method based on multi-protocol fusion, referring to Figure 1 The method overcomes the delay bottleneck and data isolation problems in the prior art by performing steps S1 to S4, using zero-copy analysis based on dynamic mapping, heterogeneous feature fusion, and weighted anomaly detection, effectively ensuring the high real-time and determinism of industrial control.
[0059] S1. Obtain raw communication data streams from different industrial equipment ends, parse the raw communication data streams through a zero-copy parsing mechanism according to a preset dynamic protocol mapping relationship, and generate a unified standard data object containing timing information and quality codes.
[0060] In actual industrial field implementation, the sources of the raw communication data streams are highly heterogeneous, for example, product appearance feature data output by visual detection equipment, device running state register values uploaded by programmable logic controllers, and environmental parameters collected by various independent sensors. The purpose of collecting these multi-source heterogeneous data is to build a comprehensive device working condition view, but if the raw messages are directly processed, the subsequent analysis algorithm will be difficult to adapt to the complex and variable protocol format.
[0061] Therefore, the system maps all parsed data into a unified standard data object. The data object contains multiple key fields, including a unique identifier for accurately positioning the physical measurement point or logical variable of the data source, a normalized value for converting different dimensional raw physical quantities into standardized floating-point numbers or Boolean values that can be directly processed by the algorithm, timing information recording the accurate microsecond-level time when the data is generated, and a quality code identifying the validity status of the current data point.
[0062] Introducing timing information and quality codes is crucial to ensuring the robustness of the system. Since the data transmission of visual equipment is often triggered by events, and PLC data is usually periodic polling, their arrival times are not synchronized. Timing information can be used to align the asynchronous data in subsequent processing and restore the complete picture of the device at the same time. The quality code allows the system to automatically filter out invalid signals marked as unreliable during sensor disconnection, value overflow, or device initialization phase, thereby preventing abnormal detection models from making false judgments due to dirty input data.
[0063] In order to meet the high real-time requirements of the system for preventing misoperation, the entire parsing process is strictly limited within a very short time window, for example, within a delay range of less than 10 milliseconds. The unified standard data object after parsing will reside in a high-speed memory buffer and be directly called by subsequent feature extraction and fusion steps without additional disk I / O operations.
[0064] Optionally, the step S1 of parsing the raw communication data streams through a zero-copy parsing mechanism according to a preset dynamic protocol mapping relationship comprises:
[0065] Loading a preset protocol mapping configuration file, which defines the data frame structure of the source protocol, the field definition of the unified standard data object of the target end, and the conversion operator between the data frame structure and the field definition;
[0066] Based on the configuration file, a dynamic parsing delegate in memory is constructed, and original communication data streams in different protocol formats are mapped in real time into unified standard data objects containing unique identifiers, normalized values, timing information and quality codes.
[0067] The protocol mapping configuration file is specifically a structured text file, for example, written in JSON or XML format, which describes the underlying characteristics of different device communication protocols in detail, including key parameters such as byte offset, read length and data type of data in the message. This pre-constructed configuration method instead of hard coding in the program code aims to completely decouple the underlying communication parsing logic and the upper business processing logic. When different brands of sensors are replaced in the industrial field, resulting in changes in register addresses, or when the communication protocol version of the vision camera is iterated, maintenance personnel only need to update the text configuration file without recompiling and deploying the core source code, significantly reducing the maintenance cost and downtime risk of the system.
[0068] The dynamic parsing delegate constructed based on the configuration file refers to the strongly typed executable code block dynamically generated in memory by the system at the startup stage using expression trees or intermediate language emission technology. Compared with the traditional reflection mechanism, dynamic parsing delegate avoids the performance loss caused by runtime type checking and metadata lookup at each data arrival, and its execution efficiency is close to that of native compiled code, thereby effectively guaranteeing the millisecond-level parsing time efficiency under high-concurrency data stream impact.
[0069] The conversion operator clearly defines the mathematical operations or logical processing rules required to restore the original binary data to values with actual physical meaning. For example, for a linear transformation operator, when the system reads an original integer register value representing temperature from a programmable logic controller, the parsing delegate will perform real-time calculation based on the scaling factor and offset set in the configuration file to convert it to a real Celsius physical value with a decimal point; for a bit mask extraction operator, the system can accurately extract specific bits from a composite state word according to the preset mask rule to represent the running, standby or fault state of the device. This configuration-driven parsing architecture greatly improves the generality and extensibility of the system, enabling it to flexibly adapt to various standard or private industrial communication protocols, achieving rapid access to new devices and seamless upgrading of existing systems.
[0070] Optionally, the zero-copy parsing mechanism in step S1 includes:
[0071] Upon receiving the original communication data stream, a data view is created directly on the receive buffer using memory slicing technology instead of creating a new byte array copy;
[0072] The allocated unified standard data object memory block is reused through the object pool technology, and the parsed data is directly filled into the reused memory block, so as to reduce the delay caused by memory allocation and garbage collection.
[0073] The memory slice technology is a kind of memory logical reference mechanism based on a pointer, such as a Span or a Memory structure in a managed code environment. The technology allows the program to directly read and operate on a specific continuous memory region in the original receiving buffer through a reference address and a length offset without physical memory copying. Compared with the traditional byte array copying method, the memory slice avoids frequent creation of temporary byte array copies in the heap memory, thereby significantly reducing the memory bandwidth occupation.
[0074] The object pool technology pre-allocates and locks a continuous memory space for storing a fixed number of unified standard data object instances during the system initialization phase. In the industrial field with a high-frequency data stream collection condition of up to 100 Hz or even higher, if a new data object is dynamically instantiated for each arriving data packet, the memory resources of the managed heap will be exhausted in a short time, and the automatic garbage collection mechanism of the running environment will be frequently triggered. The garbage collection process usually causes temporary suspension of all application threads, resulting in uncontrolled jitter of tens of milliseconds or even hundreds of milliseconds of system response delay, which is unacceptable for industrial control systems with extremely high real-time requirements. By introducing the object pool technology, the system can stably control the delay to the sub-millisecond level, eliminating the timing uncertainty caused by memory management.
[0075] Taking the Socket network communication receiving process as an example, after the underlying network driver writes a raw message containing multiple measurement point data into the receiving buffer, the zero-copy parsing mechanism does not copy the message to the user space of the application program, but directly establishes multiple lightweight data views on the buffer. For example, the system first establishes a slice view pointing to a specific offset position at the head of the buffer to verify the legality of the frame header, and then establishes a slice view pointing to the data payload area. The parsing program directly reads the binary data through these views and fills the values into the reused objects borrowed from the object pool. No new heap memory allocation operation occurs in the entire process, ensuring the highest efficient flow speed of the data from the network card to the core algorithm module.
[0076] S2. The unified standard data object is processed by shunting, the time series statistical features based on the sliding window and the physical attribute features based on the static snapshot are extracted respectively, and the time series statistical features and the physical attribute features are heterogeneously fused to construct a real-time multi-dimensional feature vector.
[0077] The shunt processing refers to the process that the system routes the data source identification and type field in the unified standard data object to different feature extraction channels according to the unified standard. The fundamental reason for such differentiation processing is that different types of data contain completely different physical laws and state representation methods. The time series data such as temperature, pressure or motor vibration has the dynamic characteristics of continuous change, and the instantaneous value at a single moment cannot fully reflect the health trend of the equipment, and must be combined with the change trajectory in a period of history for statistical analysis. The static data such as material color, product size or two-dimensional code content presents discrete snapshot characteristics, and a single value represents the physical properties or batch information of the processed object, without relying on the time context.
[0078] Taking a specific scene as an example, the current sampling value from the motor driver and the vibration sensor reading installed on the bearing seat belong to typical time series data, which reflect the load fluctuation and mechanical stability of the equipment during operation. The product qualified flag bit output from the visual detection camera, the measured length value and the recognized material color code belong to static data, which reflect the inherent properties of the processed material in the current production rhythm.
[0079] Heterogeneous fusion aims to combine the process quantities described above to describe the running state of the equipment and the attribute quantities described above to describe the processed object in the same feature space, so as to construct a unified view that can fully represent the comprehensive working conditions of man, machine and material. If the original time series waveform data and static attribute values are directly physically spliced without feature extraction, it will cause serious dimension disaster and feature masking problem. For example, the high-frequency sampled vibration waveform may contain hundreds of data points, and direct splicing will cause the feature vector dimension to be too high and sparse, so that only a small number of static attribute features are submerged in the subsequent algorithm model, and cannot play their due discriminant role. The scheme effectively balances the dimension weight of different modal data by the strategy of extracting statistical features first and then fusing.
[0080] The finally constructed real-time multi-dimensional feature vector is a compact mathematical vector, and each dimension in the vector represents an abstract engineering feature, for example, the first dimension represents the rising rate of the motor temperature, the second dimension represents the stability of the vibration amplitude, and the third dimension represents the size deviation of the current material. The vector is no longer a simple data stacking, but a digital accurate portrait of the complex working condition that "what kind of material is being processed and what kind of running state the equipment is in", which provides a high-quality input basis for subsequent anomaly detection reasoning.
[0081] Optionally, the step S2 of extracting the time series statistical features based on the sliding window comprises:
[0082] A time sliding window with a preset length is set, and the sensor continuous values in the window are statistically calculated.
[0083] extracting a slope feature of the values in the window to represent a change trend, and extracting a standard deviation feature of the values in the window to represent fluctuation stability;
[0084] The time series statistical features are preprocessed by using a noise-resistant normalization method based on interquartile range to eliminate the influence of sensor noise on feature distribution.
[0085] The length of the time sliding window needs to be set by weighing the dynamic response characteristics of the monitored physical quantity. If the window length is set too short, it is difficult to cover the complete signal period, resulting in statistical features being easily disturbed by transient random noise and fluctuating; if the window length is set too long, although smooth statistical results can be obtained, the sensitivity of the system to sudden abnormalities is reduced, resulting in the fault features being smoothed out by historical data and causing detection lag. For example, for temperature data with large thermal inertia, the window length is usually set to seconds or even minutes; for fast-changing current or vibration data, the window length is usually set to milliseconds.
[0086] Extracting the slope feature and the standard deviation feature aims to deeply analyze the running state of the equipment from the time domain dimension. The slope feature can sensitively capture the change rate and trend of the physical quantity by calculating the first derivative or linear regression slope of the data points in the window. For example, when monitoring the temperature of the main shaft bearing, even if the current absolute temperature has not reached the alarm threshold, if the slope feature shows a continuous and steep positive increment, it indicates an abnormal trend of rapid temperature rise, indicating that lubrication failure or overload may occur. The standard deviation feature can quantify the fluctuation stability of the physical quantity by calculating the degree of deviation of the data in the window from the mean value. For example, when monitoring the speed of a servo motor, if the standard deviation feature significantly increases, it indicates that the motor is running in an unstable oscillation or the load has undergone a dramatic fluctuation, rather than a smooth constant speed operation.
[0087] Compared with the traditional mean-variance normalization method, the noise-resistant normalization method based on interquartile range has stronger robustness and anti-interference ability. The traditional mean-variance normalization relies on the arithmetic mean and variance of the data set, which is easily affected by extreme values or outliers. When the sensor produces occasional sharp pulse noise due to electromagnetic interference, it will cause the mean value to shift and the variance to expand, thereby compressing the feature distribution interval of normal data and reducing the resolution of the model. The method based on interquartile range uses the median and interquartile range for scaling, naturally ignoring the influence of extreme values at both ends of the data distribution.
[0088] For example, assume that a pressure sensor has a normal reading fluctuating between 100 and 105 kilopascals, but a single electromagnetic interference generates a transient noise of 500 kilopascals. If the traditional mean-variance normalization is used, the noise will raise the overall mean and greatly increase the variance, causing the normalized result of the normal 100-105 kilopascal data to approach zero, making it difficult to distinguish subtle changes. However, using the anti-noise normalization based on the interquartile range, since the median and interquartile range are almost not affected by the single noise, the normal pressure fluctuation data can still be mapped to a reasonable feature interval, ensuring that the subsequent algorithm model can accurately capture the real working condition fluctuations rather than being misled by noise.
[0089] S3. Input the real-time multi-dimensional feature vector into a pre-trained anomaly detection model, and calculate the anomaly probability value of the current working condition belonging to an abnormal state through the path determination logic based on prior sample weights inside the anomaly detection model.
[0090] The anomaly detection model uses an improved Isolation Forest algorithm architecture. This algorithm architecture retains the advantages of low computational complexity and suitability for real-time inference of traditional Isolation Forest algorithm, and introduces a semi-supervised learning mechanism on this basis. Unlike traditional methods that rely only on data distribution sparsity for determination, this model can effectively integrate known fault mode information, thereby maintaining the ability to explore unknown anomalies while significantly enhancing the recognition accuracy of specific industrial faults.
[0091] Prior sample weights refer to the feature importance coefficients and path weighting factors calculated from typical abnormal samples accumulated in the historical fault library during model training. These historical fault libraries contain real fault cases such as material misplacement, motor bearing wear, or sensor reading drift, which are manually labeled or automatically recorded by the system. When constructing isolated trees in the forest, the system analyzes the distribution differences of these fault samples in each feature dimension, calculates the key features that can significantly distinguish between normal and abnormal states, and gives them higher splitting weights.
[0092] The fundamental reason for introducing prior sample weights is to overcome the application problems of pure unsupervised learning algorithms in industrial application scenarios. In actual production, some serious equipment failures may not be significantly outlying in statistical distribution, or may be easily confused with normal working condition fluctuations and noise, resulting in insufficient sensitivity of pure unsupervised algorithms to such rare but known key faults. By integrating prior weights, the algorithm model is given some form of domain knowledge, allowing it to consciously focus on feature combinations that have caused shutdown accidents when constructing isolation paths, thereby avoiding the risk of missing reports.
[0093] The final calculated output is an abnormal probability value which is a continuous value normalized to the interval of zero to one hundred percent. This value does not directly represent the frequency of failure occurrence, but quantitatively represents the degree of deviation of the current input real-time multi-dimensional feature vector from the normal working condition feature cluster, i.e. the physical meaning of working condition abnormal confidence. For example, when the probability value is five percent, it represents that the current equipment is running smoothly and is in the core normal interval; when the probability value rises to eighty-five percent, it represents that the current working condition is highly suspected to be in a certain known failure mode or a serious unknown outlier state, and the system needs to take immediate intervention measures.
[0094] Optionally, the path determination logic based on the prior sample weight in the step S3 comprises:
[0095] In the tree structure splitting phase of constructing the anomaly detection model, the distribution difference of the known abnormal samples in each feature dimension is obtained;
[0096] The importance weight of each feature is calculated according to the distribution difference, and the probability of the feature being selected as a splitting point is adjusted according to the importance weight;
[0097] In the inference phase, when the input vector falls into the isolated path composed of high weight features and the path length is less than a preset threshold, it is determined that the abnormal probability value of the current working condition is increased.
[0098] The distribution difference of the known abnormal samples in each feature dimension refers to constructing the probability density function of each feature dimension for the historical fault data and normal running data included in the training set, respectively, and calculating the relative entropy or Kullback-Leibler divergence between them. Taking the main shaft temperature feature of a servo motor as an example, it is assumed that in the normal working condition, the value of the temperature feature obeys a Gaussian distribution with a mean of sixty degrees Celsius; and in the overheat fault working condition caused by bearing wear, the value of the temperature feature obeys a Gaussian distribution with a mean of eighty-five degrees Celsius. At this time, the system calculates that the overlapping area of the two distributions in the temperature dimension is very small and the divergence value is large, thereby determining that the feature has significant discrimination for identifying such faults.
[0099] After adjusting the probability of the feature being selected as a splitting point according to the distribution difference, the internal tree structure of the anomaly detection model will change significantly. In the standard random forest construction process, the probability of all features being selected is equal, which may cause the key fault features to be buried in the bottom layer of the tree. In this embodiment, those features that are highly sensitive to abnormalities are given greater weight, so that they are more likely to be selected as splitting attributes at the root node or shallow nodes of the tree. This structural bias enables the model to isolate data points containing fault features from the normal data cluster with fewer segmentation times.
[0100] There is a negative correlation between the length of the isolation path and the degree of abnormality, that is, the shorter the path, the easier the data point is isolated, and the higher the degree of abnormality. In the isolation forest algorithm, normal data usually needs to be classified into leaf nodes after multiple random partitions, so the average path length is longer; due to the sparsity and difference of the value distribution of abnormal data, it often only needs a few times of partition to reach the leaf node.
[0101] Taking the fault caused by sudden change of motor load as an example, when the current slope feature in the real-time multi-dimensional feature vector suddenly appears a large positive jump, since the feature has been identified as a high-weight feature in the training stage, multiple isolated trees in the forest will preferentially use the slope feature for threshold cutting. This real-time data point may only pass through one or two judgments in these trees, that is, it meets the condition that the current slope is greater than the safety threshold, so it falls into a very shallow leaf node. After the system aggregates the path lengths of all trees, it calculates that the average path length of the data point is significantly less than the pre-set normal threshold, thereby quickly determining that the abnormal probability value of the current working condition is sharply increased, and achieving millisecond-level identification of a specific fault mode.
[0102] S4. Compare the abnormal probability value with the dynamic adaptive threshold, and trigger a double-channel control strategy according to the comparison result:
[0103] When it is determined to be abnormal, a high-priority shutdown instruction is generated through a local fast control channel and directly executed by an actuator;
[0104] At the same time, the real-time multi-dimensional feature vector and the determination result are packaged into a message object and sent to a remote management platform through a data reporting channel.
[0105] The fundamental reason for using a dynamic adaptive threshold instead of a pre-set fixed threshold for determination is that a fixed threshold cannot effectively cope with the evolution of physical characteristics of industrial equipment throughout its life cycle. As the equipment running time increases, natural wear and tear of mechanical parts or changes in lubrication state can cause slow drift of sensor readings, for example, the vibration baseline of motor bearings usually gradually increases with aging. If a fixed threshold that cannot be changed is used, the system is prone to frequently trigger false alarm signals in the later stage of equipment aging, resulting in an increase in false positive rate; on the contrary, if the fixed threshold is set too high to be compatible with aging, it may mask minor faults in the early stage of equipment operation, resulting in a missed report. The dynamic adaptive threshold can automatically float with the statistical law of the equipment working condition, so as to maintain accurate determination boundaries throughout the complex application cycle.
[0106] The core design idea of the dual-channel control strategy is to completely decouple the high-priority device control logic and the high-throughput data reporting logic in the transmission path at the physical or logical level to ensure the determinacy of control response. In the traditional single-channel architecture, control instructions often share bandwidth with massive monitoring data, which is prone to queue blocking when the network is congested. By separating an independent local fast control channel from the data reporting channel, this embodiment ensures that critical shutdown or correction instructions always have absolute transmission priority regardless of the load fluctuations of the data reporting link, thereby eliminating the potential threat of network uncertainty to production safety.
[0107] In addition, the local fast control channel and the data reporting channel are constructed as two independent transmission paths in the system architecture, achieving strict isolation at the physical or logical level. Physically, the two can be connected to the internal industrial control network and the external information management network through different network interfaces on the controller; logically, they correspond to different socket connections and thread contexts. The local fast control channel focuses on establishing a low-latency point-to-point connection between the controller and the actuator, while the data reporting channel is responsible for handling high-throughput data flow to the upper gateway or cloud server.
[0108] The shutdown instruction is designed to be strictly prohibited from being forwarded through the remote management platform because the cloud loop involves data upload, cloud computing, and instruction delivery, and its round-trip delay is easily affected by wide-area network network jitter, bandwidth congestion, or server load fluctuations, making it highly uncertain. This uncertainty can cause the arrival time of control instructions to be delayed by hundreds of milliseconds or even seconds, which is unacceptable for industrial safety interlock mechanisms that require instant risk interruption. In contrast, locally generated and directly delivered instructions can ensure that actions are triggered within a certain microsecond level, thereby maximizing production safety.
[0109] The purpose of synchronously reporting data is not to participate in the current control decision, but to provide high-value data assets for post-fault root cause analysis and future model iteration. The encapsulated message object is equivalent to the black box record of an airplane, allowing technicians to fully reproduce the working condition characteristics at the time of failure after the failure occurs, thereby identifying the root cause of the problem. At the same time, these real samples determined to be abnormal will be integrated into the algorithm training database to calibrate the prior sample weight of the anomaly detection model, continuously optimizing the recognition accuracy of the model for specific fault patterns through continuous online learning.
[0110] Optionally, the step S4 of comparing the abnormal probability value with the dynamic adaptive threshold value comprises:
[0111] A reference queue is maintained to store the abnormal probability value distribution under normal working conditions in a preset historical time period;
[0112] calculating a high quantile of the reference queue in real time and taking the high quantile as a current dynamic adaptive threshold;
[0113] determining an anomaly when the anomaly probability value exceeds the product of the dynamic adaptive threshold and a sensitivity coefficient.
[0114] The reference queue adopts a first-in-first-out circular buffer structure, and its length corresponds to a preset historical observation window, for example, storing all calculated anomaly probability samples in the last one hour. As time goes on, the latest probability value is pushed to the head of the queue, and the oldest probability value is removed from the tail, so that the data in the queue always reflects the current recent running state of the device. The high quantile, for example, the 99th percentile, represents the upper limit of the values of the majority of normal working condition samples in the current statistical period. Selecting this quantile as the threshold reference instead of the maximum value aims to filter out occasional transient extreme values or non-fault random disturbances in normal operation, thereby constructing a statistically significant and robust boundary.
[0115] The sensitivity coefficient is an adjustment factor greater than one, which is used to set an additional safety margin above the statistical boundary. By adjusting the coefficient, the technician can flexibly balance the false positive rate and the false negative rate of the system; a smaller coefficient will tighten the decision boundary and improve the sensitivity to weak faults, while a larger coefficient will relax the boundary and enhance the tolerance of the system to working condition fluctuations.
[0116] Taking the scenario of the device passing the break-in period as an example, after the mechanical parts complete the initial mutual grinding and adaptation, the vibration amplitude or friction resistance reference during its operation may change slightly and persistently compared to the factory state, for example, stabilizing at a slightly higher numerical level. If a fixed threshold set at the factory is used, this normal physical settlement or characteristic drift is likely to trigger the control line and cause false positives. In the present embodiment, as the device enters this new stable running phase, the old data in the reference queue is gradually replaced by new data that better represents the current working condition, and the calculated high quantile is automatically adjusted upward and adapts to the new distribution rule. This adaptive mechanism ensures that the decision threshold always dynamically envelops the current normal working range, thereby effectively avoiding false alarms caused by natural evolution of device characteristics.
[0117] Optionally, triggering the dual-channel control strategy in step S4 includes:
[0118] Configuring the local fast control channel to use an industrial control protocol based on TCP long connection, and disabling the packet merging algorithm, using the channel to directly issue control instructions to the actuator within the local area network;
[0119] The data reporting channel is configured to use a message queue protocol based on a publish / subscribe mode, and data is transmitted asynchronously through the channel.
[0120] When an abnormality is determined, the system prioritizes scheduling write operations of the local fast control channel, ensuring that the sending of control instructions is not blocked by communication of the data reporting channel.
[0121] The local fast control channel is configured to use a TCP long connection, which aims to eliminate the three-handshake time overhead required for establishing a connection before each communication, and to maintain a data path that is always available. At the same time, the data packet merging algorithm is disabled, i.e., the Nagle algorithm is closed at the socket level. This algorithm usually caches small data packets for a certain length before sending them for network efficiency, which can cause tens to hundreds of milliseconds of delay in instruction transmission. In the industrial control scenario, control instructions usually have very few bytes but require very high timeliness. Therefore, forcibly closing the algorithm can ensure that even a single-byte shutdown signal can be immediately pushed to the physical link, thereby compressing the transmission delay to the physical limit.
[0122] The data reporting channel uses a message queue protocol based on a publish / subscribe mode, such as the MQTT protocol, which is suitable for telemetry data transmission scenarios that require high throughput but are relatively tolerant of real-time delay. This mode achieves complete decoupling of message producers and consumers. The local device only needs to publish data to the proxy server to complete the task, without the need to wait for the cloud server's confirmation response. This asynchronous mechanism prevents the reverse blocking of the local main control loop due to network fluctuations or slow server processing, ensuring the independence and stability of the device's core functions.
[0123] The priority scheduling mechanism is implemented by assigning different thread priorities and independent transmission queues to the two channels at the operating system level. The thread corresponding to the control channel is given the highest execution authority, while the data reporting channel runs in a lower-priority background thread. When resource competition occurs, the system kernel will prioritize allocating CPU time slices and network interface controller send buffers to the control thread.
[0124] Taking the network congestion scenario as an example, assume that the system is uploading high-frequency vibration waveform data of a motor accumulated over the past hour to the cloud through the data reporting channel, causing the network bandwidth to be in a high-load state. At this time, if the algorithm suddenly determines that the motor load is abnormal and needs to be shut down immediately, the priority scheduling mechanism will immediately suspend or preempt the ongoing large data packet sending process, and insert the shutdown instruction containing only a few bytes into the front end of the sending queue. This ensures that even in the background traffic of massive data reporting, critical control instructions can still be sent to the actuator within milliseconds without interference, thereby strictly meeting the system response timeliness requirement of less than five hundred milliseconds.
[0125] Optionally, in some embodiments, the multi-protocol fusion-based industrial device control method further comprises:
[0126] Periodically extracting historical data marked as false positives in the remote management platform;
[0127] Updating the prior sample weights or baseline queue of the anomaly detection model using the false positive data to achieve online adaptive evolution of the model.
[0128] The marking and utilization of false positive data mainly rely on manual feedback mechanisms. When the on-site operator or remote monitor confirms that an abnormal event reported by the system actually belongs to normal working conditions (such as normal equipment maintenance operation or transient process fluctuations) through manual review, the event record will be marked as a false positive on the interactive interface of the remote management platform. The system periodically scans and extracts these historical data records with specific markers and converts them into high-value negative samples or calibration data for correcting the decision boundary of the algorithm.
[0129] The process of online adaptive evolution involves re-inputting the extracted false positive samples into the update calculation of the model parameters. Specifically, for weight-based anomaly detection models, the system will analyze the distribution characteristics of false positive samples in each feature dimension, identify the over-sensitive features that led to the misjudgment, and appropriately reduce the prior weight coefficient of the feature, thereby reducing the sensitivity of the model to such non-faulty feature fluctuations; for dynamic threshold determination logic, the system will include the abnormal probability value corresponding to the false positive sample in the historical distribution statistics of the baseline queue, thereby correcting the calculation result of the high quantile and appropriately raising the determination threshold to include such special working conditions. To prevent performance degradation or "catastrophic forgetting" of the model during iteration, the updated model parameters need to undergo automated verification testing before taking effect to ensure that the detection rate for known real faults does not decrease significantly.
[0130] This step builds a complete data-driven closed-loop feedback optimization system. From the real-time detection output determination result to the feedback data generated by manual review, to the correction of model parameters using feedback data, and finally to the redeployment of the optimized model to the inference engine, the entire process can be automatically completed without the intervention of underlying code. With the continuous operation of this closed loop, the system can continuously absorb specific working condition knowledge from the field, gradually eliminate cognitive biases caused by environmental differences or equipment individual differences, and thus continuously improve the accuracy and reliability of the anti-misoperation control in the long-term operation.
[0131] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0132] In an embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in FIG. 1. Figure 2 The computer device includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store data related to the multi-protocol converged industrial device control method. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is configured to be executed by the processor to implement a multi-protocol converged industrial device control method.
[0133] In an embodiment, a computer device is provided, which includes a memory, a processor and a computer program stored in the memory and executable on the processor. The processor is configured to implement the multi-protocol converged industrial device control method of the above-mentioned embodiments when executing the computer program, for example, S1-S4 as shown in FIG. 1. Figure 1
[0134] In an embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is configured to be executed by a processor to implement the multi-protocol converged industrial device control method of the above-mentioned embodiments, for example, S1-S4 as shown in FIG. 1. Figure 1
[0135] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments of the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
[0137] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method of controlling a multi-protocol converged industrial device, the method comprising: The method comprises the following steps: S1. Obtain the original communication data stream from different industrial equipment ends, parse the original communication data stream through a zero-copy parsing mechanism according to a preset dynamic protocol mapping relationship, and generate a unified standard data object containing timing information and quality codes; S2. Perform shunt processing on the unified standard data object, extract timing statistical features based on a sliding window and physical attribute features based on a static snapshot respectively, and perform heterogeneous fusion on the timing statistical features and the physical attribute features to construct a real-time multi-dimensional feature vector; S3. Input the real-time multi-dimensional feature vector into a pre-trained anomaly detection model, calculate an anomaly probability value of the current working condition belonging to an abnormal state through path determination logic based on prior sample weights inside the anomaly detection model; S4. Compare the anomaly probability value with a dynamic adaptive threshold, and trigger a double-channel control strategy according to the comparison result: When it is determined to be abnormal, generate a high-priority shutdown instruction through a local rapid control channel and directly execute an actuator; At the same time, encapsulate the real-time multi-dimensional feature vector and the determination result into a message object and send it to a remote management platform through a data reporting channel; In the S3, the path determination logic based on prior sample weights comprises: In the tree structure splitting stage of constructing the anomaly detection model, the distribution difference of known abnormal samples in each feature dimension is obtained; According to the distribution difference, the importance weight of each feature is calculated, and the probability of the feature being selected as a split point is adjusted according to the importance weight; In the reasoning stage, when the input vector falls into an isolated path composed of high-weight features and the path length is less than a preset threshold, it is determined that the anomaly probability value of the current working condition is increased.
2. The multi-protocol fusion based industrial device control method according to claim 1, characterized by, In the S1, the original communication data stream is parsed through a zero-copy parsing mechanism according to a preset dynamic protocol mapping relationship, comprising: Load the preset protocol mapping configuration file, which defines the data frame structure of the source protocol, the field definition of the unified standard data object of the target end, and the conversion operator between the data frame structure and the field definition; Based on the configuration file, a dynamic parsing delegate in memory is constructed, and the original communication data stream in different protocol formats is mapped into a unified standard data object containing a unique identifier, a normalized value, timing information and a quality code in real time.
3. The multi-protocol fusion based industrial device control method according to claim 1 or 2, characterized by, The zero-copy parsing mechanism in the S1 comprises: When the original communication data stream is received, a data view is created directly on the receiving buffer using memory slicing technology instead of creating a new byte array copy; Through object pool technology, the allocated unified standard data object memory block is reused, and the parsed data is directly filled into the reused memory block to reduce the delay caused by memory allocation and garbage collection.
4. The multi-protocol fusion based industrial device control method of claim 1, wherein, In the S2, the timing statistical features based on the sliding window are extracted, comprising: Set a time sliding window with a preset length, and perform statistical calculation on the continuous values of the sensor in the window; Extract the slope feature of the values in the window to represent the change trend, and extract the standard deviation feature of the values in the window to represent the fluctuation stability; The time series statistical features are preprocessed by using a noise-resistant standardization method based on quartile distance to eliminate the influence of sensor noise on feature distribution.
5. The multiprotocol fusion based industrial device control method of claim 1, wherein, The step S4 of comparing the anomaly probability value with a dynamic adaptive threshold value comprises: a reference queue is maintained to store the anomaly probability value distribution under normal working conditions in a preset historical time period; a high quantile of the reference queue is calculated in real time, and the high quantile is taken as a current dynamic adaptive threshold value; when the anomaly probability value exceeds the product of the dynamic adaptive threshold value and a sensitivity coefficient, the anomaly is determined.
6. The multiprotocol fusion based industrial device control method of claim 1, wherein, The step S4 of triggering a dual-channel control strategy comprises: the local fast control channel is configured to use an industrial control protocol based on TCP long connection, and the packet merging algorithm is disabled, and the control command is directly sent to the actuator in the local area network by using the channel; the data reporting channel is configured to use a message queue protocol based on a publish / subscribe mode, and the data is transmitted asynchronously by using the channel; when the anomaly is determined, the write operation of the local fast control channel is preferentially scheduled to ensure that the sending of the control command is not blocked by the communication of the data reporting channel.
7. A computer device, comprising: comprise: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to perform the industrial equipment control method based on multi-protocol fusion according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by the processor to realize the industrial equipment control method based on multi-protocol fusion according to any one of claims 1 to 6.
Citation Information
Patent Citations
Data center construction and intelligent operation and maintenance management system
CN120873882A
Industrial control method and system, medium, equipment and program product
CN120972800A
Road engineering carbon emission analysis method based on multi-source heterogeneous data fusion
CN121073006A
Processing environment switching and recovering method and device, equipment and medium
CN121092357A