CN108989462A - Picture method for down loading based on AWS cloud service - Google Patents
Picture method for down loading based on AWS cloud service Download PDFInfo
- Publication number
- CN108989462A CN108989462A CN201810975716.1A CN201810975716A CN108989462A CN 108989462 A CN108989462 A CN 108989462A CN 201810975716 A CN201810975716 A CN 201810975716A CN 108989462 A CN108989462 A CN 108989462A
- Authority
- CN
- China
- Prior art keywords
- picture
- service
- download
- cloud service
- aws cloud
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/06—Network architectures or network communication protocols for network security for supporting key management in a packet data network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses the picture method for down loading based on AWS cloud service, steps are as follows: download service is split into two services of inquiry and downloading by A.;The front end B.web sends the picture downloading request of the condition of the picture comprising needing to download;C. web request is forwarded to back office interface corresponding controller layers and package request parameter, then requests long-range download service, the required parameter includes access key information and picture identification symbol;D. download service receives parsing access key after request, and carries out matching verification to access key, and verification pass through after request long-range query service again, and picture relative path is obtained according to picture identification symbol;If E. picture relative path exists, the download service meeting download pictures information of AWS cloud service, and pictorial information is returned to by http request mode.Its processing logic of picture method for down loading based on AWS cloud service of the invention is to reduce unnecessary download access, inquiry is come with spliting for database, the high coupling of realization, low cohesion, load balancing.
Description
Technical field
The present invention relates to technical field of the computer network, in particular to based on the picture method for down loading of AWS cloud service.
Background technique
With the promotion of the Internet transmission speed, people have been not limited only to browsing text, and picture and video are in webpage
It is also increasing with the accounting in types of applications.Conventional pictures storage mode uses database purchase picture relative path, file
Server stores picture itself, and when downloading splices fullpath, and picture is obtained from server.Above-mentioned traditional download pictures side
There is more problem in formula, as people can directly acquire the complete downloading of picture according to the picture of page presentation in the application
Location, to expose file server domain name and download formats, there are security risks, when secondly downloading, as long as defeated in browser
Enter full address, there is no subscriber identity informations to verify.
In conclusion traditional download pictures mode there are the problem of mainly have: the downloading of image lacks user authentication, deposits
In security risk, there is the risk of leakage abuse without Additional Protection in the url of picture.Do not confirm in MySQL first when document is downloaded
Metamessage whether there is, and accesses and be directly pressed onto FastDFS storage end, and there are performance risks.There is list in MySQL management table
According to metamessage such as upload or when downloading concurrency is big, query performance will receive shadow and without the inquiry operation of the complexity such as join
It rings, and there is biggish security risk.
Summary of the invention
It is insufficient in above-mentioned background technique the purpose of the present invention is overcoming, the picture method for down loading based on AWS cloud service is provided,
Relevant database MySQL is replaced with NoSQL database D ynamoDB, is replaced with the S3 file server of AWS cloud service
FastDFS file server comes inquiry and spliting for database, realizes high coupling, low cohesion, is under image and document
The service based on S3 file server and DynamoDB database of offer is provided, is realized using Java the relevant technologies, more preferably by picture
The files such as document download all browser or local from S3 file server, while facilitating developer's management service, effectively solve
User's access security problem in conventional pictures downloading mode.
In order to reach above-mentioned technical effect, the present invention takes following technical scheme:
Picture method for down loading based on AWS cloud service, comprising the following steps:
A. download service is split into two services of inquiry and downloading, the query service connection AWS cloud service
DynamoDB database replaces original MySQL database with DynamoDB database, is download service, downloading as the producer
The S3 file server of service connection AWS cloud service, original FastDFS file server is replaced with S3 file server, i.e.,
Make the producer and make consumer again, consumption is inquired and externally provides download service;
The front end B.web sends the picture downloading request of the condition of the picture comprising needing to download;
C. web request is forwarded to back office interface corresponding controller layers and package request parameter, then requested remote
The download service of journey, the required parameter include access key information and picture identification symbol;
D. download service receives parsing access key after request, and carries out matching verification to access key, and verification passes through
It requests long-range query service again afterwards, and picture relative path is obtained according to picture identification symbol;
If E. picture relative path exists, the download service meeting download pictures information of AWS cloud service, and pass through http request
Mode returns to pictorial information, if picture relative path is not present, not will start download pictures information.
Further, the DynamoDB database is for storing picture metamessage, and the S3 server is for storing
Picture itself.
Further, the picture metamessage includes at least picture relative path and unique identifier.
Further, the picture relative path of the DynamoDB database storage is only being advised with timeouts
Interior downloading of fixing time is just effective, can enhance the access control of picture downloading.
Further, the access key information in the step C is configured using configuration center, and is stored in configuration center
Lane database obtains access key from the database of the configuration center of remote server using in engineering startup, and remotely takes
Business device is that have access to limit, for example only Intranet and specified ip access improves to reduce the risk of access key leakage
Safety.
It further, is dividing using AWS cloud service when the download service download pictures of AWS cloud service in the step E
Piece downloading can be improved speed of download and realize breakpoint downloading.
Further, after whether the condition for the picture for needing to download in the step B includes the identifier of picture and downloads
The setting of deletion.
Further, what the query service and download service were all made of is Dubbo distributed service framework, query service
Realize and picture relative path inquired according to picture identification symbol, download service then can according to path download pictures binary message, two
A service arrangement realizes server load balancing on different server.
Compared with prior art, the present invention have it is below the utility model has the advantages that
In the picture method for down loading based on AWS cloud service in the present invention, processing logic is under reduction is unnecessary
Access is carried, including the access to access key, the access of download server, the access etc. of project plan server, thus greatly
Reduce picture downloading security risk;Downloading from web server removing at two cloud services, can be as needed to answering
Dilatation is carried out with server, downloading can reduce download time using the downloading of more fragments and multithreading, improve user experience, simultaneously
Also help the load balancing of database server.
Specific embodiment
Below with reference to the embodiment of the present invention, the invention will be further elaborated.
Embodiment:
A kind of picture method for down loading based on AWS cloud service, specifically includes the following steps:
Step 1: original download service is split into two Distributed Services of inquiry and downloading.
In the present embodiment, query service and download service all be Dubbo distributed service framework, wherein inquiry clothes
The DynamoDB database of the AWS cloud service of business connection, replaces original MySQL database with DynamoDB database, makes its work
It is download service for the producer;The S3 file server of the AWS cloud service of download service connection, replaces original with S3 file server
The FastDFS file server come makes it make the producer and makees consumer again, and consumption is inquired and externally provides download service.
Step 2: web front-end sends the condition of download pictures wanted, for example, picture UUID and deletion etc. after whether downloading,
Whether delete after downloading can be indicated by the assignment of deleted marker position.
Step 3: web request is forwarded to back office interface controller layers corresponding, package request parameter, then request
Long-range download service, wherein information and the UUID of picture etc. of the required parameter with basic safety certification, basic safety
The information of certification generally accesses key information.
Step 4: inquiry: download service receives that basic security information certification can be verified when request, and verification is asked again after passing through
Long-range query service is sought, and picture metamessage is obtained according to picture UUID, is when progress security information certification in the present embodiment
Matching verification is carried out to access key;
Step 5: download service, after obtaining picture metamessage, parses incoming relative path and deleted marker position.
Relative path be S3 file server pathname+picture name (UUID generally generated at random add file
Suffix name) or DynamoDB database pre-sign URL, judge whether there is the corresponding picture metamessage of the URL, if
There is no downloading is then cancelled, then also needing judge whether pre-sign URL is overtime again if it exists, time-out can equally cancel downloading,
Corresponding file just finally is downloaded from S3 file server with the API that AWS cloud service provides, what is obtained is a file output
Stream.
Client can directly open in a browser or become compressed file storage.AWS cloud service simultaneously also provides
Multithreading accelerates downloading.
Specifically, deleted marker position is that 1 i.e. expression will delete the picture from S3 file server, while also erase
The relevant picture metamessage of DynamoDB database, deleted marker position are that 0 expression is not deleted, and does not do other any operations.
Such as: the picture element information deletion flag bit that user obtains is 1, and relative path is a pre-sign URL,
Download service judges whether the relative path is empty, if being not sky, can judge whether the URL is overtime again, it is assumed that not
At this moment time-out will start the download service of AWS, starting downloading, and return to corresponding controller, then delete
The pictorial information of the metamessage of the picture and AWS in DynamoDB.
Of the invention replaces relationship type number with NoSQL database D ynamoDB based on the picture method for down loading of AWS cloud service
According to library MySQL, FastDFS file server is replaced with the S3 file server of AWS cloud service, by the fractionation of inquiry and database
It comes, realizes high coupling, low cohesion, provide for the downloading of image and document based on S3 file server and DynamoDB database
Service, using Java the relevant technologies realize, more preferably by the files such as photo-document from S3 file server download all browser or
Local, processing logic is to reduce unnecessary download access, including the access to access key, the access of download server,
The access etc. of project plan server, to greatly reduce the security risk of picture downloading;Downloading is shelled from web server
From at two cloud services, dilatation can be carried out to respective application server as needed, and downloaded using more fragments downloading and multi-thread
Journey can reduce download time, improve user experience, while also helping the load balancing of database server, have and conveniently open
The advantages of sending out personal management maintenance, and efficiently solve the problems, such as user's access security in conventional pictures downloading mode.
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.
Claims (8)
1. the picture method for down loading based on AWS cloud service, which comprises the following steps:
A. download service is split into two services of inquiry and downloading, the DynamoDB of the query service connection AWS cloud service
Database, download service connect the S3 file server of AWS cloud service;
The front end B.web sends the picture downloading request of the condition of the picture comprising needing to download;
C. web request is forwarded to back office interface corresponding controller layers and package request parameter, then requested long-range
Download service, the required parameter include access key information and picture identification symbol;
D. download service receives parsing access key after request, and carries out matching verification to access key, and verification pass through after again
Long-range query service is requested, and picture relative path is obtained according to picture identification symbol;
If E. picture relative path exists, the download service meeting download pictures information of AWS cloud service, and pass through http request mode
It returns to pictorial information and not will start download pictures information if picture relative path is not present.
2. the picture method for down loading according to claim 1 based on AWS cloud service, which is characterized in that described
DynamoDB database is for storing picture metamessage, and the S3 server is for storing picture itself.
3. the picture method for down loading according to claim 2 based on AWS cloud service, which is characterized in that the picture member letter
Breath includes at least picture relative path and unique identifier.
4. the picture method for down loading according to claim 3 based on AWS cloud service, which is characterized in that the DynamoDB
The picture relative path of database storage is with timeouts, and only downloading is just effective at the appointed time.
5. the picture method for down loading according to claim 1 based on AWS cloud service, which is characterized in that in the step C
It accesses key information to configure using configuration center, and is stored in the lane database of configuration center.
6. the picture method for down loading according to claim 1 based on AWS cloud service, which is characterized in that in the step E
It is to be downloaded using the fragment of AWS cloud service when the download service download pictures of AWS cloud service.
7. the picture method for down loading according to claim 1 based on AWS cloud service, which is characterized in that needed in the step B
The setting whether condition of the picture to be downloaded includes the identifier of picture and delete after downloading.
8. according to claim 1 to any picture method for down loading based on AWS cloud service in 7, which is characterized in that described
What query service and download service were all made of is Dubbo distributed service framework.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810975716.1A CN108989462A (en) | 2018-08-24 | 2018-08-24 | Picture method for down loading based on AWS cloud service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810975716.1A CN108989462A (en) | 2018-08-24 | 2018-08-24 | Picture method for down loading based on AWS cloud service |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108989462A true CN108989462A (en) | 2018-12-11 |
Family
ID=64546757
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810975716.1A Pending CN108989462A (en) | 2018-08-24 | 2018-08-24 | Picture method for down loading based on AWS cloud service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108989462A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112804243A (en) * | 2021-01-25 | 2021-05-14 | 上海微亿智造科技有限公司 | Method, system and medium for realizing image anti-theft under industrial Internet of things |
CN113806575A (en) * | 2021-08-05 | 2021-12-17 | 北京房江湖科技有限公司 | Method and device for obtaining picture information in warehouse splitting |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110239108A1 (en) * | 2010-03-26 | 2011-09-29 | Microsoft Corporation | Configurable dynamic combination of html resources for download optimization in script based web page |
CN102710630A (en) * | 2012-05-29 | 2012-10-03 | 新华网股份有限公司 | Cloud upload and download method and system of multi-threaded slice |
CN102904917A (en) * | 2011-07-28 | 2013-01-30 | 北京邮电大学 | Mass image processing system and method thereof |
CN103414793A (en) * | 2013-09-04 | 2013-11-27 | 广东全通教育股份有限公司 | Picture downloading and uploading device and method |
CN105302920A (en) * | 2015-11-23 | 2016-02-03 | 上海爱数信息技术股份有限公司 | Optimal management method and system for cloud storage data |
CN105589879A (en) * | 2014-10-23 | 2016-05-18 | 阿里巴巴集团控股有限公司 | Method and apparatus for downloading picture by client |
CN107306246A (en) * | 2016-04-18 | 2017-10-31 | 北京市神州百戏文化产业有限公司 | Based on the data capture method for accessing key |
CN108011967A (en) * | 2017-12-15 | 2018-05-08 | 四川长虹电器股份有限公司 | Picture upload method based on AWS micro services |
-
2018
- 2018-08-24 CN CN201810975716.1A patent/CN108989462A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110239108A1 (en) * | 2010-03-26 | 2011-09-29 | Microsoft Corporation | Configurable dynamic combination of html resources for download optimization in script based web page |
CN102904917A (en) * | 2011-07-28 | 2013-01-30 | 北京邮电大学 | Mass image processing system and method thereof |
CN102710630A (en) * | 2012-05-29 | 2012-10-03 | 新华网股份有限公司 | Cloud upload and download method and system of multi-threaded slice |
CN103414793A (en) * | 2013-09-04 | 2013-11-27 | 广东全通教育股份有限公司 | Picture downloading and uploading device and method |
CN105589879A (en) * | 2014-10-23 | 2016-05-18 | 阿里巴巴集团控股有限公司 | Method and apparatus for downloading picture by client |
CN105302920A (en) * | 2015-11-23 | 2016-02-03 | 上海爱数信息技术股份有限公司 | Optimal management method and system for cloud storage data |
CN107306246A (en) * | 2016-04-18 | 2017-10-31 | 北京市神州百戏文化产业有限公司 | Based on the data capture method for accessing key |
CN108011967A (en) * | 2017-12-15 | 2018-05-08 | 四川长虹电器股份有限公司 | Picture upload method based on AWS micro services |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112804243A (en) * | 2021-01-25 | 2021-05-14 | 上海微亿智造科技有限公司 | Method, system and medium for realizing image anti-theft under industrial Internet of things |
CN113806575A (en) * | 2021-08-05 | 2021-12-17 | 北京房江湖科技有限公司 | Method and device for obtaining picture information in warehouse splitting |
CN113806575B (en) * | 2021-08-05 | 2024-02-20 | 贝壳找房(北京)科技有限公司 | Picture information acquisition method and device in warehouse splitting |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109324768B (en) | Method and system for binding user account with image forming device through mobile terminal | |
CN103139761B (en) | The method and communication terminal of a kind of information real-time show | |
JPH09265456A (en) | Meter rate charging system and method in connectionless communication | |
CN111507689B (en) | Service processing method, device, equipment and computer readable storage medium | |
CN104348714A (en) | Mobile terminal, server and friend-based application program recommendation method | |
US10282525B2 (en) | Information processing system, information processing apparatus, access control method, and program | |
CN104852962A (en) | Method, terminal device, server and system for processing focused information | |
CN111885211A (en) | Application publishing method and device | |
CN111744174A (en) | Account management method and device of cloud game, account login method and device and electronic equipment | |
US20150229788A1 (en) | Information processing apparatus and information processing method | |
CN108574686B (en) | Method and device for previewing file online | |
CN106790593B (en) | Page processing method and device | |
US8352442B2 (en) | Determination of an updated data source from disparate data sources | |
US8302203B2 (en) | Content transmission system, transmission server, communication terminal, and content transmission method | |
CN105554137A (en) | Backup system and method | |
CN108989462A (en) | Picture method for down loading based on AWS cloud service | |
US9665732B2 (en) | Secure Download from internet marketplace | |
CN102404353A (en) | Terminal content releasing method and system thereof | |
CN104954398B (en) | A kind of method and device obtaining content | |
JP2012070294A (en) | Terminal application retrieval system | |
JP4643718B2 (en) | Security enhancement program and security enhancement device | |
JP2009129195A (en) | Backup server, mobile unit, communication system using the same, and backup method | |
CN113946739A (en) | Sensitive data query method, device, equipment and storage medium | |
CN115361376A (en) | Government affair file uploading method and device, electronic equipment and storage medium | |
US20140337895A1 (en) | Unified content posting |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181211 |