A method, device, medium and equipment for anti-tampering of power Internet of Things sensors based on convolutional coding

By processing power IoT sensor data using convolutional coding and interleaving techniques, the problem of data tampering at the perception layer is solved, enabling accurate data recovery and the dispersion of sudden errors, thereby improving the security and reliability of the sensors.

CN118826966BActive Publication Date: 2025-09-02STATE GRID SICHUAN ELECTRIC POWER CO MARKETING SERVICE CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411107180.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2025-09-02
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

Sensors in the sensing layer of the power Internet of Things are vulnerable to attacks, which can affect the authenticity and accuracy of data and pose a risk of data leakage. Existing security technologies cannot effectively protect against such attacks.

Method used

A tamper-proof device based on convolutional coding is adopted to protect the sensor data by encoding, interleaving and decoding.

Benefits of technology

The system achieves accurate data recovery on embedded systems, reduces algorithm complexity and computational overhead, and improves the ability to handle unexpected errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118826966B_ABST
    Figure CN118826966B_ABST
Patent Text Reader

Abstract

The present invention discloses an anti-tampering device for an electric power Internet of Things sensor based on convolutional coding, comprising a main control center, a single-chip microcomputer, an infrared image sensor and a power supply, wherein the power supply is connected to the single-chip microcomputer and the infrared image sensor through a power management module, the single-chip microcomputer is connected to the infrared image sensor, the single-chip microcomputer drives the infrared image sensor to collect and receive original temperature data, and converts the data into a binary information sequence, and the main control center is bidirectionally connected to the single-chip microcomputer; a sensor anti-tampering method comprises four steps of encoding, interleaving, deinterleaving and decoding, wherein a (2,1,5) convolutional coding method is adopted to encode an information sequence to obtain a coding sequence, interleaving is used to reorder the coding sequence, and the interleaved sequence is sent to the main control center through an IIC bus, the main control center deinterleaves the received sequence to obtain a decoding input sequence, and then decodes to output a decoding sequence, and converts the binary sequence into temperature data output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of sensor security technology in the power Internet of Things, and in particular relates to a method, device, medium and equipment for preventing tampering of power Internet of Things sensors based on convolutional coding. Background Art

[0002] The architecture of the Power Internet of Things (PIoT) consists of four main layers: the perception layer, the network layer, the platform layer, and the application layer. PIoT sensors belong to the perception layer. They convert measured signals into usable signals and output them, enabling power data collection and online monitoring of electrical equipment.

[0003] Existing information security solutions for the power Internet of Things (IoT) are primarily deployed at the network layer, but sensors at the perception layer also have security vulnerabilities. Terminal devices at the perception layer of the IoT are typically embedded systems. Because their communication, storage, and computing capabilities are limited to a certain extent, they cannot apply complex security technologies, making them vulnerable to attacks. Sensors essentially use a series of electronic components to achieve approximate measurements. Each component in the sensor signal chain blindly trusts that the input it receives is authentic and valid. This trust allows attackers to exploit various components in the signal chain to launch attacks, thereby affecting the authenticity and accuracy of the sensor node's output data. This not only disrupts data transmission and affects the judgment of control devices, but can also lead to the leakage of IoT data, causing serious economic losses and creating significant difficulties for subsequent system maintenance. Summary of the Invention

[0004] The purpose of the present invention is to provide an anti-tampering device for power Internet of Things sensors based on convolutional coding. When a few bits of coded data are flipped when the sensor uses a digital bus to transmit coded data, the method obtains correct data from the erroneous coded data by decoding, thereby realizing sensor data protection. The encoding and decoding of the convolutional code has low algorithm complexity and less computational overhead, and can run stably on an embedded system.

[0005] In order to solve the above technical problems, the present invention is implemented in the following ways:

[0006] A convolutional coding-based anti-tampering device for an electric power IoT sensor includes a main control center, a single-chip microcomputer, an infrared image sensor, and a power supply. The power supply is connected to the single-chip microcomputer and the infrared image sensor via a power management module. The single-chip microcomputer is connected to the infrared image sensor. The single-chip microcomputer drives the infrared image sensor to collect and receive raw temperature data and converts the raw temperature data into a binary information sequence. The main control center and the single-chip microcomputer are bidirectionally connected.

[0007] The sensor anti-tampering device uses convolution coding to encode a binary information sequence to obtain a coding sequence, uses interleaving to reorder the coding sequence, and sends the interleaved coding sequence to the main control center through the IIC bus. The main control center deinterleaves the received interleaved coding sequence to obtain a decoding input sequence, decodes the decoding input sequence to output a decoding sequence, and converts the decoding sequence into temperature data for output.

[0008] Furthermore, the specific encoding process is: using convolutional coding to encode the binary information sequence to obtain a coded sequence, including: inserting 5 0s at the leftmost end of the binary information sequence to obtain a target information sequence, performing sliding window processing on the target information sequence with a sliding window length of 6 to obtain multiple windows, the information bits in the window are denoted as m5, m4, ..., m0 from left to right, and outputting C1 and C2 of each window according to the following formula. The specific calculation expressions of C1 and C2 are as follows:

[0009]

[0010] The coding sequence is determined based on C1 and C2 of each window.

[0011] Furthermore, the interleaving described in this application adopts a block interleaving method with an interleaving depth and an interleaving width of 16 to reorder the coded sequence. The specific method is:

[0012] The coding sequence is divided into several groups to obtain multiple groups of sub-coding sequences, each of which has 256-bit code words, denoted as C0, C1, ..., C 255 , a set of sub-coding sequences is divided into 16 groups of coding sub-sequences, each group of coding sub-sequences has 16 code words, and the first bit of each receiving sub-sequence is read out in the order of groups 1 to 16, and then the second bit of each group is read out in sequence until all sub-sequences are read out, and the sending sequences C0, C 16 , C 32 ,……,C 240 , C1, C 17 ,……,C 239 , C 255 , any two consecutive code words in the encoding sequence are separated by 15-bit code words in the transmission sequence.

[0013] Furthermore, the deinterleaving is the inverse process of interleaving. The main control center receives the data of the transmission sequence to obtain a reception sequence, divides the reception sequence into 16 groups of reception subsequences, each group of reception subsequences is 16 bits, and reads out the first bit of each group of reception subsequences in order from 1 to 16 groups, and then reads out the second bit of each group in turn until all subsequences are read to obtain a decoding input sequence.

[0014] The decoding input sequence is the same as the encoding sequence in order, but several codewords may contain errors. After deinterleaving, any burst errors of length L < 16 that occur during transmission will be separated by at least 15 bits and dispersed into approximately random errors. Any burst errors of length L > 16 are converted into short bursts of length L' ≤ L / 16 after deinterleaving.

[0015] Furthermore, the decoding described in the present invention adopts the Viterbi decoding method, sets the backtracking depth to 32, and the specific steps of decoding are:

[0016] 1)(2,1,5) convolutional coding has 32 state nodes, denoted as S0, S1, ..., S 31 , at any moment, any state node S i There are two output branches, which are connected by the state node S i The state node S corresponding to the output branch is obtained by combining the input information m, and its expression is as follows:

[0017]

[0018] Start searching for a path from the initial state S0. At the first moment, the input information m is 0 or 1. The subsequent states may be S0 and S 16 , obtaining two paths, calculating the Hamming distance between the two-bit coded outputs of these two paths and the first two codewords in the received sequence as the path metric for the two states at time 1; starting from the two states at time 1, continue searching for paths. At each time, calculating the Hamming distance between the two-bit coded outputs of each path and the corresponding two-bit codeword in the sequence to be decoded as the branch code distance, and adding the branch code distance to the path metric of the previous state to obtain the path metric of the new state, until the path to all states is obtained at time 5;

[0019] 2) At any decoding time after the 5th time, S 2i and S 2i+1 The subsequent state may be S i and S i+16 , there are 4 corresponding paths. Compare the two-bit decoded input and the two-bit encoded output corresponding to the path to find the number of different codewords, and get the branch code distance. The branch code distance satisfies the following expression:

[0020] d 2i,i =d 2i+1,i+16

[0021] d 2i,i+16 =d i+16,i

[0022] d 2i,i +d 2i,i+16 =2

[0023] Among them, d i,j Indicates S i Transfer to S j The generated branch code distance. S 2i Transfer to S i and S 2i+1 Transfer to S i+16 The generated code is the same as S 2i Transfer to S i+16 and S 2i+1 Transfer to S i The generated codes are the same, the branch code distance is added to the path metric of the previous state to obtain the branch path metric, the two branch path metrics of the current state are compared, the smaller one is selected as the path metric of the current state, and the value of the previous state vector is saved in the storage space corresponding to the current state until the decoding reaches the backtracking depth.

[0024] 3) After reaching the backtracking depth of 32 at the decoding time, the path metrics of all current states are compared, the state with the smallest path metric is determined, and backtracking begins. The previous state is found based on the state vector stored in the current space. After backtracking 16 time points, the highest bit of the state node corresponding to time point 1 to time point 16 on the path is read to obtain the 16-bit decoding output, and this sequence is output in reverse order. The path search continues, backtracking once every 16 time points, and outputting 16 bits of decoding information until the entire sequence is decoded.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] The present invention utilizes a channel coding mechanism to implement an anti-tampering device for power IoT sensors based on convolutional coding. The device has the characteristics of simple use, low cost, and low power consumption. When an error occurs in sensor transmission data, the correct data can be obtained by decoding. In combination with interleaving technology, long burst errors can be split into dispersed, approximately random errors, thereby improving the effect when dealing with burst errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 Schematic diagram of the structure of the anti-tampering method of the present invention;

[0028] Figure 2 Schematic diagram of convolutional coding of the present invention;

[0029] Figure 3 This is a schematic diagram of block interleaving according to the present invention;

[0030] Figure 4 It is a schematic diagram of the viterbi decoding process of the present invention. DETAILED DESCRIPTION

[0031] The specific implementation of the present invention will be further described in detail below with reference to the accompanying drawings and specific examples.

[0032] like Figure 1 As shown, a convolutional coding-based anti-tampering device for an electric power IoT sensor includes a main control center, an STM32 single-chip microcomputer, an MLX90640 infrared image sensor, and a power supply. The power supply is connected to the STM32 single-chip microcomputer and the MLX90640 infrared image sensor through a power management module. The STM32 single-chip microcomputer is connected to the MLX90640 infrared image sensor. To prevent data transmission between the MLX90640 infrared image sensor and the STM32 single-chip microcomputer from being damaged, the distance between the two is sufficiently short. The STM32 single-chip microcomputer drives the infrared image sensor to collect and receive raw temperature data, and converts the raw temperature data into a binary information sequence. The main control center is bidirectionally connected to the STM32 single-chip microcomputer.

[0033] The sensor anti-tampering device uses convolution coding to encode a binary information sequence to obtain a coding sequence, uses interleaving to reorder the coding sequence, and sends the interleaved coding sequence to the main control center through the IIC bus. The main control center deinterleaves the received interleaved coding sequence to obtain a decoding input sequence, decodes the decoding input sequence to output a decoding sequence, and converts the decoding sequence into temperature data for output.

[0034] like Figure 2 As shown in the figure, convolutional coding is used to encode the binary information sequence to obtain a coded sequence. The specific encoding process is: insert 5 0s at the leftmost end of the binary information sequence to obtain the target information sequence, perform sliding window processing on the target information sequence with a sliding window length of 6 to obtain multiple windows, and the information bits in the window are recorded as m5, m4, ..., m0 from left to right, and output C1 and C2 of each window according to the following formula. The specific calculation expressions of C1 and C2 are as follows:

[0035]

[0036] The coding sequence is determined based on C1 and C2 of each window.

[0037] like Figure 3 As shown, the interleaving described in this application adopts a block interleaving method with an interleaving depth and an interleaving width of 16 to reorder the coded sequence. The specific method is:

[0038] The coding sequence is divided into several groups to obtain multiple groups of sub-coding sequences, each of which has 256-bit code words, denoted as C0, C1, ..., C 255 , divide a group of multiple sub-coding sequences into 16 groups of coding sub-sequences, each group of coding sub-sequences has 16 code words, read out the first bit of each receiving sub-sequence in the order of 1 to 16 groups, and then read out the second bit of each group in turn until all sub-sequences are read, and get the sending sequence C0, C16 , C 32 ,……,C 240 , C1, C 17 ,……,C 239 , C 255 , any two consecutive code words in the encoding sequence are separated by 15-bit code words in the transmission sequence.

[0039] The deinterleaving is the reverse process of interleaving. The main control center receives the data of the transmission sequence to obtain the receiving sequence, divides the receiving sequence into 16 groups of receiving subsequences, each group of receiving subsequences is 16 bits, and reads out the first bit of each group of receiving subsequences in the order of groups 1 to 16, and then reads out the second bit of each group in sequence until all subsequences are read to obtain the decoding input sequence.

[0040] The decoding input sequence is the same as the encoding sequence in order, but several codewords may contain errors. After deinterleaving, any burst errors of length L < 16 that occur during transmission will be separated by at least 15 bits and dispersed into approximately random errors. Any burst errors of length L > 16 are converted into short bursts of length L' ≤ L / 16 after deinterleaving.

[0041] like Figure 4 As shown, the decoding described in the present invention adopts the Viterbi decoding method, sets the backtracking depth to 32, and the specific steps of decoding are:

[0042] 1)(2,1,5) convolutional coding has 32 state nodes, denoted as S0, S1, ..., S 31 , according to its coding principle, at any moment, any state node S i There are two output branches, which are connected by the state node S i The state node S corresponding to the output branch is obtained by combining the input information m, and its expression is as follows:

[0043]

[0044] Start searching for a path from the initial state S0. At the first moment, the input information m is 0 or 1. The subsequent states may be S0 and S 16 , obtaining two paths, calculating the Hamming distance between the two-bit coded outputs of these two paths and the first two codewords in the received sequence as the path metric for the two states at time 1; starting from the two states at time 1, continue searching for paths. At each time, calculating the Hamming distance between the two-bit coded outputs of each path and the corresponding two-bit codeword in the sequence to be decoded as the branch code distance, and adding the branch code distance to the path metric of the previous state to obtain the path metric of the new state, until the path to all states is obtained at time 5;

[0045] 2) At any decoding time after the 5th time, S 2i and S 2i+1 The subsequent state may be S i and S i+16 , there are 4 corresponding paths. Compare the two-bit decoded input and the two-bit encoded output corresponding to the path to find the number of different codewords, and get the branch code distance. The branch code distance satisfies the following expression:

[0046] d 2i,i =d 2i+1,i+16

[0047] d 2i,i+16 =d i+16,i

[0048] d 2i,i +d 2i,i+16 =2

[0049] Among them, d 2i,i Indicates S 2i Transfer to S i The resulting branch code distance, S 2i Transfer to S i and S 2i+1 Transfer to S i+16 The generated code is the same as S 2i Transfer to S i+16 and S 2i+1 Transfer to S i The generated codes are the same. It is only necessary to calculate the branch code distance of one path to obtain the branch code distances corresponding to the other three paths. The branch code distance is added to the path metric of the previous state to obtain the branch path metric. The two branch path metrics of the current state are compared, and the smaller one is selected as the path metric of the current state. The value of the previous state vector is saved in the storage space corresponding to the current state. At each moment, only the shortest path to each state is retained until the decoding reaches the backtracking depth.

