A file exchange method based on file exchange cabinet
Through blockchain technology, a cloud service platform is built, and files are uploaded and downloaded on file swap cabinets are uploaded and downloaded on file swap cabinets, solving the security problems of online file swap cabinets and achieving efficient, secure and irreversible file transmission and storage.
Patent Information
- Application Number
- CN202410315576.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-03-19
AI Technical Summary
Online file exchange cabinets have security problems such as data being hacked, virus infection or unauthorized access, resulting in file leakage or damage. How to protect the confidentiality and integrity of files through appropriate security measures is an urgent problem.
Through blockchain technology, users upload and download files on file exchange cabinets, and generate encrypted data packets through asymmetric encryption algorithms and hash functions, using the decentralization and irreversibility characteristics of blockchain to ensure that File security and immutability.
Users can customize and set specific parameters of file transfer to improve work efficiency and ensure file security and compliance. Blockchain technology combined with file swap cabinets significantly improves the confidentiality and integrity of file transfer and storage, and prevents data tampering. and unauthorized access.
Smart Images

Figure CN118432846B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of file exchange cabinets, in particular to a file exchange method based on a file exchange cabinet. Background Art
[0002] The prior art CN114511362A "A method for processing city nodes for issuing electronic invoices based on edge computing" includes a client system, a tax bureau system, an electronic invoice city node and a cloud monitoring and management console. The electronic invoice city node includes a cabinet, and the cabinet is equipped with a switch, a router, a file storage, a tax control server, a stamp and format file generation server and a cloud hardware server. The switch and the router are used for network communication, and the file storage is used for long-term preservation of historical data. The advantage of the present invention is that for users, the electronic invoice city node is just a machine that can be remotely monitored in the local computer room. In addition to providing power supply, the user does not need to do too much maintenance work. From the deployment and initialization operation of the system to the later maintenance alarm, there is basically no need for customer participation. Most of them are monitored and managed through the remote cloud, which not only reduces cloud communication, but also reduces the maintenance workload of the local computer room.
[0003] The prior art CN104199647A "A visualization system and implementation method based on IBM mainframe" includes a client, a development platform kit with integrated banking business functions, providing a variety of visualization controls, and generating resource files through specific action methods; a front-end system before the counter, which is used for user login to process transactions and communicate with the mainframe to exchange data; the front-end system before the counter also includes: a server, which has a server component integrated in the front-end system before the counter, and the server is used to provide the function of generating visualization pages, parse and compile the received resource files, and compile and parse the public code and data dictionary from the mainframe. By adopting a visualization system based on the core system of the bank, the problems of low integration of development tools of the current core system of the bank, low development efficiency, and difficulty in expanding and managing data are effectively solved.
[0004] As 24-hour self-service office is becoming increasingly popular in government halls, smart file exchange cabinets have played an important role. File exchange cabinets have the functions of networking, receiving and sending documents, and password verification code notification. At the same time, their usage records can be queried online and usage permissions can be managed. Because they use a combination of intelligent control systems and cabinets, they can be called smart file exchange cabinets.
[0005] An online file exchange cabinet is a network service for conveniently and securely exchanging files. It provides an online platform for users to upload, download and share files. Users can upload their own files to the online file exchange cabinet, or download files shared by other users. The online file exchange cabinet allows users to share files among multiple people, thus facilitating team collaboration and file sharing. At the same time, online file exchange cabinets also have security issues such as data being hacked, infected by viruses or unauthorized access, which may lead to file leakage or damage. How to protect the confidentiality and integrity of files through appropriate security measures is an urgent problem that we need to solve. Now we provide a file exchange method based on a file exchange cabinet. Summary of the invention
[0006] In order to solve the above technical problems, the object of the present invention is to provide a file exchange method based on a file exchange cabinet, comprising the following steps:
[0007] Step S1: constructing a cloud service platform through blockchain technology, wherein the cloud service platform is linked to a number of blockchain nodes, and the blockchain nodes are deployed on file exchange cabinets within a preset range, and users perform file upload operations and file download operations and set specific parameters for file upload operations through the file exchange cabinets;
[0008] Step S2: when the user selects the file upload operation, completes the copying of the file data in the file exchange cabinet and the setting of the specific parameters of the file upload operation, the file data copied in the file exchange cabinet is copied, the mirror file data is obtained, and the authorization encryption operation is performed on the mirror file data according to the specific parameters of the file upload operation, and then the system encryption operation is performed on the mirror file data to generate an encrypted data packet of the mirror file data;
[0009] Step S3: Obtain the encrypted data packets of each mirror file data that has completed the system encryption operation and needs to perform the data uplink operation and the link bandwidth between the data uplink end of the current file exchange cabinet and the cloud service platform, compare the bandwidth occupied by the encrypted data packets of each mirror file data with the link bandwidth, and schedule the encrypted data packets of the mirror file data that needs to perform the data uplink operation according to the comparison result;
[0010] Step S4: Data verification is performed on the encrypted data packets of the image file data uploaded to the cloud service platform, the decrypted data of the image file data that has passed the data verification is packaged into a new block, and the new block is verified according to the preset verification rules and consensus mechanism. After the verification of the new block is passed, the block is put on the chain and the blockchain network status is updated;
[0011] Step S5: When the user selects a file download operation, the user enters the user ID of the file data to be downloaded into the file exchange cabinet, and the file download operation is performed according to the user's access level and specific parameters of the file data to be downloaded.
[0012] Furthermore, the cloud service platform is communicatively linked to a number of blockchain nodes, the blockchain nodes are deployed on file exchange cabinets within a preset range, and each blockchain node is linked to each other to form a blockchain network;
[0013] The file exchange cabinet is provided with a login interface, an operation interface, a data uplink terminal and a local database. The user enters the user ID and password through the login interface to log in to the operation interface. The user performs file upload and file download operations and sets specific parameters for the file upload operation through the operation interface. The specific parameters include file transfer priority, whether to authorize encrypted transmission, authorized user ID and access permission level. The local database is used to store file data uploaded by all users, and the data uplink terminal is used to upload file data to the cloud service platform to perform data uplink operations.
[0014] Further, the image file data is authorized and encrypted according to the specific parameters of the file upload operation, and then the image file data is encrypted by the system to generate an encrypted data packet of the image file data, including:
[0015] The cloud service platform presets a first asymmetric key pair for encryption of each user ID and a second asymmetric key pair for encryption of each file exchange cabinet through an asymmetric encryption algorithm, wherein the asymmetric key pair includes a public key and a private key;
[0016] According to the specific parameters of the file upload operation set by the user, it is determined whether the file data is authorized for encrypted transmission. If the file data is authorized for encrypted transmission, the authorized user ID and the first public key of the authorized user ID are obtained according to the specific parameters of the file upload operation set by the user, the image file data of the user is converted into binary data, and the binary data is encrypted using the first public key of the authorized user ID to generate ciphertext data. For example, if the asymmetric encryption algorithm used in the present invention is the RSA algorithm, the cloud service platform presets the RSA key pair for encryption of each user ID and the RSA key pair for encryption of each file exchange cabinet through the RSA algorithm, divides the image file data to be transmitted into appropriate data blocks and converts them into binary data, and according to the RSA algorithm, the RSA key pair for encryption of each user ID and the RSA key pair for encryption of each file exchange cabinet are preset, and the image file data to be transmitted is divided into appropriate data blocks and converted into binary data. The limitation of the SA algorithm is that the length of the plaintext data cannot exceed the length of the public key. Each data block of the image file data is encrypted using the RSA encryption algorithm and the RSA key to generate a corresponding ciphertext data block. The encrypted ciphertext data blocks are combined together to form complete ciphertext data, and then the first private key of the user ID is obtained. The ciphertext data is encrypted according to the first private key to generate twice-encrypted ciphertext data. Then the second private key of the file exchange cabinet logged by the user is obtained, and the hash function is applied to the ciphertext data to obtain the hash value of the ciphertext data. The hash value of the ciphertext data is encrypted by the second private key to generate a digital signature of the ciphertext data. Then the ciphertext data and the digital signature are packaged to generate an encrypted data packet of the user's image file data;
[0017] If the file data is transmitted unencrypted, the user's mirror file data is converted into binary data, the first private key of the user ID is obtained, the ciphertext data is encrypted according to the first private key to generate ciphertext data, and then the second private key of the file exchange cabinet that the user logs in to is obtained, and a hash function is applied to the ciphertext data to obtain the hash value of the ciphertext data. The hash value of the ciphertext data is encrypted by the second private key of the file exchange cabinet to generate a digital signature for the ciphertext data, and then the ciphertext data and the digital signature are packaged to generate an encrypted data packet of the user's mirror file data.
[0018] Furthermore, the process of comparing the bandwidth occupied by the encrypted data packets of each image file data with the link bandwidth, and scheduling the encrypted data packets of the image file data that need to perform the data uplink operation according to the comparison result includes:
[0019] Obtaining the occupied bandwidth of each encrypted data packet of the image file data and the sum of the occupied bandwidths of the encrypted data packets of each image file data, and comparing the sum of the bandwidths with the link bandwidth;
[0020] If the total bandwidth is greater than the link bandwidth, then obtain the specific parameters of the file upload operation set by the user to which each mirror file data belongs, obtain the file transfer priority of the encrypted data packet of each mirror file data according to the specific parameters, sort the chaining order of each encrypted data packet according to the file transfer priority of each encrypted data packet, and build a chaining sorting queue. The higher the file transfer priority, the higher the ranking of the chaining sorting queue. According to the sorting result in the chaining sorting queue, the data chaining operation of the encrypted data packet is performed in sequence, and at the same time, the waiting time of each encrypted data packet waiting for the data chaining operation in the chaining sorting queue is obtained, and the dynamic priority of each encrypted data packet waiting for the data chaining operation in the chaining sorting queue is set according to the occupied bandwidth and waiting time of each encrypted data packet. According to the dynamic priority, each encrypted data packet waiting for the data chaining operation in the chaining sorting queue is dynamically sorted until all encrypted data packets in the chaining sorting queue complete the data chaining operation;
[0021] If the total bandwidth is less than or equal to the link bandwidth, the data uplink operation is performed on the encrypted data packets of all image file data at the same time.
[0022] Furthermore, the calculation formula for setting the dynamic priority of each encrypted data packet waiting for data uplink operation in the uplink sorting queue according to the occupied bandwidth and waiting time of each encrypted data packet is:
[0023]
[0024] Among them, P i represents the dynamic priority of the i-th encrypted data packet, Z i represents the file transfer priority of the i-th encrypted data packet, T i represents the waiting time of the i-th encrypted data packet, W i Indicates the occupied bandwidth of the i-th encrypted data packet.
[0025] The beneficial effects of setting dynamic priority through the above calculation formula are:
[0026] For two encrypted data packets with the same file transfer priority, when the waiting time of the two encrypted data packets is the same, the encrypted data packet that occupies less bandwidth has a higher dynamic priority, so that the encrypted data packet that occupies less bandwidth can be executed first;
[0027] On the other hand, when two encrypted data packets occupy the same bandwidth, the longer the waiting time of the encrypted data packet, the higher the dynamic priority of the encrypted data packet. This takes into account the encrypted data packet that occupies a large bandwidth, because the dynamic priority of the encrypted data packet can be increased with the increase of waiting time. When its waiting time is long enough, its dynamic priority can be raised to a very high level, thereby obtaining the opportunity to upload data to the chain.
[0028] Furthermore, the process of verifying the encrypted data packet of the image file data uploaded to the cloud service platform includes:
[0029] Obtain the user and file exchange cabinet to which the encrypted data packet of the image file data uploaded to the cloud service platform belongs, obtain the second public key of the file exchange cabinet and the first public key of the user, obtain the ciphertext data and digital signature of the image file data according to the encrypted data packet, decrypt the ciphertext data by the second public key of the file exchange cabinet to obtain the decrypted data, apply the hash function to the decrypted data to obtain the hash value of the decrypted data, then decrypt the data signature by the first public key of the user to obtain the hash value, match the hash value with the hash value of the decrypted data for consistency, if the hash values of the two are consistent, temporarily store the decrypted data in the transaction pool of the cloud service platform, if the hash values of the two are inconsistent, discard the decrypted data, and feedback the data verification failure information to the file exchange cabinet.
[0030] Furthermore, the decrypted data of the image file data that has passed the data verification is packaged into a new block, and the new block is verified according to the preset verification rules and consensus mechanism. After the new block is verified, the process of performing block chaining and blockchain network status update operations includes:
[0031] The mining nodes of the blockchain network are preset through the cloud server platform. The mining nodes are used to select decrypted data in the transaction pool, package and create a new block, and broadcast the new block to the blockchain network. Other blockchain nodes in the blockchain network verify the new block based on preset verification rules and consensus mechanism;
[0032] After the new block is verified, it is added to the end of the blockchain, and the decrypted data of the new block is updated to the blockchain copies of all blockchain nodes.
[0033] Furthermore, the process of performing the file download operation according to the user's access level and the specific parameters of the file data to be downloaded includes:
[0034] The user inputs the user ID of the file data to be downloaded into the file exchange cabinet, obtains the specific parameters set by the user ID of the file data to be downloaded, the specific parameters include whether the encrypted transmission is authorized, the authorized user ID and the access permission level, and determines whether the file data to be downloaded is authorized for encrypted transmission according to the specific parameters. If the file data to be downloaded is authorized for encrypted transmission, determine whether the authorized user ID is consistent with the user's ID. If they are inconsistent, feedback authorization mismatch information to the user. If they are consistent, obtain the decrypted data of the file data to be downloaded from the blockchain copy deployed on the blockchain node of the file exchange cabinet, and then obtain the first private key of the user ID, decrypt the decrypted data by using the first private key of the user ID, and obtain the file data to be downloaded;
[0035] If the file data to be downloaded is transmitted in an unauthorized encrypted manner, the authorization level of the file data to be downloaded is obtained according to specific parameters, and the user's access level is obtained at the same time. The user's access level is compared with the authorization level of the file data to be downloaded. If the user's access level is greater than or equal to the authorization level, the file data to be downloaded is obtained from the blockchain copy on the blockchain node deployed in the file exchange cabinet. If the user's access level is less than the authorization level, the insufficient access level information is fed back to the user.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] 1. When transferring files, users can customize specific parameters of file transfer, such as whether to transfer encrypted files, setting transfer priority, etc., and make corresponding settings as needed to improve work efficiency and ensure file security and compliance.
[0038] 2. Build a cloud service platform through blockchain technology. The cloud service platform has several blockchain nodes in communication link. The blockchain nodes are deployed on file exchange cabinets within a preset range. The file transfer and storage are combined with blockchain technology. Since blockchain is a decentralized distributed ledger, data is stored on many nodes of the network, rather than concentrated on a single centralized server. This means that to change a transaction or a piece of data, it is necessary to change the data on all nodes on the entire network at the same time, which is almost impossible. Once the data is added to the blockchain and a certain number of confirmations (i.e., multiple blocks on the blockchain are linked), the data will be considered irreversible. Because of the working mechanism of the blockchain, new blocks will continue to link to previous blocks to form a growing "chain". Each block contains the hash value of the previous block, which makes the tampering of the data immediately detected. The file exchange cabinet is combined with the advantages of blockchain such as distribution, decentralization, irreversibility and cryptographic hashing to ensure the security and non-tamperability of the file data of the file exchange cabinet, and significantly improve the confidentiality and integrity of file transmission and storage. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a schematic diagram of a file exchange method based on a file exchange cabinet according to an embodiment of the present application. DETAILED DESCRIPTION
[0040] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0041] In the specific implementation process, Figure 1 As shown, a file exchange method based on a file exchange cabinet comprises the following steps:
[0042] Step S1: constructing a cloud service platform through blockchain technology, wherein the cloud service platform is linked to a number of blockchain nodes, and the blockchain nodes are deployed on file exchange cabinets within a preset range, and users perform file upload operations and file download operations and set specific parameters for file upload operations through the file exchange cabinets;
[0043] Step S2: when the user selects the file upload operation, completes the copying of the file data in the file exchange cabinet and the setting of the specific parameters of the file upload operation, the file data copied in the file exchange cabinet is copied, the mirror file data is obtained, and the authorization encryption operation is performed on the mirror file data according to the specific parameters of the file upload operation, and then the system encryption operation is performed on the mirror file data to generate an encrypted data packet of the mirror file data;
[0044] Step S3: Obtain the encrypted data packets of each mirror file data that has completed the system encryption operation and needs to perform the data uplink operation and the link bandwidth between the data uplink end of the current file exchange cabinet and the cloud service platform, compare the bandwidth occupied by the encrypted data packets of each mirror file data with the link bandwidth, and schedule the encrypted data packets of the mirror file data that needs to perform the data uplink operation according to the comparison result;
[0045] Step S4: Data verification is performed on the encrypted data packets of the image file data uploaded to the cloud service platform, the decrypted data of the image file data that has passed the data verification is packaged into a new block, and the new block is verified according to the preset verification rules and consensus mechanism. After the verification of the new block is passed, the block is put on the chain and the blockchain network status is updated;
[0046] Step S5: When the user selects a file download operation, the user enters the user ID of the file data to be downloaded into the file exchange cabinet, and the file download operation is performed according to the user's access level and specific parameters of the file data to be downloaded.
[0047] It should be further explained that, in the specific implementation process, a cloud service platform is constructed using blockchain technology, and the cloud service platform is linked to a number of blockchain nodes, which are deployed on file exchange cabinets within a preset range, and each blockchain node is linked to each other to form a blockchain network;
[0048] The file exchange cabinet is provided with a login interface, an operation interface, a data uplink terminal and a local database. The user enters the user ID and password through the login interface to log in to the operation interface. The user performs file upload and file download operations and sets specific parameters for the file upload operation through the operation interface. The specific parameters include file transfer priority, whether to authorize encrypted transmission, authorized user ID and access permission level. The local database is used to store file data uploaded by all users, and the data uplink terminal is used to upload file data to the cloud service platform to perform data uplink operations.
[0049] It should be further explained that, in the specific implementation process, the image file data is authorized to be encrypted according to the specific parameters of the file upload operation, and then the image file data is encrypted by the system. The process of generating an encrypted data packet of the image file data includes:
[0050] The cloud service platform presets a first asymmetric key pair for encryption of each user ID and a second asymmetric key pair for encryption of each file exchange cabinet through an asymmetric encryption algorithm, wherein the asymmetric key pair includes a public key and a private key;
[0051] According to the specific parameters of the file upload operation set by the user, it is determined whether the file data is authorized for encrypted transmission. If the file data is authorized for encrypted transmission, the authorized user ID and the first public key of the authorized user ID are obtained according to the specific parameters of the file upload operation set by the user, the image file data of the user is converted into binary data, and the binary data is encrypted using the first public key of the authorized user ID to generate ciphertext data. For example, if the asymmetric encryption algorithm used in the present invention is the RSA algorithm, the cloud service platform presets the RSA key pair for encryption of each user ID and the RSA key pair for encryption of each file exchange cabinet through the RSA algorithm, divides the image file data to be transmitted into appropriate data blocks and converts them into binary data, and according to the RSA algorithm, the RSA key pair for encryption of each user ID and the RSA key pair for encryption of each file exchange cabinet are preset, and the image file data to be transmitted is divided into appropriate data blocks and converted into binary data. The limitation of the SA algorithm is that the length of the plaintext data cannot exceed the length of the public key. Each data block of the image file data is encrypted using the RSA encryption algorithm and the RSA key to generate a corresponding ciphertext data block. The encrypted ciphertext data blocks are combined together to form complete ciphertext data, and then the first private key of the user ID is obtained. The ciphertext data is encrypted according to the first private key to generate twice-encrypted ciphertext data. Then the second private key of the file exchange cabinet logged by the user is obtained, and the hash function is applied to the ciphertext data to obtain the hash value of the ciphertext data. The hash value of the ciphertext data is encrypted by the second private key to generate a digital signature of the ciphertext data. Then the ciphertext data and the digital signature are packaged to generate an encrypted data packet of the user's image file data;
[0052] If the file data is transmitted unencrypted, the user's mirror file data is converted into binary data, the first private key of the user ID is obtained, the ciphertext data is encrypted according to the first private key to generate ciphertext data, and then the second private key of the file exchange cabinet that the user logs in to is obtained, and a hash function is applied to the ciphertext data to obtain the hash value of the ciphertext data. The hash value of the ciphertext data is encrypted by the second private key of the file exchange cabinet to generate a digital signature for the ciphertext data, and then the ciphertext data and the digital signature are packaged to generate an encrypted data packet of the user's mirror file data.
[0053] It should be further explained that, in the specific implementation process, the bandwidth occupied by the encrypted data packets of each image file data is compared with the link bandwidth, and the process of scheduling the encrypted data packets of the image file data that need to perform the data uplink operation according to the comparison result includes:
[0054] Obtaining the occupied bandwidth of each encrypted data packet of the image file data and the sum of the occupied bandwidths of the encrypted data packets of each image file data, and comparing the sum of the bandwidths with the link bandwidth;
[0055] If the total bandwidth is greater than the link bandwidth, then obtain the specific parameters of the file upload operation set by the user to which each mirror file data belongs, obtain the file transfer priority of the encrypted data packet of each mirror file data according to the specific parameters, sort the chaining order of each encrypted data packet according to the file transfer priority of each encrypted data packet, and build a chaining sorting queue. The higher the file transfer priority, the higher the ranking of the chaining sorting queue. According to the sorting result in the chaining sorting queue, the data chaining operation of the encrypted data packet is performed in sequence, and at the same time, the waiting time of each encrypted data packet waiting for the data chaining operation in the chaining sorting queue is obtained, and the dynamic priority of each encrypted data packet waiting for the data chaining operation in the chaining sorting queue is set according to the occupied bandwidth and waiting time of each encrypted data packet. According to the dynamic priority, each encrypted data packet waiting for the data chaining operation in the chaining sorting queue is dynamically sorted until all encrypted data packets in the chaining sorting queue complete the data chaining operation;
[0056] If the total bandwidth is less than or equal to the link bandwidth, the data uplink operation is performed on the encrypted data packets of all image file data at the same time.
[0057] It should be further explained that, in the specific implementation process, the calculation formula for setting the dynamic priority of each encrypted data packet waiting for data uplink operation in the uplink sorting queue according to the occupied bandwidth and waiting time of each encrypted data packet is:
[0058]
[0059] Among them, P i represents the dynamic priority of the i-th encrypted data packet, Z i represents the file transfer priority of the i-th encrypted data packet, T i represents the waiting time of the i-th encrypted data packet, W i Indicates the occupied bandwidth of the i-th encrypted data packet.
[0060] The beneficial effects of setting dynamic priority through the above calculation formula are:
[0061] For two encrypted data packets with the same file transfer priority, when the waiting time of the two encrypted data packets is the same, the encrypted data packet that occupies less bandwidth has a higher dynamic priority, so that the encrypted data packet that occupies less bandwidth can be executed first;
[0062] On the other hand, when two encrypted data packets occupy the same bandwidth, the longer the waiting time of the encrypted data packet, the higher the dynamic priority of the encrypted data packet. This takes into account the encrypted data packet that occupies a large bandwidth, because the dynamic priority of the encrypted data packet can be increased with the increase of waiting time. When its waiting time is long enough, its dynamic priority can be raised to a very high level, thereby obtaining the opportunity to upload data to the chain.
[0063] It should be further explained that, in the specific implementation process, the process of data verification of the encrypted data packet of the image file data uploaded to the cloud service platform includes:
[0064] Obtain the user and file exchange cabinet to which the encrypted data packet of the image file data uploaded to the cloud service platform belongs, obtain the second public key of the file exchange cabinet and the first public key of the user, obtain the ciphertext data and digital signature of the image file data according to the encrypted data packet, decrypt the ciphertext data by the second public key of the file exchange cabinet to obtain the decrypted data, apply the hash function to the decrypted data to obtain the hash value of the decrypted data, then decrypt the data signature by the first public key of the user to obtain the hash value, match the hash value with the hash value of the decrypted data for consistency, if the hash values of the two are consistent, temporarily store the decrypted data in the transaction pool of the cloud service platform, if the hash values of the two are inconsistent, discard the decrypted data, and feedback the data verification failure information to the file exchange cabinet.
[0065] It should be further explained that, in the specific implementation process, the decrypted data of the image file data that has passed the data verification is packaged into a new block, and the new block is verified according to the preset verification rules and consensus mechanism. After the new block is verified, the process of uploading the block to the chain and updating the blockchain network status includes:
[0066] The mining nodes of the blockchain network are preset through the cloud server platform. The mining nodes are used to select decrypted data in the transaction pool, package and create a new block, and broadcast the new block to the blockchain network. Other blockchain nodes in the blockchain network verify the new block based on preset verification rules and consensus mechanism;
[0067] After the new block is verified, it is added to the end of the blockchain, and the decrypted data of the new block is updated to the blockchain copies of all blockchain nodes.
[0068] It should be further explained that, in a specific implementation process, the process of performing the file download operation according to the user's access level and the specific parameters of the file data to be downloaded includes:
[0069] The user inputs the user ID of the file data to be downloaded into the file exchange cabinet, obtains the specific parameters set by the user ID of the file data to be downloaded, the specific parameters include whether the encrypted transmission is authorized, the authorized user ID and the access permission level, and determines whether the file data to be downloaded is authorized for encrypted transmission according to the specific parameters. If the file data to be downloaded is authorized for encrypted transmission, determine whether the authorized user ID is consistent with the user's ID. If they are inconsistent, feedback authorization mismatch information to the user. If they are consistent, obtain the decrypted data of the file data to be downloaded from the blockchain copy deployed on the blockchain node of the file exchange cabinet, and then obtain the first private key of the user ID, decrypt the decrypted data by using the first private key of the user ID, and obtain the file data to be downloaded;
[0070] If the file data to be downloaded is transmitted in an unauthorized encrypted manner, the authorization level of the file data to be downloaded is obtained according to specific parameters, and the user's access level is obtained at the same time. The user's access level is compared with the authorization level of the file data to be downloaded. If the user's access level is greater than or equal to the authorization level, the file data to be downloaded is obtained from the blockchain copy on the blockchain node deployed in the file exchange cabinet. If the user's access level is less than the authorization level, the insufficient access level information is fed back to the user.
[0071] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A file exchange method based on a file exchange cabinet, characterized in that: The following steps are included Step S1: constructing a cloud service platform through blockchain technology, wherein the cloud service platform is linked to a number of blockchain nodes, and the blockchain nodes are deployed on file exchange cabinets within a preset range, and users perform file upload operations and file download operations and set specific parameters for file upload operations through the file exchange cabinets; Step S2: when the user selects the file upload operation, completes the copying of the file data in the file exchange cabinet and the setting of the specific parameters of the file upload operation, the file data copied in the file exchange cabinet is copied, the mirror file data is obtained, and the authorization encryption operation is performed on the mirror file data according to the specific parameters of the file upload operation, and then the system encryption operation is performed on the mirror file data to generate an encrypted data packet of the mirror file data; The process of performing an authorization encryption operation on the image file data according to the specific parameters of the file upload operation and then performing a system encryption operation on the image file data to generate an encrypted data packet of the image file data includes: The cloud service platform presets a first asymmetric key pair for encryption of each user ID and a second asymmetric key pair for encryption of each file exchange cabinet through an asymmetric encryption algorithm, wherein the asymmetric key pair includes a public key and a private key; Determine whether the file data is authorized encrypted transmission according to the specific parameters of the file upload operation set by the user. If the file data is authorized encrypted transmission, obtain the authorized user ID and the first public key of the authorized user ID according to the specific parameters of the file upload operation set by the user, convert the user's mirror file data into binary data, encrypt the binary data using the first public key of the authorized user ID to generate ciphertext data, then obtain the first private key of the user ID, encrypt the ciphertext data according to the first private key to generate double-encrypted ciphertext data, then obtain the second private key of the file exchange cabinet logged in by the user, apply a hash function to the ciphertext data, obtain the hash value of the ciphertext data, encrypt the hash value of the ciphertext data by the second private key, generate a digital signature for the ciphertext data, then package the ciphertext data and the digital signature to generate an encrypted data packet for the user's mirror file data; If the file data is transmitted in an unencrypted manner, the user's image file data is converted into binary data, the first private key of the user ID is obtained, the ciphertext data is encrypted according to the first private key to generate the ciphertext data, and then the second private key of the file exchange cabinet logged in by the user is obtained, a hash function is applied to the ciphertext data to obtain the hash value of the ciphertext data, the hash value of the ciphertext data is encrypted by the second private key of the file exchange cabinet, a digital signature of the ciphertext data is generated, and then the ciphertext data and the digital signature are packaged to generate an encrypted data packet of the user's image file data; Step S3: Obtain the encrypted data packets of each mirror file data that has completed the system encryption operation and needs to perform the data uplink operation and the link bandwidth between the data uplink end of the current file exchange cabinet and the cloud service platform, compare the bandwidth occupied by the encrypted data packets of each mirror file data with the link bandwidth, and schedule the encrypted data packets of the mirror file data that needs to perform the data uplink operation according to the comparison result; Step S4: Data verification is performed on the encrypted data packets of the image file data uploaded to the cloud service platform, the decrypted data of the image file data that has passed the data verification is packaged into a new block, and the new block is verified according to the preset verification rules and consensus mechanism. After the verification of the new block is passed, the block is put on the chain and the blockchain network status is updated; Step S5: When the user selects a file download operation, the user enters the user ID of the file data to be downloaded into the file exchange cabinet, and the file download operation is performed according to the user's access level and specific parameters of the file data to be downloaded.
2. A file exchange method based on a file exchange cabinet according to claim 1, characterized in that: A cloud service platform is constructed using blockchain technology. The cloud service platform is linked to a number of blockchain nodes. The blockchain nodes are deployed on file exchange cabinets within a preset range. Each blockchain node is linked to each other to form a blockchain network. The file exchange cabinet is provided with a login interface, an operation interface, a data uplink terminal and a local database. The user enters the user ID and password through the login interface to log in to the operation interface. The user performs file upload and file download operations and sets specific parameters for the file upload operation through the operation interface. The specific parameters include file transfer priority, whether to authorize encrypted transmission, authorized user ID and access permission level. The local database is used to store file data uploaded by all users, and the data uplink terminal is used to upload file data to the cloud service platform to perform data uplink operations.
3. A file exchange method based on a file exchange cabinet according to claim 2, characterized in that: The process of comparing the bandwidth occupied by the encrypted data packets of each image file data with the link bandwidth and scheduling the encrypted data packets of the image file data that need to perform the data uplink operation according to the comparison result includes: Obtaining the occupied bandwidth of each encrypted data packet of the image file data and the sum of the occupied bandwidths of the encrypted data packets of each image file data, and comparing the sum of the bandwidths with the link bandwidth; If the total bandwidth is greater than the link bandwidth, then obtain the specific parameters of the file upload operation set by the user to which each mirror file data belongs, obtain the file transfer priority of the encrypted data packet of each mirror file data according to the specific parameters, sort the chaining order of each encrypted data packet according to the file transfer priority of each encrypted data packet, build a chaining sorting queue, and perform the data chaining operation of the encrypted data packet in sequence according to the sorting result in the chaining sorting queue, and at the same time obtain the waiting time of each encrypted data packet waiting for the data chaining operation in the chaining sorting queue, set the dynamic priority of each encrypted data packet waiting for the data chaining operation in the chaining sorting queue according to the occupied bandwidth and waiting time of each encrypted data packet, and dynamically sort each encrypted data packet waiting for the data chaining operation in the chaining sorting queue according to the dynamic priority until all encrypted data packets in the chaining sorting queue complete the data chaining operation; If the total bandwidth is less than or equal to the link bandwidth, the data uplink operation is performed on the encrypted data packets of all image file data at the same time.
4. A file exchange method based on a file exchange cabinet according to claim 3, characterized in that: The process of data verification for the encrypted data package of the image file data uploaded to the cloud service platform includes: Obtain the user and file exchange cabinet to which the encrypted data packet of the image file data uploaded to the cloud service platform belongs, obtain the second public key of the file exchange cabinet and the first public key of the user, obtain the ciphertext data and digital signature of the image file data according to the encrypted data packet, decrypt the ciphertext data by the second public key of the file exchange cabinet to obtain the decrypted data, apply the hash function to the decrypted data to obtain the hash value of the decrypted data, then decrypt the data signature by the first public key of the user to obtain the hash value, match the hash value with the hash value of the decrypted data for consistency, if the hash values of the two are consistent, temporarily store the decrypted data in the transaction pool of the cloud service platform, if the hash values of the two are inconsistent, discard the decrypted data, and feedback the data verification failure information to the file exchange cabinet.
5. A file exchange method based on a file exchange cabinet according to claim 4, characterized in that: The decrypted data of the image file data that has passed the data verification is packaged into a new block, and the new block is verified according to the preset verification rules and consensus mechanism. After the new block is verified, the process of uploading the block to the chain and updating the blockchain network status includes: The mining nodes of the blockchain network are preset through the cloud server platform. The mining nodes are used to select decrypted data in the transaction pool, package and create a new block, and broadcast the new block to the blockchain network. Other blockchain nodes in the blockchain network verify the new block based on preset verification rules and consensus mechanism; After the new block is verified, it is added to the end of the blockchain, and the decrypted data of the new block is updated to the blockchain copies of all blockchain nodes.
6. A file exchange method based on a file exchange cabinet according to claim 5, characterized in that: The process of performing a file download operation based on the user's access level and the specific parameters of the file data to be downloaded includes: The user inputs the user ID of the file data to be downloaded into the file exchange cabinet, obtains the specific parameters set by the user ID of the file data to be downloaded, the specific parameters include whether the encrypted transmission is authorized, the authorized user ID and the access permission level, and determines whether the file data to be downloaded is authorized for encrypted transmission according to the specific parameters. If the file data to be downloaded is authorized for encrypted transmission, determine whether the authorized user ID is consistent with the user's ID. If they are inconsistent, feedback authorization mismatch information to the user. If they are consistent, obtain the decrypted data of the file data to be downloaded from the blockchain copy deployed on the blockchain node of the file exchange cabinet, and then obtain the first private key of the user ID, decrypt the decrypted data by using the first private key of the user ID, and obtain the file data to be downloaded; If the file data to be downloaded is transmitted in an unauthorized encrypted manner, the authorization level of the file data to be downloaded is obtained according to specific parameters, and the user's access level is obtained at the same time. The user's access level is compared with the authorization level of the file data to be downloaded. If the user's access level is greater than or equal to the authorization level, the file data to be downloaded is obtained from the blockchain copy on the blockchain node deployed in the file exchange cabinet. If the user's access level is less than the authorization level, the insufficient access level information is fed back to the user.
Citation Information
Patent Citations
Visualization system and implementation method based on IBM host
CN104199647A
Electronic invoice issuing city node processing method based on edge calculation
CN114511362A
Digital copyright protection method based on composite encryption technique
CN108197438A
File encryption sharing method and system based on block chain technology
CN115001871A
Intelligent cloud cabinet safety management system
CN115147987A
