WO2020248599A1 - 基于区块链的文件处理方法、装置、设备及存储介质 - Google Patents
基于区块链的文件处理方法、装置、设备及存储介质 Download PDFInfo
- Publication number
- WO2020248599A1 WO2020248599A1 PCT/CN2020/071131 CN2020071131W WO2020248599A1 WO 2020248599 A1 WO2020248599 A1 WO 2020248599A1 CN 2020071131 W CN2020071131 W CN 2020071131W WO 2020248599 A1 WO2020248599 A1 WO 2020248599A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- node
- blockchain
- download
- client
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6272—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database by registering files or documents with a third party
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Definitions
- This application relates to the field of blockchain technology, and in particular to a blockchain-based file processing method, file processing device, file processing equipment, and computer-readable storage medium.
- the purpose of the embodiments of the application is to provide a file processing method, a file processing device, a file processing device, and a computer-readable storage medium to solve the problem of file loss and inability to download due to a failure of the central server, and to improve file download efficiency.
- a blockchain-based file processing method including: receiving a file download request from a client for a target file on the blockchain, the file download request including the client Terminal’s network address information and the file address information of the target file; determine the actual download node of the target file on the blockchain based on the client’s network address information; based on the file address information from the actual download The node downloads the target file, and returns the downloaded target file to the client.
- determining the actual download node of the target file on the blockchain based on the network address information of the client includes: downloading from candidate nodes based on the network address information of the client The node set selects the first node closest to the client, and the candidate node set includes nodes whose download times of files downloaded by the client from nodes on the blockchain are greater than a predetermined threshold; A node serves as the actual download node of the target file on the blockchain.
- using the first node as the actual download node of the target file on the blockchain includes: determining whether the load of the first node is less than the first node. A predetermined threshold; if it is less than the first predetermined threshold, the first node is taken as the actual download node of the target file on the blockchain; if it is greater than or equal to the first predetermined threshold, based on the The network address information determines the actual download node of the target file on the blockchain by means of load balancing.
- the method further includes: after the download is completed, determining whether the actual download node belongs to the candidate node set; if the actual download node does not belong to the candidate node If the number of downloads is greater than the predetermined number of times threshold, then the actual download node is added to the candidate node set.
- determining the actual download node of the target file on the blockchain based on the network address information of the client includes: determining the actual download node based on the network address information of the client The second node closest to the client on the blockchain; determine whether the load of the second node is less than a second predetermined threshold; if it is less than the second predetermined threshold, the second node is used as the The actual download node of the target file on the blockchain; if it is greater than or equal to the second predetermined threshold, determine the location of the target file on the blockchain based on the network address information through load balancing Actual download node.
- the method further includes: if the actual download node of the target file on the blockchain is determined, forwarding the file download request to the actual Download node; extract the file address information of the target file from the file download request.
- the method further includes: performing a hash operation on the target file to obtain a hash value of the target file; generating based on the hash value and a predetermined character string The file address information of the target file.
- the method further includes: receiving a file upload request for uploading the target file to the blockchain; controlling each node on the blockchain to The target file is processed by consensus; if each node on the blockchain reaches a consensus, the target file is synchronized to each node of the blockchain.
- returning the downloaded target file to the client includes: extracting identification information of the client from the file download request; if according to the identification information It is determined that the client is a mobile client, then the target file is compressed; the compressed target file is returned to the client.
- a blockchain-based file processing method which is applied to a client and includes: sending a file download request for a target file on the blockchain, the file download request including The network address information of the client and the file address information of the target file; receiving the target file returned by the actual download node on the blockchain based on the file address information, the actual download node according to the network The address information is determined.
- sending a file download request for a target file on the blockchain includes: sending a file download request for the target file to a candidate node on the blockchain, and Candidate nodes include nodes whose download times of files downloaded from nodes on the blockchain are greater than a predetermined threshold.
- the file processing method further includes: determining the number of downloads of the file downloaded from the actual download node; if the number of downloads is greater than a predetermined number of times threshold, the actual download The node serves as a candidate node for the client to download files from the blockchain.
- a file processing device based on a blockchain, including: a first receiving module configured to receive a file download request from a client to a target file on the blockchain;
- the file download request includes the network address information of the client and the file address information of the target file;
- a node determination module is used to determine the actual download of the target file on the blockchain based on the network address information of the client Node;
- a download module configured to download the target file from the actual download node based on the file address information, and return the downloaded target file to the client.
- the node determining module includes: a first node determining unit, configured to select, based on the network address information of the client, a set of candidate nodes that is closest to the client.
- a node, the candidate node set includes nodes whose download times of files downloaded by the client from nodes on the blockchain are greater than a predetermined threshold;
- a download node determining unit is configured to use the first node as the The actual download node of the target file on the blockchain.
- the download node determining unit includes: a determining unit configured to determine whether the load of the first node is less than a first predetermined threshold; and a first determining unit configured to determine whether the load of the first node is less than The first predetermined threshold, the first node is used as the actual download node of the target file on the blockchain; the second determining unit is configured to: if it is greater than or equal to the first predetermined threshold, based on The network address information determines the actual download node of the target file on the blockchain in a load balancing manner.
- the file processing device further includes: a node judging module, configured to determine whether the actual download node belongs to the candidate node set after the download is completed; a download frequency determining module , For determining the number of downloads of files downloaded from the actual download node if the actual download node does not belong to the candidate node set; a node adding module, for if the number of downloads is greater than the predetermined number threshold, Adding the actual download node to the candidate node set.
- a node judging module configured to determine whether the actual download node belongs to the candidate node set after the download is completed
- a download frequency determining module For determining the number of downloads of files downloaded from the actual download node if the actual download node does not belong to the candidate node set
- a node adding module for if the number of downloads is greater than the predetermined number threshold, Adding the actual download node to the candidate node set.
- the node determining module includes: a second node determining unit, configured to determine the closest distance to the client on the blockchain based on the network address information of the client
- the load judgment unit is used to judge whether the load of the second node is less than a second predetermined threshold
- the third determination unit is used to determine whether the load of the second node is less than the second predetermined threshold, then the second node is used as The actual download node of the target file on the blockchain
- a fourth determining unit configured to determine the target file in a load balancing manner based on the network address information if it is greater than or equal to the second predetermined threshold The actual download node on the blockchain.
- the file processing device further includes: a forwarding module, configured to: if the actual download node of the target file on the blockchain is determined, transfer the file The download request is forwarded to the actual download node; an extraction module is used to extract the file address information of the target file from the file download request.
- a forwarding module configured to: if the actual download node of the target file on the blockchain is determined, transfer the file The download request is forwarded to the actual download node; an extraction module is used to extract the file address information of the target file from the file download request.
- the file processing device further includes: a hash processing module, configured to perform a hash operation on the target file to obtain the hash value of the target file; address generation A module for generating the file address information of the target file based on the hash value and a predetermined character string.
- the file processing device further includes: a second receiving module for receiving a file upload request for uploading the target file to the blockchain; a consensus module for For controlling each node on the blockchain to perform consensus processing on the target file; a synchronization module is used to synchronize the target file to the block if each node on the blockchain reaches a consensus Each node of the chain.
- the download module includes: an identification extraction unit, configured to extract the identification information of the client from the file download request; If the information determines that the client is a mobile client, then the target file is compressed; a returning unit is used to return the compressed target file to the client.
- a file processing device based on a blockchain which is applied to a client and includes: a sending module for sending a file download request for a target file on the blockchain, so The file download request includes the network address information of the client and the file address information of the target file; a receiving module is used to receive the target file returned by the actual download node on the blockchain based on the file address information , The actual download node is determined according to the network address information.
- the sending module is configured to send a file download request for a target file to a candidate node on the block chain, and the candidate node Nodes on the chain whose download times of downloading files are greater than a predetermined threshold.
- the file processing device further includes: a download times determination module, configured to determine the number of downloads of files from the actual download node; a candidate node determination module, configured to If the number of downloads is greater than a predetermined number threshold, the actual download node is used as a candidate node for the client to download the file from the blockchain.
- a file processing device including: a processor; and a memory configured to store computer-executable instructions that, when executed, cause the processor to The steps of the file processing method described in any one of the first aspect or the second aspect are implemented.
- a storage medium for storing computer-executable instructions that, when executed, implement any one of the foregoing first aspect or second aspect The steps of the file processing method.
- storing the target file on the blockchain can prevent the file from being tampered with and losing the file; on the other hand, it is determined that the target file is on the blockchain based on the client's network address information Downloading the target file from the actual download node can not only improve the download efficiency of the file, but also realize the decentralized download of the file, avoiding the problem of file loss and download failure caused by the failure of the central server.
- Fig. 1 shows a schematic block diagram of an application scenario of a file processing method provided according to some embodiments of the present application
- FIG. 2 shows a schematic flowchart of a file processing method according to some embodiments of the present application
- Figure 3 shows a schematic diagram of a blockchain provided according to some embodiments of the present application.
- Fig. 4 shows a schematic flow chart of determining actual download nodes according to some embodiments of the present application
- FIG. 5 shows a schematic flowchart of a file processing method according to other embodiments of the present application.
- FIG. 6 shows a schematic flow chart of a file processing method provided according to still other embodiments of the present application.
- FIG. 7 shows a schematic block diagram of a file processing apparatus according to some embodiments of the present application.
- FIG. 8 shows a schematic block diagram of a file processing apparatus provided according to other embodiments of the present application.
- Fig. 9 shows a schematic block diagram of a file processing device provided according to some embodiments of the present application.
- Fig. 1 shows a schematic block diagram of an application scenario of a file processing method provided according to some embodiments of the present application.
- the application scenario includes a client 110 and a blockchain 120.
- the blockchain 120 includes nodes 1 to 6, and each node stores target files and network addresses of other nodes, that is, IP (Internet Protocol, network protocol) address information.
- IP Internet Protocol, network protocol
- the client 110 sends a file download request for downloading the target file to the node 2 of the blockchain 120, where the node 2 contains the IP address information of other nodes on the blockchain 120, namely nodes 1, 3, 4, 5, and 6.
- node 2 of the block chain 120 After node 2 of the block chain 120 receives the file download request, it extracts the client's IP address information from the file download request, determines the closest node to the client 110, such as node 6, based on the client's IP address information, and sends the file download request Forward to node 6, download the target file from node 6, and return the downloaded target file to client 110.
- the client 110 may be a mobile phone, a tablet computer, a desktop computer, a portable notebook computer, or a vehicle-mounted computer.
- the blockchain 120 can provide decentralization, non-tampering, safety and reliability for the storage of target files without introducing a third-party intermediary structure.
- Fig. 2 shows a schematic flowchart of a file processing method provided according to some embodiments of the present application.
- This file processing method can be applied to the nodes of the blockchain in Figure 1.
- the file processing method includes steps S210 to S230.
- the file processing method in the exemplary embodiment will be described in detail below with reference to FIG. 2.
- step S210 a file download request from the client to the target file on the blockchain is received, and the file download request includes the network address information of the client and the file address information of the target file.
- each node of the blockchain stores the target file and the network address information of other nodes.
- the file address information of the target file may be a hash address generated after the target file is hashed, or it may be Other appropriate address information.
- the target file can be a picture, text, or video file, which is not specifically limited in this application.
- the client's network address information is the client's IP address
- the client sends a file download request for the target file to the target node on the blockchain.
- the file download request includes the client's network address information and the file address information of the target file. .
- the target node on the blockchain receives the file download request, and extracts the client's network address information from the file download request.
- the target node can be a historical node stored on the client to download files from the blockchain, or it can be
- the node selected by the user from the multiple nodes of the blockchain may also be a node where the number of times the client downloads a file from a node on the blockchain is greater than a predetermined threshold, for example, 10 times.
- step S220 the actual download node of the target file on the blockchain is determined based on the network address information of the client.
- each node of the blockchain stores network address information of other nodes, and the closest node to the client is determined based on the network address information of the client and the network address information of each node of the blockchain, For example, the node closest to the client's geographic location or the network location is the closest node to the client as the actual download node of the target file on the blockchain.
- the node closest to the client on the blockchain is determined based on the network address information of the client; it is determined whether the load of the node is less than a predetermined threshold; if it is less than the predetermined threshold, the node is taken as the target
- the actual download node of the file on the blockchain; if it is greater than or equal to the predetermined threshold, the actual download node of the target file on the blockchain is determined by means of load balancing based on the network address information. Determining the actual download node of the target file on the blockchain by means of load balancing can prevent the problem of slow download caused by excessive node load and improve file download efficiency.
- the first node closest to the client is selected from the set of candidate nodes based on the network address information of the client.
- the candidate node set includes the nodes that the client frequently downloads files.
- the candidate node set include nodes whose download times of files downloaded by the client from nodes on the blockchain are greater than a predetermined times threshold, and use the first node as the actual download node of the target file on the blockchain.
- step S230 the target file is downloaded from the actual download node based on the file address information of the target file, and the downloaded target file is returned to the client.
- the file download request is forwarded to the actual download node, and the file address information of the target file, such as hash address information, is extracted from the file download request , Find the corresponding target file from the actual download node based on the file address information of the target file, after finding the target file, download the target file and return the downloaded target file to the client.
- the file address information of the target file such as hash address information
- storing the target file on the blockchain can prevent the file from being tampered with and losing the file; on the other hand, it is determined that the target file is in the zone based on the client's network address information.
- the actual download node on the block chain downloads the target file from the actual download node, which can not only improve the download efficiency of the file, but also realize the decentralized download of the file, avoiding the problem of file loss and undownloading caused by the failure of the central server.
- a hash operation is performed on the target file to obtain the hash value of the target file, and the file address information of the target file is generated based on the hash value of the target file and a predetermined character string.
- the file address information of the target file is generated by the hash value of the target file, which can prevent the file content of the target file from being tampered with and ensure the accuracy of the file content.
- the file address information of the target file Through the file address information of the target file, the file can be uniquely confirmed. If the file is tampered with, the file address information of the file will also change. By comparing the file address of the file with the new file address, it can be determined whether the file has been tampered with.
- a file upload request for uploading a target file to the blockchain is received; each node on the blockchain is controlled to perform consensus processing on the target file; if each node on the blockchain reaches a consensus, The target file is synchronized to each node of the blockchain.
- the consensus processing of the target file by each node on the blockchain the file can be prevented from being tampered with and the security of the file can be improved.
- the consensus processing of this application can use POW (Proof of Work, proof of work), POS (Proof of Stake, proof of equity) or DPOS (Delegated Proof of Stake, appointing proof of equity) ), this application does not specifically limit this.
- the downloaded target file is returned to the client.
- the identification information of the client is extracted from the file download request, and the identification information is used to determine whether the client is a mobile client. If the identification information determines that the client is a mobile client, the target file is compressed, and The compressed target file is returned to the client.
- Fig. 3 shows a schematic diagram of a blockchain provided according to some embodiments of the present application.
- each block on the blockchain stores a file and a file hash address, and the header of each block stores the digest value of this block and the digest value of the previous block.
- Each block on the blockchain has a chain data structure, which ensures that the data on the blockchain can only be changed in an incremental manner. The data that has been recorded on the blockchain will always remain in the state when it was created and will not be overwritten.
- Fig. 4 shows a schematic flow chart of determining an actual download node according to some embodiments of the present application.
- step S410 based on the client's network address information, the candidate node that is closest to the client is selected from the candidate node set.
- the candidate node set includes that the number of times the client downloads files from nodes on the blockchain is greater than The node of the predetermined number of thresholds.
- the candidate node set includes nodes that the client frequently downloads files from the blockchain. Specifically, the candidate node set includes nodes whose download times the client downloads files from nodes on the blockchain are greater than a predetermined threshold. node.
- the predetermined number of times threshold can be determined according to the total number of times the client downloads files from the blockchain and the number of nodes. For example, if the client has downloaded a total of 60 files from 6 nodes on the blockchain, the predetermined number of times threshold can be 10 times.
- the actual download node After the download from the actual download node is completed, it is determined whether the actual download node belongs to the candidate node set; if the actual download node does not belong to the candidate node set, the number of files downloaded from the actual download node is counted Download times; if the counted download times are greater than the predetermined times threshold, the actual download node is added to the candidate node.
- the IP address information of each candidate node in the candidate node set is obtained, and the candidate node closest to the client is determined based on the IP address information of the candidate node and the IP address information of the client.
- step S420 use the candidate node as the actual download node of the target file on the blockchain.
- the candidate node after determining the candidate node in the set of candidate nodes that is closest to the client, the candidate node may be directly used as the actual download node of the target file on the blockchain.
- the candidate node set since the nodes in the candidate node set are frequently downloaded and used by the client, the nodes that are close to the client and convenient to download can be quickly determined, thereby improving the efficiency of file download.
- the candidate node in the set of candidate nodes that is closest to the client after determining the candidate node in the set of candidate nodes that is closest to the client, it is determined whether the load of the candidate node is, for example, less than a predetermined threshold; if it is less than the predetermined threshold, the candidate node is used as the target file
- the actual download node on the blockchain; if it is greater than or equal to the predetermined threshold, the actual download node of the target file on the blockchain is determined by means of load balancing based on the network address information.
- load balancing For example, if the load of a candidate node is too high, you can use load balancing to determine the node that is the closest to the client and whose load is less than the predetermined threshold from other nodes except the candidate node, and use the determined node as the target The actual download node of the file on the blockchain. Determining the actual download node of the target file through load balancing can prevent the problem of slow download caused by excessive node load and improve file download efficiency.
- Fig. 5 shows a schematic flow chart of a file processing method provided according to other embodiments of the present application.
- step S10 the client 110 sends a file download or upload request to the blockchain 120, and the file download or upload request is sent to the candidate node. If it is a file download request, it is determined whether the load of the candidate node is greater than a predetermined threshold; if it is greater than the predetermined threshold, proceed to step S20; if it is a file upload request, proceed to step S30.
- step S20 the client's IP address information is extracted from the file download request, and the file download request is forwarded to the most suitable node for the client's geographic or network location based on the client's IP address information through load balancing, for example, the most suitable The node of is the node whose address location or network location is closest to the client and whose load is less than a predetermined threshold.
- step S30 each node on the blockchain is controlled to perform consensus processing on the file to be uploaded. If each node on the blockchain reaches a consensus, the data of the file to be uploaded is synchronized to each node on the blockchain.
- step S40 the downloaded file is returned to the client. Further, in order to improve the efficiency of file transfer, the identification information of the client is extracted from the file download request, and whether the client is a mobile client is determined according to the identification information. If the client is determined to be a mobile client according to the identification information, the target file is Compress, return the compressed target file to the client.
- the user’s download node can be established by building a blockchain node on his own to provide the user with a file download service specifically to solve the slow request and request Can't hit the problem.
- Fig. 6 shows a schematic flow chart of a file processing method provided according to still other embodiments of the present application.
- the file processing method is applied to the client, which can be a mobile phone, a tablet computer, a desktop computer, a portable notebook computer, or a vehicle-mounted computer.
- the file processing method in the exemplary embodiment will be described in detail below with reference to FIG. 6.
- step S610 a file download request for a target file on the blockchain is sent, and the file download request includes the network address information of the client and the file address information of the target file.
- each node of the blockchain stores the target file and the network address information of other nodes.
- the file address information of the target file may be a hash address generated after the target file is hashed, or it may be Other appropriate address information.
- the target file can be a picture, text, or video file, which is not specifically limited in this application.
- the client's network address information is the client's IP address
- the client sends a file download request for the target file to the target node on the blockchain.
- the file download request includes the client's network address information and the file address information of the target file. .
- the target node on the blockchain receives the file download request, and extracts the client's network address information from the file download request.
- the target node can be a historical node stored on the client to download files from the blockchain, or it can be
- the node selected by the user from the multiple nodes of the blockchain may also be a node where the number of times the client downloads a file from a node on the blockchain is greater than a predetermined threshold, for example, 10 times.
- step S620 the target file returned by the actual download node on the blockchain based on the file address information is received, and the actual download node is determined according to the network address information of the client.
- each node of the blockchain stores the network address information of other nodes.
- the distance from the client is determined based on the network address information of the client and the network address information of each node of the blockchain.
- the node with the closest distance to the client such as the node closest to the client’s geographic location or the network location, uses the node closest to the client as the actual download node of the target file on the blockchain. Download the file from the actual download node, and return the downloaded file to the client.
- storing the target file on the blockchain can prevent the file from being tampered with and losing the file; on the other hand, it is determined that the target file is in the zone based on the client's network address information.
- the actual download node on the block chain downloads the target file from the actual download node, which can not only improve the download efficiency of the file, but also realize the decentralized download of the file, avoiding the problem of file loss and undownloading caused by the failure of the central server.
- a file download request for the target file is sent to a candidate node on the blockchain.
- the candidate node is a node whose client often downloads files from the blockchain.
- the candidate node includes the client A node whose download times of downloading files from nodes on the blockchain is greater than a predetermined threshold.
- the predetermined number of times threshold can be determined according to the total number of times the client downloads files from the blockchain and the number of nodes. For example, if the client has downloaded a total of 60 files from 6 nodes on the blockchain, the predetermined number of times threshold can be 10 times.
- the client after the client receives the returned target file, it determines the number of downloads of the file from the actual download node, and if the number of downloads is greater than the predetermined number threshold, then the actual download node is used as the client slave block Connect to candidate nodes for downloading files.
- the file processing apparatus 700 includes: a first receiving module 710, a node determining module 720, and a downloading module 730.
- the first receiving module 710 is configured to receive a file download request from a client to a target file on the blockchain, and the file download request includes the network address information of the client and the file address information of the target file;
- the node determines
- the module 720 is configured to determine the actual download node of the target file on the blockchain based on the network address information of the client;
- the download module 730 is configured to download the target from the actual download node based on the file address information File, and return the downloaded target file to the client.
- the node determining module 720 includes: a first node determining unit, configured to select, based on the network address information of the client, from candidate nodes that are closest to the client The first node, the candidate node set includes nodes whose download times of files downloaded by the client from nodes on the blockchain are greater than a predetermined threshold; a download node determining unit is configured to use the first node as the The actual download node of the target file on the blockchain.
- the download node determining unit includes: a determining unit configured to determine whether the load of the first node is less than a first predetermined threshold; and a first determining unit configured to determine whether the load of the first node is less than The first predetermined threshold, the first node is used as the actual download node of the target file on the blockchain; the second determining unit is configured to: if it is greater than or equal to the first predetermined threshold, based on The network address information determines the actual download node of the target file on the blockchain in a load balancing manner.
- the file processing apparatus 700 further includes: a node judgment module, configured to determine whether the actual download node belongs to the candidate node set after the download is completed; the number of downloads is determined A module for determining the number of downloads of files from the actual download node if the actual download node does not belong to the set of candidate nodes; a node adding module for determining if the number of downloads is greater than the predetermined number threshold, Then the actual download node is added to the candidate node set.
- a node judgment module configured to determine whether the actual download node belongs to the candidate node set after the download is completed; the number of downloads is determined
- a module for determining the number of downloads of files from the actual download node if the actual download node does not belong to the set of candidate nodes
- a node adding module for determining if the number of downloads is greater than the predetermined number threshold, Then the actual download node is added to the candidate node set.
- the node determining module 720 includes: a second node determining unit, configured to determine the distance from the client on the blockchain based on the network address information of the client The nearest second node; a load judging unit for judging whether the load of the second node is less than a second predetermined threshold; a third determining unit for judging the second node if it is less than the second predetermined threshold As the actual download node of the target file on the blockchain; the fourth determining unit is configured to determine the target in a load balancing manner based on the network address information if it is greater than or equal to the second predetermined threshold The actual download node of the file on the blockchain.
- the file processing device 700 further includes: a forwarding module, configured to: if the actual download node of the target file on the blockchain is determined, transfer the The file download request is forwarded to the actual download node; an extraction module is used to extract the file address information of the target file from the file download request.
- a forwarding module configured to: if the actual download node of the target file on the blockchain is determined, transfer the The file download request is forwarded to the actual download node; an extraction module is used to extract the file address information of the target file from the file download request.
- the file processing device 700 further includes: a hash processing module, configured to perform a hash operation on the target file to obtain the hash value of the target file; an address;
- the generating module is configured to generate the file address information of the target file based on the hash value and a predetermined character string.
- the file processing device further includes: a second receiving module for receiving a file upload request for uploading the target file to the blockchain; a consensus module for For controlling each node on the blockchain to perform consensus processing on the target file; a synchronization module is used to synchronize the target file to the block if each node on the blockchain reaches a consensus Each node of the chain.
- the download module includes: an identification extraction unit, configured to extract the identification information of the client from the file download request; If the information determines that the client is a mobile client, then the target file is compressed; a returning unit is used to return the compressed target file to the client.
- the target file is stored on the blockchain, which can prevent the file from being tampered and lost; on the other hand, it is determined that the target file is in the zone based on the client's network address information.
- the actual download node on the block chain downloads the target file from the actual download node, which can not only improve the download efficiency of the file, but also realize the decentralized download of the file, avoiding the problem of file loss and undownloading caused by the failure of the central server.
- the file processing apparatus 800 includes a sending module 810 and a receiving module 820.
- the sending module 810 is configured to send a file download request for a target file on the blockchain, and the file download request includes the network address information of the client and the file address information of the target file; the receiving module 820 is used to receive The actual download node on the blockchain is based on the target file returned by the file address information, and the actual download node is determined according to the network address information.
- the sending module 810 is configured to send a file download request for a target file to a candidate node on the blockchain, and the candidate node includes a file download request from the district. Nodes on the block chain whose download times of downloading files are greater than a predetermined threshold.
- the file processing apparatus 800 further includes: a download times determination module, configured to determine the download times of the file downloaded from the actual download node; and a candidate node determination module, configured to: If the number of downloads is greater than a predetermined number threshold, the actual download node is used as a candidate node for the client to download the file from the blockchain.
- the file processing device provided in the embodiment of the present application can implement each process in the foregoing method embodiment and achieve the same function and effect, which will not be repeated here.
- an embodiment of the present application also provides a file processing device, as shown in FIG. 9.
- File processing devices may have relatively large differences due to different configurations or performances, and may include one or more processors 901 and a memory 902, and the memory 902 may store one or more storage applications or data. Among them, the memory 902 may be short-term storage or persistent storage.
- the application program stored in the memory 902 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions for the file processing device.
- the processor 901 may be configured to communicate with the memory 902, and execute a series of computer executable instructions in the memory 902 on the file processing device.
- the file processing device may also include one or more power sources 903, one or more wired or wireless network interfaces 904, one or more input and output interfaces 905, one or more keyboards 906, and so on.
- the file processing device includes a memory and one or more programs, wherein one or more programs are stored in the memory, and one or more programs may include one or more modules, and each Each module may include a series of computer-executable instructions in the file processing device, and the one or more programs configured to be executed by one or more processors include computer-executable instructions for performing the following:
- the file download request of the target file on the block chain the file download request includes the network address information of the client and the file address information of the target file; it is determined based on the network address information of the client that the target file is in the The actual download node on the blockchain; download the target file from the actual download node based on the file address information, and return the downloaded target file to the client.
- determining the actual download node of the target file on the blockchain based on the network address information of the client includes: from the candidate node based on the network address information of the client The node set selects the first node closest to the client, and the candidate node set includes nodes whose download times of files downloaded by the client from nodes on the blockchain are greater than a predetermined threshold; A node serves as the actual download node of the target file on the blockchain.
- using the first node as the actual download node of the target file on the blockchain includes: determining whether the load of the first node is less than the first node. A predetermined threshold; if it is less than the first predetermined threshold, use the first node as the actual download node of the target file on the blockchain; if it is greater than or equal to the first predetermined threshold, based on the The network address information determines the actual download node of the target file on the blockchain by means of load balancing.
- the method further includes: after the download is completed, determining whether the actual download node belongs to the candidate node set; if the actual download node does not belong to the candidate node If the number of downloads is greater than the predetermined number of times threshold, then the actual download node is added to the candidate node set.
- determining the actual download node of the target file on the blockchain based on the network address information of the client includes: determining the actual download node based on the network address information of the client The second node closest to the client on the blockchain; determine whether the load of the second node is less than a second predetermined threshold; if it is less than the second predetermined threshold, the second node is used as the The actual download node of the target file on the blockchain; if it is greater than or equal to the second predetermined threshold, determine the location of the target file on the blockchain based on the network address information through load balancing Actual download node.
- the method further includes: if the actual download node of the target file on the blockchain is determined, forwarding the file download request to the actual Download node; extract the file address information of the target file from the file download request.
- the method further includes: performing a hash operation on the target file to obtain a hash value of the target file; generating based on the hash value and a predetermined character string The file address information of the target file.
- the method further includes: receiving a file upload request for uploading the target file to the blockchain; controlling each node on the blockchain to The target file is processed by consensus; if each node on the blockchain reaches a consensus, the target file is synchronized to each node of the blockchain.
- returning the downloaded target file to the client includes: extracting identification information of the client from the file download request; It is determined that the client is a mobile client, then the target file is compressed; the compressed target file is returned to the client.
- the file processing device provided in the embodiment of the present application can implement each process in the foregoing method embodiment and achieve the same function and effect, and will not be repeated here.
- the embodiments of the present application also provide a storage medium for storing computer-executable instructions.
- the storage medium may be a U disk, an optical disk, a hard disk, etc.
- the computer stored in the storage medium may
- the following process can be realized: receiving a file download request from a client to a target file on the blockchain, the file download request including the network address information of the client and the file of the target file Address information; determine the actual download node of the target file on the blockchain based on the network address information of the client; download the target file from the actual download node based on the file address information, and download all The target file is returned to the client.
- determining the actual download node of the target file on the blockchain based on the network address information of the client includes: The network address information of the client selects the first node closest to the client from a set of candidate nodes, and the candidate node set includes that the number of times the client downloads files from nodes on the blockchain is greater than a predetermined threshold The node; the first node is used as the actual download node of the target file on the blockchain.
- using the first node as the actual download node of the target file on the blockchain includes: judging the first node Whether the load of the node is less than a first predetermined threshold; if it is less than the first predetermined threshold, the first node is used as the actual download node of the target file on the blockchain; if it is greater than or equal to the first
- the predetermined threshold is determined based on the network address information through load balancing to determine the actual download node of the target file on the blockchain.
- the method further includes: after the download is completed, determining whether the actual download node belongs to the candidate node set; If the node does not belong to the candidate node set, the number of downloads of files downloaded from the actual download node is determined; if the number of downloads is greater than the predetermined number threshold, the actual download node is added to the candidate node set.
- determining the actual download node of the target file on the blockchain based on the network address information of the client includes: The network address information of the client determines the second node closest to the client on the blockchain; determines whether the load of the second node is less than a second predetermined threshold; if it is less than the second predetermined threshold, then The second node serves as the actual download node of the target file on the blockchain; if it is greater than or equal to the second predetermined threshold, it is determined that the target file is located in a load balancing manner based on the network address information.
- the actual download node on the blockchain includes: The network address information of the client determines the second node closest to the client on the blockchain; determines whether the load of the second node is less than a second predetermined threshold; if it is less than the second predetermined threshold, then The second node serves as the actual download node of the target file on the blockchain; if it is greater than or equal to the second predetermined threshold, it is determined that the target file is located in a load bala
- the method further includes: if the actual download node of the target file on the blockchain is determined, sending the file The download request is forwarded to the actual download node; the file address information of the target file is extracted from the file download request.
- the method further includes: performing a hash operation on the target file to obtain the hash value of the target file; The desired value and a predetermined character string generate the file address information of the target file.
- the method further includes: receiving a file upload request for uploading the target file to the blockchain; and controlling the blockchain
- Each node on the network performs consensus processing on the target file; if each node on the blockchain reaches a consensus, the target file is synchronized to each node of the blockchain.
- the computer executable instructions stored in the storage medium when executed by the processor, returning the downloaded target file to the client, including: extracting identification information of the client from the file download request ; If the client is determined to be a mobile client according to the identification information, the target file is compressed; the compressed target file is returned to the client.
- the computer-readable storage medium provided in the embodiments of the present application can implement the various processes in the foregoing method embodiments and achieve the same functions and effects, which will not be repeated here.
- a programmable logic device Programmable Logic Device, PLD
- FPGA Field Programmable Gate Array
- HDL Hardware Description Language
- ABEL Advanced Boolean Expression Language
- AHDL Altera Hardware Description Language
- HDCal JHDL
- Lava Lava
- Lola MyHDL
- PALASM RHDL
- VHDL Very-High-Speed Integrated Circuit Hardware Description Language
- Verilog Verilog
- the controller can be implemented in any suitable manner.
- the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) executable by the (micro)processor. , Logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers.
- controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as a part of the memory control logic.
- controller in addition to implementing the controller in a purely computer-readable program code manner, it is entirely possible to program the method steps to make the controller use logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded The same function can be realized in the form of a microcontroller, etc. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for implementing various functions can also be regarded as a structure within the hardware component. Or even, the device for realizing various functions can be regarded as both a software module for realizing the method and a structure within a hardware component.
- a typical implementation device is a computer.
- the computer may be, for example, a personal computer, a laptop computer, a cell phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or Any combination of these devices.
- the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
- a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
- the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
- These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
- the instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram.
- the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory.
- processors CPU
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
- RAM random access memory
- ROM read-only memory
- flash RAM flash memory
- Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
- the information can be computer-readable instructions, data structures, program modules, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
- this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
- This application can also be practiced in distributed computing environments. In these distributed computing environments, remote processing devices connected through a communication network perform tasks.
- program modules can be located in local and remote computer storage media including storage devices.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种基于区块链的文件处理方法、装置、设备及存储介质,涉及区块链技术领域。该方法包括:接收客户端对区块链上的目标文件的文件下载请求,该文件下载请求包含客户端的网络地址信息以及目标文件的文件地址信息(S210);基于客户端的网络地址信息确定目标文件在区块链上的实际下载节点(S220);基于目标文件的文件地址信息从该实际下载节点下载目标文件,将下载的目标文件返回至客户端(S230)。该方法能够防止文件被篡改以及文件丢失,避免中心服务器发生故障导致的文件丢失、无法下载的问题,提高了文件的下载效率。
Description
本申请涉及区块链技术领域,尤其涉及一种基于区块链的文件处理方法、文件处理装置、文件处理设备以及计算机可读存储介质。
随着互联网技术的普及,越来越多的用户通过互联网上传或下载文件,例如图片、文本、视频等格式的文件。
目前的技术方案中,通常将文件放在大型的中心服务器上,从中心服务器上下载文件。在这种技术方案中,不仅下载效率较低,而且,如果中心服务器发生故障,容易导致文件丢失、无法下载等问题。
发明内容
本申请实施例的目的是提供一种文件处理方法、文件处理装置、文件处理设备以及计算机可读存储介质,以解决由于中心服务器发生故障导致文件丢失、无法下载的问题,提高文件下载效率。
为解决上述技术问题,本申请实施例是这样实现的:
根据本申请实施例的第一方面,提供了一种基于区块链的文件处理方法,包括:接收客户端对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点;基于所述文件地址信息从所述实际下载节点下载所述目标文件,将下载的所述目标文件返回至所述客户端。
在本申请的一些实施例中,基于上述方案,基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点,包括:基于所述客户端的网络地址信息从候选节点集中选取距所述客户端距离最近的第一节点,所述候选节点集包含所述客户端从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点;将所述第一节点作为所述目标文件在所述区块链上的实际下载节点。
在本申请的一些实施例中,基于上述方案,将所述第一节点作为所述目标文件在所 述区块链上的实际下载节点,包括:判断所述第一节点的负载是否小于第一预定阈值;若小于所述第一预定阈值,则将所述第一节点作为所述目标文件在所述区块链上的实际下载节点;若大于等于所述第一预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
在本申请的一些实施例中,基于上述方案,所述方法还包括:在下载完成之后,确定所述实际下载节点是否属于所述候选节点集;若所述实际下载节点不属于所述候选节点集,则确定从所述实际下载节点下载文件的下载次数;若所述下载次数大于所述预定次数阈值,则将所述实际下载节点加入到所述候选节点集。
在本申请的一些实施例中,基于上述方案,基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点,包括:基于所述客户端的网络地址信息确定所述区块链上距所述客户端距离最近的第二节点;判断所述第二节点的负载是否小于第二预定阈值;若小于所述第二预定阈值,则将所述第二节点作为所述目标文件在所述区块链上的实际下载节点;若大于等于所述第二预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
在本申请的一些实施例中,基于上述方案,所述方法还包括:若确定了所述目标文件在所述区块链上的实际下载节点,则将所述文件下载请求转发至所述实际下载节点;从所述文件下载请求中提取所述目标文件的所述文件地址信息。
在本申请的一些实施例中,基于上述方案,所述方法还包括:对所述目标文件进行哈希运算,得到所述目标文件的哈希值;基于所述哈希值以及预定字符串生成所述目标文件的所述文件地址信息。
在本申请的一些实施例中,基于上述方案,所述方法还包括:接收将所述目标文件上传至所述区块链的文件上传请求;控制所述区块链上的各个节点对所述目标文件进行共识处理;若所述区块链上的各个节点达成共识,则将所述目标文件同步至所述区块链的各个节点。
在本申请的一些实施例中,基于上述方案,将下载的所述目标文件返回至所述客户端,包括:从所述文件下载请求中提取所述客户端的标识信息;若根据所述标识信息判定所述客户端为移动客户端,则对所述目标文件进行压缩;将压缩后的所述目标文件返回至所述客户端。
根据本申请实施例的第二方面,提供了一种基于区块链的文件处理方法,应用于客 户端,包括:发送对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;接收所述区块链上的实际下载节点基于所述文件地址信息返回的所述目标文件,所述实际下载节点根据所述网络地址信息确定。
在本申请的一些实施例中,基于上述方案,发送对区块链上的目标文件的文件下载请求,包括:向所述区块链上的候选节点发送对目标文件的文件下载请求,所述候选节点包含从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点。
在本申请的一些实施例中,基于上述方案,所述文件处理方法还包括:确定从所述实际下载节点下载文件的下载次数;若所述下载次数大于预定次数阈值,则将所述实际下载节点作为所述客户端从所述区块链上下载文件的候选节点。
根据本申请实施例的第三方面,提供了一种基于区块链的文件处理装置,包括:第一接收模块,用于接收客户端对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;节点确定模块,用于基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点;下载模块,用于基于所述文件地址信息从所述实际下载节点下载所述目标文件,将下载的所述目标文件返回至所述客户端。
在本申请的一些实施例中,基于上述方案,所述节点确定模块包括:第一节点确定单元,用于基于所述客户端的网络地址信息从候选节点集中选取距所述客户端距离最近的第一节点,所述候选节点集包含所述客户端从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点;下载节点确定单元,用于将所述第一节点作为所述目标文件在所述区块链上的实际下载节点。
在本申请的一些实施例中,基于上述方案,所述下载节点确定单元包括:判断单元,用于判断所述第一节点的负载是否小于第一预定阈值;第一确定单元,用于若小于所述第一预定阈值,则将所述第一节点作为所述目标文件在所述区块链上的实际下载节点;第二确定单元,用于若大于等于所述第一预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
在本申请的一些实施例中,基于上述方案,所述文件处理装置还包括:节点判断模块,用于在下载完成之后,确定所述实际下载节点是否属于所述候选节点集;下载次数确定模块,用于若所述实际下载节点不属于所述候选节点集,则确定从所述实际下载节 点下载文件的下载次数;节点加入模块,用于若所述下载次数大于所述预定次数阈值,则将所述实际下载节点加入到所述候选节点集。
在本申请的一些实施例中,基于上述方案,所述节点确定模块包括:第二节点确定单元,用于基于所述客户端的网络地址信息确定所述区块链上距所述客户端距离最近的第二节点;负载判断单元,用于判断所述第二节点的负载是否小于第二预定阈值;第三确定单元,用于若小于所述第二预定阈值,则将所述第二节点作为所述目标文件在所述区块链上的实际下载节点;第四确定单元,用于若大于等于所述第二预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
在本申请的一些实施例中,基于上述方案,所述文件处理装置还包括:转发模块,用于若确定了所述目标文件在所述区块链上的实际下载节点,则将所述文件下载请求转发至所述实际下载节点;提取模块,用于从所述文件下载请求中提取所述目标文件的所述文件地址信息。
在本申请的一些实施例中,基于上述方案,所述文件处理装置还包括:哈希处理模块,用于对所述目标文件进行哈希运算,得到所述目标文件的哈希值;地址生成模块,用于基于所述哈希值以及预定字符串生成所述目标文件的所述文件地址信息。
在本申请的一些实施例中,基于上述方案,所述文件处理装置还包括:第二接收模块,用于接收将所述目标文件上传至所述区块链的文件上传请求;共识模块,用于控制所述区块链上的各个节点对所述目标文件进行共识处理;同步模块,用于若所述区块链上的各个节点达成共识,则将所述目标文件同步至所述区块链的各个节点。
在本申请的一些实施例中,基于上述方案,所述下载模块包括:标识提取单元,用于从所述文件下载请求中提取所述客户端的标识信息;压缩单元,用于若根据所述标识信息判定所述客户端为移动客户端,则对所述目标文件进行压缩;返回单元,用于将压缩后的所述目标文件返回至所述客户端。
根据本申请实施例的第四方面,提供了一种基于区块链的文件处理装置,应用于客户端,包括:发送模块,用于发送对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;接收模块,用于接收所述区块链上的实际下载节点基于所述文件地址信息返回的所述目标文件,所述实际下载节点根据所述网络地址信息确定。
在本申请的一些实施例中,基于上述方案,所述发送模块被配置为:向所述区块链上的候选节点发送对目标文件的文件下载请求,所述候选节点包含从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点。
在本申请的一些实施例中,基于上述方案,所述文件处理装置还包括:下载次数确定模块,用于确定从所述实际下载节点下载文件的下载次数;候选节点确定模块,用于若所述下载次数大于预定次数阈值,则将所述实际下载节点作为所述客户端从所述区块链上下载文件的候选节点。
根据本申请实施例的第五方面,提供了一种文件处理设备,包括:处理器;以及被配置成存储计算机可执行指令的存储器,所述计算机可执行指令在被执行时使所述处理器实现上述第一方面或第二方面中任一项所述的文件处理方法的步骤。
根据本申请实施例的第六方面,提供了一种存储介质,用于存储计算机可执行指令,所述计算机可执行指令在被执行时实现上述第一方面或第二方面中任一项所述的文件处理方法的步骤。
通过本申请实施例中的技术方案,一方面,将目标文件存储在区块链上,能够防止文件被篡改以及文件丢失;另一方面,基于客户端的网络地址信息确定目标文件在区块链上的实际下载节点,从该实际下载节点下载目标文件,不仅能够提高文件的下载效率,而且能够实现去中心化地下载文件,避免中心服务器发生故障导致的文件丢失、无法下载的问题。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1示出了根据本申请的一些实施例提供的文件处理方法的应用场景的示意框图;
图2示出了根据本申请的一些实施例提供的文件处理方法的流程示意图;
图3示出了根据本申请的一些实施例提供的区块链的示意图;
图4示出了根据本申请的一些实施例提供的确定实际下载节点的流程示意图;
图5示出了根据本申请的另一些实施例提供的文件处理方法的流程示意图;
图6示出了根据本申请的再一些实施例提供的文件处理方法的流程示意图;
图7示出了根据本申请的一些实施例提供的文件处理装置的示意框图;
图8示出了根据本申请的另一些实施例提供的文件处理装置的示意框图;以及
图9示出了根据本申请的一些实施例提供的文件处理设备的示意框图。
为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
图1示出了根据本申请的一些实施例提供的文件处理方法的应用场景的示意框图。参照图1所示,该应用场景包括客户端110以及区块链120。区块链120包括节点1至节点6,各个节点上存储有目标文件以及其他节点的网络地址即IP(Internet Protocol,网络协议)地址信息。客户端110向区块链120的节点2发送下载目标文件的文件下载请求,其中,节点2包含区块链120上的其他节点即节点1、3、4、5、6的IP地址信息,区块链120的节点2接收到该文件下载请求之后,从该文件下载请求中提取客户端的IP地址信息,基于客户端的IP地址信息确定距客户端110距离最近的节点例如节点6,将文件下载请求转发至节点6,从节点6下载目标文件,将下载的目标文件返回至客户端110。
在本申请的实施例中,客户端110可以为手机、平板电脑、台式计算机、便携笔记本式计算机或车载计算机等。区块链120能够在不引入第三方中介结构的情况下,为目标文件的存储提供去中心化、不可篡改、安全可靠等特性保证。
下面结合图1的应用场景,参考图2来描述根据本申请的示例性实施例的文件处理方法。需要注意的是,上述应用场景仅是为了便于理解本申请的精神和原理而示出,本申请的实施例在此方面不受任何限制。相反,本申请的实施例可以应用于适用的任何场景。
图2示出了根据本申请的的一些实施例提供的文件处理方法的流程示意图。该文件 处理方法可以应用图1中的区块链的节点上。参照图2所示,该文件处理方法包括步骤S210至步骤S230,下面将结合图2对示例实施例中的文件处理方法进行详细的说明。
在步骤S210中,接收客户端对区块链上的目标文件的文件下载请求,该文件下载请求包含客户端的网络地址信息以及目标文件的文件地址信息。
在示例实施例中,区块链的各个节点上存储有目标文件以及其他节点的网络地址信息,目标文件的文件地址信息可以为对目标文件进行哈希运算之后生成的哈希地址,也可以为其他适当的地址信息。目标文件可以为图片、文本、视频文件,本申请对此不进行特殊限定。
进一步地,客户端的网络地址信息为客户端的IP地址,客户端向区块链上的目标节点发送对目标文件的文件下载请求,该文件下载请求包含客户端的网络地址信息以及目标文件的文件地址信息。区块链上的目标节点接收到该文件下载请求,从该文件下载请求中提取客户端的网络地址信息,目标节点可以为客户端上存储的从区块链上下载文件的历史节点,也可以为用户从区块链的多个节点中选择的节点,还可以为客户端从区块链上的节点下载文件的下载次数大于预定次数阈值例如10次的节点。
在步骤S220中,基于客户端的网络地址信息确定目标文件在区块链上的实际下载节点。
在示例实施例中,区块链的各个节点上存储有其他节点的网络地址信息,基于客户端的网络地址信息以及区块链的各个节点的网络地址信息确定距所述客户端距离最近的节点,例如距客户端地理位置最近或网络位置最近的节点,将距客户端距离最近的节点作为目标文件在区块链上的实际下载节点。
进一步地,在一些示例实施例中,基于客户端的网络地址信息确定区块链上距客户端距离最近的节点;判断该节点的负载是否小于预定阈值;若小于预定阈值,则将该节点作为目标文件在区块链上的实际下载节点;若大于等于该预定阈值,则基于网络地址信息通过负载均衡的方式确定目标文件在区块链上的实际下载节点。通过负载均衡的方式确定目标文件在区块链上的实际下载节点,能够防止节点负载过高导致下载较慢的问题,提高文件下载效率。
此外,在另一些示例实施例中,基于客户端的网络地址信息从候选节点集中选取距客户端距离最近的第一节点,候选节点集包含客户端经常下载文件的节点,举例而言,候选节点集包含所述客户端从区块链上的节点下载文件的下载次数大于预定次数阈值 的节点,将所述第一节点作为所述目标文件在所述区块链上的实际下载节点。通过设置候选节点集,由于候选节点集中的节点是客户端经常下载使用的节点,从而能够快速确定与客户端距离较近并且方便下载的节点,进而能够提高文件的下载效率。
在步骤S230中,基于目标文件的文件地址信息从该实际下载节点下载目标文件,将下载的目标文件返回至客户端。
在示例实施例中,在确定了目标文件在区块上的实际下载节点,则将该文件下载请求转发至该实际下载节点,从文件下载请求中提取目标文件的文件地址信息例如哈希地址信息,基于目标文件的文件地址信息从该实际下载节点查找对应的目标文件,在查找到目标文件之后,下载目标文件并将下载的目标文件返回至客户端。
根据图2的示例实施例中的文件处理方法,一方面,将目标文件存储在区块链上,能够防止文件被篡改以及文件丢失;另一方面,基于客户端的网络地址信息确定目标文件在区块链上的实际下载节点,从该实际下载节点下载目标文件,不仅能够提高文件的下载效率,而且能够实现去中心化地下载文件,避免中心服务器发生故障导致的文件丢失、无法下载的问题。
进一步地,在示例实施例中,对目标文件进行哈希运算,得到目标文件的哈希值,基于目标文件的哈希值以及预定字符串生成目标文件的文件地址信息。通过目标文件的哈希值生成目标文件的文件地址信息,能够防止目标文件的文件内容被篡改,确保文件内容的准确性。通过目标文件的文件地址信息,能够唯一地确认该文件,如果该文件被篡改,该文件的文件地址信息也会发生改变,通过对比文件的文件地址新,就能够确定文件是否被篡改。
此外,在示例实施例中,接收将目标文件上传至区块链的文件上传请求;控制所述区块链上的各个节点对目标文件进行共识处理;若区块链上的各个节点达成共识,则将目标文件同步至区块链的各个节点。通过区块链上的各个节点对目标文件进行共识处理,能够防止文件被篡改,提高文件的安全性。需要说明的是,本申请的共识处理可以采用POW(Proof of Work,工作量证明)的方式,也可以采用POS(Proof of Stake,股权证明)的方式或DPOS(Delegated Proof of Stake,委任权益证明)的方式,本申请对此不进行特殊限定。
进一步地,在示例实施例中,在实际下载节点下载完成之后,将下载的目标文件返回至客户端。为了提高文件传输效率,从文件下载请求中提取客户端的标识信息,根据 该标识信息判断客户端是否为移动客户端,若根据标识信息判定客户端为移动客户端,则对目标文件进行压缩,将压缩后的目标文件返回至客户端。
图3示出了根据本申请的一些实施例提供的区块链的示意图。参照图3所示,区块链上的各个区块上存储有文件和文件哈希地址,每个区块的头部存储有本区块的摘要值和上个区块的摘要值。区块链上的各个区块呈链式数据结构,保证了区块链上的数据的变更只能通过增量的方式进行。在区块链上已经记录的数据将会一直保持创建时的状态,不会被覆盖。
图4示出了根据本申请的一些实施例提供的确定实际下载节点的流程示意图。
参照图4所示,在步骤S410中,基于客户端的网络地址信息从候选节点集中选取距客户端距离最近的候选节点,候选节点集包含客户端从区块链上的节点下载文件的下载次数大于预定次数阈值的节点。
在示例实施例中,候选节点集包含客户端经常从区块链上下载文件的节点,具体而言,候选节点集包含客户端从区块链上的节点下载文件的下载次数大于预定次数阈值的节点。该预定次数阈值可以根据客户端从区块链上下载文件的总次数以及节点数来确定,例如,客户端从区块链上的6个节点共下载了60次文件,该预定次数阈值可以为10次。
此外,在示例实施例中,在从实际下载节点下载完成之后,确定该实际下载节点是否属于该候选节点集;若实际下载节点不属于该候选节点集,则统计从该实际下载节点下载文件的下载次数;若统计的下载次数大于预定次数阈值,则将该实际下载节点加入到候选节点中。
进一步地,在示例实施例中,获取候选节点集中各个候选节点的IP地址信息,基于候选节点的IP地址信息以及客户端的IP地址信息确定距客户端最近的候选节点。
在步骤S420中,将该候选节点作为目标文件在区块链上的实际下载节点。
在示例实施例中,在确定了候选节点集中距客户端距离最近的候选节点之后,可以直接将该候选节点作为目标文件在区块链上的实际下载节点。通过设置候选节点集,由于候选节点集中的节点是客户端经常下载使用的节点,从而能够快速确定与客户端距离较近并且方便下载的节点,进而能够提高文件的下载效率。
此外,在一些实施例中,在确定了候选节点集中距客户端距离最近的候选节点之后,判断该候选节点的负载例如是否小于预定阈值;若小于该预定阈值,则将该候选节点作为目标文件在所述区块链上的实际下载节点;若大于等于该预定阈值,则基于网络地址 信息通过负载均衡的方式确定目标文件在区块链上的实际下载节点。例如,若候选节点的负载过高,可以通过负载均衡的方式从除了该候选节点之外的其他节点中,确定距客户端距离最近并且负载小于该预定阈值的节点,将所确定的节点作为目标文件在区块链上的实际下载节点。通过负载均衡的方式确定目标文件的实际下载节点,能够防止节点负载过高导致下载较慢的问题,提高文件下载效率。
图5示出了根据本申请的另一些实施例提供的文件处理方法的流程示意图。
在步骤S10中,客户端110向区块链120发送下载或上传文件请求,该下载或上传文件请求被发送至候选节点。若为下载文件请求,则判断候选节点的负载是否大于预定阈值,若大于预定阈值,则进行至步骤S20;若为上传文件请求,进行至步骤S30。
在步骤S20中,从文件下载请求中提取客户端的IP地址信息,基于客户端的IP地址信息通过负载均衡的方式将文件下载请求转发至与客户端的地理位置或网络位置最合适的节点,例如最合适的节点为地址位置或网络位置距离客户端最近,并且负载小于预定阈值的节点。
在步骤S30中,控制区块链上的各个节点对待上传文件进行共识处理,若区块链上的各个节点达成共识,则将待上传文件数据同步到区块链上的各个节点。
在步骤S40中,将下载的文件返回至客户端。进一步地,为了提高文件传输效率,从文件下载请求中提取客户端的标识信息,根据该标识信息判断客户端是否为移动客户端,若根据标识信息判定客户端为移动客户端,则对目标文件进行压缩,将压缩后的目标文件返回至客户端。
此外,在示例实施例中,如果用户所处的地理位置过于偏僻,则可以通过自行搭建区块链节点的方式建立用户的下载节点,专为用户提供文件下载服务,以解决请求过慢和请求不能命中的问题。
图6示出了根据本申请的再一些实施例提供的文件处理方法的流程示意图。该文件处理方法应用于客户端,客户端可以为手机、平板电脑、台式计算机、便携笔记本式计算机或车载计算机等。下面结合图6对示例实施例中的文件处理方法进行详细的说明。
参照图6所示,在步骤S610中,发送对区块链上的目标文件的文件下载请求,该文件下载请求包含客户端的网络地址信息以及目标文件的文件地址信息。
在示例实施例中,区块链的各个节点上存储有目标文件以及其他节点的网络地址信息,目标文件的文件地址信息可以为对目标文件进行哈希运算之后生成的哈希地址,也 可以为其他适当的地址信息。目标文件可以为图片、文本、视频文件,本申请对此不进行特殊限定。
进一步地,客户端的网络地址信息为客户端的IP地址,客户端向区块链上的目标节点发送对目标文件的文件下载请求,该文件下载请求包含客户端的网络地址信息以及目标文件的文件地址信息。区块链上的目标节点接收到该文件下载请求,从该文件下载请求中提取客户端的网络地址信息,目标节点可以为客户端上存储的从区块链上下载文件的历史节点,也可以为用户从区块链的多个节点中选择的节点,还可以为客户端从区块链上的节点下载文件的下载次数大于预定次数阈值例如10次的节点。
在步骤S620中,接收区块链上的实际下载节点基于文件地址信息返回的目标文件,该实际下载节点根据客户端的网络地址信息确定。
在示例实施例中,区块链的各个节点上存储有其他节点的网络地址信息,在区块链端,基于客户端的网络地址信息以及区块链的各个节点的网络地址信息确定距所述客户端距离最近的节点,例如距客户端地理位置最近或网络位置最近的节点,将距客户端距离最近的节点作为目标文件在区块链上的实际下载节点。从该实际下载节点下载文件,将下载的文件返回至客户端。
根据图6的示例实施例中的文件处理方法,一方面,将目标文件存储在区块链上,能够防止文件被篡改以及文件丢失;另一方面,基于客户端的网络地址信息确定目标文件在区块链上的实际下载节点,从该实际下载节点下载目标文件,不仅能够提高文件的下载效率,而且能够实现去中心化地下载文件,避免中心服务器发生故障导致的文件丢失、无法下载的问题。
进一步地,在示例实施例中,向区块链上的候选节点发送对目标文件的文件下载请求,候选节点为客户端经常从区块链上下载文件的节点,具体而言,候选节点包含客户端从区块链上的节点下载文件的下载次数大于预定次数阈值的节点。该预定次数阈值可以根据客户端从区块链上下载文件的总次数以及节点数来确定,例如,客户端从区块链上的6个节点共下载了60次文件,该预定次数阈值可以为10次。
此外,在示例实施例中,在客户端接收到返回的目标文件之后,确定从实际下载节点下载文件的下载次数,若下载次数大于预定次数阈值,则将该实际下载节点作为客户端从区块连上下载文件的候选节点。
进一步地,在本申请的示例实施例中,还提供了一种文件处理装置。参照图7所示, 该文件处理装置700包括:第一接收模块710、节点确定模块720以及下载模块730。其中,第一接收模块710用于接收客户端对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;节点确定模块720用于基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点;下载模块730用于基于所述文件地址信息从所述实际下载节点下载所述目标文件,将下载的所述目标文件返回至所述客户端。
在本申请的一些实施例中,基于上述方案,所述节点确定模块720包括:第一节点确定单元,用于基于所述客户端的网络地址信息从候选节点集中选取距所述客户端距离最近的第一节点,所述候选节点集包含所述客户端从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点;下载节点确定单元,用于将所述第一节点作为所述目标文件在所述区块链上的实际下载节点。
在本申请的一些实施例中,基于上述方案,所述下载节点确定单元包括:判断单元,用于判断所述第一节点的负载是否小于第一预定阈值;第一确定单元,用于若小于所述第一预定阈值,则将所述第一节点作为所述目标文件在所述区块链上的实际下载节点;第二确定单元,用于若大于等于所述第一预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
在本申请的一些实施例中,基于上述方案,所述文件处理装置700还包括:节点判断模块,用于在下载完成之后,确定所述实际下载节点是否属于所述候选节点集;下载次数确定模块,用于若所述实际下载节点不属于所述候选节点集,则确定从所述实际下载节点下载文件的下载次数;节点加入模块,用于若所述下载次数大于所述预定次数阈值,则将所述实际下载节点加入到所述候选节点集。
在本申请的一些实施例中,基于上述方案,所述节点确定模块720包括:第二节点确定单元,用于基于所述客户端的网络地址信息确定所述区块链上距所述客户端距离最近的第二节点;负载判断单元,用于判断所述第二节点的负载是否小于第二预定阈值;第三确定单元,用于若小于所述第二预定阈值,则将所述第二节点作为所述目标文件在所述区块链上的实际下载节点;第四确定单元,用于若大于等于所述第二预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
在本申请的一些实施例中,基于上述方案,所述文件处理装置700还包括:转发模块,用于若确定了所述目标文件在所述区块链上的实际下载节点,则将所述文件下载请 求转发至所述实际下载节点;提取模块,用于从所述文件下载请求中提取所述目标文件的所述文件地址信息。
在本申请的一些实施例中,基于上述方案,所述文件处理装置700还包括:哈希处理模块,用于对所述目标文件进行哈希运算,得到所述目标文件的哈希值;地址生成模块,用于基于所述哈希值以及预定字符串生成所述目标文件的所述文件地址信息。
在本申请的一些实施例中,基于上述方案,所述文件处理装置还包括:第二接收模块,用于接收将所述目标文件上传至所述区块链的文件上传请求;共识模块,用于控制所述区块链上的各个节点对所述目标文件进行共识处理;同步模块,用于若所述区块链上的各个节点达成共识,则将所述目标文件同步至所述区块链的各个节点。
在本申请的一些实施例中,基于上述方案,所述下载模块包括:标识提取单元,用于从所述文件下载请求中提取所述客户端的标识信息;压缩单元,用于若根据所述标识信息判定所述客户端为移动客户端,则对所述目标文件进行压缩;返回单元,用于将压缩后的所述目标文件返回至所述客户端。
根据图7的示例实施例中的文件处理装置,一方面,将目标文件存储在区块链上,能够防止文件被篡改以及文件丢失;另一方面,基于客户端的网络地址信息确定目标文件在区块链上的实际下载节点,从该实际下载节点下载目标文件,不仅能够提高文件的下载效率,而且能够实现去中心化地下载文件,避免中心服务器发生故障导致的文件丢失、无法下载的问题。
此外,在本申请的另一些实施例中,还提供了一种基于区块链的文件处理装置,该文件处理装置应用于客户端。参照图800所示,该文件处理装置800包括:发送模块810以及接收模块820。其中,发送模块810用于发送对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;接收模块820用于接收所述区块链上的实际下载节点基于所述文件地址信息返回的所述目标文件,所述实际下载节点根据所述网络地址信息确定。
在本申请的一些实施例中,基于上述方案,所述发送模块810被配置为:向所述区块链上的候选节点发送对目标文件的文件下载请求,所述候选节点包含从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点。
在本申请的一些实施例中,基于上述方案,所述文件处理装置800还包括:下载次数确定模块,用于确定从所述实际下载节点下载文件的下载次数;候选节点确定模块, 用于若所述下载次数大于预定次数阈值,则将所述实际下载节点作为所述客户端从所述区块链上下载文件的候选节点。
本申请实施例提供的文件处理装置能够实现前述方法实施例中的各个过程,并达到相同的功能和效果,这里不再重复。
进一步地,本申请实施例还提供了一种文件处理设备,如图9所示。
文件处理设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器901和存储器902,存储器902中可以存储有一个或一个以上存储应用程序或数据。其中,存储器902可以是短暂存储或持久存储。存储在存储器902的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括对文件处理设备中的一系列计算机可执行指令。更进一步地,处理器901可以设置为与存储器902通信,在文件处理设备上执行存储器902中的一系列计算机可执行指令。文件处理设备还可以包括一个或一个以上电源903,一个或一个以上有线或无线网络接口904,一个或一个以上输入输出接口905,一个或一个以上键盘906等。
在一个具体的实施例中,文件处理设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对文件处理设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:接收客户端对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点;基于所述文件地址信息从所述实际下载节点下载所述目标文件,将下载的所述目标文件返回至所述客户端。
可选地,计算机可执行指令在被执行时,基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点,包括:基于所述客户端的网络地址信息从候选节点集中选取距所述客户端距离最近的第一节点,所述候选节点集包含所述客户端从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点;将所述第一节点作为所述目标文件在所述区块链上的实际下载节点。
可选地,计算机可执行指令在被执行时,将所述第一节点作为所述目标文件在所述区块链上的实际下载节点,包括:判断所述第一节点的负载是否小于第一预定阈值; 若小于所述第一预定阈值,则将所述第一节点作为所述目标文件在所述区块链上的实际下载节点;若大于等于所述第一预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
可选地,计算机可执行指令在被执行时,所述方法还包括:在下载完成之后,确定所述实际下载节点是否属于所述候选节点集;若所述实际下载节点不属于所述候选节点集,则确定从所述实际下载节点下载文件的下载次数;若所述下载次数大于所述预定次数阈值,则将所述实际下载节点加入到所述候选节点集。
可选地,计算机可执行指令在被执行时,基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点,包括:基于所述客户端的网络地址信息确定所述区块链上距所述客户端距离最近的第二节点;判断所述第二节点的负载是否小于第二预定阈值;若小于所述第二预定阈值,则将所述第二节点作为所述目标文件在所述区块链上的实际下载节点;若大于等于所述第二预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
可选地,计算机可执行指令在被执行时,所述方法还包括:若确定了所述目标文件在所述区块链上的实际下载节点,则将所述文件下载请求转发至所述实际下载节点;从所述文件下载请求中提取所述目标文件的所述文件地址信息。
可选地,计算机可执行指令在被执行时,所述方法还包括:对所述目标文件进行哈希运算,得到所述目标文件的哈希值;基于所述哈希值以及预定字符串生成所述目标文件的所述文件地址信息。
可选地,计算机可执行指令在被执行时,所述方法还包括:接收将所述目标文件上传至所述区块链的文件上传请求;控制所述区块链上的各个节点对所述目标文件进行共识处理;若所述区块链上的各个节点达成共识,则将所述目标文件同步至所述区块链的各个节点。
可选地,计算机可执行指令在被执行时,将下载的所述目标文件返回至所述客户端,包括:从所述文件下载请求中提取所述客户端的标识信息;若根据所述标识信息判定所述客户端为移动客户端,则对所述目标文件进行压缩;将压缩后的所述目标文件返回至所述客户端。
本申请实施例提供的文件处理设备能够实现前述方法实施例中的各个过程,并达到相同的功能和效果,这里不再重复。
此外,本申请实施例还提供了一种存储介质,用于存储计算机可执行指令,一种具体的实施例中,该存储介质可以为U盘、光盘、硬盘等,该存储介质存储的计算机可执行指令在被处理器执行时,能实现以下流程:接收客户端对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点;基于所述文件地址信息从所述实际下载节点下载所述目标文件,将下载的所述目标文件返回至所述客户端。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点,包括:基于所述客户端的网络地址信息从候选节点集中选取距所述客户端距离最近的第一节点,所述候选节点集包含所述客户端从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点;将所述第一节点作为所述目标文件在所述区块链上的实际下载节点。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,将所述第一节点作为所述目标文件在所述区块链上的实际下载节点,包括:判断所述第一节点的负载是否小于第一预定阈值;若小于所述第一预定阈值,则将所述第一节点作为所述目标文件在所述区块链上的实际下载节点;若大于等于所述第一预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,所述方法还包括:在下载完成之后,确定所述实际下载节点是否属于所述候选节点集;若所述实际下载节点不属于所述候选节点集,则确定从所述实际下载节点下载文件的下载次数;若所述下载次数大于所述预定次数阈值,则将所述实际下载节点加入到所述候选节点集。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点,包括:基于所述客户端的网络地址信息确定所述区块链上距所述客户端距离最近的第二节点;判断所述第二节点的负载是否小于第二预定阈值;若小于所述第二预定阈值,则将所述第二节点作为所述目标文件在所述区块链上的实际下载节点;若大于等于所述第二预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,所述方法还包括:若确定了所述目标文件在所述区块链上的实际下载节点,则将所述文件下载请求 转发至所述实际下载节点;从所述文件下载请求中提取所述目标文件的所述文件地址信息。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,所述方法还包括:对所述目标文件进行哈希运算,得到所述目标文件的哈希值;基于所述哈希值以及预定字符串生成所述目标文件的所述文件地址信息。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,所述方法还包括:接收将所述目标文件上传至所述区块链的文件上传请求;控制所述区块链上的各个节点对所述目标文件进行共识处理;若所述区块链上的各个节点达成共识,则将所述目标文件同步至所述区块链的各个节点。
可选地,该存储介质存储的计算机可执行指令在被处理器执行时,将下载的所述目标文件返回至所述客户端,包括:从所述文件下载请求中提取所述客户端的标识信息;若根据所述标识信息判定所述客户端为移动客户端,则对所述目标文件进行压缩;将压缩后的所述目标文件返回至所述客户端。
本申请实施例提供的计算机可读存储介质能够实现前述方法实施例中的各个过程,并达到相同的功能和效果,这里不再重复。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、 Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中 的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且 还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。
Claims (26)
- 一种基于区块链的文件处理方法,其特征在于,包括:接收客户端对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点;基于所述文件地址信息从所述实际下载节点下载所述目标文件,将下载的所述目标文件返回至所述客户端。
- 根据权利要求1所述的文件处理方法,其特征在于,基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点,包括:基于所述客户端的网络地址信息从候选节点集中选取距所述客户端距离最近的第一节点,所述候选节点集包含所述客户端从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点;将所述第一节点作为所述目标文件在所述区块链上的实际下载节点。
- 根据权利要求2所述的文件处理方法,其特征在于,将所述第一节点作为所述目标文件在所述区块链上的实际下载节点,包括:判断所述第一节点的负载是否小于第一预定阈值;若小于所述第一预定阈值,则将所述第一节点作为所述目标文件在所述区块链上的实际下载节点;若大于等于所述第一预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
- 根据权利要求3所述的文件处理方法,其特征在于,所述方法还包括:在下载完成之后,确定所述实际下载节点是否属于所述候选节点集;若所述实际下载节点不属于所述候选节点集,则确定从所述实际下载节点下载文件的下载次数;若所述下载次数大于所述预定次数阈值,则将所述实际下载节点加入到所述候选节点集。
- 根据权利要求1所述的文件处理方法,其特征在于,基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点,包括:基于所述客户端的网络地址信息确定所述区块链上距所述客户端距离最近的第二节点;判断所述第二节点的负载是否小于第二预定阈值;若小于所述第二预定阈值,则将所述第二节点作为所述目标文件在所述区块链上的实际下载节点;若大于等于所述第二预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
- 根据权利要求1所述的文件处理方法,其特征在于,所述方法还包括:若确定了所述目标文件在所述区块链上的实际下载节点,则将所述文件下载请求转发至所述实际下载节点;从所述文件下载请求中提取所述目标文件的所述文件地址信息。
- 根据权利要求6所述的文件处理方法,其特征在于,所述方法还包括:对所述目标文件进行哈希运算,得到所述目标文件的哈希值;基于所述哈希值以及预定字符串生成所述目标文件的所述文件地址信息。
- 根据权利要求7所述的文件处理方法,其特征在于,所述方法还包括:接收将所述目标文件上传至所述区块链的文件上传请求;控制所述区块链上的各个节点对所述目标文件进行共识处理;若所述区块链上的各个节点达成共识,则将所述目标文件同步至所述区块链的各个节点。
- 根据权利要求1至8中任一项所述的文件处理方法,其特征在于,将下载的所述目标文件返回至所述客户端,包括:从所述文件下载请求中提取所述客户端的标识信息;若根据所述标识信息判定所述客户端为移动客户端,则对所述目标文件进行压缩;将压缩后的所述目标文件返回至所述客户端。
- 一种基于区块链的文件处理方法,应用于客户端,其特征在于,包括:发送对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;接收所述区块链上的实际下载节点基于所述文件地址信息返回的所述目标文件,所述实际下载节点根据所述网络地址信息确定。
- 根据权利要求10所述的文件处理方法,其特征在于,发送对区块链上的目标文件的文件下载请求,包括:向所述区块链上的候选节点发送对目标文件的文件下载请求,所述候选节点包含从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点。
- 根据权利要求11所述的文件处理方法,其特征在于,所述文件处理方法还包括:确定从所述实际下载节点下载文件的下载次数;若所述下载次数大于预定次数阈值,则将所述实际下载节点作为所述客户端从所述区块链上下载文件的候选节点。
- 一种基于区块链的文件处理装置,其特征在于,包括:第一接收模块,用于接收客户端对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;节点确定模块,用于基于所述客户端的网络地址信息确定所述目标文件在所述区块链上的实际下载节点;下载模块,用于基于所述文件地址信息从所述实际下载节点下载所述目标文件,将下载的所述目标文件返回至所述客户端。
- 根据权利要求13所述的文件处理装置,其特征在于,所述节点确定模块包括:第一节点确定单元,用于基于所述客户端的网络地址信息从候选节点集中选取距所述客户端距离最近的第一节点,所述候选节点集包含所述客户端从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点;下载节点确定单元,用于将所述第一节点作为所述目标文件在所述区块链上的实际下载节点。
- 根据权利要求14所述的文件处理装置,其特征在于,所述下载节点确定单元包括:判断单元,用于判断所述第一节点的负载是否小于第一预定阈值;第一确定单元,用于若小于所述第一预定阈值,则将所述第一节点作为所述目标文件在所述区块链上的实际下载节点;第二确定单元,用于若大于等于所述第一预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
- 根据权利要求15所述的文件处理装置,其特征在于,所述文件处理装置还包括:节点判断模块,用于在下载完成之后,确定所述实际下载节点是否属于所述候选节点集;下载次数确定模块,用于若所述实际下载节点不属于所述候选节点集,则确定从所述实际下载节点下载文件的下载次数;节点加入模块,用于若所述下载次数大于所述预定次数阈值,则将所述实际下载节点加入到所述候选节点集。
- 根据权利要求13所述的文件处理装置,其特征在于,所述节点确定模块包括:第二节点确定单元,用于基于所述客户端的网络地址信息确定所述区块链上距所述客户端距离最近的第二节点;负载判断单元,用于判断所述第二节点的负载是否小于第二预定阈值;第三确定单元,用于若小于所述第二预定阈值,则将所述第二节点作为所述目标文件在所述区块链上的实际下载节点;第四确定单元,用于若大于等于所述第二预定阈值,则基于所述网络地址信息通过负载均衡的方式确定所述目标文件在所述区块链上的实际下载节点。
- 根据权利要求13所述的文件处理装置,其特征在于,所述文件处理装置还包括:转发模块,用于若确定了所述目标文件在所述区块链上的实际下载节点,则将所述文件下载请求转发至所述实际下载节点;提取模块,用于从所述文件下载请求中提取所述目标文件的所述文件地址信息。
- 根据权利要求18所述的文件处理装置,其特征在于,所述文件处理装置还包括:哈希处理模块,用于对所述目标文件进行哈希运算,得到所述目标文件的哈希值;地址生成模块,用于基于所述哈希值以及预定字符串生成所述目标文件的所述文件地址信息。
- 根据权利要求19所述的文件处理装置,其特征在于,所述文件处理装置还包括:第二接收模块,用于接收将所述目标文件上传至所述区块链的文件上传请求;共识模块,用于控制所述区块链上的各个节点对所述目标文件进行共识处理;同步模块,用于若所述区块链上的各个节点达成共识,则将所述目标文件同步至所述区块链的各个节点。
- 根据权利要求13至20中任一项所述的文件处理装置,其特征在于,所述下载模块包括:标识提取单元,用于从所述文件下载请求中提取所述客户端的标识信息;压缩单元,用于若根据所述标识信息判定所述客户端为移动客户端,则对所述目标文件进行压缩;返回单元,用于将压缩后的所述目标文件返回至所述客户端。
- 一种基于区块链的文件处理装置,应用于客户端,其特征在于,包括:发送模块,用于发送对区块链上的目标文件的文件下载请求,所述文件下载请求包含所述客户端的网络地址信息以及所述目标文件的文件地址信息;接收模块,用于接收所述区块链上的实际下载节点基于所述文件地址信息返回的所述目标文件,所述实际下载节点根据所述网络地址信息确定。
- 根据权利要求22所述的文件处理装置,其特征在于,所述发送模块被配置为:向所述区块链上的候选节点发送对目标文件的文件下载请求,所述候选节点包含从所述区块链上的节点下载文件的下载次数大于预定次数阈值的节点。
- 根据权利要求23所述的文件处理装置,其特征在于,所述文件处理装置还包括:下载次数确定模块,用于确定从所述实际下载节点下载文件的下载次数;候选节点确定模块,用于若所述下载次数大于预定次数阈值,则将所述实际下载节点作为所述客户端从所述区块链上下载文件的候选节点。
- 一种文件处理设备,其特征在于,包括:处理器;以及被配置成存储计算机可执行指令的存储器,所述计算机可执行指令在被执行时使所述处理器实现上述权利要求1至12中任一项所述的文件处理方法。
- 一种存储介质,用于存储计算机可执行指令,其特征在于,所述计算机可执行指令在被执行时实现上述权利要求1至12中任一项所述的文件处理方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US16/887,578 US11122110B2 (en) | 2019-06-11 | 2020-05-29 | Blockchain-based file processing method, apparatus, and device, and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910502607.2 | 2019-06-11 | ||
| CN201910502607.2A CN110298194B (zh) | 2019-06-11 | 2019-06-11 | 基于区块链的文件处理方法、装置、设备及存储介质 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US16/887,578 Continuation US11122110B2 (en) | 2019-06-11 | 2020-05-29 | Blockchain-based file processing method, apparatus, and device, and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020248599A1 true WO2020248599A1 (zh) | 2020-12-17 |
Family
ID=68027814
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/071131 Ceased WO2020248599A1 (zh) | 2019-06-11 | 2020-01-09 | 基于区块链的文件处理方法、装置、设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (2) | CN110298194B (zh) |
| WO (1) | WO2020248599A1 (zh) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114338603A (zh) * | 2021-12-31 | 2022-04-12 | 中国电信股份有限公司 | 边缘应用服务器的发现方法、设备、区块链系统及介质 |
| CN115865935A (zh) * | 2022-11-30 | 2023-03-28 | 杭州趣链科技有限公司 | 区块链网络中的信息传输方法、装置、设备及介质 |
| CN116886776A (zh) * | 2023-08-04 | 2023-10-13 | 中国工商银行股份有限公司 | 一种基于传输热点的存储节点自适应调整方法及装置 |
| WO2025246737A1 (zh) * | 2024-05-30 | 2025-12-04 | 广东保伦电子股份有限公司 | 一种基于内网的文件在线预览方法、装置及存储介质 |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11122110B2 (en) | 2019-06-11 | 2021-09-14 | Advanced New Technologies Co., Ltd. | Blockchain-based file processing method, apparatus, and device, and storage medium |
| CN110298194B (zh) * | 2019-06-11 | 2024-02-02 | 创新先进技术有限公司 | 基于区块链的文件处理方法、装置、设备及存储介质 |
| CN110830565B (zh) * | 2019-10-31 | 2023-04-18 | 北京奇艺世纪科技有限公司 | 资源下载方法、装置、系统、电子设备及存储介质 |
| CN113468118B (zh) * | 2021-05-11 | 2023-09-22 | 深圳前海移联科技有限公司 | 一种基于区块链的文件增量存储方法、装置及存储介质 |
| CN113259449A (zh) * | 2021-05-27 | 2021-08-13 | 四块科技(深圳)有限公司 | 分布式存储方法、装置、设备及存储介质 |
| CN113438308B (zh) * | 2021-06-23 | 2022-12-23 | 上海简苏网络科技有限公司 | 一种基于区块链的高效通信方法及系统 |
| CN115118712B (zh) * | 2022-06-06 | 2024-07-26 | 蚂蚁区块链科技(上海)有限公司 | 一种文件传输的方法及装置 |
| CN115118711A (zh) * | 2022-06-06 | 2022-09-27 | 蚂蚁区块链科技(上海)有限公司 | 一种文件传输的方法及装置 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170279783A1 (en) * | 2016-03-28 | 2017-09-28 | Accenture Global Solutions Limited | Secure 3d model sharing using distributed ledger |
| CN107770115A (zh) * | 2016-08-15 | 2018-03-06 | 华为技术有限公司 | 在对等网络中分发数字内容的方法和系统 |
| CN108667935A (zh) * | 2018-05-11 | 2018-10-16 | 深圳市网心科技有限公司 | 网络业务方法、服务器、网络系统和存储介质 |
| CN108683728A (zh) * | 2018-05-11 | 2018-10-19 | 深圳市网心科技有限公司 | 数据传输方法、服务器、终端、网络系统和存储介质 |
| CN110298194A (zh) * | 2019-06-11 | 2019-10-01 | 阿里巴巴集团控股有限公司 | 基于区块链的文件处理方法、装置、设备及存储介质 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101018172A (zh) * | 2007-02-09 | 2007-08-15 | 浪潮电子信息产业股份有限公司 | 一种优化城域网内p2p传输的方法 |
| CN101399738B (zh) * | 2007-09-28 | 2011-04-20 | 华为技术有限公司 | 提供下载推荐服务的方法、结构化对等网络和其中的节点 |
| CN101710904B (zh) * | 2009-12-21 | 2013-01-09 | 中国科学院计算技术研究所 | P2p流量优化方法及其系统 |
| CN103731472B (zh) * | 2011-06-15 | 2018-01-16 | 北京奇虎科技有限公司 | 采用p2p技术下载文件的方法和系统、客户端 |
| CN108737498A (zh) * | 2018-04-18 | 2018-11-02 | 中国地质大学(武汉) | 一种基于区块链的p2p安全下载检测方法及系统 |
-
2019
- 2019-06-11 CN CN201910502607.2A patent/CN110298194B/zh active Active
- 2019-06-11 CN CN202410067599.4A patent/CN117932668A/zh active Pending
-
2020
- 2020-01-09 WO PCT/CN2020/071131 patent/WO2020248599A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170279783A1 (en) * | 2016-03-28 | 2017-09-28 | Accenture Global Solutions Limited | Secure 3d model sharing using distributed ledger |
| CN107770115A (zh) * | 2016-08-15 | 2018-03-06 | 华为技术有限公司 | 在对等网络中分发数字内容的方法和系统 |
| CN108667935A (zh) * | 2018-05-11 | 2018-10-16 | 深圳市网心科技有限公司 | 网络业务方法、服务器、网络系统和存储介质 |
| CN108683728A (zh) * | 2018-05-11 | 2018-10-19 | 深圳市网心科技有限公司 | 数据传输方法、服务器、终端、网络系统和存储介质 |
| CN110298194A (zh) * | 2019-06-11 | 2019-10-01 | 阿里巴巴集团控股有限公司 | 基于区块链的文件处理方法、装置、设备及存储介质 |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114338603A (zh) * | 2021-12-31 | 2022-04-12 | 中国电信股份有限公司 | 边缘应用服务器的发现方法、设备、区块链系统及介质 |
| CN115865935A (zh) * | 2022-11-30 | 2023-03-28 | 杭州趣链科技有限公司 | 区块链网络中的信息传输方法、装置、设备及介质 |
| CN116886776A (zh) * | 2023-08-04 | 2023-10-13 | 中国工商银行股份有限公司 | 一种基于传输热点的存储节点自适应调整方法及装置 |
| WO2025246737A1 (zh) * | 2024-05-30 | 2025-12-04 | 广东保伦电子股份有限公司 | 一种基于内网的文件在线预览方法、装置及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117932668A (zh) | 2024-04-26 |
| CN110298194B (zh) | 2024-02-02 |
| CN110298194A (zh) | 2019-10-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020248599A1 (zh) | 基于区块链的文件处理方法、装置、设备及存储介质 | |
| US11122110B2 (en) | Blockchain-based file processing method, apparatus, and device, and storage medium | |
| US11366925B2 (en) | Methods and apparatuses for chaining service data | |
| TW201901478A (zh) | 區塊鏈業務受理及業務共識方法及裝置 | |
| CN107580013B (zh) | 跨域请求数据的方法及装置 | |
| TW201901479A (zh) | 基於區塊鏈的資料處理方法及設備 | |
| TWI694700B (zh) | 資料處理方法和裝置、用戶端 | |
| US11005947B2 (en) | Network information processing | |
| CN110781192B (zh) | 区块链数据的验证方法、装置及设备 | |
| CN105573667A (zh) | 一种数据读取方法和存储服务器 | |
| CN109241026B (zh) | 数据管理的方法、装置及系统 | |
| CN106534268B (zh) | 一种数据共享方法及装置 | |
| WO2020228368A1 (zh) | 基于区块链的图片处理方法及装置 | |
| CN109145053B (zh) | 数据处理方法和装置、客户端、服务器 | |
| CN115617799A (zh) | 一种数据存储的方法、装置、设备及存储介质 | |
| CN115514800A (zh) | 一种设备网络连接方法、装置、电子设备、服务器及系统 | |
| CN106331048B (zh) | 一种数据处理方法、装置、系统及移动设备 | |
| CN115129728A (zh) | 一种文件校验的方法及装置 | |
| CN107070770B (zh) | 一种资源传输方法及装置 | |
| CN108614714A (zh) | 一种动态库更新方法、装置及存储介质 | |
| CN108520448A (zh) | 事件管理方法及装置 | |
| CN111221781B (zh) | 一种数据查找方法、装置、电子设备及系统 | |
| CN116383202A (zh) | 数据处理方法、相关设备及系统 | |
| HK40014505B (zh) | 基於区块链的文件处理方法、装置、设备及存储介质 | |
| HK40014505A (zh) | 基於区块链的文件处理方法、装置、设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20823269 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20823269 Country of ref document: EP Kind code of ref document: A1 |