File operation limiting method and device, electronic equipment and storage medium

By restricting and encrypting file operations in a removable storage device based on the MAC address input by the user, the problems of forgotten passwords, cumbersome operations, and high costs in electronic file protection in the existing technology are solved, and high security and convenience of files are achieved. operate.

CN118656350AActive Publication Date: 2024-09-17SHENZHEN CITY TECHWIN SEMICONDUCTOR COMPANY LIMITED
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410795129.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-09-17
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

In terms of protecting electronic files, the existing technology has problems such as passwords being easily forgotten, cumbersome operations, and high costs for additional equipment and management, making it difficult to effectively prevent illegal access and tampering.

Method used

By randomly selecting a logical address in a removable storage device, restricting file operations based on the MAC address entered by the user, generating a random encryption key and writing it to the logical address, and recording it in the file restriction logical address mapping table, file encryption and permission control are achieved. , users can decrypt and operate without entering the encryption password or decryption key.

Benefits of technology

It improves the security and confidentiality of file transmission and operation, simplifies user operations, and reduces the security risks of file transmission and sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656350A
    Figure CN118656350A
Patent Text Reader

Abstract

The invention relates to the technical field of electronic file protection, in particular to a file operation limiting method, which comprises the following steps of: randomly selecting a logic address according to a storage path of a file selected by a user; obtaining a specified MAC address input by the user based on directional operation limitation of the user on the file, and writing a second byte segment of the logic address as full 1; writing a third byte segment of the logic address as full 1 based on basic operation limitation of a user on the file; and writing the current MAC address, the authority limit, the specified MAC address input by the user and the basic control limit into a fourth byte segment of the logic address, and adding a read-write end identifier to complete file operation limit. According to the method, the mobile storage device is limited through the MAC address specified by the user, the user can decrypt the file under the condition of ensuring the data security without inputting an encryption password or a decryption key, and the security and secrecy of file propagation and file operation are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic file protection, and in particular to a file operation restriction method. Background Art

[0002] With the rapid development of information technology, especially the advancement of paperless and electronic information, electronic files have become the main form of information storage and transmission in modern society. Compared with traditional paper files, electronic files have higher flexibility, easier editing and more convenient transmission. However, it is precisely these characteristics that make the security and confidentiality of electronic files face unprecedented challenges.

[0003] As a widely used mobile storage device, ordinary USB flash drives are popular because of their convenience in carrying and ability to directly copy files. However, this feature of no object restriction and no permission restriction makes electronic files extremely vulnerable to illegal access and tampering when they are transmitted and stored through USB flash drives; in addition, due to the easy spread of USB flash drives, once files are illegally obtained, serious information leakage may occur.

[0004] In order to solve the problem of electronic file security and confidentiality, a variety of protection methods have been proposed and applied. Among them, compression encryption and separate storage are two common methods. Through compression encryption, electronic files can be packaged and passwords can be set, and only people who know the password can access the file content. However, this method has the disadvantage that the password is easy to forget. Once the password is lost, the file will not be accessible normally. In addition, the compression encryption operation is relatively cumbersome and may be difficult for users who are not familiar with computer operations.

[0005] Separate storage is a method of protecting the security of electronic files by storing them in dedicated devices or isolated environments. Although this method can effectively prevent illegal access and tampering, it requires additional storage equipment and management costs, and is not suitable for electronic files that need to be frequently transmitted and shared. Summary of the invention

[0006] In order to overcome the deficiencies of the prior art, the present application provides a file operation restriction method, which greatly improves the security and confidentiality of file dissemination and file operation.

[0007] The technical means adopted by the present invention to solve the problems of the prior art are: a file operation restriction method, the improvement of which lies in that the method comprises: randomly selecting a logical address according to the storage path of the file selected by the user; based on the directional operation restriction imposed by the user on the file, obtaining the specified MAC address input by the user, and writing the second byte segment of the logical address as all 1s; based on the basic operation restriction imposed by the user on the file, writing the third byte segment of the logical address as all 1s; after writing the current MAC address, permission restriction, the specified MAC address input by the user, and the basic operation restriction into the fourth byte segment of the logical address, adding a read-write end identifier to complete the file operation restriction.

