Industrial Internet of Things protocol conversion method and system based on intermediate grammar generation graph

By adopting the IoT protocol conversion method based on intermediate syntax generation graphs in industrial manufacturing, the problems of complexity and inefficiency of protocol conversion in the prior art are solved, and more efficient and generalized protocol conversion is achieved, which is suitable for intelligent manufacturing scenarios.

CN119788749AActive Publication Date: 2025-04-08SHANGHAI JIAOTONG UNIV
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411976666.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-08
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The prior art IoT protocols that are difficult to effectively convert non-HTML/HTTP information in industrial manufacturing lead to the complexity and inefficiency of data processing and device collaboration.

Method used

The industrial IoT protocol conversion method based on intermediate syntax generation graph is adopted, and the conversion and collaborative work between multiple protocols is realized by pre-processing the data at edge nodes, analyzing the intermediate state syntax, frequency conversion and data packet assembly and distribution.

Benefits of technology

It reduces the complexity of protocol conversion, improves the generalization and efficiency of the conversion process, reduces computing and storage overhead, and is suitable for intelligent manufacturing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788749A_ABST
    Figure CN119788749A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial internet of things protocol conversion method and system based on an intermediate grammar generated graph, and the method comprises the steps: carrying out the classification, cleaning and other preprocessing work of data at an edge node, and extracting the signal data of which the frequency needs to be converted; analyzing a signal data packet to intermediate state grammar to obtain data packet attribute information, routing information and data content, performing interpolation and complementation operation on data, and giving true value estimation after frequency conversion through a series of configurable target tracking algorithms; and finally, carrying out life cycle monitoring and management on the data packets, assembling the data packets, judging and scheduling the priorities of the data packets, and completing the distribution of the data packets, thereby realizing the industrial Internet of Things protocol conversion method based on the intermediate grammar generated graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a technology in the field of intelligent manufacturing, specifically to an industrial Internet of Things protocol conversion method and system based on an intermediate grammar generation graph. Background Art

[0002] Industrial manufacturing is an extremely complex system engineering. In the process of industrial production, with the improvement of manufacturing equipment, its degree of digitalization and informatization has been further deepened, and the amount of data generated in the manufacturing process has continued to increase. Ship plate bending and pressing is a real scene with massive heterogeneous data. The processing site is equipped with temperature sensors, position sensors, speed sensors, cameras and other sensing equipment. At the same time, bending machines, loading and unloading trolleys, lifting electromagnets and other equipment are responsible for receiving and executing instructions sent by users from the cloud. It is necessary to consider not only the precise control of the bending machine, but also the close coordination between the bending machine and the loading and unloading trolley. The above scenarios involve data processing work under different sensors and different protocols, and involve the collaborative work of many devices. Summary of the invention

[0003] In view of the deficiency that the prior art can only convert HTML / HTTP information into other protocol types but has no adaptation for the conversion of non-HTML / HTTP information, the present invention proposes an industrial Internet of Things protocol conversion method and system based on an intermediate grammar generation graph. By performing pre-processing work such as classification and cleaning on the data at the edge node, the signal data that needs to be converted in frequency is extracted; then, the signal data packet is parsed into the intermediate state grammar to obtain the data packet attribute information, routing information, and data content, and then the data is interpolated and completed. Through a series of configurable target tracking algorithms, an estimate of the true value after the frequency conversion is given; finally, the data packet is monitored and managed for its life cycle, the data packet is assembled, the priority of the data packet is judged and scheduled, and the distribution of the data packet is completed, thereby realizing the industrial Internet of Things protocol conversion method based on the intermediate grammar generation graph.

[0004] The present invention is achieved through the following technical solutions:

[0005] The present invention relates to an industrial IoT protocol conversion method based on an intermediate grammar generation graph, comprising:

[0006] Step 1: Sensor data preprocessing: After distinguishing the sensor data by type, collect the frequency of the sensor output and perform data cleaning;

[0007] Step 2, intermediate grammar graph generation: according to the sensor signal data after cleaning, data packet parsing and routing information parsing are performed in sequence to generate an intermediate state grammar and an intermediate grammar generation graph;

[0008] Step 3, frequency aggregation conversion: after normalizing the sensor frequency according to the intermediate state attribute information, intermediate state data information and data packet routing information, data sampling is performed at the specified sampling rate and target frequency conversion is performed, that is, data interpolation and completion and true value estimation are performed according to the intermediate grammar generation graph;

