An industrial production internet of things data micro-service extraction method, medium and system

CN122547883APending Publication Date: 2026-08-11BEIJING NANCAL RUIYUAN DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-01
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0003]有鉴于此,本发明提供一种工业生产物联网数据微服务提取方法、介质及系统,能够解决现有技术中存在工业物联网数据微服务提取过程中无法根据设备运行状态和网络传输状况动态调整数据采集与压缩策略导致数据传输效率与保真度难以平衡的技术问题

Benefits of technology

[0022]本发明提出一种工业生产物联网数据微服务提取方法,通过监控模块实时监测数据传输链路延迟和设备运行状态分类结果,根据监测结果动态调整采样频率参数和压缩比参数,在边缘网关采用小波包分解多尺度自适应数据压缩算法对原始数据流的平稳区间段和突变区间段实施差异化压缩处理。该方法针对传统固定参数配置的局限性,建立了基于运行状态反馈的参数自适应优化机制,当检测到严重故障状态时自动降低压缩比以保留异常特征细节,当网络延迟超限时则降低采样频率减轻传输负担,从而在不同工况下实现传输效率与数据保真度的动态平衡。同时,本发明通过数据特征自适应融合模型中空间金字塔池化层与可变形卷积层的耦合机制,使特征提取过程同时具备多尺度感知和形变自适应能力,克服了传统固定卷积核对复杂工业数据模式表征不足的问题。综上所述,本发明解决了背景技术中提到的工业物联网数据微服务提取过程中无法根据设备运行状态和网络传输状况动态调整数据采集与压缩策略导致数据传输效率与保真度难以平衡的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122547883A_ABST
    Figure CN122547883A_ABST
Patent Text Reader

Abstract

This invention provides a method, medium, and system for extracting IoT data microservices in industrial production, belonging to the technical field of IoT data microservices in industrial production. This invention uses an edge-side preprocessing microservice and an adaptive fusion model of data features to perform denoising, cleaning, and feature extraction on compressed data streams to obtain a feature dataset. This feature dataset is then dynamically associated with business context information obtained from the manufacturing execution system and asset management system, encapsulated into a semantic data object, and published to a message queue. A monitoring module monitors the data transmission link latency and the equipment operating status classification results obtained through fuzzy C-means clustering in real time. When latency exceeds limits or the status is abnormal, adaptive optimization is achieved by adjusting the sampling frequency parameter and compression ratio parameter. This solves the technical problem of the inability to dynamically adjust data acquisition and compression strategies according to equipment operating status and network transmission conditions, leading to a difficulty in balancing data transmission efficiency and fidelity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial production Internet of Things (IoT) data microservices technology, specifically, it relates to a method, medium, and system for extracting industrial production IoT data microservices. Background Technology

[0002] In the Industrial Internet of Things (IIoT) field, traditional data acquisition methods typically use fixed sampling frequencies and uniform compression ratios to collect and transmit equipment data. The raw data stream is then uploaded to the cloud for processing via an edge gateway, or simple filtering and noise reduction are performed at the edge before transmission. However, in current smart manufacturing scenarios, due to the diverse types of equipment and complex, variable operating conditions, the fixed parameter configurations used in traditional methods cannot adapt to the differentiated data quality requirements under different operating states. Redundant data transmission occurs when equipment is operating normally, while critical anomaly features may be lost due to over-compression during faults. Furthermore, existing data compression algorithms often employ globally uniform compression strategies, failing to differentiate between stable and abrupt changes in the data stream, making it difficult to maintain anomaly detection accuracy while ensuring transmission efficiency. In addition, traditional feature extraction methods, based on fixed convolutional kernels, cannot adaptively adjust the receptive field to adapt to the complex patterns of periodic oscillations and random mutations in industrial data, resulting in insufficient feature representation capabilities when facing nonlinear distortions caused by equipment failures. In other words, existing technologies have a technical problem in the process of extracting industrial IoT data microservices: the data acquisition and compression strategies cannot be dynamically adjusted according to the device operating status and network transmission conditions, making it difficult to balance data transmission efficiency and fidelity. Summary of the Invention

[0003] In view of this, the present invention provides a method, medium and system for extracting microservices of industrial production Internet of Things (IoT) data, which can solve the technical problem in the prior art that the data acquisition and compression strategies cannot be dynamically adjusted according to the device operating status and network transmission status during the extraction of industrial IoT data microservices, resulting in a difficulty in balancing data transmission efficiency and fidelity.

[0004] This invention is implemented as follows: The first aspect of this invention provides a method for extracting industrial production IoT data via microservices. Upper-layer business microservices register data requirement information, including data type identifiers, sampling frequency parameters, accuracy threshold parameters, and real-time requirement parameters, with a service registry center. A requirement parser continuously monitors the service registry center and converts the data requirement information into device acquisition instructions containing acquisition cycle parameters and data format specification parameters, which are then sent to an edge gateway. The edge gateway acquires the raw data stream according to the device acquisition instructions and performs wavelet packet decomposition and multi-scale adaptive data compression algorithm processing on the raw data stream to obtain a compressed data stream and compression ratio parameters. The edge-side preprocessing microservice receives the compressed data. The compressed data stream is denoised, cleaned, and feature-extracted using a data feature adaptive fusion model to obtain a feature dataset. This feature dataset is then dynamically associated with business context information, including work order identifiers, equipment model identifiers, and timestamps, obtained from the manufacturing execution system interface and asset management system interface. This association is then encapsulated into a semantic data object and published to a message queue. The monitoring module monitors the data transmission link in real time to obtain the latency duration and performs fuzzy C-means clustering on the feature dataset to obtain the equipment operating status classification result. When the latency duration exceeds the latency threshold parameter or the equipment operating status classification result indicates an anomaly, adaptive optimization is achieved by adjusting the sampling frequency parameter and compression ratio parameter.

[0005] The processing steps of the wavelet packet decomposition multi-scale adaptive data compression algorithm are as follows: the original data stream is decomposed into a set of sub-signals of different frequency bands using wavelet packet transform; the energy distribution value of each frequency band sub-signal in the sub-signal set is calculated; and important coefficients whose energy proportion exceeds the energy threshold parameter are adaptively selected and retained based on the energy distribution value.

[0006] Among them, the wavelet packet decomposition multi-scale adaptive data compression algorithm uses a high compression ratio parameter to compress the stationary intervals in the original data stream, and maintains a low compression ratio parameter for the abrupt intervals in the original data stream to maintain fidelity. The wavelet basis function type and decomposition layer parameter are determined by calculating the entropy value of each frequency band sub-signal to achieve variable compression ratio processing.

[0007] The structure of the adaptive fusion model for data features is as follows: the input layer receives a numerical sequence of compressed data streams; the first convolutional layer contains 64 convolutional kernels with a kernel size of 3x3 and a stride of 1; and the spatial pyramid pooling layer performs pooling operations on the output of the first convolutional layer with pooling scales of 1x1, 2x2, and 4x4 to obtain a set of multi-resolution feature maps.

[0008] In the adaptive fusion model of data features, deformable convolutional layers sample multi-resolution feature map sets. The sampling position offset of deformable convolutional layers is learned to achieve adaptive receptive field adjustment. The feature fusion layer fuses feature maps of different scales into a unified dimensional fusion feature map through upsampling and concatenation operations.

[0009] In the adaptive fusion model of data features, the second convolutional layer performs convolution processing on the fused feature map with 32 convolutional kernels and a kernel size of 1 x 1. The fully connected layer flattens the output of the second convolutional layer and maps it to a feature vector. The output layer outputs the feature vector as the feature dataset.

[0010] The spatial pyramid pooling layer performs max pooling operations on the feature maps at different scales: 1x1 pooling captures global contextual information, 2x2 pooling captures medium-range spatial relationships, and 4x4 pooling captures local detail features. The feature maps at the three scales are flattened and then stitched together according to the channel dimension to form a multi-scale feature representation.

[0011] The deformable convolutional layer learns a two-dimensional offset vector at each sampling position of the standard convolutional kernel. The offset vector is predicted by an additional convolutional layer, which causes the sampling grid of the convolutional kernel to deform according to the input feature content. When encountering a sharp change in the data stream, the sampling points automatically gather towards the change region, and when encountering a stable region, the sampling points spread out to cover a wider range.

