CN108965486A - A kind of document down loading method, system, server and storage medium - Google Patents

A kind of document down loading method, system, server and storage medium Download PDF

Info

Publication number
CN108965486A
CN108965486A CN201811166704.0A CN201811166704A CN108965486A CN 108965486 A CN108965486 A CN 108965486A CN 201811166704 A CN201811166704 A CN 201811166704A CN 108965486 A CN108965486 A CN 108965486A
Authority
CN
China
Prior art keywords
character string
file
hash character
downloading
current
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
CN201811166704.0A
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.)
Shenzhen Skyworth Software Co Ltd
Original Assignee
Shenzhen Skyworth Software 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 Shenzhen Skyworth Software Co Ltd filed Critical Shenzhen Skyworth Software Co Ltd
Priority to CN201811166704.0A priority Critical patent/CN108965486A/en
Publication of CN108965486A publication Critical patent/CN108965486A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of document down loading method, system, server and storage mediums, wherein method includes: the download information for receiving transmission end and sending;Wherein, download information includes at least download address and cryptographic Hash character string;Cryptographic Hash character string is decrypted to obtain original Hash character string, current file to be downloaded is obtained according to download address, and be downloaded to current file to be downloaded, the file that downloading is obtained is as current downloading file;Current downloading file is handled using hash algorithm, obtains current Hash character string corresponding with currently downloading file;If current Hash character string is consistent with original Hash character string, current file of downloading is target downloading file.The technical solution of the embodiment of the present invention realizes the technical effect for improving user experience and downloading file security.

Description