[0009] Step 4: Data assembly and distribution: According to the converted data sequence and data packet routing information, data packets are constructed based on the target protocol, and the constructed data packets are time-controlled, that is, the data packet life cycle is monitored and data packet priority judgment and scheduling are performed, and finally the data packets are distributed.

[0010] The present invention relates to an industrial Internet of Things protocol conversion system based on an intermediate syntax generation graph for realizing the above method, comprising: a sensor data preprocessing module, an intermediate syntax graph generation module, a frequency aggregation conversion module and a data assembly and distribution module, wherein: the sensor data preprocessing module performs sensor data type distinction, sensor output frequency acquisition, and data cleaning processing according to original Internet of Things data information to obtain sensor signal data results after cleaning; the intermediate syntax graph generation module performs data packet parsing, routing information parsing, and intermediate state syntax generation processing according to the sensor signal data information after cleaning to obtain an intermediate syntax generation graph result composed of intermediate state attribute information, intermediate state data information, and data packet routing information; the frequency aggregation conversion module performs sensor frequency normalization, frequency reduction sampling, and target frequency conversion processing according to the intermediate syntax generation graph information to obtain a converted data sequence result; the data assembly and distribution module performs target protocol packet construction, data packet timing control, and data packet distribution processing according to the converted data sequence information to obtain a target protocol packet result after timing control. Technical Effects

[0011] The present invention converts various types of protocol packets into intermediate state syntax during data packet parsing by defining and constructing an intermediate syntax generation graph, and realizes target protocol packet construction through the intermediate syntax generation graph during data packet assembly; for the downsampling processing of high-frequency IoT data, the present invention aggregates and estimates IoT data within a period of time, and performs error elimination processing on data within a period of time. Compared with the prior art, the present invention reduces the complexity of protocol conversion and enhances the generalization and efficiency of the protocol conversion process by means of an intermediate syntax generation graph; the present invention reduces computing and storage overheads through aggregate estimation based on Kalman filtering, and provides a feasible solution for intelligent manufacturing scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a flow chart of the present invention;

[0013] Figure 2 It is a schematic diagram of the system of the present invention;

[0014] Figure 3 is the intermediate syntax diagram of the present invention;

[0015] Figure 4 A UML diagram of a common data dictionary for an embodiment;

[0016] Figure 5 A one-to-one protocol parsing relationship diagram for an implementation example. DETAILED DESCRIPTION

[0017] like Figure 1 As shown, this embodiment relates to an industrial IoT protocol conversion method based on an intermediate grammar generation graph, including:

[0018] Step 1: Sensor data preprocessing: After distinguishing the sensor data by type, collect the frequency of the sensor output and perform data cleaning, including:

[0019] a) For sensor signal data, first remove the default data. Delete sensor data with missing or incomplete data packets. Secondly, combine the unit types stored in the equipment information model and build a simple rule base to remove data that obviously does not conform to the application scenario, thereby performing data cleaning. During the ship plate bending process, the speed sensor value of the loading and unloading equipment should not be too large, the position sensor of the equipment should always be within the processing area, and the column head of the bending machine should ensure strict upper and lower limit constraints.

[0020] b) For video stream data, the inter-frame difference method is used to extract the key frames in the video data. First, each frame image is traversed, and the absolute value of the pixel difference between it and the previous frame image is calculated. The sum and average are used as the inter-frame difference between the current image and the previous frame image, and then the inter-frame difference list is obtained through the smoothing function, and all the maximum values ​​of the smoothed inter-frame difference sequence are found, and the corresponding index is saved. Finally, the corresponding key frame is found according to the index, which is the extracted key frame. The larger the average pixel interpolation between frames, the greater the difference in image content. Therefore, the key frame is determined by extracting the maximum value of the inter-frame interpolation. In order to avoid noise interference, the present invention uses a smoothed difference sequence, so that the extracted key frame can better show the key information of the current video, while reducing the interference of invalid information and improving calculation and storage efficiency.

[0021] Step 2, intermediate grammar graph generation: according to the sensor signal data after cleaning, data packet parsing and routing information parsing are performed in sequence to generate intermediate state grammar and intermediate grammar generation graph, which specifically includes:

[0022] 2.1 Parse data packets of various protocol types into intermediate syntax according to the rules to solve the complex conversion problems between protocols: When the camera monitors the ship plate processing site, RTMP is usually used to upload the video data to the cloud platform. When users watch on the cloud platform, the platform can transcode these data into HTTP streams, such as HLS (HTTP Live Streaming), for users to play. Converting the Modbus TCP protocol to the HTTP protocol is also a common application scenario. During the ship plate processing process, the PLC device communicates with the control system through the Modbus TCP protocol. In order to present these device status information to the user through a web page or API, a Modbus TCP-HTTP gateway is required, that is, converting the Modbus TCP protocol to the HTTP protocol.

[0023] This embodiment implements protocol conversion between IT protocols RTMP, HTTP and OT protocols ModbusTCP, CANBus, and MQTT, constructs a common data dictionary, extracts key information in protocol conversion, and converts it into intermediate JSON syntax, thereby obtaining intermediate attribute information, intermediate data information, and data packet routing information.

[0024] 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, wherein: 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 specify the data source, data type (such as temperature, humidity, status, etc.), data unit, data sampling rate, and data accuracy; the target protocol and conversion mapping information specifies the original protocol type, target protocol type, data conversion function, and target device identifier; the data content information specifies the data identifier, data content, status code, data priority, and timestamp.

[0025] like Figure 5 As shown, the protocol conversion described above requires configuration according to the corresponding relationship between RTMP, HTTP, ModbusTCP, CANBus, and MQTT. Kind of rules.

[0026] 2.2 Convert the original protocol into an intermediate grammar, and then convert it from the intermediate grammar state to 5 target grammars. Only 10 conversion methods need to be configured, which reduces the workload of protocol conversion to a certain extent and improves development and operation efficiency. And as the number of protocols increases, the optimization provided by the intermediate grammar state in terms of complexity will be more significant.

[0027] Step 3: Frequency aggregation conversion: After normalizing the sensor frequency based on the intermediate state attribute information, intermediate state data information, and data packet routing information, data sampling is performed at a specified sampling rate and target frequency conversion is performed, that is, data interpolation and completion and true value estimation are performed based on the intermediate grammar generation graph, specifically including:

[0028] 3.1 Normalize the sampling frequency. After normalization, the sensor data can be analyzed and discussed at the digital angular frequency of 0-2pi;

[0029] 3.2 Scale the original data interval and user sampling rate in proportion to the normalized ratio;

[0030] 3.3 Based on the interpolation method, the normalized data is adaptively supplemented. Specifically, after frequency normalization, there is a sequence of [time, value] key-value pairs [t i ,y i ],i∈[1,n], the sensor sampling frequency is f, and the sampling interval is According to the two adjacent key-value pairs [t i ,y i ] and [t i+1 ,y i+1 ], if t i+1 -r i <2Δr, the two key value pairs are considered continuous and no interpolation is required. i+1 -t i ≥2Δt, the two key-value pairs are considered discontinuous, and it is necessary to determine whether the key-value pair sequence satisfies linear or nonlinear changes. i ,y i ] and [t i+1 ,y i+1 ]Build a function between two points [t i +m·Δt,Y(t i +m·Δt)],t i +mΔt≤t i+1 ,m∈N + Insert it into the sequence. The interpolated curve effectively conforms to the original linear assumption, increases the amount of original data, satisfies the frequency distribution of the data sequence, and provides a basis for subsequent frequency conversion and true value estimation.

[0031] 3.4 The discrete data points within a sampling period after scaling are intercepted, and the target tracking algorithm model is selected according to the sensor type, and the true value of the measurement data sequence within the sampling period is estimated.

[0032] 3.5 Use the Kalman filter algorithm to build an estimation model, encapsulate the model and algorithm, and simplify the process. Users only need to select the model and configure the parameters to implement the complete filtering process, including:

[0033] i) The state prediction step is based on a preset mathematical model and combines the sensor observation data at the previous moment to infer the predicted value of the sensor data at the current moment, specifically: in: is the predicted value of the current state, F is the state transfer matrix, is the best estimate of the state at the previous moment, B is the control matrix, u t-1 To control the amount.

[0034] ii) The error covariance prediction step evaluates the accuracy of the sensor data prediction results by introducing the process noise variance Q, specifically: in: is the predicted covariance matrix of the current state, P t-1 is the covariance matrix of the best estimate of the state at the previous moment, and Q is the noise of the prediction model.

