CN115861034B - Wireless routing data intelligent management system - Google Patents
Wireless routing data intelligent management system Download PDFInfo
- Publication number
- CN115861034B CN115861034B CN202310133346.8A CN202310133346A CN115861034B CN 115861034 B CN115861034 B CN 115861034B CN 202310133346 A CN202310133346 A CN 202310133346A CN 115861034 B CN115861034 B CN 115861034B
- Authority
- CN
- China
- Prior art keywords
- value
- image
- threshold
- segmentation
- scanning
- 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
- 230000011218 segmentation Effects 0.000 claims abstract description 114
- 239000011159 matrix material Substances 0.000 claims abstract description 113
- 238000012216 screening Methods 0.000 claims abstract description 16
- 238000012545 processing Methods 0.000 claims abstract description 12
- 238000010276 construction Methods 0.000 claims abstract description 11
- 108091026890 Coding region Proteins 0.000 claims description 21
- 238000000034 method Methods 0.000 claims description 18
- 238000004364 calculation method Methods 0.000 claims description 14
- 238000013507 mapping Methods 0.000 claims description 9
- 230000000694 effects Effects 0.000 abstract description 21
- 238000006243 chemical reaction Methods 0.000 description 9
- 238000010606 normalization Methods 0.000 description 6
- 238000007781 pre-processing Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
Images
Classifications
-
- 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
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Image Processing (AREA)
Abstract
The invention relates to the technical field of data encryption, in particular to an intelligent management system for wireless routing data. The data processing module in the system is used for constructing a two-dimensional matrix and a two-dimensional gray matrix image by data information; the threshold acquisition module is used for screening a plurality of segmentation thresholds from preset thresholds, and segmenting the two-dimensional gray matrix image to obtain a segmented image; the threshold screening module is used for selecting an optimal threshold from the segmentation threshold and segmenting the two-dimensional gray matrix image based on the optimal threshold to obtain a target segmentation image; the encryption storage module is used for scanning pixel points in the target segmentation image based on the optimal scanning rule to obtain a ciphertext, taking the construction parameters of the optimal scanning rule and the two-dimensional matrix as a secret key, and storing data information based on the ciphertext and the secret key. According to the invention, the optimal scanning rule is selected for scrambling the obtained optimal target segmentation image, so that the effect better than that of the traditional scrambling operation is achieved, and the intelligent management of the wireless routing data is completed.
Description
Technical Field
The invention relates to the technical field of data encryption, in particular to an intelligent management system for wireless routing data.
Background
The wireless router is used for surfing the Internet of a user and has a wireless coverage function; it can be regarded as a repeater which forwards broadband network signals received from the home wall to nearby wireless network devices via the antenna; wireless routers are widely used and popular, which facilitate surfing and eating by common people, but at the same time, there is a lot of data information in wireless local area networks. Many of the data relate to a great deal of privacy of company units or individuals, and if the data information is not effectively encrypted, the data is easily attacked and stolen by a network hacker, so that the privacy and the security of the data are difficult to ensure.
The current common method for encrypting the data is to use scrambling encryption, and complete encryption by changing the position information of time sequence data, but the scrambling effect of the data obtained by the method cannot be estimated; the scrambling sequence and the original data sequence have the conditions of larger similarity and smaller variability, so that the privacy and encryption effect of the data are not guaranteed.
Disclosure of Invention
In order to solve the technical problem that the privacy and encryption effect of data cannot be guaranteed by using conventional scrambling encryption, the invention aims to provide a wireless routing data intelligent management system, which comprises the following modules:
the data processing module is used for converting each data information into decimal numbers; constructing a two-dimensional matrix and a corresponding two-dimensional gray matrix image by decimal numbers;
the threshold value acquisition module is used for taking the normalized gray value of each pixel point in the two-dimensional gray matrix image as a preset threshold value; calculating a threshold selection standard according to the difference between the preset threshold and the preset gray value; selecting a preferred preset threshold according to a threshold selection standard; selecting preset thresholds with adjacent sizes as starting points by taking the optimal preset thresholds as segmentation thresholds, and segmenting the two-dimensional gray matrix image to obtain at least two segmented images;
the threshold screening module is used for acquiring the number of connected domains of the connected domains formed by the pixel points with different pixel values in the segmented image; calculating the approximation degree of the segmented image according to the difference between the number of the connected domains corresponding to the pixel points with different pixel values; calculating a segmentation standard according to the number and the approximation degree of the connected domains in the segmented image; selecting an optimal threshold from the segmentation thresholds based on the segmentation criteria; dividing the two-dimensional gray matrix image based on the optimal threshold value to obtain a target divided image;
the encryption storage module is used for scanning the target segmentation image by adopting different scanning rules and screening out the optimal scanning rules; based on an optimal scanning rule, scanning pixel points in the target segmentation image, and extracting decimal numbers corresponding to the pixel points to serve as ciphertext; and taking the optimal scanning rule and the construction parameters of the two-dimensional matrix as keys, and storing data information based on the ciphertext and the keys.
Preferably, the constructing the two-dimensional matrix and the corresponding two-dimensional gray matrix image from the decimal numbers includes:
sequentially placing decimal numbers corresponding to all data information in a two-dimensional matrix according to the sequence of the data information, wherein the two-dimensional matrix is a two-dimensional matrix constructed by decimal numbers; the construction parameters of the two-dimensional matrix are the length and the width of the two-dimensional matrix;
and taking each element in the two-dimensional matrix as a pixel value of a pixel point on the image, and constructing a two-dimensional gray matrix image corresponding to the two-dimensional matrix.
Preferably, the calculating the threshold selection criterion according to the difference between the preset threshold and the preset gray value includes:
calculating an absolute value of a difference value between a preset threshold value and a preset gray value as a first absolute value; and carrying out negative correlation mapping on the first absolute value, and taking the obtained result value as a threshold selection standard.
Preferably, the acquiring the number of connected domains of the connected domains formed by the pixel points with different pixel values in the segmented image includes:
the segmentation image is a binary image; the number of connected domains comprises a first number of connected domains and a second number of connected domains;
acquiring the number of connected domains formed by pixel points with pixel values of 1 in the segmented image as the number of first connected domains;
the number of connected domains formed by pixel points with the pixel value of 0 in the divided image is obtained and used as the number of second connected domains.
Preferably, the calculating the approximation degree of the segmented image according to the difference between the number of connected domains corresponding to the pixel points with different pixel values includes:
calculating the ratio of the number of the first communicating domains to the number of the second communicating domains as the communicating domain number ratio;
calculating the absolute value of the difference value between the number ratio of the connected domains and a preset first threshold value as the difference degree; and carrying out negative correlation mapping on the difference degree, and taking the obtained result value as the approximation degree of the segmented image.
Preferably, the calculating the segmentation standard according to the number of connected domains and the approximation degree in the segmented image includes:
and carrying out weighted average calculation on the normalized number of the connected domains and the approximation degree, and taking the obtained result value as a segmentation standard.
Preferably, the scanning the target segmented image with different scanning rules, and screening out the optimal scanning rules includes:
scanning the target segmentation image by utilizing a raster scanning rule to obtain a corresponding coding sequence as a first coding sequence;
scanning the target segmentation image by at least two scanning rules except the raster scanning rules respectively to obtain a corresponding coding sequence as a second coding sequence;
obtaining a scanning rule value according to the difference of the coding values at the same position in the first coding sequence and the second coding sequence; and taking the scanning rule corresponding to the maximum scanning rule value as the optimal scanning rule.
Preferably, the obtaining the scan rule value according to the difference of the code values at the same position in the first code sequence and the second code sequence includes:
calculating the absolute value of the difference value of the coded values at the same position in the first coded sequence and the second coded sequence as a second absolute value; the sum of the second absolute values corresponding to the coded values is used as an initial rule value; and taking the normalized initial rule value as a scanning rule value.
Preferably, the selecting the preferred preset threshold according to the threshold selection criteria includes:
and selecting a preset threshold corresponding to the maximum threshold selection standard as a preferable preset threshold.
Preferably, the selecting an optimal threshold from the segmentation thresholds based on the segmentation criteria includes:
and obtaining a corresponding segmentation threshold value when the segmentation standard is closest to a preset second threshold value, and taking the segmentation threshold value as an optimal threshold value.
The embodiment of the invention has at least the following beneficial effects:
the data processing module in the system is used for converting each data information into decimal numbers, constructing a two-dimensional matrix and a corresponding two-dimensional gray matrix image, converting the data information into the two-dimensional gray matrix image, and dividing the image by analyzing the image data and then selecting a proper threshold value to complete the subsequent encryption process. The threshold acquisition module is used for selecting a preferred preset threshold from preset thresholds; the preset threshold values of adjacent sizes are selected by taking the optimal preset threshold value as a starting point and are respectively used as segmentation threshold values, the two-dimensional gray matrix image is segmented to obtain at least two segmented images, the final optimal threshold value is close to the optimal preset threshold value, namely, the optimal threshold value is used as a basis to obtain a plurality of segmentation threshold values, the subsequent adjustment is facilitated, the optimal threshold value is obtained, and compared with a method that all the preset threshold values are directly used as the segmentation threshold values, a large amount of calculation amount is reduced. The threshold screening module is used for acquiring the number of connected domains in the segmented image; calculating the approximation degree of the segmented image according to the difference between the number of the connected domains corresponding to the pixel points with different pixel values; calculating a segmentation standard according to the number and the approximation degree of the connected domains in the segmented image; based on the segmentation standard, an optimal threshold is selected from the segmentation threshold, the segmentation standard is obtained according to the number characteristics of the connected domains in the segmented image and the difference characteristics between the number of the connected domains formed by the pixel points with different pixel values, and the optimal threshold is screened out, so that the aim of obtaining the best segmentation effect is achieved, the connected domains are dispersed as much as possible, the number of the connected domains with different types is similar as much as possible, and a better segmentation effect is achieved. Dividing the two-dimensional gray matrix image based on the optimal threshold value to obtain a target divided image, wherein the target divided image has better dividing effect than other divided images, and the different data can be selected in a personalized and self-adaptive way by analyzing the data and selecting the proper optimal threshold value for dividing; the encryption storage module is used for scanning the target segmentation image by adopting different scanning rules and screening out the optimal scanning rules; based on an optimal scanning rule, scanning pixel points in the target segmentation image, and extracting decimal numbers corresponding to the pixel points to serve as ciphertext; and taking the optimal scanning rule and the construction parameters of the two-dimensional matrix as keys, storing data information based on the ciphertext and the keys, selecting the optimal scanning rule to scan the target segmentation image, extracting the ciphertext based on the target segmentation image with the best segmentation effect, acquiring the keys, realizing stronger scrambling stability, and ensuring the front-rear variability of encryption and the encryption effect. The invention converts the value of wireless route data into gray scale interval by carrying out binary conversion and preprocessing, thereby constructing a two-dimensional gray scale matrix image of the data, and selecting a proper threshold value for segmentation by analyzing the data; and the optimal scanning rule is selected for scrambling the obtained target segmented image, so that the maximization of the difference between the processed matrix and the original two-dimensional matrix is ensured to the greatest extent, the effect better than that of the traditional scrambling operation is achieved, and the intelligent management of the wireless route data is completed.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a system block diagram of a wireless routing data intelligent management system according to an embodiment of the present invention;
fig. 2 is a two-dimensional gray matrix image converted from a two-dimensional matrix to a gray image according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purpose, the following detailed description refers to specific implementation, structure, features and effects of a wireless routing data intelligent management system according to the present invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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.
The embodiment of the invention provides a specific implementation method of a wireless routing data intelligent management system, which is suitable for a data intelligent management scene. The encryption of wireless routing data is realized in the scene. The method aims to solve the technical problem that the privacy and encryption effect of data cannot be guaranteed when conventional scrambling encryption is used. The invention converts the value of wireless route data into gray scale interval by carrying out binary conversion and preprocessing, thereby constructing a two-dimensional gray scale matrix image of the data, and selecting a proper threshold value for segmentation by analyzing the data; and the optimal scanning rule is selected for scrambling the obtained target segmented image, so that the maximization of the difference between the processed matrix and the original matrix is ensured to the greatest extent, the effect better than that of the traditional scrambling operation is achieved, and the intelligent management of the wireless routing data is completed.
The following specifically describes a specific scheme of the wireless routing data intelligent management system provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a system block diagram of a wireless routing data intelligent management system according to an embodiment of the present invention is shown, where the system block diagram includes the following modules:
a data processing module 10 for converting each data information into a decimal number; and constructing a two-dimensional matrix and a corresponding two-dimensional gray matrix image by decimal numbers.
Firstly, preprocessing wireless route data information: because the computer can only generally identify binary data of 0 and 1 when transmitting data, the conversion operation is needed for wireless route data; the digits in the wireless routing data are directly converted into binary codes, english letters, identification symbols and the like in the wireless routing data are firstly converted into ASC codes by contrasting an ASC table, and then the obtained ASC codes are converted into the binary codes.
The binary conversion is carried out on each character or letter, and the obtained binary coding sub-segment is correspondingly stored with the original data information.
Because the value of the ASC code is greater than or equal to 64, the corresponding binary code length is 7 bits; and the binary code length corresponding to a value less than 64 is less than 7 bits; therefore, in order to normalize the length of binary codes after data conversion, the fixed length of binary code sub-segments of each character is set to be 7; the method comprises the steps that 0 supplementing operation is carried out on codes with data letters or characters ASC codes smaller than 7 bits at the first bit; for example, if the ASC code of the current character is 60, it is converted into a binary value of 111100, i.e. the code length is 6, then the number of bits added with 0 before the binary code is 1, i.e. added with one 0; a 7-bit binary code is obtained: 0111100.
the step realizes the conversion of wireless route data information into binary codes which can be operated and identified by a computer and standardizes the segment length; the coding subsections are required to be processed, so that the numerical value converted into decimal can be in the range of 0-255, a two-dimensional gray matrix image is conveniently constructed, and an optimal threshold value is selected according to the subsequently constructed two-dimensional gray matrix image to be segmented to obtain a target segmented image; the target segmentation image is a binary image, and the optimal scanning rule is selected according to the binary image characteristics to carry out scrambling operation.
The binary code subsection bit number of each data obtained by the steps is 7 bits; and the maximum value of ASC codes is 127, so that binary codes can be uniformly distributed between the range 0-255 when the binary codes are converted into decimal values, and the gray values are distributed between 0-255 when the binary codes are distributed between 0-255. Therefore, the obtained coding subsegments need to be subjected to bit increasing operation: 1 is added at the end of the 7-bit code obtained; for example, the original binary code sub-segment is 1111111; at this time, the decimal value is 127; the 8-bit binary code is 11111111 after the bit increment operation; at this time, the decimal value is converted into 255, so that the requirement of distributing the converted decimal value between 0 and 255 is met.
Respectively carrying out bit increment operation on the obtained 7-bit binary codes according to the bit increment operation mode, wherein the coding length of each subsection is 8; for example, the current binary coding sub-segment sequences are 0110111, 1011100, 1110111; the binary coding sub-segment sequence after the bit increasing treatment is as follows: 01101111, 10111001, 11101111; the sequence after bit increment is converted into decimal values as follows: 111. 185, 239.
Further, constructing a two-dimensional matrix and a corresponding two-dimensional gray matrix image by decimal numbers, specifically: and sequentially placing decimal numbers corresponding to all the data information in a two-dimensional matrix according to the sequence of the data information, wherein the two-dimensional matrix is a two-dimensional matrix constructed by decimal numbers, and constructing a two-dimensional gray matrix image corresponding to the two-dimensional matrix by taking each element in the two-dimensional matrix as a pixel value of a pixel point on the image. The decimal numbers obtained through conversion can be correspondingly stored in a numerical sequence set according to the sequence of the original binary coding sub-sections; sequentially according to the numerical sequence of the numerical sequence setThe decimal values are one row, and the values in the value sequence set are divided into +.>A row; obtaining a size of +.>Is a two-dimensional matrix of (a) and (b). The construction parameters of the two-dimensional matrix are the length a and the width b of the two-dimensional matrix. It should be noted that a and b may be equal or different, and the values of a and b are set by the practitioner according to specific data and a scene. Further, each element in the two-dimensional matrix corresponds to its binary coded sub-block, where the element is a decimal number. The two-dimensional matrix is scanned line by using a traditional raster scanning rule, and an initial decimal value sequence set can be restored. Taking each element in the constructed two-dimensional matrix as the gray value; the currently constructed two-dimensional matrix is converted into a two-dimensional gray matrix image. Referring to fig. 2, a two-dimensional gray matrix image is converted into a gray image by the constructed two-dimensional matrix.
The threshold value obtaining module 20 is configured to take the normalized gray value of each pixel point in the two-dimensional gray matrix image as a preset threshold value; calculating a threshold selection standard according to the difference between the preset threshold and the preset gray value; selecting a preferred preset threshold according to a threshold selection standard; selecting preset thresholds with adjacent sizes by taking the optimal preset threshold as a starting point, respectively serving as segmentation thresholds, and segmenting the two-dimensional gray matrix image to obtain at least two segmented images.
Further, the pixel gray value analysis is carried out on the two-dimensional gray matrix image obtained by the data processing module, and the optimal threshold value is selected to divide the two-dimensional gray matrix image. The step is only aimed at the optimal threshold selection standard of the data encryption scene, so that the number of numerical blocks on two sides in the two-dimensional gray matrix image segmented by the optimal threshold is as close as possible, and the subsequent encryption effect is ensured. Therefore, the method of adaptive threshold segmentation of the oxford or selecting the threshold by using the histogram, which is commonly used in image processing, is not suitable for the scene in the embodiment of the invention due to different segmentation purposes, and the obtained segmented image effects will be different according to different images, so that comprehensive evaluation cannot be performed. For example, the main purpose of threshold segmentation in image processing is to obtain a region of interest; the foreground area and the background area are divided, and the threshold value division is used for data encryption, so that the two divided areas are larger in discreteness and smaller in quantity difference, subsequent scanning scrambling operation is facilitated, and scrambling effect is better. Therefore, the optimal threshold value is screened out by analyzing the pixel points in the two-dimensional gray matrix image.
Firstly, taking the normalized gray value of each pixel point in the two-dimensional gray matrix image as a preset threshold value. Each pixel point corresponds to a preset threshold value, and each two-dimensional gray matrix image corresponds to a plurality of preset threshold values.
The calculation formula of the preset threshold value is as follows:
wherein,,a preset threshold corresponding to the pixel point i; />The gray value of the pixel point i; />The maximum gray value in the two-dimensional gray matrix image; />Is the minimum gray value in the two-dimensional gray matrix image.
The calculation formula of the preset threshold is a normalized gray value corresponding to the pixel point, and will not be described herein.
And calculating the normalized gray value of each pixel point in the two-dimensional gray matrix image, and performing the following calculation on the obtained preset threshold value. Calculating a threshold selection standard according to the difference between the preset threshold and the preset gray value, specifically: calculating an absolute value of a difference value between a preset threshold value and a preset gray value as a first absolute value; and carrying out negative correlation mapping on the first absolute value, and taking the obtained result value as a threshold selection standard. In the embodiment of the invention, the negative correlation mapping of the first absolute value is realized by an exponential function taking the negative first absolute value as an exponent and taking a natural constant as a base. In the embodiment of the present invention, the preset gray value is 0.5, and in other embodiments, the value is adjusted by the practitioner according to the actual situation. It should be noted that the purpose of setting the preset gray value to 0.5 is becauseIn order to normalize the gray value, the range of the value is between 0 and 1, the invention aims to center the optimal threshold value corresponding to the two-dimensional gray matrix image as far as possible, so that the separation quantity of the two separated partial areas is smaller.
The calculation formula of the threshold selection criterion is as follows:
wherein,,selecting a criterion for the threshold; />Is an exponential function based on natural constants; />A preset threshold corresponding to the pixel point i; />Is a preset gray value; />Is a first absolute value.
Wherein, exp (-x) in the calculation formula of the threshold selection standard realizes the negative correlation mapping of the first absolute value; satisfy when the first absolute valueThe closer to 0 the value of the corresponding threshold selection criterion is, the greater the value of the threshold selection criterion is, the closer to 1 the value of the threshold selection criterion is, and the first absolute value and the threshold selection criterion are in inverse relation.
Respectively calculating threshold selection criteria for preset thresholds corresponding to all pixel points in the two-dimensional gray matrix image, and selecting a preferred preset threshold from the preset thresholds according to the threshold selection criteria, specifically: and selecting a preset threshold corresponding to the maximum threshold selection standard as a preferable preset threshold. The optimal preset threshold value only represents a value with a moderate gray value in all gray value sizes existing in the current two-dimensional gray matrix image, and the possibility that the number of connected domains of black and white parts of a binary image obtained by dividing by taking the optimal preset threshold value as the threshold value is similar is theoretically high; the segmentation experiment was thus performed as a preset segmentation threshold.
After the optimal preset threshold value is obtained, selecting preset threshold values with adjacent sizes by taking the optimal preset threshold value as a starting point, and respectively serving as segmentation threshold values, and segmenting the two-dimensional gray matrix image to obtain at least two segmented images. Specific: counting the preset thresholds corresponding to the pixel points, wherein the same preset thresholds are counted only once, and sorting the preset thresholds from small to large according to the size sequence of the preset thresholds to obtain a threshold sequence, wherein repeated numerical values do not exist in the threshold sequence. Based on the threshold sequence, taking a preferable preset threshold as a starting point, and selecting preset thresholds of adjacent sizes as segmentation thresholds respectively; dividing the two-dimensional gray matrix image based on the dividing threshold value to obtain at least two divided images. The method comprises the steps of selecting preset thresholds of adjacent sizes of the two, and respectively serving as segmentation thresholds, wherein the preset thresholds are specifically: based on the preferred preset threshold value and the threshold value sequence, selecting a preset number of preset threshold values from the preferred preset threshold value to the left as a segmentation threshold value, and selecting a preset number of preset threshold values from the preferred preset threshold value to the right as a segmentation threshold value, wherein the preferred preset threshold value is also used as the segmentation threshold value. In the embodiment of the present invention, the preset number of values is 10, and in other embodiments, the value is adjusted by the practitioner according to the actual situation.
The method comprises the following steps of obtaining a preferred preset threshold, taking the preferred preset threshold as a starting point, selecting preset thresholds with adjacent sizes as segmentation thresholds respectively, and compared with the method which directly takes all the preset thresholds as the segmentation thresholds, the method has the following beneficial effects: after the preferred preset threshold value is obtained, the final optimal threshold value is close to the preferred preset threshold value, namely, the preferred preset threshold value is used as a basis to adjust the optimal threshold value, only the preset threshold value close to the preferred preset threshold value is used as a segmentation threshold value, and compared with the method that all the preset threshold values are directly used as the segmentation threshold value, a large amount of calculation amount is reduced.
Dividing the two-dimensional gray matrix image based on a dividing threshold value to obtain at least two divided images, specifically: setting the gray value of a pixel point with the gray value larger than or equal to the segmentation threshold value in the two-dimensional gray matrix image to be 1; setting the gray value of the pixel point with the gray value smaller than the segmentation threshold value in the two-dimensional gray matrix image as 0, and setting 1 to 0 to obtain a binary image which is the corresponding segmentation image.
It can also be said that the segmentation is performed according to a segmentation formula:
wherein,,for dividing the coordinates on the image into +.>Gray values of the pixels of (a); />Is a two-dimensional gray matrix image with the coordinates of +.>Gray values of the pixels of (a); />Is a segmentation threshold.
The threshold value screening module 30 is configured to obtain the number of connected domains of the connected domains formed by the pixel points with different pixel values in the segmented image; calculating the approximation degree of the segmented image according to the difference between the number of the connected domains corresponding to the pixel points with different pixel values; calculating a segmentation standard according to the number and the approximation degree of the connected domains in the segmented image; selecting an optimal threshold from the segmentation thresholds based on the segmentation criteria; and dividing the two-dimensional gray matrix image based on the optimal threshold value to obtain a target divided image.
After a plurality of segmented images are obtained, each segmented image is analyzed to screen out a segmentation threshold corresponding to the segmented image with the best effect as an optimal threshold. Specific:
for the segmented image, firstly, the number of connected domains of the connected domains formed by pixel points with different pixel values in the segmented image is obtained, and specifically: the number of connected domains includes a first number of connected domains and a second number of connected domains; acquiring the number of connected domains formed by pixel points with pixel values of 1 in the segmented image as the number of first connected domains; the number of connected domains formed by pixel points with the pixel value of 0 in the divided image is obtained and used as the number of second connected domains. That is, the number of connected domains corresponding to the divided image is the sum of the number of the first connected domains and the number of the second connected domains. The split image is a binary image.
Further, the approximation degree of the number of connected domains of the white area with the gray value of 1 and the black area with the gray value of 0 in the current segmented image is calculated, namely, the approximation degree of the segmented image is calculated according to the difference between the number of connected domains corresponding to the pixel points with different pixel values, specifically: calculating the ratio of the number of the first communicating domains to the number of the second communicating domains as the communicating domain number ratio; and calculating the absolute value of the difference between the number ratio of the connected domains and a preset first threshold value as the difference degree. And carrying out negative correlation mapping on the difference degree, and taking the obtained result value as the approximation degree of the segmented image. In the embodiment of the present invention, the value of the first threshold is preset to be 1, and in other embodiments, the value is adjusted by the practitioner according to the actual situation.
wherein,,to a similar extent; />Is an exponential function based on natural constants; />For a first number of communication domains; />The number of the second connected domains; />Is the number ratio of the connected domains; 1 is a preset first threshold value; />Is the degree of difference.
Wherein, exp (-x) in the calculation formula of the approximation degree realizes inverse proportion normalization of the difference degree, namely exp (-x) realizes negative correlation mapping of the difference degree. Number ratio of connected domainsThe ratio of the number of the first communicating domain to the number of the second communicating domain is that the closer the ratio of the number of the communicating domains is to 1, the closer the number of the first communicating domain to the number of the second communicating domain is, namely, the degree of difference +.>The closer to 0 the value of (c) reflects the closer the number of first connected domains and the number of second connected domains are. Degree of difference->The smaller the value of (2), the greater the corresponding approximation, the closer it is to 1, the degree of difference +.>The larger the value of (c), the smaller the corresponding approximation, the closer it is to 0.
And calculating the number and the approximation degree of the connected domains corresponding to each divided image.
Since the number of connected domains in the divided image, the approximation degree between the number of the first connected domains and the number of the second connected domains are all division judgment standards of the divided image. The segmentation criteria are calculated based on the number of connected domains and the approximation degree in the segmented image. Specific: and carrying out weighted average calculation on the normalized number of the connected domains and the approximation degree, and taking the obtained result value as a segmentation standard.
The calculation formula of the segmentation standard is as follows:
wherein,,a segmentation standard corresponding to the segmented image; />Presetting a first weight; />Presetting a second weight;the number of connected domains corresponding to the segmented image; />The number of the connected domains is normalized; />Is a normalization function;to the corresponding approximation of the segmented image.
Because the influence of the discretization of the area position and the random diversity on the encryption effect is more important than the numerical ratio, the value of the first weight is preset to be 0.6 in the embodiment of the invention, the value of the second weight is preset to be 0.4, and in other embodiments, the implementer can adjust the value according to the actual situation. When the number of connected domainsThe greater the value of (2), the normalized +.>The value of (2) is closer to 1, and the proportional relation is formed between the value of (1) and the change of the number of the connected domains; the more the number of the connected domains is, the more the positions of the reflected connected domain areas are relatively discrete, and the normalized number of the connected domains and the segmentation standard are in a proportional relationship; the approximation degree reflects the similarity degree of two areas of the divided image obtained by dividing based on the division threshold value, and the larger the approximation degree is, the larger the division standard corresponding to the divided image is, and the approximation degree and the division standard are in a proportional relationship.
And selecting an optimal threshold from the segmentation thresholds based on the segmentation criteria. Specific: and obtaining a corresponding segmentation threshold value when the segmentation standard is closest to a preset second threshold value, and taking the segmentation threshold value as an optimal threshold value. In the embodiment of the present invention, the value of the second threshold is preset to be 1, and in other embodiments, the practitioner may adjust the value according to the actual situation. That is, when the segmentation criterion is closest to 1, the currently corresponding segmentation threshold is considered as the optimal threshold. The segmentation threshold is calculated by the normalized number of connected domains and the segmentation standard, the two parameters are weighted and summed, the value range of the segmentation standard is within 0-1, and the closer the segmentation standard is to 1, the better the segmentation effect of the segmented image is reflected, so that the segmentation threshold corresponding to the segmentation standard closest to 1 is selected as the optimal threshold.
The same method for acquiring the segmented image is used for segmenting the two-dimensional gray matrix image based on the optimal threshold value, and the target segmented image is obtained.
The encryption storage module 40 is used for scanning the target segmentation image by adopting different scanning rules and screening out the optimal scanning rules; based on an optimal scanning rule, scanning pixel points in the target segmentation image, and extracting decimal numbers corresponding to the pixel points to serve as ciphertext; and taking the optimal scanning rule and the construction parameters of the two-dimensional matrix as keys, and storing data information based on the ciphertext and the keys.
And scanning the target segmentation image by adopting different scanning rules, and screening out the optimal scanning rules. Specific: and scanning the target segmentation image by utilizing a raster scanning rule to obtain a corresponding coding sequence as a first coding sequence. Wherein, the elements in the coding sequence are the pixel values corresponding to each pixel point, and the decimal values corresponding to the pixel points are the coding values. After obtaining a target segmentation image obtained based on optimal threshold segmentation, respectively using raster scanning to scan the values corresponding to black pixel points and white pixel points in the target segmentation image line by line, and storing the scanned value sequence; the decimal number scanning corresponding to the black pixel point with the gray level value of 0 is stored in the set H, and the decimal number scanning corresponding to the white pixel point with the gray level value of 1 is stored in the set B.
Further, the optimal scanning rule is selected, and at least two scanning rules except the raster scanning rule are used for scanning the target segmentation image respectively, so that a corresponding coding sequence is obtained and is used as a second coding sequence.
And obtaining a scanning rule value according to the difference of the code values at the same positions in the first code sequence and the second code sequence obtained by the raster scanning rule and other scanning rules, namely comparing the code sequences obtained by different scanning rules with the code sequences obtained by the raster scanning rules to obtain the scanning rule value.
The method for acquiring the scanning rule value comprises the following steps: calculating the absolute value of the difference value of the coded values at the same position in the first coded sequence and the second coded sequence as a second absolute value; the sum of the second absolute values corresponding to the coded values is used as an initial rule value; and taking the normalized initial rule value as a scanning rule value.
The calculation formula of the scanning rule value is as follows:
wherein,,scanning rule values; />Is a normalization function; />Is the code value at the i-th position in the second code sequence; />Is the code value at the i-th position in the first code sequence; />Is the length of the coding sequence; a is the width of the two-dimensional gray matrix image; b is the length of the two-dimensional gray matrix image; />For coding the value +.>And->A corresponding second absolute value; />Is the initial rule value.
The initial rule value is obtained by summing, and is used for obtaining the sum of absolute values of differences corresponding to code values at each position on a first code sequence and a second code sequence obtained by two scanning rules, the larger the initial rule value is, the larger the difference between the first code sequence and the second code sequence is, th is a hyperbolic tangent function, normalization of the initial rule value is shown, the initial rule value before normalization and the scanning rule value obtained after normalization are in a direct proportion relationship, and when the initial rule value is larger, the corresponding scanning rule value is closer to 1.
And respectively calculating rule values of at least two scanning rules except the raster scanning rule, and taking the scanning rule corresponding to the maximum scanning rule value as the optimal scanning rule.
And scanning the target segmented image by utilizing an optimal scanning rule, scanning pixel points in the target segmented image, extracting decimal numbers corresponding to the pixel points to serve as ciphertext, namely saving a coded sequence obtained after scanning, correspondingly replacing 0 and 1 in the coded sequence by the coded values in the set H and the set B, and taking the sequence formed by the coded values as ciphertext. The coded value is here also a decimal value. The coding sequence obtained after scanning is 11010100; the sequences in set H are: 23. 15, 56, 20; the sequences in set B are 155, 147, 221, 105. The values in the set H replace 0 in the scanned coding sequence in sequence, and the values in the set B replace 1 in the scanned coding sequence in sequence, so that a sequence formed by the coded values is obtained: 155. 147, 23, 221, 15, 105, 56, 20. The sequence is stored as ciphertext.
And storing the obtained ciphertext, and taking the optimal scanning rule and the construction parameters of the two-dimensional matrix as keys to store. Data information is stored based on the ciphertext and the key. After obtaining the ciphertext and the key, the embodiment of the invention provides a decryption method: firstly, converting a ciphertext sequence into a storage format of a two-dimensional matrix according to a two-dimensional matrix construction parameter, and then restoring a numerical value block in the current two-dimensional matrix to an original position according to an optimal scanning rule, namely restoring elements in the current two-dimensional matrix to the original position according to the optimal scanning rule, and further, reading the numerical value in the two-dimensional matrix by using a raster scanning mode and converting the numerical value block into a one-dimensional sequence; binary coding conversion is carried out on decimal in each sequence, binary coding bit reduction operation is carried out, the binary coding bit reduction operation corresponds to bit increasing operation in a data processing module, and binary coding after bit reduction is converted into decimal values again to obtain plaintext.
In summary, the present invention relates to the field of data encryption technology. The system comprises: the system comprises a data processing module, a threshold acquisition module, a threshold screening module and an encryption storage module. The data processing module is used for converting each data information into decimal numbers and constructing a two-dimensional matrix and a corresponding two-dimensional gray matrix image; the threshold value acquisition module is used for taking the normalized gray value of each pixel point in the two-dimensional gray matrix image as a preset threshold value; selecting a preferred preset threshold from the preset thresholds; selecting preset thresholds with adjacent sizes as starting points by taking the optimal preset thresholds as segmentation thresholds, and segmenting the two-dimensional gray matrix image to obtain at least two segmented images; the threshold screening module is used for acquiring the number of connected domains in the segmented image; calculating the approximation degree of the segmented image according to the difference between the number of the connected domains corresponding to the pixel points with different pixel values; calculating a segmentation standard according to the number and the approximation degree of the connected domains in the segmented image; selecting an optimal threshold from the segmentation thresholds based on the segmentation criteria; dividing the two-dimensional gray matrix image based on the optimal threshold value to obtain a target divided image; the encryption storage module is used for scanning the target segmentation image by adopting different scanning rules and screening out the optimal scanning rules; based on an optimal scanning rule, scanning pixel points in the target segmentation image, and extracting decimal numbers corresponding to the pixel points to serve as ciphertext; and taking the optimal scanning rule and the construction parameters of the two-dimensional matrix as keys, and storing data information based on the ciphertext and the keys. The invention converts the value of wireless route data into gray scale interval by carrying out binary conversion and preprocessing, thereby constructing a two-dimensional gray scale matrix image of the data, and selecting a proper threshold value for segmentation by analyzing the data; and the optimal scanning rule is selected for scrambling the binary images obtained by the segmentation, so that the maximization of the difference between the processed matrix and the original matrix is ensured to the greatest extent, the effect better than that of the traditional scrambling operation is achieved, and the intelligent management of wireless route data is completed.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
Claims (8)
1. The intelligent management system for the wireless routing data is characterized by comprising the following steps:
the data processing module is used for converting each wireless route data information into decimal numbers; constructing a two-dimensional matrix and a corresponding two-dimensional gray matrix image by decimal numbers;
the threshold value acquisition module is used for taking the normalized gray value of each pixel point in the two-dimensional gray matrix image as a preset threshold value; calculating a threshold selection standard according to the difference between the preset threshold and the preset gray value; selecting a preferred preset threshold according to a threshold selection standard; selecting preset thresholds with adjacent sizes as starting points by taking the optimal preset thresholds as segmentation thresholds, and segmenting the two-dimensional gray matrix image to obtain at least two segmented images;
the threshold screening module is used for acquiring the number of connected domains of the connected domains formed by the pixel points with different pixel values in the segmented image; calculating the approximation degree of the segmented image according to the difference between the number of the connected domains corresponding to the pixel points with different pixel values; calculating a segmentation standard according to the number and the approximation degree of the connected domains in the segmented image; selecting an optimal threshold from the segmentation thresholds based on the segmentation criteria; dividing the two-dimensional gray matrix image based on the optimal threshold value to obtain a target divided image;
the encryption storage module is used for scanning the target segmentation image by adopting different scanning rules and screening out the optimal scanning rules; based on an optimal scanning rule, scanning pixel points in the target segmentation image, and extracting decimal numbers corresponding to the pixel points to serve as ciphertext; taking the optimal scanning rule and the construction parameters of the two-dimensional matrix as keys, and storing data information based on ciphertext and the keys;
the method comprises the steps of obtaining the number of connected domains of the connected domains formed by pixel points with different pixel values in a segmented image, and specifically: the segmentation image is a binary image, and the number of the connected domains comprises the number of the first connected domains and the number of the second connected domains; acquiring the number of connected domains formed by pixel points with pixel values of 1 in the segmented image as the number of first connected domains; acquiring the number of connected domains formed by pixel points with pixel values of 0 in the segmented image as the number of second connected domains;
the approximation degree of the segmented image is calculated according to the difference between the number of the connected domains corresponding to the pixel points with different pixel values, and the approximation degree is specifically: calculating the ratio of the number of the first communicating domains to the number of the second communicating domains as the communicating domain number ratio; calculating the absolute value of the difference value between the number ratio of the connected domains and a preset first threshold value as the difference degree; and carrying out negative correlation mapping on the difference degree, and taking the obtained result value as the approximation degree of the segmented image.
2. The intelligent management system of wireless routing data according to claim 1, wherein said constructing a two-dimensional matrix and corresponding two-dimensional gray matrix image from decimal numbers comprises:
sequentially placing decimal numbers corresponding to all data information in a two-dimensional matrix according to the sequence of the data information, wherein the two-dimensional matrix is a two-dimensional matrix constructed by decimal numbers; the construction parameters of the two-dimensional matrix are the length and the width of the two-dimensional matrix;
and taking each element in the two-dimensional matrix as a pixel value of a pixel point on the image, and constructing a two-dimensional gray matrix image corresponding to the two-dimensional matrix.
3. The intelligent management system for wireless routing data according to claim 1, wherein the calculating the threshold selection criteria according to the difference between the preset threshold and the preset gray value comprises:
calculating an absolute value of a difference value between a preset threshold value and a preset gray value as a first absolute value; and carrying out negative correlation mapping on the first absolute value, and taking the obtained result value as a threshold selection standard.
4. The intelligent management system for wireless routing data according to claim 1, wherein the calculating the segmentation criteria according to the number of connected domains and the approximation degree in the segmented image comprises:
and carrying out weighted average calculation on the normalized number of the connected domains and the approximation degree, and taking the obtained result value as a segmentation standard.
5. The intelligent management system for wireless routing data according to claim 1, wherein the scanning the target segmentation image using different scanning rules and screening out the optimal scanning rules comprises:
scanning the target segmentation image by utilizing a raster scanning rule to obtain a corresponding coding sequence as a first coding sequence;
scanning the target segmentation image by at least two scanning rules except the raster scanning rules respectively to obtain a corresponding coding sequence as a second coding sequence;
obtaining a scanning rule value according to the difference of the coding values at the same position in the first coding sequence and the second coding sequence; and taking the scanning rule corresponding to the maximum scanning rule value as the optimal scanning rule.
6. The intelligent management system for wireless routing data according to claim 5, wherein the obtaining the scan rule value according to the difference between the encoded values at the same position in the first encoded sequence and the second encoded sequence comprises:
calculating the absolute value of the difference value of the coded values at the same position in the first coded sequence and the second coded sequence as a second absolute value; the sum of the second absolute values corresponding to the coded values is used as an initial rule value; and taking the normalized initial rule value as a scanning rule value.
7. The intelligent management system for wireless routing data according to claim 1, wherein the selecting a preferred preset threshold according to a threshold selection criterion comprises:
and selecting a preset threshold corresponding to the maximum threshold selection standard as a preferable preset threshold.
8. The intelligent management system for wireless routing data according to claim 1, wherein said selecting an optimal threshold from among split thresholds based on said split criteria comprises:
and obtaining a corresponding segmentation threshold value when the segmentation standard is closest to a preset second threshold value, and taking the segmentation threshold value as an optimal threshold value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310133346.8A CN115861034B (en) | 2023-02-20 | 2023-02-20 | Wireless routing data intelligent management system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310133346.8A CN115861034B (en) | 2023-02-20 | 2023-02-20 | Wireless routing data intelligent management system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115861034A CN115861034A (en) | 2023-03-28 |
CN115861034B true CN115861034B (en) | 2023-06-20 |
Family
ID=85658398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310133346.8A Active CN115861034B (en) | 2023-02-20 | 2023-02-20 | Wireless routing data intelligent management system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115861034B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116861468B (en) * | 2023-09-04 | 2023-11-24 | 苏州宏存芯捷科技有限公司 | Design data encryption method for PCB |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115205320A (en) * | 2022-09-19 | 2022-10-18 | 江苏广海检验检测有限公司 | Encryption transmission method based on environment monitoring data |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050168460A1 (en) * | 2002-04-04 | 2005-08-04 | Anshuman Razdan | Three-dimensional digital library system |
CN108596820B (en) * | 2018-04-11 | 2022-04-05 | 重庆第二师范学院 | Image processing system based on information security |
CN108898025B (en) * | 2018-06-25 | 2020-06-12 | 河南大学 | Chaotic image encryption method based on double scrambling and DNA coding |
CN115242475B (en) * | 2022-07-14 | 2024-07-19 | 东莞市鸣鹿信息科技有限公司 | Big data safety transmission method and system |
CN115150818B (en) * | 2022-09-05 | 2022-11-04 | 光谷技术有限公司 | Communication transmission encryption method based on artificial intelligence |
CN115694784B (en) * | 2022-12-29 | 2023-05-02 | 北京厚方科技有限公司 | Data security storage method |
-
2023
- 2023-02-20 CN CN202310133346.8A patent/CN115861034B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115205320A (en) * | 2022-09-19 | 2022-10-18 | 江苏广海检验检测有限公司 | Encryption transmission method based on environment monitoring data |
Also Published As
Publication number | Publication date |
---|---|
CN115861034A (en) | 2023-03-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Elharrouss et al. | An image steganography approach based on k-least significant bits (k-LSB) | |
Muhammad et al. | A secure method for color image steganography using gray-level modification and multi-level encryption | |
Swain et al. | Classification of image steganography techniques in spatial domain: a study | |
CN111050022B (en) | High-security image transmission system and method | |
CN115861034B (en) | Wireless routing data intelligent management system | |
Mansour et al. | Reversible data hiding for electronic patient information security for telemedicine applications | |
Biswas et al. | Random selection based GA optimization in 2D-DCT domain color image steganography | |
CN115225897A (en) | Video multi-level encryption transmission method based on Huffman coding | |
Hashemzadeh | Hiding information in videos using motion clues of feature points | |
Farahani et al. | A DWT based perfect secure and high capacity Image Steganography method | |
US20210225039A1 (en) | Predictive Joint Compression and Encryption for Images and Videos | |
Shukur et al. | Information hiding using LSB technique based on developed PSO algorithm | |
CN115834023A (en) | Data encryption method based on big data | |
Kumar et al. | Bit length replacement steganography based on dct coefficients | |
Elshare et al. | Modified multi-level steganography to enhance data security | |
Nickfarjam et al. | Image steganography based on pixel ranking and particle swarm optimization | |
Li et al. | A game-theoretic method for designing distortion function in spatial steganography | |
Jhong et al. | Grayscale-invariant reversible data hiding based on multiple histograms modification | |
CN109672804B (en) | Image encryption and decryption method and system | |
Thakur et al. | Analysis of Image Steganography Performance Check Using Bit Selection | |
Chen et al. | An improvement of diamond encoding using characteristic value positioning and modulus function | |
Kumar et al. | Image steganography in high entropy regions using a key & modified LSB for improved security | |
Gulia et al. | An extensive literature survey on medical image steganography | |
Perumal et al. | Robust multitier spatial domain secured color image steganography in server environment | |
Konyar | Reversible Data Hiding Method Based on Double-Side Histogram Shifting of Image Sub-Blocks |
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 |