A data tamper-proof encryption method in environmental monitoring process

By standardizing the environmental monitoring data and feature extraction, the data is encrypted and stored by generating encryption keys, solving the problem of data tampering and improving data security and integrity.

CN118607016BActive Publication Date: 2024-11-12HAIMEN SAIWEI HYDRAULIC MASCH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411088196.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-12
Estimated Expiration
2044-08-09

AI Technical Summary

Technical Problem

Environmental monitoring data is easily tampered with or forged during transmission and storage, resulting in inaccurate and unreliable monitoring results, affecting data security.

Method used

The data tamper-proof encryption method is adopted to monitor data through standardized processing environments, extract time characteristics and change curves, build matrix and convolution kernel, perform convolution operations and feature sequence replacement, and generate encryption keys to DES encrypt and store the data.

Benefits of technology

Improves the security of environmental monitoring data, prevents tampering, and ensures data integrity and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118607016B_ABST
    Figure CN118607016B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and in particular to a data tamper-proof encryption method in an environmental monitoring process, comprising: obtaining a number of data in the environmental monitoring process, obtaining standard data of each data; performing peak detection on the standard data to obtain a change point of the standard data, obtaining a time characteristic and a change curve of the standard data according to the change point, and then obtaining a change parameter of the standard data; obtaining a first matrix and a convolution kernel of the standard data; performing a convolution operation on the first matrix using the convolution kernel to obtain a second matrix; obtaining a third matrix in combination with the change parameter, and then obtaining a characteristic sequence of the standard data; converting a public key to obtain a public key sequence, obtaining an encryption key in combination with the characteristic sequence, and encrypting and storing all characteristic sequences according to the encryption key. The present invention improves the security of environmental monitoring data, making the environmental monitoring data not easily tampered with.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a data tamper-proof encryption method in an environmental monitoring process. Background Art

[0002] In the process of environmental monitoring, sensors are responsible for collecting data on environmental parameters (such as temperature, humidity, gas concentration, etc.). These data are crucial for monitoring environmental conditions and conducting scientific research, so anti-tampering encryption of data is of great significance.

[0003] The existing technology for tamper-proofing environmental monitoring data mostly uses the MD5 algorithm (MD5 Message-DigestAlgorithm) and digital signature for verification, which is to compress the entire data into a fixed-length digital string through hash calculation, so that any tampering of the analyzed data will cause the result of the hash calculation to change, thereby ensuring the integrity of the original environmental monitoring data. Since the monitoring equipment may be subject to various interference or attacks, the data may be tampered or forged during the encryption or storage process, resulting in inaccurate and unreliable monitoring results, which in turn affects the security of the data and makes the data easy to be tampered with. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a data tamper-proof encryption method in an environmental monitoring process.

[0005] The data tamper-proof encryption method in an environmental monitoring process of the present invention adopts the following technical solution:

[0006] An embodiment of the present invention provides a data tamper-proof encryption method in an environmental monitoring process, the method comprising the following steps:

[0007] Obtain several data items in the environmental monitoring process, standardize the parameter values ​​in each data item, and obtain the standard data of each data item;

[0008] Record the standard data of any item of data as the target standard data; perform peak detection on the target standard data to obtain a number of change points of the target standard data, wherein the change points correspond to a time and a parameter value; obtain the time characteristics of the target standard data according to the change points of the target standard data and the time corresponding to the change points; obtain the change curve of the target standard data according to the change points of the target standard data and the parameter values ​​corresponding to the change points; obtain the change parameter of the target standard data according to the time characteristics and the change curve;

[0009] According to the target standard data, a plurality of first matrices of the target standard data and a convolution kernel of the target standard data are obtained; the convolution kernel of the target standard data is used to perform a convolution operation on each first matrix of the target standard data to obtain a plurality of second matrices of the target standard data; the element values ​​in the second matrix are replaced according to the variable parameter to obtain a plurality of third matrices of the target standard data; the element values ​​in the third matrix are converted to obtain a plurality of characteristic sequences of the target standard data;

[0010] Obtain a public key, convert the public key to obtain a public key sequence; obtain a conversion key for each feature sequence based on the feature sequence and the public key sequence; obtain an encryption key for each feature sequence based on the conversion key, and encrypt and store the feature sequence of the standard data of all item data based on the encryption key.