[0035] iii) Kalman gain calculation is the key to Kalman filtering. By calculating the weight system, the influence of the observation value on the final estimation result is determined, specifically: K t ∈[0,1], where: K t is the Kalman coefficient, H is the observation matrix, and R is the covariance matrix of the observation noise.

[0036] iv) The state update introduces weights to set the confidence level of the formula calculation results, that is, to indicate how much we believe in the measured value and how much we believe in the predicted value, specifically: in: That is, it is the best estimate of the current state, which can be considered to be close to the true value and is also the final result required. t is the observed value at time t. t When the value of is 0, Represents full confidence in the prediction results of the formula; if K t The value of is 1, and when the H element is 1, then It means that you fully believe the results measured by the sensor; when K t When it is between 0 and 1, it represents the fusion of the measurement results and the calculation results.

[0037] v) The purpose of error covariance update is to prepare for the Kalman filter at the next cycle moment, specifically: Where: P tis the covariance matrix of the current state.

[0038] The parameter settings in the Kalman filter are specifically manifested in the settings of the state transfer matrix F, the control matrix B, the noise Q of the prediction model, the covariance matrix R of the observation noise, the covariance matrix P, and the observation matrix H. For IoT sensor devices, the models involved are as follows:

[0039] a) The Kalman filter constant model of a one-dimensional system is suitable for sensors responsible for monitoring constant values. For example, in industrial production, it is often necessary to ensure the constant processing temperature, but due to factors such as light radiation and air conduction, the temperature will fluctuate around a constant, and this fluctuation is the process noise in the process. For such a scenario, a model is built, assuming that the object temperature is x, the temperature noise is w(k), let F = 1, B = 0, and its state equation is specifically: x(k+1) = x(k) + w(k). When the process noise variance Q = 0.01 and the measurement noise variance R = 0.25, it means that the temperature fluctuates on ±0.5℃, the initial value of the covariance matrix P = 1, and the observation matrix H = 1. Substituting this model into the above Kalman filter algorithm, the sensor data sequence can be analyzed accordingly, and the values ​​of Q and R can be configured by the user.

[0040] b) The Kalman filter uniform velocity transformation model of a two-dimensional system is suitable for scenarios where data in the IoT environment changes at a constant rate, such as position sensor data and speed sensor data. For such scenarios, a model is built, assuming that the displacement of the object is x, the speed of the object is v, the position noise is w(k), and the speed noise is w2(k). Its state equation is specifically: When Q = 0.01, R = 1, the initial value of the covariance matrix The observation matrix H = [1 0]. Substituting this model into the above Kalman filter algorithm, the sensor data sequence can be analyzed accordingly, and the values ​​of Q and R can be configured by the user.

[0041] c) The Kalman filter acceleration transformation model for two-dimensional systems is suitable for scenarios where data in the IoT environment changes at a constant acceleration, which can also be seen in position sensor data. For such scenarios, a model is built, assuming that the displacement of the object is x, the velocity of the object is v, the acceleration is a, the position noise is w1(k), the velocity noise is w2(k), and Its state equation is specifically: When Q1=Q2=0.01, R=1, the initial value of the covariance matrix The observation matrix H = [1 0]. Substituting this model into the above Kalman filter algorithm, the sensor data sequence can be analyzed accordingly, and the values ​​of Q and R can be configured by the user.

[0042] For the above Kalman filter process, using t i The data at time t is used to estimate i+1 This method still has two problems: first, for high-frequency data sequences, f data packets need to be processed per second, that is, f Kalman filter calculations need to be performed per second, which requires high system computing power and heavy load; second, t i+1 The true value estimate at time t is only affected by i The influence of the moment data, the calculation result does not take into account t i In summary, the Kalman filter with aggregate estimation, that is, the mean value of data within a period of time is used as the filtering object of the Kalman filter, and only one Kalman filter is required within the time Δt. Assume that the sampling frequency of the sensor after frequency normalization is f, and the sampling interval is The normalized data sequence is Y(t i ). The data sequence within Δt time is processed by averaging, and we get The new time series is t, t+Δt, t+2Δt, etc. Substituting the new time series and the new data series into the above Kalman filter equation, the Kalman filter result of the aggregate estimation can be obtained.