[0012] The offset prediction kernel number parameter in the deformable convolutional layer is determined based on the sampling frequency parameter, compression ratio parameter, and device operating status classification result. When the sampling frequency parameter is higher than the frequency threshold parameter and the compression ratio parameter is lower than the compression threshold parameter, the offset prediction kernel number parameter is 16. When the sampling frequency parameter is lower than the frequency threshold parameter or the device operating status classification result indicates a normal state, the offset prediction kernel number parameter is 8.

[0013] The steps for establishing the training dataset for the adaptive fusion model of data features are as follows: extracting raw time series data collected under different operating conditions from historical industrial production databases for different equipment types; performing wavelet packet decomposition multi-scale adaptive data compression algorithm on the raw time series data to obtain compressed data samples for training; manually labeling the feature tags corresponding to the compressed data samples for training, which contain peak position, frequency components and amplitude information; and dividing the compressed data samples for training and the corresponding feature tags into sample pairs according to a ratio of 7:2:1 to form training set, validation set and test set.

[0014] The training steps for the adaptive fusion model of data features are as follows: first, initialize the weight parameters and bias parameters of each layer of the adaptive fusion model of data features; input the compressed training data samples from the training set into the adaptive fusion model of data features to obtain the predicted feature vector; calculate the mean squared error loss value between the predicted feature vector and the feature label; use the backpropagation algorithm to calculate the gradient of the mean squared error loss value with respect to the parameters of each layer; use the adaptive moment estimation optimizer to update the weight parameters and bias parameters with the initial learning rate set to 0.001; repeat the above steps until the mean squared error loss value on the validation set does not decrease for 10 consecutive rounds.

[0015] The steps for obtaining the equipment operation status classification results are as follows: Specifically, the vibration amplitude, temperature, rotation speed and energy consumption of the equipment are extracted from the feature dataset to form a feature vector space. The fuzzy C-means clustering algorithm is then used to classify the data points in the feature vector space into normal operation status, minor abnormal status and serious fault status.

[0016] Among them, the fuzzy C-means clustering algorithm introduces a membership matrix to describe the degree of belonging of each data point to multiple categories. The membership value ranges from 0 to 1 and the sum of the membership values ​​of the same data point to all categories is 1. During the iteration process, the cluster center and membership value are optimized by minimizing the objective function of the weighted sum of squared distances within the class.

[0017] Specifically, the adaptive optimization steps are as follows: when the delay duration exceeds the delay threshold parameter, the sampling frequency parameter is reduced to 50% to 80% of the original sampling frequency parameter; when the device operation status classification result indicates a severe fault state, the compression ratio parameter is reduced to 5% to 10% to improve data fidelity; and when the delay duration is lower than the delay threshold parameter and the device operation status classification result indicates a normal operation state, the compression ratio parameter is increased to 15% to 20% to reduce transmission overhead.

[0018] Specifically, the encapsulation step of semantic data objects involves extracting data identifiers, numerical content, and timestamp information from the feature dataset; obtaining the current work order identifier and process information from the manufacturing execution system interface; obtaining the equipment model identifier and location information from the asset management system interface; organizing the data identifiers, numerical content, timestamp information, work order identifiers, process information, equipment model identifiers, and location information into structured objects according to a predefined data pattern; and serializing the structured objects to obtain semantic data objects.

[0019] The message queue adopts a publish-subscribe pattern. Upper-layer business microservices obtain the required semantic data objects by subscribing to topics. The edge gateway is an edge computing device deployed on the industrial production site to receive device collection instructions and execute data collection. The edge-side preprocessing microservice is a lightweight service component deployed on the edge gateway to process compressed data streams. The monitoring module is a monitoring service component deployed on the data hub layer to monitor the status of data transmission links in real time.

[0020] A second aspect of the present invention provides a computer-readable storage medium storing program instructions, which, when executed in a computer, are used to perform the above-described method for extracting microservice data from an Internet of Things (IoT) in industrial production.

[0021] A third aspect of the present invention provides an industrial production Internet of Things data microservice extraction system, comprising the aforementioned computer-readable storage medium, wherein the system is a computer, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.

[0022] This invention proposes a method for extracting microservice data from industrial IoT production. A monitoring module monitors data transmission link latency and equipment operating status classification results in real time. Based on the monitoring results, the sampling frequency and compression ratio parameters are dynamically adjusted. At the edge gateway, a wavelet packet decomposition multi-scale adaptive data compression algorithm is used to perform differentiated compression processing on the stable and abrupt intervals of the original data stream. Addressing the limitations of traditional fixed parameter configurations, this method establishes a parameter adaptive optimization mechanism based on operating status feedback. When a severe fault condition is detected, the compression ratio is automatically reduced to preserve abnormal feature details; when network latency exceeds limits, the sampling frequency is reduced to alleviate the transmission burden, thereby achieving a dynamic balance between transmission efficiency and data fidelity under different operating conditions. Simultaneously, this invention utilizes the coupling mechanism between the spatial pyramid pooling layer and the deformable convolutional layer in the data feature adaptive fusion model, enabling the feature extraction process to possess both multi-scale perception and deformation adaptation capabilities, overcoming the problem of insufficient representation of complex industrial data patterns by traditional fixed convolutional kernels. In summary, this invention solves the technical problem mentioned in the background art where the inability to dynamically adjust data acquisition and compression strategies based on equipment operating status and network transmission conditions during industrial IoT data microservice extraction leads to a difficulty in balancing data transmission efficiency and fidelity. Attached Figure Description

[0023] Figure 1 This is a flowchart of the method of the present invention.

[0024] Figure 2 This is a comparison of the frequency domain energy distribution of the original data stream and the compressed data stream.

[0025] Figure 3 Membership distribution diagram for classifying the operating status of 12 devices.

[0026] Figure 4 This is a dynamic adjustment curve of the sampling frequency parameter and compression ratio parameter within a 24-hour operating cycle. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below.

[0028] like Figure 1 The diagram shown is a flowchart of a method for extracting microservice data from an industrial production Internet of Things (IoT) provided by the first aspect of this invention. This method includes the following steps:

[0029] S01. Upper-layer business microservices register data requirement information with the service registration center. The data requirement information includes data type identifier, sampling frequency parameter, precision threshold parameter, and real-time requirement parameter.

[0030] S02. The demand parser continuously listens to the data demand information of the service registry, converts the data demand information into a device acquisition instruction and sends it to the edge gateway. The device acquisition instruction includes acquisition cycle parameters and data format specification parameters.

[0031] S03. The edge gateway collects the raw data stream according to the device collection instruction, and performs wavelet packet decomposition multi-scale adaptive data compression algorithm processing on the raw data stream to obtain the compressed data stream and compression ratio parameters.

[0032] S04. The edge-side preprocessing microservice receives the compressed data stream and uses a data feature adaptive fusion model to denoise, clean, and extract features from the compressed data stream to obtain a feature dataset.

[0033] S05. Dynamically associate the feature dataset with the business context information. The business context information is obtained from the manufacturing execution system interface and the asset management system interface and includes work order identifier, equipment model identifier and timestamp information. After association, it is encapsulated into a semantic data object and published to the message queue.

[0034] S06. The monitoring module monitors the data transmission link in real time to obtain the delay duration, and performs fuzzy C-means clustering algorithm on the feature dataset to obtain the device operation status classification result. When the delay duration exceeds the delay threshold parameter or the device operation status classification result indicates an abnormality, adaptive optimization is achieved by adjusting the sampling frequency parameter and the compression ratio parameter.

[0035] The specific processing steps of the wavelet packet decomposition multi-scale adaptive data compression algorithm include: decomposing the original data stream into sets of sub-signals in different frequency bands using wavelet packet transform; calculating the energy distribution value of each frequency band sub-signal in the sub-signal set; adaptively selecting and retaining important coefficients whose energy proportion exceeds the energy threshold parameter based on the energy distribution value; compressing the stationary intervals in the original data stream using a high compression ratio parameter, and maintaining a low compression ratio parameter for the abrupt intervals in the original data stream to maintain fidelity; determining the wavelet basis function type and decomposition level parameter by calculating the entropy value of each frequency band sub-signal to achieve variable compression ratio processing; the value range of the compression ratio parameter is 10% to 20%.

