CN115378590A - Energy data safe storage method and system based on block chain - Google Patents

Energy data safe storage method and system based on block chain Download PDF

Info

Publication number
CN115378590A
CN115378590A CN202211323149.4A CN202211323149A CN115378590A CN 115378590 A CN115378590 A CN 115378590A CN 202211323149 A CN202211323149 A CN 202211323149A CN 115378590 A CN115378590 A CN 115378590A
Authority
CN
China
Prior art keywords
data
groups
encrypted
group
block
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.)
Granted
Application number
CN202211323149.4A
Other languages
Chinese (zh)
Other versions
CN115378590B (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.)
Jinhua Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Yiwu Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Original Assignee
Jinhua Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Yiwu Power Supply Co of State Grid Zhejiang Electric Power 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 Jinhua Power Supply Co of State Grid Zhejiang Electric Power Co Ltd, Yiwu Power Supply Co of State Grid Zhejiang Electric Power Co Ltd filed Critical Jinhua Power Supply Co of State Grid Zhejiang Electric Power Co Ltd
Priority to CN202211323149.4A priority Critical patent/CN115378590B/en
Publication of CN115378590A publication Critical patent/CN115378590A/en
Application granted granted Critical
Publication of CN115378590B publication Critical patent/CN115378590B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/44Secrecy systems
    • 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)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Storage Device Security (AREA)

Abstract

The invention is suitable for the technical field of electric digital data processing, and particularly relates to a safe energy data storage method and system based on a block chain, wherein the method comprises the following steps: acquiring a random encryption data image set and data to be encrypted; intercepting head data from data to be encrypted, equally dividing the intercepted data to be encrypted into N groups of data to be processed, and performing average segmentation to obtain N groups of data block groups; carrying out byte segmentation to obtain data with a specific length, and generating N groups of encrypted data sources according to the data; and recombining the N groups of data block groups according to the N groups of encrypted data sources to obtain recombined data. According to the invention, the picture is randomly obtained and used as the basis for encrypting the energy data, so that the data to be encrypted is subjected to multilayer division, the data to be encrypted obtained by division is recombined according to a specific sequence, and the content of the picture is random, so that the recombined data obtained by using the picture as the encryption basis is also random, and the encryption security of the data is effectively ensured.

Description

