CN110348235A - A kind of file test method and device - Google Patents
A kind of file test method and device Download PDFInfo
- Publication number
- CN110348235A CN110348235A CN201910647427.3A CN201910647427A CN110348235A CN 110348235 A CN110348235 A CN 110348235A CN 201910647427 A CN201910647427 A CN 201910647427A CN 110348235 A CN110348235 A CN 110348235A
- Authority
- CN
- China
- Prior art keywords
- file
- backup
- encryption
- backup file
- authentication code
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Storage Device Security (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a kind of file test method and device.The file test method, comprising: obtain the encryption file for carrying authentication code;The encryption file is decrypted;In the unsuccessful situation of the decryption processing, the corresponding backup file of the encryption file, and the content based on the backup file are obtained, the authentication code of the backup file is calculated;It detects and judges whether the authentication code of the backup file is identical as the encryption authentication code of file;If so, saving the backup file;If it is not, then issuing prompt information to client, to receive the process instruction to the backup file of client generation.File test method and device provided by the present application, by carrying out authentication code verifying to backup file and encryption file, can effectively ensuring backup file and encrypting the unique match between file.
Description
Technical field
This application involves field of computer technology, in particular to a kind of file test method and device calculate equipment and meter
Calculation machine readable storage medium storing program for executing.
Background technique
Bidding documents (bidding documents) be worked out by issue of bidding documents unit or Commission Design unit establishment, mentioned to bidder
For the file of the requirements such as major technique, quality, duration to the engineering.
Supplier generally by client carry out bid documents generating, when generating bid submission document, can generate encrypt bidding documents with it is standby
Two parts of bidding documents of part.After bidding documents generates, supplier can first upload encryption bidding documents.During bid opening and bid appraisal, need to carry out encryption bidding documents
When decryption, because artificial or system reason can not normally decrypt encryption bidding documents, need to carry out abnormality processing link, at this point,
Supplier is used for the assessment of bids for the backup bidding documents originally generated is uploaded.
But interval time is longer during submitting a tender because of the opening of bid time with supplier, during this period due to the change of procurement document
More, to bidding documents content modification or directly to reasons such as backup bidding documents content modifications, the bidding documents of supplier at this time has more for supplier
A version is difficult to confirm that the backup bidding documents that uses in abnormality processing of supplier be with the encryption bidding documents uploaded before is same version
This, i.e., match in uniqueness and be difficult to distinguish, causes assessment of bids content inaccurate.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of file test method and device, calculates equipment and computer can
Storage medium is read, to solve technological deficiency existing in the prior art.
The embodiment of the present application discloses a kind of file test method, is used for server, comprising:
Obtain the encryption file for carrying authentication code;
The encryption file is decrypted, in the unsuccessful situation of the decryption processing, obtains the encryption
The corresponding backup file of file, and the content based on the backup file calculate the authentication code of the backup file;
It detects and judges whether the authentication code of the backup file is identical as the encryption authentication code of file;
If so, saving the backup file;
If it is not, then issuing prompt information to client, to receive referring to the processing of the backup file for client generation
It enables.
Further, the process instruction includes saving instruction and ignoring instruction;
In the case where the process instruction received is to save instruction, the backup file is saved, and to described standby
Part file makes marks;
In the case where the process instruction received is to ignore instruction, it is corresponding standby to reacquire the encryption file
Part file.
Further, the file test method, further includes:
The encryption file for carrying authentication code is reacquired and updated, place is decrypted in the updated encryption file
Reason.
Further, the content of the backup file includes text, date, abstract;
The content based on the backup file calculates the authentication code of the backup file, comprising:
One or more of text, date, abstract based on the backup file calculate the certification of the backup file
Code.
A kind of file test method is used for client, comprising:
It is instructed according to file generated and generates backup file, and carry the encryption of authentication code according to the backup file generated
File;
The encryption file is sent to server;
In the case where unsuccessful situation is decrypted to the encryption file in the server, the encryption file is sent
Corresponding backup file is to server;
In the case where receiving prompt information, generate to the process instruction of the backup file and by the process instruction
It is sent to server.
Further, the encryption file that authentication code is carried according to the backup file generated, comprising:
The backup file is encrypted, pre-encrypt file is generated;
Based on the content of the backup file, the authentication code of the backup file is calculated, and the authentication code is added to
In the pre-encrypt file, the encryption file for carrying authentication code is generated.
Further, the content of the backup file includes text, date, abstract;
The content based on the backup file calculates the authentication code of the backup file, comprising:
One or more of text, date, abstract based on the backup file calculate the certification of the backup file
Code.
Further, the process instruction includes saving instruction and ignoring instruction;
In the case where the process instruction is to save instruction, preservation instruction is sent to server;
In the case where the process instruction is to ignore instruction, ignores instruction by described and be sent to server, and send out again
Send the corresponding backup file of the encryption file to server.
Further, the file test method, further includes:
Backup file is regenerated according to file more new command, and is regenerated according to the backup file and carries certification
The encryption file of code;
To the encryption file for carrying authentication code regenerated described in server transmission.
A kind of file detection device, is set to server, comprising:
Module is obtained, is configured as obtaining the encryption file for carrying authentication code;
Deciphering module is configured as the encryption file being decrypted;
Computing module is configured as in the unsuccessful situation of the decryption processing, and it is corresponding to obtain the encryption file
Backup file, and the content based on the backup file calculate the authentication code of the backup file;
Judgment module, is configured as detecting and judge whether the authentication code of the backup file is recognized with the encryption file
It is identical to demonstrate,prove code;
If so, saving the backup file;
If it is not, then issuing prompt information to client, to receive referring to the processing of the backup file for client generation
It enables.
A kind of file detection device, is set to client, comprising:
Generation module is configured as instructing generation backup file according to file generated, and according to the backup file generated
Carry the encryption file of authentication code;
First sending module is configured as the encryption file being sent to server;
Second sending module is configured as that unsuccessful feelings are decrypted to the encryption file in the server
Under condition, the corresponding backup file of the encryption file is sent to server;
Processing module is configured as in the case where receiving prompt information, and generation refers to the processing of the backup file
It enables and the process instruction is sent to server.
File test method and device provided by the present application are tested by carrying out authentication code to backup file and encryption file
Card can effectively ensure backup file and encrypt the unique match between file, once backup file content has change, client
End can receive prompt, guarantee that user grasps the content situation for understanding backup file comprehensively.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the calculating equipment of the embodiment of the present application;
Fig. 2 is the step flow diagram of the file test method of the embodiment of the present application;
Fig. 3 is another steps flow chart schematic diagram of the file test method of the embodiment of the present application;
Fig. 4 is another steps flow chart schematic diagram of the file test method of the embodiment of the present application;
Fig. 5 is another steps flow chart schematic diagram of the file test method of the embodiment of the present application;
Fig. 6 is the structural schematic diagram of the file detection device of the embodiment of the present application;
Fig. 7 is the structural schematic diagram of the file detection device of the embodiment of the present application;
Fig. 8 is the structural schematic diagram of the file detection device of the embodiment of the present application.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with
Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where
Under do similar popularization, therefore the application is not limited by following public specific implementation.
The term used in this specification one or more embodiment be only merely for for the purpose of describing particular embodiments,
It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and appended claims
The "an" of singular used in book, " described " and "the" are also intended to including most forms, unless context is clearly
Indicate other meanings.It is also understood that term "and/or" used in this specification one or more embodiment refers to and includes
One or more associated any or all of project listed may combine.
It will be appreciated that though may be retouched using term first, second etc. in this specification one or more embodiment
Various information are stated, but these information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other
It opens.For example, first can also be referred to as second, class in the case where not departing from this specification one or more scope of embodiments
As, second can also be referred to as first.Depending on context, word as used in this " if " can be construed to
" ... when " or " when ... " or " in response to determination ".
Firstly, the vocabulary of terms being related to one or more embodiments of the invention explains.
MD5 Message Digest 5 (MD5Message-Digest Algorithm): being that a kind of password being widely used is scattered
Array function can produce out the hashed value (hash value) of one 128 (16 byte), for ensuring information transmission complete one
It causes.
Digital certificate service (ca authentication): refer to and provide the work of authenticity, reliability demonstration for electronic signature relevant party
It is dynamic.Text conversion is known as encrypting by ca authentication at the process for the form (i.e. ciphertext) for being unable to direct reading;Ciphertext is converted into energy
The process of the text (i.e. in plain text) of enough direct readings is known as decrypting.
In this application, a kind of file test method and device are provided, calculates equipment and computer readable storage medium,
It is described in detail one by one in the following embodiments.
Fig. 1 is to show the structural block diagram of the calculating equipment 100 according to one embodiment of this specification.The calculating equipment 100
Component include but is not limited to memory 110 and processor 120.Processor 120 is connected with memory 110 by bus 130,
Database 150 is for saving data.
Calculating equipment 100 further includes access device 140, access device 140 enable calculate equipment 100 via one or
Multiple networks 160 communicate.The example of these networks includes public switched telephone network (PSTN), local area network (LAN), wide area network
(WAN), the combination of the communication network of personal area network (PAN) or such as internet.Access device 140 may include wired or wireless
One or more of any kind of network interface (for example, network interface card (NIC)), such as IEEE802.11 wireless local area
Net (WLAN) wireless interface, worldwide interoperability for microwave accesses (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) connect
Mouth, cellular network interface, blue tooth interface, near-field communication (NFC) interface, etc..
In one embodiment of this specification, other unshowned portions in the above-mentioned component and Fig. 1 of equipment 100 are calculated
Part can also be connected to each other, such as pass through bus.It should be appreciated that calculating device structure block diagram shown in FIG. 1 merely for the sake of
Exemplary purpose, rather than the limitation to this specification range.Those skilled in the art can according to need, and increases or replaces it
His component.
Calculating equipment 100 can be any kind of static or mobile computing device, including mobile computer or mobile meter
Calculate equipment (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), movement
Phone (for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of shifting
Dynamic equipment, or the static calculating equipment of such as desktop computer or PC.Calculating equipment 100 can also be mobile or state type
Server.
Wherein, processor 120 can execute the step in method shown in Fig. 2.
As shown in Fig. 2, a kind of file test method, is used for server, including step S210 to step S242.
Step S210: the encryption file for carrying authentication code is obtained.
Specifically, the encryption file for carrying authentication code can be pre-generated by client, and server can be straight
The encryption file for carrying authentication code for receiving client active transmission also can receive the encryption text of client active transmission
Part uploading instructions, and the encryption file that client generates actively is obtained based on the encryption file uploading instructions, or with other
Mode obtains the encryption file, and the application is without limitation.
Step S220: the encryption file is decrypted.
Specifically, client and server can pass through the methods of symmetric encipherment algorithm, rivest, shamir, adelman, ca authentication
Processing is encrypted and decrypted to file, the application is without limitation.
Step S230: in the unsuccessful situation of the decryption processing, obtaining the corresponding backup file of the encryption file,
And the content based on the backup file, calculate the authentication code of the backup file.
Specifically, server can send to client to encryption file decryption failure and mean that " decryption is lost
Lose " prompt information or " retransmit backup file " instruction, encrypt the corresponding backup file of file to obtain.
Further, the content of the backup file includes text, date, abstract, can be based on the backup file
One or more of text, date, abstract calculate the authentication code of the backup file.
Wherein, the text for backing up file is the full content of backup file, for example, the case where backup file is bidding documents
Under comprising there are 10 particular contents including bid project, tenderer, quotation list, contact method etc., then above-mentioned 10
Particular content is the bidding documents i.e. text of backup file, other situations can and so on, repeat no more.
The date of backup file can generate the date of backup file for client, or client will back up file
It is sent to the date that server i.e. server receives backup file, the date can be as accurate as the second, to ensure to accurately distinguish backup
File is with the presence or absence of modification.For example, it is assumed that backup file when 1 day 13 January in 2019 22 divide 10 seconds client generate,
01 divides 33 seconds and is sent to server when 1 day 18 January in 2019, then both can by when 1 day 13 January in 2019 22 divide 10 seconds as meter
The date of authentication code is calculated, 33 seconds dates as calculating authentication code can also be divided by when 1 day 18 January in 2019 01.Other situations
Can and so on, it repeats no more.
The abstract of backup file is the text summarized the main points of backup document text, either several keywords,
It is also possible to a word, passage or several sections of texts etc., content changes with the change of backup document text.For example,
In the case where backup file is contract, it is assumed that the text of contract includes: " Party A: Chen, Party B: company A, transaction item: vapour
Vehicle, loco: Beijing, exchange hour: January 1 ", then it both can be " Chen and A that the contract, which is the abstract of backup file,
Company signs vehicle transaction contract, about trades due to January 1 in Beijing ", it can also only include " Chen, company A, vapour
Vehicle, Beijing, January 1 " 5 keywords.If Party A or Party B are modified any one of its, make a summary also therewith more
Change.Other situations can and so on, repeat no more.
Specifically, the certification of backup file can be calculated according only to one of the text of backup file, date, abstract
Code, the text for backing up file, date, abstract can also be combined two-by-two or three kinds combine the authentication code for calculating backup file, standby
The content of part file can also include the information such as storage size shared by backup file, can also combine meter with above-mentioned three
Calculate the authentication code of backup file.
Further, the authentication code for backing up file can be the various encrypted codes such as MD5 code, it can be based on backup file
Content, the authentication code of backup files is calculated by the various Encryption Algorithm such as MD5 message digest algorithm, the application does not limit this
System.
Wherein, by taking MD5 message digest algorithm as an example, the MD5 code being calculated by MD5 message digest algorithm both can be
32, or 16, the application is without limitation.Assuming that the text of backup file includes: that " project for bidding: medical treatment is set
Standby buying " carries out the calculating of 32 MD5 codes by text of the MD5 message digest algorithm to the backup file to get standby to this
The MD5 code of part file are as follows: " D328C60FEF80D81BDE1E393F4AF7BFDB ", above-mentioned MD5 code are the backup file
Authentication code.Other situations can and so on, repeat no more.
Step S240: detecting and judge the backup file authentication code whether with it is described encryption file authentication code phase
Together.If so, S241 is thened follow the steps, if it is not, thening follow the steps S242.
Step S241: the backup file is saved.
Step S242: prompt information is issued to client, to receive the processing to the backup file of client generation
Instruction.
Specifically, in the authentication code of backup file situation identical with the encryption authentication code of file, illustrate backup text
The content of part with encryption the content of file it is identical, directly backup file can be saved, backup file authentication code and
Encrypt file authentication code it is different in the case where, illustrate that backup file has a modification in content relative to encrypting file, in the two
Hold not exactly the same, have differences, then can issue prompt information to client, prompt in user ID file and encryption file
Hold difference, and the process instruction of client is waited to be further continued for subsequent operation.
Further, the process instruction includes saving instruction and ignoring instruction.
In the case where the process instruction received is to save instruction, the backup file is saved, and to described standby
Part file makes marks.Specifically, server receives the preservation instruction of client sending, illustrates that user is knowing backup file
Modification was made, in the case where different from the encryption file content of upload server before, still selection was repaired using above-mentioned done
The backup file changed, then server saves the backup file, and means the label of " modification " as mark the addition of backup file
Note.
In the case where the process instruction received is to ignore instruction, it is corresponding standby to reacquire the encryption file
Part file.Specifically, server receive client sending ignore instruction, illustrate user refuse upload made modify backup
File, then server reacquires a new backup file from client.
Further, the file test method further includes reacquiring and updating the encryption file for carrying authentication code,
The updated encryption file is decrypted.
Specifically, in the case where user needs to be updated backup file, i.e., user remake in client or
Upload a new backup file, and the encryption file that carries authentication code new based on new backup file generated, client
File is generated after more new command is sent to server, it is original that server obtains the new encryption file replacement for carrying authentication code
Encrypt file.
File test method described in the embodiment of the present application by detection comparison backup file and encrypts recognizing between file
Whether whether card code identical identical to confirm backup file and encrypt content between file, and it is literary that backup can be effectively ensured
Unique match, unique correlation between part and encryption file, and authentication code uses MD5 code, can make one mesh of comparing result
It is clear, effectively improves the speed and accuracy of detection judgement.
As shown in figure 3, a kind of file test method, is used for client, including step S310 to step S340.
Step S310: it is instructed according to file generated and generates backup file, and carried and recognized according to the backup file generated
Demonstrate,prove the encryption file of code.
Specifically, file generated instruction can be the various input instructions such as text input, voice input, be also possible to local
The various uploading instructions such as upload, i.e. user can both be inputted text, are literary in client production backup by way of voice input
Part can also upload backup file from local, and the application is without limitation.
It is possible to further which the backup file is encrypted, pre-encrypt file is generated;Based on the backup text
The content of part, calculates the authentication code of the backup file, and the authentication code is added in the pre-encrypt file, and generation is taken
Encryption file with authentication code.
Specifically, file can be encrypted by the methods of symmetric encipherment algorithm, rivest, shamir, adelman, ca authentication
Processing generates pre-encrypt file.It should be noted that the generation of pre-encrypt file can't replace backup file, but
Exist together with backup file, and since backup file is identical with the content of pre-encrypt file, therefore backup file and pre-add
It is corresponding relationship between ciphertext part.
The authentication code of backup file can be the various encrypted codes such as MD5 code, it can the content based on backup file passes through
The various Encryption Algorithm such as MD5 message digest algorithm calculate the authentication code of backup file, and the application is without limitation.
Further, the content of the backup file includes text, date, abstract, can be based on the backup file
Text, date, one or more of abstract, calculate the authentication code of the backup file.
Wherein, the text of file is backed up as the full content in backup file.The date of backup file can be client
Generate the date of backup file, or backup file is sent to server i.e. server and receives backup file by client
Date, the date can be as accurate as the second, to ensure to accurately distinguish backup file with the presence or absence of modification.The abstract of backup file is standby
The main points of part document text are summarized, either several keywords, are also possible to passage, content is with backup file
The change of text and change.
Specifically, the certification of backup file can be calculated according only to one of the text of backup file, date, abstract
Code, the text for backing up file, date, abstract can also be combined two-by-two or three kinds combine the authentication code for calculating backup file, standby
The content of part file can also include the information such as storage size shared by backup file, can also combine meter with above-mentioned three
Calculate the authentication code of backup file.
Further, encryption file can be generated by the way that authentication code to be packaged together with pre-encrypt file, or passed through
Authentication code is added in pre-encrypt file and generates encryption file by other modes, and the application is without limitation.Due to pre-
Encryption file is identical with backup file content, therefore the content of encryption file and backup file are also identical, encrypt file
Corresponding relationship, a corresponding a encryption file of backup file are similarly between backup file.
Step S320: the encryption file is sent to server.
Specifically, encryption file directly can be sent to server by client, can also first be generated encryption file and be uploaded
Instruction, and encryption file uploading instructions are sent to server, it is raw that server is based on encryption file uploading instructions acquisition client
At encryption file, or otherwise will encryption file be sent to server, the application is without limitation.
Step S330: in the case where unsuccessful situation is decrypted to the encryption file in the server, institute is sent
The corresponding backup file of encryption file is stated to server.
Specifically, in the case where server is to encryption file decryption failure, i.e., server is received in client and sent
" decryption failure " prompt information or " retransmitting backup file " instruction in the case where, client " is decrypted based on what is received
Failure " prompt information or " retransmitting backup file " instruct to server and send the corresponding backup file of encryption file.
Step S340: it in the case where receiving prompt information, generates to the process instruction of the backup file and by institute
It states process instruction and is sent to server.
Specifically, prompt information is the information for prompting the authentication code of backup file different from the encryption authentication code of file, visitor
Family end receives above-mentioned prompt information, illustrates to be sent to the content of the encryption file of the backup file of server corresponding thereto not
Together, i.e., backup file is modified, is based on this prompt information, user, which can choose, continues to use the backup file that content has been changed
Or backup file is uploaded again.
Further, the process instruction includes saving instruction and ignoring instruction.
In the case where the process instruction is to save instruction, preservation instruction is sent to server.
In the case where the process instruction is to ignore instruction, ignores instruction by described and be sent to server, and send out again
Send the corresponding backup file of the encryption file to server.
Specifically, it in the case where user's selection continues to use the backup file that content has been changed, generates and protects in client
Instruction is deposited, and preservation instruction is sent to server, server is based on above-mentioned preservation instruction and saves to backup file.
In the case where user's selection uploads backup file again, ignore instruction in client generation, and ignore above-mentioned
Instruction is sent to server together with backup file, server be based on it is above-mentioned ignore instruction again receiving backup file and again into
Row calculating authentication code and etc..
Further, the file test method, further includes:
Backup file is regenerated according to file more new command, and is regenerated according to the backup file and carries certification
The encryption file of code;To the encryption file for carrying authentication code regenerated described in server transmission.
Specifically, in the case where user needs to be updated backup file, i.e., user remake in client or
Upload a new backup file, and the encryption file that carries authentication code new based on new backup file generated, client
File is generated after more new command is sent to server, it is original that server obtains the new encryption file replacement for carrying authentication code
Encrypt file.
File test method described in the embodiment of the present application is based on while being based on backup file generated pre-encrypt file
The content of backup file calculates authentication code, and authentication code is added in pre-encrypt file, can be effectively ensured backup file and
Unique match, unique correlation between encryption file.
As shown in figure 4, a kind of file test method, including the file test method for server and is used for client
The file test method at end, including step S410 to step S480.
Step S410: client instructs according to file generated and generates backup file, and is taken according to the backup file generated
Encryption file with authentication code.
It is possible to further which the backup file is encrypted, pre-encrypt file is generated;Based on the backup text
The content of part, calculates the authentication code of the backup file, and the authentication code is added in the pre-encrypt file, and generation is taken
Encryption file with authentication code.
Further, the content of the backup file includes text, date, abstract, can be based on the backup file
Text, date, one or more of abstract, calculate the authentication code of the backup file.
Step S420: the encryption file is sent to server by client.
Step S430: the encryption file is decrypted server.
Specifically, client and server can pass through the methods of symmetric encipherment algorithm, rivest, shamir, adelman, ca authentication
Processing is encrypted and decrypted to file, the application is without limitation.
Step S440: in the case where unsuccessful situation is decrypted to the encryption file in the server, client
The corresponding backup file of the encryption file is sent to server.
Step S450: server obtains the corresponding backup file of the encryption file, and based in the backup file
Hold, calculates the authentication code of the backup file.
Further, the content of the backup file includes text, date, abstract, can be based on the backup file
One or more of text, date, abstract calculate the authentication code of the backup file.
Step S460: in the authentication code situation identical with the encryption authentication code of file of the backup file, clothes
Business device saves the backup file.
Step S470: in the case where the authentication code of the backup file is different from the encryption authentication code of file, clothes
Device sending prompt information of being engaged in is to client, to receive the process instruction to the backup file of client generation.
Step S480: in the case where receiving prompt information, client generates the process instruction to the backup file
And the process instruction is sent to server.
Further, the process instruction includes saving instruction and ignoring instruction.
In the case where the process instruction is to save instruction, preservation instruction is sent to server by client.
In the case where the process instruction is to ignore instruction, client ignores described instruction and is sent to server, and
The corresponding backup file of the encryption file is retransmitted to server.
The detailed content of the step S410 to step S480 is referring also to above-described embodiment, and details are not described herein.
File test method described herein, it is ensured that backup file and encryption file between unique match,
Unique correlation can be adapted for being related to both sides or multi-party file, such as bidding documents, contract etc., widely applicable and applicable
Property is strong.
It is further explained as shown in figure 5, being made by taking bidding documents as an example to above-mentioned file test method.
User makes bidding documents by client.Client is provided with bidding documents and generates template, including project name, list of submitting a tender
The contents such as position, quotation list, user fill in content corresponding to each project by being manually entered, " project name: teaching throwing
The buying of shadow equipment, competitive bid unit: so-and-so university, tenderer: so-and-so company, quotation list ... "
Client generates backup bidding documents.Client generates backup Bid Documents based on the content of above-mentioned input.
Backup bidding documents is encrypted in client, generates pre-encrypt bidding documents.By ca authentication method to backup bidding documents
Into encryption, pre-encrypt bidding documents is generated.
Content of the client based on backup bidding documents calculates MD5 code, and MD5 code is packaged together with pre-encrypt bidding documents, generates
Encrypt bidding documents.Based on the body matter of backup bidding documents, it is by the authentication code that backup bidding documents is calculated in MD5 message digest algorithm
Above-mentioned authentication code is added in pre-encrypt bidding documents by " 476ff104d0b645227bf78f77d699b306 ", that is, generates encryption
Bidding documents.
Client is sent to server for bidding documents is encrypted, and waits opening of bid.
During waiting opening of bid, if since the because users such as modification bidding documents content have remake a bidding documents, and
The bidding documents uploaded before needing to replace is then based on new bidding documents, regenerates encryption bidding documents, and be uploaded to server again.
Encryption bidding documents is decrypted in opening of bid, the encryption if successful decryption, after the decryption processing that then be used directly
Bidding documents is submitted a tender, if decryption failure, enters the abnormality processing stage, client sends backup bidding documents to server.
Since to encryption bidding documents decryption failure, server calculates the MD5 code of backup bidding documents by MD5 message digest algorithm.
Based on the body matter of backup bidding documents, the authentication code of backup bidding documents is obtained by calculation are as follows: " 6c0780a79120940737f1f
1e68bad3be6”。
Judge whether the MD5 code of backup bidding documents is identical as the MD5 code of encryption bidding documents.If the backup bidding documents being calculated
MD5 code is identical as the encryption MD5 code of file, then server directly saves the backup file, and is opened bid using the backup file, if
Difference then issues prompt information to client.By comparison, the MD5 code for backing up bidding documents is different from the encryption MD5 code of bidding documents.
Server issues prompt information to client, and backup bidding documents is prompted to be modified, and content is different from encryption file, and
The process instruction for waiting client judges whether the backup file that preservation above content has been modified based on process instruction.
In the case where process instruction is to save instruction, the backup file that above content has been modified is directly saved, is uploaded
It completes.
In the case where process instruction is to ignore instruction, client uploads backup bidding documents again, and server reacquires standby
Part bidding documents simultaneously continues to calculate the subsequent steps such as MD5 code.
File test method described in the embodiment of the present application can be adapted for e-bidding field, in encryption bidding documents solution
It in the close unsuccessful situation of processing, that is, submits a tender and enters the abnormality processing stage, due to waiting the one of opening of bid after uploading encryption bidding documents
In the section time, bidder, that is, user is possible to modify to backup bidding documents, and the application, can be quick by authentication verification code
Backup bidding documents comparison encryption bidding documents is understood with the presence or absence of the modification in content, and reminds bidder in time, is being ensured to open bid, submitted a tender
Backup bidding documents can be effectively ensured in the case where going on smoothly and encrypt the unique match between bidding documents.
As shown in fig. 6, a kind of file detection device, is set to server, comprising:
Module 610 is obtained, is configured as obtaining the encryption file for carrying authentication code.
Deciphering module 620 is configured as the encryption file being decrypted.
Computing module 630 is configured as in the unsuccessful situation of the decryption processing, and it is corresponding to obtain the encryption file
Backup file, and the content based on the backup file calculates the authentication code of the backup file.
Optionally, the content of the backup file includes text, date, abstract, described based in the backup file
Hold, the computing module 630 is further configured as:
Calculate the authentication code of the backup file.
One or more of text, date, abstract based on the backup file calculate the certification of the backup file
Code.
Judgment module 640, be configured as detecting and judge the backup file authentication code whether with the encryption file
Authentication code it is identical.
If so, saving the backup file.
If it is not, then issuing prompt information to client, to receive referring to the processing of the backup file for client generation
It enables.
Further, the process instruction includes saving instruction and ignoring instruction.
In the case where the process instruction received is to save instruction, the backup file is saved, and to described standby
Part file makes marks;In the case where the process instruction received is to ignore instruction, the encryption file pair is reacquired
The backup file answered.
Optionally, the file detection device further includes secondary acquisition module.
The secondary acquisition module is configured as reacquiring and updating the encryption file for carrying authentication code, will update
The encryption file afterwards is decrypted.
File detection device described in the embodiment of the present application by detection comparison backup file and encrypts recognizing between file
Whether whether card code identical identical to confirm backup file and encrypt content between file, and it is literary that backup can be effectively ensured
Unique match, unique correlation between part and encryption file.
As shown in fig. 7, a kind of file detection device, is set to client, comprising:
Generation module 710 is configured as instructing generation backup file according to file generated, and raw according to the backup file
At the encryption file for carrying authentication code.
Optionally, the generation module 710, is further configured as:
The backup file is encrypted, pre-encrypt file is generated.
Based on the content of the backup file, the authentication code of the backup file is calculated, and the authentication code is added to
In the pre-encrypt file, the encryption file for carrying authentication code is generated.
The content of the backup file includes text, date, abstract, and the generation module 710 is further configured
Are as follows:
One or more of text, date, abstract based on the backup file calculate the certification of the backup file
Code.
First sending module 720 is configured as the encryption file being sent to server.
Second sending module 730 is configured as that the encryption file is decrypted in the server unsuccessful
In the case where, the corresponding backup file of the encryption file is sent to server.
Processing module 740 is configured as in the case where receiving prompt information, generates the processing to the backup file
It instructs and the process instruction is sent to server.
Optionally, the process instruction includes saving instruction and ignoring instruction.
In the case where the process instruction is to save instruction, preservation instruction is sent to server.
In the case where the process instruction is to ignore instruction, ignores instruction by described and be sent to server, and send out again
Send the corresponding backup file of the encryption file to server.
The file detection device, further includes secondary generation module, is configured as:
Backup file is regenerated according to file more new command, and is regenerated according to the backup file and carries certification
The encryption file of code.
To the encryption file for carrying authentication code regenerated described in server transmission.
File detection device described in the embodiment of the present application is based on while being based on backup file generated pre-encrypt file
The content of backup file calculates authentication code, and authentication code is added in pre-encrypt file, can be effectively ensured backup file and
Unique match, unique correlation between encryption file.
As shown in figure 8, a kind of file detection device, including be set to the acquisition module 810 of server, deciphering module 820,
Computing module 830 and judgment module 840 and be set to the generation module 850 of client, the first sending module 860, second hair
Send module 870 and processing module 880.
The particular content of each module can be found in above-described embodiment, and details are not described herein.
File detection device described herein, it is ensured that backup file and encryption file between unique match,
Unique correlation can be adapted for being related to both sides or multi-party file, such as bidding documents, contract etc., widely applicable and applicable
Property is strong.
One embodiment of the application also provides a kind of computer readable storage medium, is stored with computer instruction, the instruction
The step of file test method as previously described is realized when being executed by processor.
A kind of exemplary scheme of above-mentioned computer readable storage medium for the present embodiment.It should be noted that this is deposited
The technical solution of storage media and the technical solution of above-mentioned file test method belong to same design, the technical solution of storage medium
The detail content being not described in detail may refer to the description of the technical solution of above-mentioned file test method.
The computer instruction includes computer program code, the computer program code can for source code form,
Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute
State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code
Device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory),
Electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer-readable medium include it is interior
Increase and decrease appropriate can be carried out according to the requirement made laws in jurisdiction with patent practice by holding, such as in certain jurisdictions of courts
Area does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because
According to the application, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this Shen
It please be necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
The application preferred embodiment disclosed above is only intended to help to illustrate the application.There is no detailed for alternative embodiment
All details are described, are not limited the invention to the specific embodiments described.Obviously, according to the content of this specification,
It can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to preferably explain the application
Principle and practical application, so that skilled artisan be enable to better understand and utilize the application.The application is only
It is limited by claims and its full scope and equivalent.
Claims (13)
1. a kind of file test method, which is characterized in that be used for server, comprising:
Obtain the encryption file for carrying authentication code;
The encryption file is decrypted;
In the unsuccessful situation of the decryption processing, the corresponding backup file of the encryption file is obtained, and based on described standby
The content of part file, calculates the authentication code of the backup file;
It detects and judges whether the authentication code of the backup file is identical as the encryption authentication code of file;
If so, saving the backup file;
If it is not, then issuing prompt information to client, to receive the process instruction to the backup file of client generation.
2. file test method according to claim 1, which is characterized in that the process instruction includes saving instruction and neglecting
Slightly instruct;
In the case where the process instruction received is to save instruction, the backup file is saved, and to the backup text
Part makes marks;
In the case where the process instruction received is to ignore instruction, the corresponding backup text of the encryption file is reacquired
Part.
3. file test method according to claim 1, which is characterized in that further include:
The encryption file for carrying authentication code is reacquired and updated, the updated encryption file is decrypted.
4. file test method according to claim 1, which is characterized in that the content of the backup file include text,
Date, abstract;
The content based on the backup file calculates the authentication code of the backup file, comprising:
One or more of text, date, abstract based on the backup file calculate the authentication code of the backup file.
5. a kind of file test method, which is characterized in that be used for client, comprising:
It is instructed according to file generated and generates backup file, and carry the encryption text of authentication code according to the backup file generated
Part;
The encryption file is sent to server;
In the case where unsuccessful situation is decrypted to the encryption file in the server, it is corresponding to send the encryption file
Backup file to server;
In the case where receiving prompt information, generates the process instruction to the backup file and send the process instruction
To server.
6. file test method according to claim 5, which is characterized in that described to be carried according to the backup file generated
There is the encryption file of authentication code, comprising:
The backup file is encrypted, pre-encrypt file is generated;
Based on the content of the backup file, the authentication code of the backup file is calculated, and described in the authentication code is added to
In pre-encrypt file, the encryption file for carrying authentication code is generated.
7. file test method according to claim 6, which is characterized in that the content of the backup file include text,
Date, abstract;
The content based on the backup file calculates the authentication code of the backup file, comprising:
One or more of text, date, abstract based on the backup file calculate the authentication code of the backup file.
8. file test method according to claim 5, which is characterized in that the process instruction includes saving instruction and neglecting
Slightly instruct;
In the case where the process instruction is to save instruction, preservation instruction is sent to server;
In the case where the process instruction is to ignore instruction, ignores instruction by described and be sent to server, and retransmit institute
The corresponding backup file of encryption file is stated to server.
9. file test method according to claim 5, which is characterized in that further include:
Backup file is regenerated according to file more new command, and is regenerated according to the backup file and carries authentication code
Encrypt file;
To the encryption file for carrying authentication code regenerated described in server transmission.
10. a kind of file detection device, which is characterized in that be set to server, comprising:
Module is obtained, is configured as obtaining the encryption file for carrying authentication code;
Deciphering module is configured as the encryption file being decrypted;
Computing module is configured as in the unsuccessful situation of the decryption processing, obtains the corresponding backup of the encryption file
File, and the content based on the backup file calculate the authentication code of the backup file;
Judgment module, be configured as detecting and judge the backup file authentication code whether the authentication code with the encryption file
It is identical;
If so, saving the backup file;
If it is not, then issuing prompt information to client, to receive the process instruction to the backup file of client generation.
11. a kind of file detection device, which is characterized in that be set to client, comprising:
Generation module is configured as being instructed according to file generated generating backup file, and is carried according to the backup file generated
There is the encryption file of authentication code;
First sending module is configured as the encryption file being sent to server;
Second sending module is configured as that unsuccessful situation is decrypted to the encryption file in the server
Under, the corresponding backup file of the encryption file is sent to server;
Processing module is configured as in the case where receiving prompt information, is generated to the process instruction of the backup file simultaneously
The process instruction is sent to server.
12. a kind of calculating equipment including memory, processor and stores the calculating that can be run on a memory and on a processor
Machine instruction, which is characterized in that the processor is realized described in claim 1-4 or 5-9 any one when executing described instruction
The step of method.
13. a kind of computer readable storage medium, is stored with computer instruction, which is characterized in that the instruction is held by processor
The step of claim 1-4 or 5-9 any one the method are realized when row.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910647427.3A CN110348235B (en) | 2019-07-17 | 2019-07-17 | File detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910647427.3A CN110348235B (en) | 2019-07-17 | 2019-07-17 | File detection method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110348235A true CN110348235A (en) | 2019-10-18 |
CN110348235B CN110348235B (en) | 2021-06-08 |
Family
ID=68175597
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910647427.3A Active CN110348235B (en) | 2019-07-17 | 2019-07-17 | File detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110348235B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1407501A (en) * | 2001-08-31 | 2003-04-02 | 银川西夏印艺有限公司 | Bill and contract verifying system |
US20050144443A1 (en) * | 2003-12-30 | 2005-06-30 | Cromer Daryl C. | Apparatus, system, and method for secure mass storage backup |
CN101051285A (en) * | 2006-09-21 | 2007-10-10 | 上海交通大学 | File matching method in computer network data backup |
CN103023862A (en) * | 2011-09-21 | 2013-04-03 | 索尼公司 | Method, server and system used for integrity protection and authentication |
CN104992124A (en) * | 2015-08-03 | 2015-10-21 | 电子科技大学 | Document safety access method for cloud storage environment |
CN106096381A (en) * | 2016-06-06 | 2016-11-09 | 北京壹人壹本信息科技有限公司 | The method and system of application file checking |
CN107797889A (en) * | 2017-11-14 | 2018-03-13 | 北京思特奇信息技术股份有限公司 | A kind of method and apparatus of checking system file backup integrity |
CN109684129A (en) * | 2018-11-20 | 2019-04-26 | 北京深思数盾科技股份有限公司 | Data backup restoration method, storage medium, encryption equipment, client and server |
CN109871296A (en) * | 2018-12-24 | 2019-06-11 | 航天信息股份有限公司 | A kind of data back up method and system, data reconstruction method and system and mobile terminal |
-
2019
- 2019-07-17 CN CN201910647427.3A patent/CN110348235B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1407501A (en) * | 2001-08-31 | 2003-04-02 | 银川西夏印艺有限公司 | Bill and contract verifying system |
US20050144443A1 (en) * | 2003-12-30 | 2005-06-30 | Cromer Daryl C. | Apparatus, system, and method for secure mass storage backup |
CN101051285A (en) * | 2006-09-21 | 2007-10-10 | 上海交通大学 | File matching method in computer network data backup |
CN103023862A (en) * | 2011-09-21 | 2013-04-03 | 索尼公司 | Method, server and system used for integrity protection and authentication |
CN104992124A (en) * | 2015-08-03 | 2015-10-21 | 电子科技大学 | Document safety access method for cloud storage environment |
CN106096381A (en) * | 2016-06-06 | 2016-11-09 | 北京壹人壹本信息科技有限公司 | The method and system of application file checking |
CN107797889A (en) * | 2017-11-14 | 2018-03-13 | 北京思特奇信息技术股份有限公司 | A kind of method and apparatus of checking system file backup integrity |
CN109684129A (en) * | 2018-11-20 | 2019-04-26 | 北京深思数盾科技股份有限公司 | Data backup restoration method, storage medium, encryption equipment, client and server |
CN109871296A (en) * | 2018-12-24 | 2019-06-11 | 航天信息股份有限公司 | A kind of data back up method and system, data reconstruction method and system and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN110348235B (en) | 2021-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210232974A1 (en) | Federated-learning based method of acquiring model parameters, system and readable storage medium | |
US11706026B2 (en) | Location aware cryptography | |
US11341466B2 (en) | Transferring digital tickets based on blockchain networks | |
US11349648B2 (en) | Pre-calculation device, method, computer-readable recording medium, vector multiplication device, and method | |
CN106576043A (en) | Virally distributable trusted messaging | |
CN110597836B (en) | Information inquiry request response method and device based on block chain network | |
CN111292041A (en) | Electronic contract generating method, device, equipment and storage medium | |
WO2019033790A1 (en) | Project information processing method and apparatus, server and storage medium | |
KR20200085095A (en) | Electronic apparatus and method for managing data based on block chain | |
CN114223175B (en) | Generating a sequence of network data while preventing acquisition or manipulation of time data | |
CN116502732B (en) | Federal learning method and system based on trusted execution environment | |
CN113722753A (en) | Privacy data processing method, device and system based on block chain | |
CN110321734A (en) | A kind of file verification method and device | |
CN114143312A (en) | Block chain-based edge computing terminal authentication method, system and equipment | |
CN114143306A (en) | Block chain-based bid document transmission method and transmission device | |
CN110852887B (en) | Method and device for acquiring transaction processing state in decentralized application cluster | |
CN110232570B (en) | Information supervision method and device | |
CN110287254B (en) | Data transaction method and device based on alliance chain and computer equipment | |
CN111552950A (en) | Software authorization method and device and computer readable storage medium | |
CN110348235A (en) | A kind of file test method and device | |
CN109816525A (en) | A kind of data processing method and its device, medium, terminal | |
CN113497827B (en) | Information sharing method and equipment | |
WO2019019650A1 (en) | Website data processing method and apparatus, website data processing platform and storage medium | |
CN114610994A (en) | Push method and system based on joint prediction | |
CN114418769A (en) | Block chain transaction charging method and device and readable storage medium |
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 |