CN111931231A - Redundant storage method, terminal device and storage medium for distributed system - Google Patents

Redundant storage method, terminal device and storage medium for distributed system Download PDF

Info

Publication number
CN111931231A
CN111931231A CN202010679656.6A CN202010679656A CN111931231A CN 111931231 A CN111931231 A CN 111931231A CN 202010679656 A CN202010679656 A CN 202010679656A CN 111931231 A CN111931231 A CN 111931231A
Authority
CN
China
Prior art keywords
data
encrypted
integer
integers
representing
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.)
Withdrawn
Application number
CN202010679656.6A
Other languages
Chinese (zh)
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.)
Ningbo Fuwan Information Technology Co ltd
Original Assignee
Ningbo Fuwan Information 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 Ningbo Fuwan Information Technology Co ltd filed Critical Ningbo Fuwan Information Technology Co ltd
Priority to CN202010679656.6A priority Critical patent/CN111931231A/en
Publication of CN111931231A publication Critical patent/CN111931231A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

The embodiment of the disclosure discloses a redundant storage method, a terminal device and a storage medium for a distributed system. One embodiment of the method comprises: acquiring target data to be stored, wherein the target data comprises a first number of data blocks; generating an encryption vector; generating encrypted data based on the encrypted vector and the target data; and sending the encrypted data to the first terminal, wherein the first terminal performs redundant storage on the encrypted data. The method encrypts the target data to generate an encrypted file, and ensures the safety of the distributed storage data. The encrypted data are sent to the first terminal to realize redundant storage, and the data reliability of distributed storage is improved.

Description