[0008] After randomly selecting a logical address according to the storage path of the file selected by the user in the above technical solution, the method also includes: based on the encryption operation restrictions imposed by the user on the file, writing the first byte segment of the logical address as all 1s, generating a random encryption key to encrypt the file, and writing the decryption key into the fourth byte segment of the logical address.

[0009] In the above technical solution, the first byte segment, the second byte segment, the third byte segment and the fourth byte segment are all 8 bytes.

[0010] After randomly selecting a logical address according to the storage path of the file selected by the user in the above technical solution, the method also includes: recording the logical address into a file restriction logical address mapping table; the file restriction logical address mapping table is used to record the logical address of the file operation restriction.

[0011] The basic operations described in the above technical solution include: copying, deleting, and editing; the permission restrictions include copying permission, viewing permission, editing permission, and deleting permission.

[0012] In the above technical solution, the read / write end identifier includes 8 bytes of all 5 data.

[0013] In the above technical solution, the encryption key and the decryption key are symmetric keys.

[0014] The technical means adopted by the present invention to solve its technical problem is: an electronic device, comprising: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the file operation restriction method as described above.

[0015] The technical means adopted by the present invention to solve its technical problem is: a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the file operation restriction method as described above is implemented.

[0016] The beneficial effects of the present invention are: by specifying the MAC address by the user, the operating device is restricted, and the user does not need to enter the encryption password or the decryption key to decrypt the file while ensuring data security; it not only limits the transmission path, but also provides convenience for the user, greatly improving the security and confidentiality of file transmission and file operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flow chart of a file operation restriction method shown in an embodiment of the present invention;

[0018] Figure 2 A structural block diagram of a file operation restriction device according to an embodiment of the present invention;

[0019] Figure 3 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0021] The following will clearly and completely describe the concept, specific structure and technical effects of the present invention in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by technicians in this field without creative work are all within the scope of protection of the present invention. In addition, all the connection / connection relationships involved in the patent do not refer to the direct connection of components, but refer to the formation of a better connection structure by adding or reducing connection accessories according to the specific implementation situation. The various technical features in the invention can be combined interchangeably without conflicting with each other.

[0022] As mentioned above, although a variety of protection methods have been proposed and applied in the prior art, there are still problems such as cumbersome decryption and frequent operations.

[0023] Therefore, the present invention proposes a file operation restriction method, which is applied to a removable storage device, and aims to provide an electronic file protection solution that is both convenient and easy to use and safe and reliable. Figure 1 As shown, the method comprises the following steps:

[0024] Step 10: randomly select a logical address according to the storage path of the file selected by the user.

[0025] Specifically, the file is an electronic file stored in a removable storage device, and the removable storage device includes a USB flash drive, a mobile hard disk, a memory card, a solid-state hard disk, etc. In response to a user's selection instruction for the electronic file stored in the removable storage device, a logical address is randomly generated according to the electronic file.

[0026] The logical address is the address generated by the CPU (Central Processing Unit) after segment memory management. In protected mode, the CPU uses the logical address when addressing, and the operating system is responsible for converting it into a physical address and sending it to the memory bus. It mainly includes two parts: a segment identifier (or segment selector) and an offset. The segment identifier is used to select a segment in the memory, and the offset is used to determine the specific location of the data or instruction in the segment. In real mode, the logical address formed by the combination of the segment identifier and the offset directly corresponds to the physical address; in protected mode, the logical address needs to be converted into a physical address through a certain conversion mechanism (such as a paging mechanism).

[0027] In a possible implementation manner, after step 10, the method further includes:

[0028] Step 11, based on the user's encryption operation restrictions on the file, write the first byte segment of the logical address as all 1s, generate a random encryption key to encrypt the file, and write the decryption key into the fourth byte segment of the logical address.

[0029] In an exemplary embodiment, the first byte segment and the fourth byte segment are both 8 bytes.