Energy data safe storage method and system based on block chain
Technical Field
The invention belongs to the technical field of electric digital data processing, and particularly relates to a safe energy data storage method and system based on a block chain.
Background
The block chain is a chain formed by blocks. Each block holds certain information, which are linked in a chain according to a respective generated time sequence. This chain is maintained in all servers, and as long as one server can work in the entire system, the entire blockchain is secure.
Energy generally refers to coal, oil, natural gas, biomass, electricity, heat, other various resources that derive useful energy either directly or through processing and conversion; in the process of energy metering, a large amount of energy data is generated, and the energy data needs to be stored.
In the current energy data storage process, the energy data is generally directly stored in a database, and because the data volume is huge, the energy data is difficult to encrypt and store by a conventional encryption means, so that a method for safely storing the energy data with higher safety is urgently needed.
Disclosure of Invention
The embodiment of the invention aims to provide a safe energy data storage method based on a block chain, and aims to solve the problem that encryption and storage are difficult to perform through a conventional encryption means due to huge data volume.
The embodiment of the invention is realized in such a way that a block chain-based energy data safe storage method comprises the following steps:
acquiring a random encrypted data image set and data to be encrypted, wherein the random encrypted data image set is randomly acquired pictures, and a group of random encrypted data image sets comprises N groups of pictures;
intercepting head data from data to be encrypted, equally dividing the intercepted data to be encrypted into N groups of data to be processed, and averagely dividing each group of data to be processed to obtain N groups of data block groups, wherein each data block group comprises M data blocks, and the data blocks in the same data block group are continuously numbered;
carrying out byte segmentation on data corresponding to N groups of pictures to obtain data with a specific length, and generating N groups of encrypted data sources according to the data, wherein the N groups of encrypted data sources correspond to the N groups of data block groups one by one;
and recombining the N groups of data block groups according to the N groups of encrypted data sources to obtain recombined data, publishing the recombined data to the block chain, and dispersedly storing the head data and the random encrypted data image set to the local server.
Preferably, the step of intercepting the header data from the data to be encrypted, equally dividing the intercepted data to be encrypted into N groups of data to be processed, and averagely dividing each group of data to be processed to obtain N groups of data block groups specifically includes:
intercepting head data from data to be encrypted, wherein the intercepting proportion of the head data is determined according to a random encrypted data image set;
equally dividing the data to be encrypted, in which the head data is intercepted, into N groups, and numbering the N groups to be processed to obtain N groups of data to be processed;
and averagely dividing the numbered N groups of data to be processed, wherein the dividing quantity of each group of data to be processed is the same, and obtaining N groups of data block groups.
Preferably, the step of performing byte segmentation on the data corresponding to the N groups of pictures to obtain data with a specific length, and generating N groups of encrypted data sources according to the data, specifically includes:
determining byte segmentation length according to the number of pictures contained in the random encrypted data image set;
carrying out byte segmentation on data corresponding to N groups of pictures to obtain data with specific length, wherein each group of pictures corresponds to one group of data with specific length, and each group of data with specific length comprises a plurality of byte sections with specific byte length;
a set of sequence numbers is generated from each field, the sequence numbers forming the source of the encrypted data.
Preferably, the step of recombining the N groups of data block groups according to the N groups of encrypted data sources to obtain recombined data specifically includes:
determining the serial numbers of the data blocks in each group of data block groups, wherein the data blocks in the N groups of data block groups correspond to one another in sequence;
determining the order of recombination according to the N groups of encrypted data sources to generate a recombined sequence;
and exchanging positions in the N groups of data block groups according to the recombination sequence to obtain recombination data.
Preferably, the header data occupies no more than 1% of the data to be encrypted.
Preferably, the header data and the image set of randomly encrypted data are encrypted prior to storage.
Another object of an embodiment of the present invention is to provide a block chain-based energy data secure storage system, including:
the data acquisition module is used for acquiring a random encrypted data image set and data to be encrypted, wherein the random encrypted data image set is randomly acquired pictures, and one group of random encrypted data image set comprises N groups of pictures;
the data segmentation module is used for intercepting head data from data to be encrypted, equally dividing the intercepted data to be encrypted into N groups of data to be processed, and averagely segmenting each group of data to be processed to obtain N groups of data blocks, wherein each data block group comprises M data blocks, and the data blocks in the same data block group are continuously numbered;
the encryption source processing module is used for carrying out byte segmentation on data corresponding to the N groups of pictures to obtain data with a specific length, and generating N groups of encryption data sources according to the data, wherein the N groups of encryption data sources correspond to the N groups of data block groups one by one;
and the data recombination module is used for recombining the N groups of data block groups according to the N groups of encrypted data sources to obtain recombined data, publishing the recombined data to the block chain, and dispersedly storing the head data and the random encrypted data image set to the local server.
Preferably, the data slicing module includes:
the head data interception unit is used for intercepting head data from data to be encrypted, and the interception proportion of the head data is determined according to the random encrypted data image set;
the data equally dividing unit is used for equally dividing the data to be encrypted of the intercepted head data into N groups and numbering the N groups to obtain N groups of data to be processed;
and the data block segmentation unit is used for averagely segmenting the numbered N groups of data to be processed, wherein the segmentation quantity of each group of data to be processed is the same, and N groups of data block groups are obtained.
Preferably, the encryption source processing module includes:
a division length determination unit for determining a byte division length according to the number of pictures contained in the random encrypted data image set;
the picture data segmentation unit is used for carrying out byte segmentation on data corresponding to N groups of pictures to obtain data with specific length, each group of pictures corresponds to one group of data with specific length, and each group of data with specific length comprises a plurality of byte segments with specific byte length;
and the sequence number generation unit is used for generating a group of sequence numbers according to each byte section, and the sequence numbers form an encrypted data source.
Preferably, the data reorganization module includes:
the number confirmation unit is used for determining the number of the data blocks in each group of data block groups, and the data blocks in the N groups of data block groups correspond to one another in sequence;
the sequence generating unit is used for determining the recombination sequence according to the N groups of encrypted data sources and generating a recombination sequence;
and the data block recombination unit is used for exchanging positions in the N groups of data block groups according to the recombination sequence to obtain recombined data.
According to the energy data safe storage method based on the block chain, provided by the embodiment of the invention, the picture is randomly obtained and used as a basis for encrypting the energy data, so that the data to be encrypted is subjected to multilayer division, and the data to be encrypted obtained by division is recombined according to a specific sequence.
Drawings
Fig. 1 is a flowchart of a method for safely storing energy data based on a block chain according to an embodiment of the present invention;
fig. 2 is a flowchart of a step of intercepting header data from data to be encrypted, equally dividing the intercepted data to be encrypted into N groups of data to be processed, and performing average segmentation on each group of data to be processed to obtain N groups of data blocks according to the embodiment of the present invention;
fig. 3 is a flowchart of a step of performing byte segmentation on data corresponding to N groups of pictures to obtain data with a specific length, and generating N groups of encrypted data sources according to the data;
fig. 4 is a flowchart of a step of recombining the N groups of data block groups according to the N groups of encrypted data sources to obtain recombined data according to the embodiment of the present invention;
fig. 5 is an architecture diagram of a block chain-based energy data secure storage system according to an embodiment of the present invention;
FIG. 6 is a block diagram of a data slicing module according to an embodiment of the present invention;
fig. 7 is an architecture diagram of an encryption source processing module according to an embodiment of the present invention;
fig. 8 is an architecture diagram of a data reconstructing module according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements should not be limited by these terms unless otherwise specified. These terms are only used to distinguish one element from another. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script, without departing from the scope of the present application.
Energy generally refers to coal, oil, natural gas, biomass, electricity, heat, other various resources that derive useful energy either directly or through processing and conversion; in the process of energy metering, a large amount of energy data is generated, and the energy data needs to be stored. In the current energy data storage process, the energy data is generally directly stored in a database, and the data volume is huge, so that the encryption and storage are difficult to perform through a conventional encryption means, and therefore, a method for safely storing the energy data with higher safety is urgently needed.
According to the method and the device, the pictures are randomly acquired and used as the basis for encrypting the energy data, so that the data to be encrypted is subjected to multilayer division, the data to be encrypted obtained by division are recombined according to a specific sequence, and the content of the pictures is random, so that the recombined data obtained by using the pictures as the encryption basis is also random, and the encryption safety of the data is effectively ensured.
As shown in fig. 1, a flowchart of a block chain-based energy data secure storage method provided in an embodiment of the present invention is shown, where the method includes:
s100, acquiring a random encrypted data image set and data to be encrypted, wherein the random encrypted data image set is randomly acquired pictures, and a group of random encrypted data image sets comprises N groups of pictures.
In this step, a random encrypted data image set and data to be encrypted are obtained, the random encrypted data image set includes N groups of pictures, the pictures are randomly acquired pictures, a camera is separately arranged, pictures with random changes can be acquired, for example, river pictures are shot through the camera, the number of the pictures can be 8, that is, N is 8, and the data to be encrypted is energy data to be stored.
S200, intercepting head data from the data to be encrypted, equally dividing the intercepted data to be encrypted into N groups of data to be processed, averagely dividing each group of data to be processed to obtain N groups of data block groups, wherein each data block group comprises M data blocks, and the data blocks in the same data block group are continuously numbered.
In this step, head data is intercepted from data to be encrypted, the head data is intercepted first, when the interception is performed, the proportion of the interception is determined according to a random encrypted data image set, then the proportion of the obtained head data is random, the data to be encrypted after the interception is further divided into N groups of data to be processed, namely, the data to be processed is divided into 8 groups of data to be processed, if the proportion of the data to be processed is (1-a%)/N if the proportion of the data to be processed is a% of the head data, then the data to be processed is divided evenly, if the 8 groups of data to be processed are a, b, c, d, e, f, g and h respectively, the data to be processed is divided into M data blocks equally, and the number of each data block is a 1 ,a 2 ……,a M (ii) a The header data occupies no more than 1% of the data to be encrypted.
S300, carrying out byte segmentation on data corresponding to the N groups of pictures to obtain data with a specific length, and accordingly generating N groups of encrypted data sources, wherein the N groups of encrypted data sources correspond to the N groups of data blocks one by one.
In this step, the data corresponding to the N groups of pictures are byte-divided, the data corresponding to the N groups of pictures are first converted into binary data, and then divided into data of a specific length with the same byte length, such as three-bit binary data, by dividing, the data are also divided according to the data sequence, and the data of the specific length in each encrypted data source are numbered continuously.
S400, recombining the N groups of data block groups according to the N groups of encrypted data sources to obtain recombined data, publishing the recombined data to a block chain, and dispersedly storing the head data and the random encrypted data image set to a local server.
In this step, the N groups of data blocks are recombined according to the N groups of encrypted data sources, the N groups of data blocks are converted into 16-system data according to the specific length data in the N groups of encrypted data sources, and the three-bit binary data can represent 8 digits, so that one group of specific length data in each group of encrypted data sources can be converted into one 16-system digit with a range of 0 to 7, so that 8 16-system digits correspond to the specific length data in the N groups of encrypted data sources, and if the specific length data in the N groups of encrypted data sources corresponding to the same number is converted into 16-system digits which are 2, 3, 5, 1, 7, 6, 2 and 0 respectively, and the N groups of encrypted data sources correspond to the N groups of data blocks one to one, the arrangement positions of the data blocks in the N groups of data blocks corresponding to the same number are determined according to 2, 3, 5, 1, 7, 6, 2 and 0, for example, data of a specific length corresponding to the same number in N groups of encrypted data sources are converted into data of a 16-system length of 2, 3, 5, 1, 7, 6, 2 and 0, data blocks corresponding to the same number in N groups of data block groups are a1, b1, c1, d1, e1, f1, g1 and h1, after recombination, data blocks corresponding to the same number in N groups of data block groups are exchanged according to 2, 3, 5, 1, 7, 6, 2 and 0, namely, a1 nd 2, b1 th 3, c1 th 5, d1 th 1, e1 th 7, f1 th 6 and g1 th 2, h1 th 0, for repeated numbers, the corresponding data blocks are arranged to the end, the arrangement order is h1, d1, a1, b1, c1, f1, e1 and g1, and at this time, it is seen that data blocks between different data block groups have been completed recombination and the data blocks have been published in the recombination block chain, the head data and the random encrypted data image sets are dispersedly stored in a local server, at the moment, the recombined data is public content, the content in the recombined data cannot be directly obtained even if the recombined data is downloaded, reverse encryption is required to be carried out according to the head data and the random encrypted data image sets, the recombined data is recovered, and the data to be encrypted is obtained; encrypting the head data and the random encrypted data image set before storage; the following table is a table of changes before and after recombination:
Figure DEST_PATH_IMAGE001
as shown in fig. 2, as a preferred embodiment of the present invention, the step of intercepting header data from data to be encrypted, equally dividing the intercepted data to be encrypted into N groups of data to be processed, and performing average segmentation on each group of data to be processed to obtain N groups of data blocks specifically includes:
s201, head data are intercepted from data to be encrypted, and the intercepting proportion of the head data is determined according to the random encrypted data image set.
In this step, the header data is intercepted from the data to be encrypted, the proportion of intercepting the header data is determined according to the random encrypted data image set, specifically, the total data amount of the pictures in the random encrypted data image set is counted, the tail data with a preset length is intercepted, for example, 100, the tail data is converted into 16-system data, namely 4, and the three-bit binary data is multiplied by 0.1% to obtain 0.4%, and then the proportion of intercepting the header data is 0.4%.
S202, equally dividing the data to be encrypted of the intercepted head data into N groups, and numbering to obtain N groups of data to be processed.
In this step, the data to be encrypted, from which the header data is intercepted, is equally divided into N groups, and it can be known from the header data interception that, since the acquired picture is random, the interception proportion of the acquired header data is also random, and then the size of the remaining data to be encrypted is also random, and N groups of data to be processed are obtained by equally dividing.
S203, carrying out average segmentation on the numbered N groups of data to be processed, wherein the segmentation quantity of each group of data to be processed is the same, and obtaining N groups of data block groups.
In this step, N sets of numbered data to be processed are divided averagely, taking N =8 as an example, the N sets of numbered data to be processed are numbered as a, b, c, d, e, f, g and h, and each set of data block is numbered as a by further dividing averagely 1 ,a 2 ……,a M ,b 1 ,b 2 ……,b M And so on.
As shown in fig. 3, as a preferred embodiment of the present invention, the step of performing byte segmentation on data corresponding to N groups of pictures to obtain data with a specific length, and generating N groups of encrypted data sources according to the data, specifically includes:
s301, determining the byte segmentation length according to the number of pictures contained in the random encrypted data image set.
In this step, the byte division length is determined according to the number of pictures included in the random encrypted data image set, for example, 8 groups of pictures are converted into binary data, the byte division length corresponding to several bits of binary data is several binary characters, for example, 8 groups of binary data can be represented by three-bit binary, and the byte division length is 3.
S302, data corresponding to the N groups of pictures are subjected to byte segmentation to obtain data with specific length, each group of pictures corresponds to one group of data with specific length, and each group of data with specific length comprises a plurality of byte segments with specific byte length.
In this step, the data corresponding to the N groups of pictures are byte-divided, specifically, when the byte division length is determined to be 3, the data corresponding to the N groups of pictures are all divided into binary data of three bits, such as 100-101-010 \ 8230; \8230;.
S303, a group of sequence numbers are generated according to each byte section, and the sequence numbers form an encrypted data source.
In the step, a group of serial numbers is generated according to each byte section, the binary data of three bits is converted into 16-system, and the serial numbers are obtained, such as 4-5-2 \8230, if N groups exist, N groups of encrypted data sources are obtained.
As shown in fig. 4, as a preferred embodiment of the present invention, the step of recombining, according to N groups of encrypted data sources, N groups of data block groups to obtain recombined data specifically includes:
s401, determining the serial numbers of the data blocks in each group of data block groups, wherein the data blocks in the N groups of data block groups are in one-to-one correspondence in sequence.
S402, determining the recombination sequence according to the N groups of encrypted data sources, and generating a recombination sequence.
In this step, the number of the data block in each group of data block groups is determined, the data block is converted into a 16-system number according to the specific length data in the N groups of encrypted data sources, and the three-bit binary data can represent 8 numbers, so that the group of specific length data in each group of encrypted data sources can be converted into a 16-system number, and the order of recombination is determined according to the N groups of encrypted data sources to generate a recombination sequence.
And S403, exchanging positions in the N groups of data block groups according to the recombination sequence to obtain recombination data.
In this step, position exchange is performed on N groups of data blocks according to the reassembly sequence, where each of the data blocks, such as a, b, c, d, e, f, g, and h, includes multiple data blocks, for example, the data block group a only includes multiple data blocks beginning with a, and after reassembly, the data block group a includes data blocks in b, c, d, e, f, g, and h, so as to achieve the purpose of reassembly.
As shown in fig. 5, a block chain-based energy data secure storage system provided for an embodiment of the present invention includes:
the data acquiring module 100 is configured to acquire a random encrypted data image set and data to be encrypted, where the random encrypted data image set is a randomly acquired picture, and a group of random encrypted data image sets includes N groups of pictures.
In the system, the data acquisition module 100 acquires a random encrypted data image set and data to be encrypted, the random encrypted data image set includes N groups of pictures, the pictures are randomly acquired pictures, a camera is separately arranged, pictures with randomly changing pictures can be acquired, for example, river pictures are photographed by a camera, the number of the pictures can be 8, that is, N is 8, and the data to be encrypted is energy data to be stored.
The data segmentation module 200 is configured to intercept header data from the data to be encrypted, equally divide the intercepted data to be encrypted into N groups of data to be processed, average-divide each group of data to be processed to obtain N groups of data blocks, where the data blocks include M data blocks, and the data blocks in the same data block group are numbered consecutively.
In the system, the data segmentation module 200 intercepts the header data from the data to be encrypted, firstly intercepts the header data, determines the interception proportion according to the random encrypted data image set during interception, and then obtains the proportion of the header dataThe data to be encrypted after being intercepted are further divided into N groups of data to be processed, namely 8 groups of data to be processed, if the head data is intercepted by a%, the proportion of the data to be processed is (1-a%)/N, then the data to be processed is averagely divided, if the 8 groups of data to be processed are a, b, c, d, e, f, g and h respectively, the data to be processed a is equally divided into M data blocks, and the serial number of each data block is a 1 ,a 2 ……,a M (ii) a The header data occupies no more than 1% of the data to be encrypted.
The encryption source processing module 300 is configured to perform byte segmentation on data corresponding to the N groups of pictures to obtain data with a specific length, and generate N groups of encryption data sources according to the data, where the N groups of encryption data sources are in one-to-one correspondence with the N groups of data blocks.
In the system, the encryption source processing module 300 performs byte segmentation on data corresponding to N groups of pictures, first converts the data corresponding to N groups of pictures into binary data, and then divides the data into data with specific length having the same byte length, such as three-bit binary data, by segmentation, the data are also divided according to the data sequence when being divided, and the data with specific length in each encryption data source are numbered continuously.
The data reassembly module 400 is configured to reassemble the N groups of data chunks according to the N groups of encrypted data sources to obtain reassembly data, and publish the reassembly data in the block chain, where the header data and the random encrypted data image set are stored in the local server in a distributed manner.
In the system, the data reassembly module 400 reassembles the N groups of data blocks according to the N groups of encrypted data sources, converts the data of a specific length in each group of encrypted data sources into 16-ary numbers according to the data of a specific length in the N groups of encrypted data sources, and the three-bit binary data can represent 8 numbers, so that the data of a specific length in each group of encrypted data sources can be converted into a 16-ary number with a range of 0-7, and then the data of a specific length corresponding to the same number in the N groups of encrypted data sources correspond to 8 16-ary numbers, and if the data of a specific length corresponding to the same number in the N groups of encrypted data sources are converted into 16-ary numbers of 2, 3, 5, 1, 7, 6, 2, and 0, and the N groups of encrypted data sources correspond to the N groups of data blocks one to one another, and then the data block arrangement positions corresponding to the same number in the N groups of data blocks are determined according to 2, 3, 5, 1, 7, 6, 2, and 0, for example, data of a specific length corresponding to the same number in N groups of encrypted data sources is converted into data blocks of a 16-ary system, which are respectively 2, 3, 5, 1, 7, 6, 2 and 0, data blocks corresponding to the same number in N groups of data blocks are respectively a1, b1, c1, d1, e1, f1, g1 and h1, after reassembly, data blocks corresponding to the same number in N groups of data blocks are exchanged according to positions of 2, 3, 5, 1, 7, 6, 2 and 0, namely, a1 nd 2, b1 th 3, c1 th 5, d1 th 1, e1 th 7, f1 th 6 and g1 th 2, h1 th 0, for repeated numbers, the corresponding data blocks are arranged to the end, the arrangement sequence is h1, d1, a1, b1, c1, f1, e1 and g1, at this time, it can be seen that data blocks between different data blocks have been completed reassembly, and the reassembly data blocks have been published in the reassembly block chain, the head data and the random encrypted data image set are dispersedly stored in a local server, at the moment, the recombined data is public content, the content cannot be directly obtained even if the recombined data is downloaded, reverse encryption needs to be carried out according to the head data and the random encrypted data image set, the recombined data is recovered, and data to be encrypted is obtained.
As shown in fig. 6, as a preferred embodiment of the present invention, the data slicing module 200 includes:
a header data intercepting unit 201, configured to intercept header data from the data to be encrypted, where a proportion of the header data interception is determined according to the random encrypted data image set.
In this module, a header data intercepting unit 201 intercepts header data from data to be encrypted, where the proportion of intercepting the header data is determined according to a random encrypted data image set, specifically, the total data amount of pictures in the random encrypted data image set is counted, and end data with a preset length, such as three-bit binary data, for example, 100, is intercepted and converted into 16 system, that is, 4, and multiplied by 0.1% to obtain 0.4%, and then the proportion of intercepting the header data is 0.4%.
The data equally dividing unit 202 is configured to equally divide the data to be encrypted, from which the header data is intercepted, into N groups, and number the N groups of data to be processed.
In this module, the data equally dividing unit 202 equally divides the data to be encrypted, from which the header data is captured, into N groups, and as it can be known from the header data capture that the captured pictures are random, the capture proportion of the obtained header data is also random, and then the size of the remaining data to be encrypted is also random, and by equally dividing, N groups of data to be processed are obtained.
The data block dividing unit 203 is configured to averagely divide the numbered N groups of data to be processed, where the number of divided data to be processed in each group is the same, and thus N groups of data block groups are obtained.
In this module, the data block dividing unit 203 performs average division on N numbered groups of data to be processed, taking N =8 as an example, the N numbered groups of data to be processed are numbered as a, b, c, d, e, f, g and h, and by further performing average division, each group of data block is numbered as a 1 ,a 2 ……,a M ,b 1 ,b 2 ……,b M And so on.
As shown in fig. 7, as a preferred embodiment of the present invention, the encryption source processing module 300 includes:
a division length determination unit 301 for determining a byte division length according to the number of pictures contained in the randomly encrypted data image set.
In this module, the division length determining unit 301 determines the byte division length according to the number of pictures included in the random encrypted data image set, for example, 8 groups of pictures are converted into binary data, and the byte division length corresponding to several bits of binary data is several binary characters, for example, 8 groups of binary data can be represented by three-bit binary, and the byte division length is 3.
The picture data dividing unit 302 is configured to perform byte division on data corresponding to N groups of pictures to obtain data with a specific length, where each group of pictures corresponds to a group of data with a specific length, and each group of data with a specific length includes multiple byte segments with specific byte lengths.
In this module, the picture data dividing unit 302 divides the data corresponding to the N groups of pictures into bytes, and specifically, when the byte division length is determined to be 3, divides the data corresponding to the N groups of pictures into binary data of three bits, such as 100-101-010 \8230;.
A sequence number generation unit 303, configured to generate a group of sequence numbers according to each of the byte sections, where the sequence numbers form an encrypted data source.
In this module, the sequence number generation unit 303 generates a group of sequence numbers according to each word segment, and converts binary data of three bits into 16 systems, i.e., obtains the sequence numbers, such as 4-5-2 \8230; \8230, where N groups are available, and obtains N groups of encrypted data sources.
As shown in fig. 8, as a preferred embodiment of the present invention, the data reorganizing module 400 includes:
a number confirming unit 401, configured to determine the number of the data blocks in each group of data block groups, where the data blocks in the N groups of data block groups correspond to each other in sequence.
A sequence generating unit 402, configured to determine a re-combining order according to the N groups of encrypted data sources, and generate a re-combined sequence.
In this module, the number confirmation unit 401 determines the number of the data block in each group of data block groups, converts the data of a specific length in the N groups of encrypted data sources into a 16-ary number, and the three-bit binary data can represent 8 numbers, so that a group of data of a specific length in each group of encrypted data sources can be converted into a 16-ary number, and determines the order of recombination according to the N groups of encrypted data sources to generate a recombination sequence.
And a data block reassembly unit 403, configured to perform position exchange on the N groups of data block groups according to the reassembly sequence to obtain reassembly data.
In this module, the data block reassembly unit 403 performs position exchange on N groups of data block groups according to the reassembly sequence, where each of the data block groups a, b, c, d, e, f, g, and h includes multiple data blocks, for example, a data block group includes only multiple data blocks beginning with a, and after reassembly, a data block group includes data blocks in b, c, d, e, f, g, and h, so as to achieve the purpose of reassembly.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in various embodiments may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
The above description is intended to be illustrative of the preferred embodiment of the present invention and should not be taken as limiting the invention, but rather, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.

