Summary of the invention
Present description provides a kind of image access method and its systems, and the safety of image can be improved, even if storage
The part memory node of image is logged in the user information also hardly resulted in image by hacker.
This application discloses a kind of image storage methods, comprising:
One image is split as at least two subgraphs, and image assembly information is generated according to fractionation mode;
At least two subgraph is respectively stored into different memory nodes, wherein belonging to each of the same image
Subgraph is at least stored in two different memory nodes, and the partial subgraph of described image is stored in each memory node
Picture;
By described image assembly information storage to in other storage devices except the memory node.
In a preferred embodiment, described to deposit the storage of described image assembly information to other except the memory node
Before in storage device, further includes:
Described image assembly information is encrypted.
In a preferred embodiment, described image assembly information include each subgraph assembled sequence or each subgraph
As the coordinate position in the coordinate system of described image.
In a preferred embodiment, described image assembly information includes the store path of each subgraph.
In a preferred embodiment, described that at least two subgraph is respectively stored into different memory nodes, into one
Step includes:
Determine memory node corresponding to each subgraph in a random basis before storing.
In a preferred embodiment, in a described the step of image is split as at least two subgraphs, each subgraph
The size of picture is no more than preset size.
Disclosed herein as well is a kind of image acquiring methods to include:
Obtain image assembly information;
Obtain all subgraphs for belonging to the same image respectively from least two memory nodes, wherein described image is assembled
Information is stored in other storage devices except the memory node;
Each subgraph is assemblied into a complete image according to described image assembly information.
In a preferred embodiment, after the acquisition image assembly information, further includes: carried out to described image assembly information
Decryption.
In a preferred embodiment, described image assembly information include each subgraph assembled sequence or each subgraph
As the coordinate position in the coordinate system of described image.
In a preferred embodiment, described image assembly information includes the store path of each subgraph;
It is described to obtain all subgraphs for belonging to the same image respectively from least two memory nodes, further comprise:
It is obtained and is belonged to respectively from least two memory nodes according to the subgraph store path in described image assembly information
All subgraphs of the same image.
Disclosed herein as well is a kind of image storage systems to include:
Detachment device for an image to be split as at least two subgraphs, and generates image according to fractionation mode and spells
Fill information;
Assembled information-storing device, for storing the subgraph assembly information;
At least two memory nodes, for storing the subgraph;It is described assembly information-storing device be not it is described at least
Any one of two memory nodes;
Route device, at least two subgraph to be respectively stored into different memory nodes, wherein belonging to same
Each subgraph of one image is at least stored in two different memory nodes, and the figure is stored in each memory node
The partial subgraph picture of picture.
In a preferred embodiment, the assembled information-storing device is also used to before saving the assembled information to the spelling
Dress information is encrypted.
In a preferred embodiment, described image assembly information include each subgraph assembled sequence or each subgraph
As the coordinate position in the coordinate system of described image.
In a preferred embodiment, described image assembly information includes the store path of each subgraph.
In a preferred embodiment, the route device determines storage section corresponding to each subgraph in a random basis
Point.
In a preferred embodiment, when splitting image, the size of each subgraph is no more than pre- the detachment device
The size first set.
In a preferred embodiment, the route device, which is also used to obtain respectively from least two memory node, belongs to together
All subgraphs of one image;
The system also includes assembled devices, for obtaining described image assembly letter from the assembled information-storing device
Breath, and each subgraph is assemblied by a complete image according to described image assembly information.
In a preferred embodiment, described image assembly information includes the store path of each subgraph;
The route device is according to the subgraph store path in described image assembly information from least two memory nodes
All subgraphs for belonging to the same image are obtained respectively.
In a preferred embodiment, the assembled information-storing device is also used to after extracting described image assembly information to institute
It states image assembly information and is first decrypted and exported again to the assembled device.
Disclosed herein as well is a kind of image storage systems to include:
Memory, for storing computer executable instructions;And
Processor, for realizing the step in method as previously described when executing the computer executable instructions.
Disclosed herein as well is be stored with meter in computer readable storage medium described in a kind of computer readable storage medium
Calculation machine executable instruction, the computer executable instructions realize the step in method as previously described when being executed by processor
Suddenly.
In this specification embodiment, distributed storage is carried out after the image that user uploads is split as multiple subgraphs,
The assembled sequence of the image is saved in system and carries out encryption storage, and use can not be obtained after image server is logged in by hacker
The true personal document complete information in family.Hacker needs to take the corresponding assembled sequence of image and is decrypted, it will also be appreciated that the image
Subgraph storage location, subgraph could be carried out it is correct assembled obtain complete image, it is difficult.
A large amount of technical characteristic is described in this specification, is distributed in each technical solution, if this Shen is set out
Specification please can be made excessively tediously long if the combination (i.e. technical solution) of all possible technical characteristic.In order to avoid this
Problem, each technical characteristic disclosed in this specification foregoing invention content disclose in each embodiment and example below
Each technical characteristic and attached drawing disclosed in each technical characteristic, can freely be combined with each other, to constitute various new
Technical solution (these technical solutions should be considered as have been recorded in the present specification), unless the combination of this technical characteristic
It is technically infeasible.For example, disclosing feature A+B+C in one example, feature A is disclosed in another example
+ B+D+E, and feature C and D are the equivalent technologies means for playing phase same-action, as long as technically selecting a use, it is impossible to same
Shi Caiyong, feature E can be technically combined with feature C, then, the scheme of A+B+C+D should not be regarded because technology is infeasible
To have recorded, and the scheme of A+B+C+E should be considered as being described.
Specific embodiment
In the following description, in order to make the reader understand this application better, many technical details are proposed.But this
The those of ordinary skill in field is appreciated that even if without these technical details and many variations based on the following respective embodiments
And modification, the application technical solution claimed also may be implemented.
It is described in further detail below in conjunction with embodiment of the attached drawing to this specification.
The first embodiment of this specification is related to a kind of image storage method, and process is as shown in Figure 1, this method includes
Following steps:
In a step 102, an image is split as at least two subgraphs, and image assembly is generated according to fractionation mode
Information.
There are many implementations for image assembly information.In one embodiment, image assembly information includes each subgraph
The coordinate position of assembled sequence or each subgraph in the coordinate system of image.In another embodiment, image assembly information is also
It may include the mark of image, the mark, etc. of each subgraph.In another embodiment, image assembly information includes each
The store path of subgraph.Specifically, store path can be after being stored in different memory nodes in each subgraph,
Storage location is recorded as a part of image assembly information.In another embodiment, in figure assembly information
It can not include the store path of subgraph, the store path of subgraph can be according to some information meter in image assembly information
It calculates, such as Hash operation can be carried out to image identification, the storage of each subgraph is determined according to Hash operation result
Position.For another example image assembly information may include a random number, and depositing for each subgraph can be determined according to the random number
Storage space is set.
The mode of fractionation can be diversified.Optionally, the size of each subgraph, which is no more than, presets
Size.Specifically, the subgraph of rectangle can be split from image according to preset long L and width W, if image
The length that the width that length cannot be divided exactly perhaps image by L cannot be divided exactly then a part of subgraph by W can be less than L or width
Degree is less than W.The upper limit of regulation subgraph size can prevent from, comprising excessive information, avoiding lifting in single subgraph the pass of part
Key information is revealed by a subgraph.Optionally, the shapes and sizes of each subgraph are consistent, such as can be sat according to vertical and horizontal
Mark is equably split as the subgraph of 16 rectangles.Optionally, the size or shape of each subgraph are not exactly the same, such as have
A little image can be rectangle, some subgraphs can be triangle.
Then into step 104, at least two subgraphs are respectively stored into different memory nodes, wherein belonging to same
Each subgraph of a image is at least stored in two different memory nodes, and an image is stored in each memory node
Partial subgraph picture.Words sentence is talked about, any one memory node will not all store all subgraphs of the same image.In this way may be used
It is all leaked to avoid a memory node by all subgraphs that hacker breaks through the latter image.
In one embodiment, memory node corresponding to each subgraph is determined in a random basis before storing.Such as one
A image is divided into 4 subgraphs, and route device randomly stores this 4 subgraphs to this 4 memory nodes, Mei Gecun
It stores up node and stores 1 subgraph.For another example an image is divided into 16 subgraphs, and route device is random by this 16 subgraphs
Ground is assigned to this 5 memory nodes, and the number of the subgraph of each memory node storage is a random number greater than 1, such as
The number of sub-images that this 5 memory nodes are assigned to is 5,2,1,4,4 respectively.
In another embodiment, it may not be in a random basis when distributing storage location for each subgraph, but
It distributes according to preset rules, such as its memory node is determined according to the cryptographic Hash of the mark of each subgraph.
In one embodiment, subgraph can also be encrypted, accordingly even when subgraph is leaked, it also can not be direct
The content of subgraph is seen, so as to further increase safety.
Then into step 106, image assembly information is stored.In one embodiment, image assembly information and subgraph
It is stored in different memory nodes.Specifically, image assembly information is stored in dedicated storage device, the storage
The not responsible storage subgraph of device, to further increase safety.Optionally, image assembly information is carried out before storing
Encryption.
In some embodiments, step 106 can be executed prior to step 104 or step 104 can be parallel with step 106.
It is split as carrying out distributed storage after multiple subgraphs by the image for uploading user, the image is saved in system
Assembled sequence simultaneously carries out encryption storage, and it is complete that user's true personal document can not be obtained after image server is logged in by hacker
Whole information.
The second embodiment of this specification is related to a kind of image acquiring method, and process is as shown in Fig. 2, this method includes
Following steps:
In step 202, image assembly information is obtained.Optionally, the image assembly information obtained from storage device be by
Encrypted, it needs that acquired image assembly information is decrypted.
Then into step 204, all subgraphs for belonging to the same image are obtained respectively from least two memory nodes.
Wherein, image assembly information is stored in other storage devices except the memory node of storage subgraph.In other words, image
Assembled information and subgraph are stored in different storage equipment.
In one embodiment, image assembly information includes the store path of each subgraph, thus can be according to figure
As the subgraph store path in assembled information obtains all sons for belonging to the same image from least two memory nodes respectively
Image.
It in another embodiment, can not also include the store path of subgraph in figure assembly information, and subgraph
Store path can be calculated according to some information in image assembly information, such as can to image identification carry out Hash
Operation determines the storage location of each subgraph according to Hash operation result.For another example image assembly information may include one
Random number can determine the storage location of each subgraph according to the random number.It can be according to the resulting storage location of calculating
Each subgraph is extracted from each memory node.
In one embodiment, subgraph is encrypted before storing, need in this case to acquired subgraph into
Row decryption.
Then into step 206, each subgraph is assemblied by a complete image according to image assembly information.
In one embodiment, image assembly information include each subgraph assembled sequence or each subgraph image seat
Coordinate position in mark system.Each subgraph can be assemblied into a complete image according to assembled sequence or coordinate position.
First embodiment is storage method, and present embodiment is acquisition methods corresponding with first embodiment,
The correlative detail of first embodiment can also be in the present embodiment, and the correlative detail of present embodiment can also be used in the
In one embodiment.
The third embodiment of this specification is related to a kind of image storage system, and structure is as shown in figure 3, the system packet
It includes:
Detachment device for an image to be split as at least two subgraphs, and generates image according to fractionation mode and spells
Fill information.
Assembled information-storing device, for storing subgraph assembly information.Optionally, stored image assembly information is
Encryption, it needs first to encrypt before storing image assembly information, needs first to decrypt after reading image assembly information.
At least two memory nodes, for storing subgraph.In one embodiment, the assembly of image assembly information is stored
It is not overlapped in information-storing device and each memory node of storage subgraph, the information of image assembly in other words and subgraph are stored
In different storage equipment.
Route device, at least two subgraphs to be respectively stored into different memory nodes, and for from least
Two memory nodes obtain all subgraphs for belonging to the same image respectively, wherein belonging to each subgraph of the same image
It is at least stored in two different memory nodes, the partial subgraph picture of an image is stored in each memory node.
Assembled device, for obtaining image assembly information from assembled information-storing device, and will according to image assembly information
Each subgraph is assemblied into a complete image.
There are many implementations for route device.In one embodiment, each subgraph is determined in a random basis before storing
Corresponding memory node.Such as an image is divided into 4 subgraphs, route device randomly deposits this 4 subgraphs
This 4 memory nodes are stored up, each memory node stores 1 subgraph.For another example an image is divided into 16 subgraphs, road
This 16 subgraphs are randomly assigned this 5 memory nodes, the number of the subgraph of each memory node storage by device
It is a random number greater than 1, such as the number of sub-images that this 5 memory nodes are assigned to is 5,2,1,4,4 respectively.Another
In a embodiment, it may not be in a random basis when distributing storage location for each subgraph, but according to preset
Rule distribution, such as its memory node is determined according to the cryptographic Hash of the mark of each subgraph.
There are many implementations for image assembly information.Optionally, image assembly information includes the assembled sequence of each subgraph
Or coordinate position of each subgraph in the coordinate system of image.In another embodiment, image assembly information can also include
The mark of image, the mark, etc. of each subgraph.In another embodiment, image assembly information includes each subgraph
Store path.Specifically, store path can be after being stored in different memory nodes in each subgraph, storage position
The a part recorded as image assembly information is set, route device can be according in image assembly information when obtaining image
Subgraph store path obtain all subgraphs for belonging to the same image respectively from least two memory nodes.Optionally,
It can not also include the store path of subgraph in figure assembly information, the store path of subgraph can be believed according to image assembly
Some information in breath is calculated, such as can carry out Hash operation to image identification, is determined according to Hash operation result every
The storage location of one subgraph.For another example image assembly information may include a random number, can be determined according to the random number
The storage location of each subgraph.When obtaining image, route device can also determine each height according to the mode of letter work
The storage location of image is to read.
The mode of fractionation can be diversified.Optionally, the size of each subgraph, which is no more than, presets
Size.Specifically, the subgraph of rectangle can be split from image according to preset long L and width W, if image
The length that the width that length cannot be divided exactly perhaps image by L cannot be divided exactly then a part of subgraph by W can be less than L or width
Degree is less than W.The upper limit of regulation subgraph size can prevent from, comprising excessive information, avoiding lifting in single subgraph the pass of part
Key information is revealed by a subgraph.Optionally, the shapes and sizes of each subgraph are consistent, such as can be sat according to vertical and horizontal
Mark is equably split as the subgraph of 16 rectangles.Optionally, the size or shape of each subgraph are not exactly the same, such as have
A little image can be rectangle, some subgraphs can be triangle.
In one embodiment, image storage system can also include encryption device and decryption device.Wherein, encryption device
For being output to route device after encrypting to the subgraph that detachment device exports, decryption device is used to export route device
Subgraph be decrypted after be output to assembled device.Because subgraph is to be encrypted storage, even if subgraph is leaked,
It cannot be directly viewed the content of subgraph, so as to further increase safety.
First and second embodiments are method implementation corresponding with present embodiment, the first and second embodiment party
Technical detail in formula can be applied to present embodiment, and the technical detail in present embodiment also can be applied to first and
Two embodiments.
In order to more fully understand the technical solution of this specification, said below with reference to a specific example
Bright, the details enumerated in the example is primarily to be easy to understand, not as the limitation to the application protection scope.
It is assumed that the size of an ID Card Image (the entitled img.jpg of file) is 1000*650 pixel, in detachment device
Split according to the size of 100*100,70 subgraphs be obtained, wherein the size of 60 subgraphs be 100*100,10
The size of a subgraph is 100*50.These subgraphs are named according to the position in original image, such as:
The meaning of img_0_0.jpg are as follows: the subgraph for the first row the first row that original image is gone out by mesh segmentation;
The meaning of img_0_1.jpg are as follows: the subgraph for the second row of first row that original image is gone out by mesh segmentation;
The meaning of img_0_2.jpg are as follows: the subgraph of first row the third line that original image is gone out by mesh segmentation;
The meaning of img_1_0.jpg are as follows: the subgraph for the secondary series the first row that original image is gone out by mesh segmentation;
……
Number in subgraph title represents position of the subgraph in original image, as shown in Figure 4.By these subgraphs
It is stored as being sent to route device.Route device by these image random storages into 7 memory nodes, each memory node
Save 10 subgraphs.Then by the store path of each subgraph more new images assembly information, image assembly information is encrypted
After be saved in assembled information-storing device.The image assembly information is as follows:
Img.jpg=array (
Img_0_0.jpg=>http://www.x.com/img/sdjlfa/sdfa/dasffs.jpgimg_0_1.jpg
=>http://www.x.com/img/sdjlfa/sdfasdfsda/dsdafweasffs.jpgImg_0_2.jpg=>http://www.x.com/img/sd2jlfa/sdfasdfs4fada/dsdasdffweasffs.jpg
……
)
Wherein img.jpg is image file name, and img_0_0.jpg etc. is subgraph filename,http://www.x.com/ img/sdjlfa/sdfa/dasffs.jpgEtc. being subgraph store path.
When image to be obtained, device assembled first obtains the image assembly letter of the image from assembled information-storing device
Breath, is decrypted assembled information, obtains the store path of each subgraph from the image assembly information of decryption.Routing dress
It sets and each subgraph is read according to store path, be sent to assembled device.The assembly device is according to each in assembled information
The assembly of image is completed in the position of word image, such as img_0_0.jpg is in (0,0) grid, img_0_1.jpg in (0,1) grid,
Etc..
It should be noted that it will be appreciated by those skilled in the art that shown in the embodiment of above-mentioned image storage system
The realization function of each module can refer to the associated description of aforementioned image storage method and image acquiring method and understand.Above-mentioned figure
The function of each module as shown in the embodiment of storage system can be (executable to refer to by running on the program on processor
Enable) and realize, it can also be realized by specific logic circuit.If the above-mentioned image storage system of this specification embodiment is with soft
The form of part functional module is realized and when sold or used as an independent product, also can store computer-readable at one
In storage medium.Based on this understanding, the technical solution of this specification embodiment substantially in other words makes the prior art
The part of contribution can be embodied in the form of software products, which is stored in a storage medium,
It uses including some instructions so that a computer equipment (can be personal computer, server or network equipment etc.) is held
The all or part of each embodiment the method for row this specification.And storage medium above-mentioned include: USB flash disk, mobile hard disk, only
Read the various media that can store program code such as memory (ROM, Read Only Memory), magnetic or disk.In this way,
This specification embodiment is not limited to any specific hardware and software and combines.
Correspondingly, this specification embodiment also provides a kind of computer readable storage medium, wherein being stored with computer
Executable instruction, the computer executable instructions realize each method embodiment of this specification when being executed by processor.It calculates
Machine readable storage medium storing program for executing include permanent and non-permanent, removable and non-removable media can by any method or technique Lai
Realize information storage.Information can be computer readable instructions, data structure, the module of program or other data.Computer
The example of storage medium includes but is not limited to that phase change memory (PRAM), static random access memory (SRAM), dynamic random are deposited
Access to memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electrically erasable are only
Read memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), the more function of number
Can CD (DVD) other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices or it is any its
His non-transmission medium, can be used for storing and can be accessed by a computing device information.As defined in this article, computer-readable to deposit
Storage media does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
In addition, this specification embodiment also provides a kind of image storage system, it can including being used to store computer
The memory executed instruction, and, processor.The processor is used for when executing the computer executable instructions in the memory
Realize the step in above-mentioned each method embodiment.Wherein, which can be central processing unit (Central
Processing Unit, referred to as " CPU "), it can also be other general processors, digital signal processor (Digital
Signal Processor, referred to as " DSP "), specific integrated circuit (Application Specific Integrated
Circuit, referred to as " ASIC ") etc..Memory above-mentioned can be read-only memory (read-only memory, abbreviation
" ROM "), random access memory (random access memory, referred to as " RAM "), flash memory (Flash), hard disk
Or solid state hard disk etc..The step of method disclosed in each embodiment of the present invention, can be embodied directly in hardware processor execution
Complete, or in processor hardware and software module combine execute completion.
It should be noted that relational terms such as first and second and the like are only in the application documents of this patent
For distinguishing one entity or operation from another entity or operation, without necessarily requiring or implying these entities
Or there are any actual relationship or orders between operation.Moreover, the terms "include", "comprise" or its any other
Variant is intended to non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only
It including those elements, but also including other elements that are not explicitly listed, or further include for this process, method, object
Product or the intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence " including one ", not
There is also other identical elements in the process, method, article or apparatus that includes the element for exclusion.The application of this patent
In file, if it is mentioned that certain behavior is executed according to certain element, then refers to the meaning for executing the behavior according at least to the element, wherein
Include two kinds of situations: executing the behavior according only to the element and the behavior is executed according to the element and other elements.Multiple,
Repeatedly, the expression such as a variety of include 2,2 times, 2 kinds and 2 or more, 2 times or more, two or more.
It is included in the disclosure of the specification with being considered as globality in all documents that this specification refers to,
To can be used as the foundation of modification if necessary.In addition, it should also be understood that, the foregoing is merely the preferred embodiment of this specification and
, it is not intended to limit the protection scope of this specification.It is all this specification one or more embodiment spirit and principle it
Interior, any modification, equivalent replacement, improvement and so on should be included in the protection model of this specification one or more embodiment
Within enclosing.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment
It executes and desired result still may be implemented.In addition, the process being described in the accompanying drawings not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.