[0036] The structure of the adaptive fusion model for data features is as follows: the input layer receives a numerical sequence of compressed data stream; the first convolutional layer contains 64 convolutional kernels with a kernel size of 3×3 and a stride of 1; the spatial pyramid pooling layer performs pooling operations on the output of the first convolutional layer at different scales, namely 1×1, 2×2, and 4×4, to obtain a set of multi-resolution feature maps; the deformable convolutional layer samples the set of multi-resolution feature maps, and the sampling position offset of the deformable convolutional layer is obtained through learning to achieve adaptive receptive field adjustment; the feature fusion layer fuses the feature maps of different scales into a fused feature map of a unified dimension through upsampling and concatenation operations; the second convolutional layer performs convolution processing on the fused feature map, with 32 convolutional kernels and a kernel size of 1×1; the fully connected layer flattens the output of the second convolutional layer and maps it into a feature vector; the output layer outputs the feature vector as a feature dataset.

[0037] The spatial pyramid pooling layer performs max pooling on the feature maps at different scales, generating a fixed number of feature responses at each pooling scale. 1×1 pooling captures global contextual information, 2×2 pooling captures medium-range spatial relationships, and 4×4 pooling captures local detail features. The feature maps at these three scales are flattened and then concatenated along the channel dimension to form a multi-scale feature representation. The deformable convolutional layer learns a two-dimensional offset vector at each sampling position of the standard convolutional kernel. This offset vector is predicted by an additional convolutional layer, causing the sampling grid of the convolutional kernel to deform according to the input feature content. When encountering sharp changes in the data stream, the sampling points automatically cluster towards the abrupt change region, and when encountering a stable region, the sampling points spread out to cover a wider range, achieving dynamic adaptive adjustment of the receptive field.

[0038] The offset prediction kernel number parameter in the deformable convolutional layer is determined based on the sampling frequency parameter, the compression ratio parameter, and the device operating status classification result. When the sampling frequency parameter is higher than the frequency threshold parameter and the compression ratio parameter is lower than the compression threshold parameter, the offset prediction kernel number parameter is set to 16; when the sampling frequency parameter is lower than the frequency threshold parameter or the device operating status classification result indicates a normal state, the offset prediction kernel number parameter is set to 8.

[0039] The coupling mechanism of multi-scale feature fusion based on pooling pyramids and deformable convolution enables the adaptive data feature fusion model to possess both global perception and local refinement capabilities when processing industrial data streams. The spatial pyramid pooling layer avoids the limitations of a single scale by extracting features at different receptive field scales in parallel. Especially when industrial data exhibits both periodic oscillations and random mutations, multi-scale feature fusion ensures that the adaptive data feature fusion model can capture both long-term trends and identify instantaneous anomalies. Furthermore, the deformable convolutional layer overcomes the constraints of a fixed grid by learning data-related sampling offsets, addressing nonlinearities caused by equipment failures in the data stream. When deformation features are generated by distortion or sensor drift, deformable sampling automatically adjusts the receptive field shape to adapt to the geometric changes of the features. After coupling, the two achieve dual optimization of scale adaptation and deformation adaptation in the feature extraction stage. Compared with the traditional feature extraction method with fixed convolution kernel, the coupling mechanism significantly enhances the ability of the data feature adaptive fusion model to represent the diverse data patterns generated by heterogeneous devices, improves the discriminativeness and robustness of the feature dataset, and provides higher quality input for subsequent data association and state classification. Ultimately, it improves the generalization performance and stability of the entire industrial production IoT data microservice extraction method when facing changes in equipment type and operating condition fluctuations.

[0040] The steps for establishing the training dataset of the data feature adaptive fusion model specifically include: extracting raw time series data collected under different operating conditions from historical industrial production databases for different equipment types; performing wavelet packet decomposition multi-scale adaptive data compression algorithm on the raw time series data to obtain compressed data samples for training; manually labeling the feature tags corresponding to the compressed data samples for training, the feature tags containing peak position, frequency components and amplitude information; and forming sample pairs with the compressed data samples for training and the corresponding feature tags, dividing them into training set, validation set and test set in a ratio of 7:2:1.

[0041] The specific steps for training the adaptive fusion model of data features include: initializing the weight parameters and bias parameters of each layer of the adaptive fusion model of data features; inputting the compressed training data samples from the training set into the adaptive fusion model of data features to obtain the predicted feature vector; calculating the mean squared error loss value between the predicted feature vector and the feature label; using the backpropagation algorithm to calculate the gradient of the mean squared error loss value with respect to the parameters of each layer; using an adaptive moment estimation optimizer to update the weight parameters and the bias parameters, with the initial learning rate set to 0.001; repeating the above steps until the mean squared error loss value on the validation set does not decrease for 10 consecutive rounds, thus completing the training of the adaptive fusion model of data features.

[0042] The steps for obtaining the equipment operation status classification result specifically include: extracting the vibration amplitude, temperature, rotational speed, and energy consumption values ​​of the equipment from the feature dataset to form a feature vector space; using a fuzzy C-means clustering algorithm to divide the data points in the feature vector space into normal operation status, minor abnormality status, and severe fault status; calculating the membership degree of each feature vector to each status category; iteratively updating the cluster center coordinates and the membership degree values ​​until the change in the objective function is lower than the convergence threshold parameter; and determining the equipment operation status classification result based on the maximum membership degree value of the feature vectors.

[0043] The fuzzy C-means clustering algorithm introduces a membership matrix to describe the degree to which each data point belongs to multiple categories. The membership values ​​range from 0 to 1, and the sum of the membership values ​​of the same data point to all categories is 1. Compared with hard clustering methods that only assign data points to a single category, fuzzy clustering allows data points to belong to multiple categories to varying degrees simultaneously, handling the fuzzy boundary between normal and abnormal equipment status. During the iteration process, the cluster centers and the membership values ​​are optimized by minimizing the objective function of the weighted sum of squared distances within each category, providing a quantitative grading basis for equipment health assessment.

[0044] The adaptive optimization steps specifically include: when the latency exceeds the latency threshold parameter, reducing the sampling frequency parameter to 50% to 80% of the original sampling frequency parameter; when the device operation status classification result indicates a severe fault status, reducing the compression ratio parameter to 5% to 10% to improve data fidelity; when the latency is lower than the latency threshold parameter and the device operation status classification result indicates a normal operation status, increasing the compression ratio parameter to 15% to 20% to reduce transmission overhead; and updating the adjusted sampling frequency parameter and compression ratio parameter to the configuration parameter storage area of ​​the edge gateway.

[0045] The encapsulation steps of the semantic data object specifically include: extracting data identifiers, numerical content, and timestamp information from the feature dataset; obtaining the current work order identifier and process information from the manufacturing execution system interface; obtaining the equipment model identifier and location information from the asset management system interface; organizing the data identifier, numerical content, timestamp information, work order identifier, process information, equipment model identifier, and location information into a structured object according to a predefined data pattern; and performing serialization processing on the structured object to obtain the semantic data object.

[0046] The message queue adopts a publish-subscribe pattern, and the upper-layer business microservices obtain the required semantic data objects by subscribing to topics, thereby decoupling the data provider and the data consumer.

[0047] The edge gateway is an edge computing device deployed at the industrial production site, used to receive data acquisition commands from the device and execute data acquisition. The edge-side preprocessing microservice is a lightweight service component deployed on the edge gateway, used to process the compressed data stream. The monitoring module is a monitoring service component deployed at the data hub layer, used to monitor the data transmission link status in real time.

[0048] Furthermore, the present invention also provides a microservice extraction system for industrial production IoT data implemented by a computer, wherein the computer is provided with a readable storage medium, the readable storage medium stores program instructions, and the program instructions execute the above-described industrial production IoT data microservice extraction method when the computer is run.

[0049] The specific implementation methods of the above steps are described in detail below.