[0011] Furthermore, the step of obtaining the time characteristics of the target standard data according to the change points of the target standard data and the time corresponding to the change points includes the following specific steps:

[0012] The target standard data The time corresponding to the change point minus the The time corresponding to the change points is taken as the difference as the time interval of an adjacent change point of the target standard data, the time interval of all adjacent change points of the target standard data is obtained, the average of the time intervals of all adjacent change points of the target standard data is recorded as the first average value, the absolute value of the difference between the maximum value of the time intervals of all adjacent change points of the target standard data and the first average value is recorded as the first difference, and the sum obtained by adding 1 to the first difference is taken as the time feature of the target standard data.

[0013] Furthermore, the step of obtaining a change curve of the target standard data according to the change points of the target standard data and the parameter values ​​corresponding to the change points includes the following specific steps:

[0014] The target standard data The time corresponding to the change point is recorded as the first time, the time before the first time is recorded as the second time, the parameter value corresponding to the second time in the target standard data is recorded as the first parameter value, and the The parameter value corresponding to the change point minus the first parameter value is used as the difference The change value of the change point The change value of the change point is taken as the The vertical coordinate of the change point is The time corresponding to the change point in the target standard data is taken as the The horizontal coordinate of each change point is obtained, and the horizontal coordinate and vertical coordinate of each change point in the target standard data are obtained. According to the horizontal coordinates and vertical coordinates of all change points in the target standard data, a scatter plot is constructed, which is recorded as the scatter plot of the target standard data; all points in the scatter plot of the target standard data are fitted to obtain a fitting curve, which is recorded as the change curve of the target standard data.

[0015] Furthermore, the step of obtaining the variation parameters of the target standard data according to the time characteristics and the variation curve includes the following specific steps:

[0016] The time in the change curve of the target standard data that is equal to the time characteristic of the target standard data is recorded as the third time; the parameter value corresponding to the third time in the change curve of the target standard data is used as the change parameter of the target standard data.

[0017] Furthermore, the step of obtaining a plurality of first matrices of the target standard data and a convolution kernel of the target standard data according to the target standard data includes the following specific steps:

[0018] Each of the target standard data The parameter values ​​are arranged from left to right and from top to bottom to form a The matrix is ​​recorded as the first matrix of the target standard data. is a preset first value; the mean, variance and range of all parameter values ​​in the target standard data are obtained, which are recorded as ;

[0019] The convolution kernel of the target standard data is: .

[0020] Furthermore, the step of replacing the element values ​​in the second matrix according to the variation parameter to obtain a plurality of third matrices of target standard data includes the following specific steps:

[0021] Any second matrix of the target standard data is recorded as the target second matrix, and the variable parameter of the target standard data is recorded as ; Get the second matrix of the target Divide the element value by If the remainder is an even number, the target second matrix Replace the element value with 1. If the remainder is an odd number, replace the first element in the target second matrix with 1. The element values ​​are replaced with 0, and each element value in the target second matrix is ​​replaced to obtain a third matrix of target standard data.

[0022] Furthermore, the element values ​​in the third matrix are converted to obtain several characteristic sequences of the target standard data, and the specific steps include the following:

[0023] Any third matrix of the target standard data is recorded as the target third matrix, and each 8-bit element value in the target third matrix is ​​converted using ASCII code to obtain the character corresponding to each 8-bit element value in the target third matrix, which is recorded as the first character. All the first characters of the target third matrix are obtained, and all the first characters of the target third matrix are arranged horizontally in the order of acquisition to obtain a character sequence, which is recorded as a characteristic sequence of the target standard data.

[0024] Furthermore, the converting of the public key to obtain the public key sequence includes the following specific steps:

[0025] Each character in the public key is converted using the ASCII code to obtain a binary sequence corresponding to each character in the public key. The binary sequences corresponding to all characters in the public key are arranged horizontally in the order in which they are obtained to obtain a sequence, which is recorded as the public key sequence.

[0026] Furthermore, the step of obtaining the conversion key of each feature sequence according to the feature sequence and the public key sequence includes the following specific steps:

[0027] Any feature sequence of the target standard data is recorded as the target feature sequence; for the first A binary sequence, The remainder obtained by dividing by the preset hyperparameter and adding 1, the sum is recorded as ; Get the order value of the characters in the target feature sequence All characters that are integer multiples are recorded as the second character of the target feature sequence. Each second character of the target feature sequence is converted using ASCII code to obtain a binary sequence of each second character of the target feature sequence. The binary sequences of all second characters of the target feature sequence are XORed, and the result of the XOR operation is added to the first character of the public key sequence. The binary sequence is ANDed, and the result of the ANDed operation is converted into ASCII code. The obtained character is recorded as the first character of the target feature sequence. conversion key characters, obtain all conversion key characters of the target feature sequence, and arrange all conversion key characters of the target feature sequence horizontally in order to obtain a sequence, which is recorded as the conversion key of the target feature sequence.

[0028] Furthermore, the encryption key of each feature sequence is obtained according to the conversion key, and the feature sequences of the standard data of all item data are encrypted and stored according to the encryption key, including the following specific steps:

[0029] Preset a second value, denoted as , shift each conversion key character in the conversion key of the target feature sequence to the right except the last conversion key character bits, and move the last conversion key character in the conversion key of the target feature sequence to the first conversion key character of the conversion key of the target feature sequence, and the result is used as the encryption key of the target feature sequence;

[0030] According to the encryption key of each feature sequence of the target standard data, the corresponding feature sequence in the target standard data is encrypted by DES to obtain the ciphertext data of each feature sequence of the target standard data, and the ciphertext data of all feature sequences of the target standard data are arranged horizontally according to the acquisition order of the feature sequences to obtain a sequence, which is recorded as the ciphertext data of the target standard data, and the ciphertext data of the standard data of each item of data in the environmental monitoring process is obtained, and the ciphertext data of the standard data of all items of data in the environmental monitoring process is stored.

[0031] The beneficial effect of the technical solution of the present invention is: after obtaining several data in the environmental monitoring process, the present invention obtains the standard data of each data in the environmental monitoring process through standardization processing, obtains the time characteristics of the standard data through the change points of the standard data and the time corresponding to the change points, reflects the uniformity of the time change of the standard data, obtains the change parameters of the standard data through the time characteristics and the change curve of the standard data, and convolves the first matrix by constructing a first matrix of standard data and a convolution kernel of the standard data to obtain a second matrix, and then replaces the element values ​​in the second matrix by the change parameters to obtain a third matrix of standard data, and when obtaining the convolution kernel, determines the appropriate convolution kernel based on the distribution characteristics of the standard data to perform a convolution operation on the first matrix, so that the subsequent data features are more accurate, and finally obtains the encryption key to encrypt and store the feature sequence obtained according to the third matrix, thereby improving the security of the environmental monitoring data and making the environmental monitoring data not easily tampered with. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 A flowchart of a method for encrypting data in an environmental monitoring process to prevent tampering provided by an embodiment of the present invention;

[0034] Figure 2 A flowchart of data encryption during environmental monitoring provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the data tamper-proof encryption method in an environmental monitoring process proposed by the present invention, its specific implementation method, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0036] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0037] The following is a detailed description of a specific scheme of a data tamper-proof encryption method in an environmental monitoring process provided by the present invention in conjunction with the accompanying drawings.

[0038] See also Figure 1 , which shows a flowchart of a method for tamper-proof encryption of data in an environmental monitoring process provided by an embodiment of the present invention, the method comprising the following steps:

[0039] Step S001: Acquire several items of data in the environmental monitoring process, standardize the parameter values ​​in each item of data, and obtain standard data for each item of data.

[0040] It should be noted that the purpose of this embodiment is to utilize the relevant internal characteristics of the environmental monitoring data and combine it with the data distribution characteristics of the environmental monitoring data to extract the entire data, improve the extraction accuracy of the environmental monitoring data, reduce the misjudgment rate, and make the data safer. Before starting the analysis, the data is first collected.

[0041] Specifically, multiple data are obtained during the environmental monitoring process, and the multiple data include but are not limited to the following data: humidity data, temperature data, air pressure data, air quality data, etc. of the monitored environment, wherein each data is a two-dimensional time series sequence, and the horizontal axis of each data is time, and the vertical axis is the specific parameter value corresponding to the time, for example, each time in the humidity data corresponds to a humidity value.

[0042] Furthermore, the parameter values ​​in each data item are Z-Score standardized, and the obtained results are used as standard data for each data item. It should be noted that the parameter values ​​in the humidity data are humidity values, different data items correspond to different parameter values, and the standard data is also a two-dimensional time series.

[0043] So far, some standard data have been obtained.

[0044] Step S002, record the standard data of any one item of data as the target standard data; perform peak detection on the target standard data to obtain a number of change points of the target standard data, wherein the change points correspond to a time and a parameter value; obtain the time characteristics of the target standard data according to the change points of the target standard data and the time corresponding to the change points; obtain the change curve of the target standard data according to the change points of the target standard data and the parameter values ​​corresponding to the change points; obtain the change parameters of the target standard data according to the time characteristics and the change curve.

[0045] It should be noted that the standard data of each item of data in the environmental monitoring process is obtained by analyzing the change of the standard data to obtain the change parameter of the data.

[0046] Specifically, the standard data of any data item is recorded as the target standard data; the peak value of the target standard data is detected to obtain several change points of the target standard data, as follows:

[0047] The target standard data is detected by using a peak detection algorithm to obtain several change points of the target standard data; it should be noted that the use of a peak detection algorithm to detect the target standard data to obtain several change points of the target standard data is an existing method of the peak detection algorithm, which will not be repeated in this embodiment, wherein the change point corresponds to a time and a parameter value, for example, for the standard data of humidity data, the change point in the standard data of the humidity data corresponds to a time and a humidity value, the humidity value here is standardized, and is still recorded as the humidity value in this embodiment, and unless otherwise specified, the parameter values ​​in the standard data all refer to the parameter values ​​after standardization.

[0048] Furthermore, according to the change points of the target standard data and the time corresponding to the change points, the time characteristics of the target standard data are obtained, which are as follows:

[0049] The target standard data The time corresponding to the change point minus the The time corresponding to the change points is taken as the difference as the time interval of an adjacent change point of the target standard data, the time interval of all adjacent change points of the target standard data is obtained, the average of the time intervals of all adjacent change points of the target standard data is recorded as the first average value, the absolute value of the difference between the maximum value of the time intervals of all adjacent change points of the target standard data and the first average value is recorded as the first difference, and the sum obtained by adding 1 to the first difference is taken as the time feature of the target standard data.

[0050] It should be noted that for changes in target standard data, the uniformity of the corresponding time changes, i.e., the time characteristics, is obtained based on the difference between the maximum change time and the average change time. The smaller the difference, the more uniform the change.

[0051] Furthermore, according to the change points of the target standard data and the parameter values ​​corresponding to the change points, a change curve of the target standard data is obtained, as follows:

[0052] The target standard data The time corresponding to the change point is recorded as the first time, the time before the first time is recorded as the second time, the parameter value corresponding to the second time in the target standard data is recorded as the first parameter value, and the The parameter value corresponding to the change point minus the first parameter value is used as the difference The change value of the change point The change value of the change point is taken as the The vertical coordinate of the change point is The time corresponding to the change point in the target standard data is taken as the The horizontal coordinate of each change point is obtained, and the horizontal coordinate and vertical coordinate of each change point in the target standard data are obtained. According to the horizontal coordinates and vertical coordinates of all change points in the target standard data, a scatter plot is constructed, which is recorded as the scatter plot of the target standard data; all points in the scatter plot of the target standard data are fitted to obtain a fitting curve, which is recorded as the change curve of the target standard data.

[0053] It should be noted that, in this embodiment, the least squares method is used to fit all the points in the scatter plot of the target standard data, wherein the fitted curve is a quintic polynomial curve. The specific fitting is an existing method and will not be described in detail in this embodiment.

[0054] Furthermore, the variation parameters of the target standard data are obtained according to the time characteristics and the variation curve, as follows:

[0055] The time in the change curve of the target standard data that is equal to the time characteristic of the target standard data is recorded as the third time; the parameter value corresponding to the third time in the change curve of the target standard data is used as the change parameter of the target standard data.

[0056] It should be noted that if there is only one change point in the target standard data, the parameter value corresponding to the change point in the target standard data is directly used as the change parameter of the target standard data; if the target standard data has no change point, the change parameter of the target standard data is set to 1.