[0030] Specifically, if the user needs to encrypt the electronic file, the first byte segment BYTE0-7 of the selected logical address is written as all 1s; then a random encryption and decryption key is generated, the electronic file selected by the user is encrypted, the encrypted file is stored in a removable storage device, and then the decryption key is written into the fourth byte segment BYTE24-31 of the logical address selected in step 10; if the user does not need to encrypt the electronic file, the electronic file is directly copied and stored in the removable storage device, and the first byte segment BYTE0-7 of the selected logical address is written as all 0s.

[0031] In a possible implementation, the encryption key and the decryption key are symmetric keys, that is, the encryption and decryption processes use the same key and algorithm. Of course, in other embodiments, in order to further improve the security of file storage, an asymmetric encryption method can also be used, which does not constitute a specific limitation here.

[0032] When the removable device is used by other terminals, it is necessary to first read the first byte segment of the logical address to determine whether the electronic file has been encrypted; if it is all 0, the file is unencrypted; if it is all 1, the file is encrypted; then decryption is performed according to the decryption key stored in the fourth byte segment of the logical address.

[0033] Through the steps, the user can decrypt the file while ensuring data security without entering an encryption password or a decryption key, which provides convenience for the user.

[0034] In another possible implementation, after step 10, the method further includes:

[0035] Step 12: Record the logical address into a file restriction logical address mapping table.

[0036] Among them, the file restriction logical address mapping table is used to record the logical address of the file operation restriction, as shown in the following table, which is a file restriction logical address mapping table shown in an embodiment of the present application.

[0037]

[0038]

[0039] As shown in the above table, each binary bit represents a different operation restriction, such as: bit0 represents the decryption restriction. When it is 0, the decryption operation cannot be performed, and when it is 1, the decryption operation can be performed; bit1 represents the copy restriction. When it is 0, the copy operation cannot be performed, and when it is 1, the copy operation can be performed; bit2 represents the editing restriction. When it is 0, the editing operation cannot be performed, and when it is 1, the editing operation can be performed; bit3 represents the deletion restriction. When it is 0, the deletion operation cannot be performed, and when it is 1, the deletion operation can be performed.

[0040] Step 20: Based on the directional operation restrictions imposed by the user on the file, obtain the specified MAC address input by the user, and write the second byte segment of the logical address as all 1s.

[0041] Specifically, if the user chooses to restrict the directional operation of the file, the second byte segment BYTE8-15 of the selected logical address is written as all 1s; if no directional operation restriction is required, BYTE8-15 of the selected logical address is written as all 0s.

[0042] When the user enters a single or multiple specified MAC addresses (each 6bBYTE) on the software of the mobile storage device of the current operating terminal, and inserts the mobile storage device into another terminal to perform file operations, the device will first read the MAC address of the current computer, and then compare the MAC address recorded in the device with the MAC address of the current computer. If the comparison is consistent, basic file operations can be performed on the current computer.

[0043] Step 30: Based on the basic operation restrictions imposed by the user on the file, the third byte segment of the logical address is written as all 1s.

[0044] Specifically, the basic operations include copying, deleting, and editing.

[0045] If the user does not need to perform basic operation restrictions, the third byte segment BYTE16-23 of the selected logical address is written as all 0s; if the user needs to perform basic operation restrictions, the third byte segment BYTE16-23 of the selected logical address is written as all 1s.

[0046] Step 40, after writing the current MAC address, permission restrictions, the specified MAC address input by the user, and the basic operation restrictions into the fourth byte segment of the logical address, add a read-write end identifier to complete the file operation restrictions.

[0047] The permission restrictions include copy permission, viewing permission, editing permission, and deletion permission.

[0048] The MAC address (6BYTE) + permission restriction (2BYTE) of the current terminal, as well as the MAC address (6BYTE) entered by the user + the basic operation restriction (2BYTE) set by the user, are written into the logical block starting from the fourth byte segment BYTE24 of the selected logical address; finally, the end mark is written into the logical data block as a read-write end identifier.

[0049] In a possible implementation, the read / write identifier includes 8 bytes of all-5 data.

[0050] In an exemplary embodiment, if the user encrypts the electronic file, performs directional operation restrictions, and enters 20 MAC addresses, taking the random address of 0x00010000 as an example, but not specifically limited to this, the logical address is:

[0051]

[0052] When the user needs to operate a file in the removable storage device in another terminal, in response to the user's operation on the file, the file restriction logical address mapping table is read, and data is read according to the recorded corresponding logical address.

[0053] First, read the first byte segment BYTE0-7 of the logical address to determine whether the file has been encrypted; if it is all 0, the file is not encrypted; if it is all 1, the file is encrypted, then it is necessary to read the fourth byte segment BYTE24-31 of the logical address to obtain the file decryption key;

[0054] Then, the second byte segment BYTE8-15 of the logical address is read to determine whether the file is restricted from directional operations. If the data is all 0, it means that there is no restriction on directional operations, and no MAC address comparison is required. If it is all 1, it means that the file is restricted from directional operations, and a MAC address comparison is required. Only when the comparison is consistent can the file be operated.

[0055] Then, the third byte segment BYTE16-23 of the logical address is read to determine whether basic operation restrictions are imposed on the file. If all 0s are present, it means that basic operation restrictions are imposed. The operation restrictions of the file are obtained by reading the specified data bits. If all 1s are present, it means that basic operation restrictions are not imposed on the file and all operation permissions are granted. In other cases, the default operation restriction of the file is no operation permission.

[0056] Then, the data blocks of the MAC address written by the user are read in sequence from the BYTE32 byte of the logical address; the read MAC address data is compared with the MAC address of the current terminal; if the comparison is consistent, the operation items that the user can perform are displayed according to the operation restrictions of the last 2 bytes; if the comparison is inconsistent, the next MAC address data is read until the end mark is read. If the comparison is still not successful after the end mark is read, the file cannot be operated in any way on the current terminal, and a prompt is given on the interface.

[0057] It is worth mentioning that the first byte segment, the second byte segment, the third byte segment and the fourth byte segment are all 8 bytes. In other feasible implementations, the byte segment may also be less bytes or more bytes, which is not specifically limited here.

[0058] Through the above embodiments, the present invention realizes the technology of directional operation of files; the operation terminal is restricted by the user specifying the MAC address, and the user does not need to enter the encryption password or the decryption key to decrypt the file under the condition of ensuring data security; it not only limits the transmission path, but also provides convenience for the user; at the same time, the operation authority of the file can be restricted, which greatly improves the security and confidentiality of file transmission and file operation.

[0059] The following is an embodiment of the device of the present application, which can be used to execute the file operation restriction method involved in the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the method embodiment of the file operation restriction method involved in the present application.

[0060] See also Figure 2 The present application provides a file operation restriction device 50, including an address selection module 501, a directional restriction module 502, a basic restriction 503, and a restriction end module 504.

[0061] Wherein, the address selection module 501 is used to randomly select a logical address according to the storage path of the file selected by the user;

[0062] A directional restriction module 502, configured to obtain a specified MAC address input by a user based on the directional operation restriction performed by the user on the file, and write the second byte segment of the logical address as all 1s;

[0063] A basic restriction module 503, configured to write the third byte segment of the logical address as all 1s based on the basic operation restriction of the user on the file;

[0064] The restriction end module 504 is used to write the current MAC address, permission restrictions, the specified MAC address input by the user, and the basic operation restrictions into the fourth byte segment of the logical address, and then add a read-write end identifier to complete the file operation restriction.

[0065] It should be noted that the file operation restriction device provided in the above embodiment only uses the division of the above functional modules as an example when performing file operation restrictions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the file operation restriction device will be divided into different functional modules to complete all or part of the functions described above. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0066] In addition, the file operation restriction device and the file operation restriction method provided in the above embodiments belong to the same concept, and the specific manner in which each module performs the operation has been described in detail in the method embodiments, which will not be repeated here.