[0050] The specific implementation of step S01 is as follows: The upper-layer business microservices, based on their own business logic requirements, encapsulate the required data type identifier, sampling frequency parameter, precision threshold parameter, and real-time requirement parameter into structured data requirement information. They then initiate a registration request to the service registry center through the application programming interface. The service registry center receives and stores the data requirement information and assigns a unique identifier to each data requirement. The data type identifier indicates the physical quantity type and unit of the required data. The reference value range for the sampling frequency parameter is 1Hz to 10000Hz. The reference value range for the precision threshold parameter is 0.01 to 1. The real-time requirement parameter indicates the maximum tolerable latency time for data transmission, with a reference value range of 10ms to 1000ms. The service registry center adopts a distributed key-value storage structure to ensure data consistency when multiple business microservices register concurrently. The purpose of this step is to realize the declaration and centralized management of data requirements for business microservices, providing a unified data source for subsequent requirement parsing and instruction generation.

[0051] The specific implementation of step S02 is as follows: The demand parser continuously monitors changes in data demand information from the service registry through a polling or subscription mechanism. When new data demand information is detected or existing data demand information is updated, the demand parser reads the data type identifier, sampling frequency parameter, precision threshold parameter, and real-time requirement parameter from the data demand information. Based on the data type identifier, it queries a predefined device type mapping table to determine the IoT device address and communication protocol type that need to collect data. Based on the sampling frequency parameter, it calculates the collection period parameter, which is the reciprocal of the sampling frequency parameter. Based on the precision threshold parameter, it determines the number of precision bits in the data format specification parameter. The device address, the communication protocol type, the collection period parameter, and the data format specification parameter are organized into a device collection command, which is then sent to the edge gateway through the industrial communication network. The purpose of this step is to complete the conversion from abstract business requirements to specific device control commands, realizing demand-driven dynamic data collection configuration.

[0052] The specific implementation of step S03 is as follows: After receiving the device acquisition command, the edge gateway establishes a communication connection with the IoT device according to the communication protocol type in the device acquisition command. It periodically reads sensor data from the IoT device according to the acquisition cycle parameter. The sensor data constitutes the raw data stream. The edge gateway performs wavelet packet decomposition multi-scale adaptive data compression algorithm processing on the raw data stream. First, wavelet packet transform is used to decompose the raw data stream into multi-level decomposition, dividing the raw data stream into sub-signal sets of different frequency bands. The energy distribution value of each frequency band sub-signal in the sub-signal set is calculated. The energy distribution value is obtained by summing the squares of the sub-signal amplitudes and then normalizing. Based on the energy distribution value, the sub-signals of each frequency band are sorted from high to low energy. Important coefficients whose energy percentage exceeds an energy threshold parameter are retained. The reference value of the energy threshold parameter is 85% to 95%. This process is applied to the stationary phases of the raw data stream. The interval segments are compressed using a high compression ratio parameter, while the abrupt interval segments in the original data stream are kept at a low compression ratio parameter to maintain fidelity. The distinction between stationary interval segments and abrupt interval segments is based on whether the absolute value of the first-order difference of the signal exceeds a difference threshold parameter. The reference value of the difference threshold parameter is 2 to 3 times the standard deviation of the signal. The optimal wavelet basis function type and decomposition level parameter are determined by calculating the entropy value of each frequency band sub-signal. The entropy value is calculated using the Shannon entropy method, and the combination of wavelet basis function type and decomposition level parameter that minimizes the total entropy value is selected. The reference value range of the decomposition level parameter is 3 to 7 levels. After processing by the wavelet packet decomposition multi-scale adaptive data compression algorithm, a compressed data stream and compression ratio parameter are obtained. The compression ratio parameter is the ratio of the size of the compressed data stream to the size of the original data stream. The purpose of this step is to complete the intelligent compression of data at the edge, significantly reducing the data transmission volume while ensuring that key features are not distorted, thus alleviating network bandwidth pressure.

[0053] The specific implementation of step S04 is as follows: After the edge-side preprocessing microservice receives the compressed data stream, it inputs the compressed data stream into a data feature adaptive fusion model for processing. The compressed data stream first enters the input layer and is converted into a fixed-length numerical sequence. The numerical sequence is then processed by 64 convolutional kernels in the first convolutional layer for feature extraction. The first convolutional layer uses a 3×3 kernel size and a stride of 1 to extract local features from the compressed data stream. The output of the first convolutional layer enters the spatial pyramid pooling layer, which performs max pooling operations on the feature map at three different scales: 1×1, 2×2, and 4×4. In this process, each pooling scale generates a fixed number of feature responses. 1×1 pooling captures global context information, 2×2 pooling captures medium-range spatial relationships, and 4×4 pooling captures local detail features. The feature maps at these three scales are flattened and then concatenated along the channel dimension to form a multi-resolution feature map set. This multi-resolution feature map set is then processed by a deformable convolutional layer. This deformable convolutional layer learns a two-dimensional offset vector at each sampling position of the standard convolutional kernel. This offset vector is predicted by an additional convolutional layer based on the input feature content, causing the sampling grid of the convolutional kernel to adaptively deform according to the data features. The offset prediction in the deformable convolutional layer... The number of convolutional kernels is dynamically determined based on the sampling frequency parameter, the compression ratio parameter, and the device operating status classification result. When the sampling frequency parameter is higher than the frequency threshold parameter and the compression ratio parameter is lower than the compression threshold parameter, the offset prediction convolutional kernel number parameter is set to 16. When the sampling frequency parameter is lower than the frequency threshold parameter or the device operating status classification result indicates a normal state, the offset prediction convolutional kernel number parameter is set to 8. The reference value for the frequency threshold parameter is 1000Hz, and the reference value for the compression threshold parameter is 15%. The feature maps of different scales output by the deformable convolutional layer enter the feature fusion layer. The feature fusion layer upsamples feature maps of different scales to the same spatial size and then stitches them together to form a unified dimensional fused feature map. The fused feature map is further extracted by the 32 convolutional kernels of the second convolutional layer. The second convolutional layer uses a 1×1 convolutional kernel to achieve cross-channel feature fusion. The output of the second convolutional layer is flattened by a fully connected layer and mapped to a feature vector. The feature vector is output as a feature dataset. The purpose of this step is to perform intelligent feature extraction and denoising cleaning on the compressed data stream using a deep learning model, extracting feature representations that are valuable for subsequent state classification and anomaly detection.

[0054] The specific implementation of step S05 involves dynamically associating the feature dataset with business context information. First, data identifiers, numerical content, and timestamp information are extracted from the feature dataset. The data identifier is used to mark the device number and sensor type of the data source. The numerical content consists of the feature values ​​of each dimension in the feature vector. The timestamp information records the exact time of data acquisition. The current work order identifier and process information are obtained from the manufacturing execution system interface via an application programming interface (API). The work order identifier is used to identify the unique number of the current production task. The process information is used to identify the technological steps of the current production stage. Finally, the equipment model identifier and location information are obtained from the asset management system interface via an API. The equipment model identifier is used to identify the manufacturer and model specifications of the equipment. The location information is used to identify the equipment during production. The physical location coordinates in the line are used to organize the data identifier, the numerical content, the timestamp information, the work order identifier, the process information, the equipment model identifier, and the location information into a structured object according to a predefined data pattern. The predefined data pattern defines the name and data type of each field in the form of key-value pairs. The structured object is then serialized using a general serialization protocol to convert it into a semantic data object in byte stream form. The semantic data object is then published to a topic in a message queue. The topic is categorized according to the data type identifier and the equipment model identifier. The purpose of this step is to add rich business semantics and contextual information to the original data, so that upper-layer business microservices can obtain a complete data view without additional queries, thereby reducing the coupling of data usage.

