CN110069933B - File processing method and device - Google Patents

File processing method and device Download PDF

Info

Publication number
CN110069933B
CN110069933B CN201810060312.XA CN201810060312A CN110069933B CN 110069933 B CN110069933 B CN 110069933B CN 201810060312 A CN201810060312 A CN 201810060312A CN 110069933 B CN110069933 B CN 110069933B
Authority
CN
China
Prior art keywords
file
electronic file
encrypted
electronic
data
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.)
Expired - Fee Related
Application number
CN201810060312.XA
Other languages
Chinese (zh)
Other versions
CN110069933A (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.)
New Founder Holdings Development Co ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics 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 Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201810060312.XA priority Critical patent/CN110069933B/en
Publication of CN110069933A publication Critical patent/CN110069933A/en
Application granted granted Critical
Publication of CN110069933B publication Critical patent/CN110069933B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Storage Device Security (AREA)
  • Information Transfer Between Computers (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention provides a file processing method and a file processing device, wherein the method comprises the following steps: in the embodiment, an encrypted electronic file and encrypted replacement information sent by a server are received, and the replacement information includes file data and location information of the file data, where the file data is extracted from the electronic file by the server, the location information represents a location of the file data in the electronic file, and the encrypted electronic file is the electronic file from which the file data is extracted; decrypting the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the decrypted replacement information; and setting the file data to the position corresponding to the position information of the file data in the decrypted electronic file according to the position information of the file data to obtain the complete electronic file. After other illegal equipment acquires the encrypted electronic file, the illegal equipment cannot acquire complete electronic data, so that the electronic file is prevented from being illegally stolen or tampered.

Description

File processing method and device
Technical Field
The present invention relates to the field of electronic file technologies, and in particular, to a file processing method and apparatus.
Background
With the development of electronic technology, electronic files are commonly transmitted. In order to ensure that the electronic file is not stolen or modified, the server may encrypt the electronic file, and then the server may transmit the encrypted electronic file to the terminal.
In the prior art, a public key is arranged in a server, the server encrypts an electronic file by adopting the public key, and then the server sends the encrypted electronic file to a terminal; and the terminal decrypts the encrypted electronic file by adopting a private key corresponding to the public key, and then the terminal acquires the electronic file.
However, in the prior art, if other illegal devices acquire the private key, the encrypted electronic file in transmission can be decrypted, and then the electronic file is acquired or tampered, and then the existing encryption processing mode is not safe, and the electronic file is still prevented from being illegally stolen or tampered.
Disclosure of Invention
The invention provides a file processing method and a file processing device, which are used for solving the problem that an existing encryption processing mode in the prior art is not safe and still can cause electronic files to be illegally stolen or tampered.
One aspect of the present invention provides a file processing method, including:
receiving an encrypted electronic file and encrypted replacement information sent by a server, wherein the replacement information comprises at least one file datum and position information of each file datum in the at least one file datum, each file datum in the at least one file datum is extracted from the electronic file by the server, the position information represents a position of the file datum in the electronic file, and the encrypted electronic file is the electronic file from which the at least one file datum is extracted;
decrypting the encrypted electronic file and the encrypted replacement information to obtain a decrypted electronic file and the decrypted replacement information;
and setting each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file.
Further, according to the location information of each piece of file data, setting each piece of file data to a location in the decrypted electronic file corresponding to the location information of each piece of file data, to obtain a complete electronic file, including:
determining and eliminating characters on positions corresponding to each piece of position information in the decrypted electronic file according to the position information of each piece of file data;
and filling each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain the complete electronic file.
Further, after setting each piece of file data to a position in the decrypted electronic file corresponding to the position information of each piece of file data according to the position information of each piece of file data to obtain a complete electronic file, the method further includes:
processing and/or displaying the complete electronic file.
Further, the at least one file data is continuous in the electronic file, or the at least one file data is discontinuous in the electronic file.
Another aspect of the present invention provides a file processing method, including:
receiving a file acquisition request sent by a terminal;
sending an encrypted electronic file and encrypted replacement information to the terminal according to the file acquisition request, wherein the replacement information includes at least one file datum and location information of each file datum in the at least one file datum, each file datum in the at least one file datum is extracted from the electronic file, the location information represents a location of the file datum in the electronic file, the encrypted electronic file is the electronic file from which the at least one file datum is extracted, so that the terminal decrypts the encrypted electronic file and the encrypted replacement information to obtain a decrypted electronic file and the replacement information, and then sets each file datum to a location in the decrypted electronic file corresponding to the location information of each file datum according to the location information of each file datum, to obtain a complete electronic file.
Further, before the file obtaining request sent by the receiving terminal, the method further includes:
acquiring an electronic file;
extracting the at least one file data from the electronic file according to a preset rule to obtain the electronic file with the extracted file data, and determining the replacement information;
and encrypting the electronic file with the extracted file data to obtain the encrypted electronic file, and encrypting the replacement information to obtain the encrypted replacement information.
Further, before encrypting the electronic file from which the file data is extracted to obtain the encrypted electronic file, the method further includes:
filling preset characters to positions corresponding to the position information of each file data according to the replacement information to obtain an electronic file filled with the characters;
correspondingly, encrypting the electronic file from which the file data is extracted to obtain the encrypted electronic file includes:
and encrypting the electronic file filled with the characters to obtain the encrypted electronic file.
Further, the preset rule is to continuously extract file data from the electronic file, or to continuously extract file data from the electronic file.
Still another aspect of the present invention provides a document processing apparatus including:
the system comprises a receiving module and a sending module, wherein the receiving module is used for receiving an encrypted electronic file and encrypted replacement information sent by a server, the replacement information comprises at least one file datum and position information of each file datum in the at least one file datum, each file datum in the at least one file datum is extracted from the electronic file by the server, the position information represents the position of the file datum in the electronic file, and the encrypted electronic file is the electronic file from which the at least one file datum is extracted;
the decryption module is used for decrypting the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the decrypted replacement information;
and the setting module is used for setting each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file.
Further, the setting module includes:
the eliminating submodule is used for determining and eliminating characters on positions corresponding to each piece of position information in the decrypted electronic file according to the position information of each piece of file data;
and the filling submodule is used for filling each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain the complete electronic file.
Further, the apparatus further comprises:
and the processing module is used for processing and/or displaying the complete electronic file after the setting module sets each file data to the position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain the complete electronic file.
Further, the at least one file data is continuous in the electronic file, or the at least one file data is discontinuous in the electronic file.
Still another aspect of the present invention provides a document processing apparatus including:
the receiving module is used for receiving a file acquisition request sent by a terminal;
a sending module, configured to send an encrypted electronic file and encrypted replacement information to the terminal according to the file acquisition request, where the replacement information includes at least one piece of file data and location information of each piece of file data in the at least one piece of file data, where each piece of file data in the at least one piece of file data is extracted from the electronic file, the location information represents a location of the piece of file data in the electronic file, and the encrypted electronic file is the electronic file from which the at least one piece of file data is extracted, so that the terminal decrypts the encrypted electronic file and the encrypted replacement information to obtain a decrypted electronic file and the replacement information, and then sets each piece of file data to the decrypted electronic file corresponding to the location information of each piece of file data according to the location information of each piece of file data And (4) positioning to obtain a complete electronic file.
Further, the apparatus further comprises:
the acquisition module is used for acquiring the electronic file before the receiving module receives the file acquisition request sent by the terminal;
the extraction module is used for extracting the at least one file data from the electronic file according to a preset rule to obtain the electronic file with the extracted file data and determining the replacement information;
and the encryption module is used for encrypting the electronic file with the extracted file data to obtain the encrypted electronic file, and encrypting the replacement information to obtain the encrypted replacement information.
Further, the apparatus further comprises:
the filling module is used for filling preset characters into the positions corresponding to the position information of each file data according to the replacement information before the encryption module encrypts the electronic file with the extracted file data to obtain the encrypted electronic file, so as to obtain the electronic file with the filled characters;
correspondingly, the encryption module is specifically configured to:
and encrypting the electronic file filled with the characters to obtain the encrypted electronic file, and encrypting the replacement information to obtain the encrypted replacement information.
Further, the preset rule is to continuously extract file data from the electronic file, or to continuously extract file data from the electronic file.
The invention provides a file processing method and a device, which are characterized in that an encrypted electronic file and encrypted replacement information are sent by a server, wherein the replacement information comprises at least one file datum and position information of each file datum in the at least one file datum, each file datum in the at least one file datum is extracted from the electronic file by the server, the position information represents the position of the file datum in the electronic file, and the encrypted electronic file is the electronic file from which the at least one file datum is extracted; decrypting the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the decrypted replacement information; and setting each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file. The method comprises the steps of eliminating part of file data in an electronic file, determining the position information of the file data, sending the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information to a terminal, encrypting the electronic file with part of the file data extracted, and sending the electronic file to the terminal; therefore, after other illegal equipment acquires the encrypted electronic file, even if the electronic file can be decrypted, the illegal equipment cannot acquire complete electronic data due to the fact that part of file data is extracted from the electronic file, and the electronic file is guaranteed not to be illegally stolen or tampered; the terminal can recover the electronic file with part of the file data extracted according to the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information, and further obtain the complete electronic file.
Drawings
Fig. 1 is a schematic flowchart of a file processing method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram illustrating another document processing method according to an embodiment of the present application;
FIG. 3 is a schematic flowchart of another document processing method according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a document processing apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of another document processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another file processing apparatus according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The specific application scenarios of the invention are as follows: in the prior art, a public key is arranged in a server, the server encrypts an electronic file by adopting the public key, and then the server sends the encrypted electronic file to a terminal; and the terminal decrypts the encrypted electronic file by adopting a private key corresponding to the public key, and then the terminal acquires the electronic file. However, in the prior art, if other illegal devices acquire the private key, the encrypted electronic file in transmission can be decrypted, and then the electronic file is acquired or tampered, and then the existing encryption processing mode is not safe, and the electronic file is still prevented from being illegally stolen or tampered.
The invention provides a file processing method and a file processing device, and aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present invention and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a file processing method according to an embodiment of the present application. As shown in fig. 1, the method includes:
step 101, receiving an encrypted electronic file and encrypted replacement information sent by a server, wherein the replacement information includes at least one file datum and location information of each file datum in the at least one file datum, each file datum in the at least one file datum is extracted from the electronic file by the server, the location information represents a location of the file datum in the electronic file, and the encrypted electronic file is the electronic file from which the at least one file datum is extracted.
In an alternative embodiment, at least one file data is continuous in the electronic file, or at least one file data is discontinuous in the electronic file.
In this embodiment, the execution subject of this embodiment is specifically a terminal, but is not limited to the terminal.
The electronic file and the replacement information corresponding to the electronic file are stored in the server. The replacement information corresponding to the electronic file comprises a plurality of file data and position information of each file data, wherein the file data are extracted from the electronic file by a server, the position information of each file data represents the position of the file data in the electronic file, and the electronic file is the electronic file with at least one file data extracted. Specifically, the above plurality of file data are continuous in the electronic file, or the above plurality of file data are discontinuous in the electronic file.
For example, the file data 1 is extracted from the position 1 of the original electronic file, the file data 2 is extracted from the position 2 of the electronic file, the replacement information includes the file data 1, the position 1 of the file data 1, the file data 2, and the position 2 of the file data 2, and the electronic file is an electronic file lacking the file data 1 and the file data 2.
Also, the server may encrypt the electronic file from which the file data is extracted, and the server may encrypt the replacement information. For example, the server encrypts the electronic file from which the file data has been extracted and the replacement information using the public key.
For example, the replacement information includes file data, location information, and a correspondence between the file data and the location information, and the encrypted replacement information includes a correspondence between the encrypted file data and the location information, the encrypted file data, and the encrypted location information.
The terminal sends a file acquisition request to the server, and then the server sends the encrypted electronic file and the encrypted replacement information to the terminal.
And 102, decrypting the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the decrypted replacement information.
In this embodiment, specifically, the terminal decrypts the encrypted electronic file and the encrypted replacement information, respectively, so as to obtain the decrypted electronic file and the decrypted replacement information.
For example, a Personal Computer (PC) client or a mobile Application (APP) client of the terminal downloads an encrypted electronic file, replacement information for restoring file data, and a key for decrypting the data from a server.
And 103, setting each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file.
In this embodiment, specifically, for each file data in the replacement information, the file data is set to a position corresponding to the position information of the file data according to the position information of the file data, so as to obtain a complete electronic file.
For example, for an electronic file lacking file data 1 and file data 2, file data 1 is set to location 1, and file data 2 is set to location 2, so as to obtain a complete electronic file.
In the embodiment, an encrypted electronic file and encrypted replacement information are received, where the replacement information includes at least one piece of file data and location information of each piece of file data in the at least one piece of file data, where each piece of file data in the at least one piece of file data is extracted from the electronic file by the server, the location information represents a location of the piece of file data in the electronic file, and the encrypted electronic file is the electronic file from which the at least one piece of file data is extracted; decrypting the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the decrypted replacement information; and setting each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file. The method comprises the steps of eliminating part of file data in an electronic file, determining the position information of the file data, sending the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information to a terminal, encrypting the electronic file with part of the file data extracted, and sending the electronic file to the terminal; therefore, after other illegal equipment acquires the encrypted electronic file, even if the electronic file can be decrypted, the illegal equipment cannot acquire complete electronic data due to the fact that part of file data is extracted from the electronic file, and the electronic file is guaranteed not to be illegally stolen or tampered; the terminal can recover the electronic file with part of the file data extracted according to the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information, and further obtain the complete electronic file.
Fig. 2 is a schematic flowchart of another file processing method according to an embodiment of the present application. As shown in fig. 2, the method includes:
step 201, receiving an encrypted electronic file and encrypted replacement information sent by a server, where the replacement information includes at least one piece of file data and location information of each piece of file data in the at least one piece of file data, where each piece of file data in the at least one piece of file data is extracted from the electronic file by the server, the location information represents a location of the file data in the electronic file, and the encrypted electronic file is the electronic file from which the at least one piece of file data is extracted.
In this embodiment, specifically, this step may refer to step 101 in fig. 1, and is not described again.
Step 202, decrypting the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the decrypted replacement information.
In this embodiment, specifically, this step may refer to step 102 in fig. 1, and is not described again.
And step 203, determining and eliminating characters at positions corresponding to the position information in the decrypted electronic file according to the position information of each file data.
In this embodiment, specifically, for each piece of file data in the replacement information, the terminal determines, according to the location information of the piece of file data, a character at a location in the decrypted electronic file corresponding to each piece of location information, and then, the terminal removes the character.
And step 204, filling each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file.
In this embodiment, specifically, for each file data in the replacement information, the terminal sets the file data to a position corresponding to the position information of the file data according to the position information of the file data, so as to obtain a complete electronic file.
For example, for an electronic file lacking file data 1 and file data 2, the characters at position 1 are removed, file data 1 is set at position 1, the characters at position 2 are removed, and file data 2 is set at position 2, so that a complete electronic file is obtained.
Step 205, processing and/or displaying the complete electronic file.
In this embodiment, specifically, the terminal may display the complete electronic file, or the terminal may store the complete electronic file, or the terminal may modify the complete electronic file and then display the modified complete electronic file.
In the embodiment, an encrypted electronic file and encrypted replacement information are received, where the replacement information includes at least one piece of file data and location information of each piece of file data in the at least one piece of file data, where each piece of file data in the at least one piece of file data is extracted from the electronic file by the server, the location information represents a location of the piece of file data in the electronic file, and the encrypted electronic file is the electronic file from which the at least one piece of file data is extracted; decrypting the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the decrypted replacement information; determining and eliminating characters at positions corresponding to each piece of position information in the decrypted electronic file according to the position information of each piece of file data; and filling each file data to the position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain the complete electronic file. The method comprises the steps of replacing part of file data in an electronic file with special characters, determining position information of the file data, sending the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information to a terminal, encrypting the electronic file with part of the file data extracted, and sending the electronic file to the terminal; therefore, after other illegal equipment acquires the encrypted electronic file, even if the electronic file can be decrypted, the illegal equipment cannot acquire complete electronic data due to the fact that part of file data is extracted from the electronic file, and the electronic file is guaranteed not to be illegally stolen or tampered; the terminal can recover the electronic file with part of the file data extracted according to the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information, and further obtain the complete electronic file.
Fig. 3 is a schematic flowchart of another file processing method according to an embodiment of the present application. As shown in fig. 3, the method includes:
and 301, acquiring an electronic file.
In this embodiment, specifically, the execution subject of this embodiment is a server, but is not limited to the server.
The server acquires the electronic file, specifically, the server may acquire the electronic file from other terminals or a cloud.
Step 302, extracting at least one file data from the electronic file according to a preset rule, obtaining the electronic file with the extracted file data, and determining the replacement information.
In an alternative embodiment, the preset rule is to continuously extract the document data from the electronic document, or to continuously extract the document data from the electronic document.
In this embodiment, specifically, the server extracts a plurality of file data with a preset size from the electronic file according to a preset rule, for example, the preset size is N bytes or several kbytes. Specifically, the server extracts file data from consecutive locations of the electronic file, or the server extracts file data from non-consecutive locations of the electronic file, specifically, the server extracts consecutive bytes in the electronic file, or X non-consecutive bytes in the electronic file.
And 303, encrypting the electronic file with the file data extracted to obtain an encrypted electronic file, and encrypting the replacement information to obtain encrypted replacement information.
In an alternative embodiment, step 303 includes: filling preset characters into positions corresponding to the position information of each file data according to the replacement information to obtain the electronic file filled with the characters; and encrypting the electronic file filled with the characters to obtain an encrypted electronic file, and encrypting the replacement information to obtain encrypted replacement information.
In this embodiment, specifically, the server fills in the file data with preset characters at the position where the file data is extracted, and then replaces the file data with the preset characters, where the filling characters can be used as? "," # ", etc.
Then the server stores the replacement information, wherein the replacement information comprises the extracted file data, the position information of the file data and the corresponding relation between the file data and the position information of the file data.
Then, the server encrypts the replacement information to obtain encrypted replacement information; and the server encrypts the electronic file from which the file data is extracted to obtain an encrypted electronic file.
And step 304, receiving a file acquisition request sent by the terminal.
In this embodiment, specifically, the terminal sends a file acquisition request to the server.
Step 305, sending the encrypted electronic file and the encrypted replacement information to the terminal according to the file acquisition request, wherein the replacement information includes at least one file data, location information of each file data of the at least one file data, wherein each of the at least one document data is extracted from the electronic document, the position information represents a position of the document data in the electronic document, the encrypted electronic document is the electronic document from which the at least one document data is extracted, so that the terminal decrypts the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the replacement information, and setting each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file.
In this embodiment, specifically, the server sends the encrypted electronic file and the encrypted replacement information to the terminal.
The terminal decrypts the encrypted replacement information to obtain the replacement information, wherein the replacement information comprises the extracted file data, the file data position information and the corresponding relation between the file data and the file data position information; and the terminal decrypts the encrypted electronic file to obtain the electronic file. Then, the terminal removes the characters at the position corresponding to the file data position information in the electronic file according to the file data position information, and fills the file data at the position corresponding to the file data position information in the electronic file according to the corresponding relation between the file data and the file data position information, so as to obtain the complete electronic file. And displaying the complete electronic file by the terminal.
The embodiment receives a file acquisition request sent by a terminal; transmitting the encrypted electronic file and the encrypted replacement information to the terminal according to the file acquisition request, wherein the replacement information includes at least one file data, location information of each file data of the at least one file data, wherein each of the at least one document data is extracted from the electronic document, the position information represents a position of the document data in the electronic document, the encrypted electronic document is the electronic document from which the at least one document data is extracted, so that the terminal decrypts the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the replacement information, and setting each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file. The method comprises the steps of replacing part of file data in an electronic file with special characters, determining position information of the file data, sending the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information to a terminal, encrypting the electronic file with part of the file data extracted, and sending the electronic file to the terminal; therefore, after other illegal equipment acquires the encrypted electronic file, even if the electronic file can be decrypted, the illegal equipment cannot acquire complete electronic data due to the fact that part of file data is extracted from the electronic file, and the electronic file is guaranteed not to be illegally stolen or tampered; the terminal can recover the electronic file with part of the file data extracted according to the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information, and further obtain the complete electronic file.
Fig. 4 is a schematic structural diagram of a file processing apparatus according to an embodiment of the present invention, and as shown in fig. 4, the apparatus according to the embodiment may include:
the receiving module 41 is configured to receive an encrypted electronic file sent by the server and encrypted replacement information, where the replacement information includes at least one piece of file data and location information of each piece of file data in the at least one piece of file data, where each piece of file data in the at least one piece of file data is extracted from the electronic file by the server, the location information represents a location of the piece of file data in the electronic file, and the encrypted electronic file is the electronic file from which the at least one piece of file data is extracted.
And the decryption module 42 is configured to decrypt the encrypted electronic file and the encrypted replacement information to obtain a decrypted electronic file and the decrypted replacement information.
And a setting module 43, configured to set each piece of file data to a position, corresponding to the position information of each piece of file data, in the decrypted electronic file according to the position information of each piece of file data, so as to obtain a complete electronic file.
The file processing apparatus of this embodiment can execute the file processing method provided in the embodiments of the present invention, and the implementation principles thereof are similar, and are not described herein again.
In the embodiment, an encrypted electronic file and encrypted replacement information are received, where the replacement information includes at least one piece of file data and location information of each piece of file data in the at least one piece of file data, where each piece of file data in the at least one piece of file data is extracted from the electronic file by the server, the location information represents a location of the piece of file data in the electronic file, and the encrypted electronic file is the electronic file from which the at least one piece of file data is extracted; decrypting the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the decrypted replacement information; and setting each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file. The method comprises the steps of eliminating part of file data in an electronic file, determining the position information of the file data, sending the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information to a terminal, encrypting the electronic file with part of the file data extracted, and sending the electronic file to the terminal; therefore, after other illegal equipment acquires the encrypted electronic file, even if the electronic file can be decrypted, the illegal equipment cannot acquire complete electronic data due to the fact that part of file data is extracted from the electronic file, and the electronic file is guaranteed not to be illegally stolen or tampered; the terminal can recover the electronic file with part of the file data extracted according to the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information, and further obtain the complete electronic file.
Fig. 5 is a schematic structural diagram of another file processing apparatus according to an embodiment of the present invention, and based on the embodiment shown in fig. 3, as shown in fig. 5, a setting module 43 includes:
and the eliminating submodule 431 is used for determining and eliminating characters at the position corresponding to each position information in the decrypted electronic file according to the position information of each file data.
And the filling submodule 432 is configured to fill each file data to a position, corresponding to the position information of each file data, in the decrypted electronic file according to the position information of each file data, so as to obtain a complete electronic file.
The apparatus provided in this embodiment further includes:
and the processing module 51 is configured to, after the setting module 43 sets each piece of file data to a position in the decrypted electronic file corresponding to the position information of each piece of file data according to the position information of each piece of file data, obtain a complete electronic file, and process and/or display the complete electronic file.
At least one file data is continuous in the electronic file, or at least one file data is discontinuous in the electronic file.
The file processing apparatus of this embodiment can execute another file processing method provided in this embodiment of the present invention, and the implementation principles thereof are similar, and are not described herein again.
In the embodiment, an encrypted electronic file and encrypted replacement information are received, where the replacement information includes at least one piece of file data and location information of each piece of file data in the at least one piece of file data, where each piece of file data in the at least one piece of file data is extracted from the electronic file by the server, the location information represents a location of the piece of file data in the electronic file, and the encrypted electronic file is the electronic file from which the at least one piece of file data is extracted; decrypting the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the decrypted replacement information; determining and eliminating characters at positions corresponding to each piece of position information in the decrypted electronic file according to the position information of each piece of file data; and filling each file data to the position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain the complete electronic file. The method comprises the steps of replacing part of file data in an electronic file with special characters, determining position information of the file data, sending the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information to a terminal, encrypting the electronic file with part of the file data extracted, and sending the electronic file to the terminal; therefore, after other illegal equipment acquires the encrypted electronic file, even if the electronic file can be decrypted, the illegal equipment cannot acquire complete electronic data due to the fact that part of file data is extracted from the electronic file, and the electronic file is guaranteed not to be illegally stolen or tampered; the terminal can recover the electronic file with part of the file data extracted according to the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information, and further obtain the complete electronic file.
Fig. 6 is a schematic structural diagram of another file processing apparatus according to an embodiment of the present invention, and as shown in fig. 6, the apparatus according to the embodiment may include:
the receiving module 61 is configured to receive a file acquisition request sent by a terminal.
A sending module 62, configured to send the encrypted electronic file and the encrypted replacement information to the terminal according to the file obtaining request, where the replacement information includes at least one file datum and location information of each file datum in the at least one file datum, where each file datum in the at least one file datum is extracted from the electronic file, the location information represents a location of the file datum in the electronic file, the encrypted electronic file is the electronic file from which the at least one file datum is extracted, so that the terminal decrypts the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the replacement information, and then sets each file datum to a location in the decrypted electronic file corresponding to the location information of each file datum according to the location information of each file datum, to obtain a complete electronic file.
This embodiment provides the device, still includes:
an obtaining module 63, configured to obtain the electronic file before the receiving module 61 receives the file obtaining request sent by the terminal.
And the extraction module 64 is configured to extract at least one piece of file data from the electronic file according to a preset rule, obtain the electronic file with the extracted file data, and determine the replacement information.
And an encryption module 65 configured to encrypt the electronic file from which the file data is extracted to obtain an encrypted electronic file, and encrypt the replacement information to obtain encrypted replacement information.
The apparatus provided in this embodiment further includes:
a padding module 66, configured to pad preset characters in positions corresponding to the position information of each piece of file data according to the replacement information before the encryption module 65 encrypts the electronic file from which the file data is extracted to obtain an encrypted electronic file, so as to obtain an electronic file with padded characters.
Correspondingly, the encryption module 65 is specifically configured to: and encrypting the electronic file filled with the characters to obtain an encrypted electronic file, and encrypting the replacement information to obtain encrypted replacement information.
The preset rule is to continuously extract file data from the electronic file or to discontinuously extract file data from the electronic file.
The file processing apparatus of this embodiment can execute another file processing method provided in this embodiment of the present invention, and the implementation principles thereof are similar, and are not described herein again.
The embodiment receives a file acquisition request sent by a terminal; transmitting the encrypted electronic file and the encrypted replacement information to the terminal according to the file acquisition request, wherein the replacement information includes at least one file data, location information of each file data of the at least one file data, wherein each of the at least one document data is extracted from the electronic document, the position information represents a position of the document data in the electronic document, the encrypted electronic document is the electronic document from which the at least one document data is extracted, so that the terminal decrypts the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the replacement information, and setting each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file. The method comprises the steps of replacing part of file data in an electronic file with special characters, determining position information of the file data, sending the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information to a terminal, encrypting the electronic file with part of the file data extracted, and sending the electronic file to the terminal; therefore, after other illegal equipment acquires the encrypted electronic file, even if the electronic file can be decrypted, the illegal equipment cannot acquire complete electronic data due to the fact that part of file data is extracted from the electronic file, and the electronic file is guaranteed not to be illegally stolen or tampered; the terminal can recover the electronic file with part of the file data extracted according to the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information, and further obtain the complete electronic file.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A file processing method, comprising:
receiving an encrypted electronic file and encrypted replacement information sent by a server, wherein the replacement information comprises at least one file datum and position information of each file datum in the at least one file datum, each file datum in the at least one file datum is extracted from the electronic file by the server, the position information represents a position of the file datum in the electronic file, and the encrypted electronic file is the electronic file from which the at least one file datum is extracted; the encrypted replacement information comprises the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information;
decrypting the encrypted electronic file and the encrypted replacement information to obtain a decrypted electronic file and the decrypted replacement information;
and setting each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file.
2. The method according to claim 1, wherein the setting of each piece of file data to a position in the decrypted electronic file corresponding to the position information of each piece of file data according to the position information of each piece of file data to obtain a complete electronic file comprises:
determining and eliminating characters on positions corresponding to each piece of position information in the decrypted electronic file according to the position information of each piece of file data;
and filling each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain the complete electronic file.
3. The method according to claim 1, wherein after the step of setting each piece of file data to a position in the decrypted electronic file corresponding to the position information of each piece of file data according to the position information of each piece of file data to obtain a complete electronic file, the method further comprises:
processing and/or displaying the complete electronic file.
4. A method according to any of claims 1-3, wherein said at least one file data is continuous in said electronic file or said at least one file data is non-continuous in said electronic file.
5. A file processing method, comprising:
receiving a file acquisition request sent by a terminal;
sending an encrypted electronic file and encrypted replacement information to the terminal according to the file acquisition request, wherein the replacement information includes at least one file datum and location information of each file datum in the at least one file datum, each file datum in the at least one file datum is extracted from the electronic file, the location information represents a location of the file datum in the electronic file, the encrypted electronic file is the electronic file from which the at least one file datum is extracted, so that the terminal decrypts the encrypted electronic file and the encrypted replacement information to obtain a decrypted electronic file and the replacement information, and then sets each file datum to a location in the decrypted electronic file corresponding to the location information of each file datum according to the location information of each file datum, to obtain a complete electronic file; the encrypted replacement information includes a correspondence between the encrypted file data and the location information, the encrypted file data, and the encrypted location information.
6. The method according to claim 5, wherein before the receiving the file acquisition request sent by the terminal, further comprising:
acquiring an electronic file;
extracting the at least one file data from the electronic file according to a preset rule to obtain the electronic file with the extracted file data, and determining the replacement information;
and encrypting the electronic file with the extracted file data to obtain the encrypted electronic file, and encrypting the replacement information to obtain the encrypted replacement information.
7. The method according to claim 6, before encrypting the electronic file from which the file data is extracted to obtain the encrypted electronic file, further comprising:
filling preset characters to positions corresponding to the position information of each file data according to the replacement information to obtain an electronic file filled with the characters;
correspondingly, encrypting the electronic file from which the file data is extracted to obtain the encrypted electronic file includes:
and encrypting the electronic file filled with the characters to obtain the encrypted electronic file.
8. The method according to claim 6 or 7, wherein the preset rule is to continuously extract file data from the electronic file or to continuously extract file data from the electronic file.
9. A document processing apparatus, characterized by comprising:
the system comprises a receiving module and a sending module, wherein the receiving module is used for receiving an encrypted electronic file and encrypted replacement information sent by a server, the replacement information comprises at least one file datum and position information of each file datum in the at least one file datum, each file datum in the at least one file datum is extracted from the electronic file by the server, the position information represents the position of the file datum in the electronic file, and the encrypted electronic file is the electronic file from which the at least one file datum is extracted; the encrypted replacement information comprises the corresponding relation between the encrypted file data and the position information, the encrypted file data and the encrypted position information;
the decryption module is used for decrypting the encrypted electronic file and the encrypted replacement information to obtain the decrypted electronic file and the decrypted replacement information;
and the setting module is used for setting each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain a complete electronic file.
10. The apparatus of claim 9, wherein the setup module comprises:
the eliminating submodule is used for determining and eliminating characters on positions corresponding to each piece of position information in the decrypted electronic file according to the position information of each piece of file data;
and the filling submodule is used for filling each file data to a position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain the complete electronic file.
11. The apparatus of claim 9, further comprising:
and the processing module is used for processing and/or displaying the complete electronic file after the setting module sets each file data to the position corresponding to the position information of each file data in the decrypted electronic file according to the position information of each file data to obtain the complete electronic file.
12. The apparatus according to any of claims 9-11, wherein the at least one file data is contiguous in the electronic file or the at least one file data is non-contiguous in the electronic file.
13. A document processing apparatus, characterized by comprising:
the receiving module is used for receiving a file acquisition request sent by a terminal;
a sending module, configured to send an encrypted electronic file and encrypted replacement information to the terminal according to the file acquisition request, where the replacement information includes at least one piece of file data and location information of each piece of file data in the at least one piece of file data, where each piece of file data in the at least one piece of file data is extracted from the electronic file, the location information represents a location of the piece of file data in the electronic file, and the encrypted electronic file is the electronic file from which the at least one piece of file data is extracted, so that the terminal decrypts the encrypted electronic file and the encrypted replacement information to obtain a decrypted electronic file and the replacement information, and then sets each piece of file data to the decrypted electronic file corresponding to the location information of each piece of file data according to the location information of each piece of file data Position to obtain a complete electronic file; the encrypted replacement information includes a correspondence between the encrypted file data and the location information, the encrypted file data, and the encrypted location information.
14. The apparatus of claim 13, further comprising:
the acquisition module is used for acquiring the electronic file before the receiving module receives the file acquisition request sent by the terminal;
the extraction module is used for extracting the at least one file data from the electronic file according to a preset rule to obtain the electronic file with the extracted file data and determining the replacement information;
and the encryption module is used for encrypting the electronic file with the extracted file data to obtain the encrypted electronic file, and encrypting the replacement information to obtain the encrypted replacement information.
15. The apparatus of claim 14, further comprising:
the filling module is used for filling preset characters into the positions corresponding to the position information of each file data according to the replacement information before the encryption module encrypts the electronic file with the extracted file data to obtain the encrypted electronic file, so as to obtain the electronic file with the filled characters;
correspondingly, the encryption module is specifically configured to:
and encrypting the electronic file filled with the characters to obtain the encrypted electronic file, and encrypting the replacement information to obtain the encrypted replacement information.
16. The apparatus according to claim 14 or 15, wherein the predetermined rule is to extract file data continuously from the electronic file or extract file data non-continuously from the electronic file.
CN201810060312.XA 2018-01-22 2018-01-22 File processing method and device Expired - Fee Related CN110069933B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810060312.XA CN110069933B (en) 2018-01-22 2018-01-22 File processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810060312.XA CN110069933B (en) 2018-01-22 2018-01-22 File processing method and device

Publications (2)

Publication Number Publication Date
CN110069933A CN110069933A (en) 2019-07-30
CN110069933B true CN110069933B (en) 2022-02-18

Family

ID=67364617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810060312.XA Expired - Fee Related CN110069933B (en) 2018-01-22 2018-01-22 File processing method and device

Country Status (1)

Country Link
CN (1) CN110069933B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1334951A (en) * 1999-01-28 2002-02-06 保仓丰 Method for securing safety of electronic information
US8522050B1 (en) * 2010-07-28 2013-08-27 Symantec Corporation Systems and methods for securing information in an electronic file
CN104994098A (en) * 2015-06-30 2015-10-21 广东欧珀移动通信有限公司 File transmission method and relevant device and transmission system
CN105306196A (en) * 2015-09-29 2016-02-03 江苏金源锻造股份有限公司 Hardware encryption and decryption device for mechanical equipment control system
US20160239668A1 (en) * 2015-02-13 2016-08-18 Konica Minolta Laboratory U.S.A., Inc. Document redaction with data retention
CN106534894A (en) * 2016-10-31 2017-03-22 Tcl集团股份有限公司 Encrypted video distribution method and system
CN107085689A (en) * 2017-03-31 2017-08-22 武汉斗鱼网络科技有限公司 A kind of method and device for picture resource being encrypted in Flash protection

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102780556B (en) * 2011-05-09 2015-03-18 北大方正集团有限公司 Method and device for encrypting and decrypting digital content section by section
CN102402670A (en) * 2011-08-03 2012-04-04 广东欧珀移动通信有限公司 File encryption and decryption method
CN103020539A (en) * 2011-09-27 2013-04-03 英业达股份有限公司 English words encryption and decryption method
CN103377347B (en) * 2012-04-24 2016-01-06 腾讯科技(深圳)有限公司 File encryption, decryption method and device
CN103294961A (en) * 2013-06-07 2013-09-11 北京奇虎科技有限公司 Method and device for file encrypting/decrypting

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1334951A (en) * 1999-01-28 2002-02-06 保仓丰 Method for securing safety of electronic information
US8522050B1 (en) * 2010-07-28 2013-08-27 Symantec Corporation Systems and methods for securing information in an electronic file
US20160239668A1 (en) * 2015-02-13 2016-08-18 Konica Minolta Laboratory U.S.A., Inc. Document redaction with data retention
CN104994098A (en) * 2015-06-30 2015-10-21 广东欧珀移动通信有限公司 File transmission method and relevant device and transmission system
CN105306196A (en) * 2015-09-29 2016-02-03 江苏金源锻造股份有限公司 Hardware encryption and decryption device for mechanical equipment control system
CN106534894A (en) * 2016-10-31 2017-03-22 Tcl集团股份有限公司 Encrypted video distribution method and system
CN107085689A (en) * 2017-03-31 2017-08-22 武汉斗鱼网络科技有限公司 A kind of method and device for picture resource being encrypted in Flash protection

Also Published As

Publication number Publication date
CN110069933A (en) 2019-07-30

Similar Documents

Publication Publication Date Title
CN100592683C (en) Protected return path from digital rights management dongle
CN109829269A (en) Method, apparatus and system based on E-seal authenticating electronic documents
CN111143869B (en) Application package processing method and device, electronic equipment and storage medium
CN101651714B (en) Downloading method and related system and equipment
CN110661748B (en) Log encryption method, log decryption method and log encryption device
CN109274644B (en) Data processing method, terminal and watermark server
USRE47324E1 (en) Data encryption systems and methods
CN110611657A (en) File stream processing method, device and system based on block chain
CN107872532B (en) Method and system for storing and downloading third-party cloud storage platform
CN108667784B (en) System and method for protecting internet identity card verification information
CN105320535A (en) Checking method of installation package, client side, server and system
CN107579903B (en) Picture message secure transmission method and system based on mobile device
CN103825724A (en) Identification type password system and method for updating and recovering private key automatically
CN110798433B (en) Verification code verification method and device
CN111030827A (en) Information interaction method and device, electronic equipment and storage medium
CN103905557A (en) Data storage method and device used for cloud environment and downloading method and device
CN103973646A (en) Method, client device and system for storing services by aid of public cloud
CN104410602A (en) Method for realizing random password keyboard based on secure element
CN106911659B (en) System, method and device for processing information of sub account number
CN110753257A (en) Data display method, display terminal, server, display system, and storage medium
CN108768938B (en) A kind of web data encryption and decryption method and device
JP2024025805A (en) Storage system download terminal, key terminal, and storage server processing encrypted file while keeping private key hidden in key terminal
CN110008654B (en) Electronic file processing method and device
CN110069933B (en) File processing method and device
CN113542187A (en) File uploading and downloading method and device, computer device and 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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230614

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871, Beijing, Haidian District, Cheng Fu Road, No. 298, Zhongguancun Fangzheng building, 9 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220218