CN110348235B - File detection method and device - Google Patents

File detection method and device Download PDF

Info

Publication number
CN110348235B
CN110348235B CN201910647427.3A CN201910647427A CN110348235B CN 110348235 B CN110348235 B CN 110348235B CN 201910647427 A CN201910647427 A CN 201910647427A CN 110348235 B CN110348235 B CN 110348235B
Authority
CN
China
Prior art keywords
backup
bidding document
document file
file
encrypted
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.)
Active
Application number
CN201910647427.3A
Other languages
Chinese (zh)
Other versions
CN110348235A (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.)
Zhengcaiyun Co ltd
Original Assignee
Zhengcaiyun Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengcaiyun Co ltd filed Critical Zhengcaiyun Co ltd
Priority to CN201910647427.3A priority Critical patent/CN110348235B/en
Publication of CN110348235A publication Critical patent/CN110348235A/en
Application granted granted Critical
Publication of CN110348235B publication Critical patent/CN110348235B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • 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/602Providing 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 file detection method and device. The file detection method comprises the following steps: acquiring an encrypted file carrying an authentication code; carrying out decryption processing on the encrypted file; under the condition that the decryption processing is unsuccessful, obtaining a backup file corresponding to the encrypted file, and calculating an authentication code of the backup file based on the content of the backup file; detecting and judging whether the authentication code of the backup file is the same as the authentication code of the encrypted file; if yes, saving the backup file; if not, sending prompt information to the client to receive a processing instruction of the backup file generated by the client. According to the file detection method and device, the unique matching between the backup file and the encrypted file can be effectively ensured by verifying the authentication codes of the backup file and the encrypted file.

Description