[0055] The specific implementation of step S06 involves the monitoring module deploying monitoring probes at key nodes of the data transmission link to collect real-time data on the transmission delay from the edge gateway to the message queue. This transmission delay is obtained by calculating the time difference between the data transmission and reception times. From the feature dataset, the module extracts the device's vibration amplitude, temperature, rotational speed, and energy consumption. The unit of the vibration amplitude is m / s². The temperature value is in °C, the rotation speed value is in r / min, and the energy consumption value is in kW. The vibration amplitude, temperature value, rotation speed value, and energy consumption value are combined to form a feature vector space. A fuzzy C-means clustering algorithm is used to cluster the data points in the feature vector space. The coordinates of the cluster centers for normal operation, minor abnormality, and severe fault states are initialized. The Euclidean distance from each feature vector to each cluster center is calculated. The membership degree of each feature vector to each state category is calculated based on the distance. The membership degree is calculated using a fuzzy membership function, which is obtained by weighted normalization using the inverse of the distance. The cluster center coordinates and membership degree are iteratively updated. The cluster center coordinates are updated to the weighted average of all samples based on their membership degrees. Iteration stops when the change in the objective function is lower than a convergence threshold parameter, with a reference value of 0.001. The equipment operation status classification result is determined based on the maximum membership degree of the feature vectors. An adaptive optimization mechanism is triggered when the delay duration exceeds the delay threshold parameter or the device operation status classification result indicates a severe fault state. The reference value of the delay threshold parameter is 100ms to 500ms. When the delay duration exceeds the delay threshold parameter, the sampling frequency parameter is reduced to 50% to 80% of the original sampling frequency parameter. When the device operation status classification result indicates a severe fault state, the compression ratio parameter is reduced to 5% to 10% to improve data fidelity. When the delay duration is lower than the delay threshold parameter and the device operation status classification result indicates a normal operation state, the compression ratio parameter is increased to 15% to 20% to reduce transmission overhead. The adjusted sampling frequency parameter and compression ratio parameter are updated to the configuration parameter storage area of ​​the edge gateway through control commands. The purpose of this step is to realize full-link monitoring and adaptive adjustment of the data extraction link, dynamically optimize the sampling strategy and compression strategy according to the real-time operation status, and ensure the high reliability and high efficiency of the system.

[0056] It should be noted that one of the key technical ideas of this invention is to use a wavelet packet decomposition multi-scale adaptive data compression algorithm to achieve intelligent data preprocessing at the edge. Traditional methods usually use a fixed compression ratio to homogenize all data, which cannot distinguish the differences in the importance of data, resulting in the loss of key information or excessive redundant information. This invention decomposes the signal into different frequency bands through wavelet packet transform, and adaptively selects the important coefficients to retain according to the energy distribution of each frequency band. It uses a high compression ratio for stable intervals and maintains high fidelity for abrupt intervals, realizing intelligent processing with variable compression ratio. Compared with traditional fixed compression methods, this invention compresses the data volume to a lower level while ensuring that key features are not distorted, significantly reducing network bandwidth usage and storage overhead. At the same time, it optimizes the selection of wavelet basis and the number of decomposition layers through the entropy criterion, so that the compression strategy can be adaptively adjusted according to the signal characteristics, improving compression efficiency and feature preservation capability. The second key technical approach lies in constructing a data feature adaptive fusion model based on pooling pyramid multi-scale feature fusion and deformable convolution coupling. Traditional feature extraction methods use convolution kernels with fixed receptive fields, which cannot adapt to scale changes and deformation features in industrial data, resulting in limited feature representation capabilities. This invention extracts features at different scales in parallel through spatial pyramid pooling, combined with the adaptive sampling mechanism of deformable convolution, enabling the model to complete dual optimization of scale adaptation and deformation adaptation during the feature extraction stage. Compared with traditional fixed convolution kernel methods, this invention significantly enhances the model's ability to represent diverse data patterns generated by heterogeneous equipment, improves the discriminativeness and robustness of feature datasets, especially when industrial data exhibits both periodic oscillations and random mutations. Multi-scale feature fusion ensures that the model can capture both long-term trends and identify instantaneous abnormal events, while deformable sampling breaks through fixed grid constraints by learning data-related offsets. When encountering nonlinear distortions caused by equipment failures, it automatically adjusts the shape of the receptive field to adapt to feature geometric changes. The synergistic effect of the two key technical approaches mentioned above lies in the fact that the edge-side compression algorithm preserves the key frequency domain features of the signal, providing high-quality input for subsequent deep learning models. Meanwhile, the data feature adaptive fusion model further extracts deep semantic features from the compressed data through multi-scale feature fusion and deformable convolution. The two form a progressive feature extraction chain, with the former achieving data dimensionality reduction and noise suppression at the frequency domain level, and the latter achieving feature abstraction and pattern recognition at the semantic level. Compared with the traditional method of processing data acquisition, compression, and feature extraction in a fragmented manner, this invention achieves end-to-end intelligent data processing through algorithmic collaborative optimization, significantly improving the generalization performance and stability of the entire microservice extraction method when facing changes in equipment type and operating conditions, and providing technical support for building a flexible and efficient industrial IoT data service system.

[0057] It should be noted that the present invention also solves the following technical problem: the existing industrial data feature extraction methods based on fixed convolutional kernel structures cannot adaptively adjust the receptive field to adapt to the complex pattern of periodic oscillations and random mutations in industrial data, resulting in insufficient feature representation capabilities. This invention addresses this problem by introducing a coupling mechanism between a spatial pyramid pooling layer and a deformable convolutional layer into a data feature adaptive fusion model. The spatial pyramid pooling layer extracts a multi-resolution feature map set by performing max pooling operations in parallel at three different scales: 1x1, 2x2, and 4x4. This captures global contextual information, medium-range spatial relationships, and local detail features, respectively, avoiding the limitations of single-scale feature extraction. Meanwhile, the deformable convolutional layer predicts a two-dimensional offset vector for each sampling position through additional convolutional layers, causing the sampling grid of the convolutional kernel to deform according to the input feature content. When nonlinear distortion caused by equipment failure or deformation features caused by sensor drift occur in the data stream, the sampling points automatically cluster towards abrupt regions or diffuse into stable regions, achieving dynamic adaptive adjustment of the receptive field. After coupling, both layers simultaneously complete the dual optimization of scale adaptation and deformation adaptation during the feature extraction stage, significantly enhancing the model's ability to represent diverse data patterns generated by heterogeneous devices, improving the discriminativeness and robustness of the feature dataset, and thus providing higher-quality input for subsequent data association and state classification.

[0058] A second aspect of the present invention provides a computer-readable storage medium storing program instructions, which, when executed in a computer, are used to perform the above-described method for extracting microservice data from an Internet of Things (IoT) in industrial production.

[0059] A third aspect of the present invention provides an industrial production Internet of Things data microservice extraction system, comprising the aforementioned computer-readable storage medium, wherein the system is any one of a computer, a server, or a microcontroller, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.

[0060] Specifically, the principle of this invention is as follows: This invention solves the above-mentioned technical problems by constructing a closed-loop feedback system that includes a monitoring module, an edge gateway, and a data feature adaptive fusion model. The monitoring module continuously collects the latency of the data transmission link and the equipment operating status classification results as feedback signals. When the latency exceeds the limit, indicating network congestion, the sampling frequency is reduced to decrease the amount of data generated. When the status classification results show a serious fault, the compression ratio is reduced to increase data fidelity to retain the abnormal features required for diagnosis, thereby achieving adaptive adjustment of parameter configuration to the actual operating environment. In the data compression stage, the wavelet packet decomposition multi-scale adaptive algorithm determines the wavelet basis function type and decomposition level by calculating the energy distribution value and entropy value of each frequency band sub-signal. A high compression ratio is used for the stationary interval, while a low compression ratio is maintained for the abrupt interval. The time-varying characteristics of industrial data are used to achieve variable compression ratio processing to balance efficiency and fidelity. In the feature extraction stage, the spatial pyramid pooling layer extracts feature responses at three scales—one-by-one, two-by-two, and four-by-four—in parallel, capturing multi-level information from global context to local details. The deformable convolutional layer deforms the sampling grid of the convolutional kernel according to the input feature content by learning the sampling position offset related to the data. When encountering a sharp change, the sampling points automatically gather towards the change region to strengthen the abnormal features. When encountering a stable region, the sampling points spread to cover a wider range. The coupling of the two enables the model to complete the dual adaptive optimization of scale and deformation in the feature extraction stage, enhancing the ability to represent the diverse data patterns of heterogeneous devices. This provides high-quality feature input for subsequent state classification, supports the monitoring module to accurately judge the device status and form an effective parameter adjustment strategy, and ultimately achieves a dynamic balance between transmission efficiency and fidelity.

[0061] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.