Claims (10)

1. A safe energy data storage method based on a block chain is characterized by comprising the following steps:
acquiring a random encrypted data image set and data to be encrypted, wherein the random encrypted data image set is randomly acquired pictures, and a group of random encrypted data image sets comprises N groups of pictures;
intercepting head data from data to be encrypted, equally dividing the intercepted data to be encrypted into N groups of data to be processed, and averagely dividing each group of data to be processed to obtain N groups of data block groups, wherein each data block group comprises M data blocks, and the data blocks in the same data block group are continuously numbered;
carrying out byte segmentation on data corresponding to N groups of pictures to obtain data with a specific length, and generating N groups of encrypted data sources according to the data, wherein the N groups of encrypted data sources correspond to the N groups of data block groups one by one;
and recombining the N groups of data block groups according to the N groups of encrypted data sources to obtain recombined data, publishing the recombined data to the block chain, and dispersedly storing the head data and the random encrypted data image set to the local server.
2. The safe energy data storage method based on the block chain according to claim 1, wherein the step of intercepting the header data from the data to be encrypted, equally dividing the intercepted data to be encrypted into N groups of data to be processed, and averagely dividing each group of data to be processed to obtain N groups of data blocks specifically comprises:
intercepting head data from data to be encrypted, wherein the intercepting proportion of the head data is determined according to a random encrypted data image set;
equally dividing the data to be encrypted, in which the head data is intercepted, into N groups, and numbering the N groups to be processed to obtain N groups of data to be processed;
and averagely dividing the numbered N groups of data to be processed, wherein the dividing quantity of each group of data to be processed is the same, and obtaining N groups of data block groups.
3. The safe energy data storage method based on the blockchain according to claim 1, wherein the step of performing byte segmentation on data corresponding to the N groups of pictures to obtain data with a specific length to generate N groups of encrypted data sources includes:
determining byte segmentation length according to the number of pictures contained in the random encrypted data image set;
carrying out byte segmentation on data corresponding to N groups of pictures to obtain data with specific length, wherein each group of pictures corresponds to one group of data with specific length, and each group of data with specific length comprises a plurality of byte sections with specific byte length;
a set of sequence numbers is generated from each of the byte segments, the sequence numbers forming a source of encrypted data.
4. The block chain-based energy data secure storage method according to claim 1, wherein the step of recombining the N groups of data block groups according to the N groups of encrypted data sources to obtain recombined data specifically includes:
determining the serial numbers of the data blocks in each group of data block groups, wherein the data blocks in the N groups of data block groups correspond to one another in sequence;
determining the recombination sequence according to the N groups of encrypted data sources to generate a recombination sequence;
and carrying out position exchange on the N groups of data block groups according to the recombination sequence to obtain recombination data.
5. The block chain-based energy data secure storage method according to claim 1, wherein the header data occupies a proportion of not more than 1% of the data to be encrypted.
6. The blockchain-based energy data secure storage method according to claim 1, wherein the header data and the random encrypted data image set are encrypted before being stored.
7. A block chain-based energy data secure storage system, the system comprising:
the data acquisition module is used for acquiring a random encrypted data image set and data to be encrypted, wherein the random encrypted data image set is randomly acquired pictures, and one group of random encrypted data image set comprises N groups of pictures;
the data segmentation module is used for intercepting head data from the data to be encrypted, equally dividing the intercepted data to be encrypted into N groups of data to be processed, and averagely segmenting each group of data to be processed to obtain N groups of data block groups, wherein each data block group comprises M data blocks, and the data blocks in the same data block group are continuously numbered;
the encrypted source processing module is used for carrying out byte segmentation on data corresponding to the N groups of pictures to obtain data with a specific length, and generating N groups of encrypted data sources according to the data, wherein the N groups of encrypted data sources correspond to the N groups of data block groups one by one;
and the data recombination module is used for recombining the N groups of data block groups according to the N groups of encrypted data sources to obtain recombined data, publishing the recombined data to the block chain, and dispersedly storing the head data and the random encrypted data image set to the local server.
8. The block chain-based energy data secure storage system according to claim 7, wherein the data segmentation module comprises:
the head data interception unit is used for intercepting head data from data to be encrypted, and the interception proportion of the head data is determined according to the random encrypted data image set;
the data equally dividing unit is used for equally dividing the data to be encrypted of the intercepted head data into N groups and numbering the N groups to obtain N groups of data to be processed;
and the data block segmentation unit is used for averagely segmenting the numbered N groups of data to be processed, wherein the segmentation quantity of each group of data to be processed is the same, and N groups of data block groups are obtained.
9. The block chain-based energy data secure storage system according to claim 7, wherein the encrypted source processing module includes:
a division length determination unit for determining a byte division length according to the number of pictures contained in the random encrypted data image set;
the picture data segmentation unit is used for carrying out byte segmentation on data corresponding to N groups of pictures to obtain data with specific length, each group of pictures corresponds to one group of data with specific length, and each group of data with specific length comprises a plurality of byte segments with specific byte length;
and the sequence number generation unit is used for generating a group of sequence numbers according to each byte section, and the sequence numbers form an encrypted data source.
10. The block chain-based energy data secure storage system according to claim 7, wherein the data reorganization module comprises:
the number confirmation unit is used for determining the number of the data blocks in each group of data block groups, and the data blocks in the N groups of data block groups correspond to one another in sequence;
the sequence generating unit is used for determining the recombination sequence according to the N groups of encrypted data sources and generating a recombination sequence;
and the data block recombination unit is used for carrying out position exchange on the N groups of data block groups according to the recombination sequence to obtain recombined data.
CN202211323149.4A 2022-10-27 2022-10-27 Energy data safe storage method and system based on block chain Active CN115378590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211323149.4A CN115378590B (en) 2022-10-27 2022-10-27 Energy data safe storage method and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211323149.4A CN115378590B (en) 2022-10-27 2022-10-27 Energy data safe storage method and system based on block chain

