CN115314600B - Chemical fertilizer production monitoring data management method - Google Patents
Chemical fertilizer production monitoring data management method Download PDFInfo
- Publication number
- CN115314600B CN115314600B CN202211243812.XA CN202211243812A CN115314600B CN 115314600 B CN115314600 B CN 115314600B CN 202211243812 A CN202211243812 A CN 202211243812A CN 115314600 B CN115314600 B CN 115314600B
- Authority
- CN
- China
- Prior art keywords
- value
- sequence
- ciphertext
- row
- column
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/32—Circuits or arrangements for control or supervision between transmitter and receiver or between image input and image output device, e.g. between a still-image camera and its memory or between a still-image camera and a printer device
- H04N1/32101—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title
- H04N1/32144—Display, printing, storage or transmission of additional information, e.g. ID code, date and time or title embedded in the image data, i.e. enclosed or integrated in the image, e.g. watermark, super-imposed logo or stamp
- H04N1/32149—Methods relating to embedding, encoding, decoding, detection or retrieval operations
- H04N1/32267—Methods relating to embedding, encoding, decoding, detection or retrieval operations combined with processing of the image
- H04N1/32272—Encryption or ciphering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/001—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using chaotic signals
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Abstract
The invention relates to the technical field of data processing, in particular to a management method of fertilizer production monitoring data, which comprises the following steps: acquiring monitoring data during fertilizer production, acquiring a plaintext image, setting an integer value sequence and obtaining a first key; calculating a second difference value between the integer value in the integer value sequence and the gray value of the corresponding column of ciphertext pixel points, enabling the second difference value to be equal to a first difference value between the gray value of the plaintext pixel points and a preset gray threshold value, obtaining the gray value of the ciphertext pixel points according to the relation between the gray value of the plaintext pixel points and the gray value of the plaintext pixel points, obtaining an initial ciphertext image, and scrambling the position of the initial ciphertext image to obtain a final ciphertext image.
Description
Technical Field
The invention relates to the technical field of data processing, in particular to a management method of monitoring data of chemical fertilizer production.
Background
An enterprise management system of an existing fertilizer production enterprise is generally used for managing and monitoring database access data of fertilizer raw materials, production data in fertilizer production, equipment operation data, other contract data and the like, scenes of high temperature, high pressure, flammability, explosiveness and the like are generally accompanied in the existing fertilizer production process, therefore, the monitoring data in the fertilizer production process also needs to be managed and stored.
The conventional method for safely storing the image data is based on scrambling the positions of pixel points of the image data by a chaotic mapping model, but the method for safely storing the image data based on scrambling only scrambles the positions of the pixel points of the image, does not consider the gray level distribution condition of the pixel points in the image, has no correlation between two adjacent pixels in an encrypted image, has poor randomization characteristics, is easy to break down when attacked by statistical analysis, and has poor storage safety.
Disclosure of Invention
The invention provides a management method of fertilizer production monitoring data, which aims to solve the existing problems.
The invention discloses a management method of fertilizer production monitoring data, which adopts the following technical scheme:
acquiring monitoring data during fertilizer production;
taking each frame of image of the monitoring data as a plaintext image, setting an integer value sequence with the length same as the number of columns of the plaintext image according to the gray value range, and taking the integer value sequence as a first secret key;
acquiring a first difference value of a gray value of each plaintext pixel point in the plaintext image and a preset gray threshold value, and acquiring a second difference value of the gray values of the corresponding columns of ciphertext pixel points and the integer values of the same columns of the integer value sequence and the plaintext pixel points, wherein the first difference value is equal to the second difference value;
when the gray value of each column of the plaintext pixel points in the first row in the plaintext image is greater than or equal to the integer value of the corresponding column in the integer value sequence, taking the difference value of the gray value of the plaintext pixel points in the column of the first row and the integer value of the gray value of the plaintext pixel points in the first row as the gray value of the ciphertext pixel points in the corresponding row and column;
when the gray value of each column of plaintext pixel points in a first row in the plaintext image is smaller than the integer value of the corresponding column in the integer value sequence, acquiring the gray values of the ciphertext pixel points in the corresponding row and column according to the second difference value and the first difference value, and acquiring the gray values of all the ciphertext pixel points in the first row;
starting from the gray value of the second line of ciphertext pixel points, carrying out XOR operation on the gray value of the corresponding line of ciphertext pixel points in the previous line of each line of ciphertext pixel points and the integer value of the corresponding line in the integer value sequence to obtain a target value;
when the target value is greater than or equal to the gray value of the plaintext pixel points of the corresponding row and column, taking the difference value between the target value and the gray value of the plaintext pixel points of the corresponding row and column as the gray value of the ciphertext pixel points of the corresponding row and column;
when the target value is smaller than the gray value of the plaintext pixel points of the corresponding row and the corresponding column, taking the difference value between the target value and the first difference value as the gray value of the ciphertext pixel points of the corresponding row and the corresponding column, and so on to obtain the gray values of all the ciphertext pixel points and obtain an initial ciphertext image, and storing the initial ciphertext image and the first key;
and scrambling the position of the initial ciphertext image according to the chaotic mapping model to obtain a final ciphertext image.
Preferably, the step of scrambling the position of the initial ciphertext image according to the chaotic mapping model to obtain the final ciphertext image comprises:
respectively acquiring a first chaotic sequence with the length equal to the length of a plaintext image, a second chaotic sequence with the length equal to the width of the plaintext image and a second key according to the chaotic mapping model;
obtaining a row sequence number sequence according to the variable step length Joseph traversal and the first chaotic sequence, and obtaining a column sequence number sequence according to the variable step length Joseph traversal and the second chaotic sequence;
and sequentially carrying out corresponding inter-row replacement and inter-column replacement on the initial ciphertext image according to the row sequence number sequence and the column sequence number sequence to obtain a scrambled ciphertext image, wherein the scrambled ciphertext image is the final ciphertext image, and storing the final ciphertext image and the second secret key.
Preferably, the step of respectively obtaining the first chaotic sequence with the length equal to the length of the plaintext image, the second chaotic sequence with the length equal to the width of the plaintext image and the second key according to the chaotic mapping model comprises:
setting the value range of each chaotic parameter of the chaotic mapping model and the value ranges of the initial x component and the initial y component;
randomly selecting a value corresponding to each chaotic parameter from the value range of the chaotic parameter as each chaotic parameter value, and randomly selecting corresponding initial x components and initial y components from the value ranges of the initial x components and the initial y components;
taking each chaotic parameter value, the initial x component and the initial y component as second keys;
setting iteration times of the chaotic mapping model, inputting all chaotic parameter values, an initial x component and an initial y component into the chaotic mapping model for calculation, and obtaining an x component and a y component corresponding to each iteration;
selecting the same number of continuous x components as the number of pixel points of the plaintext image row to obtain a first group of sequences, and selecting the same number of continuous y components as the number of pixel points of the plaintext image row to obtain a second group of sequences;
multiplying each x component in the first group of sequences by the number of pixel points, rounding up and rounding up to obtain a first chaotic sequence;
and multiplying each x component in the second group of sequences by the number of the row pixel points, and rounding to obtain a second chaotic sequence.
Preferably, the step of obtaining the row sequence number sequence according to the variable step length joseph traversal and the first chaotic sequence and the step of obtaining the column sequence number sequence according to the variable step length joseph traversal and the second chaotic sequence comprises:
obtaining the ratio of the first x component in the first chaotic sequence to the total number of the components in the first chaotic sequence, and obtaining a first remainder by remainder;
taking the x component value of the first remainder corresponding to the first chaotic sequence as the first row sequence number of the column sequence number;
obtaining the ratio of the second x component in the first chaotic sequence to the total number of the components in the first chaotic sequence minus 1, and obtaining a second remainder by taking the remainder;
taking the x component value corresponding to the second remainder in the first chaotic sequence as a second row serial number of the column serial number sequence;
by parity of reasoning, all row sequence numbers and row sequence numbers are obtained;
and similarly, acquiring the column sequence number sequence according to the mode of acquiring the row sequence number sequence.
Preferably, the step of sequentially performing corresponding inter-row permutation and inter-column permutation on the initial ciphertext image according to the row sequence number sequence and the column sequence number sequence to obtain the scrambled ciphertext image includes:
numbering all pixel rows of the initial ciphertext image from top to bottom, and numbering all pixel columns of the initial ciphertext image from left to right to obtain a corresponding pixel row numbering sequence and a corresponding pixel column numbering sequence;
and (3) replacing the pixel points corresponding to the pixel line number sequence of the initial ciphertext image to the position corresponding to the line number sequence, and replacing the pixel points corresponding to the pixel column number sequence of the initial ciphertext image to the position corresponding to the column number sequence to obtain the scrambled ciphertext image.
Preferably, the step of replacing the pixel points corresponding to the pixel row number sequence of the initial ciphertext image with the positions corresponding to the row number sequence, and replacing the pixel points corresponding to the pixel column number sequence of the initial ciphertext image with the positions corresponding to the column number sequence to obtain the scrambled ciphertext image comprises:
acquiring a first row sequence number in a row sequence number sequence, putting all ciphertext pixel points in a row 1 in a pixel row number sequence of an initial ciphertext image on a row corresponding to the first row sequence number of the initial ciphertext image, and so on, and realizing the row scrambling of all rows of the initial ciphertext image according to the row sequence number of the row sequence number sequence;
and similarly, performing inter-column scrambling on the initial ciphertext image subjected to the inter-line scrambling according to an inter-line scrambling mode to obtain a scrambled ciphertext image.
Preferably, the step of performing an exclusive or operation on the gray values of the ciphertext pixel points in the corresponding column of the previous line in each line of ciphertext pixel points and the integer values of the corresponding column in the integer value sequence to obtain the target value includes:
respectively converting the gray value of the ciphertext pixel point of the corresponding column in the previous line in the ciphertext pixel points and the integer value of the corresponding column in the integer value sequence into corresponding 8-bit binary numbers;
performing an exclusive-or operation on each digit in one 8-bit binary number and each digit in the other 8-bit binary number;
if the two values subjected to the XOR operation are different, namely one is 1 and the other is 0, the XOR result is 1;
if the two values subjected to the exclusive-or operation are the same, namely both are 1 or both are 0, the exclusive-or result is 0;
and then converting the result of the exclusive-or operation into a decimal number, wherein the decimal number is the target value.
Preferably, the preset gray threshold value is 256.
Preferably, an integer value is randomly selected from the gray value range for a plurality of times, and the integer values selected each time are arranged according to the selection sequence to obtain an integer value sequence.
Preferably, the method further comprises decrypting the final ciphertext image, and the decrypting step comprises:
performing inverse scrambling on the final ciphertext image by using a chaotic mapping model to obtain an initial ciphertext image;
obtaining the gray values of the plaintext pixel points in the corresponding column of the first row of the plaintext image according to the gray value of each column of ciphertext pixel points in the first row of the initial ciphertext image and the integral value of the corresponding column in the first key, wherein when the integral value of the corresponding column is smaller than the gray value of the ciphertext pixel point, the gray value of the plaintext pixel point in the corresponding column is obtained by adding the difference value of the integral value of the corresponding column and the gray value of the ciphertext pixel point to the value of a preset gray threshold value, and the value is used as the gray value of the plaintext pixel point in the corresponding column of the first row; when the integer value of the corresponding column is larger than or equal to the gray value of the ciphertext pixel point, taking the difference value of the integer value of the corresponding column and the gray value of the ciphertext pixel point as the gray value of the plaintext pixel point of the corresponding column of the first row;
starting from the gray value of the plaintext pixel points in the second row, carrying out exclusive or operation on the gray value of the corresponding column of ciphertext pixel points in the previous row of each row of ciphertext pixel points and the integer value of the corresponding column in the integer value sequence to obtain a target value;
when the target value is larger than or equal to the gray value of the ciphertext pixel point of the corresponding row and column, taking the difference value of the target value and the gray value of the ciphertext pixel point of the corresponding row and column as the gray value of the plaintext pixel point of the corresponding row and column;
and when the target value is smaller than the gray value of the ciphertext pixel points in the corresponding row and column, taking the difference value of the target value and the first difference value as the gray value of the plaintext pixel points in the corresponding row and column, and so on to obtain the gray values of the plaintext pixel points in all rows and all columns and obtain the plaintext image.
The management method of the fertilizer production monitoring data has the beneficial effects that:
1. the relationship between the gray value of the pixel point of the plaintext image and the gray value of the pixel point of the ciphertext image is established through the set first key, the gray distribution of the pixel point of the plaintext image is changed according to the relationship between the gray value of the pixel point of the plaintext image and the pixel point of the ciphertext image to obtain an initial ciphertext image, so that the gray histogram of the ciphertext image is different from the gray histogram of the plaintext image, the relevance between the ciphertext pixel points in the initial ciphertext image and the relevance between all the ciphertext pixel points and the first key are enhanced, and therefore the statistical characteristic of the image is broken through, and the statistical analysis attack of an attacker is resisted.
2. Secondly, performing column scrambling and row scrambling on the initial ciphertext image to destroy the position information of ciphertext pixel points in the initial ciphertext image, and even if an attacker knows a safe storage method, the attacker cannot acquire the relationship between the gray value of the pixel points of the plaintext image and the ciphertext pixel points due to the position scrambling of the pixel points, namely cannot acquire the relationship between the first key and the ciphertext pixel points, and cannot crack the ciphertext image, so that the safe storage of the monitoring data is further realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic structural diagram of an embodiment of a method for managing fertilizer production monitoring data according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The embodiment of the present invention relates to a method for managing monitoring data in chemical fertilizer production, and the embodiment is mainly used in a secure storage scenario of monitoring data in a chemical fertilizer production process, and aims at that image data is scrambled based on a chaotic mapping model in the prior art, only the positions of pixel points of an image are scrambled, and the gray level distribution of the pixel points in the image is not considered, so that there is no correlation between the gray levels of two adjacent pixels in the encrypted image, and the gray levels are easy to be cracked when being attacked by statistical analysis, specifically, the embodiment, as shown in fig. 1, includes:
s1, acquiring monitoring data during fertilizer production
Specifically, this embodiment adopts to set up the camera in the chemical fertilizer workshop, and the monitoring data of the chemical fertilizer production in chemical fertilizer workshop is gathered through the camera, and the monitoring data is the surveillance video.
S2, taking each frame of image of the monitoring data as a plaintext image; and setting an integer value sequence with the length same as the number of the plaintext image columns according to the gray value range, and using the integer value sequence as a first secret key.
Specifically, each frame of image in the fertilizer production monitoring data is recorded as a plaintext image, wherein the size of the plaintext image isWherein, in the step (A),the number of lines of the plaintext image is,the number of columns of the plaintext image.
In order to increase the relevance between ciphertext pixels in a ciphertext image, this embodiment needs to set a set integer value sequence, and the integer value sequence is used as the first key, specifically, from the range of gray valuesRandomly selecting an integer value for multiple times from all the integer values in the sequence, and arranging the integer values selected each time according to the selection sequence to obtain an integer value sequence, namely, the integer values are selected fromAmong all integers, the integer value selected for the first time is recorded as the first numerical value of the integer value sequence; recording the integer value randomly selected for the second time as a second value of the sequence of integer values; by analogy, fromIn sequence, randomly selected from all integers in betweenA numerical value; to be obtainedThe individual values are arranged in order to form a sequence of integer values, wherein,the number of columns representing the plaintext image is the number of integers in the sequence of integers, and the sequence of integers is used as the first key.
S3, obtaining a first difference value between the gray value of each plaintext pixel point in the plaintext image and a preset gray threshold value, and obtaining a second difference value between the gray values of the corresponding columns of ciphertext pixel points and the integer values of the same columns of the integer value sequence and the plaintext pixel points, wherein the first difference value is equal to the second difference value.
It should be noted that, when a first difference between the gray value of a plaintext pixel and a preset gray threshold is equal to a second difference between the gray value of the same column of integer value sequence and the plaintext pixel and the gray value of the corresponding column of ciphertext pixels, the value of the ciphertext pixel can be taken as multiple possibilities, so that the gray values of all ciphertext pixels in the ciphertext image can be arbitrarily set within a certain range, and finally, the plaintext pixel with the same gray value in the plaintext image is converted into the ciphertext pixels with different gray values in the ciphertext image.
Based on this, the gray values of the plaintext pixel points and the ciphertext pixel points are both the gray valuesTherefore, the gray level threshold is set to 256, and when the integer value of the sequence of integer values is smaller than the gray level value of the plaintext pixel, in order to ensure that the first difference is equal to the second difference, the difference between the gray level value of the plaintext pixel and the gray level threshold is not greater than the second differenceThat is, less than 0, that is, when the difference between the gray value of the plaintext pixel and the gray threshold is less than 0, the second difference between the integer value of the integer value sequence and the gray value of the ciphertext pixel is less than 0, but the gray values are all at the same valueTherefore, the integral value of the integral value sequence is smaller than the gray value of the corresponding column of ciphertext pixel pointsWhen the integer value of the integer value sequence is greater than or equal to the gray value of the plaintext pixel point, in order to ensure that the first difference value is equal to the second difference value, the gray values are all equal to each otherAnd if the second difference is greater than 0, namely the integer value of the integer value sequence is greater than or equal to the gray value of the corresponding column of ciphertext pixel points.
Specifically, when the gray value of each line of plaintext pixel points in a first row in the plaintext image is greater than or equal to the integer value of the corresponding line in the integer value sequence, the difference value between the integer value and the gray value of the line of plaintext pixel points in the first row is used as the gray value of the ciphertext pixel points in the corresponding row and the corresponding line; when the gray value of each line of plaintext pixel points in a first line in the plaintext image is smaller than the integer value of the corresponding line in the integer value sequence, acquiring the gray values of the ciphertext pixel points in the corresponding line and the corresponding line according to the second difference value and the first difference value, and obtaining the gray values of all the ciphertext pixel points in the first line, wherein a formula for calculating the gray values of the ciphertext pixel points in the first line is as follows:
in the formula (I), the compound is shown in the specification,denotes the first lineGray values of the column ciphertext pixel points;
representing the first line in a plaintext imageArranging gray values of the plaintext pixel points;
presetting a gray threshold value to be 256;
it should be noted that, in this embodiment, the first difference is equal to the second difference, that is, the gray value minus the gray threshold of the plaintext pixel is equal to the gray value minus the ciphertext pixel in the integer value sequence, and the gray value is within the range of the gray valueAnd the value range of the integer value is alsoMeanwhile, the gray value and the integer value of the ciphertext pixel point cannot take negative values, and cannot take values larger than 255, so that the gray value of the ciphertext pixel point in the first row is obtained under two conditions when the integer value of the integer value sequence is smaller than the gray value of the plaintext pixel point and the integer value of the integer value sequence is larger than or equal to the gray value of the plaintext pixel point.
This embodiment, first row by first rowGray value calculation of ciphertext pixel points of a column is taken as an example, when the first in a sequence of integer valuesIndividual valueLess than line 1 of the plaintext imageGray value of plaintext pixel point of columnWhen it is, line 1 will beGrey value of plaintext pixel of columnA first difference from the gray level threshold 256 isInteger value ofFirst line of the initial ciphertext imageGray value of ciphertext pixel of columnSecond difference of (2)On line 1, theGrey value of plaintext pixel of columnA first difference from the gray level threshold 256 is equal to an integer valueGray value of pixel point of cipher textWhen the second difference is equal to (2), i.e.All of(ii) a When the first in the sequence of integer valuesIndividual valueGreater than or equal to line 1, in the plaintext imageGrey value of plaintext pixel of columnTime, gray value of plaintext pixel pointEqual to the second in a sequence of integer valuesIndividual valueFirst line of the initial ciphertext imageGray value of ciphertext pixel of columnSecond difference of (2)I.e. byThen line 1 toGray value of ciphertext pixel of column。
It should be noted that, in the process, the gray value of each plaintext pixel point is actually converted into the contrast ratio of the gray value of each plaintext pixel point and the gray value of each ciphertext pixel point according to the first key, so as to establish the relationship between the gray value of each plaintext pixel point and the gray value of each ciphertext pixel point, and since the relationship between the gray value of each ciphertext pixel point and the gray value of each plaintext pixel point is related according to the first key, the first key enables the integer value in the integer value sequence and the ciphertext pixel point in the initial ciphertext image to have relevance, that is, the gray value of each ciphertext pixel point in the first row is related to the first key, so that the gray value of each pixel point in the initial ciphertext image after encryption is different from the gray value of the plaintext image by using the relationship between the gray value of each plaintext pixel point and the gray value of each ciphertext pixel point, so as to break the statistical characteristic of the plaintext image, and resist the statistical analysis attack of an attacker.
S4, starting from the gray value of the second line of ciphertext pixel points, carrying out XOR operation on the gray value of the corresponding line of ciphertext pixel points in the previous line of each line of ciphertext pixel points and the integer value of the corresponding line in the integer value sequence to obtain a target value; when the target value is larger than or equal to the gray value of the plaintext pixel points of the corresponding row and column, taking the difference value of the target value and the gray value of the plaintext pixel points of the corresponding row and column as the gray value of the ciphertext pixel points of the corresponding row and column; and when the target value is smaller than the gray value of the plaintext pixel points of the corresponding row and the corresponding column, taking the difference value between the target value and the first difference value as the gray value of the ciphertext pixel points of the corresponding row and the corresponding column, and so on to obtain the gray values of all the ciphertext pixel points and obtain an initial ciphertext image, and storing the initial ciphertext image and the first key.
Specifically, the step of performing an exclusive or operation on the gray values of the ciphertext pixel points in the corresponding column of the previous line in each line of ciphertext pixel points and the integer values of the corresponding column in the integer value sequence to obtain the target value includes: respectively converting the gray value of the ciphertext pixel point of the corresponding column of the previous row in the ciphertext pixel points and the integer value of the corresponding column in the integer value sequence into corresponding 8-bit binary numbers; performing an exclusive-or operation on each digit in one 8-bit binary number and each digit in the other 8-bit binary number; if the two values subjected to the XOR operation are different, namely one is 1 and the other is 0, the XOR result is 1; if the two values subjected to the exclusive-or operation are the same, namely both are 1 or both are 0, the exclusive-or result is 0; and then converting the result of the exclusive-or operation into a decimal number, wherein the decimal number is the target value.
Specifically, the embodiment calculates the second row numberTaking the gray values of the ciphertext pixel points of the columns as an example, the gray values of all the ciphertext pixel points of the first row are obtained in the step S3, and the gray values of the ciphertext pixel points of the second row are calculatedWhen the gray value of the ciphertext pixel point of the column is gray, the first integer value in the integer value sequence is respectively compared with the gray value of the ciphertext pixel point of the columnAn integer valueAnd the first of the initial ciphertext imageGo to the firstGray value of ciphertext pixel of columnConvert to the corresponding 8-bit binary number and then convert the integer valueAnd gray value of ciphertext pixel pointCarrying out XOR operation on two values of the used positions in the corresponding 8-bit binary number, wherein if the two values subjected to XOR operation are different, namely one is 1 and the other is 0, the XOR result is 1; if the two values subjected to the exclusive-or operation are the same, namely both are 1 or both are 0, the exclusive-or result is 0; the result of the XOR operation is then converted to a decimal number, the target value being the decimal number, used in this exampleRepresenting the first in a sequence of integer valuesA value of integer and aGo to the firstWhen the target value is greater than or equal to the gray value of the plaintext pixel points in the corresponding row and column, taking the difference value between the target value and the gray value of the plaintext pixel points in the corresponding row and column as the gray value of the ciphertext pixel points in the corresponding row and column; when the target value is smaller than the gray value of the plaintext pixel points of the corresponding row and column, taking the difference value between the target value and the first difference value as the gray value of the ciphertext pixel points of the corresponding row and column, and so on to obtain the gray values of all ciphertext pixel points and obtain an initial ciphertext image, wherein the gray value of the first ciphertext pixel point in the initial ciphertext image is calculatedGo to the firstFormula of gray value of ciphertext pixel of column:
representing the original ciphertext imageGo to the firstGray values of ciphertext pixel points of the columns;
representing the original ciphertext imageGo to the firstGray values of ciphertext pixel points of the columns;
representing the first in a sequence of integer valuesA value of one integer and a value of oneGo to the firstThe target value obtained by the gray value XOR operation of the ciphertext pixel points of the column;
since the range of gray values isAnd the value range of the target value is alsoIn between, the gray value and the target value of the ciphertext pixel cannot take negative values or values larger than 255, and the two conditions are divided into two conditions, when the target value is smaller than the gray value of the plaintext pixel, and when the target value is larger than or equal to the gray value of the plaintext pixel, the gray value of the ciphertext pixel in each line is obtained according to the two conditions, and so on, the gray value of the second line and the second line is calculated according to the embodimentCombining the gray value mode of the ciphertext pixel points of the row with the calculation of the first order in the initial ciphertext imageGo to the firstObtaining initial ciphertext image by formula of gray values of ciphertext pixel points of columnsObtaining an initial ciphertext image by the gray values of all the pixel points;
it should be noted that, in the process of step S3, the gray value of each plaintext pixel point is actually converted into the contrast ratio between the integer value and the gray value of the ciphertext pixel point according to the first key, that is, the relationship between the gray value of the plaintext pixel point and the gray value of the plaintext pixel point is established, because the relationship between the gray value of the ciphertext pixel point and the gray value of the plaintext pixel point is related according to the first key, the first key makes the integer value in the sequence of integer values and the ciphertext pixel point in the initial ciphertext image have a relationship, that is, the gray value of the ciphertext pixel point in the first row forms a relationship with the first key, in the process of step S4, the gray value of the ciphertext pixel point in the first row actually makes an exclusive or operation on the basis that the relationship between the gray value of the ciphertext pixel point in the first row and the first key, so as to calculate the contrast ratio between the integer value and the ciphertext pixel point in the corresponding row, thereby increasing the relationship between the gray value of all the gray values of the pixel points in the initial image and the corresponding integer values in the sequence of the ciphertext, that the ciphertext is a little, and so that when the ciphertext is cracked, the ciphertext is attacked, the ciphertext, the pixel point is a little, and the ciphertext error is cracked, so that the subsequent pixel point is cracked, and the pixel point is cracked; therefore, the secure storage method of the embodiment has a strong randomization characteristic, that is, the secure storage method of the invention can resist a brute force attack mode of statistical analysis, and has higher security.
And S5, scrambling the position of the initial ciphertext image according to the chaotic mapping model to obtain a final ciphertext image.
Specifically, in order to improve the security of the ciphertext image, the gray value of the plaintext pixel point is converted into the contrast between the integer value and the gray value of the ciphertext pixel point to obtain the initial ciphertext image, that is, the gray distribution of the pixel point in the plaintext image is changed through the steps S1 to S4, and meanwhile, in order to further enhance the security of storage, the pixel point position in the initial ciphertext image needs to be scrambled, so that the position information of the ciphertext pixel point in the initial ciphertext image is damaged, even if an attacker knows the secure storage method of the present invention, the attacker cannot obtain two ciphertext pixel points for calculating the contrast due to scrambling, and further cannot crack the ciphertext image.
Based on this, the invention performs the inter-column scrambling and the inter-row scrambling to the initial ciphertext image according to the chaotic mapping model, and specifically, the step of performing the position scrambling to the initial ciphertext image according to the chaotic mapping model to obtain the final ciphertext image comprises: respectively acquiring a first chaotic sequence with the length equal to the length of a plaintext image, a second chaotic sequence with the length equal to the width of the plaintext image and a second key according to the chaotic mapping model; obtaining a row sequence number sequence according to the variable step length Joseph traversal and the first chaotic sequence, and obtaining a column sequence number sequence according to the variable step length Joseph traversal and the second chaotic sequence; and sequentially carrying out corresponding inter-row replacement and inter-column replacement on the initial ciphertext image according to the row sequence number sequence and the column sequence number sequence to obtain a scrambled ciphertext image, wherein the scrambled ciphertext image is the final ciphertext image, and storing the final ciphertext image and the second secret key.
The method comprises the following steps of respectively obtaining a first chaotic sequence with the length equal to the length of a plaintext image, a second chaotic sequence with the length equal to the width of the plaintext image and a second secret key according to a chaotic mapping model, wherein the steps comprise: setting the value range of each chaotic parameter of the chaotic mapping model and the value ranges of the initial x component and the initial y component, namely, the two-dimensional Logistic chaotic mapping model is adopted in the embodiment, and the formula of the two-dimensional Logistic chaotic mapping model is as follows:
wherein the content of the first and second substances,are all chaotic parameters, and the value range of each chaotic parameter in this embodimentComprises the following steps:,,,meanwhile, the value ranges of the initial x component and the initial y component are respectively as follows:1,1;
specifically, a value corresponding to each chaotic parameter is randomly selected from the value range of the chaotic parameter to serve as each chaotic parameter value, and a corresponding initial x component and an initial y component are randomly selected from the value ranges of the initial x component and the initial y component; taking each chaotic parameter value, the initial x component and the initial y component as second keys; i.e. the second key isSetting iteration times during chaos mapping model formula calculation, inputting each chaos parameter value, an initial x component and an initial y component into the chaos mapping model for calculation, and obtaining an x component and a y component corresponding to each iteration; selecting the same number of continuous x components as the number of pixel points of the plaintext image row to obtain a first group of sequences, and selecting the same number of continuous y components as the number of pixel points of the plaintext image row to obtain a second group of sequences; multiplying each x component in the first group of sequences by the number of row pixels, rounding to obtain a first chaotic sequence, multiplying each x component in the second group of sequences by the number of column pixels, rounding to obtain a second chaotic sequence.
In this embodiment, the number of iterations in the chaos mapping formula calculation is set asAnd then, wherein,is the number of lines of the plaintext image,is the number of columns of the plaintext image,is constant, in order toThe number of iterations is made to exceed the size of the image, i.e. in this embodiment,if greater than 30, in order to prevent interference of the selected initial x component and initial y component, the embodiment removes the first group of sequencesA number of values, which are the remainder of the first set of sequencesEach of the individual values is multiplied byAnd rounding to obtain a length ofA first chaotic sequence of (a); removing the preamble of the second sequence set to prevent interferenceA value of the remaining of the second set of sequencesEach of the individual values is multiplied byAnd rounding to obtain a length ofThe second chaotic sequence of (1).
The method comprises the following steps of obtaining a row sequence number sequence according to variable step length Joseph traversal and a first chaotic sequence, and obtaining a column sequence number sequence according to the variable step length Joseph traversal and a second chaotic sequence, wherein the steps of: obtaining the ratio of the first x component in the first chaotic sequence to the total number of the components in the first chaotic sequence, and obtaining a first remainder by remainder; will be provided withTaking the x component value of the first remainder corresponding to the first chaotic sequence as the first row sequence number of the column sequence number; obtaining the ratio of the second x component in the first chaotic sequence to the total number of the components in the first chaotic sequence minus 1, and obtaining a second remainder by taking the remainder; taking the x component value corresponding to the second remainder in the first chaotic sequence as a second row sequence number of the column sequence number; by analogy, all row sequence numbers and row sequence number sequences are obtained; similarly, the column sequence number sequence is obtained according to the way of obtaining the row sequence number sequence, specifically, in this embodiment, when obtaining the row sequence number sequence and the column sequence number sequence, first, the row sequence number sequence and the column sequence number sequence are obtainedIs formed into a circle according to the first x component of the first chaotic sequenceTo be connected toExtracting a value corresponding to the integer in the first chaotic sequence to be used as a first serial number of the line serial number sequence; will remainA number of integers enclosing a circle, according to the second x-component of the chaotic sequenceTo be connected toExtracting the corresponding value of the integer in the first chaotic sequence as the second serial number of the line serial number sequence, repeating the steps until all the integers are extracted, and obtaining the line serial number sequence corresponding to the first chaotic sequence, wherein,representing division remainders, e.g. ofThe whole number between the two is enclosed into a circle, and the corresponding chaotic sequence isThen the row sequence number isIn the same way, willThe integers between the two sequences form a circle, and the corresponding sequence number sequence is obtained according to the variable step length Josephson traversal and the second chaotic sequence.
The method comprises the following steps of sequentially carrying out corresponding line displacement and column displacement on an initial ciphertext image according to a line sequence number sequence and a column sequence number sequence to obtain a scrambled ciphertext image: numbering all pixel rows of the initial ciphertext image from top to bottom, and numbering all pixel columns of the initial ciphertext image from left to right to obtain a corresponding pixel row numbering sequence and a corresponding pixel column numbering sequence; the method comprises the steps of replacing pixel points corresponding to a pixel row number sequence of an initial ciphertext image to a position corresponding to a row number sequence, replacing pixel points corresponding to a pixel column number sequence of the initial ciphertext image to a position corresponding to a column number sequence to obtain a scrambled ciphertext image, specifically, obtaining a first row number in the row number sequence, placing all ciphertext pixel points in a 1 st row in the pixel row number sequence of the initial ciphertext image on a row corresponding to the first row number of the initial ciphertext image, and so on, and according to the row number of the row number sequence, realizing the inter-row scrambling of all rows of the initial ciphertext image; and similarly, performing inter-column scrambling on the initial ciphertext image subjected to the inter-line scrambling according to an inter-line scrambling mode to obtain a scrambled ciphertext image.
For example, the gray value of the ciphertext pixel point at the corresponding position in the initial ciphertext image isWhen the sequence number isThen, according to the sequence of the sequence numbers, obtaining the initial ciphertext image after the inter-column scramblingThe sequence of the row sequence number isThen, the gray value of the corresponding position of the ciphertext image after line scrambling is obtained according to the line sequence number sequence as。
The invention also includes decrypting the final ciphertext image, the decrypting step including: performing inverse scrambling on the final ciphertext image by using a chaotic mapping model to obtain an initial ciphertext image; obtaining the gray value of the plaintext pixel points in the corresponding column of the first row of the plaintext image according to the gray value of each column of ciphertext pixel points in the first row of the initial ciphertext image and the integer value of the corresponding column in the first key, wherein when the integer value of the corresponding column is smaller than the gray value of the ciphertext pixel points, the gray value of the plaintext pixel points in the corresponding column is obtained by adding the difference value of the integer value of the corresponding column and the gray value of the ciphertext pixel points to a preset gray threshold value, and the preset gray threshold value is used as the gray value of the plaintext pixel points in the corresponding column of the first row; when the integer value of the corresponding column is larger than or equal to the gray value of the ciphertext pixel point, taking the difference value of the integer value of the corresponding column and the gray value of the ciphertext pixel point as the gray value of the plaintext pixel point of the corresponding column of the first row; starting from the gray value of the plaintext pixel points in the second row, carrying out exclusive or operation on the gray value of the corresponding column of ciphertext pixel points in the previous row of each row of ciphertext pixel points and the integer value of the corresponding column in the integer value sequence to obtain a target value; when the target value is larger than or equal to the gray value of the ciphertext pixel point of the corresponding row and column, taking the difference value of the target value and the gray value of the ciphertext pixel point of the corresponding row and column as the gray value of the plaintext pixel point of the corresponding row and column; and when the target value is smaller than the gray value of the ciphertext pixel points of the corresponding row and the corresponding column, taking the difference value of the target value and the first difference value as the gray value of the plaintext pixel points of the corresponding row and the corresponding column, and so on to obtain the gray values of the plaintext pixel points of all rows and all columns and obtain the plaintext image.
The method for obtaining the initial ciphertext image by performing inverse scrambling on the final ciphertext image by using the chaotic mapping model comprises the following steps: specifically, the method comprises the following steps: obtaining the first numerical value in the sequence of line sequence numbersIn the final ciphertext imageAll ciphertext pixel points in the line are placed on the first line of the initial ciphertext image to obtain the first line in the line sequence numberIndividual valueThe second of the final ciphertext imageAll ciphertext pixel points in the row are placed at the second position of the initial ciphertext imageIn the row direction, by analogy, all rows of the final ciphertext image are subjected to reverse inter-row scrambling according to the numerical value of the row sequence number sequence; and performing reverse inter-column scrambling on the ciphertext image subjected to reverse inter-row scrambling according to the column sequence number sequence, wherein the reverse inter-column scrambling specifically comprises the following steps: obtaining the first value in the sequence of column sequence numbersThe first of the ciphertext imageAll ciphertext pixels in the column are placed at the first of the initial ciphertext imageAOn the column, the second in the column sequence is obtainedIndividual valueThe first of the ciphertext imageAll ciphertext pixels in the column are placed at the second of the initial ciphertext imageAnd in the column, performing reverse-row scrambling on all columns of the ciphertext image subjected to reverse-row scrambling according to the numerical value of the column sequence number sequence, and marking the image subjected to reverse scrambling as an initial ciphertext image subjected to reverse scrambling of the ciphertext image.
The formula for calculating the gray value of the plaintext pixel points in the first line is as follows:
in the formula (I), the compound is shown in the specification,first line of the original ciphertext imageGray values of the column ciphertext pixel points;
representing the first line in a plaintext imageArranging gray values of the plaintext pixel points;
presetting a gray threshold value to be 256;
it should be noted that when the integer value is the first in the sequenceIndividual valueLess than the first line of the plaintext imageGrey value of plaintext pixel of columnIn the process, the gray values of the plaintext pixel points and the ciphertext pixel points are both the gray valuesAnd is, therefore,is greater than 0, inI.e. when the first in a sequence of integer valuesIndividual valueLess than the first line of the initial ciphertext imageGray value of ciphertext pixel of columnIn time, the calculation formula of the gray value of the ciphertext pixel point is as follows:then, the calculation formula of the gray value of the plaintext pixel point in the first line is:(ii) a When the first in the sequence of integer valuesIndividual valueNot less than the first line of the plaintext imageGrey value of plaintext pixel of columnIn the process, the gray values of the plaintext pixel points and the ciphertext pixel points are both the gray valuesIs not a whole number between, and therefore,not greater than 0, thus, inI.e. when the first in a sequence of integer valuesIndividual valueNot less than the first line of the initial ciphertext imageGray value of ciphertext pixel of columnTime, due to the gray value of the ciphertext pixelThe calculation formula of (2) is as follows:then, the calculation formula of the plaintext is:therefore, the gray value of the pixel point in the first line of the plaintext image is obtained according to the formula.
Starting from the gray value of the plaintext pixel points in the second row, calculating formulas of the gray values of the plaintext pixel points in all rows and all columns:
in the formula (I), the compound is shown in the specification,representing the original ciphertext imageGo to the firstGray values of ciphertext pixel points of the columns;
representing the original ciphertext imageGo to the firstGray values of ciphertext pixel points of the columns;
representing the first of a sequence of integer valuesA value of one integer and a value of oneGo to the firstThe target value obtained by the gray value XOR operation of the ciphertext pixel points of the column;
wherein a target value is calculatedThe method specifically comprises the following steps: respectively dividing the first of the sequence of integer valuesIndividual valueAnd the second of the initial ciphertext imageGo to the firstGray value of ciphertext pixel of columnConverting to corresponding 8-bit binary number, and converting the second integer in the integer value sequenceIndividual valueEach bit of the 8-bit binary number and the second bit of the initial ciphertext imageGo to the firstGray value of ciphertext pixel of columnWherein if two values of the corresponding positions are different, i.e. one is 1 and the other is 0, the XOR result is 1, if the two values are the same, i.e. both are 1 or both are 0, the XOR result is 0, then the result of the XOR operation is converted into a decimal number, which is the target value。
Note that the target value of the result of the exclusive OR operation isIs smaller than that of the plaintext imageGo to the firstGrey value of plaintext pixel of columnTime, gray value of cipher text pixelThe calculation formula of (2) is as follows:since the gray values of both plaintext pixel points and ciphertext pixel points are the gray valuesAnd is, therefore,greater than 0, therefore, inI.e. when the result of the XOR operationLess than the original ciphertext imageGo to the firstCiphertext of a columnGray value of pixel pointTime, due to the gray value of the ciphertext pixelThe calculation formula of (2) is as follows:then, the calculation formula of the gray value of the plaintext pixel point is:(ii) a When the result of the XOR operationNot less than that of the plain text imageGo to the firstGray value of plaintext pixel point of columnTime, gray value of cipher text pixelThe calculation formula of (c) is:since the gray values of the plaintext pixel points and the ciphertext pixel points are both gray valuesAnd is, therefore,not greater than 0, inI.e. when the result of the XOR operationNot less than the first of the initial ciphertext imageGo to the firstGray value of ciphertext pixel of columnTime, due to the gray value of the ciphertext pixelThe calculation formula of (c) is:then, the calculation formula of the gray value of the plaintext pixel point is:and calculating the gray values of the plaintext pixel points of all the rows and all the columns to obtain the plaintext image from the gray value of the plaintext pixel point of the second row according to the calculation formula of the gray value of the plaintext pixel point, so that the plaintext image is restored.
The invention relates to a management method of monitoring data of fertilizer production, which establishes a relation between gray values of pixel points of a plaintext image and gray values of pixel points of a ciphertext through a set first key, changes the gray distribution of the pixel points of the plaintext according to the relation between the gray values of the pixel points of the plaintext image and the pixel points of the ciphertext to obtain an initial ciphertext image, enables the gray histogram of the ciphertext image to be different from the gray histogram of the plaintext image, enhances the relevance between the pixel points of the ciphertext in the initial ciphertext image and the relevance between all the ciphertext pixel points and the first key, so that the statistical property of the image is broken through the change, the statistical analysis attack of an attacker is resisted, then the initial ciphertext image is subjected to column scrambling and row scrambling, the position information of the ciphertext pixel points in the initial ciphertext image is damaged, even if the attacker knows a safe storage method, the attacker cannot acquire the relation between the gray values of the pixel points of the ciphertext image and the pixel points of the ciphertext image, namely cannot acquire the relation between the first key and the pixel points of the ciphertext image, and further realize the safe storage of the monitoring data.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.
Claims (9)
1. A management method for monitoring data of fertilizer production is characterized by comprising the following steps:
acquiring monitoring data during fertilizer production;
taking each frame of image of the monitoring data as a plaintext image, setting an integer value sequence with the length same as the number of columns of the plaintext image according to the gray value range, namely randomly selecting an integer value from the gray value range for multiple times, and arranging the integer values selected each time according to the selection sequence to obtain the integer value sequence which is used as a first key;
acquiring a first difference value between the gray value of each plaintext pixel point in the plaintext image and a preset gray threshold value, and acquiring a second difference value between the integer value of the same column as the plaintext pixel point in the integer value sequence and the gray value of the corresponding column of the ciphertext pixel point, wherein the first difference value is equal to the second difference value;
when the gray value of each column of the plaintext pixel points in the first row in the plaintext image is greater than or equal to the integer value of the corresponding column in the integer value sequence, taking the difference value of the gray value of the plaintext pixel points in the column of the first row and the integer value of the gray value of the plaintext pixel points in the first row as the gray value of the ciphertext pixel points in the corresponding row and column;
when the gray value of each column of plaintext pixel points in a first row in the plaintext image is smaller than the integer value of the corresponding column in the integer value sequence, acquiring the gray values of the ciphertext pixel points in the corresponding row and column according to the second difference value and the first difference value, and acquiring the gray values of all the ciphertext pixel points in the first row;
starting from the gray value of the second line of ciphertext pixel points, carrying out XOR operation on the gray value of the corresponding line of ciphertext pixel points in the previous line of each line of ciphertext pixel points and the integer value of the corresponding line in the integer value sequence to obtain a target value;
when the target value is larger than or equal to the gray value of the plaintext pixel points of the corresponding row and column, taking the difference value of the target value and the gray value of the plaintext pixel points of the corresponding row and column as the gray value of the ciphertext pixel points of the corresponding row and column;
when the target value is smaller than the gray value of the plaintext pixel points of the corresponding row and the corresponding column, taking the difference value between the target value and the first difference value as the gray value of the ciphertext pixel points of the corresponding row and the corresponding column, and so on to obtain the gray values of all the ciphertext pixel points and obtain an initial ciphertext image, and storing the initial ciphertext image and the first key;
and scrambling the position of the initial ciphertext image according to the chaotic mapping model to obtain a final ciphertext image.
2. The method for managing the fertilizer production monitoring data as claimed in claim 1, wherein the step of scrambling the position of the initial ciphertext image according to the chaotic mapping model to obtain the final ciphertext image comprises:
respectively acquiring a first chaotic sequence with the length equal to the length of a plaintext image, a second chaotic sequence with the length equal to the width of the plaintext image and a second key according to the chaotic mapping model;
obtaining a row sequence number sequence according to the variable step length Joseph traversal and the first chaotic sequence, and obtaining a column sequence number sequence according to the variable step length Joseph traversal and the second chaotic sequence;
and sequentially carrying out corresponding inter-row replacement and inter-column replacement on the initial ciphertext image according to the row sequence number sequence and the column sequence number sequence to obtain a scrambled ciphertext image, wherein the scrambled ciphertext image is the final ciphertext image, and storing the final ciphertext image and the second secret key.
3. The method for managing the fertilizer production monitoring data according to claim 2, wherein the step of respectively obtaining the first chaotic sequence with the length equal to the length of the plaintext image, the second chaotic sequence with the length equal to the width of the plaintext image and the second key according to the chaotic mapping model comprises the steps of:
setting the value range of each chaotic parameter of the chaotic mapping model and the value ranges of the initial x component and the initial y component;
randomly selecting a value corresponding to each chaotic parameter from the value range of the chaotic parameter as each chaotic parameter value, and randomly selecting a corresponding initial x component and an initial y component from the value ranges of the initial x component and the initial y component;
taking each chaotic parameter value, the initial x component and the initial y component as second keys;
setting iteration times of the chaotic mapping model, inputting all chaotic parameter values, an initial x component and an initial y component into the chaotic mapping model for calculation, and obtaining an x component and a y component corresponding to each iteration;
selecting the same number of continuous x components as the number of pixel points of the plaintext image row to obtain a first group of sequences, and selecting the same number of continuous y components as the number of pixel points of the plaintext image row to obtain a second group of sequences;
multiplying each x component in the first group of sequences by the number of pixel points, rounding to obtain a first chaotic sequence;
and multiplying each x component in the second group of sequences by the number of the row pixel points, and rounding to obtain a second chaotic sequence.
4. The method of claim 2, wherein the step of obtaining the row sequence number sequence according to the variable step length Josephson traversal and the first chaotic sequence and the step of obtaining the column sequence number sequence according to the variable step length Josephson traversal and the second chaotic sequence comprises:
obtaining the ratio of the first x component in the first chaotic sequence to the total number of the components in the first chaotic sequence, and obtaining a first remainder by remainder;
taking an x component value corresponding to the first remainder in the first chaotic sequence as a first row serial number of the column serial number sequence;
obtaining the ratio of the second x component in the first chaotic sequence to the total number of the components in the first chaotic sequence minus 1, and obtaining a second remainder by taking the remainder;
taking the x component value corresponding to the second remainder in the first chaotic sequence as a second row sequence number of the column sequence number;
by analogy, all row sequence numbers and row sequence number sequences are obtained;
similarly, the column sequence number sequence is obtained according to the way of obtaining the row sequence number sequence.
5. The method for managing the fertilizer production monitoring data as claimed in claim 2, wherein the step of sequentially performing corresponding inter-row permutation and inter-column permutation on the initial ciphertext image according to the row sequence number sequence and the column sequence number sequence to obtain the scrambled ciphertext image comprises:
numbering all pixel rows of the initial ciphertext image from top to bottom, and numbering all pixel columns of the initial ciphertext image from left to right to obtain a corresponding pixel row numbering sequence and a corresponding pixel column numbering sequence;
and replacing the pixel points corresponding to the pixel row number sequence of the initial ciphertext image to the positions corresponding to the row number sequence, and replacing the pixel points corresponding to the pixel column number sequence of the initial ciphertext image to the positions corresponding to the column number sequence to obtain the scrambled ciphertext image.
6. The method for managing the fertilizer production monitoring data of claim 5, wherein the step of replacing the pixel points corresponding to the pixel row number sequence of the initial ciphertext image to the positions corresponding to the row number sequence and the pixel points corresponding to the pixel column number sequence of the initial ciphertext image to the positions corresponding to the column number sequence to obtain the scrambled ciphertext image comprises:
acquiring a first row serial number in a row serial number sequence, placing all ciphertext pixel points in a 1 st row in a pixel row serial number sequence of an initial ciphertext image on a row corresponding to the first row serial number of the initial ciphertext image, and so on, and realizing the row-to-row scrambling of all rows of the initial ciphertext image according to the row serial number of the row serial number sequence;
in the same way, the original ciphertext image after line scrambling is subjected to column scrambling according to a line scrambling mode to obtain a scrambled ciphertext image.
7. The method for managing fertilizer production monitoring data of claim 1, wherein the step of performing an exclusive or operation on the gray values of the corresponding columns of ciphertext pixels of the previous row of ciphertext pixels and the integer values of the corresponding columns of the sequence of integer values to obtain the target value comprises:
respectively converting the gray value of the ciphertext pixel point of the corresponding column in the previous line in the ciphertext pixel points and the integer value of the corresponding column in the integer value sequence into corresponding 8-bit binary numbers;
performing an exclusive-or operation on each digit in one 8-bit binary number and each digit in the other 8-bit binary number;
if the two values subjected to the XOR operation are different, namely one is 1 and the other is 0, the XOR result is 1;
if the two values subjected to the exclusive-or operation are the same, namely both are 1 or both are 0, the exclusive-or result is 0;
and then converting the result of the exclusive-or operation into a decimal number, wherein the decimal number is the target value.
8. The method for managing fertilizer production monitoring data as recited in claim 1, wherein the predetermined gray level threshold value is 256.
9. The method for managing fertilizer production monitoring data of claim 1, further comprising decrypting the final ciphertext image, the decrypting step comprising:
performing inverse scrambling on the final ciphertext image by using a chaotic mapping model to obtain an initial ciphertext image;
obtaining the gray value of the plaintext pixel points in the corresponding column of the first row of the plaintext image according to the gray value of each column of ciphertext pixel points in the first row of the initial ciphertext image and the integer value of the corresponding column in the first key, wherein when the integer value of the corresponding column is smaller than the gray value of the ciphertext pixel points, the gray value of the plaintext pixel points in the corresponding column is obtained by adding the difference value of the integer value of the corresponding column and the gray value of the ciphertext pixel points to a preset gray threshold value, and the preset gray threshold value is used as the gray value of the plaintext pixel points in the corresponding column of the first row; when the integer value of the corresponding column is larger than or equal to the gray value of the ciphertext pixel point, taking the difference value of the integer value of the corresponding column and the gray value of the ciphertext pixel point as the gray value of the plaintext pixel point of the corresponding column of the first row;
starting from the gray value of the plaintext pixel points of the second row, carrying out XOR operation on the gray value of the corresponding column of ciphertext pixel points in the previous row of the ciphertext pixel points of each row and the integer value of the corresponding column in the integer value sequence to obtain a target value;
when the target value is greater than or equal to the gray value of the ciphertext pixel point of the corresponding row and column, taking the difference value of the target value and the gray value of the ciphertext pixel point of the corresponding row and column as the gray value of the plaintext pixel point of the corresponding row and column;
and when the target value is smaller than the gray value of the ciphertext pixel points of the corresponding row and the corresponding column, taking the difference value of the target value and the first difference value as the gray value of the plaintext pixel points of the corresponding row and the corresponding column, and so on to obtain the gray values of the plaintext pixel points of all rows and all columns and obtain the plaintext image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211243812.XA CN115314600B (en) | 2022-10-12 | 2022-10-12 | Chemical fertilizer production monitoring data management method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211243812.XA CN115314600B (en) | 2022-10-12 | 2022-10-12 | Chemical fertilizer production monitoring data management method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115314600A CN115314600A (en) | 2022-11-08 |
CN115314600B true CN115314600B (en) | 2023-01-24 |
Family
ID=83868436
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211243812.XA Active CN115314600B (en) | 2022-10-12 | 2022-10-12 | Chemical fertilizer production monitoring data management method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115314600B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115719300B (en) * | 2023-01-09 | 2023-05-12 | 浙江出海云技术有限公司 | Personnel information management method for big data |
CN115987485B (en) * | 2023-03-20 | 2023-05-23 | 聊城高级财经职业学校 | Hydraulic model data processing method |
CN116226471B (en) * | 2023-05-10 | 2023-07-25 | 济宁蜗牛软件科技有限公司 | Data storage method for homeland resource planning |
CN116305222B (en) * | 2023-05-22 | 2023-09-05 | 武汉惠强新能源材料科技有限公司 | Intelligent regulation and control method for safety authority of lithium battery diaphragm production data |
CN116644457B (en) * | 2023-07-21 | 2023-09-29 | 中珀(北京)新材料科技有限公司 | Production data encryption method of internal microgel fluorine-silicon self-crosslinking coating |
Citations (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102609893A (en) * | 2012-01-13 | 2012-07-25 | 航天科工深圳(集团)有限公司 | Digital image encrypting and decrypting method |
CN104766264A (en) * | 2015-01-22 | 2015-07-08 | 西北工业大学 | Partitioning double-layer self-adaptation diffusion image encryption method |
CN105046161A (en) * | 2015-07-29 | 2015-11-11 | 河南大学 | DNA dynamic coding based colored image encryption method |
CN107220923A (en) * | 2017-02-14 | 2017-09-29 | 陕西师范大学 | Digital picture feedback encryption method based on image network |
CN107610034A (en) * | 2017-09-06 | 2018-01-19 | 贵州航天计量测试技术研究所 | Image encryption method based on chaos system and the reversible cellular automaton of two dimension |
CN107633175A (en) * | 2017-09-14 | 2018-01-26 | 交通运输部水运科学研究所 | A kind of fast colourful image encryption method based on chaos |
CN107819580A (en) * | 2017-11-21 | 2018-03-20 | 北京工业大学 | A kind of image encryption method based on the association of hyperchaotic system Pixel Information |
CN108133448A (en) * | 2016-12-01 | 2018-06-08 | 钦州市晶通科技有限公司 | A kind of chaos encryption algorithm of pixel value double replacement and location of pixels |
CN108199828A (en) * | 2018-02-08 | 2018-06-22 | 广东工业大学 | A kind of color image Encryption Algorithm and device |
CN108319859A (en) * | 2018-01-15 | 2018-07-24 | 西北工业大学 | A kind of grade synchronizes scramble diffusion and Pixel-level annular diffusion image encryption method |
CN109102452A (en) * | 2018-07-28 | 2018-12-28 | 河南大学 | A kind of image encryption method based on Latin square scramble and directional diffusion |
CN110086601A (en) * | 2019-04-28 | 2019-08-02 | 郑州轻工业学院 | Based on the associated Josephus traversing of pixel value and hyperchaotic system image encryption method |
CN110430036A (en) * | 2019-07-05 | 2019-11-08 | 云南大学 | A kind of RGB color image encryption method based on poor chaotic maps |
CN111327900A (en) * | 2020-01-21 | 2020-06-23 | 河南大学 | Color image encryption method based on compressed sensing and deformation coupling mapping grid |
CN111614455A (en) * | 2020-04-30 | 2020-09-01 | 河南大学 | Color image compression encryption method based on two-dimensional compression sensing and memristor chaotic system |
AU2020103541A4 (en) * | 2020-11-19 | 2021-02-04 | Southwest University | A signal compression and encryption method based on coupled circuit |
CN113486365A (en) * | 2021-05-31 | 2021-10-08 | 桂林电子科技大学 | Color image optical encryption method |
CN113889232A (en) * | 2021-10-19 | 2022-01-04 | 南京工程学院 | Privacy protection method based on medical image |
WO2022077793A1 (en) * | 2020-10-16 | 2022-04-21 | 齐鲁工业大学 | Image encryption communication algorithm based on two-dimensional lag-complex logistic mapping, and image decryption communication algorithm based on two-dimensional lag-complex logistic mapping |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8442221B2 (en) * | 2005-09-30 | 2013-05-14 | Konica Minolta Laboratory U.S.A., Inc. | Method and apparatus for image encryption and embedding and related applications |
CN106452723B (en) * | 2016-12-13 | 2017-05-31 | 深圳市全同态科技有限公司 | Fully homomorphic encryption processing method based on modular operation |
CN108989604B (en) * | 2018-07-20 | 2020-05-05 | 京东方科技集团股份有限公司 | Image encryption method, image transmission method, electronic device and readable storage medium |
CN110430435B (en) * | 2019-08-09 | 2022-04-19 | 广东工业大学 | Image encryption method and device, sensor and readable storage medium |
-
2022
- 2022-10-12 CN CN202211243812.XA patent/CN115314600B/en active Active
Patent Citations (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102609893A (en) * | 2012-01-13 | 2012-07-25 | 航天科工深圳(集团)有限公司 | Digital image encrypting and decrypting method |
CN104766264A (en) * | 2015-01-22 | 2015-07-08 | 西北工业大学 | Partitioning double-layer self-adaptation diffusion image encryption method |
CN105046161A (en) * | 2015-07-29 | 2015-11-11 | 河南大学 | DNA dynamic coding based colored image encryption method |
CN108133448A (en) * | 2016-12-01 | 2018-06-08 | 钦州市晶通科技有限公司 | A kind of chaos encryption algorithm of pixel value double replacement and location of pixels |
CN107220923A (en) * | 2017-02-14 | 2017-09-29 | 陕西师范大学 | Digital picture feedback encryption method based on image network |
CN107610034A (en) * | 2017-09-06 | 2018-01-19 | 贵州航天计量测试技术研究所 | Image encryption method based on chaos system and the reversible cellular automaton of two dimension |
CN107633175A (en) * | 2017-09-14 | 2018-01-26 | 交通运输部水运科学研究所 | A kind of fast colourful image encryption method based on chaos |
CN107819580A (en) * | 2017-11-21 | 2018-03-20 | 北京工业大学 | A kind of image encryption method based on the association of hyperchaotic system Pixel Information |
CN108319859A (en) * | 2018-01-15 | 2018-07-24 | 西北工业大学 | A kind of grade synchronizes scramble diffusion and Pixel-level annular diffusion image encryption method |
CN108199828A (en) * | 2018-02-08 | 2018-06-22 | 广东工业大学 | A kind of color image Encryption Algorithm and device |
CN109102452A (en) * | 2018-07-28 | 2018-12-28 | 河南大学 | A kind of image encryption method based on Latin square scramble and directional diffusion |
CN110086601A (en) * | 2019-04-28 | 2019-08-02 | 郑州轻工业学院 | Based on the associated Josephus traversing of pixel value and hyperchaotic system image encryption method |
CN110430036A (en) * | 2019-07-05 | 2019-11-08 | 云南大学 | A kind of RGB color image encryption method based on poor chaotic maps |
CN111327900A (en) * | 2020-01-21 | 2020-06-23 | 河南大学 | Color image encryption method based on compressed sensing and deformation coupling mapping grid |
CN111614455A (en) * | 2020-04-30 | 2020-09-01 | 河南大学 | Color image compression encryption method based on two-dimensional compression sensing and memristor chaotic system |
WO2022077793A1 (en) * | 2020-10-16 | 2022-04-21 | 齐鲁工业大学 | Image encryption communication algorithm based on two-dimensional lag-complex logistic mapping, and image decryption communication algorithm based on two-dimensional lag-complex logistic mapping |
AU2020103541A4 (en) * | 2020-11-19 | 2021-02-04 | Southwest University | A signal compression and encryption method based on coupled circuit |
CN113486365A (en) * | 2021-05-31 | 2021-10-08 | 桂林电子科技大学 | Color image optical encryption method |
CN113889232A (en) * | 2021-10-19 | 2022-01-04 | 南京工程学院 | Privacy protection method based on medical image |
Non-Patent Citations (2)
Title |
---|
基于像素置乱和比特替换的混沌图像加密算法;谢国波等;《微电子学与计算机》;20161231(第03期);全文 * |
基于超混沌序列和位平面置乱的图像加密算法;林振荣等;《南昌大学学报(工科版)》;20170628(第02期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN115314600A (en) | 2022-11-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115314600B (en) | Chemical fertilizer production monitoring data management method | |
CN110086601B (en) | Joseph traversal and hyperchaotic system image encryption method based on pixel value association | |
CN109660696B (en) | New image encryption method | |
CN113297606B (en) | Color quantum image encryption and decryption method based on multiple chaos and DNA operation | |
CN109800585B (en) | Image interpolation space completely reversible separable ciphertext domain information hiding algorithm | |
CN110086600B (en) | Image encryption method based on hyperchaotic system and variable step length Joseph problem | |
CN107292184B (en) | Image encryption method, device and key stream generating method and key stream generator | |
CN107392970B (en) | Digital image encryption method based on bit plane and high-dimensional chaotic system | |
CN115567186A (en) | Chaos-optimized depth window scrambling encryption method | |
CN112084514A (en) | Image encryption method and device for chaos sequence and DNA mutation | |
CN115694784A (en) | Data safety storage method | |
CN112116672B (en) | Color image preservation thumbnail encryption algorithm based on genetic algorithm | |
CN110572252A (en) | image encryption and decryption method based on fractional order translation chaotic system | |
CN115659409A (en) | Financial asset transaction data safe storage method | |
CN115766962A (en) | Multi-key image encryption method based on five-dimensional conservative hyperchaotic system | |
CN112153238A (en) | Image encryption method based on Tent mapping and composite chaotic mapping | |
CN115664630A (en) | Network security communication method | |
Nayak et al. | A secure and efficient color image encryption scheme based on two chaotic systems and advanced encryption standard | |
CN113691362B (en) | Bit plane image compression encryption method based on hyperchaotic system and DNA coding | |
CN114374775A (en) | Image encryption method based on Julia set and DNA coding | |
CN116071164B (en) | Digital asset tracing method based on blockchain management | |
CN116707754A (en) | Digital image encryption method based on five-dimensional non-balance point hyperchaos | |
CN115580687B (en) | Multi-image encryption method based on variable parameter hyperchaotic system and S-shaped diffusion | |
CN115311118A (en) | Remote sensing image encryption method based on two-dimensional discrete memristor hyperchaotic mapping | |
CN113077374A (en) | Color image encryption method based on new 4-dimensional hyperchaos and DNA random coding calculation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |