Industrial internet of things protocol conversion method and system based on intermediate syntax generation graph
By using a graph generation method based on intermediate syntax, the complexity of converting various heterogeneous data protocols in industrial manufacturing is solved, achieving efficient and generalized protocol conversion that is suitable for intelligent manufacturing scenarios.
Patent Information
- Application Number
- CN202411976666.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing technologies can only convert HTML/HTTP information into other protocol types, and are insufficient for converting and adapting non-HTML/HTTP information, thus failing to effectively handle the collaborative work of various heterogeneous data in industrial manufacturing.
A method based on intermediate syntax graph generation is adopted to achieve the conversion of multiple protocols through sensor data preprocessing, intermediate syntax graph generation, frequency aggregation conversion, and data assembly and distribution.
It reduces the complexity of protocol conversion, enhances the generalizability and efficiency of protocol conversion, and reduces computational and storage overhead by generating graphs through intermediate syntax and Kalman filtering aggregation estimation, making it suitable for smart manufacturing scenarios.
Smart Images

Figure CN119788749B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a technology in the field of intelligent manufacturing, specifically an industrial IoT protocol conversion method and system based on intermediate syntax graph generation. Background Technology
[0002] Industrial manufacturing is an extremely complex systems engineering project. During industrial production, with the improvement of manufacturing equipment, its digitalization and informatization levels have deepened, and the amount of data generated in the manufacturing process has continuously increased. Ship plate bending is a real-world scenario with massive amounts of heterogeneous data. The processing site is equipped with sensing devices such as temperature sensors, position sensors, speed sensors, and cameras. Simultaneously, bending machines, loading / unloading trolleys, and lifting electromagnets are responsible for receiving and executing instructions sent by the user from the cloud. This requires not only precise control of the bending machine but also close coordination between the bending machine and the loading / unloading trolley. The above scenario involves data processing under different sensors and protocols, and the collaborative work of numerous devices. Summary of the Invention
[0003] This invention addresses the shortcomings of existing technologies that can only convert HTML / HTTP information to other protocol types, lacking adaptability for converting non-HTML / HTTP information. It proposes an industrial IoT protocol conversion method and system based on intermediate syntax graph generation. The method involves preprocessing data at edge nodes, including classification and cleaning, to extract signal data requiring frequency conversion. Then, by parsing the signal data packets to intermediate syntax, it obtains packet attribute information, routing information, and data content. Interpolation and completion operations are then performed on the data, and a series of configurable target tracking algorithms provide an estimate of the true frequency value after conversion. Finally, the lifecycle of the data packets is monitored and managed, packets are assembled, packet priorities are determined and scheduled, and packet distribution is completed, thus realizing an industrial IoT protocol conversion method based on intermediate syntax graph generation.
[0004] This invention is achieved through the following technical solution:
[0005] This invention relates to an industrial IoT protocol conversion method based on intermediate syntax graph generation, comprising:
[0006] Step 1: Sensor data preprocessing: After classifying the sensor data by type, collect the frequency output by the sensor and perform data cleaning.
[0007] Step 2, intermediate syntax graph generation: Based on the sensor signal data after cleaning, data packet parsing and routing information parsing are performed sequentially to generate intermediate syntax and intermediate syntax generation graph;
[0008] Step 3, Frequency Aggregation and Conversion: Based on the obtained intermediate state attribute information, intermediate state data information and data packet routing information, after normalizing the sensor frequency, data is sampled at the specified sampling rate and the target frequency is converted, that is, data interpolation and completion and true value estimation are performed based on the intermediate syntax to generate a graph.
[0009] Step 4, Data Assembly and Distribution: Based on the converted data sequence and data packet routing information, data packets are constructed according to the target protocol. The constructed data packets are subject to timing control, i.e., the data packet lifecycle is monitored and data packet priority is determined and scheduled. Finally, the data packets are distributed.
[0010] This invention relates to an industrial IoT protocol conversion system based on an intermediate syntax graph to implement the above-mentioned method. The system includes: a sensor data preprocessing module, an intermediate syntax graph generation module, a frequency aggregation and conversion module, and a data assembly and distribution module. Specifically: the sensor data preprocessing module performs sensor data type differentiation, sensor output frequency acquisition, and data cleaning based on the original IoT data information to obtain cleaned sensor signal data; the intermediate syntax graph generation module performs data packet parsing, routing information parsing, and intermediate state syntax generation based on the cleaned sensor signal data information to obtain an intermediate syntax graph consisting of intermediate state attribute information, intermediate state data information, and data packet routing information; the frequency aggregation and conversion module performs sensor frequency normalization, down-sampling, and target frequency conversion based on the intermediate syntax graph information to obtain a converted data sequence; and the data assembly and distribution module performs target protocol packet construction, data packet timing control, and data packet distribution based on the converted data sequence information to obtain a timing-controlled target protocol data packet.
[0011] Technical effect
[0012] This invention defines and constructs an intermediate syntax generation graph to convert various types of protocol packets to intermediate syntax during packet parsing. During packet assembly, the intermediate syntax generation graph is used to construct the target protocol packet. For downsampling of high-frequency IoT data, this invention performs aggregation estimation on IoT data over a period of time and performs error elimination processing on the data over a period of time. Compared with existing technologies, this invention reduces the complexity of protocol conversion and enhances the generalization and efficiency of the protocol conversion process through the intermediate syntax generation graph. Furthermore, this invention reduces computational and storage overhead through aggregation estimation based on Kalman filtering, providing a feasible solution for intelligent manufacturing scenarios. Attached Figure Description
[0013] Figure 1 This is a flowchart of the present invention;
[0014] Figure 2 This is a schematic diagram of the system of the present invention;
[0015] Figure 3 This is an intermediate syntax diagram of the present invention;
[0016] Figure 4 The example uses a common data dictionary UML diagram;
[0017] Figure 5 This is a diagram illustrating the one-to-one protocol parsing relationship in an example. Detailed Implementation
[0018] like Figure 1 As shown, this embodiment relates to an industrial IoT protocol conversion method based on intermediate syntax graph generation, including:
[0019] Step 1, Sensor Data Preprocessing: After classifying the sensor data by type, the frequency output by the sensor is collected and the data is cleaned, specifically including:
[0020] a) For sensor signal data, first remove default data. Delete sensor data with missing or incomplete data packets. Secondly, based on the unit types stored in the equipment information model, construct a simple rule base to remove data that clearly does not fit the application scenario, thus performing data cleaning. During the bending and pressing of ship plates, the speed sensor values of the loading and unloading equipment should not be too high, the position sensor of the equipment should always be within the processing area, and the bending machine's column head should maintain strict upper and lower boundary constraints, etc.
[0021] (b) For video stream data, the inter-frame difference method is used to extract keyframes. First, each frame is traversed, and the absolute value of the pixel difference between it and the previous frame is calculated. The sums and averages of these differences are used as the inter-frame difference between the current and previous frames. Then, a smoothing function is used to obtain a list of inter-frame differences. All maxima of the smoothed inter-frame difference sequence are found and their corresponding indices are saved. Finally, the corresponding keyframe is found based on the index; this is the extracted keyframe. A larger average pixel interpolation between frames indicates a greater difference in image content. Therefore, keyframes are determined by extracting the maxima of the inter-frame interpolation. To avoid noise interference, this invention uses a smoothed difference sequence. This allows the extracted keyframes to better display the key information of the current video while reducing interference from invalid information and improving computational and storage efficiency.
[0022] Step 2, Intermediate Syntax Graph Generation: Based on the sensor signal data after cleaning, data packet parsing and routing information parsing are performed sequentially to generate the intermediate syntax and the intermediate syntax generation graph, specifically including:
[0023] 2.1 Parsing data packets of various protocol types into intermediate syntax according to rules solves the complex conversion problem between protocols: When monitoring the ship plate processing site with cameras, RTMP is usually used to upload video data to the cloud platform. When users watch on the cloud platform, the platform can transcode this data into HTTP streams, such as HLS (HTTP Live Streaming), for playback. Converting Modbus TCP protocol to HTTP protocol is also a common application scenario. During the ship plate processing, PLC devices communicate with the control system via Modbus TCP protocol. In order to present this device status information to users through web pages or APIs, a Modbus TCP-HTTP gateway is needed, that is, to convert the Modbus TCP protocol to the HTTP protocol.
[0024] This embodiment implements protocol conversion between IT protocol RTMP, HTTP and OT protocols ModbusTCP, CANBus, and MQTT, constructs a common data dictionary, extracts key information in the protocol conversion, and converts it into intermediate JSON syntax to obtain intermediate attribute information, intermediate data information, and data packet routing information.
[0025] like Figure 4 As shown, the public data dictionary includes: device identification information, data type and data source information, target protocol and conversion mapping information, and data content information. Specifically: device identification information specifies the device's unique identifier, the protocol type currently used by the device, the device description, and the device's installation location; data type and data source information specifies the data source, data type (e.g., temperature, humidity, status), data unit, data sampling rate, and data precision; target protocol and conversion mapping information specifies the original protocol type, target protocol type, data conversion function, and target device identifier; and data content information specifies the data identifier, data content, status code, data priority, and timestamp.
[0026] like Figure 5 As shown, the protocol conversion, based on the correspondence between RTMP, HTTP, ModbusTCP, CANBus, and MQTT, requires a total of [number] configurations. Such rules.
[0027] 2.2 The original protocol is converted into an intermediate syntax, and then converted from the intermediate syntax state to five target syntaxes. Only 10 conversion methods need to be configured, which greatly reduces the workload of protocol conversion and improves development and operation efficiency. Moreover, the optimization provided by the intermediate syntax state in terms of complexity becomes more significant as the number of protocols increases.
[0028] Step 3, Frequency Aggregation and Conversion: Based on the obtained intermediate state attribute information, intermediate state data information, and data packet routing information, after sensor frequency normalization, data is sampled at a specified sampling rate and target frequency conversion is performed. This involves data interpolation and completion, and true value estimation, based on the intermediate syntax graph generation. Specifically, this includes:
[0029] 3.1 Normalize the sampling frequency. After normalization, the sensor data can be analyzed and discussed at a digital angular frequency of 0-2π.
[0030] 3.2 Scale the original data interval and user sampling rate proportionally according to the normalization ratio;
[0031] 3.3 Based on the interpolation method, adaptive completion is performed on the normalized data. Specifically, after frequency normalization, there is a [time, value] key-value pair sequence [t... i ,y i ], i∈[1,n], the sensor sampling frequency is f, and the sampling interval is Based on the two adjacent key-value pairs [t] i ,y i ] and [t i+1 ,y i+1 If t i+1 -r i If r < 2Δr, then the two key-value pairs are considered continuous and no interpolation is needed. i+1 -t i If the sum is ≥2Δt, then the two key-value pairs are considered discontinuous, and it is necessary to determine whether the key-value pair sequence satisfies a linear or non-linear change. The conclusion is in [t]. i ,y i ] and [t i+1 ,y i+1 Functions for constructing connections between two points [t] i +m·Δt,Y(t i +m·Δt)],t i +mΔt≤t i+1 ,m∈N + Simply insert it into the sequence. The interpolated curve effectively conforms to the original linear assumption, increases the original data volume, satisfies the frequency distribution of the data sequence, and provides a basis for subsequent frequency transformation and true value estimation.
[0032] 3.4 Extract discrete data points within one sampling period after scaling, select the target tracking algorithm model according to the sensor type, and estimate the true value of the measurement data sequence within that sampling period.
[0033] 3.5 An estimation model is built using the Kalman filter algorithm, encapsulating the model and algorithm to simplify the process. Users only need to select the model and configure the parameters to complete the entire filtering process, which includes:
[0034] i) The state prediction step, based on a pre-defined mathematical model and combined with the sensor observation data from the previous moment, infers the predicted value of the sensor data at the current moment, specifically as follows: in: Let F be the predicted value of the current state, and let F be the state transition matrix. Let B be the best estimate of the state at the previous time step, and let u be the control matrix. t-1 To control the quantity.
[0035] ii) The error covariance prediction step evaluates the accuracy of the sensor data prediction results by introducing the process noise variance Q, specifically as follows: in: Let P be the predicted covariance matrix of the current state. t-1 Let be the covariance matrix of the best estimate of the state at the previous time step, and Q be the noise of the prediction model.
[0036] iii) Kalman gain calculation is the key to Kalman filtering. By calculating the weighting system, the degree of influence of the observations on the final estimation result is determined. Specifically: K t ∈[0,1], where: K t Here, represents the Kalman coefficients, H represents the observation matrix, and R represents the covariance matrix of the observation noise.
[0037] iv) State updates introduce weights to set the confidence level representing the formula calculation result, that is, to what extent the measured value is trusted and to what extent the predicted value is trusted, specifically: in: This is the best estimate of the state at the current moment, which can be considered to approximate the true value and is also the final desired result, z. t Let K be the observation value at time t. t When the value is 0, then This represents complete trust in the formula's predictions; if K t The value of is 1, and when the H element is 1, then This represents complete trust in the sensor measurements; when K t A value between 0 and 1 represents the fusion of measurement and calculation results.
[0038] v) The purpose of updating the error covariance is to prepare for the Kalman filtering in the next loop time step, specifically: Where: P tLet be the covariance matrix of the current state.
[0039] The parameter settings in the Kalman filter specifically involve setting the state transition matrix F, control matrix B, prediction model noise Q, observation noise covariance matrix R, covariance matrix P, and observation matrix H. For IoT sensor devices, the models involved include the following:
[0040] a) A Kalman filter constant model for one-dimensional systems is suitable for sensors responsible for monitoring constant values. For example, in industrial production, it is often necessary to maintain a constant processing temperature. However, due to factors such as light radiation and air conduction, the temperature will fluctuate around a certain constant; this fluctuation is the process noise during processing. For such scenarios, a model is built. Let the object temperature be x, and the temperature noise be w(k). Let F = 1 and B = 0. The specific state equation is: x(k+1) = x(k) + w(k). When the process noise variance Q = 0.01 and the measurement noise variance R = 0.25, it indicates that the temperature fluctuates within ±0.5℃. The initial value of the covariance matrix is P = 1, and the observation matrix is H = 1. Substituting this model into the Kalman filter algorithm described above allows for the corresponding analysis of the sensor data sequence. The values of Q and R are configurable by the user.
[0041] b) The Kalman filter uniform transform model for two-dimensional systems is suitable for scenarios in IoT environments where data changes at a constant rate, such as position sensor data and velocity data. For such scenarios, a model is built, where the object's displacement is x, its velocity is v, the position noise is w(k), and the velocity noise is w2(k). Let... Its state equation is as follows: When Q = 0.01 and R = 1, the initial value of the covariance matrix is... The observation matrix H = [1 0]. Substituting this model into the Kalman filter algorithm described above allows for the analysis of the sensor data sequence. The values of Q and R are configurable by the user.
[0042] c) The Kalman filter accelerated transform model for two-dimensional systems is suitable for scenarios in IoT environments where data changes with constant acceleration, which can also be seen in position sensor data. For such scenarios, a model is built, with the object's displacement as x, velocity as v, acceleration as a, position noise as w1(k), and velocity noise as w2(k). Its state equation is as follows: When Q1 = Q2 = 0.01, R = 1, the initial value of the covariance matrix is... The observation matrix H = [1 0]. Substituting this model into the Kalman filter algorithm described above allows for the analysis of the sensor data sequence. The values of Q and R are configurable by the user.
[0043] For the Kalman filtering process described above, using t i Use data from time t to estimate t i+1 The actual value of the data at any given time. This method still has two problems: First, for high-frequency data sequences, f data packets need to be processed per second, meaning f Kalman filter calculations are required per second, placing high demands on the system's computing power and creating a heavy load; second, t i+1 The true value estimate at time t is only affected by t i The calculation results do not take into account the influence of time-matter data. i The impact of data prior to time step t. In summary, using aggregate estimation Kalman filtering, that is, using the mean of data over a period of time as the filtering object, only one Kalman filter is needed within the time interval Δt. Assume the sensor sampling frequency after frequency normalization is f, and the sampling interval is... The normalized data sequence is Y(t) i The data sequence over a time interval Δt is averaged to obtain... The new time series are t, t+Δt, t+2Δt, ... Substituting the new time series and the new data series into the above Kalman filter equation, we can obtain the aggregated estimation Kalman filter result.
[0044] Step 4, Data Assembly and Distribution: Based on the converted data sequence and packet routing information, data packets are constructed according to the target protocol. Timing control is then applied to the constructed target protocol data packets, i.e., monitoring the data packet lifecycle and determining and scheduling data packet priorities. Finally, timing-controlled data packet distribution is performed, specifically including:
[0045] 4.1 Packet Construction: Based on the established public data dictionary, intermediate JSON is converted into target protocol packets, realizing timing logic control and deterministic delay control of packet forwarding order. The "Target Protocol and Conversion Mapping Information Table" in the public data dictionary specifies the original protocol type, target protocol type, data conversion function, and target device identifier. The data conversion function converts the attribute information in the original protocol into the target protocol attribute information and writes the estimated true value data obtained in the previous steps, thus generating a complete target protocol packet.
[0046] 4.2 Timing Control: The hard timing requirements of the processing flow mean that even after data packets are assembled, they cannot be directly distributed. For example, in control tasks, the control cycle is crucial; completing computational tasks below the control cycle is often meaningless and wasteful of computation. A deterministic latency system requires all stages to have deterministic latency. That is, from data packet generation to parsing, assembly, and forwarding, and finally to the edge task execution end, the latency of all computational nodes through which the data flows should be deterministic. Data packet generation and task execution are both related to specific edge devices and depend on the specific scenario, making them difficult to control. This embodiment primarily considers latency control for the protocol conversion method involved.
[0047] At the network layer, DetNet (deterministic networking) technology, which runs on the IP Layer 3 routing layer, is used to define upper and lower bounds for the transmission delay of data packets between IoT devices and interconnected devices, ensuring deterministic delay during data packet transmission.
[0048] In protocol parsing, real value estimation, and processing, the platform monitors and limits timing by performing full lifecycle monitoring of data packets. The moment the platform receives a data packet, the timing control component registers and listens to it, tracks its lifecycle, and calculates and updates its priority based on this data packet information.
[0049] 4.3 Distribution: The distribution order of data packets is determined according to the dynamic priority scheduling algorithm, specifically including:
[0050] a) The platform obtains the process time constraint sequence T input by the user. n For example, the response time of the position sensor data in process 1 needs to be controlled within 0.5 seconds, the response time of the position sensor data in process 2 needs to be controlled within 1 second, and so on. Through DetNet delay control settings, the time consumption for packet reception and forwarding can be set to Δt1 and Δt2. Therefore, for the data packet in process i, its processing time limit is L. i =T i -Δt1-ΔT2, i∈[1,n]. The average time for the platform to process data packets is obtained through statistical sample testing. like Considering the time jitter masked by the average value, it is deemed that the data packet cannot be forwarded within the time constraint required by the process, and an alert needs to be issued to the user. This means that the data packet can be processed and forwarded within the time constraint. Assume the data packet processing time sequence is C. n The packet forwarding priority is P. n The initial priority of the data packet is P. i =L i -Ci ,i∈[1,n]. The data packets are arranged according to P i Insert into the priority queue from smallest to largest, P i The smaller the value, the higher the priority.
[0051] b) When the current processing priority is P i The data packets, due to hard timing requirements, demand precise time control, rather than best-effort processing. If P i =0, which means the data packet should be forwarded directly; if P i If the value is greater than 0, then a thread of length P needs to be inserted into the current thread. i The blank time segment. After inserting the time segment, update P in the priority queue again. i The updated priority P' i =P i -P1,i∈[2,n]. And so on, repeating this process until all packets have been forwarded.
[0052] c) During packet updates, the following situation may occur: Originally P i >0, when P i-1 >0 and P i-1 After the update, due to the insertion of time slice P i-1 This may lead to P i -P i-1 A value less than 0 means that data packets that could have been forwarded are now forced to exceed the time constraint. This problem is solved by introducing a thread pool. A thread pool contains multiple warm-start threads, and when P... i -P i-1 When <0, P i The task of forwarding data packets is handled by another thread, thus avoiding the above situation.
[0053] Through practical experiments, this platform was packaged and deployed on an edge computing device under a JRE8 Java runtime environment. Testing showed that the platform's intermediate syntax graph occupied 6.4KB of storage, the platform-generated cache was 13.5KB, the average time for packet parsing was 3.5ms, the average time for data mapping was 3.2ms, and the average time for protocol packet assembly was 2.6ms. The above methods were implemented in Java, constructing a system including a Java implementation of the connection layer, service layer, and application layer.
[0054] Table 1 Comparison of Technical Features
[0055]
[0056]
[0057] This invention improves the generalizability, efficiency, and practicality of IoT protocol conversion. In the sensor data preprocessing module, users can configure a simple rule base and customize data cleaning rules. In the intermediate syntax graph generation module, an intermediate syntax is constructed to adapt to multiple IoT protocols, reducing the complexity of protocol conversion and allowing users to configure a protocol conversion library for specific protocol conversions. In the frequency aggregation conversion module, a Kalman filter aggregation estimation algorithm prototype is provided, allowing users to configure specific models and parameters to adapt to various scenarios. In the data assembly and distribution module, data packets are assembled according to a common data dictionary, providing standardized conversion and representation for multiple protocols, resulting in high versatility.
[0058] In the sensor data preprocessing module, this invention extracts key frames from video data using inter-frame differencing, reducing duplicate frames, alleviating computational and storage burdens, and improving transmission efficiency. In the intermediate syntax graph generation module, the system constructs an intermediate syntax to achieve many-to-many protocol conversion, saving performance overhead compared to traditional one-to-one protocol conversion methods. In the frequency aggregation and conversion module, the system aggregates and estimates sensor data sequences and applies Kalman filtering to the data mean over a period of time, avoiding high-frequency Kalman filtering calculations. In the data assembly and distribution module, data packet priority is dynamically scheduled based on deterministic latency. Using the DetNet network to control the upper and lower bounds of data packet latency, the system reduces data loss rate and data packet latency variations, optimizes computational and storage efficiency, reduces process time, and improves the execution efficiency of the data assembly and distribution process. Meanwhile, this invention performs data cleaning on sensor signal data and video data to ensure data authenticity and usability. In the intermediate syntax graph generation module, by defining a common data dictionary, data packets of different formats are converted to intermediate syntax. Only configuration is required to complete the complex protocol conversion work at the edge, reducing operation and maintenance costs and improving development efficiency. In the frequency aggregation conversion module, the system implements a Kalman filter algorithm based on aggregation estimation, provides a preset model, and the use of the algorithm also only requires parameter adjustment. In the data assembly and distribution module, based on the DetNet network to control the upper and lower bounds of data packet delay, data packet distribution and scheduling are performed according to the remaining delay priority scheduling rules, which is more in line with the processing needs of industrial environments and has good practicality.
[0059] The above-described specific implementations can be partially adjusted by those skilled in the art in different ways without departing from the principles and purpose of the present invention. The scope of protection of the present invention is defined by the claims and is not limited to the above-described specific implementations. All implementation schemes within the scope of the claims are bound by the present invention.
Claims
1. A method for industrial IoT protocol conversion based on intermediate syntax graph generation, characterized in that, include: Step 1, Sensor Data Preprocessing: After classifying the sensor data by type, collect the frequency output by the sensor and perform data cleaning. Step 2, Intermediate Syntax Graph Generation: Based on the sensor signal data after cleaning, data packet parsing and routing information parsing are performed sequentially to generate the intermediate syntax and the intermediate syntax generation graph, specifically including: 2.1 Data packets of various protocol types are parsed into intermediate state syntax according to rules to solve the complex conversion problem between protocols; 2.2 The original protocol is converted into an intermediate syntax, and then converted from the intermediate syntax state to 5 target syntaxes. Only 10 conversion methods need to be configured, which reduces the workload of protocol conversion to a certain extent, improves development and operation efficiency, and the optimization provided by the intermediate syntax state in terms of complexity will be more significant as the number of protocols increases. This project implements protocol conversion between IT protocol RTMP, HTTP and OT protocols ModbusTCP, CANBus, and MQTT, constructs a common data dictionary, extracts key information from the protocol conversion, and converts it into intermediate JSON syntax to obtain intermediate attribute information, intermediate data information, and packet routing information. Step 3, Frequency Aggregation and Conversion: Based on the obtained intermediate state attribute information, intermediate state data information, and data packet routing information, after sensor frequency normalization, data is sampled at a specified sampling rate and target frequency conversion is performed. This involves data interpolation and completion, and true value estimation, based on the intermediate syntax graph generation. Specifically, this includes: 3.1 The sampling frequency is normalized, and the sensor data is then analyzed and discussed at the digital angular frequency of 0-2π. 3.2 Scale the original data interval and user sampling rate according to the normalization ratio; 3.3 Based on the interpolation method, adaptive completion is performed on the normalized data; 3.4 Extract discrete data points within one sampling period after scaling, select the target tracking algorithm model according to the sensor type, and estimate the true value of the measurement data sequence within the sampling period; 3.5 Using the Kalman filter algorithm, an estimation model is built, and the model and algorithm are encapsulated to simplify the process. Users only need to select the model and configure the parameters to achieve the complete filtering process. Step 4, Data Assembly and Distribution: Based on the converted data sequence and packet routing information, data packets are constructed according to the target protocol. Timing control is applied to the constructed data packets, i.e., monitoring the data packet lifecycle and determining and scheduling data packet priorities. Finally, data packets are distributed, specifically including: 4.1 Packet Construction: Based on the established public data dictionary, the intermediate JSON is converted into the target protocol packet, realizing the timing logic control and deterministic delay control of the packet forwarding order. The "Target Protocol and Conversion Mapping Information Table" in the public data dictionary specifies the original protocol type, target protocol type, data conversion function, and target device identifier. The data conversion function converts the attribute information in the original protocol into the target protocol attribute information and writes the estimated real value data obtained in the previous steps, thus generating a complete target protocol packet. 4.2 Timing control, at the network layer, uses DetNet (deterministic networking) technology running on the IP Layer 3 routing layer to define upper and lower bounds for the transmission delay of data packets between IoT devices and interconnected devices, ensuring deterministic delay during data packet transmission. At the protocol parsing, real value estimation, and processing levels, the platform monitors and limits timing by performing full lifecycle monitoring of data packets. The moment the platform receives a data packet, the timing control component registers and listens to the packet, tracks its lifecycle, and calculates and updates its priority accordingly. 4.3 Distribution: The distribution order of data packets is determined according to the dynamic priority scheduling algorithm, specifically including: a) The platform obtains the process time constraint sequence input by the user. The time taken for packet reception and forwarding can be set via DetNet latency control settings. and Therefore, for the data packet of process i, the processing time limit is The average time for the platform to process data packets was obtained through statistical sample testing. ,like ,when This means that the data packet is processed and forwarded within the time constraint. Assuming the data packet processing time sequence is... The packet forwarding priority is The initial priority of the data packet is then... , according to Insert into the priority queue from smallest to largest. The smaller the value, the higher the priority. b) When the current priority is to be processed The data packets, due to hard timing requirements demanding precise time control, rather than best-effort, if If so, it means the data packet should be forwarded directly; if Then it is necessary to insert a length of in the current thread. For blank time segments, after inserting the time segment, update the priority queue again. Updated priority And so on, repeating this process until all data packets have been forwarded; c) During data packet updates, the following situation may occur: Originally >0, when and After the update, a time slice was inserted. This may lead to This means that data packets that were originally intended for forwarding are now forced to exceed time constraints. This problem is solved by introducing a thread pool, which contains multiple warm-start threads. At that time, The task of forwarding data packets is handled by another thread, thus avoiding the above situation.
2. The industrial IoT protocol conversion method based on intermediate syntax graph generation according to claim 1, characterized in that, Step 1 specifically includes: a) For sensor signal data: First, remove the default data. For sensor data with missing or incomplete data packets, delete them. Second, combine the unit types stored in the device information model and build a simple rule base to remove data that is obviously inconsistent with the application scenario, thereby cleaning the data. b) For video stream data, the inter-frame difference method is used to extract keyframes from the video data: First, traverse each frame image, calculate the absolute value of the pixel difference between it and the previous frame image, sum and average it to get the inter-frame difference between the current image and the previous frame image, then obtain the inter-frame difference list through the smoothing function, find all the maxima of the smoothed inter-frame difference sequence, save the corresponding index, and finally find the corresponding keyframe according to the index, which is the keyframe to be extracted.
3. The industrial IoT protocol conversion method based on intermediate syntax graph generation according to claim 2, characterized in that, Keyframes are extracted using a smoothed difference sequence to reveal key information in the current video while reducing interference from invalid information, thereby improving computational and storage efficiency.
4. The industrial IoT protocol conversion method based on intermediate syntax graph generation according to claim 1, characterized in that, The public data dictionary includes: device identification information, data type and data source information, target protocol and conversion mapping information, and data content information. Among them, the device identification information specifies the unique identifier of the device, the protocol type currently used by the device, the device description, and the device installation location; the data type and data source information specifies the data source, data type, data unit, data sampling rate, and data precision; the target protocol and conversion mapping information specifies the original protocol type, target protocol type, data conversion function, and target device identifier; and the data content information specifies the data identifier, data content, status code, data priority, and timestamp.
5. The industrial IoT protocol conversion method based on intermediate syntax graph generation according to claim 1, characterized in that, The Kalman filtering algorithm specifically includes: i) The state prediction step, based on a pre-defined mathematical model and combined with the sensor observation data from the previous moment, infers the predicted value of the sensor data at the current moment, specifically as follows: ,in: Let F be the predicted value of the current state, and let F be the state transition matrix. B is the best estimate of the state at the previous time step, and B is the control matrix. To control the quantity; ii) The error covariance prediction step evaluates the accuracy of the sensor data prediction results by introducing the process noise variance Q, specifically as follows: ,in: The predicted covariance matrix of the current state. Let be the covariance matrix of the best estimate of the state at the previous time step, and Q be the noise of the prediction model; iii) Kalman gain calculation is the key to Kalman filtering. By calculating the weighting system, the degree of influence of the observations on the final estimation result is determined. Specifically: ,in: Kalman coefficients Let R be the observation matrix, and let R be the covariance matrix of the observation noise. iv) State updates introduce weights to set the confidence level representing the formula calculation result, that is, to what extent the measured value is trusted and to what extent the predicted value is trusted, specifically: ,in: This is the best estimate of the state at the current moment, considered to approximate the true value, which is also the final desired result. Let be the observation value at time t, when When the value is 0, then This represents complete trust in the formula's prediction results; if The value of is 1, and when the H element is 1, then This represents complete trust in the sensor measurements; when A value between 0 and 1 indicates the fusion of measurement and calculation results; v) The purpose of updating the error covariance is to prepare for the Kalman filtering in the next loop time step, specifically: ,in: Let be the covariance matrix of the current state.
6. An industrial IoT protocol conversion system based on intermediate syntax graph generation, implementing the method of any one of claims 1-5, characterized in that, include: The system comprises a sensor data preprocessing module, an intermediate syntax graph generation module, a frequency aggregation and conversion module, and a data assembly and distribution module. Specifically: the sensor data preprocessing module performs sensor data type differentiation, sensor output frequency acquisition, and data cleaning based on the original IoT data to obtain cleaned sensor signal data; the intermediate syntax graph generation module performs data packet parsing, routing information parsing, and intermediate state syntax generation based on the cleaned sensor signal data to obtain an intermediate syntax graph consisting of intermediate state attribute information, intermediate state data information, and data packet routing information. The frequency aggregation and conversion module generates graph information based on the intermediate syntax, performs sensor frequency normalization, down-sampling, and target frequency conversion processing to obtain the converted data sequence result. The data assembly and distribution module performs target protocol packet construction, data packet timing control, and data packet distribution processing based on the converted data sequence information to obtain the timing-controlled target protocol data packet result.
Citation Information
Patent Citations
Priority scheduling system and method of multi-device multi-protocol access power service flow
CN117479332A
Data quality control method for IoT (Internet of Things) multi-protocol multilateral data acquisition process
CN118869825A