A kind of document down loading method, system, server and storage medium
Technical field
The present embodiments relate to field of computer technology more particularly to a kind of document down loading method, system, server and Storage medium.
Background technique
With the development of mobile internet era and its universal, mobile phone, plate, intelligent TV set, the intelligence of application range Status of the network machine top box in life is higher and higher.It is new using cell phone network shopping, mobile payment, browsing in daily life It hears, sees novel, strolls forum, increasingly using the activity such as Intelligent set top box and smart television viewing network Online Video, object for appreciation game It is more.Using there may be target downloadings in these downloading process such as web browsing picture, viewing video, installation or update application The risk that file is tampered.
Popular abduction type includes that DNS (Domain Name System) domain name system is kidnapped now, HTTP and HTTP Proxy abduction is distorted.PC and mobile terminal device downloading file during, generally by terminal application software to The content of destination server request downloading target, the name server of dns server parsing downloading target, by itself and IP address pair It answers, then obtains exact download address.
Since part operator may cooperate with other service providers, it is helped to promote game, video, advertisement even gambling Deng the file download address of the network terminal can be replaced in dns server resolving and distort by operator, Jin Erda To the purpose for promoting related service.Such as user downloads Tencent's video app by android application market, by dns server By behind its address when parsing, the game app or other that a third party promotes are directed toward in the parsing of Tencent's video app download address The downloading file of nonterminal raw requests anticipation, not only wastes downloading flow, but also risk may be brought to user, such Mode is known as DNS and distorts downloading file.
HTTP and HTTP Proxy abduction distort and are primarily present carrier gateway and routing server, carrier gateway and routing Device is mounted with flow packet spy software intentionally or unintentionally, when the http network data packet of unencryption passes through routing device Spy software has detected whether interested processing information, the meeting pair after spy software captures legal HTTP data HTTP content is distorted, and then the content after distorting is continued to be sent to destination address.Such as iqiyi.com video app upgrades certainly If when server return clear content latest edition apk download address and its MD5, spy software can be by apk download address Substitute the download address and MD5 that are other application apk with MD5 character string, it at this moment can not iqiyi.com video download file yet Recognize whether the file currently downloaded is tampered with.
Summary of the invention
The present invention provides a kind of document down loading method, system, server and storage medium, improves user experience to realize And the technical effect of downloading file security.
In a first aspect, the embodiment of the invention provides a kind of document down loading methods, this method comprises:
Receive the download information that transmission end is sent;Wherein, the download information includes at least download address and encryption is breathed out Uncommon character string;
The cryptographic Hash character string is decrypted to obtain original Hash character string, is worked as according to download address acquisition Preceding file to be downloaded, and the current file to be downloaded is downloaded, the file that downloading is obtained is as current downloading file;
The current downloading file is handled using hash algorithm, is obtained corresponding with the current downloading file Current Hash character string;
It is mesh by the current downloading file if the current Hash character string is consistent with the original Hash character string Mark downloading file.
Second aspect, the embodiment of the invention also provides a kind of file download system, which includes:
Information module is received, for receiving the download information of transmission end transmission;Wherein, the download information includes at least down Set address and cryptographic Hash character string;
Deciphering module obtains original Hash character string for the cryptographic Hash character string to be decrypted, and adds to described Close Hash character string is decrypted to obtain original Hash character string, obtains current file to be downloaded according to the download address, and The current file to be downloaded is downloaded, the file that downloading is obtained is as current downloading file;
Hash algorithm processing module is obtained and institute for being handled the current downloading file using hash algorithm State the corresponding current Hash character string of current downloading file;
Determine downloading file module, if consistent with the original Hash character string for the current Hash character string, It is target downloading file by the current downloading file.
The third aspect, the embodiment of the invention also provides a kind of server, the server includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the document down loading method as described in the embodiment of the present invention is any.
Fourth aspect, it is described the embodiment of the invention also provides a kind of storage medium comprising computer executable instructions Computer executable instructions by computer processor when being executed for executing under the file as described in the embodiment of the present invention is any Support method
The download information that the technical solution of the embodiment of the present invention is sent by receiving transmission end;Wherein, download information is at least Including download address and cryptographic Hash character string;Cryptographic Hash character string is decrypted to obtain original Hash character string, root Obtain current file to be downloaded according to download address, and current file to be downloaded be downloaded, the file that downloading is obtained as Current downloading file;Current downloading file is handled using hash algorithm, obtain and currently downloads that file is corresponding to work as Preceding Hash character string;If current Hash character string is consistent with original Hash character string, file will be downloaded currently as target downloading File realizes corresponding with source file by the corresponding Hash character string of the current downloading file of judgement after the completion of file download Whether Hash character string unanimously determines whether file has been redirected to other files during downloading, improves user The technical effect of experience and downloading file security.
Detailed description of the invention
In order to more clearly illustrate the technical scheme of the exemplary embodiment of the present invention, below to required in description embodiment The attached drawing to be used does a simple introduction.Obviously, the attached drawing introduced is present invention a part of the embodiment to be described Attached drawing, rather than whole attached drawings without creative efforts, may be used also for those of ordinary skill in the art To obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of document down loading method flow diagram provided by the embodiment of the present invention one;
Fig. 2 is the flow diagram of preferred embodiment in a kind of document down loading method provided by the embodiment of the present invention two;
Fig. 3 is the quick-reading flow sheets schematic diagram interacted between transmission end and receiving end provided in the embodiment of the present invention two;
Fig. 4 is a kind of file download system structural schematic diagram provided by the embodiment of the present invention three;
Fig. 5 is a kind of server architecture schematic diagram provided by the embodiment of the present invention four.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of document down loading method flow diagram provided by the embodiment of the present invention one, and the present embodiment is applicable In the case where whether file is tampered during downloading determined, this method can be executed by file download system, this is System can be realized by way of software and/or hardware.
As described in Figure 1, the method for the present embodiment includes:
S110, the download information that transmission end is sent is received;Wherein, the download information includes at least download address and adds Close Hash character string.
Receiving end can receive the download information of transmission end transmission.Wherein, receiving end can be the end for issuing downloading request End or server, optionally, mobile terminal, ipad, computer etc..Transmission end is requested it is to be understood that receiving downloading, and right The program code or server that the downloading request is handled.Illustratively, receiving end is mobile terminal, to download certain One application program or file destination, user can trigger corresponding position, optionally, it is corresponding trigger the application program Icon.Receiving end can receive downloading request, and handle downloading request.Can be understood as receiving end can be to biography Sending end sends one or more downloading request, and receiving end is according to the downloading corresponding with the downloading request of downloading request Information, it can also include Hash word before encrypting that wherein download information, which may include set address and encrypted Hash character string, Symbol string, the file name of file destination, size, type etc., user can be configured in download information according to the actual situation Including content.
Optionally, before S110, the method also includes: when transmission end receives the downloading request of receiving end transmission When, transmission end is handled using hash algorithm pair source file corresponding with current downloading file, generates original Hash character string; Transmission end encrypts original Hash character string using preset Encryption Algorithm, generates cryptographic Hash character string, and will carry There is the download information of cryptographic Hash character string and download address to feed back to receiving end.
Specifically, there is network communication protocol between transmission end and receiving end, it can be with network between transmission end and receiving end Communication, that is to say, that transmission end can receive, and the downloading request that receiving end is sent, receiving end can receive under the transmission of transmission end Information carrying breath.Transmission end receives, and the request for downloading some application program or file destination that receiving end issues, downloading is asked certainly It asks and is not limited to above-mentioned two situations, user can define downloading request according to the actual situation.It is asked when transmission end receives downloading When asking, according to the corresponding source file of the available current downloading file of downloading request, transmission end can use hash algorithm to working as The corresponding source file of front lower published article part is handled, and Hash character string corresponding with source file is generated, will be corresponding with source file Hash character string be known as original Hash character string, therefore the download information can also include original Hash character string.
It should be noted that the file in computer is largely to be stored in storage equipment in the form of Binary Zero and 1 In, the quantity of the Binary Zero 1 of different files and the difference that puts in order of 01 sequence, can by the quantity of Binary Zero 1 and Put in order the internal characteristics of referred to as file.File can be handled by hash algorithm, to obtain each file Internal characteristics.Can be understood as using hash algorithm to file handle available corresponding with each file two into It the quantity of system 01 and 01 puts in order.Common hash algorithm can be md5, sha1 or sha256, it is specifically used which A kind of hash algorithm handles file, and user can select according to the actual situation.
By above-mentioned it is found that the corresponding Hash character string of different files is different, therefore can be by judging the original of source file Whether beginning Hash character string, the current Hash character string that post-processes with file download unanimously judge in file destination under Whether change during load.
It is sent to the safety of receiving end in order to improve transmission end for the corresponding source file of current downloading file, can use Original Hash character string is encrypted in predetermined encryption algorithm, generates cryptographic Hash character string.
Wherein, predetermined encryption algorithm can be, and what is defined before transmission end and receiving end progress network transmission adds Close algorithm.If predetermined encryption algorithm it is known that so transmission end encryption key corresponding with receiving end and decruption key be also can With what is be obtained ahead of time.Wherein, Encryption Algorithm can be symmetric encipherment algorithm, be also possible to rivest, shamir, adelman.Optionally, if Encryption Algorithm predetermined is symmetrical when predetermined encryption algorithm is symmetric encipherment algorithm, that is, between transmission end and receiving end Encryption Algorithm, then the encryption key of transmission end is identical as the decruption key of receiving end.Original Hash character string is encrypted It is to be understood that being encrypted by encryption key to original Hash character string in transmission end;If transmission end is added using preset Close algorithm is that rivest, shamir, adelman encrypts Hash character string, then encryption key and reception that transmission end is held support Some decruption keys are not just identical.Certainly, even if Encryption Algorithm is asymmetric arithmetic, the encryption key of transmission end and receiving end Decruption key is also to first pass through exchange in advance, i.e. the encryption key and decruption key of transmission end and receiving end are known.
Wherein, according to Encryption Algorithm be rivest, shamir, adelman, then the decruption key of transmission end and receiving end If decruption key specifically may is that transmission end encrypts original Hash character string using public-key cryptography, receiving end is used Private cipher key pair cryptographic Hash character string is decrypted;If transmission end is added using the original Hash character string of private cipher key pair Close, then receiving end is decrypted cryptographic Hash character string using public-key cryptography.Wherein, the public-key cryptography of transmission end is understood that Private key for encryption key, receiving end can be understood as decruption key.
Optionally, before the download information that S110 receives that transmission end is sent, method further include: transmission end is using preset Encryption Algorithm encrypts each original Hash character string, generates cryptographic Hash character corresponding with each original Hash character string String, and each cryptographic Hash character string is subjected to corresponding storage with each store files;When transmission end receives downloading request, obtain The target cryptographic Hash character string of storage file corresponding with downloading request, and target cryptographic Hash character string will be carried under The download information of set address feeds back to receiving end.
It is found that transmission end can receive in above-mentioned technical solution, the downloading request that receiving end is sent is obtained and is downloaded Corresponding source file is requested, and source file is handled using hash algorithm, that is to say, that transmission end once receives and connects The downloading request that receiving end is sent, then can be handled to obtain with the corresponding source file of downloading request using hash algorithm pair and The corresponding original Hash character string of source file.
Certainly, technical solution provided in an embodiment of the present invention, which is also possible that in transmission end, can store at least one storage File, optionally, the number of users of two storage files etc., storage file can be configured according to actual needs, herein not It limits.At least one storage file can be handled using hash algorithm before obtaining downloading request, obtain with extremely A few storage file distinguishes corresponding original Hash character string, and using predetermined encryption algorithm at least one Hash character String is handled to obtain cryptographic Hash character string.When transmission end receive downloading request when, can from transmission end memory store up to Source file and target cryptographic Hash character string corresponding with source file needed for selecting user in a few storage file.This Sample setting be advantageous in that can be handled to obtain using at least one storage file of hash algorithm to storage in advance it is original Hash character string, and each original Hash character string is encrypted according to preset Encryption Algorithm.When a download request is received, It can reduce down to storage file corresponding with downloading request and target cryptographic Hash character string is directly acquired when transmission is asked When seeking information, transmission end improves the speed to downloading request response to the calculation amount of solicited message.Transmission end can will carry There is the download information of cryptographic Hash character string and download address to feed back to receiving end.
S120, the cryptographic Hash character string is decrypted to obtain original Hash character string, according to the download address Current file to be downloaded is obtained, and the current file to be downloaded is downloaded, the file that downloading is obtained is as when front lower Published article part.
In above-mentioned technical solution it is found that if predetermined encryption algorithm is symmetric encipherment algorithm, then transmission end and reception The encryption key at end is identical with decruption key, that is to say, that can carry out encryption reconciliation using identical key pair Hash character string It is close;According to predetermined encryption algorithm be rivest, shamir, adelman, then original Hash character string can be added using public key Close, user is decrypted by private key, and user can select decryption corresponding with predetermined encryption algorithm close according to the actual situation Cryptographic Hash character string is decrypted in key, obtains original Hash character string.
It should be noted that if predetermined encryption algorithm it has been determined that transmission end and receiving end before carrying out network communication Encryption key and decruption key can be exchanged in advance.Illustratively, predetermined encryption algorithm is symmetric encipherment algorithm, transmission end with connect Receiving end can exchange encryption key and decruption key in advance, when cryptographic Hash character string is sent to receiving end by transmission end, connect Receiving end can use the decruption key exchanged in advance and cryptographic Hash character string be decrypted to obtain original Hash character string.
Wherein, if in the download information that user is arranged according to actual needs including download address and encrypted Hash Character string can obtain current file to be downloaded corresponding with download address according to download address, and to current text to be downloaded Part is downloaded, and the file that downloading is obtained is as current downloading file.If being wrapped in the download information that user is arranged according to demand Include download address, Hash character string before encrypting and cryptographic Hash character string, then it can be to cryptographic Hash character string according to pre- If decipherment algorithm is decrypted, and judges whether the Hash character string after decryption and the preceding Hash character string of encryption are identical.
Optionally, if in download information including original Hash character string, i.e., Hash character string before encrypting, using default After cryptographic Hash character string is decrypted in Encryption Algorithm, in order to ensure cryptographic Hash character string does not have during transmission It is modified and saves the technical effect of flow, whether the Hash character string after can also first judging decryption is original Hash character It goes here and there identical.If the Hash character string and original Hash character string after decryption be not identical, it is possible to determine that cryptographic Hash character string is passing It may be tampered in defeated process, then can not download current file to be downloaded further according to the download address in download information, from And reach the technical effect for saving flow;If the Hash character string after decryption is identical as original Hash character string, after decrypting Hash character string as original Hash character string, and S130 can be executed.
S130, the current downloading file is handled using hash algorithm, is obtained and the current downloading file phase Corresponding current Hash character string.
Current downloading file is handled using hash algorithm, determines the internal characteristics of current downloading file, that is, Current Hash character string corresponding with current downloading file.Wherein, current downloading file is handled using hash algorithm The reason of be: different files are handled using hash algorithm, obtained Hash character string is not also identical.It therefore, can be with It is whether identical whether consistent with the current downloading source file of file to determine currently to download file by Hash character string.
If S140, the current Hash character string are consistent with the original Hash character string, the current downloading file For target downloading file.
Specifically, the relatively current corresponding current Hash character string of downloading file original Hash character corresponding with source file It whether consistent goes here and there.If consistent, determine that current downloading file is target downloading file;If current Hash character string and original Kazakhstan Uncommon character string is different, then currently downloading file is not target downloading file, and carries out indicating risk to user, wherein risk mentions Show the risk having been tampered with for reminding user's current file to exist.
Wherein, whether carrying out indicating risk to user can be, in downloading interface pop-up failed download or re-download Dialog box, user can select according to the actual situation.It certainly, can also be in program during practical application Setting re-downloads the program code of file destination at least once, also if currently downloading file is not target downloading file It is to repeat S110 to S140.
The download information that the technical solution of the embodiment of the present invention is sent by receiving transmission end;Wherein, download information is at least Including download address and cryptographic Hash character string;Cryptographic Hash character string is decrypted to obtain original Hash character string, root Obtain current file to be downloaded according to download address, and current file to be downloaded be downloaded, the file that downloading is obtained as Current downloading file;Current downloading file is handled using hash algorithm, obtain and currently downloads that file is corresponding to work as Preceding Hash character string;If current Hash character string is consistent with original Hash character string, file will be downloaded currently as target downloading File realizes corresponding with source file by the corresponding Hash character string of the current downloading file of judgement after the completion of file download Whether Hash character string unanimously determines whether file has been redirected to other files during downloading, improves user The technical effect of experience and downloading file security.
Embodiment two
As a preferred embodiment of above-described embodiment, Fig. 2 is a kind of file download provided by the embodiment of the present invention two Method preferred embodiment is flow diagram, as shown in Figure 2, which comprises
S201, receiving end issue the request of downloading object transmission file to transmission end.
Receiving end can be the one end for sending downloading request, optionally, mobile terminal.Transmission end can be reception downloading and ask The one end asked.The figure of some object transmission file is optionally downloaded on mobile terminal display interface when user triggers receiving end Mark or key, then receiving end can issue the request of downloading target transmission file to transmission end.
S202, transmission end receive downloading request, and using hash algorithm are handled to obtain to object transmission file and mesh The corresponding original Hash character string of mark transmission file.
Transmission end can receive downloading request, and be passed according to downloading request target corresponding with downloading request The source file of defeated file;Certainly the source file of object transmission file corresponding with downloading request can also be stored directly in service In device, object transmission file corresponding with downloading request can be chosen from server according to downloading request.It is calculated using Hash Method handles object transmission file to obtain Hash character string corresponding with file destination, or can use Hash in advance Algorithm is handled to obtain the Kazakhstan of at least one object transmission file at least one object transmission file that server memory is stored up Uncommon character string.
S203, transmission end encrypt original Hash substring using Encryption Algorithm.
In order to improve the safety in object transmission file, that is, avoid being tampered in transmission process, it can be to mesh Mark transmission file encrypted, generally directly object transmission file is encrypted in the prior art, may cause in this way by It is too long in the file content excessive time for causing to encrypt or decrypt, to influence user experience.In order to improve to object transmission The efficiency that file is encrypted and decrypted, can the Hash character string to object transmission file encrypt.
It should be noted that receiving end and transmission end can when carrying out encryption or decryption processing to object transmission file With pre-defined at least one Encryption Algorithm, optionally, symmetric encipherment algorithm or rivest, shamir, adelman can be according to preparatory The rule of definition transmission end and reception in encryption and decryption, which are calculated, uses same encryption method in encryption and decryption information according to agreement.Show Example property, if transmission end and receiving end Encryption Algorithm predetermined are symmetric encipherment algorithms, then receiving end and transmission end Decruption key is identical with decruption key, and transmission end can exchange encryption key reconciliation by network communication protocol with receiving end in advance Key, transmission end can encrypt original Hash character string using encryption key, encrypt to original Hash character Benefit be can not have to object transmission file is encrypted, it is only necessary to part download information is encrypted i.e. original Hash character string is encrypted, and the speed of download parsing can be improved when it is decrypted.
The download information for carrying cryptographic Hash character string is sent to receiving end by S204, transmission end.
Wherein, include cryptographic Hash character string and download address in download information, also may include object transmission file Title, type etc..When transmission end is got with downloading request corresponding download information, download information can be sent to reception End, application program required for receiving end can obtain user according to the download information or object transmission file.
S205, receiving end receive download information, and cryptographic Hash character string are decrypted, and obtain original Hash character String.
Receiving end receives the download information that transmission end is sent, and wherein can also include original Hash character string in download information Current file to be downloaded corresponding with download address is obtained according to the download address in download information.And to current text to be downloaded Part is downloaded.Cryptographic Hash character string is decrypted according to the decryption key pre-defined, obtains Hash before encrypting Character string, that is, original Hash character string.
S206, receiving end download object transmission file, and the current Hash of object transmission file is calculated using hash algorithm Character string.
Receiving end can obtain current goal corresponding with download address according to the download address in download information and transmit File.After getting current goal transmission file, current goal transmission file can be handled using hash algorithm Obtain current Hash character string corresponding with current goal transmission file.Wherein, it is used jointly between transmission end and receiving end Algorithm can be found in Fig. 3.
S207, judge whether current Hash character string and original Hash character string are consistent, if so, executing S208;If it is not, Then execute S209.
It is corresponding with user's transmission downloading request of object transmission file in order to ensure current goal transmits file, also Be in order to guarantee not being redirected to other network address during object transmission file is in downloading, can be current by judging Hash character string and original Hash character string whether unanimously come determine current goal transmission file whether be and user sends and downloads Request corresponding object transmission file.It specifically can be, if current Hash character string is consistent with original Hash character string, say Bright current goal transmission file is corresponding with the downloading request that user sends, i.e., current goal transmission file is object transmission text Part;If current Hash character string and original Hash character string are inconsistent, illustrating current transmission file not is under user is required The object transmission file of load, that is to say, that after receiving end sends request, receiving end handles downloading request, possible quilt Other network address are redirected to, cause the current goal transmission file of downloading and object transmission file inconsistent.
S208, it downloads successfully.
If current Hash character string is consistent with original Hash character string, illustrate that current goal transmission file is user institute The object transmission file needed, is downloaded successfully.
S209, failed download, remind user.
If current Hash character string and original Hash character string are inconsistent, illustrate to be got according to download address current Object transmission file is not object transmission file needed for user, then reminds user.Wherein, reminding user can Be pop up failed download dialog box, be also possible to repeat S201 to S207 at least once, if still without downloading at Function then reminds user's failed download.
The download information that the technical solution of the embodiment of the present invention is sent by receiving transmission end;Wherein, download information is at least Including download address and cryptographic Hash character string;Cryptographic Hash character string is decrypted to obtain original Hash character string, root Obtain current file to be downloaded according to download address, and current file to be downloaded be downloaded, the file that downloading is obtained as Current downloading file;Current downloading file is handled using hash algorithm, obtain and currently downloads that file is corresponding to work as Preceding Hash character string;If current Hash character string is consistent with original Hash character string, file will be downloaded currently as target downloading File realizes corresponding with source file by the corresponding Hash character string of the current downloading file of judgement after the completion of file download Whether Hash character string unanimously determines whether file has been redirected to other files during downloading, improves user The technical effect of experience and downloading file security.
Embodiment three
Fig. 4 is a kind of structural schematic diagram for file download system that the embodiment of the present invention three provides, which includes: to receive Information module 410, deciphering module 420, hash algorithm processing module 430 and determining downloading file module 440.
Wherein, information module 410 is received, for receiving the download information of transmission end transmission;Wherein, the download information is extremely It less include download address and cryptographic Hash character string;Deciphering module 420, for the cryptographic Hash character string to be decrypted Original Hash character string is obtained, current file to be downloaded is obtained according to the download address, and to the current file to be downloaded It is downloaded, the file that downloading is obtained is as current downloading file;Hash algorithm processing module 430, for being calculated using Hash Method handles the current downloading file, obtains current Hash character string corresponding with the current downloading file;Really It fixs and carries file module 440, it is described current if consistent with the original Hash character string for the current Hash character string Downloading file is target downloading file.
Based on the above technical solution, it is described reception information module receive transmission end send download information it Before, further includes: when the transmission end receives the downloading request that the receiving end is sent, the transmission end uses the Hash Algorithm handles the source file corresponding with the current downloading file, generates original Hash character string;The transmission End encrypts the original Hash character string using preset Encryption Algorithm, generates the cryptographic Hash character string, and will The download information for carrying the cryptographic Hash character string and download address feeds back to the receiving end.
On the basis of above-mentioned each technical solution, it is described reception information module receive transmission end send download information it Before, further including the transmission end is handled at least one storage file using the hash algorithm, generate with it is described at least The corresponding original Hash character string of one storage file;The transmission end is using preset Encryption Algorithm to each original Hash Character string is encrypted, and generates cryptographic Hash character string corresponding with each original Hash character string, and by each encryption Hash character string carries out corresponding storage at least one each described storage file;When the transmission end receives the downloading request When, the target cryptographic Hash character string of storage file corresponding with the downloading request is obtained, and the target will be carried and added The download information of close Hash character string and download address feeds back to the receiving end.
On the basis of above-mentioned each technical solution, the transmission end is using preset Encryption Algorithm to each original Hash Character string is encrypted, comprising: the transmission end using preset symmetric encipherment algorithm to each original Hash character string into Row encryption, wherein the encryption key that the transmission end is held is identical with the decruption key that the receiving end is held.
On the basis of above-mentioned each technical solution, the transmission end is using preset Encryption Algorithm to each original Hash Character string is encrypted, comprising: the transmission end is using preset asymmetric symmetric encipherment algorithm to each original Hash word Symbol string is encrypted;Wherein, the decruption key that the encryption key that the transmission end is held and the receiving end are held is different.
On the basis of above-mentioned each technical solution, the transmission end is using preset Encryption Algorithm to each original Hash Character string is encrypted, comprising: if the transmission end encrypts the original Hash character string using public-key cryptography, institute Receiving end is stated to be decrypted using cryptographic Hash character string described in private cipher key pair;If the transmission end uses private cipher key pair institute It states original Hash character string to be encrypted, then the receiving end solves the cryptographic Hash character string using public-key cryptography It is close.
On the basis of above-mentioned each technical solution, the system also includes: reminding module, if being used for the current Hash Character string is different from the original Hash character string, then the current downloading file is not the target downloading file, and to Family carries out indicating risk, wherein the indicating risk is used to that current file described in user to be reminded to there is the risk having been tampered with.
The download information that the technical solution of the embodiment of the present invention is sent by receiving transmission end;Wherein, download information is at least Including download address and cryptographic Hash character string;Cryptographic Hash character string is decrypted to obtain original Hash character string, root Obtain current file to be downloaded according to download address, and current file to be downloaded be downloaded, the file that downloading is obtained as Current downloading file;Current downloading file is handled using hash algorithm, obtain and currently downloads that file is corresponding to work as Preceding Hash character string;If current Hash character string is consistent with original Hash character string, file will be downloaded currently as target downloading File realizes corresponding with source file by the corresponding Hash character string of the current downloading file of judgement after the completion of file download Whether Hash character string unanimously determines whether file has been redirected to other files during downloading, improves user The technical effect of experience and downloading file security.
File download system provided by the embodiment of the present invention can be performed under file provided by any embodiment of the invention Support method has the corresponding functional module of execution method and beneficial effect.
It is worth noting that, each unit included by above system and module are only divided according to function logic , but be not limited to the above division, as long as corresponding functions can be realized;In addition, the specific name of each functional unit Title is also only for convenience of distinguishing each other, and is not intended to restrict the invention the protection scope of embodiment.
Example IV
Fig. 5 is a kind of structural schematic diagram for server that the embodiment of the present invention four provides.Fig. 5, which is shown, to be suitable for being used to realizing The block diagram of the exemplary servers 50 of embodiment of the embodiment of the present invention.The server 50 that Fig. 5 is shown is only an example, no The function and use scope for coping with the embodiment of the present invention bring any restrictions.
As shown in figure 5, server 50 is showed in the form of general-purpose computations server.The component of server 50 may include but Be not limited to: one or more processor or processing unit 501, system storage 502, connect different system components (including System storage 502 and processing unit 501) bus 503.
Bus 503 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Server 50 typically comprises a variety of computer system readable media.These media can be and any can be serviced The usable medium that device 50 accesses, including volatile and non-volatile media, moveable and immovable medium.
System storage 502 may include the computer system readable media of form of volatile memory, such as deposit at random Access to memory (RAM) 504 and/or cache memory 505.Server 50 may further include it is other it is removable/can not Mobile, volatile/non-volatile computer system storage medium.Only as an example, storage system 506 can be used for reading and writing not Movably, non-volatile magnetic media (Fig. 5 do not show, commonly referred to as " hard disk drive ").It, can be with although being not shown in Fig. 5 The disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") is provided, and non-volatile to moving The CD drive of CD (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driving Device can be connected by one or more data media interfaces with bus 503.Memory 502 may include at least one program Product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform the present invention The function of each embodiment.
Program/utility 508 with one group of (at least one) program module 507, can store in such as memory In 502, such program module 507 includes but is not limited to operating system, one or more application program, other program modules And program data, it may include the realization of network environment in each of these examples or certain combination.Program module 507 Usually execute the function and/or method in embodiment described in the invention.
Server 50 (such as keyboard, can also be directed toward server, display 410 with one or more external servers 509 Deng) communication, can also enable a user to the server communication interacted with the server 50 with one or more, and/or with make Any server that the server 50 can be communicated with one or more of the other calculation server (such as network interface card, modulation /demodulation Device etc.) communication.This communication can be carried out by input/output (I/O) interface 511.Also, server 50 can also pass through Network adapter 512 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, such as Internet) communication.As shown, network adapter 512 is communicated by bus 503 with other modules of server 50.It should be bright It is white, although being not shown in Fig. 5, other hardware and/or software module can be used in conjunction with server 50, including but not limited to: micro- Code, server driver, redundant processing unit, external disk drive array, RAID system, tape drive and data are standby Part storage system etc..
Processing unit 501 by the program that is stored in system storage 502 of operation, thereby executing various function application with And data processing, such as realize document down loading method provided by the embodiment of the present invention.
Embodiment five
The embodiment of the present invention five also provides a kind of storage medium comprising computer executable instructions, and the computer can be held Row instruction by computer processor when being executed for executing a kind of document down loading method.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with one or more programming languages or combinations thereof come write for execute the embodiment of the present invention operation Computer program code, described program design language include object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language --- such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of document down loading method characterized by comprising
Receive the download information that transmission end is sent;Wherein, the download information includes at least download address and cryptographic Hash word Symbol string;
The cryptographic Hash character string is decrypted to obtain original Hash character string, according to the download address obtain currently to File is downloaded, and the current file to be downloaded is downloaded, the file that downloading is obtained is as current downloading file;
The current downloading file is handled using hash algorithm, is obtained corresponding with the current downloading file current Hash character string;
If the current Hash character string is consistent with the original Hash character string, the current downloading file is target downloading File.
2. the method according to claim 1, wherein it is described reception transmission end send download information before, Further include:
When the transmission end receives the downloading request that the receiving end is sent, the transmission end uses the hash algorithm pair The source file corresponding with the current downloading file is handled, and original Hash character string is generated;
The transmission end encrypts the original Hash character string using preset Encryption Algorithm, generates the cryptographic Hash Character string, and the download information for carrying the cryptographic Hash character string and download address is fed back into the receiving end.
3. the method according to claim 1, wherein it is described reception transmission end send download information before, Further include:
The transmission end is handled at least one storage file using the hash algorithm, generate with it is described at least one deposit Store up the corresponding original Hash character string of file;
The transmission end encrypts each original Hash character string using preset Encryption Algorithm, generates and each original The corresponding cryptographic Hash character string of beginning Hash character string, and by each cryptographic Hash character string and it is each it is described at least one storage File carries out corresponding storage;
When the transmission end receives downloading request, the target for obtaining storage file corresponding with the downloading request adds Close Hash character string, and the download information for carrying the target cryptographic Hash character string and download address is fed back into described connect Receiving end.
4. according to the method in claim 2 or 3, which is characterized in that the transmission end is using preset Encryption Algorithm to each The original Hash character string is encrypted, comprising:
The transmission end encrypts each original Hash character string using preset symmetric encipherment algorithm, wherein described The encryption key that transmission end is held is identical with the decruption key that the receiving end is held.
5. according to the method in claim 2 or 3, which is characterized in that the transmission end is using preset Encryption Algorithm to each The original Hash character string is encrypted, comprising:
The transmission end encrypts each original Hash character string using preset asymmetric symmetric encipherment algorithm;Its In, the decruption key that encryption key and the receiving end that the transmission end is held are held is different.
6. according to the method described in claim 5, it is characterized in that, the transmission end is using preset Encryption Algorithm to each described Original Hash character string is encrypted, comprising:
If the transmission end encrypts the original Hash character string using public-key cryptography, the receiving end is using privately owned Cryptographic Hash character string described in key pair is decrypted;
If the transmission end is encrypted using original Hash character string described in private cipher key pair, the receiving end is using open Cryptographic Hash character string described in key pair is decrypted.
7. the method according to claim 1, wherein further include:
If the current Hash character string is different from the original Hash character string, the current downloading file is not described Target downloading file, and indicating risk is carried out to user, wherein the indicating risk is for reminding current file described in user to deposit In the risk having been tampered with.
8. a kind of file download system characterized by comprising
Information module is received, for receiving the download information of transmission end transmission;Wherein, the download information includes at least downloading ground Location and cryptographic Hash character string;
Deciphering module obtains original Hash character string for the cryptographic Hash character string to be decrypted, according to the downloading Address obtains current file to be downloaded, and is downloaded to the current file to be downloaded, using file that downloading obtains as working as Front lower published article part;
Hash algorithm processing module obtains working as with described for handling the current downloading file using hash algorithm The corresponding current Hash character string of front lower published article part;
Determine downloading file module, it is described if consistent with the original Hash character string for the current Hash character string Current downloading file is target downloading file.
9. a kind of server, which is characterized in that the server includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now document down loading method as described in any in claim 1-7.
10. a kind of storage medium comprising computer executable instructions, the computer executable instructions are by computer disposal For executing the document down loading method as described in any in claim 1-7 when device executes.
CN201811166704.0A 2018-10-08 2018-10-08 A kind of document down loading method, system, server and storage medium Withdrawn CN108965486A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811166704.0A CN108965486A (en) 2018-10-08 2018-10-08 A kind of document down loading method, system, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811166704.0A CN108965486A (en) 2018-10-08 2018-10-08 A kind of document down loading method, system, server and storage medium