File detection method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a file detection method and apparatus, a computing device, and a computer-readable storage medium.
Background
Bidding documents (bidding documents) are documents compiled by a bidding organization or a design entrusted organization, and provide the bidders with the requirements for the main technology, quality, construction period, etc. of the project.
The supplier generally makes bidding documents through the client, and generates two copies of encrypted bidding documents and backup bidding documents when generating the bidding documents. After the bidding document is generated, the supplier can upload the encrypted bidding document firstly. In the bid evaluation opening process, when the encrypted bid document needs to be decrypted, the encrypted bid document cannot be normally decrypted due to human or system reasons, an exception handling link needs to be carried out, and at the moment, a supplier uploads a backup bid document generated originally for bid evaluation.
However, since the time interval between the bid opening time and the bidding period of the supplier is long, the bidding document of the supplier has multiple versions due to the change of the procurement file, the modification of the bidding document content by the supplier or the direct modification of the content of the backup bidding document, and the like, it is difficult to confirm that the backup bidding document used by the supplier during the exception handling is the same as the previously uploaded encrypted bidding document, that is, it is difficult to distinguish the backup bidding document from the previously uploaded encrypted bidding document in the aspect of uniqueness matching, and thus the bid evaluation content is inaccurate.
Disclosure of Invention
In view of this, embodiments of the present application provide a file detection method and apparatus, a computing device, and a computer-readable storage medium, so as to solve technical defects in the prior art.
The embodiment of the application discloses a file detection method, which is used for a server and comprises the following steps:
acquiring an encrypted file carrying an authentication code;
decrypting the encrypted file, acquiring a backup file corresponding to the encrypted file under the condition that the decryption processing is unsuccessful, and calculating an authentication code of the backup file based on the content of the backup file;
detecting and judging whether the authentication code of the backup file is the same as the authentication code of the encrypted file;
if yes, saving the backup file;
if not, sending prompt information to the client to receive a processing instruction of the backup file generated by the client.
Further, the processing instruction comprises a save instruction and an ignore instruction;
under the condition that the received processing instruction is a saving instruction, saving the backup file, and marking the backup file;
and under the condition that the received processing instruction is an ignoring instruction, re-acquiring the backup file corresponding to the encrypted file.
Further, the file detection method further includes:
and re-acquiring and updating the encrypted file carrying the authentication code, and decrypting the updated encrypted file.
Further, the content of the backup file comprises text, date and abstract;
the calculating the authentication code of the backup file based on the content of the backup file comprises:
and calculating the authentication code of the backup file based on one or more of the text, the date and the abstract of the backup file.
A file detection method is used for a client and comprises the following steps:
generating a backup file according to a file generation instruction, and generating an encrypted file carrying an authentication code according to the backup file;
sending the encrypted file to a server;
under the condition that the server does not successfully decrypt the encrypted file, sending a backup file corresponding to the encrypted file to the server;
and under the condition of receiving the prompt message, generating a processing instruction for the backup file and sending the processing instruction to a server.
Further, the generating an encrypted file carrying an authentication code according to the backup file includes:
encrypting the backup file to generate a pre-encrypted file;
and calculating the authentication code of the backup file based on the content of the backup file, adding the authentication code into the pre-encrypted file, and generating the encrypted file carrying the authentication code.
Further, the content of the backup file comprises text, date and abstract;
the calculating the authentication code of the backup file based on the content of the backup file comprises:
and calculating the authentication code of the backup file based on one or more of the text, the date and the abstract of the backup file.
Further, the processing instruction comprises a save instruction and an ignore instruction;
under the condition that the processing instruction is a saving instruction, sending the saving instruction to a server;
and under the condition that the processing instruction is an ignoring instruction, sending the ignoring instruction to a server, and resending the backup file corresponding to the encrypted file to the server.
Further, the file detection method further includes:
regenerating a backup file according to a file updating instruction, and regenerating an encrypted file carrying an authentication code according to the backup file;
and sending the regenerated encrypted file carrying the authentication code to a server.
A file detection device is arranged on a server and comprises:
the acquisition module is configured to acquire an encrypted file carrying an authentication code;
the decryption module is configured to decrypt the encrypted file;
the computing module is configured to acquire a backup file corresponding to the encrypted file under the condition that the decryption processing is unsuccessful, and compute an authentication code of the backup file based on the content of the backup file;
the judging module is configured to detect and judge whether the authentication code of the backup file is the same as the authentication code of the encrypted file;
if yes, saving the backup file;
if not, sending prompt information to the client to receive a processing instruction of the backup file generated by the client.
A file detection device is arranged at a client and comprises:
the generating module is configured to generate a backup file according to a file generating instruction and generate an encrypted file carrying an authentication code according to the backup file;
a first sending module configured to send the encrypted file to a server;
the second sending module is configured to send the backup file corresponding to the encrypted file to the server under the condition that the server fails to decrypt the encrypted file;
and the processing module is configured to generate a processing instruction for the backup file and send the processing instruction to a server under the condition of receiving the prompt message.
According to the file detection method and device, the unique matching between the backup file and the encrypted file can be effectively ensured by verifying the authentication codes of the backup file and the encrypted file, once the content of the backup file is changed, the client can receive a prompt, and a user can be ensured to comprehensively master the situation of knowing the content of the backup file.
Drawings
FIG. 1 is a schematic block diagram of a computing device according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps of a document inspection method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart illustrating another step of a document inspection method according to an embodiment of the present application;
FIG. 4 is a schematic flow chart illustrating another step of a document inspection method according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating another step of a document inspection method according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a document detecting device according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of a document detection apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a document detection apparatus according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present invention relate are explained.
MD5Message Digest Algorithm (MD5Message-Digest Algorithm): is a widely used cryptographic hash function that generates a 128-bit (16-byte) hash value to ensure the integrity of the message transmission.
Electronic authentication service (CA authentication): the method refers to an activity of providing authenticity and reliability verification for all parties related to the electronic signature. The process of CA authentication converting text into a form that cannot be read directly (i.e., ciphertext) is called encryption; the process of converting the ciphertext into text that can be read directly (i.e., plaintext) is called decrypting.
In the present application, a file detection method and apparatus, a computing device and a computer readable storage medium are provided, which are described in detail in the following embodiments one by one.
Fig. 1 is a block diagram illustrating a configuration of a computing device 100 according to an embodiment of the present specification. The components of the computing device 100 include, but are not limited to, memory 110 and processor 120. The processor 120 is coupled to the memory 110 via a bus 130 and a database 150 is used to store data.
Computing device 100 also includes access device 140, access device 140 enabling computing device 100 to communicate via one or more networks 160. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 140 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 100 and other components not shown in FIG. 1 may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 1 is for purposes of example only and is not limiting as to the scope of the description. Those skilled in the art may add or replace other components as desired.
Computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 100 may also be a mobile or stationary server.
Wherein the processor 120 may perform the steps of the method shown in fig. 2.
As shown in fig. 2, a file detection method for a server includes steps S210 to S242.
Step S210: and acquiring an encrypted file carrying the authentication code.
Specifically, the encrypted file with the authentication code may be generated in advance by the client, and the server may directly receive the encrypted file with the authentication code actively sent by the client, may also receive an encrypted file upload instruction actively sent by the client, and actively acquire the encrypted file generated by the client based on the encrypted file upload instruction, or may acquire the encrypted file in other manners, which is not limited in this application.
Step S220: and decrypting the encrypted file.
Specifically, the client and the server may encrypt and decrypt the file by using a symmetric encryption algorithm, an asymmetric encryption algorithm, CA authentication, and the like, which is not limited in the present application.
Step S230: and under the condition that the decryption processing is unsuccessful, acquiring a backup file corresponding to the encrypted file, and calculating an authentication code of the backup file based on the content of the backup file.
Specifically, in the case where the decryption of the encrypted file fails, the server may send a prompt message meaning "decryption failed" or an instruction to "resend the backup file" to the client, so as to obtain the backup file corresponding to the encrypted file.
Further, the content of the backup file includes a text, a date and an abstract, and the authentication code of the backup file may be calculated based on one or more of the text, the date and the abstract of the backup file.
For example, when the backup file is a bidding document, the backup file includes 10 specific contents including a bid item, a bid unit, a bid list, a contact information, and the like, and the 10 specific contents are the text of the bidding document, i.e., the backup file, and so on, and the description is omitted.
The date of the backup file can be the date of the backup file generated by the client, or the date of the backup file sent to the server by the client, namely the date of the backup file received by the server, wherein the date can be accurate to seconds, so that whether the backup file is modified or not can be accurately distinguished. For example, if the backup file is generated at the client at 22 minutes and 10 seconds at 13 hours and 1 month and 1 day in 2019 and 01 minutes and 33 seconds at 18 hours and 1 month and 1 day in 2019, 22 minutes and 10 seconds at 13 hours and 1 day in 2019 may be used as the date for calculating the authentication code, or 01 minutes and 33 seconds at 18 hours and 1 day in 2019 may be used as the date for calculating the authentication code. Other cases can be analogized, and are not described in detail.
The abstract of the backup file is a character summarizing the main points of the text of the backup file, which can be a plurality of key words, a sentence, a segment of character or a plurality of segments of characters, and the content of the backup file changes along with the change of the text of the backup file. For example, in the case where the backup file is a contract, assume that the body of the contract includes: "prescription A: chen and Shi Fang: company a, trade item: car, place of transaction: beijing, trade time: 1 month and 1 day ", the contract, i.e., the abstract of the backup file, may be" chen zhi sign a car transaction contract with company a, about to trade in beijing city on 1 month and 1 day ", or may only include" chen zhi, company a, car, beijing city, 1 month and 1 day "5 keywords. If the first party or the second party changes any one of the two parties, the abstract is changed accordingly. Other cases can be analogized, and are not described in detail.
Specifically, the authentication code of the backup file may be calculated only according to one of the text, the date and the abstract of the backup file, or may be calculated by combining two or three of the text, the date and the abstract of the backup file, and the content of the backup file may further include information such as the size of the storage space occupied by the backup file, or may be calculated by combining the three.
Furthermore, the authentication code of the backup file may be various encryption codes such as MD5 code, that is, the authentication code of the backup file may be calculated by various encryption algorithms such as MD5 information digest algorithm based on the content of the backup file, which is not limited in this application.
Taking MD5message digest algorithm as an example, the MD5 code calculated by the MD5message digest algorithm may be 32 bits or 16 bits, which is not limited in this application. Assume that the body of the backup file includes: "bidding items: purchasing medical equipment, calculating a 32-bit MD5 code of the text of the backup file through an MD5 information summary algorithm, and obtaining an MD5 code of the backup file as follows: the MD5 code "D328C 60FEF80D81BDE1E393F4AF7 BFDB" is the authentication code of the backup file. Other cases can be analogized, and are not described in detail.
Step S240: and detecting and judging whether the authentication code of the backup file is the same as the authentication code of the encrypted file. If yes, step S241 is executed, and if no, step S242 is executed.
Step S241: and saving the backup file.
Step S242: and sending prompt information to the client to receive a processing instruction of the backup file generated by the client.
Specifically, under the condition that the authentication code of the backup file is the same as the authentication code of the encrypted file, it is indicated that the content of the backup file is the same as the content of the encrypted file, the backup file can be directly saved, and under the condition that the authentication code of the backup file is different from the authentication code of the encrypted file, it is indicated that the backup file is modified in content relative to the encrypted file, and the content of the backup file and the content of the encrypted file are not completely the same and are different, and if the content of the backup file and the content of the encrypted file are different, a prompt message can be sent to the client to prompt a user that the content of the backup file is.
Further, the processing instruction includes a save instruction and an ignore instruction.
And under the condition that the received processing instruction is a saving instruction, saving the backup file, and marking the backup file. Specifically, the server receives a save instruction sent by the client, which indicates that the user still chooses to use the modified backup file when knowing that the backup file is modified and is different from the encrypted file content uploaded to the server before, and then the server saves the backup file and adds a label meaning "modified" to the backup file as a mark.
And under the condition that the received processing instruction is an ignoring instruction, re-acquiring the backup file corresponding to the encrypted file. Specifically, the server receives an ignore instruction sent by the client, which indicates that the user refuses to upload the modified backup file, and then the server obtains a new backup file from the client again.
Further, the file detection method further comprises the steps of reacquiring and updating the encrypted file carrying the authentication code, and decrypting the updated encrypted file.
Specifically, when a user needs to update a backup file, that is, the user recreates or uploads a new backup file at the client, and generates a new encrypted file carrying an authentication code based on the new backup file, and after a file update instruction generated at the client is sent to the server, the server obtains the new encrypted file carrying the authentication code to replace the original encrypted file.
According to the file detection method, whether the contents of the backup file and the encrypted file are completely the same is confirmed by detecting whether the authentication code between the backup file and the encrypted file is the same or not, so that the unique matching and the unique correlation between the backup file and the encrypted file can be effectively guaranteed, the authentication code adopts the MD5 code, the comparison result can be clear at a glance, and the speed and the accuracy of detection and judgment are effectively improved.
As shown in fig. 3, a file detection method for a client includes steps S310 to S340.
Step S310: and generating a backup file according to the file generation instruction, and generating an encrypted file carrying an authentication code according to the backup file.
Specifically, the file generation instruction may be various input instructions such as text input and voice input, or various uploading instructions such as local uploading, that is, the user may make a backup file on the client by means of text input and voice input, or upload the backup file locally, which is not limited in the present application.
Further, the backup file may be encrypted to generate a pre-encrypted file; and calculating the authentication code of the backup file based on the content of the backup file, adding the authentication code into the pre-encrypted file, and generating the encrypted file carrying the authentication code.
Specifically, the file may be encrypted by a symmetric encryption algorithm, an asymmetric encryption algorithm, CA authentication, or the like, so as to generate a pre-encrypted file. It should be noted that the generation of the pre-encrypted file does not replace the backup file, but exists with the backup file, and the backup file and the pre-encrypted file are in a corresponding relationship because the contents of the backup file and the pre-encrypted file are completely the same.
The authentication code of the backup file may be various encryption codes such as MD5 code, that is, the authentication code of the backup file may be calculated by various encryption algorithms such as MD5 information digest algorithm based on the content of the backup file, which is not limited in this application.
Furthermore, the content of the backup file includes text, date and abstract, and the authentication code of the backup file can be calculated based on one or more of the text, the date and the abstract of the backup file.
Wherein, the text of the backup file is all contents in the backup file. The date of the backup file can be the date of the backup file generated by the client, or the date of the backup file sent to the server by the client, namely the date of the backup file received by the server, wherein the date can be accurate to seconds, so that whether the backup file is modified or not can be accurately distinguished. The abstract of the backup file is the main point summary of the text of the backup file, which can be a plurality of key words or a segment of characters, and the content of the abstract changes along with the change of the text of the backup file.
Specifically, the authentication code of the backup file may be calculated only according to one of the text, the date and the abstract of the backup file, or may be calculated by combining two or three of the text, the date and the abstract of the backup file, and the content of the backup file may further include information such as the size of the storage space occupied by the backup file, or may be calculated by combining the three.
Furthermore, the authentication code and the pre-encrypted file may be packaged together to generate an encrypted file, or the authentication code may be added to the pre-encrypted file by other methods to generate the encrypted file, which is not limited in this application. Because the content of the pre-encrypted file is completely the same as that of the backup file, the content of the encrypted file is also completely the same as that of the backup file, the encrypted file and the backup file are in the same corresponding relation, and one backup file corresponds to one encrypted file.
Step S320: and sending the encrypted file to a server.
Specifically, the client may directly send the encrypted file to the server, or may first generate an encrypted file uploading instruction and send the encrypted file uploading instruction to the server, and the server may obtain the encrypted file generated by the client based on the encrypted file uploading instruction, or send the encrypted file to the server in other manners, which is not limited in this application.
Step S330: and under the condition that the server fails to decrypt the encrypted file, sending a backup file corresponding to the encrypted file to the server.
Specifically, in the case where the server fails to decrypt the encrypted file, that is, in the case where the client receives the "decryption failure" prompt message or the "resend backup file" instruction sent by the server, the client sends the backup file corresponding to the encrypted file to the server based on the received "decryption failure" prompt message or the "resend backup file" instruction.
Step S340: and under the condition of receiving the prompt message, generating a processing instruction for the backup file and sending the processing instruction to a server.
Specifically, the prompt information is information for prompting that the authentication code of the backup file is different from the authentication code of the encrypted file, and the client receives the prompt information to indicate that the content of the backup file sent to the server is different from that of the corresponding encrypted file, that is, the backup file is modified.
Further, the processing instruction includes a save instruction and an ignore instruction.
And sending the saving instruction to a server under the condition that the processing instruction is the saving instruction.
And under the condition that the processing instruction is an ignoring instruction, sending the ignoring instruction to a server, and resending the backup file corresponding to the encrypted file to the server.
Specifically, when the user selects to continue using the backup file with the changed content, a saving instruction is generated at the client and sent to the server, and the server saves the backup file based on the saving instruction.
And under the condition that the user selects to upload the backup file again, generating an ignoring instruction at the client, sending the ignoring instruction and the backup file to the server together, and receiving the backup file again by the server based on the ignoring instruction, calculating the authentication code again and the like.
Further, the file detection method further includes:
regenerating a backup file according to a file updating instruction, and regenerating an encrypted file carrying an authentication code according to the backup file; and sending the regenerated encrypted file carrying the authentication code to a server.
Specifically, when a user needs to update a backup file, that is, the user recreates or uploads a new backup file at the client, and generates a new encrypted file carrying an authentication code based on the new backup file, and after a file update instruction generated at the client is sent to the server, the server obtains the new encrypted file carrying the authentication code to replace the original encrypted file.
According to the file detection method, the pre-encrypted file is generated based on the backup file, the authentication code is calculated based on the content of the backup file, the authentication code is added into the pre-encrypted file, and the unique matching and unique correlation between the backup file and the encrypted file can be effectively guaranteed.
As shown in fig. 4, a file detection method including the file detection method for the server and the file detection method for the client includes steps S410 to S480.
Step S410: and the client generates a backup file according to the file generation instruction and generates an encrypted file carrying the authentication code according to the backup file.
Further, the backup file may be encrypted to generate a pre-encrypted file; and calculating the authentication code of the backup file based on the content of the backup file, adding the authentication code into the pre-encrypted file, and generating the encrypted file carrying the authentication code.
Furthermore, the content of the backup file includes text, date and abstract, and the authentication code of the backup file can be calculated based on one or more of the text, the date and the abstract of the backup file.
Step S420: and the client sends the encrypted file to a server.
Step S430: and the server decrypts the encrypted file.
Specifically, the client and the server may encrypt and decrypt the file by using a symmetric encryption algorithm, an asymmetric encryption algorithm, CA authentication, and the like, which is not limited in the present application.
Step S440: and under the condition that the server fails to decrypt the encrypted file, the client sends a backup file corresponding to the encrypted file to the server.
Step S450: and the server acquires a backup file corresponding to the encrypted file and calculates an authentication code of the backup file based on the content of the backup file.
Further, the content of the backup file includes a text, a date and an abstract, and the authentication code of the backup file may be calculated based on one or more of the text, the date and the abstract of the backup file.
Step S460: and under the condition that the authentication code of the backup file is the same as that of the encrypted file, the server saves the backup file.
Step S470: and under the condition that the authentication code of the backup file is different from the authentication code of the encrypted file, the server sends prompt information to the client so as to receive a processing instruction of the backup file generated by the client.
Step S480: and under the condition of receiving the prompt message, the client generates a processing instruction for the backup file and sends the processing instruction to the server.
Further, the processing instruction includes a save instruction and an ignore instruction.
And under the condition that the processing instruction is a saving instruction, the client sends the saving instruction to the server.
And under the condition that the processing instruction is an ignoring instruction, the client sends the ignoring instruction to the server and resends the backup file corresponding to the encrypted file to the server.
The details of steps S410 to S480 may also refer to the above embodiments, which are not described herein again.
The file detection method can ensure the unique matching and unique correlation between the backup file and the encrypted file, can be suitable for files related to two parties or multiple parties, such as a label, a contract and the like, and is wide in application range and strong in applicability.
As shown in fig. 5, the document detection method is further described by taking a label as an example.
And making a standard book by a user through a client. The client is provided with a bidding document generation template which comprises the contents of project names, bidding units, quotation lists and the like, and a user manually inputs and fills the content corresponding to each project, wherein the contents comprise the project name: purchasing and bidding units of the projection equipment for teaching: university, bidding unit: a company, a quotation list … … "
And the client generates a backup bidding document. The client generates a backup bidding document file based on the input content.
The client encrypts the backup bidding document to generate a pre-encrypted bidding document. And encrypting the backup bidding document by a CA authentication method to generate a pre-encrypted bidding document.
The client calculates code MD5 based on the content of the backup ticket, and packages code MD5 and the pre-encrypted ticket together to generate the encrypted ticket. Based on the text content of the backup bidding document, the authentication code of the backup bidding document is calculated to be '476 ff104d0b645227bf78f77d699b 306' through the MD5 information summarization algorithm, and the authentication code is added to the pre-encrypted bidding document, namely the encrypted bidding document is generated.
And the client sends the encrypted bidding document to the server to wait for the opening of the bidding document.
In the process of waiting for opening the bid, if the user makes a bid again due to reasons such as modifying the content of the bid and the like and needs to replace the previously uploaded bid, the encrypted bid is regenerated based on the new bid and is uploaded to the server again.
And decrypting the encrypted bidding document during bidding opening, if the decryption is successful, directly bidding by using the decrypted encrypted bidding document, and if the decryption is failed, entering an exception handling stage, and sending the backup bidding document to the server by the client.
Due to the failure of decrypting the encrypted ticket, the server calculates the MD5 code of the backup ticket through the MD5message digest algorithm. Based on the text content of the backup bidding document, the authentication code of the backup bidding document is obtained through calculation as follows: "6 c0780a79120940737f1f1e68bad3be 6".
It is determined whether the MD5 code of the backup ticket is the same as the MD5 code of the encrypted ticket. And if the MD5 code of the calculated backup label book is the same as the MD5 code of the encrypted file, directly storing the backup file by the server, opening the label by using the backup file, and if the MD5 code of the backup label book is different from the MD5 code of the encrypted file, sending prompt information to the client. By contrast, the MD5 code of the backup ticket is different from the MD5 code of the encrypted ticket.
The server sends prompt information to the client to prompt that the backup bidding document is modified and the content is different from the encrypted file, waits for a processing instruction of the client, and judges whether to store the backup file with the modified content or not based on the processing instruction.
And under the condition that the processing instruction is a saving instruction, directly saving the backup file with the modified content, and finishing uploading.
And under the condition that the processing instruction is the ignoring instruction, the client uploads the backup bidding document again, and the server acquires the backup bidding document again and continues to perform the subsequent steps of calculating the MD5 codes and the like.
The file detection method can be suitable for the field of electronic bidding, when decryption processing of the encrypted bidding document is unsuccessful, namely bidding enters an abnormal processing stage, and after uploading the encrypted bidding document, a user, namely a bidder, is likely to modify the backup bidding document.
As shown in fig. 6, a file detection apparatus, provided in a server, includes:
an obtaining module 610 configured to obtain an encrypted file carrying an authentication code.
And a decryption module 620 configured to decrypt the encrypted file.
A calculating module 630, configured to, if the decryption process is unsuccessful, obtain a backup file corresponding to the encrypted file, and calculate an authentication code of the backup file based on the content of the backup file.
Optionally, the content of the backup file includes a text, a date, and a summary, and the calculating module 630, based on the content of the backup file, is further configured to:
and calculating the authentication code of the backup file.
And calculating the authentication code of the backup file based on one or more of the text, the date and the abstract of the backup file.
A determining module 640 configured to detect and determine whether the authentication code of the backup file is the same as the authentication code of the encrypted file.
If yes, saving the backup file.
If not, sending prompt information to the client to receive a processing instruction of the backup file generated by the client.
Further, the processing instruction includes a save instruction and an ignore instruction.
Under the condition that the received processing instruction is a saving instruction, saving the backup file, and marking the backup file; and under the condition that the received processing instruction is an ignoring instruction, re-acquiring the backup file corresponding to the encrypted file.
Optionally, the file detection apparatus further includes a secondary acquisition module.
And the secondary acquisition module is configured to reacquire and update the encrypted file carrying the authentication code, and decrypt the updated encrypted file.
The file detection device provided by the embodiment of the application confirms whether the contents of the backup file and the encrypted file are completely the same or not by detecting whether the authentication codes between the comparison backup file and the encrypted file are the same or not, so that the unique matching and the unique correlation between the backup file and the encrypted file can be effectively ensured.
As shown in fig. 7, a file detection apparatus, provided at a client, includes:
the generating module 710 is configured to generate a backup file according to the file generating instruction, and generate an encrypted file carrying the authentication code according to the backup file.
Optionally, the generating module 710 is further configured to:
and encrypting the backup file to generate a pre-encrypted file.
And calculating the authentication code of the backup file based on the content of the backup file, adding the authentication code into the pre-encrypted file, and generating the encrypted file carrying the authentication code.
The content of the backup file includes a text, a date, and a summary, and the generating module 710 is further configured to:
and calculating the authentication code of the backup file based on one or more of the text, the date and the abstract of the backup file.
A first sending module 720 configured to send the encrypted file to a server.
The second sending module 730 is configured to send the backup file corresponding to the encrypted file to the server when the server fails to decrypt the encrypted file.
And the processing module 740 is configured to generate a processing instruction for the backup file and send the processing instruction to the server if the prompt message is received.
Optionally, the processing instruction includes a save instruction and an ignore instruction.
And sending the saving instruction to a server under the condition that the processing instruction is the saving instruction.
And under the condition that the processing instruction is an ignoring instruction, sending the ignoring instruction to a server, and resending the backup file corresponding to the encrypted file to the server.
The file detection device further comprises a secondary generation module configured to:
and regenerating a backup file according to the file updating instruction, and regenerating an encrypted file carrying the authentication code according to the backup file.
And sending the regenerated encrypted file carrying the authentication code to a server.
The file detection device provided by the embodiment of the application can effectively ensure the unique matching and unique correlation between the backup file and the encrypted file by calculating the authentication code based on the content of the backup file and adding the authentication code into the pre-encrypted file while generating the pre-encrypted file based on the backup file.
As shown in fig. 8, a file detection apparatus includes an obtaining module 810, a decryption module 820, a calculation module 830, a judgment module 840, a generation module 850, a first sending module 860, a second sending module 870, and a processing module 880, which are disposed at a server.
The specific content of each module can be referred to the above embodiments, and is not described herein again.
The file detection device can ensure the unique matching and the unique correlation between the backup file and the encrypted file, can be suitable for files related to two parties or multiple parties, such as a label, a contract and the like, and is wide in application range and strong in applicability.
An embodiment of the present application further provides a computer readable storage medium, which stores computer instructions, and when the instructions are executed by a processor, the computer instructions implement the steps of the file detection method as described above.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the above-mentioned file detection method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the above-mentioned file detection method.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and the practical application, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (12)