[0050] 3) After reaching the backtracking depth of 32 at the decoding time, the path metrics of all current states are compared, the state with the smallest path metric is determined, and backtracking begins. The previous state is found based on the state vector stored in the current space. After backtracking 16 time points, the highest bit of the state node corresponding to time point 1 to time point 16 on the path is read to obtain the 16-bit decoding output, and this sequence is output in reverse order. The path search continues, backtracking once every 16 time points, and outputting 16 bits of decoding information until the entire sequence is decoded.

[0051] An anti-tampering device for power IoT sensors based on convolutional coding, comprising

[0052] An encoding module, used for encoding the information sequence to obtain a coding sequence;

[0053] an interleaving module for reordering the codewords of the coding sequence;

[0054] Transmission module, used for information exchange between the main control center and the single chip microcomputer;

[0055] A deinterleaving module is used to restore the interleaved coded sequence to its original order;

[0056] The decoding module is used to restore the sequence to be decoded into an information sequence to obtain the original information.

[0057] The present invention discloses a computer-readable storage medium, wherein the storage medium contains computer-executable instructions, and the computer-executable instructions are executed by a processor to implement a method as described in an anti-tampering device for an electric power Internet of Things sensor based on convolutional coding.

[0058] The present invention also provides a computer device, comprising a processor;

[0059] The processor is configured to store one or more programs;

[0060] When the one or more programs are executed by the processor, the method described in the anti-tampering device for a power Internet of Things sensor based on convolutional coding is implemented.

[0061] The above description is merely an embodiment of the present invention. It is stated again that, for a person skilled in the art, several improvements can be made to the present invention without departing from the principles of the present invention, and these improvements are also included in the scope of protection of the claims of the present invention.

Claims

1. A method for anti-tampering of power IoT sensors based on convolutional coding, characterized by: The power IoT sensor includes a main control center, a single-chip microcomputer, an infrared image sensor, and a power supply. The power supply is connected to the single-chip microcomputer and the infrared image sensor through a power management module. The single-chip microcomputer is connected to the infrared image sensor. The single-chip microcomputer drives the infrared image sensor to collect and receive raw temperature data and converts the raw temperature data into a binary information sequence. The main control center and the single-chip microcomputer are bidirectionally connected. The power IoT sensor uses convolution coding to encode a binary information sequence to obtain a coding sequence, uses interleaving to reorder the coding sequence, and sends the interleaved coding sequence to the main control center through the IIC bus. The main control center deinterleaves the received interleaved coding sequence to obtain a decoding input sequence, decodes the decoding input sequence to output a decoding sequence, and converts the decoding sequence into temperature data for output; The binary information sequence is encoded using convolutional coding to obtain a coded sequence, including: inserting 5 0s at the leftmost end of the binary information sequence to obtain a target information sequence, performing sliding window processing on the target information sequence with a sliding window length of 6 to obtain multiple windows, and the information bits in the window are denoted as m5, m4, ..., m0 from left to right, and outputting C1 and C2 of each window according to the following formula. The specific calculation expressions of C1 and C2 are as follows: Determine the coding sequence based on C1 and C2 of each window; The interleaving adopts a block interleaving method with an interleaving depth and an interleaving width of 16 to reorder the coded sequence. The specific method is: The coding sequence is divided into several groups to obtain multiple groups of sub-coding sequences, each of which has 256-bit code words, denoted as C0, C1, ..., C 255 , divide a group of multiple sub-coding sequences into 16 groups of coding sub-sequences, each group of 16-bit code words, read out the first bit of each receiving sub-sequence in the order of 1 to 16 groups, and then read out the second bit of each group in turn until all sub-sequences are read, and get the transmission sequence C0, C 16 , C 32 ,……,C 240 , C1, C 17 ,……,C 239 , C 255 , any consecutive two-bit codewords in the encoding sequence are separated by 15-bit codewords in the transmission sequence; The decoding adopts the Viterbi decoding method, and the backtracking depth is set to 32.