[0043] Step 4: Data assembly and distribution: According to the converted data sequence and data packet routing information, data packets are constructed based on the target protocol, and the constructed target protocol data packets are time-controlled, that is, the data packet life cycle is monitored and data packet priority is determined and scheduled, and finally the time-controlled data packet distribution is performed, which specifically includes:

[0044] 4.1 Data packet construction: According to the established public data dictionary, the intermediate state JSON is converted into the target protocol packet, realizing the sequential logic control and deterministic delay control of the data 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 true value estimation data obtained in the previous steps to generate a complete target protocol data packet.

[0045] 4.2 Timing control: The hard timing requirement of the processing process requires that even if the data packet is assembled, it cannot be distributed directly. For example, in the control task, the control cycle, completing the computing task below the control cycle is often meaningless and will cause computing waste. A deterministic delay system requires that all links in the system have deterministic delays, that is, from the generation of data packets, to the parsing, assembly and forwarding of data packets, and then to the edge task execution end, the delays of all computing nodes through which the above data flows should be deterministic. Both data packet generation and task execution are related to specific edge devices, which need to be determined in combination with the specific practice of the scenario and are difficult to control. Here, we mainly consider the delay control of the protocol conversion method involved in this embodiment.

[0046] In terms of network-level transmission, the DetNet (deterministic network) technology running on the IP layer 3 routing layer is used to set upper and lower bounds for the transmission delay of data packets between IoT devices and interconnected devices, thereby ensuring deterministic delay during data packet transmission.

[0047] In terms of protocol analysis, true value estimation and processing, the platform monitors and limits the timing by monitoring the data packet throughout its life cycle. The moment the platform receives a data packet, the timing control function component registers and monitors the data packet, tracks the data packet life cycle, and uses this as a basis to calculate and update the data packet priority.

[0048] 4.3 Distribution: Determine the distribution order of data packets according to the dynamic priority scheduling algorithm, including:

[0049] a) The platform obtains the process time constraint sequence T input by the user n For example, the position sensor data response time of process 1 needs to be controlled within 0.5 seconds, the position sensor data response time of process 2 needs to be controlled within 1 second, and so on. Through the DetNet delay control setting, the time consumption of data packet reception and forwarding can be set to Δt1 and Δt2. For the data packet of 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 hidden by the average value, it is considered that the data packet cannot be forwarded within the time constraint required by the process, and an alarm needs to be issued to the user. This means that the data packet can be processed and forwarded within the time constraint. Assume that the sequence of data packet processing time is C n , the packet forwarding priority is P n , then the initial priority of the data packet is P i =L i -Ci ,i∈[1,n]. Packets are sorted according to P i Insert the priority queue from small to large, P i The smaller the value, the higher the priority.

[0050] b) When the current processing priority is P i The data packets are sent with hard timing, which requires accurate time control instead of best-effort. i = 0, it means that the data packet should be forwarded directly; if P i >0, you need to insert a length of P in the current thread i After inserting the time segment, re-update the priority queue P i , updated priority P' i =P i -P1,i∈[2,n]. And so on, repeat this process until all data packets are forwarded.

[0051] c) During the data package update, the following situations may occur: i >0, when P i-1 >0 and P i-1 After the update, due to the insertion of time slice P i-1 , which may lead to P i -P i-1 <0, which means that the data packets that could have been forwarded are now forced to exceed the time constraint. This problem is solved by introducing a thread pool. There are multiple hot start threads in the thread pool. When P i -P i-1 <0, P i The task of forwarding data packets is handled by another thread, thus avoiding the above situation.

[0052] After specific practical experiments, the platform was packaged and deployed in edge computing devices under the Java runtime environment setting of JRE8. After testing, the intermediate syntax graph of the platform occupies 6.4KB of storage, the cache generated by the platform is 13.5KB, the average time for data packet parsing is 3.5ms, the average time for data mapping is 3.2ms, and the average time for protocol packet assembly is 2.6ms. The above method is specifically implemented by Java, that is, a system including: Java implementation connection layer, service layer and application layer is constructed.

[0053] Table 1 Comparison of technical characteristics