[0057] At this point, the change parameters of the target standard data are obtained, and the change parameters reflect the change of the target standard data.

[0058] Step S003, according to the target standard data, obtain several first matrices of the target standard data and the convolution kernel of the target standard data; use the convolution kernel of the target standard data to perform a convolution operation on each first matrix of the target standard data to obtain several second matrices of the target standard data; replace the element values ​​in the second matrix according to the variable parameter to obtain several third matrices of the target standard data; convert the element values ​​in the third matrix to obtain several characteristic sequences of the target standard data.

[0059] It should be noted that the above-mentioned variable parameters of the target standard data need to be transformed accordingly for the entire data.

[0060] Specifically, according to the target standard data, several first matrices of the target standard data and convolution kernels of the target standard data are obtained, as follows:

[0061] Each of the target standard data The parameter values ​​are arranged from left to right and from top to bottom to form a The matrix is ​​recorded as the first matrix of the target standard data. is a preset first value. To describe; it should be noted that if the last When the matrix is ​​, the number of elements in the matrix is ​​insufficient If there are 0s, fill them with 0.

[0062] Get the mean, variance and range of all parameter values ​​in the target standard data, which are recorded as .

[0063] The convolution kernel of the target standard data is:

[0064]

[0065] Furthermore, a convolution operation is performed on each first matrix of the target standard data using a convolution kernel of the target standard data to obtain several second matrices of the target standard data. It should be noted that performing a convolution operation on a matrix using a convolution kernel is an existing method and will not be repeated in this embodiment. The generation logic of the convolution kernel is as follows: for the target standard data, its overall fluctuation and the fluctuation range of the data are uniquely determined characteristics. Using it as a convolution kernel can uniquely determine the data characteristics together with the first matrix.

[0066] Furthermore, the element values ​​in the second matrix are replaced according to the variation parameters to obtain several third matrices of target standard data, as follows:

[0067] Any second matrix of the target standard data is recorded as the target second matrix, and the variable parameter of the target standard data is recorded as ; Get the second matrix of the target Divide the element value by If the remainder is an even number, the target second matrix Replace the element value with 1. If the remainder is an odd number, replace the first element in the target second matrix with 1. The element values ​​are replaced with 0, and each element value in the target second matrix is ​​replaced to obtain a third matrix of target standard data.

[0068] Furthermore, the element values ​​in the third matrix are transformed to obtain several characteristic sequences of the target standard data, as follows:

[0069] Any third matrix of the target standard data is recorded as the target third matrix, and each 8-bit element value in the target third matrix is ​​converted using ASCII code to obtain the character corresponding to each 8-bit element value in the target third matrix, which is recorded as the first character. All the first characters of the target third matrix are obtained, and all the first characters of the target third matrix are arranged horizontally in the acquisition order to obtain a character sequence, which is recorded as a characteristic sequence of the target standard data. It should be noted that, in order to facilitate the understanding of the acquisition order, it is explained here that when each 8-bit element value in the target third matrix is ​​converted using ASCII code, it is converted in order from left to right and from top to bottom, so each character has a corresponding acquisition order. For example, the characters converted by the first 8-bit element values ​​in the target third matrix have the first corresponding order. By converting them one by one, the acquisition order of each character can be obtained.

[0070] At this point, several characteristic sequences of the target standard data are obtained.

[0071] Step S004, obtain the public key, convert the public key to obtain a public key sequence; obtain the conversion key of each feature sequence based on the feature sequence and the public key sequence; obtain the encryption key of each feature sequence based on the conversion key, and encrypt and store the feature sequence of the standard data of all item data based on the encryption key.

[0072] It should be noted that the several characteristic sequences of the target standard data obtained above need to be used in combination with the public key to generate an encryption key.

[0073] Specifically, obtain the public key and convert the public key to obtain the public key sequence, as follows:

[0074] It should be noted that obtaining the public key is an existing method and will not be repeated in this embodiment; the public key contains several characters, and each character in the public key is converted using ASCII code to obtain a binary sequence corresponding to each character in the public key, and the binary sequences corresponding to all characters in the public key are arranged horizontally in the acquisition order to obtain a sequence, which is recorded as the public key sequence; it should be noted that to facilitate understanding of the acquisition order, it is explained here that when each character in the public key is converted using ASCII code, each character has its own corresponding order, and the binary sequences corresponding to the characters have their own acquisition order, for example, the binary sequence corresponding to the first character of the public key is the first binary sequence, and they are arranged in sequence.