Redundant storage method, terminal device and storage medium for distributed system
Technical Field
The embodiment of the disclosure relates to the field of distributed systems and storage, in particular to a redundant storage method for a distributed system.
Background
With the development of information technology, enormous scale data is generated in numerous application fields such as scientific technology and commercial computing, and the amount of data is still rapidly increasing. To improve storage efficiency, a large file is typically stored as a plurality of small data blocks in a scattered manner. By utilizing the distributed storage system, the storage safety of each small data block is ensured by adopting a high-reliability data placement and copy redundancy strategy, so that the catastrophic consequences of user file failure caused by the loss of the small data blocks are avoided. The distributed system can share the storage load by using a plurality of data storage units, and how to ensure the safety, reliability and verifiability of the scattered storage data becomes an important research content of the distributed system storage.
Disclosure of Invention
The embodiment of the disclosure provides a redundant storage method for a distributed system.
In a first aspect, an embodiment of the present disclosure provides a redundant storage method for a distributed system, where the method includes: acquiring target data to be stored, wherein the target data comprises a first number of data blocks; generating an encryption vector; generating encrypted data based on the encrypted vector and the target data; and sending the encrypted data to the first terminal, wherein the first terminal performs redundant storage on the encrypted data.
In some embodiments, generating the encrypted vector comprises: the mold is formed using the following formula: n ═ p × q, where N is modulo, p and q are randomly generated prime numbers, and p and q are not equal; the key is generated using the following equation:
Figure BDA0002585373400000011
where, e denotes a key,
Figure BDA0002585373400000012
for the Euler function, gcd () represents a relatively prime process, N is modulo, p and q are prime numbers that generate modulo,
Figure BDA0002585373400000013
denotes e and
Figure BDA0002585373400000014
have a relatively prime relationship; an encryption vector is generated using the following equation: e ═ Ei=e*(e+vi) mod t N, where t is the systematic code, t is any integer, N is modulo, v is any randomly generated integer, i is the dimension count of the encryption vector, i belongs to [1, m ]]M is a first number, m represents the number of data blocks in the target data, mod represents the modulo process, viRepresents any integer randomly generated at the ith time, E is a key, E represents an encryption vectoriRepresenting the ith element of the encrypted vector.
In some casesIn an embodiment, generating the encrypted data based on the encryption vector and the target data further comprises: for each data block in the target data, generating an encrypted data block corresponding to the data block by using the following formula:
Figure BDA0002585373400000022
where B denotes a data block, i is a data block count, BiIndicating that the data block is the ith data block in the target data, EiRepresenting the ith element of the encrypted vector, N representing modulo, D representing the block of encrypted data, DiIndicating an encrypted data block corresponding to the ith data block; a set of all encrypted data blocks is determined as encrypted data, wherein the encrypted data comprises a first number of encrypted data blocks.
In some embodiments, the first terminal performs redundant storage of the encrypted data, including: the first terminal generates encoded data based on the encrypted data; the first terminal determines a target storage unit set, wherein the target storage unit set comprises a second number of storage units; the first terminal stores the encoded data in the target set of storage units.
In some embodiments, the first terminal generates the encoded data based on the encrypted data, including: the first terminal generates a first set of integers X ═ X1,x2,...,xnY and a second set of integers Y ═ Y1,y2,...,ymWhere x represents an arbitrary integer, x1Representing the first element, x, of a first set of integers2Representing a second element, x, of the first set of integersnRepresenting the nth element in the first integer set, wherein the first integer set comprises n elements, the same integer does not exist in the first integer set, y represents any integer, y1Representing the first element, y, of the second set of integers2Representing a second element of a second set of integers, ymRepresenting an mth element in a second integer set, wherein the same integer does not exist in the second integer set, n represents a second number, n is m + k, m is the first number, m represents the number of data blocks in the target data, k is any positive integer, and n > m; the first terminal is based on the first set of integers and the stationGenerating an encoding matrix using the following equation for the second set of integers:
Figure BDA0002585373400000021
wherein x represents an arbitrary integer, x1Representing the first element, x, of a first set of integers2Representing a second element, x, of the first set of integersnRepresenting the nth element of the first set of integers, y representing any integer, y1Representing the first element, y, of the second set of integers2Representing a second element of a second set of integers, ymRepresenting the mth element in the second integer set, the coding matrix comprising n rows and m columns, n representing a second number, n being m + k, m being the first number, m representing the number of data blocks in the target data, k being any positive integer, n > m; the first terminal generates encoded data using the following equation: where D denotes encrypted data, C denotes an encoding matrix, C' denotes an inverse matrix of C, S denotes encoded data, and D ═ D × C [ D ]1,...,Dm]M denotes a first number, D comprises a first number of encrypted data blocks, D1Representing the first encrypted data block, DmDenotes the mth block of encrypted data, S ═ S1,...,Sn]N denotes a second number, S comprises a second number of encoded sub-blocks, S1Representing the first encoded sub-block, SnRepresenting the nth encoded sub-block.
In a second aspect, an embodiment of the present disclosure provides a redundant storage apparatus for a distributed system, including: a receiving unit configured to acquire target data to be stored, wherein the target data includes a first number of data blocks; a first generation unit configured to generate an encryption vector; a second generation unit configured to generate encrypted data based on the encrypted vector and the target data; a storage unit configured to transmit the encrypted data to the first terminal, wherein the first terminal stores the encrypted data.
In a third aspect, an embodiment of the present disclosure provides a terminal device, where the terminal device includes: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method as described in any implementation manner of the first aspect.
In a fourth aspect, the disclosed embodiments provide a computer readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
The embodiment of the disclosure provides a redundant storage method, terminal equipment and a storage medium for a distributed system. One embodiment of the method comprises: acquiring target data to be stored, wherein the target data comprises a first number of data blocks; generating an encryption vector; generating encrypted data based on the encrypted vector and the target data; and sending the encrypted data to the first terminal, wherein the first terminal performs redundant storage on the encrypted data.
One of the above-described various embodiments of the present disclosure has the following advantageous effects: and the target file is encrypted by using the encryption vector to generate an encrypted file, so that the confidentiality and the safety of the stored data are ensured. And sending the encrypted data to the first terminal, and generating the encoded encrypted data after the first terminal encodes the encrypted data. And the first terminal performs redundant storage on the encoded encrypted data. The embodiment of the disclosure encrypts the target data to generate the encrypted file, thereby ensuring the security of the distributed storage data. The encrypted data are sent to the first terminal to realize redundant storage, and the data reliability of distributed storage is improved.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an architectural diagram of an exemplary system in which some embodiments of the present disclosure may be applied;
FIG. 2 is a flow diagram of some embodiments of a redundant storage method for a distributed system according to the present disclosure;
FIG. 3 is a schematic diagram of one application scenario of a redundant storage method for a distributed system, in accordance with some embodiments of the present disclosure;
FIG. 4 is a schematic block diagram of some embodiments of redundant storage for a distributed system according to the present disclosure;
FIG. 5 is a schematic block diagram of a computer system suitable for use as a server for implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the disclosed redundant storage method for a distributed system may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a data storage application, a text analysis application, a natural language processing application, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various terminal devices having a display screen, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the above-listed terminal apparatuses. Which may be implemented as multiple software or software modules (e.g., to provide targeted data input, etc.), or may be implemented as a single software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, such as a server that stores target data input by the terminal apparatuses 101, 102, 103, and the like. The server may perform processing such as encoding and storing on the received target data, and feed back a processing result (e.g., encrypted data) to the terminal device.
It should be noted that the encryption storage method for the distributed system provided by the embodiment of the present disclosure may be executed by the server 105, or may be executed by the terminal device.
It should be noted that the local area of the server 105 may also directly store data, and the server 105 may directly extract the local data and obtain encrypted data through encryption processing, in this case, the exemplary system architecture 100 may not include the terminal devices 101, 102, 103 and the network 104.
It should be noted that the terminal apparatuses 101, 102, and 103 may also have a data storage application installed therein, and in this case, the encryption processing method may also be executed by the terminal apparatuses 101, 102, and 103. At this point, the exemplary system architecture 100 may also not include the server 105 and the network 104.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (for example, for providing storage services), or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of some embodiments of a redundant storage method for a distributed system according to the present disclosure is shown. The redundant storage method for the distributed system comprises the following steps:
step 201, obtaining target data to be stored.
In some embodiments, an executing entity (e.g., the terminal device shown in fig. 1) of the redundant storage method for the distributed system may directly obtain target data to be stored sent by a target user. Alternatively, the target user refers to a user who provides target data to be stored. The target data includes a first number of data blocks.
Step 202, an encrypted vector is generated.
In some embodiments, the execution body generates an encrypted vector. Alternatively, the mold is generated using the following formula:
N=p×q,
where N is modulo, p and q are randomly generated prime numbers, and p and q are not equal.
The key is generated using the following equation:
Figure BDA0002585373400000061
where, e denotes a key,
Figure BDA0002585373400000062
is the euler function. gcd () denotes relatively prime processing, N being modulo. p and q are prime numbers that generate the modulus.
Figure BDA0002585373400000063
Denotes e and
Figure BDA0002585373400000064
have a relatively prime relationship.
An encryption vector is generated using the following equation:
E={Ei=e*(e+vi)mod t*N},
wherein t is a systematic code, t is an arbitrary integer, and t is determined by the execution body. Specifically, each server or other execution entity has a unique system code as a unique identifier. N is modulo, v is an arbitrary integer randomly generated, and i is the dimension count of the encryption vector. i is an element of [1, m ]]And m is the first number. m denotes the number of data blocks in the target data, mod denotes the modulo process, viRepresents an arbitrary integer randomly generated at the ith time. E is a key, E denotes an encrypted vector. EiRepresenting the ith element of the encrypted vector.
The encryption vector is generated by using the uniqueness identification system code of the execution main body, so that the traceability of the encryption process can be realized, and the verifiability and the uniqueness certainty of the encrypted data are improved.
Step 203, generating encrypted data based on the encrypted vector and the target data.
In some embodiments, the execution subject generates, for each data block in the target data, an encrypted data block corresponding to the data block by using the following formula:
Figure BDA0002585373400000071
where B denotes a data block, i is a data block count, BiIndicating the data block as the ith data block in the target data, E indicating an encryption vector, EiThe ith element representing the encrypted vector,
Figure BDA0002585373400000072
is represented by BiE of (A)iTo the power of one. N denotes modulo, D denotes encrypted data block, DiIndicating the corresponding encrypted number of the ith data blockAccording to the block.
A set of all encrypted data blocks is determined as encrypted data. Wherein the encrypted data includes a first number of encrypted data blocks. The target data is encrypted in blocks, so that the safety of each data block which is stored in a distributed system in a scattered manner is guaranteed.
And step 204, sending the encrypted data to the first terminal.
In some embodiments, the executing entity sends the encrypted data to the first terminal. The first terminal redundantly stores the encrypted data.
Optionally, the first terminal generates the encoded data based on the encrypted data. The first terminal generates a first set of integers X ═ X1,x2,...,xnY and a second set of integers Y ═ Y1,y2,...,ym}. Wherein X represents a first set of integers. x represents an arbitrary integer, x1Representing the first element, x, of a first set of integers2Representing a second element, x, of the first set of integersnRepresenting the nth element of the first set of integers. The first set of integers includes n elements. The same integer is not present in the first set of integers. Y represents a second set of integers. y represents an arbitrary integer, y1Representing the first element, y, of the second set of integers2Representing a second element of a second set of integers, ymRepresenting the mth element in the second set of integers. The same integer is not present in the second set of integers. n denotes a second number, m + k, m denotes a first number, and m denotes the number of data blocks in the target data. k is any positive integer, and n is more than m.
The first terminal generates a coding matrix based on the first set of integers and the second set of integers using the following equation:
Figure BDA0002585373400000081
wherein x represents an arbitrary integer, x1Representing the first element, x, of a first set of integers2Representing a second element, x, of the first set of integersnTo representThe nth element of the first set of integers. y represents an arbitrary integer, y1Representing the first element, y, of the second set of integers2Representing a second element of a second set of integers, ymRepresenting the mth element in the second set of integers. The coding matrix comprises n rows and m columns, n representing the second number. n is m + k, m being the first number. m represents the number of data blocks in the target data. k is any positive integer, and n is more than m.
The first terminal generates encoded data using the following equation:
S=D×C',
where D denotes encrypted data, C denotes an encoding matrix, and C' denotes an inverse matrix of C. S denotes encoded data. D ═ D1,...,Dm]And m represents the first number. D includes a first number of encrypted data blocks. D1Representing the first encrypted data block, DmRepresenting the mth encrypted data block.
S=[S1,...,Sn]And n represents a second number. S includes a second number of encoded sub-blocks. S1Representing the first encoded sub-block, SnRepresenting the nth encoded sub-block.
Optionally, the first terminal determines the target storage unit set. Wherein the target storage unit set comprises a second number of storage units. The first terminal stores the encoded data in the determined target storage unit set. The encrypted data is encoded to generate encoded data. The coded data meets the requirement of redundant storage, and the safety and the recoverability of the stored data can be improved.
One embodiment presented in fig. 2 has the following beneficial effects: and the target file is encrypted by using the encryption vector to generate an encrypted file, so that the confidentiality and the safety of the stored data are ensured. And sending the encrypted data to the first terminal, and generating the encoded encrypted data after the first terminal encodes the encrypted data. And the first terminal performs redundant storage on the encoded encrypted data. The embodiment of the disclosure encrypts the target data to generate the encrypted file, thereby ensuring the security of the distributed storage data. The encrypted data are sent to the first terminal to realize redundant storage, and the data reliability of distributed storage is improved.
With continued reference to FIG. 3, a schematic diagram of one application scenario of a redundant storage method for a distributed system in accordance with the present disclosure is shown.
In the application scenario of fig. 3, the user sends target data 301 to be stored to the server. After receiving the target file, the server generates an encryption vector and encrypts the target data to generate encrypted data 302. The server sends the encrypted data to the first terminal 303. The second terminal completes the redundant storage 304 after generating the encoded data based on the encrypted data.
According to the redundancy storage method for the distributed system, the target data is encrypted in a block data mode to generate the encrypted data so as to guarantee the safety of the data. And sending the encrypted data to the first terminal. The first terminal generates coded data, the coded data are stored to realize redundant storage, and the storage reliability of the distributed system is improved.
With further reference to fig. 4, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a redundant storage apparatus for a distributed system, which correspond to the embodiments of the redundant storage method for a distributed system shown in fig. 2, and which can be applied in various electronic devices.
As shown in FIG. 4, the redundant storage 400 for a distributed system of some embodiments includes: receiving section 401, first generating section 402, second generating section 403, and storage section 404. The receiving unit 401 is configured to obtain target data to be stored, where the target data includes a first number of data blocks. A first generating unit 402 configured to generate an encrypted vector. A second generating unit 403 configured to generate encrypted data based on the encrypted vector and the target data. A storage unit 404 configured to transmit the encrypted data to the first terminal, wherein the first terminal stores the encrypted data.
Some embodiments of the present disclosure provide an apparatus, which receives target data through a receiving unit, generates an encryption vector by using a first generating unit, and encrypts the target data by using a second generating unit to obtain encrypted data. The storage unit realizes coding processing and redundant storage of the encrypted data. The whole storage process realizes redundant storage on the basis of ensuring the safety of target data, and improves the reliability of the stored data.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use in implementing a server of an embodiment of the present disclosure. The server shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An Input/Output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: a storage section 506 including a hard disk and the like; and a communication section 507 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 507 performs communication processing via a network such as the internet. The driver 508 is also connected to the I/O interface 505 as necessary. A removable medium 509 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 508 as necessary, so that a computer program read out therefrom is mounted into the storage section 506 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 507 and/or installed from the removable medium 509. The above-described functions defined in the method of the present disclosure are performed when the computer program is executed by a Central Processing Unit (CPU) 501. It should be noted that the computer readable medium in the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the C language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept as defined above. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (8)

1. A method of redundant storage for a distributed system, comprising:
acquiring target data to be stored, wherein the target data comprises a first number of data blocks;
generating an encryption vector;
generating encrypted data based on the encrypted vector and the target data;
and sending the encrypted data to a first terminal, wherein the first terminal performs redundant storage on the encrypted data.
2. The method of claim 1, wherein the generating an encrypted vector comprises:
the mold is formed using the following formula: n ═ p × q, where N is the modulus, p and q are randomly generated prime numbers, and p and q are not equal;
the key is generated using the following equation:
Figure FDA0002585373390000011
wherein e represents the key, and wherein e represents the key,
Figure FDA0002585373390000012
for the Euler function, gcd () represents a relatively prime process, N is the modulus, p and q are prime numbers that generate the modulus,
Figure FDA0002585373390000013
denotes e and
Figure FDA0002585373390000014
have a relatively prime relationship;
an encryption vector is generated using the following equation: e ═ Ei=e*(e+vi) mod t N, where t is the systematic code, t is any integer, N is the modulus, and v is randomAny integer generated, i is the dimension count of the encryption vector, i belongs to [1, m ∈]M is a first number, m represents the number of data blocks in the target data, mod represents the modulo process, viRepresents any integer randomly generated for the ith time, E is the key, E represents the encrypted vectoriRepresents the ith element of the encrypted vector.
3. The method of claim 2, wherein the generating encrypted data based on the encrypted vector and the target data further comprises:
for each data block in the target data, generating an encrypted data block corresponding to the data block by using the following formula:
Figure FDA0002585373390000015
where B denotes a data block, i is a data block count, BiIndicating the data block as the ith data block in the target data, E indicating an encryption vector, EiRepresents the ith element of the encrypted vector,
Figure FDA0002585373390000016
is represented by BiE of (A)iTo the power, N denotes the modulus, D denotes the encrypted data block, DiIndicating an encrypted data block corresponding to the ith data block;
determining a set of all encrypted data blocks as the encrypted data, wherein the encrypted data comprises a first number of encrypted data blocks.
4. The method of claim 3, wherein the first terminal redundantly storing the encrypted data comprises:
the first terminal generates coded data based on the encrypted data;
the first terminal determines a target storage unit set, wherein the target storage unit set comprises a second number of storage units;
and the first terminal stores the coded data in the target storage unit set.
5. The method of claim 4, wherein the first terminal generating encoded data based on the encrypted data comprises:
the first terminal generates a first set of integers, X ═ X1,x2,...,xnY and a second set of integers Y ═ Y1,y2,...,ymWhere X represents a first set of integers, X represents any integer, X1Representing a first element, x, of said first set of integers2Representing a second element, x, of said first set of integersnRepresenting the nth element in the first integer set, wherein the first integer set comprises n elements, the same integer does not exist in the first integer set, Y represents a second integer set, Y represents any integer1Representing the first element, y, of said second set of integers2Represents a second element, y, of said second set of integersmRepresenting an mth element in the second integer set, where the same integer does not exist in the second integer set, n represents a second number, n ═ m + k, m is the first number, m represents the number of data blocks in the target data, k is any positive integer, and n > m;
the first terminal generates an encoding matrix based on the first set of integers and the second set of integers using the following equation:
Figure FDA0002585373390000021
wherein x represents an arbitrary integer, x1Representing a first element, x, of said first set of integers2Representing a second element, x, of said first set of integersnRepresents the nth element of the first integer set, y represents any integer, y1Representing the first element, y, of said second set of integers2Represents a second element, y, of said second set of integersmRepresenting the mth element of the second set of integers, the coding matrix comprising n rows and m columns, n representing a second number, n being m + k, m being the first number,m represents the number of data blocks in the target data, k is any positive integer, and n is greater than m;
the first terminal generates encoded data using the following equation: where D denotes the encrypted data, C denotes the encoding matrix, C' denotes an inverse matrix of C, S denotes the encoded data, and D ═ D × C ═ D1,...,Dm]M denotes a first number, D comprises a first number of encrypted data blocks, D1Representing the first encrypted data block, DmDenotes the mth block of encrypted data, S ═ S1,...,Sn]N denotes a second number, S comprises a second number of encoded sub-blocks, S1Representing the first encoded sub-block, SnRepresenting the nth encoded sub-block.
6. A redundant storage device for a distributed system, comprising:
a receiving unit configured to acquire target data to be stored, wherein the target data includes a first number of data blocks;
a first generation unit configured to generate an encryption vector;
a second generation unit configured to generate encrypted data based on the encrypted vector and the target data;
a storage unit configured to transmit the encrypted data to the first terminal, wherein the first terminal stores the encrypted data.
7. A first terminal device comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
8. A computer-readable storage medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-6.
CN202010679656.6A 2020-07-15 2020-07-15 Redundant storage method, terminal device and storage medium for distributed system Withdrawn CN111931231A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010679656.6A CN111931231A (en) 2020-07-15 2020-07-15 Redundant storage method, terminal device and storage medium for distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010679656.6A CN111931231A (en) 2020-07-15 2020-07-15 Redundant storage method, terminal device and storage medium for distributed system