Publications (1)

Publication Number Publication Date
CN108965486A true CN108965486A (en) 2018-12-07

Family

ID=64472861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811166704.0A Withdrawn CN108965486A (en) 2018-10-08 2018-10-08 A kind of document down loading method, system, server and storage medium

Country Status (1)

Country Link
CN (1) CN108965486A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311972A (en) * 2019-06-27 2019-10-08 百度在线网络技术(北京)有限公司 Detection method, device, equipment and medium for application software distribution
CN110427226A (en) * 2019-08-09 2019-11-08 杭州安恒信息技术股份有限公司 A kind of method and apparatus that quick release program relies on
CN110719499A (en) * 2019-09-19 2020-01-21 北京字节跳动网络技术有限公司 Video downloading method, system, medium and electronic device
CN111930687A (en) * 2020-08-10 2020-11-13 Oppo(重庆)智能科技有限公司 File processing method, device, terminal and storage medium
CN113742008A (en) * 2021-09-13 2021-12-03 挂号网(杭州)科技有限公司 Interface calling method and device, electronic equipment and storage medium
CN113808603A (en) * 2021-09-29 2021-12-17 恒安嘉新(北京)科技股份公司 Audio tampering detection method, device, server and storage medium
CN113849858A (en) * 2021-09-29 2021-12-28 北京兰云科技有限公司 Method, device, computer storage medium and terminal for realizing file supervision
CN114329366A (en) * 2022-03-14 2022-04-12 天津联想协同科技有限公司 Network disk file control method and device, network disk and storage medium
CN114615031A (en) * 2022-02-28 2022-06-10 中国农业银行股份有限公司 File storage method and device, electronic equipment and storage medium
CN116910711A (en) * 2023-07-13 2023-10-20 北京领创医谷科技发展有限责任公司 MCU firmware confusion method, system, server and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101146261A (en) * 2007-10-19 2008-03-19 吕利勇 A realization method for digital protection of electronic media
US20080134304A1 (en) * 2006-12-05 2008-06-05 Samsung Electronics Co., Ltd. Method and apparatus for transmitting contents with limited system permissions
CN101330524A (en) * 2008-07-30 2008-12-24 华为技术有限公司 Method and apparatus for processing download and dispatching file as well as transmission file system
CN105227680A (en) * 2015-10-26 2016-01-06 广东佳学信息科技有限公司 A kind of smart machine file download Validity control method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080134304A1 (en) * 2006-12-05 2008-06-05 Samsung Electronics Co., Ltd. Method and apparatus for transmitting contents with limited system permissions
CN101146261A (en) * 2007-10-19 2008-03-19 吕利勇 A realization method for digital protection of electronic media
CN101330524A (en) * 2008-07-30 2008-12-24 华为技术有限公司 Method and apparatus for processing download and dispatching file as well as transmission file system
CN105227680A (en) * 2015-10-26 2016-01-06 广东佳学信息科技有限公司 A kind of smart machine file download Validity control method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311972B (en) * 2019-06-27 2022-02-22 百度在线网络技术(北京)有限公司 Detection method, device, equipment and medium for application software distribution
CN110311972A (en) * 2019-06-27 2019-10-08 百度在线网络技术(北京)有限公司 Detection method, device, equipment and medium for application software distribution
CN110427226A (en) * 2019-08-09 2019-11-08 杭州安恒信息技术股份有限公司 A kind of method and apparatus that quick release program relies on
CN110719499A (en) * 2019-09-19 2020-01-21 北京字节跳动网络技术有限公司 Video downloading method, system, medium and electronic device
CN111930687A (en) * 2020-08-10 2020-11-13 Oppo(重庆)智能科技有限公司 File processing method, device, terminal and storage medium
CN113742008A (en) * 2021-09-13 2021-12-03 挂号网(杭州)科技有限公司 Interface calling method and device, electronic equipment and storage medium
CN113742008B (en) * 2021-09-13 2024-04-02 挂号网(杭州)科技有限公司 Interface calling method and device, electronic equipment and storage medium
CN113849858A (en) * 2021-09-29 2021-12-28 北京兰云科技有限公司 Method, device, computer storage medium and terminal for realizing file supervision
CN113808603B (en) * 2021-09-29 2023-07-07 恒安嘉新(北京)科技股份公司 Audio tampering detection method, device, server and storage medium
CN113808603A (en) * 2021-09-29 2021-12-17 恒安嘉新(北京)科技股份公司 Audio tampering detection method, device, server and storage medium
CN114615031A (en) * 2022-02-28 2022-06-10 中国农业银行股份有限公司 File storage method and device, electronic equipment and storage medium
CN114329366A (en) * 2022-03-14 2022-04-12 天津联想协同科技有限公司 Network disk file control method and device, network disk and storage medium
CN114329366B (en) * 2022-03-14 2022-07-26 天津联想协同科技有限公司 Network disk file control method and device, network disk and storage medium
CN116910711A (en) * 2023-07-13 2023-10-20 北京领创医谷科技发展有限责任公司 MCU firmware confusion method, system, server and storage medium
CN116910711B (en) * 2023-07-13 2024-06-11 北京领创医谷科技发展有限责任公司 MCU firmware confusion method, system, server and storage medium

