CN116506105B - Data theft and tampering prevention encryption method based on block chain - Google Patents

Data theft and tampering prevention encryption method based on block chain Download PDF

Info

Publication number
CN116506105B
CN116506105B CN202310753246.5A CN202310753246A CN116506105B CN 116506105 B CN116506105 B CN 116506105B CN 202310753246 A CN202310753246 A CN 202310753246A CN 116506105 B CN116506105 B CN 116506105B
Authority
CN
China
Prior art keywords
data
matrix
tour
target
initial
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
Application number
CN202310753246.5A
Other languages
Chinese (zh)
Other versions
CN116506105A (en
Inventor
聂建华
王飞
王帅
张艳明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Aurora Intelligent Technology Co ltd
Rizhao People's Procuratorate
Shandong Aurora Intelligent Technology Co ltd
Original Assignee
Anhui Aurora Intelligent Technology Co ltd
Rizhao People's Procuratorate
Shandong Aurora Intelligent Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Anhui Aurora Intelligent Technology Co ltd, Rizhao People's Procuratorate, Shandong Aurora Intelligent Technology Co ltd filed Critical Anhui Aurora Intelligent Technology Co ltd
Priority to CN202310753246.5A priority Critical patent/CN116506105B/en
Publication of CN116506105A publication Critical patent/CN116506105A/en
Application granted granted Critical
Publication of CN116506105B publication Critical patent/CN116506105B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Storage Device Security (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to the technical field of secret communication, in particular to a data theft prevention and tamper encryption method based on a blockchain, which comprises the following steps: acquiring information to be transmitted, and carrying out conversion mapping treatment on the information to be transmitted; performing block processing on each target mapping matrix in the target mapping matrix set; screening initial tour data from each block matrix in a block matrix set; determining first afterward fluctuation corresponding to the initial tour data; determining second post-trend fluctuation and tour weight corresponding to next reachable data; determining a tour matrix corresponding to each block matrix; performing encryption transformation processing on the target mapping matrix; and generating target ciphertext information corresponding to the information to be transmitted, and transmitting the target ciphertext information to a target block chain. The invention improves the data encryption effect and the data security by the secret communication of the information to be transmitted, and is mainly applied to the secret communication of the data.

Description

Data theft and tampering prevention encryption method based on block chain
Technical Field
The invention relates to the technical field of secret communication, in particular to a data theft prevention and tamper prevention encryption method based on a blockchain.
Background
With the development of technology, the application of blockchains is more and more widespread, and because the information transmitted to the blockchain often contains private data of users, in order to protect the security of the information, the information to be transmitted to the blockchain often needs to be encrypted. Wherein the information transmitted to the blockchain is data transmitted to the blockchain. Currently, when encrypting data, the following methods are generally adopted: the data is scrambled and encrypted, namely, the data is encrypted by scrambling the data arrangement sequence. Among other things, a more common method of scrambling encryption may be to include: and mapping the data into a data matrix, and encrypting the data matrix by adopting a rider tour algorithm.
However, when the rider tour algorithm is adopted to encrypt the information to be transmitted to the blockchain mapped to the data matrix, the following technical problems often exist:
when only a rider tour algorithm is adopted to encrypt the data matrix generated by mapping, as the tour condition in the process of generating the tour matrix by the rider tour algorithm is usually fixed, the minimum number of routes is usually selected as a backtracking standard, but the minimum number of routes is adopted as the backtracking standard, when the tour matrix is generated for the data matrix with the same tour starting point and size, the tour matrix with the same tour path is usually generated, the key space is usually caused to be smaller, and the data encryption effect is poor.
Disclosure of Invention
The summary of the invention is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. The summary of the invention is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In order to solve the technical problem of poor data encryption effect, the invention provides a block chain-based data theft prevention and tamper encryption method.
The invention provides a data theft prevention and tamper encryption method based on a blockchain, which comprises the following steps:
acquiring information to be transmitted, and carrying out conversion mapping treatment on the information to be transmitted to obtain a target mapping matrix set;
performing blocking processing on each target mapping matrix in the target mapping matrix set to obtain a blocking matrix set corresponding to the target mapping matrix;
screening initial tour data from each block matrix in a block matrix set;
determining first afterward fluctuation corresponding to the initial tour data according to a next reachable data set corresponding to the initial tour data in each block matrix;
determining a second aftertrend fluctuation corresponding to next reachable data according to the aftertrend data set corresponding to each next reachable data in the next reachable data sets;
Determining a tour weight corresponding to the next reachable data according to the first afterward fluctuation corresponding to the initial tour data and the second afterward fluctuation corresponding to each next reachable data in the next reachable data set;
determining a tour matrix corresponding to each block matrix according to tour weights and a rider tour algorithm, wherein the tour weights are used for determining target tour data;
according to the tour matrix corresponding to each block matrix in the block matrix set corresponding to each target mapping matrix, carrying out encryption transformation processing on the target mapping matrix to obtain a ciphertext matrix corresponding to the target mapping matrix;
and generating target ciphertext information corresponding to the information to be transmitted according to the ciphertext matrix corresponding to the target mapping matrix, and transmitting the target ciphertext information to a target block chain, wherein the successor data in the successor data set corresponding to the next reachable data is the next reachable data of the next reachable data.
Optionally, the determining, according to the next reachable data set corresponding to the initial tour data in each block matrix, a first post-trend fluctuation corresponding to the initial tour data includes:
determining next representative data corresponding to the initial tour data according to a next reachable data set corresponding to the initial tour data, wherein each next reachable data in the next reachable data set is positively correlated with the next representative data;
And determining the absolute value of the difference value between the initial tour data and the next representative data as a first afterward fluctuation corresponding to the initial tour data.
Optionally, the determining, according to the successor data set corresponding to each piece of next reachable data in the next reachable data set, the second successor fluctuation corresponding to the next reachable data includes:
determining the post-trend representative data corresponding to the next reachable data according to the post-trend data set corresponding to the next reachable data, wherein each post-trend data in the post-trend data set is positively correlated with the post-trend representative data;
and determining the absolute value of the difference value between the next reachable data and the post-trend representative data as a second post-trend fluctuation corresponding to the next reachable data.
Optionally, the determining the tour weight corresponding to the next reachable data according to the first post-trend fluctuation corresponding to the initial tour data and the second post-trend fluctuation corresponding to each next reachable data in the next reachable data set includes:
determining an initial weight corresponding to the initial tour data according to a first post-trend fluctuation corresponding to the initial tour data and a second post-trend fluctuation corresponding to each next reachable data in a next reachable data set, wherein the first post-trend fluctuation and the second post-trend fluctuation are positively correlated with the initial weight;
Determining the absolute value of the difference value between the initial tour data and the next reachable data as a data difference index corresponding to the next reachable data;
and determining the tour weight corresponding to the next reachable data according to the initial weight corresponding to the initial tour data and the data difference index corresponding to the next reachable data, wherein the initial weight and the data difference index are positively correlated with the tour weight.
Optionally, the determining the tour matrix corresponding to each block matrix according to the tour weight and the rider tour algorithm includes:
screening out the next reachable data with the largest tour weight from the next reachable data set corresponding to the initial tour data in the block matrix, and taking the next reachable data with the largest tour weight as the next candidate tour data corresponding to the initial tour data;
determining the number of routes corresponding to the next candidate tour data corresponding to the initial tour data, and judging whether the initial tour data has the corresponding next target tour data according to the number of routes corresponding to the next candidate tour data, the backtracking criterion and the heuristic criterion of a rider tour algorithm;
when the initial tour data has the corresponding next target tour data, updating the initial tour data into the next target tour data corresponding to the initial tour data, screening out the next reachable data with the largest tour weight from the next reachable data set corresponding to the latest updated initial tour data, determining the number of routes corresponding to the next candidate tour data corresponding to the latest initial tour data as the next candidate tour data corresponding to the latest initial tour data, judging whether the latest initial tour data has the corresponding next target tour data according to the number of routes corresponding to the latest next candidate tour data, the tracing rule and the heuristic rule of a rider tour algorithm, and repeating the next target tour data determining step until all the obtained initial tour data are combined into the corresponding tour matrix when the latest initial tour data does not have the corresponding next target tour data.
Optionally, the performing encryption transformation processing on the target mapping matrix according to the tour matrix corresponding to each block matrix in the block matrix set corresponding to each target mapping matrix to obtain a ciphertext matrix corresponding to the target mapping matrix includes:
determining the structural similarity between each block matrix and a tour matrix corresponding to the block matrix, and taking the structural similarity as the transformation similarity corresponding to the block matrix;
according to the transformation similarity, sorting the blocking matrixes in the blocking matrix set corresponding to the target mapping matrix to obtain a blocking matrix sequence corresponding to the target mapping matrix;
performing exclusive or processing on a next change matrix and a tour matrix corresponding to each block matrix in the block matrix sequence, and performing tour transformation to obtain a target matrix corresponding to each block matrix in the block matrix sequence, wherein the next change matrix corresponding to the block matrix is a tour matrix corresponding to the next block matrix of the block matrix or a tour matrix corresponding to a preset block matrix;
and determining a ciphertext matrix corresponding to the target mapping matrix according to the target matrix corresponding to each block matrix in the block matrix sequence corresponding to the target mapping matrix.
Optionally, the determining, according to the target matrix corresponding to each block matrix in the block matrix sequence corresponding to the target mapping matrix, the ciphertext matrix corresponding to the target mapping matrix includes:
determining the structural similarity between each block matrix and a target matrix corresponding to the block matrix, and taking the structural similarity as the target similarity corresponding to the block matrix;
determining the overall similarity corresponding to the target mapping matrix according to the target similarity corresponding to each block matrix in the block matrix sequence, wherein the target similarity and the overall similarity are positively correlated;
when the overall similarity is smaller than a preset similarity threshold, combining target matrixes corresponding to all the block matrixes in the block matrix sequence into the ciphertext matrix;
and when the overall similarity is greater than or equal to a preset similarity threshold, reordering the block matrixes in the block matrix sequence according to the target similarity to obtain a target block matrix sequence, updating the block matrix sequence into a target block matrix sequence, determining the updated overall similarity corresponding to the target mapping matrix according to the target similarity corresponding to each block matrix in the latest updated block matrix sequence, combining the target matrixes corresponding to each block matrix in the latest updated block matrix sequence into the ciphertext matrix when the latest updated overall similarity is less than the preset similarity threshold, and repeating the overall similarity determining step until the overall similarity corresponding to each block matrix in the latest updated block matrix sequence is less than the preset similarity threshold, and combining the target matrixes corresponding to each block matrix in the latest updated block matrix sequence into the ciphertext matrix when the latest updated overall similarity is less than the preset similarity threshold.
Optionally, the converting and mapping the information to be transmitted to obtain a target mapping matrix set includes:
performing conversion processing on each data included in the information to be transmitted, and determining the converted data as data to be encrypted to obtain a data set to be encrypted;
mapping the data set to be encrypted into a first preset number of target mapping matrixes, wherein the target mapping matrix set comprises: a first predetermined number of target mapping matrices.
Optionally, the performing a blocking process on each target mapping matrix in the target mapping matrix set to obtain a blocking matrix set corresponding to the target mapping matrix includes:
equally dividing the target mapping matrix into a second preset number of blocking matrices, wherein the blocking matrix set corresponding to the target mapping matrix comprises: a second predetermined number of blocking matrices.
The invention has the following beneficial effects:
according to the block chain-based data anti-theft and tamper encryption method, through secret communication of information to be transmitted, the technical problem that the data encryption effect is poor is solved, and the data encryption effect and the data safety are improved. Firstly, the acquired information to be transmitted is subjected to transfer mapping processing, so that the information to be transmitted can be conveniently encrypted based on a rider tour algorithm. Then, as the size of the matrix is larger, the time for generating the corresponding tour matrix is longer, so that the generation efficiency of the corresponding tour matrix is lower, each target mapping matrix in the target mapping matrix set is subjected to block processing, the size of each matrix for generating the tour matrix can be reduced, and the efficiency of subsequently generating the tour matrix can be improved. And then, the initial tour data is screened out from each partitioned matrix in the partitioned matrix set, so that the generation of the corresponding tour matrix can be conveniently carried out later. Continuing, the next reachable data set corresponding to the initial tour data in each block matrix is comprehensively considered, so that the accuracy of determining the first afterward fluctuation corresponding to the initial tour data can be improved. Furthermore, the accuracy of determining the second post-trend fluctuation corresponding to the next reachable data can be improved by comprehensively considering the post-trend data set corresponding to each next reachable data in the next reachable data set. And then, comprehensively considering the first afterward fluctuation corresponding to the initial tour data and the second afterward fluctuation corresponding to each next reachable data in the next reachable data set, and improving the accuracy of tour weight determination corresponding to the next reachable data. And then, comprehensively considering the tour weight and the rider tour algorithm, wherein the determined tour matrix is richer in tour path compared with the tour matrix determined based on the rider tour algorithm only, so that the key space is improved, and the encryption effect is further improved. And secondly, the target mapping matrix is further encrypted based on the tour matrix corresponding to each block matrix in the block matrix set corresponding to each target mapping matrix, so that the encryption effect and the data security can be improved. Finally, generating target ciphertext information corresponding to the information to be transmitted according to the ciphertext matrix corresponding to the target mapping matrix, and transmitting the target ciphertext information to a target blockchain, so that secret communication of the information to be transmitted can be realized, and initial tour data, a next reachable data set, a post-trend data set, tour weights, a rider tour algorithm and encryption transformation processing in the blocking matrix are comprehensively considered.
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 flow chart of a blockchain-based data anti-theft and tamper encryption method 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 is given below of the specific implementation, structure, features and effects of the technical solution 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 invention provides a data theft and tampering prevention encryption method based on a blockchain, which comprises the following steps:
acquiring information to be transmitted, and performing conversion mapping treatment on the information to be transmitted to obtain a target mapping matrix set;
performing blocking processing on each target mapping matrix in the target mapping matrix set to obtain a blocking matrix set corresponding to the target mapping matrix;
screening initial tour data from each block matrix in a block matrix set;
determining first afterward fluctuation corresponding to the initial tour data according to a next reachable data set corresponding to the initial tour data in each block matrix;
determining second aftertrend fluctuation corresponding to next reachable data according to the aftertrend data set corresponding to each next reachable data in the next reachable data sets;
determining a tour weight corresponding to the next reachable data according to the first afterward fluctuation corresponding to the initial tour data and the second afterward fluctuation corresponding to each next reachable data in the next reachable data set;
determining a tour matrix corresponding to each block matrix according to the tour weight and a rider tour algorithm;
according to the tour matrix corresponding to each block matrix in the block matrix set corresponding to each target mapping matrix, carrying out encryption transformation processing on the target mapping matrix to obtain a ciphertext matrix corresponding to the target mapping matrix;
And generating target ciphertext information corresponding to the information to be transmitted according to the ciphertext matrix corresponding to the target mapping matrix, and transmitting the target ciphertext information to the target block chain.
The following detailed development of each step is performed:
referring to FIG. 1, a flow of some embodiments of a blockchain-based data anti-theft, tamper encryption method in accordance with the present invention is shown. The data theft and tampering prevention encryption method based on the blockchain comprises the following steps:
step S1, information to be transmitted is obtained, and transformation mapping processing is carried out on the information to be transmitted, so that a target mapping matrix set is obtained.
In some embodiments, information to be transmitted may be acquired, and a transformation mapping process may be performed on the information to be transmitted to obtain a target mapping matrix set.
The information to be transmitted may be data after data cleaning. The information to be transmitted may be data to be transmitted to a blockchain. For example, the information to be transmitted may be data related to e-commerce transactions after data cleansing. Wherein, the data related to the e-commerce transaction may include, but is not limited to: commodity transaction amount, user information of both transaction sides, transaction product model and transaction amount.
It should be noted that, the transformation mapping process is performed on the acquired information to be transmitted, so that the information to be transmitted can be conveniently encrypted based on the rider tour algorithm.
As an example, this step may include the steps of:
first, initial information is acquired.
The initial information may be collected streaming data that needs to be transmitted. For example, the initial information may be data related to an e-commerce transaction.
And secondly, data cleaning is carried out on the initial information to obtain the information to be transmitted.
The information to be transmitted may be initial information after data cleaning.
And thirdly, carrying out conversion processing on each data included in the information to be transmitted, and determining the converted data as data to be encrypted to obtain a data set to be encrypted.
For example, each data included in the Information to be transmitted may be converted into decimal data by ASCII (American Standard Code for Information Interchange) encoding, the resulting decimal data is taken as data to be encrypted, and all the resulting data to be encrypted are combined into a data set to be encrypted.
It should be noted that, the data formats corresponding to the respective data included in the information to be transmitted may be different, so that the respective data included in the information to be transmitted is transformed, so that the respective data included in the information to be transmitted can be uniformly adjusted to decimal data, and subsequent processing can be facilitated.
And fourthly, mapping the data set to be encrypted into a first preset number of target mapping matrixes.
Wherein, the target mapping matrix set may include: a first predetermined number of target mapping matrices. The elements in the target mapping matrix may be data to be encrypted. The first preset number may be a preset number. For example, the first preset number may be 10.
For example, the data set to be encrypted may be mapped into a first preset number of two-dimensional matrices, and the mapped two-dimensional matrices are used as the target mapping matrices.
For another example, if the data set to be encrypted is {1,2,3,4,5,6,7,8,9}, the first preset number is 1, the 1 target mapping matrix obtained may be:. It should be noted that, this example is only used to illustrate the mapping concept, and in actual situations, there is often a relatively large amount of data to be encrypted in the obtained data set to be encrypted, and here, for simplicity of writing, a large amount of data to be encrypted is not illustrated.
Alternatively, an S-scan method may be used to map the data set to be encrypted into a plurality of two-dimensional matrices of preset sizes, and the mapped two-dimensional matrices are used as the target mapping matrices. The blank part in the two-dimensional matrix with the unsatisfied mapping can be supplemented by a preset value. For example, the preset value may be 255. The preset size may be a preset size. The preset size may include the same number of rows and columns. For example, the preset size may be 90×90. The target mapping matrix may be a square matrix.
It should be noted that, the target mapping matrix may be a square matrix, and the square matrix has more optional tour start points compared with a matrix with different rows and columns, and the number of the generated tour matrixes is more, so that the key space is larger, and the encryption effect is better. The cruising start point may be an initial position where a rider cruises.
And S2, performing blocking processing on each target mapping matrix in the target mapping matrix set to obtain a blocking matrix set corresponding to the target mapping matrix.
In some embodiments, each target mapping matrix in the target mapping matrix set may be subjected to a blocking process, so as to obtain a blocking matrix set corresponding to the target mapping matrix.
The blocking matrix in the blocking matrix set corresponding to the target mapping matrix may be a data block obtained by equally dividing the target mapping matrix. The blocking matrix may be a square matrix.
It should be noted that, as the size of the matrix is larger, the duration of generating the corresponding tour matrix is longer, so that the generating efficiency of the corresponding tour matrix is lower, and therefore, each target mapping matrix in the target mapping matrix set is subjected to block processing, the size of each matrix for generating the tour matrix can be reduced, and the efficiency of subsequently generating the tour matrix can be improved.
As an example, the above-mentioned target mapping matrix may be equally divided into a second preset number of blocking matrices. Wherein, the block matrix set corresponding to the target mapping matrix includes: a second predetermined number of blocking matrices. The second preset number may be a preset number. For example, the second preset number may be 9.
For example, if the target mapping matrix is:the second preset number is 3, and the set of blocking matrices corresponding to the target mapping matrix may include:and. It should be noted that, this example is only used to exemplify the concept of matrix aliquoting, and the size of the target mapping matrix obtained in practical situations is often relatively large, and here, for simplicity of writing, the target mapping matrix with a very large size is not exemplified.
And S3, screening out initial tour data from each block matrix in the block matrix set.
In some embodiments, the initial tour data may be screened from each of a set of partitioned matrices.
The initial tour data may be first data of a rider tour of the block matrix. That is, the initial tour data may be data where the first position constituting the rider tour path is located. The initial tour data may be elements at preset locations in the block matrix. The preset position may be a preset position. For example, the preset position may be row 1 and column 1 in the block matrix.
It should be noted that, the initial tour data is screened out from each block matrix in the block matrix set, so that the generation of the corresponding tour matrix can be conveniently performed subsequently.
As an example, the element of the 1 st row and 1 st column in the block matrix may be determined as the initial tour data corresponding to the block matrix.
And S4, determining first afterward fluctuation corresponding to the initial tour data according to the next reachable data set corresponding to the initial tour data in each block matrix.
In some embodiments, the first post-trend fluctuation corresponding to the initial tour data may be determined according to a next reachable data set corresponding to the initial tour data in each block matrix.
The next reachable data in the next reachable data set corresponding to the initial tour data may be the next reachable data from the initial tour data when the rider tours in the block matrix. For example, the next reachable data may be the next reachable data determined using the oblique-day walk method. The oblique-day walking method is a mode that a rider walks according to a walking mode of 'horse-walking day' in the chess.
It should be noted that, by comprehensively considering the next reachable data set corresponding to the initial tour data in each block matrix, the accuracy of determining the first post-trend fluctuation corresponding to the initial tour data can be improved.
As an example, this step may include the steps of:
and determining the next representative data corresponding to the initial tour data according to the next reachable data set corresponding to the initial tour data.
Wherein each next reachable data in the set of next reachable data may be positively correlated with the next representative data.
And secondly, determining the absolute value of the difference value between the initial tour data and the next representative data as a first afterward fluctuation corresponding to the initial tour data.
For example, the formula for determining the first post-trend fluctuation corresponding to the initial tour data may be:
wherein, the liquid crystal display device comprises a liquid crystal display device,the method comprises the steps that in a block matrix set corresponding to an ith target mapping matrix in a target mapping matrix set, first afterward fluctuation corresponding to initial tour data in the jth block matrix corresponds to the ith target mapping matrix.Is the initial tour data in the j-th block matrix in the block matrix set corresponding to the i-th target mapping matrix.The next representative data corresponding to the initial tour data in the j-th block matrix in the block matrix set corresponding to the i-th target mapping matrix.Is thatIs the absolute value of (c).The number of the next reachable data in the next reachable data set corresponding to the initial tour data in the j-th block matrix is in the block matrix set corresponding to the i-th target mapping matrix. The method comprises the steps that in a block matrix set corresponding to an ith target mapping matrix, t next reachable data in a next reachable data set corresponding to initial tour data in a jth block matrix are obtained.And (3) withAnd shows positive correlation. i is the sequence number of the target mapping matrix in the set of target mapping matrices. j is the sequence number of the blocking matrix in the blocking matrix set corresponding to the ith target mapping matrix. t is the sequence number of the next reachable data in the next reachable data set corresponding to the initial tour data in the j-th block matrix.
It should be noted that the number of the substrates,the mean value of the next reachable data in the next reachable data set corresponding to the initial tour data in the j-th block matrix can be represented.The differences between the initial tour data and the corresponding next available data set in the jth block matrix may be characterized. Thus whenThe larger the difference between the initial tour data and the corresponding next reachable data set in the jth block matrix, the more likely the disturbance between the initial tour data and the corresponding next reachable data set in the jth block matrix, and the more fluctuating between the initial tour data and the corresponding next reachable data set in the jth block matrix.
Step S5, determining a second aftertrend fluctuation corresponding to the next reachable data according to the aftertrend data set corresponding to each next reachable data in the next reachable data set.
In some embodiments, the second metaverse fluctuation corresponding to the next reachable data may be determined according to a metaverse data set corresponding to each next reachable data in the next reachable data set.
The successor data in the successor data set corresponding to the next reachable data may be the next reachable data of the next reachable data. The next reachable data of the next reachable data may be the next reachable data from which the rider walks in the block matrix. For example, if the first data is the next reachable data of the initial tour data, all the next reachable data of the first data includes: the second data and the third data, the set of the post-trend data corresponding to the first data may be { second data, third data }. The next reachable data of the first data may be data that is next reachable from the first data when the rider tour is performed in the block matrix.
It should be noted that, comprehensively considering the post-trend data sets corresponding to each next reachable data in the next reachable data sets, the accuracy of determining the second post-trend fluctuation corresponding to the next reachable data can be improved.
As an example, this step may include the steps of:
and determining the metaverse representative data corresponding to the next reachable data according to the metaverse data set corresponding to the next reachable data.
Wherein each of the set of successor data may be positively correlated with the successor representation data.
And secondly, determining the absolute value of the difference value between the next reachable data and the post-trend representative data as a second post-trend fluctuation corresponding to the next reachable data.
For example, the formula for determining the second post-trend fluctuation corresponding to the next reachable data may be:
wherein, the liquid crystal display device comprises a liquid crystal display device,the method comprises the steps that in a block matrix set corresponding to an ith target mapping matrix in a target mapping matrix set, the next reachable data set corresponding to initial tour data in the jth block matrix corresponds to the t next reachable data, and the second backward trend corresponding to the t next reachable data fluctuates.Is the ith targetIn the block matrix set corresponding to the mapping matrix, the jth next reachable data in the next reachable data set corresponding to the initial tour data in the jth block matrix.The method comprises the steps that in a block matrix set corresponding to an ith target mapping matrix, the next reachable data set corresponding to initial tour data in a jth block matrix, and the postdrive representative data corresponding to the t next reachable data. Is thatIs the absolute value of (c).The number of the successor data in the successor data set corresponding to the t next reachable data in the next reachable data set corresponding to the initial tour data in the j-th block matrix in the block matrix set corresponding to the i-th target mapping matrix.In the block matrix set corresponding to the ith target mapping matrix, in the next reachable data set corresponding to the initial tour data in the jth block matrix, the mth postdrive data in the postdrive data set corresponding to the tth next reachable data. i is the sequence number of the target mapping matrix in the set of target mapping matrices. j is the sequence number of the blocking matrix in the blocking matrix set corresponding to the ith target mapping matrix. t is the sequence number of the next reachable data in the next reachable data set corresponding to the initial tour data in the j-th block matrix. m is the serial number of the successor data in the successor data set corresponding to the t next reachable data.
It should be noted that the number of the substrates,the mean value of the successor data in the successor data set corresponding to the t next reachable data can be characterized.The differences between the tth next reachable data and the corresponding set of post-trend data may be characterized. Thus whenThe larger the difference between the next-to-the-t reachable data and the corresponding set of post-trend data, the more likely the disturbance between the next-to-t reachable data and the corresponding set of post-trend data, and the more fluctuating between the next-to-t reachable data and the corresponding set of post-trend data.
Step S6, determining the tour weight corresponding to the next reachable data according to the first afterward fluctuation corresponding to the initial tour data and the second afterward fluctuation corresponding to each next reachable data in the next reachable data set.
In some embodiments, the tour weight corresponding to the next reachable data may be determined according to the first post-trend fluctuation corresponding to the initial tour data and the second post-trend fluctuation corresponding to each next reachable data in the next reachable data set.
It should be noted that, by comprehensively considering the first post-trend fluctuation corresponding to the initial tour data and the second post-trend fluctuation corresponding to each next reachable data in the next reachable data set, the accuracy of determining the tour weight corresponding to the next reachable data can be improved.
As an example, this step may include the steps of:
the first step, determining an initial weight corresponding to the initial tour data according to the first afterward fluctuation corresponding to the initial tour data and the second afterward fluctuation corresponding to each next reachable data in the next reachable data set.
Wherein both the first and second post-trend fluctuations may be positively correlated with the initial weight.
And secondly, determining the absolute value of the difference value between the initial tour data and the next reachable data as a data difference index corresponding to the next reachable data.
And thirdly, determining the tour weight corresponding to the next reachable data according to the initial weight corresponding to the initial tour data and the data difference index corresponding to the next reachable data.
Wherein, the initial weight and the data difference index can be positively correlated with the tour weight.
For example, the formula for determining the patrol weight corresponding to the next reachable data may be:
wherein, the liquid crystal display device comprises a liquid crystal display device,the method comprises the steps that in a block matrix set corresponding to an ith target mapping matrix in a target mapping matrix set, the next reachable data set corresponding to initial tour data in a jth block matrix, and tour weights corresponding to the tth next reachable data.In the block matrix set corresponding to the ith target mapping matrix, in the next reachable data set corresponding to the initial tour data in the jth block matrix, the second late trend fluctuation corresponding to the t next reachable data is realized.The next fluctuation representing index corresponding to the initial tour data in the j-th block matrix is in the block matrix set corresponding to the i-th target mapping matrix.The number of the next reachable data in the next reachable data set corresponding to the initial tour data in the j-th block matrix is in the block matrix set corresponding to the i-th target mapping matrix. The first post-trend fluctuation corresponding to the initial tour data in the j-th block matrix is in the block matrix set corresponding to the i-th target mapping matrix.The initial weight corresponding to the initial tour data in the j-th block matrix is in the block matrix set corresponding to the i-th target mapping matrix.Andare all in contact withAnd shows positive correlation.Is the initial tour data in the j-th block matrix in the block matrix set corresponding to the i-th target mapping matrix.The method comprises the steps that in a block matrix set corresponding to an ith target mapping matrix, t next reachable data in a next reachable data set corresponding to initial tour data in a jth block matrix are obtained.Is thatIs the absolute value of (c).The method is characterized in that the method comprises the steps that in a block matrix set corresponding to an ith target mapping matrix, the data difference index corresponding to the t next reachable data is in a next reachable data set corresponding to initial tour data in a j-th block matrix.Andare all in contact withAnd shows positive correlation. i is the target mapping in the set of target mapping matricesSequence number of matrix. j is the sequence number of the blocking matrix in the blocking matrix set corresponding to the ith target mapping matrix. t is the sequence number of the next reachable data in the next reachable data set corresponding to the initial tour data in the j-th block matrix.
It should be noted that the number of the substrates,the total difference between all next reachable data in the next reachable data set and the corresponding set of post-trend data may be characterized.The differences between the initial tour data and the corresponding next available data set in the jth block matrix may be characterized. Thus whenThe larger the difference between the initial tour data, the next reachable data set and the post-trend data set is, the larger the difference is often described; often, the effect of scrambling and encrypting is better when the next target tour data is screened from the next reachable data set. When (when)The larger the difference between the initial tour data and the t next reachable data in the j-th block matrix is, the larger the difference is often described; often, the effect of scrambling encryption is better when the t next reachable data is used as the next target tour data. Thus whenThe larger the data is, the better the effect of scrambling encryption is often explained by taking the next reachable data of the t as the next target tour data.
And S7, determining a tour matrix corresponding to each block matrix according to the tour weight and the rider tour algorithm.
In some embodiments, the tour matrix corresponding to each block matrix may be determined according to tour weights and a rider tour algorithm.
Wherein the tour weight may be used to determine target tour data. The target tour data may be data where positions constituting the rider tour path are located. The initial tour data may be target tour data where a first location that makes up a rider tour path is located. The tour matrix may characterize the path of the rider tour. The tour matrix may be composed of target tour data.
It should be noted that, considering the tour weight and the rider tour algorithm comprehensively, the determined tour matrix is richer than the tour matrix determined based on the rider tour algorithm only, so that the key space is improved, and the encryption effect is further improved.
As an example, this step may include the steps of:
the first step, screening out the next reachable data with the largest tour weight from the next reachable data set corresponding to the initial tour data in the block matrix, and taking the next reachable data with the largest tour weight as the next candidate tour data corresponding to the initial tour data.
And secondly, determining the number of routes corresponding to the next candidate tour data corresponding to the initial tour data, and judging whether the initial tour data has the corresponding next target tour data according to the number of routes corresponding to the next candidate tour data, the backtracking criterion and the heuristic criterion of a rider tour algorithm.
The number of the paths corresponding to the next candidate tour data may be equal to the number of next reachable data of the next candidate tour data. The next reachable data of the next candidate tour data may be data that is next reachable when the rider tours in the block matrix starting from the next candidate tour data. The next candidate tour data may be candidate data for the next target tour data. The next target tour data may be target tour data in which the next position constituting the rider tour path is located. The next target tour data corresponding to the initial tour data may be next target tour data of the initial tour data. If the initial tour data has the corresponding next target tour data, after the initial tour data, the data which is not toured still exists in the block matrix. If the initial tour data does not have the corresponding next target tour data, the data which is not toured does not exist in the block matrix after the initial tour data. The rider tour algorithm may be an algorithm for solving a rider tour problem. That is, the rider tour algorithm may be an algorithm that solves the rider tour problem using a "heuristic-backtracking" method. The rider tour algorithm is also called heuristic rider tour algorithm of heuristic-backtracking, heuristic rider tour algorithm and intelligent heuristic-intelligent backtracking rider tour algorithm. Backtracking criteria may include: intelligent heuristic criteria, first intelligent backtracking criteria, and second intelligent backtracking criteria. The intelligent heuristics criteria may include: if the rider walks to the corner point adjacent to the corner point and the corner point is not the specified tour destination, the rider must walk (probe) the corner point next to find the tour matrix. The first intelligent backtracking criteria may include: if the rider traces back a certain step to the neighboring point of the corner point and the corner point is not the specified tour end point, the rider must trace back further to the neighboring point of another neighboring point of the corner point (i.e., trace back three times in succession) to obtain the tour matrix. The second intelligent backtracking criteria may include: if the rider traces back a point with the number of routes of 1 and the point is not the specified tour destination, the rider must trace back further to the previous step (i.e., trace back twice in succession) of the previous step of the point to obtain the tour matrix. Heuristic criteria may include: if the rider walks to the corner point adjacent to the corner point and the corner point is not the specified tour destination, the rider must walk (probe) the corner point next to find the tour matrix.
For example, the number of next reachable data of the next candidate tour data corresponding to the initial tour data may be first used as the number of routes out corresponding to the next candidate tour data. Then, if the data which is not patrolled still exists in the partitioned matrix after the initial tour data, the trial-and-backtracking tour partitioned matrix can be performed by using the backtracking criterion and the trial criterion of the rider tour algorithm according to the number of the output lines, and whether the initial tour data has the corresponding next target tour data or not is judged.
It should be noted that, if there is data that is not being patrolled in the block matrix when the initial tour data is patrolled, the initial tour data often has corresponding next target tour data. If the data which is not stroked does not exist in the block matrix when the initial stroking data is stroked, the initial stroking data often does not exist corresponding next target stroking data.
Optionally, there may be a plurality of next reachable data with the largest tour weight in the next reachable data set, that is, there may be a plurality of next candidate tour data, so that the next target tour data may be selected from the plurality of next candidate tour data according to the rule of the rider tour algorithm, or one next candidate tour data may be randomly selected as the next target tour data.
Thirdly, when the corresponding next target patrol data exists in the initial patrol data, namely the block matrix is not completed by the patrol (the data which is not completed by the patrol exists in the block matrix), updating the initial patrol data into the next target patrol data corresponding to the initial patrol data, screening out the next reachable data with the largest patrol weight from the next reachable data set corresponding to the latest initial patrol data, taking the next target patrol data with the largest patrol weight as the next candidate patrol data corresponding to the latest initial patrol data, determining the number of the routes which is corresponding to the next candidate patrol data which is not completed by the latest initial patrol data, judging whether the latest initial patrol data has the corresponding next target patrol data according to the number of the routes which is corresponding to the latest obtained next candidate patrol data, the tracing rule and the heuristic rule of a rider patrol algorithm, and repeating the step of determining the next target patrol data until the latest initial patrol data has the corresponding next target patrol data, namely the block matrix is not completed by the block matrix when the latest initial patrol data has the corresponding downstream target patrol data, namely the block matrix is not completed by the first target patrol data.
Wherein the repeated next target tour data determining step may include: updating the initial tour data into the next target tour data corresponding to the latest updated initial tour data, screening out the next reachable data with the largest tour weight from the next reachable data set corresponding to the latest updated initial tour data, serving as the next candidate tour data corresponding to the latest updated initial tour data, determining the number of routes corresponding to the next candidate tour data corresponding to the latest updated initial tour data, and judging whether the latest updated initial tour data has the corresponding next target tour data according to the number of routes corresponding to the latest obtained next candidate tour data, the tracing criteria and the heuristic criteria of a rider tour algorithm.
Alternatively, the tour matrix may be used as the key.
It should be noted that, the improvement of the rider tour algorithm in the step S7 mainly includes: and modifying the minimum number of routes selected from the existing cavalier tour algorithm as a backtracking standard to select the maximum tour weight as the backtracking standard. The selecting the minimum number of routes as the backtracking standard may include: and taking the next reachable data with the least number of routes in the next reachable data set corresponding to a certain tour data as the next candidate tour data of the tour data. The selecting the maximum tour weight as the backtracking criterion may include: and taking the next reachable data with the largest tour weight in the next reachable data set corresponding to a certain tour data as the next candidate tour data of the tour data. Because the tour weight is determined based on the degree of confusion between the last tour data of the next reachable data and the post-trend data set corresponding to the next reachable data, and the larger the tour weight is, the better the effect of selecting the next reachable data as the tour data for scrambling encryption is often described, so when the maximum tour weight is selected as a tracing standard, each time the tour data is determined to be selected through the data scrambling degree self-adaption, the maximum tour weight is selected as the tracing standard, compared with the case of selecting the minimum number of channels as the tracing standard for scrambling encryption, the tour matrix of the same tour starting point and the data matrix with the same size is often not generated, and the key space is relatively large, thereby the data encryption effect is relatively good, and the data security is relatively high.
And S8, performing encryption transformation processing on the target mapping matrix according to the tour matrix corresponding to each block matrix in the block matrix set corresponding to each target mapping matrix to obtain the ciphertext matrix corresponding to the target mapping matrix.
In some embodiments, the encryption transformation process may be performed on the target mapping matrix according to the tour matrix corresponding to each block matrix in the block matrix set corresponding to each target mapping matrix, to obtain the ciphertext matrix corresponding to the target mapping matrix.
It should be noted that, based on the tour matrix corresponding to each block matrix in the block matrix set corresponding to each target mapping matrix, the target mapping matrix is further encrypted, so that the encryption effect and the security of the data can be improved.
As an example, this step may include the steps of:
and a first step of determining the structural similarity between each block matrix and the tour matrix corresponding to the block matrix, and taking the structural similarity as the transformation similarity corresponding to the block matrix.
For example, an SSIM (Structural Similarity ) algorithm may be used to determine structural similarity between a block matrix and a tour matrix corresponding to the block matrix as the transformation similarity corresponding to the block matrix. Wherein, the value range of the transformation similarity can be [ -1,1].
And secondly, sorting the blocking matrixes in the blocking matrix set corresponding to the target mapping matrix according to the transformation similarity to obtain a blocking matrix sequence corresponding to the target mapping matrix.
For example, according to the transformation similarity, the block matrixes in the block matrix set are ordered in order from small to large, so as to obtain a block matrix sequence.
And thirdly, performing exclusive OR processing on the next change matrix and the tour matrix corresponding to each block matrix in the block matrix sequence, and performing tour transformation to obtain a target matrix corresponding to each block matrix in the block matrix sequence.
The next change matrix corresponding to the block matrix may be a tour matrix corresponding to the next block matrix of the block matrix or a tour matrix corresponding to a preset block matrix. The preset blocking matrix may be a blocking matrix with minimum transformation similarity in the blocking matrix set. The tour transformation is also called iterative rider tour. The target matrix corresponding to the block matrix may be a matrix obtained by performing exclusive or processing on the block matrix and performing tour transformation.
For example, xoring the next change matrix and tour matrix corresponding to each block matrix in the sequence of block matrices may include the sub-steps of:
The first substep, for each block matrix except the last block matrix in the block matrix sequence, may perform exclusive-or processing on the tour matrix corresponding to the block matrix according to the tour matrix corresponding to the next block matrix of the block matrix in the block matrix sequence.
For example, the first block matrix may be xored according to a tour matrix corresponding to a next block matrix of the first block matrix in the block matrix sequence.
And a second sub-step, for the last block matrix in the block matrix sequence, performing exclusive-or processing on the tour matrix corresponding to the block matrix according to the tour matrix corresponding to the first block matrix in the block matrix sequence.
Fourth, determining ciphertext matrixes corresponding to the target mapping matrixes according to the target matrixes corresponding to the block matrixes in the block matrix sequence corresponding to the target mapping matrixes.
For example, according to the target matrix corresponding to each block matrix in the block matrix sequence corresponding to the target mapping matrix, determining the ciphertext matrix corresponding to the target mapping matrix may include the following sub-steps:
and a first sub-step of determining the structural similarity between each block matrix and the target matrix corresponding to the block matrix, and taking the structural similarity as the target similarity corresponding to the block matrix.
For example, an SSIM algorithm may be used to determine the structural similarity between the blocking matrix and the target matrix corresponding to the blocking matrix, as the target similarity corresponding to the blocking matrix. Wherein, the value range of the target similarity can be [ -1,1].
And a second sub-step of determining the overall similarity corresponding to the target mapping matrix according to the target similarity corresponding to each block matrix in the block matrix sequence.
Wherein the target similarity may be positively correlated with the overall similarity.
For example, the formula for determining the overall similarity corresponding to the target mapping matrix may be:
wherein, the liquid crystal display device comprises a liquid crystal display device,is the overall similarity corresponding to the ith target mapping matrix in the set of target mapping matrices. N is the number of target mapping matrices in the set of target mapping matrices.Is the target similarity corresponding to the j-th blocking matrix in the blocking matrix set corresponding to the i-th target mapping matrix.And (3) withAnd shows positive correlation. i is the sequence number of the target mapping matrix in the set of target mapping matrices. j is the sequence number of the blocking matrix in the blocking matrix set corresponding to the ith target mapping matrix.
When the following is performedThe larger the structure, the more similar the structure between the jth block matrix and the target matrix corresponding to the jth block matrix is often explained. Thus (2) The larger the size, the more likely the block corresponding to the ith target mapping matrix is describedThe more similar the structures between each block matrix in the matrix set and the corresponding target matrix, the easier the target matrix is to be cracked when being used as the encrypted block matrix, and the worse the effect of encrypting the block matrix is.
And a third sub-step, when the overall similarity is smaller than a preset similarity threshold, combining target matrixes corresponding to each block matrix in the block matrix sequence into the ciphertext matrix.
The preset similarity threshold may be a preset overall similarity when the blocking matrix is considered to have reached the secure encryption requirement. For example, the preset similarity threshold may be 0.
For example, when the overall similarity corresponding to the target mapping matrix is smaller than a preset similarity threshold, the target matrix corresponding to each block matrix in the block matrix sequence can be spliced according to the position of the block matrix in the target mapping matrix, and the spliced matrix is determined as the ciphertext matrix corresponding to the target mapping matrix.
And a fourth sub-step of re-ordering the block matrices in the block matrix sequence according to the target similarity when the overall similarity is greater than or equal to a preset similarity threshold, obtaining a target block matrix sequence, updating the block matrix sequence into the target block matrix sequence, determining the updated overall similarity corresponding to the target mapping matrix according to the target similarity corresponding to each block matrix in the latest updated block matrix sequence, combining the target matrices corresponding to each block matrix in the latest updated block matrix sequence into the ciphertext matrix when the latest updated overall similarity is less than the preset similarity threshold, and repeating the overall similarity determining step when the latest updated overall similarity is greater than or equal to the preset similarity threshold until the latest updated overall similarity is less than the preset similarity threshold, and combining the target matrices corresponding to each block in the latest updated block matrix sequence into the ciphertext matrix.
The target block matrix sequence may be a sequence obtained by reordering the block matrices in the block matrix sequence according to the target similarity. Reordering the blocking matrices in the sequence of blocking matrices may include: and sorting the blocking matrixes in the blocking matrix sequence according to the target similarity from small to large. The repeated overall similarity determination step may include: and re-ordering the blocking matrixes in the blocking matrix sequence according to the target similarity corresponding to each blocking matrix in the latest updated blocking matrix sequence to obtain an updated target blocking matrix sequence, updating the blocking matrix sequence into the latest updated target blocking matrix sequence, and determining the updated overall similarity corresponding to the target mapping matrix according to the target similarity corresponding to each blocking matrix in the latest updated blocking matrix sequence.
It should be noted that, the encryption transformation is performed on the target mapping matrix, so that the data in the target mapping matrix is updated, thereby improving the encryption effect.
Alternatively, the order of exclusive or may be used as the key.
And S9, generating target ciphertext information corresponding to the information to be transmitted according to the ciphertext matrix corresponding to the target mapping matrix, and transmitting the target ciphertext information to the target block chain.
In some embodiments, the target ciphertext information corresponding to the information to be transmitted may be generated according to a ciphertext matrix corresponding to the target mapping matrix, and the target ciphertext information may be transmitted to a target blockchain.
The target ciphertext information may be information to be transmitted after being encrypted. The target blockchain may be a blockchain for receiving information to be transmitted.
It should be noted that, according to the ciphertext matrix corresponding to the target mapping matrix, the target ciphertext information corresponding to the information to be transmitted is generated, and the target ciphertext information is transmitted to the target blockchain, so that secret communication of the information to be transmitted can be realized, and the initial tour data, the next reachable data set, the posttrend data set, the tour weight, the rider tour algorithm and the encryption transformation processing in the blocking matrix are comprehensively considered.
As an example, ciphertext matrices corresponding to all target mapping matrices may be converted into stream data according to a tour path, the stream data obtained by the conversion is used as target ciphertext information, and the target ciphertext information is transmitted to a target blockchain.
It should be noted that, since the target ciphertext information transmitted to the target blockchain is the information to be transmitted after being encrypted, the risk of data tampering and destruction can be reduced.
Alternatively, the ciphertext matrix may be decrypted by inverting the exclusive OR and employing an inverse tour transform of the tour matrix.
Optionally, with the advent of the big data age and the rapid development of the internet, transaction data becomes an important operation foundation of commercial transactions, encryption and sharing of data between merchants become an urgent problem to be solved, all data in the traditional data transmission and sharing process need to pass through a central server, and when the node data of the central server is tampered or destroyed, the saved data is invalid, thereby bringing great loss to commercial transactions. The private blockchain is used for transmitting transaction data to a plurality of nodes for storage, and the read authority of the data points of the private chain is opened to each node, so that the stored data is disclosed to each node, all data in the private chain is leaked when any node is broken, and the read authority of the business transaction data is limited for different users, so that confidential data is prevented from being leaked to low-authority users. Therefore, the encryption method can be adopted to encrypt the confidential data on the blockchain for preventing data leakage.
In conclusion, firstly, the acquired information to be transmitted is subjected to transformation mapping processing, so that the information to be transmitted can be conveniently encrypted based on a rider tour algorithm. Secondly, the data formats corresponding to the data included in the information to be transmitted may be different, so that the data included in the information to be transmitted is converted, the data included in the information to be transmitted can be uniformly adjusted into decimal data, and subsequent processing can be facilitated. Then, since the larger the size of the matrix is, the longer the time for generating the corresponding tour matrix is, which tends to result in lower generation efficiency of the corresponding tour matrix, each target mapping matrix in the target mapping matrix set is subjected to blocking processing, so that the size of each matrix for generating the tour matrix can be reduced, and the efficiency of subsequently generating the tour matrix can be improved. And then, the initial tour data is screened out from each partitioned matrix in the partitioned matrix set, so that the generation of the corresponding tour matrix can be conveniently carried out later. Continuing, the next reachable data set corresponding to the initial tour data in each block matrix is comprehensively considered, so that the accuracy of determining the first afterward fluctuation corresponding to the initial tour data can be improved. Secondly, the acquired data set corresponding to each piece of next reachable data in the next reachable data set is comprehensively considered, so that the accuracy of determining the second acquired fluctuation corresponding to the next reachable data can be improved. And then, comprehensively considering the first afterward fluctuation corresponding to the initial tour data and the second afterward fluctuation corresponding to each next reachable data in the next reachable data set, and improving the accuracy of tour weight determination corresponding to the next reachable data. And then, comprehensively considering the tour weight and the rider tour algorithm, wherein the determined tour matrix is richer in tour path compared with the tour matrix determined based on the rider tour algorithm only, so that the key space is improved, and the encryption effect is further improved. And secondly, the target mapping matrix is further encrypted based on the tour matrix corresponding to each block matrix in the block matrix set corresponding to each target mapping matrix, so that the encryption effect and the data security can be improved. Finally, according to the ciphertext matrix corresponding to the target mapping matrix, generating target ciphertext information corresponding to the information to be transmitted, and transmitting the target ciphertext information to a target blockchain, secret communication of the information to be transmitted can be achieved, initial tour data, next reachable data set, postdrive data set, tour weight, a rider tour algorithm and encryption transformation processing in the partitioned matrix are comprehensively considered, and compared with scrambling encryption based on the rider tour algorithm only, the method disclosed by the invention not only scrambles the sequence of data in the partitioned matrix, but also updates the data in the partitioned matrix through encryption transformation processing, and the scrambling sequence is richer than scrambling sequence based on the minimum number of routes, so that encryption effect and data security are improved.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention and are intended to be included within the scope of the invention.

Claims (6)

1. The data theft and tampering prevention encryption method based on the blockchain is characterized by comprising the following steps of:
acquiring information to be transmitted, and carrying out conversion mapping treatment on the information to be transmitted to obtain a target mapping matrix set;
performing blocking processing on each target mapping matrix in the target mapping matrix set to obtain a blocking matrix set corresponding to the target mapping matrix;
screening initial tour data from each block matrix in a block matrix set;
determining first afterward fluctuation corresponding to the initial tour data according to a next reachable data set corresponding to the initial tour data in each block matrix;
Determining a second aftertrend fluctuation corresponding to next reachable data according to the aftertrend data set corresponding to each next reachable data in the next reachable data sets;
determining a tour weight corresponding to the next reachable data according to the first afterward fluctuation corresponding to the initial tour data and the second afterward fluctuation corresponding to each next reachable data in the next reachable data set;
determining a tour matrix corresponding to each block matrix according to tour weights and a rider tour algorithm, wherein the tour weights are used for determining target tour data;
according to the tour matrix corresponding to each block matrix in the block matrix set corresponding to each target mapping matrix, carrying out encryption transformation processing on the target mapping matrix to obtain a ciphertext matrix corresponding to the target mapping matrix;
generating target ciphertext information corresponding to the information to be transmitted according to a ciphertext matrix corresponding to the target mapping matrix, and transmitting the target ciphertext information to a target block chain, wherein the successor data in the successor data set corresponding to the next reachable data is the next reachable data of the next reachable data;
the determining, according to the next reachable data set corresponding to the initial tour data in each block matrix, a first post-trend fluctuation corresponding to the initial tour data includes:
Determining next representative data corresponding to the initial tour data according to a next reachable data set corresponding to the initial tour data, wherein each next reachable data in the next reachable data set is positively correlated with the next representative data;
determining the absolute value of the difference value between the initial tour data and the next representative data as a first afterward fluctuation corresponding to the initial tour data;
the determining, according to the successor data set corresponding to each next reachable data in the next reachable data sets, a second successor fluctuation corresponding to the next reachable data includes:
determining the post-trend representative data corresponding to the next reachable data according to the post-trend data set corresponding to the next reachable data, wherein each post-trend data in the post-trend data set is positively correlated with the post-trend representative data;
determining the absolute value of the difference value between the next reachable data and the post-trend representative data as a second post-trend fluctuation corresponding to the next reachable data;
the determining the tour weight corresponding to the next reachable data according to the first post-trend fluctuation corresponding to the initial tour data and the second post-trend fluctuation corresponding to each next reachable data in the next reachable data set comprises the following steps:
Determining an initial weight corresponding to the initial tour data according to a first post-trend fluctuation corresponding to the initial tour data and a second post-trend fluctuation corresponding to each next reachable data in a next reachable data set, wherein the first post-trend fluctuation and the second post-trend fluctuation are positively correlated with the initial weight;
determining the absolute value of the difference value between the initial tour data and the next reachable data as a data difference index corresponding to the next reachable data;
and determining the tour weight corresponding to the next reachable data according to the initial weight corresponding to the initial tour data and the data difference index corresponding to the next reachable data, wherein the initial weight and the data difference index are positively correlated with the tour weight.
2. The blockchain-based data theft and tampering prevention encryption method according to claim 1, wherein the determining the tour matrix corresponding to each block matrix according to the tour weight and the rider tour algorithm comprises:
screening out the next reachable data with the largest tour weight from the next reachable data set corresponding to the initial tour data in the block matrix, and taking the next reachable data with the largest tour weight as the next candidate tour data corresponding to the initial tour data;
Determining the number of routes corresponding to the next candidate tour data corresponding to the initial tour data, and judging whether the initial tour data has the corresponding next target tour data according to the number of routes corresponding to the next candidate tour data, the backtracking criterion and the heuristic criterion of a rider tour algorithm;
when the initial tour data has the corresponding next target tour data, updating the initial tour data into the next target tour data corresponding to the initial tour data, screening out the next reachable data with the largest tour weight from the next reachable data set corresponding to the latest updated initial tour data, determining the number of routes corresponding to the next candidate tour data corresponding to the latest initial tour data as the next candidate tour data corresponding to the latest initial tour data, judging whether the latest initial tour data has the corresponding next target tour data according to the number of routes corresponding to the latest next candidate tour data, the tracing rule and the heuristic rule of a rider tour algorithm, and repeating the next target tour data determining step until all the obtained initial tour data are combined into the corresponding tour matrix when the latest initial tour data does not have the corresponding next target tour data.
3. The method for preventing data from being stolen and tampered based on blockchain as in claim 1, wherein the performing encryption transformation processing on the target mapping matrix according to the tour matrix corresponding to each block matrix in the block matrix set corresponding to each target mapping matrix to obtain the ciphertext matrix corresponding to the target mapping matrix comprises the following steps:
determining the structural similarity between each block matrix and a tour matrix corresponding to the block matrix, and taking the structural similarity as the transformation similarity corresponding to the block matrix;
according to the transformation similarity, sorting the blocking matrixes in the blocking matrix set corresponding to the target mapping matrix to obtain a blocking matrix sequence corresponding to the target mapping matrix;
performing exclusive or processing on a next change matrix and a tour matrix corresponding to each block matrix in the block matrix sequence, and performing tour transformation to obtain a target matrix corresponding to each block matrix in the block matrix sequence, wherein the next change matrix corresponding to the block matrix is a tour matrix corresponding to the next block matrix of the block matrix or a tour matrix corresponding to a preset block matrix;
and determining a ciphertext matrix corresponding to the target mapping matrix according to the target matrix corresponding to each block matrix in the block matrix sequence corresponding to the target mapping matrix.
4. The method for preventing data from being stolen and tampered based on blockchain according to claim 3, wherein the determining the ciphertext matrix corresponding to the target mapping matrix according to the target matrix corresponding to each blocking matrix in the sequence of blocking matrices corresponding to the target mapping matrix comprises:
determining the structural similarity between each block matrix and a target matrix corresponding to the block matrix, and taking the structural similarity as the target similarity corresponding to the block matrix;
determining the overall similarity corresponding to the target mapping matrix according to the target similarity corresponding to each block matrix in the block matrix sequence, wherein the target similarity and the overall similarity are positively correlated;
when the overall similarity is smaller than a preset similarity threshold, combining target matrixes corresponding to all the block matrixes in the block matrix sequence into the ciphertext matrix;
and when the overall similarity is greater than or equal to a preset similarity threshold, reordering the block matrixes in the block matrix sequence according to the target similarity to obtain a target block matrix sequence, updating the block matrix sequence into a target block matrix sequence, determining the updated overall similarity corresponding to the target mapping matrix according to the target similarity corresponding to each block matrix in the latest updated block matrix sequence, combining the target matrixes corresponding to each block matrix in the latest updated block matrix sequence into the ciphertext matrix when the latest updated overall similarity is less than the preset similarity threshold, and repeating the overall similarity determining step until the overall similarity corresponding to each block matrix in the latest updated block matrix sequence is less than the preset similarity threshold, and combining the target matrixes corresponding to each block matrix in the latest updated block matrix sequence into the ciphertext matrix when the latest updated overall similarity is less than the preset similarity threshold.
5. The blockchain-based data theft and tampering prevention encryption method according to claim 1, wherein the converting and mapping the information to be transmitted to obtain a target mapping matrix set includes:
performing conversion processing on each data included in the information to be transmitted, and determining the converted data as data to be encrypted to obtain a data set to be encrypted;
mapping the data set to be encrypted into a first preset number of target mapping matrixes, wherein the target mapping matrix set comprises: a first predetermined number of target mapping matrices.
6. The method for preventing data from being stolen and tampered based on blockchain as in claim 1, wherein the performing the blocking processing on each target mapping matrix in the target mapping matrix set to obtain a blocking matrix set corresponding to the target mapping matrix comprises:
equally dividing the target mapping matrix into a second preset number of blocking matrices, wherein the blocking matrix set corresponding to the target mapping matrix comprises: a second predetermined number of blocking matrices.
CN202310753246.5A 2023-06-26 2023-06-26 Data theft and tampering prevention encryption method based on block chain Active CN116506105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310753246.5A CN116506105B (en) 2023-06-26 2023-06-26 Data theft and tampering prevention encryption method based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310753246.5A CN116506105B (en) 2023-06-26 2023-06-26 Data theft and tampering prevention encryption method based on block chain

Publications (2)

Publication Number Publication Date
CN116506105A CN116506105A (en) 2023-07-28
CN116506105B true CN116506105B (en) 2023-09-01

Family

ID=87326959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310753246.5A Active CN116506105B (en) 2023-06-26 2023-06-26 Data theft and tampering prevention encryption method based on block chain

Country Status (1)

Country Link
CN (1) CN116506105B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117744128B (en) * 2024-02-21 2024-05-14 广州久零区块链技术有限公司 E-commerce transaction data security management method based on block chain

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107045656A (en) * 2017-02-23 2017-08-15 沈阳理工大学 Based on the intelligent scenic spot tour planing method for improving ant group algorithm
CN108737494A (en) * 2018-04-08 2018-11-02 广西大学 teaching platform based on cloud computing
US10911217B1 (en) * 2017-01-20 2021-02-02 Josiah Johnson Umezurike Endpoint-to-endpoint cryptographic system for mobile and IoT devices
US11367065B1 (en) * 2018-01-19 2022-06-21 Josiah Johnson Umezurike Distributed ledger system for electronic transactions
WO2022142038A1 (en) * 2020-12-29 2022-07-07 平安普惠企业管理有限公司 Data transmission method and related device
CN115208551A (en) * 2022-07-26 2022-10-18 石家庄学院 Image space domain encryption and decryption method
CN115544551A (en) * 2022-11-28 2022-12-30 北京思众电子科技有限公司 Data encryption method for MCU singlechip operating system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10911217B1 (en) * 2017-01-20 2021-02-02 Josiah Johnson Umezurike Endpoint-to-endpoint cryptographic system for mobile and IoT devices
CN107045656A (en) * 2017-02-23 2017-08-15 沈阳理工大学 Based on the intelligent scenic spot tour planing method for improving ant group algorithm
US11367065B1 (en) * 2018-01-19 2022-06-21 Josiah Johnson Umezurike Distributed ledger system for electronic transactions
CN108737494A (en) * 2018-04-08 2018-11-02 广西大学 teaching platform based on cloud computing
WO2022142038A1 (en) * 2020-12-29 2022-07-07 平安普惠企业管理有限公司 Data transmission method and related device
CN115208551A (en) * 2022-07-26 2022-10-18 石家庄学院 Image space domain encryption and decryption method
CN115544551A (en) * 2022-11-28 2022-12-30 北京思众电子科技有限公司 Data encryption method for MCU singlechip operating system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于骑士巡游的改进图像加密算法;潘营利;计算机与数字工程;全文 *

Also Published As

Publication number Publication date
CN116506105A (en) 2023-07-28

Similar Documents

Publication Publication Date Title
Ye et al. An effective framework for chaotic image encryption based on 3D logistic map
Wang et al. A novel image encryption algorithm using chaos and reversible cellular automata
Chen et al. Pseudorandom Number Generator Based on Three Kinds of Four‐Wing Memristive Hyperchaotic System and Its Application in Image Encryption
Kengnou Telem et al. A simple and robust gray image encryption scheme using chaotic logistic map and artificial neural network
CN116506105B (en) Data theft and tampering prevention encryption method based on block chain
Deng et al. A digital image encryption algorithm based on chaotic mapping
An et al. Image encryption algorithm based on adaptive wavelet chaos
Naskar et al. An efficient block-level image encryption scheme based on multi-chaotic maps with DNA encoding
CN111639367B (en) Tree model-based two-party combined classification method, device, equipment and medium
Man et al. A novel image encryption algorithm based on least squares generative adversarial network random number generator
CN113938691B (en) Reversible information hiding method for encrypted image
Karawia Image encryption based on Fisher‐Yates shuffling and three dimensional chaotic economic map
Pashakolaee et al. Hyper-chaotic Feeded GA (HFGA): a reversible optimization technique for robust and sensitive image encryption
CN110225222B (en) Image encryption method based on 3D orthogonal Latin square and chaotic system
Qin et al. A Verifiable Steganography‐Based Secret Image Sharing Scheme in 5G Networks
CN116527235A (en) Data encryption method and device based on key rotation and electronic equipment
Ye et al. Reversible image hiding algorithm based on compressive sensing and deep learning
Gao et al. High-performance reversible data hiding in encrypted images with adaptive Huffman code
Alshehri et al. Cryptanalysis of 2D-SCMCI Hyperchaotic Map Based Image Encryption Algorithm.
Tong et al. Nonlinear Multi‐Image Encryption Scheme with the Reality‐Preserving Discrete Fractional Angular Transform and DNA Sequences
Cui et al. A new image encryption algorithm based on DNA dynamic encoding and hyper-chaotic system
Tuli et al. PixJS: A novel chaos‐based approach for image encryption
Raju et al. Error-free and mean value based reversible data hiding using gravitational search algorithm in encrypted images
Kumar et al. SOCIET: Second-order cellular automata and chaotic map-based hybrid image encryption technique
Huang et al. Development of a Novel Hyperchaos‐Based Image Encryption Algorithm Consisting of Two Scrambling‐Diffusion Operations

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