Summary of the invention
The present invention aiming at the above shortcomings existing in the prior art, provides a kind of picture cloud storage method and device, to
Solve the problems, such as that cloud storage service device unreasonable distribution, cost on network communication are big.
The present invention is in order to solve the above technical problems, adopt the following technical scheme that
The present invention provides a kind of picture cloud storage method, which comprises
Mobile terminal treats base's image data of storage picture and enhancement-layer pictures data are separately encoded, wherein base
The facility information of this mobile terminal is carried in image data coding;
Picture transfer request is initiated to cloud controller, so that cloud controller distribution is deposited for storing the cloud of base's image data
Store up server;
The base that base's image data encodes is carried to the cloud storage service device initiation for storing base's image data
Image data transmission request, so that the cloud storage service device is encoded according to base's image data determines setting for mobile terminal
Standby information, and distribute cloud controller according to the facility information of the mobile terminal and deposited for storing the cloud of enhancement-layer pictures data
Store up server.
The present invention provides a kind of picture cloud storage method, which comprises
Cloud controller is requested according to the picture transfer that mobile terminal is sent, and distribution is deposited for storing the cloud of base's image data
Store up server;
The facility information for receiving the mobile terminal that the cloud storage service device for storing base's image data is sent, according to institute
The facility information for stating mobile terminal distributes cloud storage service device for storing enhancement-layer pictures data.
The present invention also provides a kind of mobile terminals, comprising: coding module and picture transfer module;
Coding module is used for, and the base's image data and enhancement-layer pictures data for treating storage picture are separately encoded, wherein
The facility information of this mobile terminal is carried in base's image data coding;
Picture transfer module is used for, and initiates picture transfer request to cloud controller, so that cloud controller distribution is for storing
The cloud storage service device of base's image data;And it initiates to carry to the cloud storage service device for storing base's image data
The base's image data transmission request for thering is base's image data to encode, so that the cloud storage service device is according to base's picture
Data encoding determines the facility information of mobile terminal, and is used for cloud controller according to the distribution of the facility information of the mobile terminal
Store the cloud storage service device of enhancement-layer pictures data.
The present invention also provides a kind of cloud controllers, comprising: transceiver module and distribution module;
Transceiver module is used for, and receives the picture transfer request that mobile terminal is sent;And it receives for storing base's picture
The facility information for the mobile terminal that the cloud storage service device of data is sent;
Distribution module is used for, and the picture transfer request distribution sent according to mobile terminal is for storing base's image data
Cloud storage service device;And the facility information of the mobile terminal received according to the transceiver module is distributed for storing
The cloud storage service device of enhancement-layer pictures data.
The present invention by base's image data coding in carry mobile terminal facility information, mobile terminal to cloud control
Cloud storage service device transmission base's image data for storing base's image data of device distribution, the cloud storage service device obtain
The facility information of mobile terminal simultaneously feeds back to cloud controller, so that cloud controller is used for according to the distribution of the facility information of mobile terminal
Store the cloud storage service device of enhancement-layer pictures data, on the one hand, base is written into according to information in the distribution of cloud storage service device
In image data, the information can be transmitted during transmitting base's image data, mobile terminal is without retransmiting additional letter
It enables, reduces the Signalling exchange of mobile terminal and cloud storage service device, reduce cost on network communication;On the other hand, based on mobile whole
The facility information at end distributes cloud storage service device, it is contemplated that the influence that terminal side stores picture and picture calls, so that cloud
Storage server distribution is more reasonable, the efficiency that the reliability and picture for improving picture storage are called.
Specific embodiment
Below in conjunction with the attached drawing in the present invention, clear, complete description is carried out to the technical solution in the present invention, is shown
So, described embodiment is a part of the embodiments of the present invention, instead of all the embodiments.Based on the implementation in the present invention
Example, those of ordinary skill in the art's every other embodiment obtained without making creative work, all belongs to
In the scope of protection of the invention.
In view of the above-mentioned problems existing in the prior art, the embodiment of the invention provides a kind of picture cloud storage scheme, pass through
The facility information that mobile terminal is carried in base's image data coding, when transmitting base's image data to cloud storage service device
The facility information of the mobile terminal is sent to cloud storage service device, so that the cloud storage service device feeds back to cloud controller,
As the foundation of cloud controller distribution enhancement-layer pictures data, cloud storage service device unreasonable distribution, cost on network communication are solved
Big problem.
Below in conjunction with Fig. 1, picture cloud storage process of the invention is described in detail.
As shown in Figure 1, picture cloud storage method of the invention is applied to include mobile terminal 1, cloud controller 2 and multiple clouds
In the system of storage server, in the present invention, it is illustrated by taking 2 cloud storage service devices 3,4 as an example.
The picture cloud storage process the following steps are included:
Step 101, mobile terminal treats base's image data of storage picture and enhancement-layer pictures data are separately encoded.
Specifically, mobile terminal will need to carry out the picture (figure i.e. to be stored of cloud storage using hierarchical picture coding techniques
Piece) it is decomposed into a base and 3-4 enhancement layer, and select coding standard to base's image data and enhancement-layer pictures number respectively
According to compressed encoding, standard is H.264 encoded to base's image data and enhancement-layer pictures data compression coding for example, can select.
Each enhancement layer that mobile terminal treats storage picture can be encoded according to existing way, and cataloged procedure is herein not
It repeats again.The base that mobile terminal treats storage picture is encoded, and carries this movement eventually in base's image data coding
The specific implementation of the facility information at end, the facility information for carrying this mobile terminal in base's image data coding is subsequent again
It is described in detail.
Preferably, the facility information of mobile terminal may include: the coding standard of enhancement-layer pictures data, and/or, it is mobile
The location information of terminal.Wherein, the location information of mobile terminal may include: that mobile terminal is currently located cell ID or movement
The current GPS of terminal (Global Positioning System, global positioning system) information.
Step 102, mobile terminal initiates picture transfer request to cloud controller.
Specifically, mobile terminal 1 sends picture transfer request message to cloud controller 2, wherein picture rating information is carried,
Picture rating information includes base's picture rating information and enhancement-layer pictures rating information.Base's picture rating information includes base
The coding standard of picture can also include the information such as size, the clarity of base's picture.Enhancement-layer pictures rating information includes increasing
The strong quantity of layer and the coding standard of enhancement-layer pictures can also include the information such as size, the clarity of enhancement-layer pictures.
Step 103, cloud controller is requested according to the picture transfer received, distributes the cloud for storing base's image data
Storage server.
Specifically, cloud controller 2 obtains base's picture rating information from the picture transfer request that mobile terminal 1 is sent,
According to the base, picture rating information is determined to the cloud storage service device of storage base's image data.For example, can be according to base
The currently stored resource service condition of each cloud storage service device of 2 subordinate of size and cloud controller of layer image data is allocated,
The coding whether can also be supported according to each cloud storage service device of 2 subordinate of coding standard and cloud controller of base's image data
Standard is to be allocated, or is amid all these factors allocated.
Cloud controller 2 is after determining the cloud storage service device for storing base's image data, to the cloud storage service
Device sends the node distribution request for carrying base's coding of graphics standard information, which receives node distribution
After request, it can be decided whether to receive the node distribution request according to this equipment own situation, if receiving the node distribution request,
Then to 2 return node assignment response of cloud controller, to complete point of the cloud storage service device for storing base's image data
Match.In embodiments of the present invention, as shown in Figure 1, cloud controller 2 is by 3 sending node distribution request of cloud storage service device, and
Receive the node assignment response of the return of cloud storage service device 3, so that cloud controller 2 distributes cloud storage service device 3 to store base
Image data.Then, cloud controller 2 returns to picture transfer response to mobile terminal 1, wherein carrying allocated cloud storage service
The address of device 3.
It should be noted that if receive cloud controller 2 transmission node distribution request cloud storage service device according to
This equipment own situation is judged that base's image data can not be stored, then can no longer be distributed to 2 return node of cloud controller
Response, alternatively, not recipient node assignment response can be returned to cloud controller 2, at this point, cloud controller 2 can redefine it
His cloud storage service device, and node distribution request is initiated again to it, until the cloud storage for storing base's image data
Until server is allocated successfully.
Step 104, mobile terminal initiates base's image data to the cloud storage service device for storing base's image data
Transmission request.
Specifically, carrying base's image data coding in base's image data transmission request.In the embodiment of the present invention
In, as shown in Figure 1, mobile terminal 1 initiates the transmission request of base's image data to cloud storage service device 3.
Step 105, cloud storage service device encodes the facility information for determining mobile terminal according to base's image data.
Specifically, cloud storage service device 3, which receives base's image data that mobile terminal 1 is sent, transmits request, therefrom obtain
Base's image data coding, and encoded according to base's image data, using the numbering scheme with mobile terminal to base's image data
The identical decoding standard of formula is decoded, to obtain the equipment letter of the mobile terminal carried in base's image data coding
Breath.
Cloud storage service device 3 compiles the process and mobile terminal 1 of base's image data coding and decoding to base's image data
The process of code is corresponding, and details are not described herein.
Step 106, cloud controller receives the facility information for the mobile terminal that cloud storage service device is sent, and according to the shifting
The facility information of dynamic terminal distributes the cloud storage service device for storing enhancement-layer pictures data.
Specifically, cloud controller is distributed according to the facility information of the mobile terminal for storing enhancement-layer pictures data
Cloud storage service device, specifically includes:
Cloud controller 2 chooses the volume for supporting the enhancement-layer pictures data in the cloud storage service device of this equipment subordinate
The cloud storage service device of code system formula, and/or, choose the cloud storage service device nearest with the position of the mobile terminal.
In embodiments of the present invention, as shown in Figure 1, cloud controller 2 chooses cloud storage service device 4 as storing enhancing
The cloud storage service device of layer image data, and base's image data transmission response is returned to mobile terminal, base's image data passes
Defeated response carries the address of cloud storage service device 4.
Since picture to be stored includes multiple enhancement layers, multiple enhancement-layer pictures data can be stored respectively in different clouds
In storage server, therefore, cloud controller can be according to the quantity for the enhancement layer that step 102 obtains and the coding of enhancement-layer pictures
Standard, respectively each enhancement-layer pictures data distribute cloud storage service device.
It should be noted that it is allocated for store enhancement-layer pictures data cloud storage service device can with distributed
For store base's image data cloud storage service device it is identical, that is to say, that a cloud storage service device can be stored both
Base's image data of one picture also can store the enhancement-layer pictures data of the picture.
It is mobile whole by carrying in base's image data coding to can be seen that the present invention by 101-106 through the above steps
The facility information at end, the cloud storage service device transmission base for storing base's image data that mobile terminal is distributed to cloud controller
Layer image data, which obtains the facility information of mobile terminal and feeds back to cloud controller, so that cloud controller
The cloud storage service device for storing enhancement-layer pictures data is distributed according to the facility information of mobile terminal, on the one hand, deposits cloud
The distribution of server is stored up according in information write-in base's image data, the letter can be transmitted during transmitting base's image data
Breath, mobile terminal reduce the Signalling exchange of mobile terminal and cloud storage service device, reduce network without retransmiting additional signaling
Communication overhead;On the other hand, the facility information based on mobile terminal distributes cloud storage service device, it is contemplated that terminal side is to picture
The influence that storage and picture call improves the reliability and picture tune of picture storage so that the distribution of cloud storage service device is more reasonable
Efficiency.
In addition, the present invention using the coding standard of enhancement-layer pictures data as cloud controller distribution cloud storage service device according to
According to that is, cloud controller chooses the cloud storage service device for supporting the coding standard of enhancement-layer pictures data, it is ensured that assigned
Cloud storage service device can be decoded enhancement-layer pictures data, and store the enhancement-layer pictures, improve cloud storage service device
The reasonability of distribution, so that solving the prior art only considers that cloud storage service device is currently stored when distributing cloud storage service device
The service condition and image data delamination of resource, lead to cloud storage service device unreasonable distribution, influence picture storage and adjust
The problem of using.
The present invention can choose using the location information of mobile terminal as the foundation of cloud controller distribution cloud storage service device
The closer cloud storage service device storage enhancement-layer pictures data in position are presently in apart from mobile terminal, to improve user's acquisition
The speed of the enhancement-layer pictures data.
Further, after step 106, the process can with the following steps are included:
Step 107, mobile terminal initiates enhancement-layer pictures to the cloud storage service device for storing enhancement-layer pictures data
Data transfer request.
Specifically, carrying enhancement-layer pictures data in the enhancement-layer pictures data transfer request.Implement in the present invention
In example, mobile terminal 1 initiates enhancement-layer pictures data transfer request to cloud storage service device 4.
It should be noted that mobile terminal 1 is deposited to each allocated cloud for storing enhancement-layer pictures data respectively
It stores up server and initiates enhancement-layer pictures data transfer request.
Step 108, it is transmitted for storing the cloud storage service device of enhancement-layer pictures data from the enhancement-layer pictures data
Enhancement-layer pictures data encoding is obtained in request and is decoded it.
Specifically, in embodiments of the present invention, cloud storage service device 4 is obtained from the enhancement-layer pictures data transfer request
Enhancement-layer pictures data encoding simultaneously decodes it, and obtains enhancement-layer pictures data and stores.
Cloud storage service device 4 can return to enhancement layer figure to cloud controller 2 after the enhancement-layer pictures data are locally stored
Sheet data transmission response.
Step 109-110, cloud controller receive the increasing that the cloud storage service device for storing enhancement-layer pictures data is sent
Strong layer image data transmission response, and the enhancement-layer pictures data transmission response is transmitted to the mobile terminal.
So far, entire picture cloud storage process terminates.
Below in conjunction with Fig. 2, be described in detail mobile terminal how in base's image data coding Portable device information, in step
In rapid 101, as shown in Fig. 2, mobile terminal treats base's image data of storage picture and enhancement-layer pictures data are separately encoded,
And the facility information of this mobile terminal is carried in base's image data coding, specifically includes the following steps:
Step 1011-1012, mobile terminal acquires the facility information of this mobile terminal, and is generated according to the facility information
Binary coding.
Specifically, illustrating so that facility information is the location information of mobile terminal as an example, for example, as shown in Fig. 2, mobile terminal
Be GPS coordinate information by the location information of collected equipment: GPS-LAT390271-LNG106123, mobile terminal should
GPS coordinate information generates 128-1024 binary codings, and in embodiments of the present invention, which is 128.
If facility information is the coding standard of enhancement-layer pictures data, mobile terminal is by the coding of enhancement-layer pictures data
System conversion is binary coding, and transformation rule can be negotiated to determine by mobile terminal and cloud controller, and be led to by cloud controller
Know the cloud storage service device of its subordinate.
Step 1013-1014, the picture to be stored is divided at least two regions by mobile terminal, and is established wait store
Mapping relations between each region of picture and every binary coding.
Specifically, the quantity in the region of storage picture is equal with the binary-coded digit, and a picture region
A corresponding binary coding.
In embodiments of the present invention, binary coding is 128, then the sizes such as picture to be stored is divided into 128 pieces, will
The binary coding is mapped to by turn wait store corresponding segmented areas in picture, such as the binary-coded 1st, 2,3 difference
Map to picture to be stored the 1st, 2,3 piecemeals.
Step 1015, mobile terminal determines the base of picture to be stored according to the binary coding and the mapping relations
Layer image data.
Specifically, choosing the coding for being 0 in the binary coding or being 1,0 or 1 pair is determined according to the mapping relations
The picture region answered, base's image data as picture to be stored.For example, choose the binary coding intermediate value be 1 (can also be with
Base's image data for correspondence piecemeal 0) as picture to be stored.
Step 1016, mobile terminal encodes base's image data of the picture to be stored, and generates binary base
Image data coding.
Specifically, mobile terminal carries out classification figure to the base's image data for the picture to be stored determined in step 1015
Piece coding generates binary base's image data coding.
1011-1016 can be seen that the present invention by the way that picture to be stored to be divided into and facility information through the above steps
The identical region of binary coding digit, and establish between each region of picture to be stored and every binary coding
Mapping relations, so that the facility information for carrying mobile terminal in encoding base layer data is realized, without being by additional signaling
The facility information that mobile terminal can be transmitted to cloud storage service device, reduces the Signalling exchange of mobile terminal and cloud storage service device,
Reduce cost on network communication.
Based on the same technical idea, the embodiment of the present invention also provides a kind of mobile terminal 1, as shown in figure 3, the movement is whole
End 1 may include: coding module 11 and picture transfer module 12.
Coding module 11 is used for, and the base's image data and enhancement-layer pictures data for treating storage picture are separately encoded,
In, the facility information of this mobile terminal is carried in base's image data coding.
Picture transfer module 12 is used for, and initiates picture transfer request to cloud controller, so that cloud controller distribution is for depositing
Store up the cloud storage service device of base's image data;And it is taken to the cloud storage service device initiation for storing base's image data
Base's image data with base's image data coding transmits request, so that the cloud storage service device is schemed according to the base
Sheet data encodes the facility information for determining mobile terminal, and distributes cloud controller according to the facility information of the mobile terminal and use
In the cloud storage service device of storage enhancement-layer pictures data.
Preferably, coding module 11 is specifically used for, and generates binary coding according to the facility information of this mobile terminal;By institute
State picture to be stored and be divided at least two regions, and establish picture to be stored each region and every binary coding it
Between mapping relations, wherein the quantity in the region of picture to be stored is equal with the binary-coded digit, and a picture
Region corresponds to a binary coding;According to the binary coding and the mapping relations, the base of picture to be stored is determined
Image data;To base's image data coding of the picture to be stored, binary base's image data coding is generated.
Preferably, facility information includes: the coding standard of enhancement-layer pictures data, and/or, the position letter of mobile terminal
Breath.
Based on the same technical idea, the embodiment of the present invention also provides a kind of cloud controller, as shown in figure 4, the cloud controls
Device 2 includes: transceiver module 21 and distribution module 22.
Transceiver module 21 is used for, and receives the picture transfer request that mobile terminal is sent;And it receives for storing base's figure
The facility information for the mobile terminal that the cloud storage service device of sheet data is sent.
Distribution module 22 is used for, and the picture transfer request distribution sent according to mobile terminal is for storing base's image data
Cloud storage service device;And the facility information of the mobile terminal received according to the transceiver module is distributed for depositing
Store up the cloud storage service device of enhancement-layer pictures data.
The facility information includes: the coding standard of enhancement-layer pictures data, and/or, the location information of mobile terminal.
Distribution module 22 is specifically used for, and in the cloud storage service device of this equipment subordinate, chooses and supports the enhancement layer figure
The cloud storage service device of the coding standard of sheet data, and/or, choose the cloud storage service nearest with the position of the mobile terminal
Device.
It is understood that the principle that embodiment of above is intended to be merely illustrative of the present and the exemplary implementation that uses
Mode, however the present invention is not limited thereto.For those skilled in the art, essence of the invention is not being departed from
In the case where mind and essence, various changes and modifications can be made therein, these variations and modifications are also considered as protection scope of the present invention.