Publications (2)

Publication Number Publication Date
CN115378590A true CN115378590A (en) 2022-11-22
CN115378590B CN115378590B (en) 2023-02-07

Family

ID=84074043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211323149.4A Active CN115378590B (en) 2022-10-27 2022-10-27 Energy data safe storage method and system based on block chain

Country Status (1)

Country Link
CN (1) CN115378590B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5351299A (en) * 1992-06-05 1994-09-27 Matsushita Electric Industrial Co., Ltd. Apparatus and method for data encryption with block selection keys and data encryption keys
JP2008060671A (en) * 2006-08-29 2008-03-13 Brother Ind Ltd Communication system and management device
DE102009050493A1 (en) * 2009-10-23 2011-04-28 Röllgen, Bernd Block data encryption methods
US20120060033A1 (en) * 2009-03-03 2012-03-08 Giuliani Kenneth J Split key secure access system
CN103259780A (en) * 2013-03-02 2013-08-21 苏州阔地网络科技有限公司 Method and system for storing enciphered data
US20140258731A1 (en) * 2013-03-07 2014-09-11 National Cheng Kung University Data encryption system and method
CN104168435A (en) * 2014-08-15 2014-11-26 北京彩云动力教育科技有限公司 Method and system for batched mergence and playing of audio files
CN104205117A (en) * 2014-04-10 2014-12-10 华为技术有限公司 Device file encryption and decryption method and device
CN104331448A (en) * 2014-10-29 2015-02-04 上海大学 Encrypted domain image retrieval method based on JPEG (Joint Picture Expert Group) image alternating current coefficient histograms
CN104468842A (en) * 2014-12-31 2015-03-25 国网甘肃省电力公司信息通信公司 Power grid equipment state information cloud storage system and data uploading and downloading methods thereof
CN106330464A (en) * 2016-10-26 2017-01-11 上海众人网络安全技术有限公司 Identity authentication method, device and system
CN110311783A (en) * 2019-05-30 2019-10-08 平安科技(深圳)有限公司 User attaching verification method, device and computer equipment based on group ranking
CN110351091A (en) * 2019-05-30 2019-10-18 平安科技(深圳)有限公司 Resource exchange method, apparatus and computer equipment based on dual signature
CN110545257A (en) * 2019-07-22 2019-12-06 北京航盛新能科技有限公司 Automobile CAN bus encryption method
CN111884993A (en) * 2020-06-10 2020-11-03 广东工业大学 CAN bus encryption method for encrypting data by applying encryption algorithm
CN113225297A (en) * 2020-01-21 2021-08-06 北京国双科技有限公司 Data hybrid encryption method, device and equipment
CN113742765A (en) * 2021-11-08 2021-12-03 天津嘉萱智财云科技有限公司 Intelligent cloud data security protection system and method based on block chain

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5351299A (en) * 1992-06-05 1994-09-27 Matsushita Electric Industrial Co., Ltd. Apparatus and method for data encryption with block selection keys and data encryption keys
JP2008060671A (en) * 2006-08-29 2008-03-13 Brother Ind Ltd Communication system and management device
US20120060033A1 (en) * 2009-03-03 2012-03-08 Giuliani Kenneth J Split key secure access system
DE102009050493A1 (en) * 2009-10-23 2011-04-28 Röllgen, Bernd Block data encryption methods
CN103259780A (en) * 2013-03-02 2013-08-21 苏州阔地网络科技有限公司 Method and system for storing enciphered data
US20140258731A1 (en) * 2013-03-07 2014-09-11 National Cheng Kung University Data encryption system and method
CN104205117A (en) * 2014-04-10 2014-12-10 华为技术有限公司 Device file encryption and decryption method and device
CN104168435A (en) * 2014-08-15 2014-11-26 北京彩云动力教育科技有限公司 Method and system for batched mergence and playing of audio files
CN104331448A (en) * 2014-10-29 2015-02-04 上海大学 Encrypted domain image retrieval method based on JPEG (Joint Picture Expert Group) image alternating current coefficient histograms
CN104468842A (en) * 2014-12-31 2015-03-25 国网甘肃省电力公司信息通信公司 Power grid equipment state information cloud storage system and data uploading and downloading methods thereof
CN106330464A (en) * 2016-10-26 2017-01-11 上海众人网络安全技术有限公司 Identity authentication method, device and system
CN110311783A (en) * 2019-05-30 2019-10-08 平安科技(深圳)有限公司 User attaching verification method, device and computer equipment based on group ranking
CN110351091A (en) * 2019-05-30 2019-10-18 平安科技(深圳)有限公司 Resource exchange method, apparatus and computer equipment based on dual signature
CN110545257A (en) * 2019-07-22 2019-12-06 北京航盛新能科技有限公司 Automobile CAN bus encryption method
CN113225297A (en) * 2020-01-21 2021-08-06 北京国双科技有限公司 Data hybrid encryption method, device and equipment
CN111884993A (en) * 2020-06-10 2020-11-03 广东工业大学 CAN bus encryption method for encrypting data by applying encryption algorithm
CN113742765A (en) * 2021-11-08 2021-12-03 天津嘉萱智财云科技有限公司 Intelligent cloud data security protection system and method based on block chain