[0062] The specific implementation methods of steps S01, S02 and S05 are the same as those described above, and will not be repeated in detail here.

[0063] The specific implementation of step S03 is as follows: After receiving the device acquisition command, the edge gateway acquires the raw data stream from the industrial field sensors and performs wavelet packet decomposition multi-scale adaptive data compression algorithm processing on the raw data stream. Wavelet packet transform transforms the raw data stream... Decomposed into a set of sub-signals in different frequency bands, the decomposed... Layer Each frequency band sub-signal is represented as .in, For the raw data stream at time The value is in the same unit as the physical quantity measured by the sensor; For the first Layer Each frequency band sub-signal at time Amplitude, unit and The same, obtained through wavelet packet transform; This is a time index, with values ​​ranging from 1 to... ; This is the decomposition level index, with values ​​ranging from 1 to... ; This is a frequency band index, with values ​​ranging from 1 to... ; This represents the total number of data points. This represents the total number of wavelet packet decomposition layers. The formulas for calculating the energy distribution values ​​of each frequency band sub-signal are as follows:

[0064] ;

[0065] In the formula, For the first Layer The energy percentage of each frequency band sub-signal is dimensionless. The numerator is the energy percentage of the first frequency band sub-signal. Layer The energy of each frequency band sub-signal is divided by the total energy of all frequency band sub-signals, with both having the same dimension—the square of the amplitude unit. Dividing them yields a dimensionless quantity. Importance coefficients are adaptively selected for retention based on energy proportions. The retention criterion formula is as follows:

[0066] ;

[0067] In the formula, To retain the flag, a value of 1 indicates that the frequency band coefficient is retained, and a value of 0 indicates that the frequency band coefficient is discarded. It is dimensionless. This is the energy threshold parameter, typically set to 0.05, and is dimensionless. Variable compression ratios are applied to stationary and abruptly changing segments in the original data stream. The adaptive adjustment formula for the compression ratio is as follows:

[0068] ;

[0069] In the formula, For a moment The compression ratio parameter is dimensionless. This is the maximum compression ratio parameter, with a value of 0.20, and is dimensionless. The minimum compression ratio parameter has a value of 0.05 and is dimensionless. For a moment The information entropy value of a local data segment, in bits; This is the entropy threshold parameter, with an empirical value of 1.5 bits; This is the adjustment factor, with a default value of 2.0, and the unit is the negative first power of bits. The exponent term on the right side of the formula The dimensions are The result is a dimensionless quantity, making the entire right-hand side of the formula dimensionless, which is consistent with the left-hand side. Dimensional unification. Information entropy value. The probability distribution of data within a sliding window is calculated using the following formula:

[0070] ;

[0071] In the formula, This is the number of discretization intervals for the data within the sliding window; the default value is 16, and it is dimensionless. For a moment The first sliding window The probability of data occurring in each interval is dimensionless. For discretized interval indexes. By statistically analyzing the number of occurrences within the sliding window... The ratio of the number of data points in each interval to the total number of data points in the window is used to obtain the calculation formula, which is expressed as follows:

[0072] ;

[0073] In the formula, For a moment The sliding window falls into the first The number of data points in each interval, dimensionless; This represents the total number of data points within the sliding window; the default value is 128, and it is dimensionless. Because... It is a dimensionless probability value. The unit is bits, therefore The unit is bits. The wavelet basis function type and the number of decomposition levels are determined based on the entropy value of each frequency band sub-signal. The formula for determining the number of decomposition levels is as follows:

[0074] ;

[0075] In the formula, The optimal decomposition level is dimensionless. This is the floor function; For the first Layer The entropy value of each frequency band sub-signal, in bits; The reference entropy value is typically taken as 3.0 bits. In the formula, the numerator and denominator of the fractional terms are both in bits; the result of dividing them is dimensionless, and rounding down also results in a dimensionless quantity. Subtracting the dimensionless quantities, the result These are dimensionless integers. After compression, the resulting data stream and compression ratio parameters are obtained.

[0076] The specific implementation of step S04 is as follows: After the edge-side preprocessing microservice receives the compressed data stream, it processes its input data feature adaptive fusion model. The input layer receives the numerical sequence of the compressed data stream, the first convolutional layer performs a convolution operation on the input, and the spatial pyramid pooling layer performs pooling operations at different scales on the output of the first convolutional layer. The three pooling scales are as follows: , and This yields a set of multi-resolution feature maps. The deformable convolutional layer adaptively samples the multi-resolution feature map set, and the formula for calculating the sampling position offset is as follows:

[0077] ;

[0078] In the formula, For the first A two-dimensional offset vector for each sampling position, containing horizontal and vertical offset components, in pixels; For sampling location index; The offset prediction convolutional layer operation outputs an offset field with the same spatial dimension as the input feature map. This is a multi-resolution feature map output by a spatial pyramid pooling layer, with dimensionless normalized feature values. The offset prediction convolution kernel number parameter is based on the sampling frequency parameter. Compression ratio parameters Equipment operating status classification results The formula is as follows:

[0079] ;

[0080] In the formula, The parameter for predicting the number of convolutional kernels for the offset is a dimensionless integer. This is the sampling frequency parameter, in Hz; This is the frequency threshold parameter, with an empirical value of 100Hz; The compression ratio parameter is dimensionless. The compression threshold parameter has an empirical value of 0.15 and is dimensionless. The system identifies the classification results of equipment operating status. The feature fusion layer merges feature maps of different scales into a unified dimensional fusion feature map through upsampling and concatenation operations. The second convolutional layer performs convolution processing on the fusion feature map, and the fully connected layer flattens the output of the second convolutional layer and maps it into a feature vector. The output layer outputs the feature vector as the feature dataset.

[0081] The specific implementation of step S06 is as follows: the monitoring module monitors the data transmission link in real time to obtain the delay duration. The unit is milliseconds. Fuzzy C-means clustering is performed on the feature dataset to obtain the device operating status classification results. Feature vector Extracted from the feature dataset, it includes four dimensions: vibration amplitude, temperature value, rotational speed value, and energy consumption value of the device, represented as follows: ,in The amplitude of the vibration is expressed in units of 1000 ppm. ; This is a temperature value, in °C. This is the rotational speed value, in units of 1000 rpm. ; Energy consumption figures, in units of ; This is the feature vector index, with values ​​ranging from 1 to... ; This represents the total number of feature vectors. To ensure uniformity in the units used in clustering calculations, each dimension is normalized. The normalization formula is as follows:

[0082] ;

[0083] In the formula, For the first The eigenvector of the th feature vector The normalized value is dimensionless. The values ​​before normalization; For the first The minimum value of dimension among all eigenvectors; For the first The maximum value of dimension among all eigenvectors; This is the feature dimension index, with values ​​ranging from 1 to 4. , and The dimensions are the same, and after subtraction and division... It is a dimensionless quantity. The normalized eigenvector is denoted as . Each dimension has a value range of 0 to 1 and is dimensionless. The fuzzy C-means clustering algorithm classifies data by iteratively optimizing the membership matrix and cluster centers. The initial coordinates of the cluster centers are randomly selected. The eigenvectors are used as the initial cluster centers, denoted as . superscript Indicates the initialization phase. For cluster category index, The number of clusters is 3, corresponding to the normal operation state, minor abnormality state, and severe fault state categories. The objective function is expressed as follows:

[0084] ;

[0085] In the formula, The objective function value is dimensionless. For the first The eigenvector pair of the th feature vector The membership degree of each category is a dimensionless value, ranging from 0 to 1. It is a fuzzy weighted index, usually with a value of 2, and is dimensionless; For the normalized first Each feature vector is dimensionless. For the first Each cluster center coordinate has dimensionless dimensions. This is the Euclidean distance norm. Because... and All are dimensionless vectors, and their Euclidean distance is... It is a dimensionless quantity, and its squared form is also a dimensionless quantity, and it is related to the dimensionless... Multiply and sum, the result It is a dimensionless quantity. The formula for updating the membership value is expressed as follows:

[0086] ;

[0087] In the formula, Satisfy constraints and This constraint ensures that the sum of the membership degrees of each feature vector to all categories is 1, reflecting the probability normalization characteristic of fuzzy clustering. The fractional term in the formula... The numerator and denominator of a distance are both dimensionless, so dividing them results in a dimensionless quantity, and exponentiation also results in a dimensionless quantity. After summing all categories, the denominator is a dimensionless quantity, and the reciprocal is... These are dimensionless probability values. The formula for updating cluster center coordinates is as follows:

[0088] .

[0089] In the formula, the numerator is a dimensionless weight. with dimensionless vectors The weighted sum, with dimensions of a dimensionless vector; the denominator is the dimensionless weight. The sum of the terms is a dimensionless scalar; after division, It is a dimensionless vector. The membership values ​​and cluster center coordinates are iteratively updated until the objective function changes. Below the convergence threshold parameter Experience value , dimensionless, of which For the number of iterations, For the first The objective function value of the next iteration. For the first The objective function value of the next iteration. The classification result of the equipment operating status is determined based on the maximum membership degree of the feature vectors. The classification criterion formula is expressed as follows:

[0090] .

[0091] When the delay duration Exceeding the delay threshold parameter If the equipment operating status classification result indicates an anomaly, adaptive optimization is performed. The empirical value is 200 milliseconds. Adaptive optimization is achieved by adjusting the sampling frequency parameter and the compression ratio parameter. The formula for adjusting the sampling frequency parameter is as follows:

[0092] ;

[0093] In the formula, The adjusted sampling frequency parameter is in Hz; These are the original sampling frequency parameters, in Hz; For frequency adjustment coefficients, dimensionless, when The value ranges from 0.50 to 0.80. The right side of the formula multiplies the frequency (in Hz) by a dimensionless coefficient, and the result (in Hz) is then compared with the left side. Dimensions are consistent. The formula for adjusting the compression ratio parameter is expressed as follows:

[0094] ;

[0095] In the formula, The adjusted compression ratio parameter is dimensionless. This is the compression ratio parameter under fault conditions, with a value range of 0.05 to 0.10, and is dimensionless. The compression ratio parameter is the one used under normal conditions, with a value ranging from 0.15 to 0.20, and is dimensionless. The adjusted sampling frequency parameter and compression ratio parameter are updated to the configuration parameter storage area of ​​the edge gateway.

[0096] It should be noted that the variables involved in this embodiment are explained in detail in Table 1.

[0097] Table 1. Variable Explanation Table

[0098]

[0099] To better understand and implement this invention, Example 2, a specific application scenario, is provided below: A technical team deployed an industrial production IoT data microservice extraction system in a precision bearing manufacturing workshop to solve the network bandwidth bottleneck and real-time performance issues of traditional data acquisition methods under high-frequency monitoring. The workshop is equipped with 12 high-speed CNC grinding machines, each equipped with vibration sensors, temperature sensors, speed sensors, and power sensors, requiring real-time monitoring and predictive maintenance of the equipment's operating status. Traditional data acquisition schemes use a fixed 10000Hz sampling frequency to upload all raw data, generating approximately 320MB of data per second per device, resulting in a total traffic of 3840MB / s for all 12 devices. This far exceeds the capacity of the workshop's gigabit industrial Ethernet, causing a dramatic increase in data transmission latency to over 800ms, failing to meet real-time monitoring requirements.

[0100] The technical team deployed six edge gateways at the edge of the workshop, with each edge gateway responsible for data acquisition and preprocessing from two CNC grinding machines. Upper-layer business microservices include predictive maintenance, real-time monitoring, and energy management microservices, each registering its data requirements with the service registry. The predictive maintenance microservice registers data requirements including a data type identifier of vibration acceleration, a sampling frequency of 10000Hz, an accuracy threshold of 0.1, and a real-time requirement of 50ms. The real-time monitoring microservice registers data requirements including a data type identifier of temperature and rotational speed, a sampling frequency of 100Hz, an accuracy threshold of 0.5, and a real-time requirement of 200ms. The energy management microservice registers data requirements including a data type identifier of power, a sampling frequency of 10Hz, an accuracy threshold of 1, and a real-time requirement of 500ms.

[0101] After the demand parser reads the data demand information from the service registry, it queries the device type mapping table based on the data type identifier to determine the addresses of vibration sensors (192.168.1.101 to 192.168.1.112), temperature sensors (192.168.1.201 to 192.168.1.212), speed sensors (192.168.1.301 to 192.168.1.312), and power sensors (192.168.1.401 to 192.168.1.412), with the communication protocol type being Modbus TCP. The demand parser calculates the acquisition period parameter as 0.1ms based on the sampling frequency parameter of 10000Hz, and determines the numerical precision in the data format specification parameter to be one decimal place based on the precision threshold parameter of 0.1. It then organizes the device address, communication protocol type, acquisition period parameter, and data format specification parameter into a device acquisition command and sends it to the six edge gateways.

[0102] After receiving the acquisition command from the device, the edge gateway periodically acquires vibration acceleration data at a time of 0.1ms, collecting 10,000 data points per second. The original data stream size of a single device is 320MB / s. The edge gateway processes the original data stream using a wavelet packet decomposition multi-scale adaptive data compression algorithm. It employs the Daubechies wavelet basis function for 5-level wavelet packet decomposition, decomposing the original data stream into a set of sub-signals in 32 frequency bands. The energy distribution value of each frequency band sub-signal is then calculated. Figure 2 As shown, the energy is mainly concentrated in the first 8 frequency bands, accounting for 92% of the total energy. Based on the energy threshold parameter of 90%, the importance coefficients of the first 8 frequency bands are selected for retention. The stable intervals in the original data stream are compressed using a compression ratio of 18%, while the abrupt change intervals are compressed using a compression ratio of 8% to maintain high fidelity. The distinction between stable and abrupt intervals is based on whether the absolute value of the first-order difference exceeds a difference threshold parameter, which is set to 2.5 times the signal standard deviation, i.e., 0.075m / After processing by the wavelet packet decomposition multi-scale adaptive data compression algorithm, the compressed data stream size was reduced to 48MB / s, the compression ratio was 15%, and the total traffic of 12 devices was reduced to 576MB / s, meeting the gigabit network bandwidth requirements.

[0103] After receiving the compressed data stream, the edge-side preprocessing microservice processes it using an adaptive fusion model. The compressed data stream is converted into a 1024-bit numerical sequence and input into the model. Local features are extracted using 64 3×3 convolutional kernels in the first convolutional layer, resulting in a 1024×64-bit feature map. A spatial pyramid pooling layer performs max pooling operations on the feature map at three scales: 1×1, 2×2, and 4×4. 1×1 pooling produces 64-dimensional global features, 2×2 pooling produces 256-dimensional medium-scale features, and 4×4 pooling produces 1024-dimensional local features. These three scale features are then concatenated to form a 1344-dimensional multi-resolution feature map set. The deformable convolutional layer adaptively samples the multi-resolution feature map set. Since the sampling frequency parameter of 10000Hz is higher than the frequency threshold parameter of 1000Hz and the compression ratio parameter of 15% is close to the compression threshold parameter of 15%, the number of offset prediction convolutional kernels is set to 16. The offset vector learned by the deformable convolutional layer has an offset amplitude of 3 to 5 pixels in abrupt regions and an offset amplitude of only 1 to 2 pixels in stable regions, realizing dynamic adaptive adjustment of the receptive field. The feature fusion layer upsamples feature maps of different scales to a uniform size through bilinear interpolation and then concatenates them. The 32 1×1 convolutional kernels of the second convolutional layer perform cross-channel feature extraction on the fused feature map. The fully connected layer maps the features into a 128-dimensional feature vector as the output feature dataset.

[0104] The technical team dynamically correlated the feature dataset with business context information. From the feature dataset, they extracted data identifiers as equipment numbers CNC-01 to CNC-12, numerical content as 128-dimensional feature vectors, and timestamp information from March 15, 2024, 09:30:00 to 23:59:59. From the manufacturing execution system interface, they obtained work order identifier WO-20240315-001 and process information as fine grinding process. From the asset management system interface, they obtained equipment model identifier DMG-HSC75 and location information as workstations 1 to 6 in area A and workstations 1 to 6 in area B. The above information was organized into structured objects according to a predefined data pattern and serialized into semantic data objects. The topic published to the message queue was vibration monitoring data.