[0054] The present invention achieves the improvement of protocol conversion generalization, efficiency and practicability in the process of IoT protocol conversion. In the sensor data preprocessing module, users are allowed to configure a simple rule base and customize data cleaning rules; in the intermediate syntax graph generation module, by constructing intermediate state syntax, multiple interconnected IoT protocols are adapted, the complexity of conversion between protocols is reduced, and users are allowed to configure the protocol conversion library to achieve conversion of specific protocols; in the frequency aggregation conversion module, by providing a prototype of the Kalman filter aggregation estimation algorithm, users are allowed to configure specific models and parameters to adapt to multiple scenarios; in the data assembly and distribution module, data packets are assembled according to the public data dictionary, and multiple protocols have standardized and unified conversion and representation, with high versatility.

[0055] In the sensor data preprocessing module, the present invention extracts key frames from video data through the inter-frame difference method, reduces duplicate frames, reduces the burden of calculation and storage, and improves transmission efficiency; in the intermediate syntax graph generation module, the system realizes many-to-many protocol conversion by constructing intermediate state syntax, which saves performance expenses compared with the traditional one-to-one protocol conversion method; in the frequency aggregation conversion module, by performing aggregation estimation on the sensor data sequence, Kalman filtering is performed on the data mean within a period of time, thereby avoiding high-frequency Kalman filtering calculations; in the data assembly and distribution module, the data packet priority is dynamically scheduled, and the upper and lower bounds of the data packet delay are controlled based on the DetNet network based on the principle of deterministic delay, thereby reducing the data loss rate and data packet delay variation, optimizing the calculation and storage efficiency, reducing the process time consumption, and improving the execution efficiency of the data assembly and distribution process. At the same time, the present invention performs data cleaning on sensor signal data and video data to ensure that the data is authentic and available; in the intermediate syntax graph generation module, by specifying a common data dictionary, data packets of different formats are converted into intermediate syntax, and only configuration is required to complete the complex protocol conversion work at the edge, thereby reducing operation and maintenance costs and improving development efficiency; in the frequency aggregation conversion module, the system implements a Kalman filtering algorithm based on aggregation estimation and provides a preset model, and the use of the algorithm also only requires parameter adjustment; in the data assembly and distribution module, the upper and lower bounds of the data packet delay are controlled based on the DetNet network, and data packet distribution is scheduled according to the remaining delay priority scheduling rules, which is more in line with the processing requirements of industrial environments and has good practicality.

[0056] The above-mentioned specific implementation can be partially adjusted in different ways by those skilled in the art without departing from the principle and purpose of the present invention. The protection scope of the present invention shall be based on the claims and shall not be limited by the above-mentioned specific implementation. Each implementation scheme within its scope shall be subject to the constraints of the present invention.

Claims

1. An industrial IoT protocol conversion method based on an intermediate grammar generation graph, characterized in that: include: Step 1: Sensor data preprocessing: After distinguishing the sensor data by type, collect the frequency of the sensor output and perform data cleaning; Step 2, intermediate grammar graph generation: according to the sensor signal data after cleaning, data packet parsing and routing information parsing are performed in sequence to generate an intermediate state grammar and an intermediate grammar generation graph; Step 3, frequency aggregation conversion: after normalizing the sensor frequency according to the intermediate state attribute information, intermediate state data information and data packet routing information, data sampling is performed at the specified sampling rate and target frequency conversion is performed, that is, data interpolation and completion and true value estimation are performed according to the intermediate grammar generation graph; Step 4: Data assembly and distribution: According to the converted data sequence and data packet routing information, data packets are constructed based on the target protocol, and the constructed data packets are time-controlled, that is, the data packet life cycle is monitored and data packet priority judgment and scheduling are performed, and finally the data packets are distributed.

2. The industrial IoT protocol conversion method based on the intermediate grammar generation graph according to claim 1 is characterized in that: The step 1 specifically includes: a) For sensor signal data: first remove the default data, delete the sensor data with missing or incomplete data packets, and then, based on the unit type stored in the device information model, build a simple rule base to remove data that obviously does not meet the application scenario, thereby performing data cleaning; b) For video stream data, the inter-frame difference method is used to extract the key frames in the video data: first, each frame image is traversed, and the absolute value of the pixel difference between it and the previous frame image is calculated. The sum and average are taken as the inter-frame difference between the current image and the previous frame image. Then, the inter-frame difference list is obtained through the smoothing function, and all the maximum values ​​of the smoothed inter-frame difference sequence are found, and the corresponding index is saved. Finally, the corresponding key frame is found according to the index, which is the extracted key frame.

