CN106650495A - File verification method and device - Google Patents

File verification method and device Download PDF

Info

Publication number
CN106650495A
CN106650495A CN201611170862.4A CN201611170862A CN106650495A CN 106650495 A CN106650495 A CN 106650495A CN 201611170862 A CN201611170862 A CN 201611170862A CN 106650495 A CN106650495 A CN 106650495A
Authority
CN
China
Prior art keywords
target
transaction
file
verified
cryptographic hash
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.)
Granted
Application number
CN201611170862.4A
Other languages
Chinese (zh)
Other versions
CN106650495B (en
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.)
Shanghai Canaan Jiesi Information Technology Co ltd
Original Assignee
Hangzhou Canaan Creative Information Technology 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 Hangzhou Canaan Creative Information Technology Ltd filed Critical Hangzhou Canaan Creative Information Technology Ltd
Priority to CN201611170862.4A priority Critical patent/CN106650495B/en
Publication of CN106650495A publication Critical patent/CN106650495A/en
Application granted granted Critical
Publication of CN106650495B publication Critical patent/CN106650495B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction

Abstract

The invention discloses a file verification method and a file verification device, which are used for improving the security of a file. The method comprises the following steps: receiving a file to be verified sent by a user and target data used for verifying the file to be verified; judging whether a target transaction corresponding to the file to be verified exists in a target block chain for performing virtual currency transaction according to the target data; when a target transaction corresponding to the file to be verified exists in the target block chain, determining that the file to be verified passes verification; and outputting a prompt message that the verification is passed. By adopting the method provided by the invention, the possibility of error verification caused by the simultaneous tampering of the file to be verified and the file to be preserved is avoided, and the security of the file is further improved.

Description

A kind of file verification method and device
Technical field
The present invention relates to Internet technical field, more particularly to a kind of file verification method and device.
Background technology
Through development in recent years, the electronic degree more and more higher of file, the security of some important e-files It is just more and more important.For example, it is related to note issuance, intelligent contract, equity right registration and transfer, authentication, health pipe The file of the programs such as reason, judicial arbitration, ballot, once being tampered, the loss for causing is very serious.
In the prior art, to guarantee the security of vital document, under normal circumstances user can by vital document send to Notary organization is saved from damage, when needing to use these vital documents, notary organization can be asked to test these vital documents Card, to guarantee that these vital documents are not tampered with.When notary organization is verified, the file saved from damage in advance and user are worked as into premise For file compare, when comparison result is consistent, determine that file is not tampered with.
However, because in traditional notarization scheme, file is saved from damage in the database of notary organization, and in notary organization The file saved from damage is also to be managed by people, thus, save the possibility that the file in notary organization yet suffers from being tampered from damage, When the file saved from damage and the file verified do it is same remain able to the checking by notary organization when distorting, but it is literary Part be not before file.Therefore, in traditional notarization scheme, the security of file places one's entire reliance upon the letter of notary organization Expenditure, however it remains the not high problem of security, thus, how to propose a kind of file verification method to improve the safety of file Property, it is a technical problem urgently to be resolved hurrily.
The content of the invention
The present invention provides a kind of file verification method and device, to the security for improving file.
The present invention provides a kind of file verification method, including:
File to be verified and the target data for verifying the file to be verified that receive user sends;
According to the target data judge in the target block chain for carrying out ideal money transaction whether there is with it is described The corresponding target transaction of file to be verified;
When there is target transaction corresponding with the file to be verified in the target block chain, determine described to be verified File verification passes through;
The prompting message that output is verified.
The beneficial effects of the present invention is:By verifying that the file destination of file to be verified is judged for carrying out ideal money In the block chain of transaction whether there is target transaction corresponding with file to be verified, and exist in target block chain with it is to be verified During the corresponding target transaction of file, being verified for file to be verified is determined.Because the data in block chain are difficult to be tampered, because And, file is verified by the transaction in block chain, it is to avoid file to be verified and the file saved from damage by and meanwhile distort and Cause the possibility of checking by mistake, and then improve the security of file.
In one embodiment, methods described also includes:
The target hash function that receive user sends;
The target cryptographic Hash of the file to be verified is calculated according to the target hash function.
In one embodiment, the target Hash that the file to be verified is calculated according to the target hash function Value, including:
Various preset formats of the file to be verified are obtained, wherein, various preset formats include following at least one Plant form:
Unprocessed form, extensible markup language form and number format;
It is right to obtain all preset format institutes that Hash calculation is carried out to every kind of preset format according to the target hash function The cryptographic Hash answered;
Carry out secondary Hash calculation to the cryptographic Hash corresponding to all preset formats to obtain according to the target hash function To target cryptographic Hash.
The beneficial effect of the present embodiment is:By carrying out Hash calculation twice to file to be verified, so that target is breathed out The computation rule of uncommon value is more complicated, and increases the difficulty that other users obtain target cryptographic Hash by file to be verified, is entered One step improves the security of file.
In one embodiment, when the target data includes transaction ID, methods described also includes:
Judge to whether there is and the transaction corresponding to the transaction ID in the target block chain;
When existing with transaction corresponding to the transaction ID, judge whether the number of times that the transaction is confirmed reaches Preset times;
When the number of times that the transaction is confirmed reaches preset times, the first Hash recorded in the transaction is obtained Value;
First cryptographic Hash is compared with the target cryptographic Hash;
When comparison result is consistent, determine that there is target corresponding with the file to be verified in the target block chain hands over Easily, and the target transaction is to record the transaction of first cryptographic Hash.
The beneficial effect of the present embodiment is:When presence in target block chain and the transaction corresponding to transaction ID, need Whether the number of times being confirmed that judges to conclude the business reaches preset times.After transaction obtains the confirmation of certain number of times, unless set Standby calculating speed is more than the whole network speed, otherwise just cannot enter edlin to the first cryptographic Hash in the transaction.Avoid other use Family is modified by the first cryptographic Hash.Improve the security of file.
In one embodiment, when the target data does not include transaction ID, methods described also includes:
Judge to whether there is second cryptographic Hash consistent with the target cryptographic Hash in the target block chain;
When there is second cryptographic Hash consistent with the target cryptographic Hash, judgement records the transaction of second cryptographic Hash Whether the number of times being confirmed reaches preset times;
When the number of times that the transaction for recording second cryptographic Hash is confirmed reaches preset times, the target area is determined There is target transaction corresponding with the file to be verified in block chain, and the target transaction is to record second cryptographic Hash Transaction.
The beneficial effect of the present embodiment is:When transaction ID cannot be obtained, target area is judged by target cryptographic Hash Whether there is target transaction corresponding with file to be verified in block chain, so as to provide a kind of checking when without transaction ID Scheme, reduces the condition of file verification.
The present invention also provides a kind of file verification device, including:
First receiver module, for receive user send file to be verified and for verifying the file to be verified Target data;
First judge module, for judging the target block chain for carrying out ideal money transaction according to the target data In whether there is target transaction corresponding with the file to be verified;
First determining module, for when there is target transaction corresponding with the file to be verified in the target block chain When, determine that the file verification to be verified passes through;
Output module, for exporting the prompting message being verified.
In one embodiment, described device also includes:
Second receiver module, for the target hash function that receive user sends;
Computing module, for calculating the target cryptographic Hash of the file to be verified according to the target hash function.
In one embodiment, the computing module, including:
Acquisition submodule, for obtaining various preset formats of the file to be verified, wherein, various preset formats Including following at least one form:
Unprocessed form, extensible markup language form and number format;
First calculating sub module, for carrying out Hash calculation to every kind of preset format to obtain according to the target hash function To the cryptographic Hash corresponding to all preset formats;
Second calculating sub module, for being entered to the cryptographic Hash corresponding to all preset formats according to the target hash function Secondary Hash calculation go to obtain target cryptographic Hash.
In one embodiment, described device also includes:
Second judge module, for when the target data includes transaction ID, judging to be in the target block chain No presence and the transaction corresponding to the transaction ID;
3rd judge module, for when existing with transaction corresponding to the transaction ID, judging that described transaction obtains Whether the number of times of confirmation reaches preset times;
Acquisition module, for when the number of times that the transaction is confirmed reaches preset times, obtaining institute in the transaction First cryptographic Hash of record;
Comparing module, for first cryptographic Hash to be compared with the target cryptographic Hash;
Second determining module, for when comparison result is consistent, determining the target block chain in exist it is to be tested with described The corresponding target transaction of card file, and the target transaction is to record the transaction of first cryptographic Hash.
In one embodiment, described device also includes:
4th judge module, for when the target data not include transaction ID when, in judging the target block chain With the presence or absence of second cryptographic Hash consistent with the target cryptographic Hash;
5th judge module, for when there is second cryptographic Hash consistent with the target cryptographic Hash, judging record institute State whether the number of times that the transaction of the second cryptographic Hash is confirmed reaches preset times;
3rd determining module, for reaching preset times when the number of times that the transaction for recording second cryptographic Hash is confirmed When, determine there is target transaction corresponding with the file to be verified, and the target transaction in the target block chain for note Record the transaction of second cryptographic Hash.
Other features and advantages of the present invention will be illustrated in the following description, also, the partly change from specification Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by the explanations write Specifically noted structure is realizing and obtain in book, claims and accompanying drawing.
Below by drawings and Examples, technical scheme is described in further detail.
Description of the drawings
Accompanying drawing is used for providing a further understanding of the present invention, and constitutes a part for specification, the reality with the present invention Applying example is used to explain the present invention together, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the flow chart of one embodiment of the invention file verification method;
Fig. 2 is the flow chart of one embodiment of the invention file verification method;
Fig. 3 is the flow chart of one embodiment of the invention file verification method;
Fig. 4 is the flow chart of one embodiment of the invention file verification method;
Fig. 5 is the flow chart of one embodiment of the invention file verification method;
Fig. 6 is the block diagram of file verification device in one embodiment of the invention;
Fig. 7 is the block diagram of file verification device in one embodiment of the invention;
Fig. 8 is the block diagram of file verification device in one embodiment of the invention;
Fig. 9 is the block diagram of file verification device in one embodiment of the invention;
Figure 10 is the block diagram of file verification device in one embodiment of the invention.
Specific embodiment
The preferred embodiments of the present invention are illustrated below in conjunction with accompanying drawing, it will be appreciated that preferred reality described herein Apply example and be merely to illustrate and explain the present invention, be not intended to limit the present invention.
Block chain technology refer to decentralization and go trust by way of collective safeguard an authentic data storehouse technology Scheme.The technical scheme mainly lets on any number of nodes in system, by a string using cryptography method correlation coproduction Raw data block, contains the system full detail exchange data in certain hour in each data block, and generates data and refer to Line is used to verify the validity of its information and the next database block of link.
Block chain can realize that the distributed recording of global metadata information (can be recorded, Er Feiyou by system participant collective Mechanism's centralized recording of one centralization) and distributed storage (can be stored in the nodes of all participation record datas, rather than In being centrally stored in the agency node of centralization).
Block chain technology can under information asymmetry, uncertain environment, set up meet economic activity rely generations, " trust " ecosystem of exhibition.Block chain using mathematical algorithm (program) as endorsement, all set up one and disclose by all of rule On bright mathematical algorithm (program), the crowd of all different political culture backgrounds can be allowed to be known together, solve value Transfer And credit transfer.
The data being stored in the block chain for carrying out ideal money transaction are not easy to lose and distort, technical scheme Proposed using this characteristic of block chain.
Fig. 1 is the flow chart of one embodiment of the invention file verification method, as shown in figure 1, file verification in the present invention Method can be used to provide the server corresponding to the mechanism of notarization service, and the method comprises the steps S101-S104:
In step S101, file to be verified and the number of targets for verifying file to be verified that receive user sends According to;
In step s 102, judged for whether depositing in the target block chain for carrying out ideal money transaction according to target data In target transaction corresponding with file to be verified;
In step s 103, when there is target transaction corresponding with file to be verified in target block chain, determine to be tested Card file verification passes through;
In step S104, the prompting message being verified is exported.
In the present embodiment, the file to be verified that receive user sends, and for verifying the target data of file to be verified; Wherein, the target data can be the transaction ID concluded the business that is located when saving from damage to file to be verified.According to the target data Judge for whether there is target transaction corresponding with file to be verified in the target block chain for carrying out ideal money transaction;Work as mesh When there is target transaction corresponding with the file to be verified in mark block chain, determine that the file verification to be verified passes through;Output is tested The prompting message that card passes through.
The beneficial effects of the present invention is:By verifying that the file destination of file to be verified is judged for carrying out ideal money In the block chain of transaction whether there is target transaction corresponding with file to be verified, and exist in target block chain with it is to be verified During the corresponding target transaction of file, being verified for file to be verified is determined.Because the data in block chain are difficult to be tampered, because And, file is verified by the transaction in block chain, it is to avoid file to be verified and the file saved from damage by and meanwhile distort and Cause the possibility of checking by mistake, and then improve the security of file.
In one embodiment, as shown in Fig. 2 before above-mentioned steps S102, method can also be implemented as following steps S201-S202:
In step s 201, the target hash function that receive user sends;
In step S202, the target cryptographic Hash of file to be verified is calculated according to target hash function.
User will can in advance save from damage in the block chain that user carries out ideal money transaction for the file of checking.Separately Outward, because block chain is not to design for data storage, low volume data can only be stored, for example, the cryptographic Hash of original document, because This, user can be stored in file to be verified corresponding cryptographic Hash in the transaction of block chain, to realize the guarantor to file to be verified Entirely.Because block chain stores all transaction having been acknowledged, and because cryptographic Hash is unique, just may certify that this The presence of the corresponding file of cryptographic Hash.
It should be noted that the corresponding cryptographic Hash of the file to be verified can be the file to be verified cryptographic Hash of itself. It can also be the final hash value of the file to be verified of multiple format.
When the final hash value of the file to be verified of multiple format is calculated, the various of the file to be verified are obtained in advance Preset format, Hash calculation is carried out according to default hash function to the file to be verified of these preset formats, obtains various pre- If the cryptographic Hash of the file to be verified of form, then the multiple cryptographic Hash for obtaining are carried out according to the default hash function secondary Hash calculation, obtains the final hash value of the file to be verified.
Due to user carry out saving from damage when data are saved from damage be file cryptographic Hash, thus, in the present embodiment, judging target Before whether there is target transaction corresponding with the file to be verified in block chain, method also includes, the mesh that receive user sends Mark hash function, according to the target hash function target cryptographic Hash of the file to be verified is calculated.In the present embodiment, calculate to be tested The target cryptographic Hash of card file is right to realize so that the cryptographic Hash stored when subsequently saving from damage with file in block chain is compared The checking of file to be verified.
In one embodiment, as shown in figure 3, above-mentioned steps S202 can be implemented as following steps S301-S303:
In step S301, obtain various preset formats of file to be verified, wherein, various preset formats include with down to A kind of few form:
Unprocessed form, extensible markup language form and number format;
In step s 302, Hash calculation is carried out to every kind of preset format according to target hash function all default to obtain Cryptographic Hash corresponding to form;
In step S303, secondary Hash is carried out to the cryptographic Hash corresponding to all preset formats according to target hash function Calculate to obtain target cryptographic Hash.
In the present embodiment, various preset formats of file to be verified are obtained.Wherein, the preset format of the file to be verified with Its form for carrying out calculating when data are saved from damage used in cryptographic Hash is consistent, so as to ensure the uniformity of cryptographic Hash.
Respectively the file of every kind of form is carried out Hash calculation to be owned according to the target hash function that user sends Cryptographic Hash corresponding to preset format.Wherein, make when the target hash function is saved from damage by user to the file to be verified Hash function.
Two are carried out to the hash function corresponding to the file of all preset formats according to the target hash function that user sends Secondary Hash calculation, so as to obtain the corresponding target cryptographic Hash of the file to be verified.
Due to carrying out Hash calculation twice in the present embodiment, thus, even if other users obtain the file to be verified, it is such as Fruit does not know the file format used when target cryptographic Hash is calculated, and cannot obtain the target cryptographic Hash yet, further improves The security of file.
The beneficial effect of the present embodiment is:By carrying out Hash calculation twice to file to be verified, so that target is breathed out The computation rule of uncommon value is more complicated, and increases the difficulty that other users obtain target cryptographic Hash by file to be verified, is entered One step improves the security of file.
In one embodiment, when target data includes transaction ID, as shown in figure 4, before above-mentioned steps S103, Method can also be implemented as following steps S401-S405:
In step S401, judge to whether there is and the transaction corresponding to transaction ID in target block chain;
In step S402, when the transaction corresponding to presence and transaction ID, judge that the number of times that transaction is confirmed is It is no to reach preset times;
In step S403, when the number of times that is confirmed of transaction reaches preset times, the recorded in transaction is obtained One cryptographic Hash;
In step s 404, the first cryptographic Hash is compared with target cryptographic Hash;
In step S405, when comparison result is consistent, determine exist in target block chain it is corresponding with file to be verified Target transaction, and target transaction is to record the transaction of the first cryptographic Hash.
In the present embodiment, judge to whether there is and the transaction corresponding to transaction ID in target block chain.
Data structure in block chain is similar to stack architecture.Thus, user when carrying out file and saving from damage, by file correspondence Cryptographic Hash when sending to the block chain for being encrypted moneytary operations, equivalent to the corresponding cryptographic Hash of the file saved from damage is put In stack top.
Due in storehouse edlin can only be entered to the data of stack top, thus, with constantly carrying out for encryption moneytary operations, stack Top position is replaced by these corresponding transaction data of transaction.Also, the not modifiable principle of block chain is that a transaction is added Enter in a block, needs obtain the confirmation concluded the business for 10 minutes, all blocks afterwards all can often increase by one comprising the transaction Individual block means newly-increased once to confirm.Thus, the time is more long, and the confirmation number of times of acquisition is more, and transaction more is difficult to be tampered.Cause To want to modify, it is necessary to reconfigure block below.When the final block length for creating exceedes former main split block, into For new main split.That is, other people want to distort transaction, its equipment must possess the calculation than block chain the whole network Power also wants powerful calculation power, is only possible to distort transaction, and not currently exists such equipment.Thus, due to other People cannot enter edlin to the corresponding cryptographic Hash of file saved from damage.Improve the security of file.
Therefore, when the transaction corresponding to presence and transaction ID, judge whether the number of times that the transaction is confirmed reaches Preset times, when the number of times that the transaction is confirmed reaches preset times, then the corresponding cryptographic Hash of the file saved from damage is Cannot be tampered.
Therefore when the number of times that the transaction is confirmed reaches preset times, obtain the first Hash recorded in the transaction Value, and the first cryptographic Hash is compared with target cryptographic Hash.
When comparison result is consistent, determine that there is target corresponding with file to be verified in the target block chain hands over Easily, the target transaction is to record the transaction of first cryptographic Hash.I.e. the file to be verified before the target transaction is carried out just Jing is present.
It should be noted that the present embodiment is applied to the feelings that user oneself is saved from damage by block chain to file to be verified Condition.When user is stored in file to be verified corresponding cryptographic Hash in block chain, generate for saving the file to be verified from damage Transaction and the corresponding mark of the transaction, such user can obtain the mark of the transaction.To enable notary organization to pass through to use The transaction ID that family sends inquires corresponding transaction.
The beneficial effect of the present embodiment is:When presence in target block chain and the transaction corresponding to transaction ID, need Whether the number of times being confirmed that judges to conclude the business reaches preset times.After transaction obtains the confirmation of certain number of times, unless set Standby calculating speed is more than the whole network speed, otherwise just cannot enter edlin to the first cryptographic Hash in the transaction.Avoid other use Family is modified by the first cryptographic Hash.Improve the security of file.
In one embodiment, when target data not include transaction ID when, as shown in figure 5, above-mentioned steps S103 it Before, method can also be implemented as following steps S501-S503:
In step S501, judge to whether there is second cryptographic Hash consistent with target cryptographic Hash in target block chain;
In step S502, when there is second cryptographic Hash consistent with target cryptographic Hash, the second cryptographic Hash of record is judged The number of times that is confirmed of transaction whether reach preset times;
In step S503, when the number of times that the transaction for recording the second cryptographic Hash is confirmed reaches preset times, it is determined that There is target transaction corresponding with file to be verified in target block chain, and target transaction is to record the transaction of the second cryptographic Hash.
In the present embodiment, judge to whether there is second cryptographic Hash consistent with target cryptographic Hash in target block chain;When depositing In second cryptographic Hash consistent with the target cryptographic Hash, judge that the number of times that the transaction for recording second cryptographic Hash is confirmed is It is no to reach preset times.
When the number of times that the transaction for recording the second cryptographic Hash is confirmed reaches preset times, determine and deposited in target block chain In target transaction corresponding with file to be verified, and target transaction is to record the transaction of the second cryptographic Hash.
It should be noted that the present embodiment is applied to user's commission third party security mechanism by block chain to text to be verified The situation that part is saved from damage, and third party's security mechanism is after by removing block chain file to be verified being saved from damage, not Transaction ID can be provided a user with.Thus, when user needs to verify file to be verified, can only provide when being saved from damage The hash function for being used and the file format for being used.Thus, when cannot obtaining transaction ID, user can only be passed through Whether the hash function and file format of offer is inquired about in block chain and is deposited calculating the corresponding target cryptographic Hash of file to be verified In the cryptographic Hash consistent with the target cryptographic Hash.
The beneficial effect of the present embodiment is:When transaction ID cannot be obtained, target area is judged by target cryptographic Hash Whether there is target transaction corresponding with file to be verified in block chain, so as to provide a kind of checking when without transaction ID Scheme, reduces the condition of file verification.
Fig. 6 is the block diagram of file verification device in one embodiment of the invention, as shown in fig. 6, file verification dress in the present invention Put and can be used to provide the server corresponding to the mechanism of notarization service, the device is included such as lower module:
First receiver module 61, the file to be verified sent for receive user and the mesh for verifying file to be verified Mark data;
First judge module 62, for being judged in the target block chain for carrying out ideal money transaction according to target data With the presence or absence of target transaction corresponding with file to be verified;
First determining module 63, for when there is target transaction corresponding with file to be verified in target block chain, really Fixed file verification to be verified passes through;
Output module 64, for exporting the prompting message being verified.
In one embodiment, as shown in fig. 7, device also includes:
Second receiver module 71, for the target hash function that receive user sends;
Computing module 72, for calculating the target cryptographic Hash of file to be verified according to target hash function.
In one embodiment, as shown in figure 8, computing module 72, including:
Acquisition submodule 81, for obtaining various preset formats of file to be verified, wherein, various preset formats include with Lower at least one form:
Unprocessed form, extensible markup language form and number format;
First calculating sub module 82, for carrying out Hash calculation to obtain to every kind of preset format according to target hash function Cryptographic Hash corresponding to all preset formats;
Second calculating sub module 83, for being carried out to the cryptographic Hash corresponding to all preset formats according to target hash function Secondary Hash calculation is obtaining target cryptographic Hash.
In one embodiment, as shown in figure 9, device also includes:
Second judge module 91, for when target data includes transaction ID, judging to whether there is in target block chain With the transaction corresponding to transaction ID;
3rd judge module 92, for when existing with transaction corresponding to transaction ID, judging that transaction is confirmed Whether number of times reaches preset times;
Acquisition module 93, for when the number of times that transaction is confirmed reaches preset times, obtaining recorded in transaction First cryptographic Hash;
Comparing module 94, for the first cryptographic Hash to be compared with target cryptographic Hash;
Second determining module 95, exists and file to be verified for when comparison result is consistent, determining in target block chain Corresponding target transaction, and target transaction is to record the transaction of the first cryptographic Hash.
In one embodiment, as shown in Figure 10, device also includes:
4th judge module 101, for when target data does not include transaction ID, judging whether deposited in target block chain In second cryptographic Hash consistent with target cryptographic Hash;
5th judge module 102, for when there is second cryptographic Hash consistent with target cryptographic Hash, judging record second Whether the number of times that the transaction of cryptographic Hash is confirmed reaches preset times;
3rd determining module 103, for reaching preset times when the number of times that the transaction of the second cryptographic Hash of record is confirmed When, determine there is target transaction corresponding with file to be verified in target block chain, and target transaction is the second cryptographic Hash of record Transaction.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can be using complete hardware embodiment, complete software embodiment or with reference to the reality in terms of software and hardware Apply the form of example.And, the present invention can be adopted and wherein include the computer of computer usable program code at one or more The shape of the computer program implemented in usable storage medium (including but not limited to magnetic disc store and optical memory etc.) Formula.
The present invention is the flow process with reference to method according to embodiments of the present invention, equipment (system) and computer program Figure and/or block diagram are describing.It should be understood that can be by computer program instructions flowchart and/or each stream in block diagram The combination of journey and/or square frame and flow chart and/or the flow process in block diagram and/or square frame.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devices The device of the function of specifying in present one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spy In determining the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory is produced to be included referring to Make the manufacture of device, the command device realize in one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or The function of specifying in multiple square frames.
These computer program instructions also can be loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented process, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow process of flow chart or multiple flow processs and/or block diagram one The step of function of specifying in individual square frame or multiple square frames.
Obviously, those skilled in the art can carry out the essence of various changes and modification without deviating from the present invention to the present invention God and scope.So, if these modifications of the present invention and modification belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising these changes and modification.

Claims (10)

1. a kind of file verification method, it is characterised in that include:
File to be verified and the target data for verifying the file to be verified that receive user sends;
Judge to be tested with described for whether there is in the target block chain for carrying out ideal money transaction according to the target data The corresponding target transaction of card file;
When there is target transaction corresponding with the file to be verified in the target block chain, the file to be verified is determined It is verified;
The prompting message that output is verified.
2. the method for claim 1, it is characterised in that methods described also includes:
The target hash function that receive user sends;
The target cryptographic Hash of the file to be verified is calculated according to the target hash function.
3. method as claimed in claim 2, it is characterised in that described to calculate described to be verified according to the target hash function The target cryptographic Hash of file, including:
Various preset formats of the file to be verified are obtained, wherein, various preset formats include following at least one lattice Formula:
Unprocessed form, extensible markup language form and number format;
Hash calculation is carried out to every kind of preset format according to the target hash function with corresponding to obtaining all preset formats Cryptographic Hash;
According to the target hash function cryptographic Hash corresponding to all preset formats is carried out secondary Hash calculation to obtain mesh Mark cryptographic Hash.
4. method as claimed in claim 2, it is characterised in that when the target data includes transaction ID, methods described Also include:
Judge to whether there is and the transaction corresponding to the transaction ID in the target block chain;
When existing with transaction corresponding to the transaction ID, judge whether number of times that the transaction is confirmed reaches default Number of times;
When the number of times that the transaction is confirmed reaches preset times, the first cryptographic Hash recorded in the transaction is obtained;
First cryptographic Hash is compared with the target cryptographic Hash;
When comparison result is consistent, determine there is target transaction corresponding with the file to be verified in the target block chain, And the target transaction is to record the transaction of first cryptographic Hash.
5. method as claimed in claim 2, it is characterised in that when the target data does not include transaction ID, the side Method also includes:
Judge to whether there is second cryptographic Hash consistent with the target cryptographic Hash in the target block chain;
When there is second cryptographic Hash consistent with the target cryptographic Hash, judgement records the transaction of second cryptographic Hash and obtains Whether the number of times of confirmation reaches preset times;
When the number of times that the transaction for recording second cryptographic Hash is confirmed reaches preset times, the target block chain is determined Middle presence target transaction corresponding with the file to be verified, and the target transaction is to record the friendship of second cryptographic Hash Easily.
6. a kind of file verification device, it is characterised in that include:
First receiver module, the file to be verified sent for receive user and the target for verifying the file to be verified Data;
First judge module, for being judged for being in the target block chain for carrying out ideal money transaction according to the target data No presence target transaction corresponding with the file to be verified;
First determining module, for when there is target transaction corresponding with the file to be verified in the target block chain, Determine that the file verification to be verified passes through;
Output module, for exporting the prompting message being verified.
7. device as claimed in claim 6, it is characterised in that described device also includes:
Second receiver module, for the target hash function that receive user sends;
Computing module, for calculating the target cryptographic Hash of the file to be verified according to the target hash function.
8. device as claimed in claim 7, it is characterised in that the computing module, including:
Acquisition submodule, for obtaining various preset formats of the file to be verified, wherein, various preset formats include Following at least one form:
Unprocessed form, extensible markup language form and number format;
First calculating sub module, for Hash calculation to be carried out to every kind of preset format to obtain according to the target hash function There is the cryptographic Hash corresponding to preset format;
Second calculating sub module, for carrying out two to the cryptographic Hash corresponding to all preset formats according to the target hash function Secondary Hash calculation is obtaining target cryptographic Hash.
9. device as claimed in claim 7, it is characterised in that described device also includes:
Second judge module, for when the target data includes transaction ID, judging whether deposited in the target block chain With the transaction corresponding to the transaction ID;
3rd judge module, for when existing with transaction corresponding to the transaction ID, judging that described transaction is confirmed Number of times whether reach preset times;
Acquisition module, for when the number of times that the transaction is confirmed reaches preset times, obtaining recorded in the transaction The first cryptographic Hash;
Comparing module, for first cryptographic Hash to be compared with the target cryptographic Hash;
Second determining module, for when comparison result is consistent, determining the target block chain in exist and the text to be verified The corresponding target transaction of part, and the target transaction is to record the transaction of first cryptographic Hash.
10. device as claimed in claim 7, it is characterised in that described device also includes:
4th judge module, for whether when the target data does not include transaction ID, judging in the target block chain There is second cryptographic Hash consistent with the target cryptographic Hash;
5th judge module, for when there is consistent with the target cryptographic Hash the second cryptographic Hash, judgement records described the Whether the number of times that the transaction of two cryptographic Hash is confirmed reaches preset times;
3rd determining module, for when the number of times that the transaction for recording second cryptographic Hash is confirmed reaches preset times, Determine there is target transaction corresponding with the file to be verified in the target block chain, and the target transaction is record institute State the transaction of the second cryptographic Hash.
CN201611170862.4A 2016-12-16 2016-12-16 File verification method and device Active CN106650495B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611170862.4A CN106650495B (en) 2016-12-16 2016-12-16 File verification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611170862.4A CN106650495B (en) 2016-12-16 2016-12-16 File verification method and device

Publications (2)

Publication Number Publication Date
CN106650495A true CN106650495A (en) 2017-05-10
CN106650495B CN106650495B (en) 2019-07-16

Family

ID=58823306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611170862.4A Active CN106650495B (en) 2016-12-16 2016-12-16 File verification method and device

Country Status (1)

Country Link
CN (1) CN106650495B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108320228A (en) * 2018-03-07 2018-07-24 物数(上海)信息科技有限公司 Transregional piece of chain transaction in assets method, platform, equipment and storage medium
CN108550037A (en) * 2018-04-11 2018-09-18 北京知金链网络技术有限公司 Document handling method based on block chain and device
CN108846298A (en) * 2018-05-23 2018-11-20 马佳明 A kind of altering detecting method and relevant device of file content
CN109410055A (en) * 2018-10-08 2019-03-01 莆田市烛火信息技术有限公司 A kind of block chain common recognition method based on calculation power parasitism
CN109409122A (en) * 2018-09-13 2019-03-01 远光软件股份有限公司 File memory method and its electronic equipment, storage medium
CN109543074A (en) * 2018-11-14 2019-03-29 全链通有限公司 The node availability detection generated based on block
CN110298657A (en) * 2018-03-21 2019-10-01 中思博安科技(北京)有限公司 A kind of block chain common recognition method, relevant apparatus and system
CN111523897A (en) * 2020-05-06 2020-08-11 杭州复杂美科技有限公司 Anti-attack method, device and storage medium
CN112613049A (en) * 2020-12-18 2021-04-06 杭州前云数据技术有限公司 Unified cloud storage system based on block chain and method for realizing data security
CN112800486A (en) * 2021-03-17 2021-05-14 卓尔智联(武汉)研究院有限公司 Bill information processing method, device and system
CN112613049B (en) * 2020-12-18 2024-04-26 杭州前云数据技术有限公司 Unified cloud storage system based on block chain and method for realizing data security

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104573490A (en) * 2013-10-29 2015-04-29 桂林电子科技大学 Method for protecting installed software on Android platform
CN105871545A (en) * 2016-06-03 2016-08-17 中国银联股份有限公司 Credible electronic-certificate managing method and system
CN105975868A (en) * 2016-04-29 2016-09-28 杭州云象网络技术有限公司 Block chain-based evidence preservation method and apparatus
US20160283920A1 (en) * 2015-03-28 2016-09-29 Justin Fisher Authentication and verification of digital data utilizing blockchain technology
CN106548092A (en) * 2016-10-31 2017-03-29 杭州嘉楠耘智信息科技有限公司 File processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104573490A (en) * 2013-10-29 2015-04-29 桂林电子科技大学 Method for protecting installed software on Android platform
US20160283920A1 (en) * 2015-03-28 2016-09-29 Justin Fisher Authentication and verification of digital data utilizing blockchain technology
CN105975868A (en) * 2016-04-29 2016-09-28 杭州云象网络技术有限公司 Block chain-based evidence preservation method and apparatus
CN105871545A (en) * 2016-06-03 2016-08-17 中国银联股份有限公司 Credible electronic-certificate managing method and system
CN106548092A (en) * 2016-10-31 2017-03-29 杭州嘉楠耘智信息科技有限公司 File processing method and device

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108320228A (en) * 2018-03-07 2018-07-24 物数(上海)信息科技有限公司 Transregional piece of chain transaction in assets method, platform, equipment and storage medium
CN110298657A (en) * 2018-03-21 2019-10-01 中思博安科技(北京)有限公司 A kind of block chain common recognition method, relevant apparatus and system
CN108550037A (en) * 2018-04-11 2018-09-18 北京知金链网络技术有限公司 Document handling method based on block chain and device
CN108846298A (en) * 2018-05-23 2018-11-20 马佳明 A kind of altering detecting method and relevant device of file content
CN109409122A (en) * 2018-09-13 2019-03-01 远光软件股份有限公司 File memory method and its electronic equipment, storage medium
CN109410055A (en) * 2018-10-08 2019-03-01 莆田市烛火信息技术有限公司 A kind of block chain common recognition method based on calculation power parasitism
CN109410055B (en) * 2018-10-08 2020-08-07 莆田市烛火信息技术有限公司 Block chain consensus method based on computational power parasitism
CN109543074A (en) * 2018-11-14 2019-03-29 全链通有限公司 The node availability detection generated based on block
CN109543074B (en) * 2018-11-14 2020-10-16 全链通有限公司 Node validity detection based on block generation
CN111523897A (en) * 2020-05-06 2020-08-11 杭州复杂美科技有限公司 Anti-attack method, device and storage medium
CN112613049A (en) * 2020-12-18 2021-04-06 杭州前云数据技术有限公司 Unified cloud storage system based on block chain and method for realizing data security
CN112613049B (en) * 2020-12-18 2024-04-26 杭州前云数据技术有限公司 Unified cloud storage system based on block chain and method for realizing data security
CN112800486A (en) * 2021-03-17 2021-05-14 卓尔智联(武汉)研究院有限公司 Bill information processing method, device and system

Also Published As

Publication number Publication date
CN106650495B (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN106650495A (en) File verification method and device
TWI694350B (en) Information supervision method and device based on blockchain
TWI666902B (en) Robust ATM network system and information processing method based on blockchain technology
EP3598336B1 (en) Information processing device and information processing method
CN109409122A (en) File memory method and its electronic equipment, storage medium
CN109583215B (en) Method and device for processing credit investigation data and block chain data sharing system
CN109472164A (en) The verification method and its network and electronic equipment of contract dataset
CN106548092B (en) File processing method and device
CN109978688A (en) The access control method and its contract generator and server of distributed common recognition system
US20220303248A1 (en) Providing assertions regarding entities
CN109491965A (en) The storage method and its network and electronic equipment of purchase sale of electricity contract
CN111724153A (en) Prepaid consumption supervision system and method based on block chain and storage medium
CN111160998B (en) Comment data processing method and device based on block chain and comment system
CN110932859A (en) User information processing method, device and equipment and readable storage medium
CN110493268A (en) A kind of data processing method and device based on block chain network
CN104168117B (en) A kind of speech digit endorsement method
CN103731408A (en) Information processing device, information processing client, access authentication method, and program
CN110909381A (en) Block chain-based user comment tamper-proof system and method
CN111125245A (en) Data processing method and device based on block chain and storage medium
CN112907243A (en) Block chain transaction auditing method and device
Pouwelse et al. Laws for creating trust in the blockchain age
CN103647650A (en) Rule definition based automatic signature/signature verification device and method
CN109818965B (en) Personal identity verification device and method
Yanti et al. Implementation of Advanced Encryption Standard (AES) and QR code algorithm on digital legalization system
CN112883425B (en) Block chain-based data processing method and block chain link point

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20211015

Address after: 200436 room 138, No. 5 and 6, Lane 1188, Wanrong Road, Jing'an District, Shanghai

Patentee after: Shanghai Canaan Jiesi Information Technology Co.,Ltd.

Address before: Room 1203, 12 / F, building 4, No. 9, Jiuhuan Road, Jianggan District, Hangzhou City, Zhejiang Province, 310019

Patentee before: Hangzhou Canaan Creative Information Technology Ltd.

TR01 Transfer of patent right