[0105] The monitoring module monitors the data transmission link latency in real time. During the initial system operation, the latency is 45ms, which is below the latency threshold of 100ms. Vibration amplitude, temperature, rotational speed, and energy consumption values ​​of 12 devices are extracted from the feature dataset to form a feature vector space. The vibration amplitude range is 0.05m / up to 0.35m / The temperature range is 45℃ to 85℃, the rotational speed range is 3000 r / min to 18000 r / min, and the energy consumption range is 15kW to 75kW. A fuzzy C-means clustering algorithm is used to perform cluster analysis on the feature vector space. The initial cluster centers for the normal operating state categories are set at vibration amplitudes of 0.08 m / s². Temperature 55℃, rotation speed 12000 r / min, energy consumption 45 kW; the cluster center for the minor abnormal state category is a vibration amplitude of 0.18 m / s. Temperature 70℃, rotational speed 9000 r / min, energy consumption 60 kW; the cluster center for severe fault conditions is a vibration amplitude of 0.30 m / s. The parameters are: temperature 82℃, rotational speed 5000 r / min, and energy consumption 70 kW. After 15 iterations, the change in the objective function decreased to 0.0008, which is below the convergence threshold parameter of 0.001, indicating cluster convergence. Figure 3 As shown, among the 12 devices, 9 devices have a maximum membership value corresponding to the normal operation status category, with membership values ​​ranging from 0.85 to 0.92; 2 devices correspond to the minor abnormal status category, with membership values ​​of 0.78 and 0.81; and 1 device corresponds to the severe fault status category, with a membership value of 0.88. The device number is CNC-07.

[0106] When the monitoring module detects that the equipment operating status classification result of device CNC-07 indicates a severe fault status, it triggers an adaptive optimization mechanism to reduce the compression ratio parameter from 15% to 8% to improve data fidelity, while keeping the sampling frequency parameter unchanged at 10000Hz. The adjusted parameters are then updated in the edge gateway configuration parameter storage area. After the system has been running for 6 hours, during peak production periods with 12 devices operating at full load simultaneously, the data transmission latency rises to 120ms, exceeding the latency threshold parameter of 100ms. The adaptive optimization mechanism then reduces the sampling frequency parameter to 6000Hz, and the latency decreases to 65ms. Figure 4 As shown, the sampling frequency parameter and the compression ratio parameter are dynamically adjusted within a 24-hour operating cycle based on the delay duration and equipment operating status classification results. The sampling frequency parameter is adjusted from 5000Hz to 10000Hz, and the compression ratio parameter is adjusted from 8% to 18%, ensuring stable operation of the system under different load conditions.

[0107] Compared to traditional fixed sampling and full-data upload methods, this invention achieves intelligent processing of variable compression ratios through a wavelet packet decomposition multi-scale adaptive data compression algorithm. It adaptively selects and retains important frequency band coefficients based on signal characteristics, significantly reducing data transmission volume while ensuring no distortion of key features, thus solving the network bandwidth bottleneck problem under high-frequency sampling. Through multi-scale feature fusion and deformable convolution coupling mechanisms in an adaptive data feature fusion model, it achieves adaptive feature extraction from heterogeneous device data, enhancing the model's ability to represent scale changes and deformation features in industrial data and improving the discriminative power of feature datasets. Fuzzy C-means clustering algorithm enables intelligent classification of equipment operating status; the membership matrix can handle ambiguous state boundaries, providing a quantitative grading basis for predictive maintenance. Through end-to-end monitoring and adaptive optimization mechanisms, sampling frequency and compression ratio parameters are dynamically adjusted based on real-time latency and equipment operating status, achieving self-adaptation and self-healing of the data extraction link. This ensures high reliability and real-time performance under different load conditions, providing technical support for the intelligent service-oriented transformation of industrial production IoT data.

[0108] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. An industrial production Internet of Things data microservice extraction method, characterized in that, Upper-layer business microservices register data requirement information, including data type identifiers, sampling frequency parameters, precision threshold parameters, and real-time requirement parameters, with the service registry. The requirement parser continuously monitors the service registry and converts the data requirement information into device acquisition instructions containing acquisition cycle parameters and data format specification parameters, which are then sent to the edge gateway. The edge gateway acquires the raw data stream according to the device acquisition instructions and performs wavelet packet decomposition and multi-scale adaptive data compression algorithm processing on the raw data stream to obtain a compressed data stream and compression ratio parameters. The edge-side preprocessing microservice receives the compressed data stream and uses a data feature adaptive fusion model to denoise, clean, and extract features from the compressed data stream to obtain a feature dataset. The feature dataset is dynamically associated with business context information, including work order identifiers, equipment model identifiers, and timestamp information, obtained from the manufacturing execution system interface and asset management system interface, and then encapsulated into a semantic data object and published to the message queue. The monitoring module monitors the data transmission link in real time to obtain the latency duration and performs fuzzy C-means clustering algorithm processing on the feature dataset to obtain the equipment operating status classification result. When the latency duration exceeds the latency threshold parameter or the equipment operating status classification result indicates an anomaly, adaptive optimization is achieved by adjusting the sampling frequency parameter and compression ratio parameter.

2. The method of claim 1, wherein, The processing steps of the wavelet packet decomposition multi-scale adaptive data compression algorithm are as follows: the original data stream is decomposed into a set of sub-signals of different frequency bands using wavelet packet transform; the energy distribution value of each frequency band sub-signal in the set of sub-signals is calculated; and important coefficients whose energy proportion exceeds the energy threshold parameter are adaptively selected and retained based on the energy distribution value.

3. The method according to claim 2, characterized in that, The wavelet packet decomposition multi-scale adaptive data compression algorithm uses a high compression ratio parameter to compress the stationary intervals in the original data stream, and maintains a low compression ratio parameter for the abrupt intervals in the original data stream to preserve fidelity. The variable compression ratio processing is achieved by calculating the entropy value of each frequency band sub-signal to determine the wavelet basis function type and decomposition level parameter.

4. The method according to claim 3, characterized in that, The structure of the adaptive fusion model for data features is as follows: the input layer receives a numerical sequence of compressed data streams; the first convolutional layer contains 64 convolutional kernels with a kernel size of 3x3 and a stride of 1; and the spatial pyramid pooling layer performs pooling operations on the output of the first convolutional layer with pooling scales of 1x1, 2x2, and 4x4 to obtain a set of multi-resolution feature maps.

5. The method according to claim 4, characterized in that, In the adaptive fusion model of data features, deformable convolutional layers sample multi-resolution feature map sets. The sampling position offset of deformable convolutional layers is learned to achieve adaptive receptive field adjustment. The feature fusion layer fuses feature maps of different scales into a unified dimensional fusion feature map through upsampling and concatenation operations.

6. The method according to claim 5, characterized in that, In the adaptive fusion model of data features, the second convolutional layer performs convolution processing on the fused feature map with 32 convolutional kernels of 1 x 1 size. The fully connected layer flattens the output of the second convolutional layer and maps it to a feature vector. The output layer outputs the feature vector as the feature dataset.

7. The method according to claim 6, characterized in that, The spatial pyramid pooling layer performs max pooling operations on feature maps at different scales: 1x1 pooling captures global contextual information, 2x2 pooling captures medium-range spatial relationships, and 4x4 pooling captures local detailed features. The feature maps at the three scales are flattened and then stitched together according to the channel dimension to form a multi-scale feature representation.

8. The method according to claim 7, characterized in that, Deformable convolutional layers learn a two-dimensional offset vector at each sampling position of a standard convolutional kernel. The offset vector is predicted by an additional convolutional layer, which causes the sampling grid of the convolutional kernel to deform according to the input features. When encountering a sharp change in the data stream, the sampling points automatically gather towards the change region, and when encountering a stable region, the sampling points spread out to cover a wider range.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions, which, when executed in a computer, are used to perform the industrial production Internet of Things data microservice extraction method according to any one of claims 1-8.

10. A microservice extraction system for industrial production Internet of Things data, characterized in that, The system comprises the computer-readable storage medium of claim 9, wherein the system is a computer, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes program instructions stored in the computer-readable storage medium.