3. The industrial IoT protocol conversion method based on the intermediate grammar generation graph according to claim 2 is characterized in that: The key frames are extracted using the smoothed difference sequence to display the key information of the current video while reducing the interference of invalid information and improving computing and storage efficiency.

4. The industrial IoT protocol conversion method based on the intermediate grammar generation graph according to claim 1 is characterized in that: The step 2 specifically includes: 2.1 Parse data packets of various protocol types into intermediate syntax according to rules to solve the complex conversion problems between protocols; 2.2 Convert the original protocol into an intermediate grammar, and then convert it from the intermediate grammar state to 5 target grammars. Only 10 conversion methods need to be configured in total, which reduces the workload of protocol conversion to a certain extent and improves development and operation efficiency. In addition, as the number of protocols increases, the optimization provided by the intermediate grammar state in terms of complexity will be more significant.

5. The industrial IoT protocol conversion method based on the intermediate grammar generation graph according to claim 4 is characterized in that: Implement protocol conversion between IT protocols RTMP, HTTP and OT protocols ModbusTCP, CANBus, and MQTT, construct a public data dictionary, extract key information in protocol conversion, and convert it into intermediate JSON syntax to obtain intermediate attribute information, intermediate data information, and data packet routing information; The public data dictionary includes: device identification information, data type and data source information, target protocol and conversion mapping information and data content information, wherein: 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 specify the data source, data type (such as temperature, humidity, status, etc.), data unit, data sampling rate, and data accuracy; the target protocol and conversion mapping information specifies the original protocol type, target protocol type, data conversion function, and target device identifier; the data content information specifies the data identifier, data content, status code, data priority, and timestamp.

6. The industrial IoT protocol conversion method based on the intermediate grammar generation graph according to claim 1 is characterized in that: The step 3 specifically includes: 3.1 The sampling frequency is normalized, and the sensor data after normalization is analyzed and discussed at the digital angular frequency 0-2pi; 3.2 Scale the original data interval and user sampling rate in proportion to the normalized ratio; 3.3 Based on the interpolation method, the normalized data is adaptively completed; 3.4 Intercept discrete data points within a sampling period after scaling, select the target tracking algorithm model based on the sensor type, and estimate the true value of the measurement data sequence within the sampling period; 3.5 Use the Kalman filter algorithm to build an estimation model, encapsulate the model and algorithm, and simplify the process. Users only need to select the model and configure the parameters to implement the complete filtering process.

7. The industrial IoT protocol conversion method based on the intermediate grammar generation graph according to claim 6 is characterized in that: The adaptive completion is specifically as follows: 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 According to the two adjacent key-value pairs [t i ,y i ] and [t i+1 ,y i+1 ], if t i+1 -t i <2Δt, the two key value pairs are considered continuous and no interpolation is required. i+1 -t i ≥2Δt, the two key-value pairs are considered discontinuous, and it is necessary to determine whether the key-value pair sequence satisfies linear or nonlinear changes. i ,y i ] and [t i+1 ,y i+1 ]Build a function between two points [t i +m·Δt,Y(t i +m·Δt)],t i +mΔt≤t i+1 ,m∈N + Insert into the sequence.

8. The industrial IoT protocol conversion method based on the intermediate grammar generation graph according to claim 6 is characterized in that: The Kalman filter algorithm specifically includes: i) The state prediction step is based on a preset mathematical model and combines the sensor observation data at the previous moment to infer the predicted value of the sensor data at the current moment, specifically: in: is the predicted value of the current state, F is the state transfer matrix, is the best estimate of the state at the previous moment, B is the control matrix, u t-1 To control the amount; ii) The error covariance prediction step evaluates the accuracy of the sensor data prediction results by introducing the process noise variance Q, specifically: in: is the predicted covariance matrix of the current state, P t-1 is the covariance matrix of the best estimate of the state at the previous moment, and Q is the noise of the prediction model; iii) Kalman gain calculation is the key to Kalman filtering. By calculating the weight system, the influence of the observation value on the final estimation result is determined, specifically: Where: K t is the Kalman coefficient, H is the observation matrix, and R is the covariance matrix of the observation noise; iv) The state update introduces weights to set the confidence level of the formula calculation results, that is, to indicate how much we believe in the measured value and how much we believe in the predicted value, specifically: in: That is, the best estimate of the current state. It is considered to be close to the true value, which is also the final result. t is the observed value at time t, when K t When the value of is 0, Represents full confidence in the prediction results of the formula; if K t The value of is 1, and when the H element is 1, then It means that you fully believe the results measured by the sensor; when K t When it is between 0 and 1, it represents the fusion of the measurement result and the calculation result; v) The purpose of error covariance update is to prepare for the Kalman filter at the next cycle moment, specifically: Where: P t is the covariance matrix of the current state.

9. The industrial IoT protocol conversion method based on the intermediate grammar generation graph according to claim 1 is characterized in that: The step 4 specifically includes: 4.1 Data packet construction: According to the established public data dictionary, the intermediate state JSON is converted into the target protocol packet, realizing the sequential logic control and deterministic delay control of the data packet forwarding sequence. 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 true value estimation data obtained in the previous steps to generate a complete target protocol data packet; 4.2 Timing control, that is, in terms of transmission at the network level, by using the DetNet (deterministic network) technology running on the IP layer 3 routing layer, the transmission delay upper and lower bounds are set for the data packets of IoT devices and interconnected devices, ensuring the deterministic delay during data packet transmission; in terms of protocol analysis, true value estimation and processing, the platform monitors and limits the timing by monitoring the data packet throughout its life cycle. The moment the platform receives a data packet, the timing control function component registers and monitors the data packet, tracks the data packet life cycle, and calculates and updates the data packet priority based on this; 4.3 Distribution: Determine the distribution order of data packets according to the dynamic priority scheduling algorithm, including: a) The platform obtains the process time constraint sequence T input by the user n , through the DetNet delay control setting, the time consumption of data packet reception and forwarding can be set to Δt1 and Δt2, then for the data packet of 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 inspection like when This means that the data packet is processed and forwarded within the time constraint. Assume that the sequence of the data packet processing time is C n , the packet forwarding priority is P n , then the initial priority of the data packet is P i =L i -C i ,i∈[1,n], the data packets are sorted according to P i Insert the priority queue from small to large, P i The smaller it is, the higher the priority; b) When the current processing priority is P i For data packets, due to the hard timing requirement, accurate time control is not best-effort. If P i = 0, it means that the data packet should be forwarded directly; if P i >0, you need to insert a length of P in the current thread i After inserting the blank time segment, re-update the P in the priority queue i , updated priority P' i =P i -P1,i∈[2,n], and so on, repeating this process until all packets are forwarded; c) During the data package update, the following situations may occur: i >0, when P i-1 >0 and P i-1 After the update, due to the insertion of time slice P i-1 , which may lead to P i -P i-1 <0, which means that the data packets originally forwarded are now forced to exceed the time constraint. This problem is solved by introducing a thread pool. There are multiple hot start threads in the thread pool. When P i -P i-1 <0, P i The task of forwarding data packets is handled by another thread, thus avoiding the above situation.

10. An industrial IoT protocol conversion system based on an intermediate grammar generation graph for implementing any of the methods described in claims 1-9, characterized in that: include: The sensor data preprocessing module, the intermediate syntax graph generation module, the frequency aggregation conversion module and the data assembly and distribution module include: the sensor data preprocessing module distinguishes the sensor data type, obtains the sensor output frequency, and performs data cleaning according to the original IoT data information to obtain the sensor signal data result after cleaning; the intermediate syntax graph generation module performs data packet parsing, routing information parsing, and intermediate state syntax generation according to the sensor signal data information after cleaning to obtain the intermediate syntax generation graph result consisting of intermediate state attribute information, intermediate state data information, and data packet routing information; The frequency aggregation conversion module generates graph information according to the intermediate syntax, performs sensor frequency normalization, down-sampling, and target frequency conversion processing to obtain the converted data sequence results. The data assembly and distribution module constructs the target protocol packet, performs data packet timing control, and data packet distribution processing according to the converted data sequence information to obtain the target protocol packet result after timing control.

Citation Information

Patent Citations

  • Semantic conversion method of edge layer in industrial internet and middleware

    CN110399612A

  • Multi-sensor data fusion method based on Kalman filtering parameter extraction and state updating

    CN117313029A

  • Sensor data integration method and system based on digital twinning and edge computing

    CN117354752A

  • Priority scheduling system and method of multi-device multi-protocol access power service flow

    CN117479332A

  • Data mining modeling platform based on machine learning

    CN117708756A