Also Published As

Publication number Publication date
CN115378590B (en) 2023-02-07

Similar Documents

Publication Publication Date Title
Pourmajidi et al. Logchain: Blockchain-assisted log storage
CN111523133B (en) Block chain and cloud data collaborative sharing method
CN109597571B (en) Data storage method, data reading method, data storage device, data reading device and computer equipment
CN113742765B (en) Intelligent cloud data security protection system and method based on block chain
CN116522300B (en) Intelligent management system for electronic seal
Al-Odat et al. Randomness analyses of the secure hash algorithms, SHA-1, SHA-2 and modified SHA
CN111241568B (en) Encryption method, decryption device, computer equipment and storage medium
CN111404892B (en) Data supervision method and device and server
CN112100144A (en) Block chain file sharing method and device, storage medium and electronic equipment
CN115378590B (en) Energy data safe storage method and system based on block chain
CN110995415A (en) Encryption algorithm based on MD5 algorithm
CN116980534A (en) Image processing method and system for video communication
CN111782662B (en) User privacy information query realization method and device based on distributed reconstruction
CN113204774B (en) Rapid data security protection method based on multi-cloud environment
CN114567878A (en) Internet of things base station, data return processing system and data return processing method
CN116800492A (en) Network security management method and system
CN114817967B (en) Data security sharing method and system based on city brain
CN116186746B (en) Parallel hash encryption method, storage medium and electronic device
CN116484443B (en) Trusted security storage method and device based on hong Monte-go system
CN113328848B (en) Parameterized S box generation method, device, equipment and storage medium
KR101609846B1 (en) Method for managing adequacy for blackbox video, and computer-readable recording medium for the same
CN115758434B (en) Efficient coding and encrypting method for data
CN117439818B (en) Data transmission method and system based on privacy calculation
KR102406403B1 (en) A block chain system, a block chain provision system, a method for providing block chain for data, and a data structure in a block chain
Heorhiiovych et al. DEVELOPMENT OF INITIALIZING BLOCK-INPUT VECTOR FOR DATA HASHING VIA AN ELEMENTS OF A DETERMINED CHAOS

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