2. The anti-tampering method for a power IoT sensor based on convolutional coding according to claim 1, characterized in that: The deinterleaving is the reverse process of interleaving. The main control center receives the data of the transmission sequence to obtain the receiving sequence, divides the receiving sequence into 16 groups of receiving subsequences, each group of receiving subsequences is 16 bits, and reads out the first bit of each group of receiving subsequences in the order of groups 1 to 16, and then reads out the second bit of each group in sequence until all subsequences are read to obtain the decoding input sequence.

3. The anti-tampering method for a power IoT sensor based on convolutional coding according to claim 1, characterized in that: The decoding adopts the Viterbi decoding method, and the backtracking depth is set to 32. The specific steps of decoding are: 1)(2,1,5) convolutional coding has 32 state nodes, denoted as S0, S1, ..., S 31 , at any moment, any state node S i There are two output branches, which are connected by the state node S i The state node S corresponding to the output branch is obtained by combining the input information m, and its expression is as follows: Start searching for a path from the initial state S0. At the first moment, the input information m is 0 or 1. The subsequent states may be S0 and S 16 , obtain two paths, calculate the Hamming distance between the two-bit coded output of these two paths and the first two codewords in the received sequence as the path metric of the two states at the first moment; starting from the two states at the first moment, continue to find paths, at each moment, calculate the Hamming distance between the two-bit coded output of each path and the corresponding two codewords in the sequence to be decoded as the branch code distance, and add the branch code distance and the path metric of the previous state to obtain the path metric of the new state, until the path to all states is obtained at the fifth moment; 2) At any decoding time after the 5th time, S 2i and S 2i+1 The subsequent state may be S i and S i+16 , there are 4 corresponding paths. Compare the two-bit decoded input and the two-bit encoded output corresponding to the path to find the number of different codewords, and get the branch code distance. The branch code distance satisfies the following expression: d 2i,i =d 2i+1,i+16 d 2i,i+16 =d i+16,i d 2,i,i +d 2i,i+16 =2 Among them, d i,j Indicates S i Transfer to S j The resulting branch code distance, S 2i Transfer to S i and S 2i+1 Transfer to S i+16 The generated code is the same as S 2i Transfer to S i+16 and S 2i+1 Transfer to S i The generated codes are the same. The branch code distance is added to the path metric of the previous state to obtain the branch path metric. The two branch path metrics of the current state are compared, and the smaller one is selected as the path metric of the current state. The previous state vector value is saved in the storage space corresponding to the current state until the decoding reaches the backtracking depth. 3) After reaching the backtracking depth of 32 at the decoding time, the path metrics of all current states are compared, the state with the smallest path metric is determined, and backtracking begins. The previous state is found based on the state vector stored in the current space. After backtracking 16 time points, the highest bit of the state node corresponding to time point 1 to time point 16 on the path is read to obtain the 16-bit decoding output, and this sequence is output in reverse order. The path search continues, backtracking once every 16 time points, and outputting 16 bits of decoding information until the entire sequence is decoded.

4. A convolutional coding-based anti-tampering device for power IoT sensors, characterized by: The anti-tampering device for the power IoT sensor is used to implement the method described in any one of claims 1 to 3. include An encoding module, used for encoding the information sequence to obtain a coding sequence; an interleaving module for reordering the codewords of the coding sequence; Transmission module, used for information exchange between the main control center and the single chip microcomputer; A deinterleaving module is used to restore the interleaved coded sequence to its original order; The decoding module is used to restore the sequence to be decoded into an information sequence to obtain the original information.

5. A computer-readable storage medium, characterized in that: The storage medium contains computer-executable instructions, which are executed by a processor to implement the method according to any one of claims 1 to 3.

6. A computer device, characterized in that: Includes a processor; The processor is configured to store one or more programs; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Vehicle-mounted CAN intrusion detection method based on sliding window and CENN

    CN111931252A

  • Viterbi decoder and Viterbi decoding method

    US20070089043A1