[0067] See also Figure 3 In an embodiment of the present application, an electronic device 4000 is provided, and the electronic device 4000 may be a USB flash drive, a mobile hard disk, a memory card, a solid state hard disk, etc.

[0068] exist Figure 3In the embodiment, the data interaction between the processor 4001 and the memory 4003 can be realized through at least one communication bus 4002. The communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0069] Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0070] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The memory 4003 can be a ROM (Read On Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read On Memory), a CD-ROM (Compact Disk Read On Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program instructions or codes in the form of instructions or data structures and can be accessed by the electronic device 400, but is not limited to this.

[0071] The memory 4003 stores program instructions or codes, and the processor 4001 can read the program instructions or codes stored in the memory 4003 through the communication bus 4002 .

[0072] When the program instruction or code is executed by the processor 4001, the file operation restriction method in the above-mentioned embodiments is implemented.

[0073] In addition, an embodiment of the present application provides a storage medium on which program instructions or codes are stored. The program instructions or codes are loaded and executed by a processor to implement the file operation restriction method as described above.

[0074] In an embodiment of the present application, a computer program product is provided. The computer program product includes program instructions or codes. The program instructions or codes are stored in a storage medium. A processor of an electronic device reads the program instructions or codes from the storage medium, loads and executes the program instructions or codes, so that the electronic device implements the file operation restriction method as described above.

[0075] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A file operation restriction method, characterized in that: The method comprises: Randomly select a logical address based on the storage path of the file selected by the user; Based on the directional operation restriction imposed by the user on the file, obtain the specified MAC address input by the user, and write the second byte segment of the logical address as all 1s; Based on the basic operation restrictions of the user on the file, the third byte segment of the logical address is written as all 1s; After writing the current MAC address, permission restrictions, the specified MAC address input by the user, and basic operation restrictions into the fourth byte segment of the logical address, a read-write end identifier is added to complete the file operation restrictions.

2. The file operation restriction method according to claim 1, characterized in that: After randomly selecting a logical address according to the storage path of the file selected by the user, the method further includes: Based on the encryption operation restrictions imposed by the user on the file, the first byte segment of the logical address is written as all 1s, and a random encryption key is generated to encrypt the file, and the decryption key is written into the fourth byte segment of the logical address.

3. The file operation restriction method according to claim 2, characterized in that: The first byte segment, the second byte segment, the third byte segment and the fourth byte segment are all 8 bytes.

4. The file operation restriction method according to claim 1, characterized in that: After randomly selecting a logical address according to the storage path of the file selected by the user, the method further includes: The logical address is recorded in a file restriction logical address mapping table; the file restriction logical address mapping table is used to record the logical address of the file operation restriction.

5. The file operation restriction method according to claim 1, characterized in that: The basic operations include: copy, delete, and edit; the permission restrictions include copy permission, view permission, edit permission, and delete permission.

6. The file operation restriction method according to claim 1, characterized in that: The read / write end identifier includes 8 bytes of all-5 data.

7. The file operation restriction method according to claim 2, characterized in that: The encryption key and decryption key are symmetric keys.

8. A file operation restriction device, characterized in that: include: An address selection module is used to randomly select a logical address according to the storage path of the file selected by the user; A directional restriction module, used for obtaining a specified MAC address input by a user based on the directional operation restriction performed by the user on the file, and writing the second byte segment of the logical address as all 1s; A basic restriction module, used for writing the third byte segment of the logical address as all 1s based on the basic operation restriction of the user on the file; The restriction end module is used to write the current MAC address, permission restrictions, the specified MAC address input by the user, and the basic operation restrictions into the fourth byte segment of the logical address, and then add a read-write end identifier to complete the file operation restriction.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the file operation restriction method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the file operation restriction method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Intelligent card hardware firewall system and realizing method thereof

    CN103136124A

  • A single-disk multi-user physical isolation method based on address mapping

    CN109815737A

  • Analysis and extraction method of BTRFS file system data based on copy-on-write

    CN112650718A

  • Encryption method and device, decryption method and device and storage medium

    CN116244715A

  • Data processing method and device, computer equipment and readable storage medium

    CN117520213A