Similar Documents

Publication Publication Date Title
CN108965486A (en) A kind of document down loading method, system, server and storage medium
US11520912B2 (en) Methods, media, apparatuses and computing devices of user data authorization based on blockchain
WO2018014723A1 (en) Key management method, apparatus, device and system
US9430211B2 (en) System and method for sharing information in a private ecosystem
US11283778B2 (en) Data exchange system, method and device
US11777914B1 (en) Virtual cryptographic module with load balancer and cryptographic module fleet
US20180288020A1 (en) Data operations using a proxy encryption key
CN108964893B (en) Key processing method, device, equipment and medium
JP2011527804A (en) Information transmission using virtual input layout
US10630722B2 (en) System and method for sharing information in a private ecosystem
TWI725148B (en) Methods, systems, and media for using dynamic public key infrastructure to send and receive encrypted messages
CN109660534B (en) Multi-merchant-based security authentication method and device, electronic equipment and storage medium
CN106411520B (en) Method, device and system for processing virtual resource data
CN111193741B (en) Information sending method, information obtaining method, device and equipment
US10462113B1 (en) Systems and methods for securing push authentications
CA3052849C (en) Payment control method and device, electronic device, and storage medium
CN112187726A (en) Data transmission method, device, storage medium and terminal
CN115296807B (en) Key generation method, device and equipment for preventing industrial control network viruses
CN109191122B (en) Method and device for acquiring transaction information certificate
US11722295B2 (en) Methods, apparatus, and articles of manufacture to securely audit communications
CN113420331B (en) Method and device for managing file downloading permission
CN112689276B (en) Bluetooth headset firmware updating processing method
CN111970281B (en) Routing equipment remote control method and system based on verification server and electronic equipment
KR102380504B1 (en) Service system and method for electronic wallet using bookmarklet
JP2006197640A (en) Encrypted data distribution service system

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

Application publication date: 20181207

WW01 Invention patent application withdrawn after publication