Internet of Things terminal data traceability and anti-counterfeiting method
The authenticity and integrity of IoT terminal data is verified through hashing algorithms and deep learning technology, and blockchain evidence storage is used to solve the problem that IoT terminal data is prone to tampering, realizing comprehensive security verification and abnormal detection of data.
Patent Information
- Application Number
- CN202510035665.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-05-06
AI Technical Summary
IoT terminal data is easily tampered with or forged during the collection, transmission and storage process, resulting in deviations in data analysis and decision-making. The existing technology is relatively weak in data authenticity verification.
The hash algorithm is used to encode the original data generated by the Internet of Things terminal, and generate a unique hash value as the data identification. The server verifies the integrity and authenticity of the data through the same hash algorithm, and combines the timing analysis technology of deep learning to identify abnormal data patterns. Finally, the data verification results are verified through the blockchain network.
It realizes comprehensive security verification of IoT terminal data, identifying the abnormal operation of IoT terminals, helps prevent potential security threats, and ensures the authenticity and integrity of data through blockchain evidence storage.
Smart Images

Figure CN119939543A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data traceability and anti-counterfeiting, and more specifically, to a method system for data traceability and anti-counterfeiting of an Internet of Things terminal. Background Art
[0002] With the rapid development and widespread application of Internet of Things (IoT) technology, more and more smart devices are connected and exchange data through the network, resulting in an explosive growth in the amount of data generated by IoT terminals. However, this trend also brings about important issues regarding data security and privacy protection. Since IoT terminals are widely distributed and diverse, and often lack effective physical security protection measures, data can be easily tampered with or forged during collection, transmission, and storage, thus affecting subsequent data analysis and decision-making. Therefore, ensuring the authenticity and integrity of IoT terminal data is a key issue that needs to be urgently addressed in current IoT applications.
[0003] In order to deal with the security issues of IoT data, existing technical methods mostly focus on data access control and transmission security. Although these methods have improved data security to a certain extent, they focus more on the security of data during transmission, and are relatively weak in verifying the authenticity of data during the collection and storage stages.
[0004] Therefore, a method for tracing and preventing counterfeiting of IoT terminal data is desired. Summary of the invention
[0005] In order to solve the above technical problems, the present application is proposed. The embodiment of the present application provides a data traceability and anti-counterfeiting method for an IoT terminal, which encodes the original data generated by the IoT terminal by using a hash algorithm to generate a unique hash value as a data identifier. After receiving the original data, the server uses the same hash algorithm to calculate the hash value of the original data, thereby verifying the integrity and authenticity of the data based on the comparison result of the hash value. After the anti-tampering verification is completed, the timing feature extraction of the original data of the IoT terminal is further combined with the timing analysis technology based on deep learning to capture the timing correlation in the IoT terminal data, so as to identify abnormal data patterns, evaluate the operating status of the IoT terminal, and store the data verification results through the blockchain network. In this way, comprehensive security verification of IoT terminal data can be achieved, and through data pattern analysis, the abnormal operation of the IoT terminal can be identified, which helps to prevent potential security threats.
[0006] According to one aspect of the present application, a method for tracing and anti-counterfeiting data of an IoT terminal is provided, which includes:
[0007] Time queue for collecting raw data from IoT terminals;
[0008] Calculate the hash function value of each IoT terminal original data in the time queue of the IoT terminal original data to obtain a time queue of the hash function value;
[0009] Sending the time queue of the hash function value together with the time queue of the original data of the Internet of Things terminal to the server through a secure channel;
[0010] After receiving the time queue of the IoT terminal original data, the server calculates the hash function value of each IoT terminal original data in the time queue of the IoT terminal original data to obtain a time queue for verifying the hash function value;
[0011] Determining whether the data has been tampered with and generating a verification result record based on a comparison between the time queue of the verification hash function value and the time queue of the hash function value;
[0012] Upload the verification result record to the blockchain network for evidence storage;
[0013] Among them, based on the comparison between the time queue of the verification hash function value and the time queue of the hash function value, determining whether the data has been tampered with and generating a verification result record, including: if the time queue of the verification hash function value matches the time queue of the hash function value, determining that the data has not been tampered with to obtain a data tampering verification result; based on the time queue of the original data of the Internet of Things terminal, determining whether there is an abnormality in the data pattern of the Internet of Things terminal to obtain a data pattern verification result; summarizing the data pattern verification result and the data tampering verification result to obtain the verification result record.
[0014] Compared with the prior art, the present application provides a method for tracing and anti-counterfeiting data of an IoT terminal, which uses a hash algorithm to encode the original data generated by the IoT terminal, generates a unique hash value as a data identifier, and after receiving the original data, the server uses the same hash algorithm to calculate the hash value of the original data, thereby verifying the integrity and authenticity of the data based on the comparison result of the hash value. After the anti-tampering verification is completed, the timing feature extraction of the original data of the IoT terminal is further combined with the timing analysis technology based on deep learning, and the timing correlation in the IoT terminal data is captured, so as to identify abnormal data patterns, evaluate the operating status of the IoT terminal, and store the data verification results through the blockchain network. In this way, comprehensive security verification of IoT terminal data can be achieved, and abnormal operation of IoT terminals can be identified through data pattern analysis, which helps to prevent potential security threats. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0016] Figure 1 It is a flow chart of the IoT terminal data tracing and anti-counterfeiting method according to an embodiment of the present application;
[0017] Figure 2 A schematic diagram of data flow of the IoT terminal data traceability and anti-counterfeiting method according to an embodiment of the present application;
[0018] Figure 3 Flow chart of sub-step S5 of the IoT terminal data tracing and anti-counterfeiting method according to an embodiment of the present application;
[0019] Figure 4 This is a flowchart of sub-step S52 of the IoT terminal data tracing and anti-counterfeiting method according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0021] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0022] Although the present application makes various references to certain modules in the system according to the embodiments of the present application, any number of different modules can be used and run on the user terminal and / or server. The modules are only illustrative, and different aspects of the system and method can use different modules.
[0023] Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, various steps may be processed in reverse order or simultaneously as required. Meanwhile, other operations may also be added to these processes, or a certain step or several steps of operations may be removed from these processes.
[0024] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0025] In the technical solution of the present application, a method for tracing and anti-counterfeiting data of an IoT terminal is proposed. Figure 1 The present invention is a flowchart of a method for tracing and anti-counterfeiting data of an IoT terminal according to an embodiment of the present application. Figure 2 Schematic diagram of data flow of the IoT terminal data traceability and anti-counterfeiting method according to an embodiment of the present application. Figure 1 and Figure 2 As shown, according to the embodiment of the present application, the method for tracing and anti-counterfeiting of IoT terminal data includes the following steps: S1, collecting a time queue of IoT terminal original data; S2, calculating a hash function value of each IoT terminal original data in the time queue of the IoT terminal original data to obtain a time queue of hash function values; S3, sending the time queue of the hash function value together with the time queue of the IoT terminal original data to a server through a secure channel; S4, upon receiving the time queue of the IoT terminal original data, the server calculates the hash function value of each IoT terminal original data in the time queue of the IoT terminal original data to obtain a time queue of a verification hash function value; S5, based on a comparison between the time queue of the verification hash function value and the time queue of the hash function value, determining whether the data has been tampered with and generating a verification result record; S6, uploading the verification result record to the blockchain network for evidence storage.
[0026] In particular, S1 collects the time queue of the original data of the IoT terminal. It should be understood that the original data generated by the IoT terminal is the basis for traceability and anti-counterfeiting. After the IoT terminal device generates or collects data, it stores the data in chronological order to form a time queue of the original data of the IoT terminal, which helps to reveal the law of data change over time and provides an important basis for the operation status analysis and anomaly detection of the IoT terminal.
[0027] In one example, in order to effectively collect raw data from IoT terminals, it is first necessary to determine which IoT terminal devices will serve as data sources. These devices are usually deployed in various physical environments to monitor specific parameters or perform specific operations. For each selected data source, a reasonable sampling interval must be defined, that is, how often data is collected. This depends on the needs of the specific application scenario and the rate of change of the monitored phenomenon. At the same time, in order to ensure that the data collected by all IoT terminals can accurately reflect the relationship in time, the clocks between the terminals should be synchronized as much as possible, which can be achieved using the Network Time Protocol (NTP) or more accurate GPS timing.
[0028] Whenever an IoT terminal collects a new data point, it will attach an accurate timestamp to the data point, indicating the exact moment when the data point was created. The timestamp should contain date and time information and have sufficient accuracy to meet application requirements. As more and more data points are collected and timestamped, they are arranged in chronological order to form an ordered time queue. Each newly added data point is inserted into the correct position according to its timestamp to ensure that the entire queue always maintains time sequence. If two or more data points occur at the same time, they can be further sorted according to other factors (such as device ID). Considering that there may be delays or packet loss in the actual network environment, it is also necessary to consider how to deal with these abnormal situations in the process of building the time queue. The impact of missing data on the overall time series can be minimized through retransmission mechanisms, prediction algorithms or other compensation methods.
[0029] In particular, the S2 calculates the hash function value of each IoT terminal raw data in the time queue of the IoT terminal raw data to obtain the time queue of the hash function value. Considering that the IoT terminal device may be tampered with or forged during the data transmission process, it may lead to deviations in subsequent data analysis and decision-making. Therefore, in order to provide an irreversible data fingerprint, the present application further verifies the data integrity by calculating the hash function value of each IoT terminal raw data in the time queue of the IoT terminal raw data. It should be understood that the hash function is a function that maps input data of any length to a hash value of a fixed length, which has a high sensitivity and uniqueness. Common hash functions include MD5, SHA-1, etc. For the IoT terminal raw data, the hash function can uniquely identify it, that is, different raw data will obtain different hash values, which are used to verify whether the data has been tampered with.
[0030] It is worth mentioning that in the process of calculating the hash value, not only the original data itself is hashed, but also the timestamp needs to be considered together. Considering that even if the content of two data points is exactly the same, as long as they occur at different times, they represent different events or states. Therefore, incorporating the timestamp into the hash operation can further enhance the uniqueness of the hash value. Specifically, the timestamp can be converted into a string form and concatenated with the original data, and then the selected hash algorithm can be applied to the combined string to finally obtain a unique hash value.
[0031] In particular, S3 sends the time queue of the hash function value together with the time queue of the original data of the IoT terminal to the server through a secure channel. In order to further ensure the security and integrity of the data during transmission and prevent the data from being stolen or tampered with, the present application uses a secure channel to send the time queue of the hash function value together with the time queue of the original data of the IoT terminal to the server. In the technical solution of the present application, the secure channel adopts an encrypted communication protocol, such as HTTPS or TLS, to ensure the confidentiality and integrity of the data during transmission.
[0032] In particular, when the IoT terminal device completes the calculation of each raw data point and its corresponding hash value, the system will package the data appropriately. In order to facilitate transmission and subsequent processing, the raw data points and corresponding hash values within a certain period of time are usually combined into a batch, and necessary metadata information is added to the batch. These metadata may include but are not limited to: batch ID, start timestamp, end timestamp, IoT terminal device ID, etc. This helps to quickly identify and parse the received data packets at the receiving end.
[0033] In particular, in S4, after receiving the time queue of the original data of the IoT terminal, the server calculates the hash function value of each IoT terminal original data in the time queue of the IoT terminal original data to obtain a time queue for verifying the hash function value. In practical applications, the server is a core component for receiving and processing data from IoT terminals. It performs data verification, data analysis, pattern recognition, anomaly detection and decision-making on the IoT terminal original data to achieve comprehensive monitoring and management of IoT terminals. After receiving the time queue of the original data of the IoT terminal, first, in order to verify the authenticity of the data, the server uses the same hash algorithm as the IoT terminal to calculate the hash value of each IoT terminal original data to obtain a time queue for verifying the hash function value. Since the hash function value is unique, different hash values will be generated after the data is tampered with, so it can be determined whether the data has been tampered with by comparing the hash function value.
[0034] In particular, the S5 determines whether the data has been tampered with and generates a verification result record based on the comparison between the time queue of the verification hash function value and the time queue of the hash function value. Figure 3 As shown, the S5 includes: S51, if the time queue of the verification hash function value matches the time queue of the hash function value, determining that the data has not been tampered with to obtain a data tampering verification result; S52, based on the time queue of the original data of the Internet of Things terminal, determining whether there is an abnormality in the data pattern of the Internet of Things terminal to obtain a data pattern verification result; S53, summarizing the data pattern verification result and the data tampering verification result to obtain the verification result record.
[0035] Specifically, in S51, if the time queue of the hash function value for verification matches the time queue of the hash function value, it is determined that the data has not been tampered with to obtain a data tampering verification result. In the technical solution of the present application, the server confirms the integrity of the data by comparing the received hash function value with the hash function value recalculated locally. If the time queue of the hash function value for verification matches the time queue of the hash function value, it means that the data has not been tampered with, and the data tampering verification result is marked as "not tampered with"; otherwise, it means that the data has been tampered with, and the data tampering verification result is marked as "tampered with".
[0036] Specifically, the S52 determines whether there is an anomaly in the data pattern of the IoT terminal based on the time queue of the IoT terminal raw data to obtain a data pattern verification result. That is, in the technical solution of the present application, on the basis of data integrity verification, the server further uses a deep learning algorithm to perform data pattern anomaly analysis on the IoT terminal raw data to identify potential security threats or equipment failures. In a specific example of the present application, Figure 4 As shown, the S52 includes: S521, embedding and encoding each IoT terminal original data in the time queue of the IoT terminal original data to obtain a time queue of the IoT terminal original data embedded coding vector; S522, performing feature dynamic propagation coding based on gated writing on the time queue of the IoT terminal original data embedded coding vector to obtain an IoT terminal data pattern timing propagation coding vector; S523, determining the data pattern verification result based on the IoT terminal data pattern timing propagation coding vector.
[0037] More specifically, the S521 embeds and encodes each IoT terminal raw data in the time queue of the IoT terminal raw data to obtain a time queue of IoT terminal raw data embedded coding vectors. In order to digitally represent the IoT terminal raw data and make it suitable for processing deep learning models, the present application further uses embedded coding technology to process the time queue of IoT terminal raw data, so as to convert each IoT terminal raw data into a vector representation, and obtain a time queue of IoT terminal raw data embedded coding vectors. It should be understood that embedding is a method of mapping inputs in a high-dimensional sparse space to a low-dimensional dense space, which can reflect the key features in the raw data with a vectorized representation, while retaining the temporal correlation and intrinsic connection of the data, thereby providing effective input data for subsequent data anomaly pattern analysis.
[0038] More specifically, in S522, the time queue of the IoT terminal raw data embedded coding vector is subjected to feature dynamic propagation coding based on gated writing to obtain the IoT terminal data pattern timing propagation coding vector. Since the data pattern of the IoT terminal is time-series, in order to better capture the dynamic trend and law of the IoT terminal raw data changing over time, so as to identify possible abnormal patterns, the present application further performs feature timing dynamic propagation coding on the time queue of the IoT terminal raw data embedded coding vector, so as to capture the timing law and pattern changes in the raw data, and provide a more accurate basis for subsequent abnormality detection.
[0039] Specifically, the specific process of performing feature dynamic propagation coding based on gated writing on the time queue of the IoT terminal raw data embedded coding vector includes: first, performing initial time sequence forward propagation coding on the time queue of the IoT terminal raw data embedded coding vector to obtain the IoT terminal raw data time sequence initial propagation coding vector. In the technical solution of the present application, the time queue of the IoT terminal raw data embedded coding vector is input into the sequence reasoning module based on the forward LSTM model to perform initial time sequence forward propagation coding to obtain the IoT terminal raw data time sequence initial propagation coding vector. Here, considering that the LSTM model has significant advantages in time series data processing tasks and can effectively capture the medium and long-term dependencies of data, the present application first adopts the forward LSTM model to perform forward propagation coding on the time queue of the IoT terminal raw data embedded coding vector, so as to use the long-term memory ability of the LSTM model to capture the long-range dependencies between the IoT terminal raw data features of each time step, and generate a hidden state representation that integrates the feature information of the IoT terminal raw data of all time steps, that is, the IoT terminal raw data time sequence initial propagation coding vector. In one example, the time queue of the IoT terminal original data embedded coding vector is subjected to initial time sequence forward propagation coding using the following initial time sequence forward propagation coding formula to obtain the IoT terminal original data time sequence initial propagation coding vector; wherein the initial time sequence forward propagation coding formula is:
[0040] X={x1,x2,...,x i ,...,x n}
[0041] v h =LSTM({x1,x2,...,x i ,...,x n})
[0042] Where X represents the time queue of the IoT terminal original data embedded in the coding vector, x1, x2, x i and x n represents the first, second, i-th and n-th IoT terminal original data embedding coding vectors in the set of IoT terminal original data embedding coding vectors respectively, n is the number of feature vectors in the set of IoT terminal original data embedding coding vectors, LSTM(·) represents the forward LSTM model, v h Represents the initial propagation coding vector of the original data timing of the IoT terminal.
[0043] Next, the private features of each IoT terminal raw data embedding coding vector in the time queue of the IoT terminal raw data embedding coding vector are calculated relative to the IoT terminal raw data timing initial propagation coding vector to obtain the time queue of the IoT terminal raw data timing node private feature coding vector. That is, feature selection and filtering are performed on the private feature coding vectors of each IoT terminal raw data timing node through the gating mechanism. In the technical solution of the present application, first, the IoT terminal raw data embedding coding vector and the IoT terminal raw data timing initial propagation coding vector are input into the difference feature extraction network based on the Sigmoid function to obtain the IoT terminal raw data timing node differential feature vector; wherein, the Softmax function is used to evaluate the importance of each part of the feature in the IoT terminal raw data timing node private feature coding vector, and convert it into a probability distribution, so as to intuitively understand it as the importance score of different parts in the private feature. By performing gated mask processing on the probability distribution obtained above, the corresponding mask weight is generated to guide the selection and filtering of private features and determine whether it needs to be written into the IoT terminal raw data timing initial propagation coding vector. Furthermore, based on the differential feature vector of the IoT terminal original data timing node, the IoT terminal original data embedded coding vector is modulated with private features to obtain the IoT terminal original data timing node private feature coding vector. That is, the generated mask weight is used to perform weighted processing on the corresponding private feature coding vectors of each IoT terminal original data timing node, thereby achieving gated writing of the private features of the IoT terminal original data at each time step, ensuring that only the most representative and relevant private information is retained and transmitted. In one example, the following timing node private feature calculation formula is used to calculate the private features of each IoT terminal original data embedded coding vector in the time queue of the IoT terminal original data embedded coding vector relative to the IoT terminal original data timing initial propagation coding vector to obtain the time queue of the IoT terminal original data timing node private feature coding vector; wherein, the timing node private feature calculation formula is:
[0044]
[0045] Where g(·,·) represents a private feature extraction function, Indicates position difference, |·| indicates taking the absolute value, conv 1×1 (·) represents point convolution, Sigmoid (·) represents the sigmoid activation function, and W d is the weight parameter matrix, p i Indicates that x i The corresponding IoT terminal raw data time series node differential feature vector, xb1, xb2, xbi and xb n Respectively represent the x1, the x2, the x i and the x n The corresponding IoT terminal raw data time series node private feature encoding vector.
[0046] Furthermore, the time queue of the private feature coding vector of the original data timing node of the Internet of Things terminal and the initial propagation coding vector of the original data timing of the Internet of Things terminal are subjected to feature compensation fusion based on gated writing to obtain the timing propagation coding vector of the Internet of Things terminal data pattern. In the technical solution of the present application, first, each of the private feature coding vectors of the original data timing nodes of the Internet of Things terminal in the time queue of the private feature coding vectors of the original data timing nodes of the Internet of Things terminal is gated and written respectively to obtain the time queue of the gated-written private feature coding vectors of the original data timing nodes of the Internet of Things terminal; specifically, the private feature coding vectors of the original data timing nodes of the Internet of Things terminal are input into the probabilistic unit based on the Softmax function to obtain the probabilistic private feature coding vectors of the original data timing nodes of the Internet of Things terminal; and based on the preset gating threshold, the probabilistic private feature coding vectors of the original data timing nodes of the Internet of Things terminal are gated and screened to obtain the private feature mask weight vector of the original data timing nodes of the Internet of Things terminal; then, the position point multiplication between the private feature mask weight vector of the original data timing nodes of the Internet of Things terminal and the private feature coding vector of the original data timing nodes of the Internet of Things terminal is calculated to obtain the gated-written private feature coding vector of the original data timing nodes of the Internet of Things terminal. Furthermore, the time queue of the private feature coding vector of the original data timing node of the IoT terminal written by the gate and the initial propagation coding vector of the original data timing of the IoT terminal are cascaded and fused to obtain the data pattern timing propagation coding vector of the IoT terminal. That is, the time queue of the private feature coding vector of the original data timing node of the IoT terminal written by the gate and the initial propagation coding vector of the original data timing of the IoT terminal are spliced and fused to simultaneously retain the overall change trend of the original data of the IoT terminal and the detailed information of each time step, so as to obtain the data pattern timing propagation coding vector of the IoT terminal, thereby ensuring the integrity and accuracy of information during the feature propagation process. In one example, the time queue of the private feature coding vector of the original data timing node of the IoT terminal and the initial propagation coding vector of the original data timing of the IoT terminal are subjected to feature compensation fusion based on gated writing to obtain the data pattern timing propagation coding vector of the IoT terminal; wherein the feature compensation fusion formula is:
[0047]
[0048]
[0049] Y={xb1·w1,xb2·w2,...,xb i ·w i ,...,xb n ·w n}
[0050] v f =Concat{v h ; Y}
[0051] Among them, a i Indicates the xb i The corresponding probabilistic IoT terminal raw data time series node private feature encoding vector, Represents matrix multiplication operation, W i and b i denote the weight matrix and bias term of the gated write unit, respectively, softmax(·) is a normalized exponential function, is the inverse temperature coefficient of the Softmax function, mask(·) is the gated mask function, τ is the preset gated threshold, w1, w2, w i and w n are respectively the xb1, the xb2, the xb i and the xb n The corresponding IoT terminal raw data timing node private feature mask weight vector, Y is the time queue of the gated writing IoT terminal raw data timing node private feature encoding vector, Concat{·;·} represents the cascade operation, v f Represents the timing propagation coding vector of the IoT terminal data pattern.
[0052] More specifically, the S523 determines the data pattern verification result based on the timing propagation coding vector of the IoT terminal data pattern. That is, in the technical solution of the present application, the timing propagation coding vector of the IoT terminal data pattern is input into a data pattern recognizer based on a classifier to obtain the data pattern verification result. Specifically, the classifier is based on a deep neural network architecture. During the training process, it is trained by a large number of labeled normal and abnormal data samples, so that the classifier can learn and identify the normal timing change pattern and abnormal timing change pattern of the IoT terminal data, thereby achieving a rapid response to the abnormal data pattern. In practical applications, when the timing propagation coding vector of the IoT terminal data pattern is input, the classifier can quickly classify the timing propagation coding vector of the IoT terminal data pattern based on its learned prior knowledge, determine whether there is an abnormality in the timing change pattern of the IoT terminal data, and output the corresponding data pattern verification result. Specifically, first, the multiple fully connected layers of the classifier are used to perform fully connected encoding on the IoT terminal data pattern timing propagation coding vector to obtain a coding classification feature vector; then the coding classification feature vector is passed through the Softmax classification function of the classifier to obtain the data pattern verification result.
[0053] Preferably, inputting the IoT terminal data pattern timing propagation coding vector into a classifier-based data pattern recognizer to obtain a data pattern verification result comprises:
[0054] The absolute value sum and the square root of the square sum of all eigenvalues of the IoT terminal data pattern timing propagation coding vector are calculated to obtain the first and second IoT terminal data pattern timing propagation coding space structure values, that is:
[0055]
[0056] Among them, f i represents the eigenvalue of the ith position of the IoT terminal data pattern timing propagation coding vector, w1 and w2 represent the first and second IoT terminal data pattern timing propagation coding space structure values respectively;
[0057] Determine the total number n of eigenvalues of the timing propagation coding vector of the IoT terminal data pattern;
[0058] For each eigenvalue of the timing propagation coding vector of the IoT terminal data pattern, the first IoT terminal data pattern timing propagation coding spatial structure value minus the product of the eigenvalue and the total number of eigenvalues is calculated to obtain the first IoT terminal data pattern timing propagation coding long-range dependency value x i =w1-f i ×n, where x i Indicates the fi The corresponding first IoT terminal data mode timing propagation encoding long-range dependency value;
[0059] Calculate the square root of the total number of eigenvalues multiplied by the product of the eigenvalues minus the second Internet of Things terminal data mode timing propagation coding spatial structure value to obtain the second Internet of Things terminal data mode timing propagation coding long-range dependency value
[0060] The exponential value calculated by taking the long-range dependency value of the first IoT terminal data mode timing propagation coding as the exponent of the natural constant and the inverse of the long-range dependency value of the second IoT terminal data mode timing propagation coding are weighted summed to obtain the optimized eigenvalue corresponding to each eigenvalue as well as
[0061] The optimized IoT terminal data pattern timing propagation coding vector composed of the optimized feature values is input into a classifier-based data pattern recognizer to obtain a data pattern verification result.
[0062] Here, when each IoT terminal raw data embedding coding vector in the time queue of the IoT terminal raw data embedding coding vector respectively represents the low-dimensional embedding coding features of the IoT terminal raw data, when the feature dynamic propagation based on gated writing is performed on it, the IoT terminal data pattern timing propagation coding vector will also have significant timing propagation distribution space structure difference due to the difference in the timing heterogeneity of the feature nodes of each IoT terminal raw data embedding coding vector, affecting the convergence consistency of the classifier, thereby affecting the accuracy of the data pattern verification result obtained by the data pattern recognizer based on the classifier.
[0063] Based on this, in view of the possible spatial structure loss of the feature set of the IoT terminal data pattern time series propagation coding vector in the high-dimensional space, which causes the weight matrix of the classifier to implicitly infer the spatial structure information based on the features, resulting in inconsistent convergence. A long-distance feature dependency relationship is established based on the spatial structure representation of the IoT terminal data pattern time series propagation coding vector relative to the overall feature scale of the IoT terminal data pattern time series propagation coding vector to establish the feature local connectivity of the IoT terminal data pattern time series propagation coding vector, and the spatial ambiguous information of the object feature value is captured through the unstructured feature value point prediction of the IoT terminal data pattern time series propagation coding vector, thereby improving the spatial inductive bias perception ability of the feature set of the IoT terminal data pattern time series propagation coding vector, improving the convergence consistency of the classifier, and improving the accuracy of the data pattern verification result obtained by inputting the IoT terminal data pattern time series propagation coding vector into a data pattern recognizer based on the classifier.
[0064] Specifically, in S53, the data mode verification result and the data tampering verification result are summarized to obtain the verification result record. That is, the data mode verification result and the data tampering verification result are summarized to form a comprehensive verification result record, so as to comprehensively reflect the status and quality of the data and provide users with more complete information for further data processing and decision-making.
[0065] In particular, the S6 uploads the verification result record to the blockchain network for evidence storage. The blockchain network has the characteristics of decentralization and non-tamperability, and can store data safely and reliably. By uploading the verification result record to the blockchain network, the authenticity and integrity of the data are guaranteed. In the specific implementation, first, a smart contract is created on the blockchain network, and the verification result record is written into the smart contract using blockchain development tools, such as Ethereum's Solidity language. The smart contract is then deployed on the blockchain network and stored and verified through the nodes of the blockchain network. In this way, a safe and reliable evidence storage method is provided to ensure the authenticity and integrity of the data. At the same time, the traceability of the blockchain network enables the historical records of the data to be preserved, which is convenient for subsequent audits and analysis.
[0066] In one example, the specific process of uploading the verification result record to the blockchain network for evidence storage includes: first, creating a smart contract on the blockchain network. A smart contract is an automatically executed contract clause whose terms are directly written into the code and deployed on the blockchain platform. Once deployed, these contracts cannot be modified or deleted, thereby ensuring the permanence and immutability of the contract content. For the evidence storage of IoT data verification results, smart contracts can define how to process and store verification result records and who has access to these records. Blockchain development tools and technologies, such as the Solidity language on the Ethereum platform, are usually used to write smart contracts. Smart contracts need to have the functions of receiving data verification results from the server, storing the received results securely on the blockchain, and providing an interface for authorized users to query and retrieve the stored verification results. Next, a blockchain transaction is initiated to submit this data to the blockchain network. This process involves building a blockchain transaction containing a verification result record. Each transaction contains the sender address, the receiver address (usually the smart contract address), the transaction amount (if applicable), and additional data fields (i.e., the verification result record). In addition, the transaction must be accompanied by necessary signature information to prove the identity and intention of the sender. The constructed transaction is signed using the server's private key to ensure that only authorized entities can initiate such a transaction and that the authenticity of the transaction content can be verified. The signed transaction is legally binding, and any attempt to tamper with the transaction content will result in verification failure. The signed transaction is then broadcast to the entire blockchain network, which means sending the transaction to multiple nodes so that they can participate in the consensus mechanism to confirm the validity of the transaction. Different blockchain networks have different consensus algorithms, such as proof of work (PoW), proof of stake (PoS), etc., but the core idea is to reach a consensus through distributed computing to ensure the security and reliability of transactions. Depending on the type of blockchain network used and its consensus mechanism, the transaction may wait for a period of time until a sufficient number of nodes agree to add it to the latest block. When a new block is successfully mined and added to the blockchain, it means that the transaction has been officially confirmed and the verification result records it contains have been irreversibly saved. Due to the characteristics of the blockchain itself, these records are open, transparent and tamper-proof, so anyone can independently verify them at any time without relying on a third-party trust agency. In order to allow relevant parties to easily query and verify the stored verification result records, corresponding interfaces and services need to be provided. This can be achieved through an API gateway or a specially designed application. Users only need to provide the necessary parameters (such as batch ID, time range, etc.) to retrieve the corresponding verification result records from the blockchain.
[0067] In summary, the IoT terminal data traceability and anti-counterfeiting method according to the embodiment of the present application is explained, which encodes the original data generated by the IoT terminal by using a hash algorithm to generate a unique hash value as a data identifier. After receiving the original data, the server uses the same hash algorithm to calculate the hash value of the original data, thereby verifying the integrity and authenticity of the data based on the comparison result of the hash value. After the anti-tampering verification is completed, the timing feature extraction of the IoT terminal original data is further combined with the timing analysis technology based on deep learning to capture the timing correlation in the IoT terminal data, so as to identify abnormal data patterns, evaluate the operating status of the IoT terminal, and store the data verification results through the blockchain network. In this way, comprehensive security verification of IoT terminal data can be achieved, and through data pattern analysis, abnormal operation of IoT terminals can be identified, which helps to prevent potential security threats.
[0068] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A data tracing and anti-counterfeiting method for an IoT terminal, characterized in that: include: Time queue for collecting raw data from IoT terminals; Calculate the hash function value of each IoT terminal original data in the time queue of the IoT terminal original data to obtain a time queue of the hash function value; Sending the time queue of the hash function value together with the time queue of the original data of the Internet of Things terminal to the server through a secure channel; After receiving the time queue of the IoT terminal original data, the server calculates the hash function value of each IoT terminal original data in the time queue of the IoT terminal original data to obtain a time queue for verifying the hash function value; Determining whether the data has been tampered with and generating a verification result record based on a comparison between the time queue of the verification hash function value and the time queue of the hash function value; Upload the verification result record to the blockchain network for evidence storage; Among them, based on the comparison between the time queue of the verification hash function value and the time queue of the hash function value, determining whether the data has been tampered with and generating a verification result record, including: if the time queue of the verification hash function value matches the time queue of the hash function value, determining that the data has not been tampered with to obtain a data tampering verification result; based on the time queue of the original data of the Internet of Things terminal, determining whether there is an abnormality in the data pattern of the Internet of Things terminal to obtain a data pattern verification result; summarizing the data pattern verification result and the data tampering verification result to obtain the verification result record.
2. The IoT terminal data tracing and anti-counterfeiting method according to claim 1, characterized in that: Based on the time queue of the original data of the IoT terminal, determining whether the data mode of the IoT terminal is abnormal to obtain a data mode verification result includes: Embedding and encoding each IoT terminal original data in the time queue of IoT terminal original data to obtain a time queue of IoT terminal original data embedded coding vectors; Performing feature dynamic propagation coding based on gated writing on the time queue of the IoT terminal original data embedded coding vector to obtain the IoT terminal data mode timing propagation coding vector; Based on the IoT terminal data pattern timing propagation coding vector, the data pattern verification result is determined.
3. The IoT terminal data tracing and anti-counterfeiting method according to claim 2 is characterized in that: The time queue of the IoT terminal original data embedded coding vector is subjected to feature dynamic propagation coding based on gated writing to obtain the IoT terminal data mode timing propagation coding vector, including: Performing initial time sequence forward propagation coding on the time queue of the IoT terminal original data embedded coding vector to obtain the IoT terminal original data time sequence initial propagation coding vector; Calculate the private characteristics of each IoT terminal original data embedding coding vector in the time queue of the IoT terminal original data embedding coding vector relative to the IoT terminal original data time series initial propagation coding vector to obtain the time queue of the IoT terminal original data time series node private characteristic coding vector; The time queue of the private feature coding vector of the original data timing node of the Internet of Things terminal and the initial propagation coding vector of the original data timing of the Internet of Things terminal are subjected to feature compensation fusion based on gated writing to obtain the timing propagation coding vector of the Internet of Things terminal data pattern.
4. The IoT terminal data tracing and anti-counterfeiting method according to claim 3 is characterized in that: Performing initial time sequence forward propagation coding on the time queue of the IoT terminal original data embedded coding vector to obtain the IoT terminal original data time sequence initial propagation coding vector, including: The time queue of the IoT terminal original data embedded in the coding vector is input into the sequence reasoning module based on the forward LSTM model to obtain the timing initial propagation coding vector of the IoT terminal original data.
5. The IoT terminal data tracing and anti-counterfeiting method according to claim 4 is characterized in that: Calculating the private features of each IoT terminal original data embedding coding vector in the time queue of the IoT terminal original data embedding coding vector relative to the IoT terminal original data time series initial propagation coding vector to obtain the time queue of the IoT terminal original data time series node private feature coding vector, including: Input the IoT terminal original data embedding coding vector and the IoT terminal original data time series initial propagation coding vector into a difference feature extraction network based on the Sigmoid function to obtain the IoT terminal original data time series node difference feature vector; Based on the differential feature vector of the IoT terminal original data timing node, the IoT terminal original data embedded coding vector is modulated with private features to obtain the IoT terminal original data timing node private feature coding vector.
6. The IoT terminal data tracing and anti-counterfeiting method according to claim 5, characterized in that: The time queue of the private feature coding vector of the original data timing node of the Internet of Things terminal and the initial propagation coding vector of the original data timing of the Internet of Things terminal are subjected to feature compensation fusion based on gated writing to obtain the timing propagation coding vector of the Internet of Things terminal data mode, including: Performing gated writing on each of the IoT terminal original data timing node private feature coding vectors in the time queue of the IoT terminal original data timing node private feature coding vectors to obtain a time queue of gated writing of the IoT terminal original data timing node private feature coding vectors; The time queue of the private feature coding vector of the original data timing node of the Internet of Things terminal written by the gate and the initial propagation coding vector of the original data timing of the Internet of Things terminal are cascaded and fused to obtain the timing propagation coding vector of the Internet of Things terminal data mode.
7. The IoT terminal data tracing and anti-counterfeiting method according to claim 6, characterized in that: The gate-writing of each IoT terminal original data timing node private feature coding vector in the time queue of the IoT terminal original data timing node private feature coding vector is performed to obtain a time queue of gate-written IoT terminal original data timing node private feature coding vectors, including: Input the private feature coding vector of the timing node of the original data of the Internet of Things terminal into the probabilistic unit based on the Softmax function to obtain the probabilistic private feature coding vector of the timing node of the original data of the Internet of Things terminal; Based on a preset gating threshold, gated screening is performed on the probabilistic IoT terminal original data timing node private feature encoding vector to obtain the IoT terminal original data timing node private feature mask weight vector; The gated write Internet of Things terminal original data timing node private feature mask weight vector and the Internet of Things terminal original data timing node private feature coding vector are calculated by multiplying the private feature mask weight vector and the Internet of Things terminal original data timing node private feature coding vector by position point.
8. The IoT terminal data tracing and anti-counterfeiting method according to claim 7, characterized in that: Determining the data pattern verification result based on the IoT terminal data pattern timing propagation coding vector includes: The IoT terminal data pattern timing propagation coding vector is input into a classifier-based data pattern recognizer to obtain the data pattern verification result.
9. The IoT terminal data tracing and anti-counterfeiting method according to claim 8, characterized in that: Inputting the IoT terminal data pattern timing propagation coding vector into a classifier-based data pattern recognizer to obtain the data pattern verification result, including: Using multiple fully connected layers of the classifier to perform fully connected encoding on the IoT terminal data pattern time series propagation encoding vector to obtain an encoding classification feature vector; and The encoded classification feature vector is passed through the Softmax classification function of the classifier to obtain the data pattern verification result.
Citation Information
Patent Citations
Internet of Things information protection structure based on block chain technology
CN113194135A
Time series data anomaly detection method, electronic equipment and computer storage medium
CN114970717A