Publications (1)

Publication Number Publication Date
CN111931231A true CN111931231A (en) 2020-11-13

Family

ID=73313046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010679656.6A Withdrawn CN111931231A (en) 2020-07-15 2020-07-15 Redundant storage method, terminal device and storage medium for distributed system

Country Status (1)

Country Link
CN (1) CN111931231A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500541A (en) * 2022-04-15 2022-05-13 天津市职业大学 Multi-path inspection operation redundancy removal cloud computing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500541A (en) * 2022-04-15 2022-05-13 天津市职业大学 Multi-path inspection operation redundancy removal cloud computing system

Similar Documents

Publication Publication Date Title
CN109274717B (en) Block chain based shared storage method, device, medium and electronic equipment
CN111950030A (en) Data sharing storage method based on block chain, terminal equipment and storage medium
US9584315B2 (en) Order-preserving encryption system, encryption device, decryption device, encryption method, decryption method, and programs thereof
CN111008863A (en) Lottery drawing method and system based on block chain
CN111629063A (en) Block chain based distributed file downloading method and electronic equipment
CN111611621A (en) Block chain based distributed data encryption storage method and electronic equipment
US11575515B2 (en) Post-quantum secure remote attestation for autonomous systems
CN112182109A (en) Distributed data coding storage method based on block chain and electronic equipment
CN113032818B (en) Task encryption method and device, electronic equipment and computer readable medium
CN111950032A (en) Block chain-based data storage method, terminal device and storage medium
CN111610938B (en) Distributed data code storage method, electronic device and computer readable storage medium
CN112182108A (en) Block chain based distributed data storage updating method and electronic equipment
CN111931231A (en) Redundant storage method, terminal device and storage medium for distributed system
CN111291420B (en) Distributed off-link data storage method based on block chain
CN113904832A (en) Data encryption method, device, equipment and storage medium
CN112182112A (en) Block chain based distributed data dynamic storage method and electronic equipment
CN111563268B (en) Data encryption method and device based on matrix operation and storage medium
CN112181307A (en) Block chain based distributed data redundancy storage method and electronic equipment
Reddy et al. Efficient medical image security and transmission using modified LZW compression and ECDH-AES for telemedicine applications
CN114499893B (en) Bidding file encryption and evidence storage method and system based on block chain
CN112181308A (en) Block chain based distributed data storage method and electronic equipment
CN111931204A (en) Encryption and de-duplication storage method and terminal equipment for distributed system
CN111949738A (en) Block chain-based data storage deduplication method, terminal device and storage medium
CN112732835A (en) Block chain-based heterogeneous data storage method and electronic equipment
JP6885467B2 (en) Share generation device, share conversion device, secret calculation system, share generation method, share conversion method, program, and recording medium

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20201113