[0075] Further, according to the feature sequence and the public key sequence, the conversion key of each feature sequence is obtained, as follows:

[0076] Any feature sequence of the target standard data is recorded as the target feature sequence; for the first A binary sequence, The remainder after dividing by 32 is added by 1, and the sum is recorded as ; It should be noted that 32 is a preset hyperparameter; the order value of the characters in the target feature sequence is All characters that are integer multiples are recorded as the second character of the target feature sequence. Each second character of the target feature sequence is converted using ASCII code to obtain a binary sequence of each second character of the target feature sequence. The binary sequences of all second characters of the target feature sequence are XORed, and the result of the XOR operation is added to the first character of the public key sequence. The binary sequence is ANDed, and the result of the ANDed operation is converted into ASCII code. The obtained character is recorded as the first character of the target feature sequence. conversion key characters, obtain all conversion key characters of the target feature sequence, and arrange all conversion key characters of the target feature sequence horizontally in order to obtain a sequence, which is recorded as the conversion key of the target feature sequence.

[0077] It should be noted that, in order to facilitate understanding of the XOR operation on the binary sequences of all second characters of the target feature sequence, an example is given here. For example, the binary sequence of the first second character of the target feature sequence is 01010001, and the binary sequence of the second second character of the target feature sequence is 00100101. The result of the XOR operation on these two binary sequences is: 01110100. Subsequently, 01110100 is XORed with the binary sequence of the third second character of the target feature sequence, and so on, until the XOR operation is performed on all binary sequences of the second characters of the target feature sequence.

[0078] Furthermore, the encryption key of each feature sequence is obtained according to the conversion key, as follows:

[0079] Preset a second value, denoted as In this embodiment, Narrate, shift each conversion key character to the right except the last conversion key character in the conversion key of the target feature sequence bits, and move the last conversion key character in the conversion key of the target feature sequence to the first conversion key character of the conversion key of the target feature sequence, and the result is used as the encryption key of the target feature sequence.

[0080] Furthermore, the characteristic sequence of the standard data of all item data is encrypted and stored according to the encryption key, as follows:

[0081] According to the encryption key of each characteristic sequence of the target standard data, the corresponding characteristic sequence in the target standard data is encrypted by DES (Data Encryption Standard) to obtain the ciphertext data of each characteristic sequence of the target standard data; it should be noted that the DES encryption of the corresponding characteristic sequence in the target standard data to obtain the ciphertext data of each characteristic sequence of the target standard data is an existing method of DES encryption, which will not be repeated in this embodiment; the ciphertext data of all characteristic sequences of the target standard data are arranged horizontally according to the acquisition order of the characteristic sequences to obtain a sequence, which is recorded as the ciphertext data of the target standard data, and the ciphertext data of the standard data of each item of data in the environmental monitoring process is obtained, and the ciphertext data of the standard data of all items of data in the environmental monitoring process is stored; it should be noted that the subsequent decryption performs a reverse transformation on the ciphertext data through the encryption key and the third matrix corresponding to the characteristic sequence, the second matrix corresponding to the third matrix and the first matrix corresponding to the second matrix, so as to obtain the standard data of each item of data, and then obtain the original data. The main purpose of this embodiment is to encrypt the data to prevent data tampering, which will not be repeated in detail; please refer to Figure 2 , Figure 2 The flowchart of data encryption in the environmental monitoring process provided by this embodiment is as follows: Figure 2 The method for obtaining each feature in is as follows:

[0082] Acquire several items of data in the environmental monitoring process, standardize the parameter value in each item of data, and obtain the standard data of each item of data; record the standard data of any item of data as the target standard data; perform peak detection on the target standard data to obtain several change points of the target standard data, wherein the change point corresponds to a time and a parameter value; obtain the time characteristics of the target standard data according to the change points of the target standard data and the time corresponding to the change points; obtain the change curve of the target standard data according to the change points of the target standard data and the parameter values ​​corresponding to the change points; obtain the change parameters of the target standard data according to the time characteristics and the change curve; obtain several first values ​​of the target standard data according to the target standard data. A convolution operation is performed on each first matrix of the target standard data and a convolution kernel of the target standard data; the convolution kernel of the target standard data is used to perform a convolution operation on each first matrix of the target standard data to obtain several second matrices of the target standard data; the element values ​​in the second matrix are replaced according to the variable parameter to obtain several third matrices of the target standard data; the element values ​​in the third matrix are converted to obtain several feature sequences of the target standard data; a public key is obtained, and the public key is converted to obtain a public key sequence; a conversion key of each feature sequence is obtained according to the feature sequence and the public key sequence; an encryption key of each feature sequence is obtained according to the conversion key, and the feature sequences of the standard data of all item data are encrypting and storing according to the encryption key.

[0083] At this point, the data tamper-proof encryption in the environmental monitoring process is completed by encrypting and storing each data in the environmental monitoring process.

[0084] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A data tamper-proof encryption method in an environmental monitoring process, characterized in that: The method comprises the following steps: Obtain several data items in the environmental monitoring process, standardize the parameter values ​​in each data item, and obtain the standard data of each data item; Record the standard data of any item of data as the target standard data; perform peak detection on the target standard data to obtain a number of change points of the target standard data, wherein the change points correspond to a time and a parameter value; obtain the time characteristics of the target standard data according to the change points of the target standard data and the time corresponding to the change points; obtain the change curve of the target standard data according to the change points of the target standard data and the parameter values ​​corresponding to the change points; obtain the change parameter of the target standard data according to the time characteristics and the change curve; According to the target standard data, a plurality of first matrices of the target standard data and a convolution kernel of the target standard data are obtained; the convolution kernel of the target standard data is used to perform a convolution operation on each first matrix of the target standard data to obtain a plurality of second matrices of the target standard data; the element values ​​in the second matrix are replaced according to the variable parameter to obtain a plurality of third matrices of the target standard data; the element values ​​in the third matrix are converted to obtain a plurality of characteristic sequences of the target standard data; Obtain a public key, convert the public key to obtain a public key sequence; obtain a conversion key for each feature sequence based on the feature sequence and the public key sequence; obtain an encryption key for each feature sequence based on the conversion key, and encrypt and store the feature sequence of the standard data of all item data based on the encryption key; The step of replacing the element values ​​in the second matrix according to the variable parameter to obtain a plurality of third matrices of target standard data includes the following specific steps: Any second matrix of the target standard data is recorded as the target second matrix, and the variable parameter of the target standard data is recorded as ; Get the second matrix of the target Divide the element value by If the remainder is an even number, the target second matrix Replace the element value with 1. If the remainder is an odd number, replace the first element in the target second matrix with 1. Replace the element values ​​with 0, replace each element value in the target second matrix, and obtain a third matrix of target standard data; The specific steps of converting the element values ​​in the third matrix to obtain several characteristic sequences of the target standard data are as follows: Any third matrix of the target standard data is recorded as the target third matrix, each 8-bit element value in the target third matrix is ​​converted using ASCII code, and the character corresponding to each 8-bit element value in the target third matrix is ​​obtained, which is recorded as the first character, and all the first characters of the target third matrix are obtained, and all the first characters of the target third matrix are horizontally arranged according to the acquisition order to obtain a character sequence, which is recorded as a characteristic sequence of the target standard data; The specific steps of converting the public key to obtain the public key sequence are as follows: Each character in the public key is converted using the ASCII code to obtain a binary sequence corresponding to each character in the public key, and the binary sequences corresponding to all characters in the public key are arranged horizontally in the order of acquisition to obtain a sequence, which is recorded as the public key sequence; The specific steps of obtaining the conversion key of each feature sequence according to the feature sequence and the public key sequence are as follows: Any feature sequence of the target standard data is recorded as the target feature sequence; for the first A binary sequence, The remainder obtained by dividing by the preset hyperparameter and adding 1, the sum is recorded as ; Get the order value of the characters in the target feature sequence All characters that are integer multiples are recorded as the second character of the target feature sequence. Each second character of the target feature sequence is converted using ASCII code to obtain a binary sequence of each second character of the target feature sequence. The binary sequences of all second characters of the target feature sequence are XORed, and the result of the XOR operation is added to the first character of the public key sequence. The binary sequence is ANDed, and the result of the ANDed operation is converted into ASCII code. The obtained character is recorded as the first character of the target feature sequence. conversion key characters, obtain all conversion key characters of the target feature sequence, and arrange all conversion key characters of the target feature sequence horizontally in order to obtain a sequence, which is recorded as the conversion key of the target feature sequence.