1. A method for detecting a bidding document is used for a server and comprises the following steps:
acquiring an encrypted bidding document file carrying an authentication code, wherein the encrypted bidding document file carrying the authentication code is generated by a client according to a backup bidding document file;
carrying out decryption processing on the encrypted bidding document file;
under the condition that the decryption processing is unsuccessful, acquiring a backup bidding document corresponding to the encrypted bidding document sent by the client, and calculating an authentication code of the backup bidding document based on the content of the backup bidding document;
detecting and judging whether the authentication code of the backup bidding document file is the same as the authentication code of the encrypted bidding document file;
if yes, saving the backup bidding document file;
if not, sending prompt information to the client to receive a processing instruction of the backup bidding document file generated by the client.
2. The method for detecting a markup document according to claim 1, wherein the processing instructions comprise a save instruction and an ignore instruction;
under the condition that the received processing instruction is a storage instruction, storing the backup bidding document file, and marking the backup bidding document file;
and under the condition that the received processing instruction is an ignoring instruction, re-acquiring the backup bidding document file corresponding to the encrypted bidding document file.
3. The method for detecting a bidding document according to claim 1, further comprising:
and re-acquiring and updating the encrypted bidding document file carrying the authentication code, and decrypting the updated encrypted bidding document file.
4. The method for detecting a Bidding file according to claim 1, wherein the content of the backed-up Bidding file includes text, date, abstract;
the calculating the authentication code of the backup bidding document file based on the content of the backup bidding document file comprises the following steps:
and calculating the authentication code of the backup bidding document file based on one or more of the text, the date and the abstract of the backup bidding document file.
5. A method for detecting a bidding document file is used for a client and comprises the following steps:
generating a backup bidding document file according to the bidding document file generation instruction, and generating an encrypted bidding document file carrying an authentication code according to the backup bidding document file;
sending the encrypted bidding document file to a server;
under the condition that the server fails to decrypt the encrypted bidding document, sending a backup bidding document corresponding to the encrypted bidding document to the server;
under the condition that prompt information is received, generating a processing instruction for the backup bidding document file and sending the processing instruction to a server;
wherein, the generating of the encrypted bidding document file carrying the authentication code according to the backup bidding document file comprises:
encrypting the backup bidding document file to generate a pre-encrypted bidding document file;
and calculating the authentication code of the backup bidding document file based on the content of the backup bidding document file, adding the authentication code into the pre-encrypted bidding document file, and generating the encrypted bidding document file carrying the authentication code.
6. The method for detecting a Bidding file according to claim 5, wherein the content of the backed-up Bidding file includes text, date, abstract;
the calculating the authentication code of the backup bidding document file based on the content of the backup bidding document file comprises the following steps:
and calculating the authentication code of the backup bidding document file based on one or more of the text, the date and the abstract of the backup bidding document file.
7. The method for detecting a markup document according to claim 5, wherein the processing instructions comprise a save instruction and an ignore instruction;
under the condition that the processing instruction is a saving instruction, sending the saving instruction to a server;
and under the condition that the processing instruction is an ignoring instruction, sending the ignoring instruction to a server, and resending the backup bidding document file corresponding to the encrypted bidding document file to the server.
8. The method for detecting a bidding document according to claim 5, further comprising:
regenerating a backup bidding document file according to the bidding document file updating instruction, and regenerating an encrypted bidding document file carrying an authentication code according to the backup bidding document file;
and sending the regenerated encrypted bidding document file carrying the authentication code to a server.
9. The utility model provides a mark document file detection device which characterized in that sets up in the server, includes:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is configured to acquire an encrypted bidding document file carrying an authentication code, and the encrypted bidding document file carrying the authentication code is generated based on a backup bidding document file;
the decryption module is configured to decrypt the encrypted bidding document file;
the computing module is configured to acquire a backup bidding document file corresponding to the encrypted bidding document file sent by the client under the condition that the decryption processing is unsuccessful, and compute an authentication code of the backup bidding document file based on the content of the backup bidding document file;
a judging module configured to detect and judge whether the authentication code of the backup ticket document is the same as the authentication code of the encrypted ticket document;
if yes, saving the backup bidding document file;
if not, sending prompt information to the client to receive a processing instruction of the backup bidding document file generated by the client.
10. The utility model provides a bidding document file detection device which characterized in that sets up in the customer end, includes:
the generation module is configured to generate a backup bidding document file according to the bidding document file generation instruction and generate an encrypted bidding document file carrying an authentication code according to the backup bidding document file;
a first sending module configured to send the encrypted bidding document file to a server;
the second sending module is configured to send the backup bidding document file corresponding to the encrypted bidding document file to the server under the condition that the server fails to decrypt the encrypted bidding document file;
the processing module is configured to generate a processing instruction for the backup bidding document file and send the processing instruction to a server under the condition of receiving the prompt message;
wherein the generation module is further configured to:
encrypting the backup bidding document file to generate a pre-encrypted bidding document file;
and calculating the authentication code of the backup bidding document file based on the content of the backup bidding document file, adding the authentication code into the pre-encrypted bidding document file, and generating the encrypted bidding document file carrying the authentication code.
11. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1-4 or 5-8 when executing the instructions.
12. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 4 or 5 to 8.
CN201910647427.3A 2019-07-17 2019-07-17 File detection method and device Active CN110348235B (en)

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 CN110348235A (en) 2019-10-18
CN110348235B true 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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1407501A (en) * 2001-08-31 2003-04-02 银川西夏印艺有限公司 Bill and contract verifying system
CN101051285A (en) * 2006-09-21 2007-10-10 上海交通大学 File matching method in computer network data backup
CN104992124A (en) * 2015-08-03 2015-10-21 电子科技大学 Document safety access method for cloud storage environment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7330977B2 (en) * 2003-12-30 2008-02-12 Lenovo Pte Ltd Apparatus, system, and method for secure mass storage backup
CN103023862A (en) * 2011-09-21 2013-04-03 索尼公司 Method, server and system used for integrity protection and authentication
CN106096381A (en) * 2016-06-06 2016-11-09 北京壹人壹本信息科技有限公司 The method and system of application file checking
CN107797889B (en) * 2017-11-14 2021-05-04 北京思特奇信息技术股份有限公司 Method and device for checking system file backup integrity
CN109684129B (en) * 2018-11-20 2020-05-05 北京深思数盾科技股份有限公司 Data backup recovery method, storage medium, encryption machine, 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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1407501A (en) * 2001-08-31 2003-04-02 银川西夏印艺有限公司 Bill and contract verifying system
CN101051285A (en) * 2006-09-21 2007-10-10 上海交通大学 File matching method in computer network data backup
CN104992124A (en) * 2015-08-03 2015-10-21 电子科技大学 Document safety access method for cloud storage environment