2. According to the method for encrypting data to prevent tampering in an environmental monitoring process as described in claim 1, it is characterized in that: The step of obtaining the time characteristics of the target standard data according to the change points of the target standard data and the time corresponding to the change points includes the following specific steps: The target standard data The time corresponding to the change point minus the The time corresponding to the change points is taken as the difference as the time interval of an adjacent change point of the target standard data, the time interval of all adjacent change points of the target standard data is obtained, the average of the time intervals of all adjacent change points of the target standard data is recorded as the first average value, the absolute value of the difference between the maximum value of the time intervals of all adjacent change points of the target standard data and the first average value is recorded as the first difference, and the sum obtained by adding 1 to the first difference is taken as the time feature of the target standard data.

3. According to the method for encrypting data to prevent tampering in an environmental monitoring process as described in claim 1, it is characterized in that: The specific steps of obtaining the change curve of the target standard data according to the change points of the target standard data and the parameter values ​​corresponding to the change points are as follows: The target standard data The time corresponding to the change point is recorded as the first time, the time before the first time is recorded as the second time, the parameter value corresponding to the second time in the target standard data is recorded as the first parameter value, and the The difference between the parameter value corresponding to the change point and the first parameter value is taken as the The change value of the change point The change value of the change point is taken as the The vertical coordinate of the change point is The time corresponding to the change point in the target standard data is taken as the The horizontal coordinate of each change point in the target standard data is obtained, and the horizontal coordinate and the vertical coordinate of each change point in the target standard data are obtained. According to the horizontal coordinates and the vertical coordinates of all change points in the target standard data, a scatter plot is constructed, which is recorded as the scatter plot of the target standard data; All points in the scatter plot of the target standard data are fitted to obtain a fitting curve, which is recorded as the change curve of the target standard data.

4. According to the method for encrypting data to prevent tampering in an environmental monitoring process as described in claim 1, it is characterized in that: The specific steps of obtaining the variation parameters of the target standard data according to the time characteristics and the variation curve are as follows: The time in the change curve of the target standard data that is equal to the time characteristic of the target standard data is recorded as the third time; the parameter value corresponding to the third time in the change curve of the target standard data is used as the change parameter of the target standard data.

5. According to the method for encrypting data to prevent tampering in an environmental monitoring process as described in claim 1, it is characterized in that: The step of obtaining a plurality of first matrices of the target standard data and a convolution kernel of the target standard data according to the target standard data includes the following specific steps: Each of the target standard data The parameter values ​​are arranged from left to right and from top to bottom to form a The matrix is ​​recorded as the first matrix of the target standard data. is a preset first value; the mean, variance and range of all parameter values ​​in the target standard data are obtained, which are recorded as ; The convolution kernel of the target standard data is: .

6. According to the method for encrypting data to prevent tampering in an environmental monitoring process as described in claim 1, it is characterized in that: The encryption key of each feature sequence is obtained according to the conversion key, and the feature sequences of the standard data of all item data are encrypted and stored according to the encryption key, including the following specific steps: Preset a second value, denoted as , shift each conversion key character in the conversion key of the target feature sequence to the right except the last conversion key character bits, and move the last conversion key character in the conversion key of the target feature sequence to the first conversion key character of the conversion key of the target feature sequence, and the result is used as the encryption key of the target feature sequence; According to the encryption key of each feature sequence of the target standard data, the corresponding feature sequence in the target standard data is encrypted by DES to obtain the ciphertext data of each feature sequence of the target standard data, and the ciphertext data of all feature sequences of the target standard data are arranged horizontally according to the acquisition order of the feature sequences to obtain a sequence, which is recorded as the ciphertext data of the target standard data, and the ciphertext data of the standard data of each item of data in the environmental monitoring process is obtained, and the ciphertext data of the standard data of all items of data in the environmental monitoring process is stored.