Also Published As

Publication number Publication date
CN110348235A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
CN111292041A (en) Electronic contract generating method, device, equipment and storage medium
CN109377229B (en) Transaction consensus method, node and block chain system
JP2007028014A (en) Digital signature program, digital signature system, digital signature method and signature verification method
CN111767582B (en) Electronic bidding method, device, equipment and storage medium based on block chain
US20180366036A1 (en) Pre-calculation device, method, computer-readable recording medium, vector multiplication device, and method
CN1941694B (en) Apparatus and method for generating data for detecting false alteration of encrypted data during processing
KR20200085095A (en) Electronic apparatus and method for managing data based on block chain
CN111160998A (en) Comment data processing method and device based on block chain and comment system
CN113486372A (en) Data backup method, data backup device and server
CN113452526B (en) Electronic file certification method, verification method and corresponding devices
CN113722753A (en) Privacy data processing method, device and system based on block chain
CN110620776B (en) Data transfer information transmission method and device
CN102231181B (en) Computer system used for file encryption and file encryption method
CN110321734A (en) A kind of file verification method and device
US10783264B2 (en) Non-transitory computer-readable storage medium, and information processing device using unique file-specific information for decryption of a target file
US20230146229A1 (en) Entity, gateway device, information processing device, information processing system, and information processing method
CN110348235B (en) File detection method and device
CN111445250B (en) Block chain key testing method and device
CN110232570B (en) Information supervision method and device
CN110852887B (en) Method and device for acquiring transaction processing state in decentralized application cluster
CN110175471B (en) File storage method and system
CN115828300A (en) Block chain-based government affair information processing method and system with privacy protection function
CN112231397B (en) Transaction file transfer method and device based on blockchain
CN114679724A (en) Key updating system and method
CN111291412B (en) Block chain-based on-chain data storage and reading method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant