Data transmission method and apparatus
By initiating multiple download requests to the target download node in an untrusted network environment, and using encryption and perturbation techniques to hide the real needs, the problem of malicious nodes spying on privacy is solved, and secure data transmission is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-17
- Publication Date
- 2026-03-10
AI Technical Summary
In untrusted online environments, existing technologies cannot effectively protect user privacy. Malicious nodes can spy on users' download requests and resource content, leading to privacy leaks.
By sending multiple download requests to the target download node, with the real target download request hidden within the fictitious download request, encryption and perturbation techniques are used to protect user privacy, ensuring that only the target data is decrypted by the requesting node, while other data cannot be decrypted.
In untrusted network environments, it effectively protects the privacy of users and target download nodes, improves data transmission security, and does not rely on trusted third parties.
Smart Images

Figure CN114024949B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data transmission, specifically to a data transmission method and apparatus. Background Technology
[0002] With the widespread adoption of high-speed internet and the increased computing and storage capabilities of personal computers, internet users can share files over networks. For example, internet users can utilize the numerous storage nodes scattered across the internet to distribute stored data across all network nodes. Each network node can then utilize its idle storage space to perform storage tasks, thereby achieving massive storage capacity.
[0003] When a user needs to download resources, they can send a download request to a download node to execute the download. However, during this process, malicious download nodes can spy on the resources requested by the user, thereby invading the user's privacy.
[0004] To address these issues, existing technologies typically assume the existence of a trusted third party within the network, such as a trusted node or a trusted execution environment, thus enabling security and privacy protection through trusted nodes. However, this approach cannot be applied to untrusted network environments.
[0005] Therefore, how to achieve secure data transmission has become an urgent problem to be solved. Summary of the Invention
[0006] This application provides a data transmission method and apparatus that can improve the security of data transmission in untrusted network environments and protect user privacy to a certain extent.
[0007] Firstly, a data transmission method is provided, comprising: a requesting node initiating M download requests to a target downloading node, wherein the M download requests include a real target download request used to request the download of target data, and the remaining M-1 download requests are fictitious download requests, where M is an integer greater than 1; receiving feedback data sent by the target downloading node based on the M download requests; and obtaining the target data based on the feedback data.
[0008] For example, target data can also be target resources or target files, and the specific form of data is not limited in the embodiments of this application.
[0009] The target download node stores the target data. There can be one or more target download nodes.
[0010] A real target download request refers to a download request corresponding to the target data needed by the requesting node. A fictitious download request refers to a download request that the requesting node does not need. It should be noted that the data requested by the fictitious download request may or may not be stored on the target download node. The data requested by the fictitious download request may or may not exist.
[0011] For example, a requesting node initiating M download requests to a target downloading node may include: the requesting node directly sending M download requests to the target downloading node. Alternatively, a requesting node initiating M download requests to a target downloading node may also include: the requesting node sending M download requests to the target downloading node through other network nodes.
[0012] The feedback data may include data requested by at least one of the M download requests. The feedback data may also include a prompt message. This prompt message is used to indicate that no relevant data was found when the data requested by the download request is not stored on the target download node.
[0013] According to the solution in this application embodiment, when a requesting node needs to download target data, multiple download requests are sent concurrently, hiding the target download request within these multiple requests. This prevents the target downloading node from accurately knowing the true needs of the requesting node, thus protecting user privacy to some extent. The solution in this application embodiment does not rely on any trusted third party, completing data transmission in an untrusted network environment, thereby improving the security of data transmission in untrusted network environments.
[0014] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: obtaining the public key of the target download node and the perturbation values corresponding to M download requests; encrypting the symmetric key of the request node using the public key of the target download node; perturbing the encryption result using the perturbation values corresponding to the target download requests; sending the perturbation result to the target download node; and obtaining target data based on feedback data, including: decrypting the feedback data using the symmetric key of the request node to obtain the target data; wherein the feedback data includes encrypted data, which is obtained based on the perturbation result.
[0015] The encrypted data is obtained by encrypting the data requested by each of the M download requests using the keys corresponding to the M download requests. The keys corresponding to the M download requests are obtained by decrypting the descrambling results corresponding to the M download requests using the private key of the target download node. The descrambling results corresponding to the M download requests are obtained by descrambling the perturbation results corresponding to the M download requests.
[0016] The public key of the target download node can be pre-stored in the requesting node, or the public key of the target download node can be sent from the target download node to the requesting node.
[0017] The requesting node can obtain the perturbation value in various ways. The perturbation value can be pre-stored, or it can be generated as needed. This application embodiment does not limit the method of obtaining the perturbation value; other methods of obtaining the perturbation value can also be applied to the scheme of this application embodiment. For example, other nodes can also send the perturbation value to the requesting node and the target download node.
[0018] According to the scheme in this application embodiment, the target download node is unaware of the requesting node's true needs. Of the keys obtained after descrambling and decrypting using M perturbation values, only one is the requesting node's symmetric key. After encrypting the corresponding data using these keys, the requesting node can only decrypt the target data using its own symmetric key, and cannot decrypt any other data. In this way, the requesting node can only obtain the target data it needs, and cannot obtain other data from the target download node, thus ensuring the privacy of the target download node. In other words, the privacy of both the requesting node and the target download node is protected simultaneously.
[0019] In conjunction with the first aspect, in some implementations of the first aspect, the method is applied to a distributed structured P2P storage network, and the method further includes: obtaining the hash value of the target data; and determining M download requests based on the hash value of the target data.
[0020] The hash value of the target data can be generated based on relevant information about the target data. This relevant information includes the data's name, keywords, or content.
[0021] In a distributed structured P2P storage network, there can be a one-to-one correspondence between the hash value and the data. Download requests can be determined based on hash values. For example, if the hash value of the target data is K1, then a target download request can be used to request the data corresponding to K1. Besides the target download request, the remaining M-1 download requests can be used to request the data corresponding to the other M-1 hash values.
[0022] In conjunction with the first aspect, in some implementations of the first aspect, determining M download requests based on the hash value of the target data includes: generating M-1 hash values that are closest to the hash value of the target data; and using the download requests based on the M hash values as the M download requests.
[0023] This distance is the logical distance, which can be calculated using algorithms such as the Kademlia algorithm or the Chord algorithm.
[0024] The nearest hash value can be the nearest hash value to the target data among hash values greater than the target data. Alternatively, the nearest hash value can be the nearest hash value to the target data among hash values less than the target data. Alternatively, the nearest hash value can be the nearest hash value to the target data centered on the target data's hash value. This application does not limit this approach.
[0025] According to the scheme of this application embodiment, when the data is stored on the network node corresponding to the node ID that is equal to or similar to the hash value of the data, the data requested by the M-1 download requests determined in this way is more likely to be stored on the target download node, which is beneficial to hiding the true needs of the requesting node.
[0026] In conjunction with the first aspect, in some implementations of the first aspect, before the requesting node initiates M download requests to the target downloading node, the method further includes: the requesting node initiating K retrieval requests to the indexing node, wherein the K retrieval requests include real target retrieval requests, which are used to request the target downloading node to retrieve target data, and the remaining K-1 retrieval requests are fictitious retrieval requests, where K is an integer greater than 1; receiving index information sent by the indexing node based on the K retrieval requests, wherein the index information is used to indicate the downloading node of the data; and determining the target downloading node based on the index information.
[0027] An index node refers to a network node that stores index information.
[0028] A real target retrieval request refers to a retrieval request corresponding to the target data that the requesting node needs to retrieve. A fictitious retrieval request refers to a retrieval request that the requesting node does not need. It should be noted that the data requested in the fictitious retrieval request may or may not exist.
[0029] For example, a requesting node initiating K retrieval requests to an indexing node may include: the requesting node directly sending K retrieval requests to the indexing node. Alternatively, a requesting node initiating K retrieval requests to an indexing node may also include: the requesting node sending K retrieval requests to a target downloading node through other network nodes.
[0030] For example, the index information may include information indicating the download node for data requested by at least one of the K search requests. Alternatively, the index information may also include a prompt message. This prompt message is used to indicate that no relevant data was found when the data requested by the search request does not exist.
[0031] According to the solution of this application embodiment, multiple search requests are concurrently processed, and the target search request is hidden among the multiple search requests. This prevents intermediate nodes from accurately knowing the true needs of the requesting nodes, thus protecting user privacy to a certain extent. The solution of this application embodiment does not rely on any trusted third party and completes data retrieval in an untrusted network environment, improving the security of data transmission in such environments.
[0032] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: determining the remaining M-1 download requests based on the first index information in the index information, wherein the download node indicated by the first index information is the target download node.
[0033] Determining the remaining M-1 download requests based on the first index information in the index information may include: determining the data requested to be downloaded by the remaining M-1 download requests based on the data requested to be retrieved by the search request corresponding to the first index information.
[0034] In other words, the data requested by the remaining M-1 download requests is located on the target download node.
[0035] According to the scheme of this application embodiment, the remaining M-1 download requests are determined based on the feedback index information, which can ensure that the data requested by the remaining M-1 download requests are also stored on the target download node. The target download node cannot know the real needs of the requesting node, which is beneficial to protecting the privacy of the requesting node.
[0036] In conjunction with the first aspect, in some implementations of the first aspect, determining the remaining M-1 download requests based on the first index information in the index information includes: if the number of first index information is greater than or equal to a first threshold, determining the remaining M-1 download requests based on the first index information in the index information.
[0037] According to the solution of this application embodiment, when there is a large amount of data stored on the target download node in the requested data, more download requests can be initiated to the target download node, increasing the difficulty for the target download node to spy on the privacy of the requesting node.
[0038] In conjunction with the first aspect, in some implementations of the first aspect, determining the remaining M-1 download requests based on the first index information in the index information includes: increasing the value of K if the number of first index information is less than a first threshold; initiating K retrieval requests to the index node again; repeating the above process until the number of first index information is greater than or equal to the first threshold, and determining the remaining M-1 download requests based on the first index information in the index information.
[0039] According to the scheme of this application embodiment, when the amount of data stored on the target download node in the requested data is small, the requesting node initiates more search requests to increase the amount of data stored on the target download node in the requested data. This allows for more download requests to the target download node, increasing the difficulty for the target download node to spy on the privacy of the requesting node.
[0040] In conjunction with the first aspect, in some implementations of the first aspect, the method is applied to a distributed structured P2P storage network, and the method further includes: obtaining the hash value of the target data; and determining K retrieval requests based on the hash value of the target data.
[0041] The hash value of the target data can be generated based on relevant information about the target data. This relevant information includes the data's name, keywords, or content.
[0042] In a distributed structured P2P storage network, there can be a one-to-one correspondence between the hash value and the data. Retrieval requests can be determined based on hash values. For example, if the hash value of the target data is K1, then a target retrieval request can be used to request the index information of the data corresponding to K1. Besides the target retrieval request, the remaining K-1 retrieval requests can be used to request the index information of the data corresponding to the remaining K-1 hash values.
[0043] In conjunction with the first aspect, in some implementations of the first aspect, determining K retrieval requests based on the hash value of the target data includes: generating K-1 hash values that are closest to the hash value of the target data; and using retrieval requests for the K hash values as K retrieval requests.
[0044] This distance is the logical distance, which can be calculated using algorithms such as the Kademlia algorithm or the Chord algorithm.
[0045] The nearest hash value can be the nearest hash value to the target data among hash values greater than the target data. Alternatively, the nearest hash value can be the nearest hash value to the target data among hash values less than the target data. Alternatively, the nearest hash value can be the nearest hash value to the target data centered on the target data's hash value. This application does not limit this approach.
[0046] According to the scheme of this application embodiment, when the index information of the data is stored on the network node corresponding to the node ID that is equal to or similar to the hash value of the data, the index information requested by the K-1 retrieval requests determined in this way is more likely to exist on the index node corresponding to the target data. This is beneficial to hide the real needs of the requesting node from the index node corresponding to the target data and protect the privacy of the requesting node.
[0047] Secondly, a data transmission method is provided, comprising: a download node receiving M download requests sent by a requesting node, where M is an integer greater than 1; receiving a perturbation result sent by the requesting node; descrambling the perturbation result using the perturbation values corresponding to the M download requests to obtain descrambling results corresponding to the M download requests; decrypting the descrambling results corresponding to the M download requests using the private key of the download node to obtain keys corresponding to the M download requests; encrypting the data requested by the M download requests using the keys corresponding to the M download requests to obtain M encrypted data; and sending the M encrypted data to the requesting node.
[0048] The perturbation result is obtained by perturbing the encrypted result with the perturbation value corresponding to the target download request, and the encryption result is obtained by encrypting the symmetric key of the requesting node with the public key of the downloading node.
[0049] According to the scheme in this application embodiment, the target download node is unaware of the requesting node's true needs. Of the keys obtained after descrambling and decrypting using M perturbation values, only one is the requesting node's symmetric key. After encrypting the corresponding data using these keys, the requesting node can only decrypt the target data using its own symmetric key. In this way, the requesting node can only obtain the target data it needs and cannot obtain other data from the target download node, thus ensuring the privacy of the target download node. In other words, the privacy of both the requesting node and the target download node is protected simultaneously.
[0050] In conjunction with the second aspect, in some implementations of the second aspect, the perturbation result is obtained by encrypting the encryption result using the perturbation value corresponding to the target download request, and the method also includes: sending the public key of the download node to the request node, the public key being used to encrypt the symmetric key of the request node to obtain the encryption result.
[0051] Thirdly, a data transmission apparatus is provided, the apparatus including a module or unit for performing the method described in the first aspect and any implementation thereof.
[0052] Fourthly, a data transmission apparatus is provided, the apparatus comprising a module or unit for performing the methods of the second aspect and any implementation thereof.
[0053] Fifthly, a data transmission system is provided, the system comprising the apparatus of the third aspect and the apparatus of the fourth aspect.
[0054] In a sixth aspect, a data transmission apparatus is provided, comprising: a memory for storing a program; and a processor for executing the program stored in the memory, wherein when the program stored in the memory is executed, the processor executes the method described in the first aspect and any implementation thereof.
[0055] In a seventh aspect, a data transmission apparatus is provided, comprising: a memory for storing a program; and a processor for executing the program stored in the memory, wherein when the program stored in the memory is executed, the processor executes the method described in the second aspect and any implementation thereof.
[0056] Eighthly, a computer-readable medium is provided that stores program code for execution by a device, the program code including methods for performing any of the implementations of the foregoing aspects.
[0057] Ninth aspect, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to perform the method in any of the above-mentioned implementations.
[0058] In a tenth aspect, a chip is provided, the chip including a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface and executes the method in any of the above-mentioned implementations.
[0059] Optionally, as one implementation, the chip may further include a memory storing instructions, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to perform the method in any of the above-described aspects.
[0060] The aforementioned chip can be a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC). Attached Figure Description
[0061] Figure 1 A schematic structural diagram of a centralized P2P storage network provided for embodiments of this application;
[0062] Figure 2 A schematic structural diagram of a distributed unstructured P2P storage network provided for embodiments of this application;
[0063] Figure 3A schematic structural diagram of a distributed structured P2P storage network provided for embodiments of this application;
[0064] Figure 4 A schematic flowchart illustrating a data download process in a P2P storage network, provided as an embodiment of this application;
[0065] Figure 5 A schematic flowchart illustrating a data transmission method provided in an embodiment of this application;
[0066] Figure 6 A schematic flowchart illustrating a data retrieval method provided in an embodiment of this application;
[0067] Figure 7 A schematic structural diagram illustrating a file storage format in a P2P storage network, provided as an embodiment of this application;
[0068] Figure 8 A schematic flowchart illustrating a data transmission method provided in an embodiment of this application;
[0069] Figure 9 A schematic flowchart illustrating a data retrieval process in a P2P storage network, provided as an embodiment of this application;
[0070] Figure 10 A schematic flowchart illustrating a data transmission process provided in an embodiment of this application;
[0071] Figure 11 A schematic flowchart illustrating a data transmission process provided in an embodiment of this application;
[0072] Figure 12 A schematic flowchart illustrating another data transmission method provided in an embodiment of this application;
[0073] Figure 13 A schematic flowchart illustrating a data retrieval process provided in an embodiment of this application;
[0074] Figure 14 A schematic block diagram of a data transmission device provided in an embodiment of this application;
[0075] Figure 15 A schematic block diagram of another data transmission apparatus provided in the embodiments of this application;
[0076] Figure 16 A schematic block diagram of another data transmission device provided in the embodiments of this application;
[0077] Figure 17 This is a schematic block diagram of another data transmission device provided in an embodiment of this application. Detailed Implementation
[0078] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0079] The technical solutions of this application embodiment can be applied to data transmission scenarios between devices. For example, the technical solutions of this application embodiment can be used to implement distributed storage networks. Specifically, the technical solutions of this application embodiment can be applied to cloud storage networks, content delivery networks (CDNs), or P2P storage networks.
[0080] This application primarily uses a P2P storage network as an example to describe the data transmission method of this application embodiment. For ease of understanding and description, the P2P storage network and related terminology are explained below.
[0081] With the widespread adoption of high-speed internet and the improvement of personal computer computing and storage capabilities, peer-to-peer (P2P) computing technology has gradually gained widespread application. Through P2P technology, internet users can utilize the numerous computing and storage nodes distributed across the internet to distribute computing tasks or stored data across all network nodes. Each network node can then utilize its idle computing power or storage space to execute computing or storage tasks, thereby achieving high-performance computing and massive storage.
[0082] File storage, sharing, and downloading are among the most widely used applications of P2P technology. P2P storage networks include various topologies, such as centralized P2P storage networks, distributed unstructured P2P storage networks, distributed structured P2P storage networks, hierarchical P2P storage networks, or hybrid P2P storage networks.
[0083] The topologies of the three P2P storage networks and their corresponding file retrieval and download methods are described below.
[0084] (1) Centralized P2P storage network
[0085] A centralized P2P storage network consists of a central index server and other network nodes. The central index server stores the indexes and storage location information of all user-uploaded files. In a centralized P2P storage network, this index server can also act as an index node.
[0086] In a centralized P2P storage network, all files are registered with a central index server. When a network node needs a file, it first connects to the central index server to retrieve it. That is, the retrieval request for the file is sent to the central index server, which returns the file's index information, i.e., a list of all download nodes for that file. The network node then establishes a connection with the network node indicated by the index information to download the required file. The network node indicated by the index information is the storage node, or download node. Figure 1 The storage network shown includes an index server 101, network node 102, network node 103, network node 104, and network node 105. When network node 103 needs a file, it first connects to the index server 101 to query the index information. After the index server 101 retrieves the file, it finds that the file is stored on network node 104 and sends the file's index information back to network node 103. Network node 103 then establishes a connection with network node 104 and downloads the required file.
[0087] (2) Distributed unstructured P2P storage network
[0088] In a distributed, unstructured P2P storage network, there is no central index server. The connection of application layer nodes is organized in a random graph manner. The network nodes are truly peer-to-peer, and each node is both a client and a server.
[0089] In file retrieval and downloading, distributed unstructured P2P storage networks typically employ flooding search algorithms based on fully random graphs and incomplete download methods. For example... Figure 2 As shown, when a network node needs a file, it first generates a query request with the filename. For example, querying "xyz" means querying the file named "xyz". This query request is then sent to all network nodes connected to it. If the file exists on any of these network nodes, such as... Figure 2 If a network node finds the file xyz, it establishes a connection with the queried machine and then transfers the file. If the file does not exist in these network nodes, the query request continues to be forwarded among its neighboring nodes until the network node containing the file is found, at which point the file is transferred. To prevent search messages from being passed indefinitely, the depth of the query is typically controlled by decrementing the Time to Live (TTL). When the TTL decreases to zero, it becomes difficult to determine whether information about all network nodes containing the required file has been retrieved; therefore, the file download process is usually based on local information.
[0090] (3) Distributed structured P2P storage network
[0091] Most current P2P storage networks use distributed structured topologies. Distributed structured P2P storage networks employ a deterministic topology, utilizing a distributed hash table (DHT) to organize the nodes in the network; they can also be called DHT networks. Most distributed structured P2P storage networks have their own topology and are "overlay networks" built on top of the internet, with data communication relying on the underlying internet layer.
[0092] When a requesting node needs to download a file, it sends a request to the P2P storage network. The network uses intermediate nodes to locate the required file and then transmits the request to the download node storing the file, which then performs the download. The location of the required file can be achieved using an indexing algorithm, such as Tapestry, Pastry, Chord, or Kademlia.
[0093] A Data Hash Table (DHT) is a hash table maintained by a large number of distributed nodes over a wide area. This hash table is divided into multiple non-contiguous blocks, and each node is assigned its own hash block and becomes the manager of that block. The hash table stores the file's key and associated content (item), for example, stored in the form of (key, item), where there is a one-to-one correspondence between the key and item. For example, the file's associated content could be the file's index information or the file's actual content. During file retrieval and download, the file's content can be obtained by querying the key-value pair. The file's key can be obtained by mapping the file's related information to a hash value using a hash function.
[0094] Distributed structured P2P storage networks employ a deterministic network topology, meaning that file retrieval and download methods are strongly correlated with the network topology. In other words, the indexing algorithm is strongly correlated with the network topology. The file retrieval and download methods are determined based on a deterministic algorithm rooted in the deterministic topology.
[0095] The following uses two topologies in a distributed structured P2P storage network as examples to illustrate the file retrieval and download process.
[0096] Figure 3 This is a schematic diagram of a distributed structured P2P storage network topology in an embodiment of this application.
[0097] Nodes in a network have unique node IDs. A hash function can map file-related information to a hash value, such as a 128-bit or 160-bit hash value. This hash value is then used as the file's object ID. For ease of file retrieval, node IDs and object IDs are typically homogeneous hash values.
[0098] The relevant information about the file may include the file name, keywords, or content of the file.
[0099] In one implementation, such as Figure 3 As shown, when storing files, file 1 is stored on network node 1. Network node 1 generates the resource ID of file 1 using a cryptographic hash function, i.e. Figure 2 K1 in the file. Then, the index information I1 of file 1 is transmitted hop-by-hop to the hash block of the specific node according to the indexing algorithm, such as... Figure 2 Network node 3 in the diagram can be considered as file 1 being registered at network node 3, and network node 3 can be called the index node of file 1. For example, network node 3 stores the index information of file 1 in the form of (K1, I1). Network node 3 can be determined based on the resource ID of file 1. For example, network node 3 can be a node corresponding to a node ID that is equal to or similar to the resource ID of file 1.
[0100] The index information is used to indicate the download address of the file. For example, the index information I1 indicates that the download address of file 1 is network node 1.
[0101] When file 1 needs to be downloaded, a request is made to the node, such as... Figure 3 Network node 4 can obtain the hash value K1 of file 1. Based on the indexing algorithm, it searches hop-by-hop to the hash block storing the index information of file 1, such as... Figure 3 The hash block of network node 3. The requesting node obtains the index information I1 of the file and completes the download. For example, the indexing algorithm can be the Kademlia algorithm.
[0102] Specifically, the requesting node first queries its own hash block for the file. If the download address of the file is recorded in its hash block, it directly downloads the corresponding resource from that address. If the download address of the file is not found in the requesting node's hash block, it initiates a retrieval request to its neighboring nodes. These neighboring nodes can be determined based on their similarity to the resource ID. For example, ... Figure 3As shown, among all the neighboring nodes of the requesting node, the node ID of network node 5 is closest to the resource ID, and the node ID is less than the resource ID. Therefore, the requesting node sends the retrieval request to network node 5. The neighboring nodes then perform a local query again. If they find the download address of the file, they send the download address back to the requesting node. If they do not find the download address, they continue to pass the retrieval request to other neighboring nodes, performing iterative queries until the required resource is located.
[0103] In another implementation, such as Figure 3 As shown, when storing a file, network node 1 uploads file 1. Network node 1 generates the resource ID of file 1 using a cryptographic hash function, i.e. Figure 2 K1 in the file. Then, the content I1 of file 1 is transmitted hop-by-hop to the hash block of the specific node according to the indexing algorithm, such as... Figure 2 Network node 3 in the diagram can be considered as file 1 being registered at network node 3, and network node 3 can be called the download node for file 1. For example, the specific content of file 1 is stored in network node 3 in the form of (K1, I1). Network node 3 can be determined based on the resource ID of file 1. For example, network node 3 can be a node corresponding to a node ID that is equal to or similar to the resource ID of file 1.
[0104] When file 1 needs to be downloaded, a request is made to the node, such as... Figure 3 Network node 4 can obtain the hash value K1 of file 1. Using an indexing algorithm, it searches hop-by-hop to the hash block storing file 1, such as... Figure 3 The hash block of network node 3 in the network. The requesting node retrieves the file. For example, the indexing algorithm could be the chord algorithm.
[0105] Specifically, the requesting node initiates a retrieval request to its neighboring nodes. These neighboring nodes can be determined based on their similarity to the resource ID. For example, ... Figure 3 As shown, among all the neighboring nodes of the requesting node, the node ID of network node 5 is closest to the resource ID, and the node ID is less than the resource ID. Therefore, the requesting node sends the retrieval request to network node 5. The neighboring nodes perform local queries. If the file is found, they return the file to the requesting node. If the file is not found, they continue to pass the retrieval request to other neighboring nodes, performing iterative queries until the required resource is located.
[0106] It should be noted that the embodiments in this application only use... Figure 3This example illustrates the retrieval and download process in a distributed structured P2P storage network, without limiting the network's topology or the retrieval and download process. For instance, a distributed structured P2P storage network can also have a ring topology, using the Chord algorithm for file retrieval and download. The Chord algorithm, through the use of DHT technology, allows for resource indexing in O(logN) time by maintaining only an O(logN) routing table for discovering a specified object.
[0107] DHT-based structures can adapt to the dynamic addition or removal of nodes in the network, exhibiting good scalability, robustness, uniform node ID allocation, and self-organization capabilities. Because distributed structured P2P storage networks employ a deterministic network topology, as long as the destination node exists in the P2P storage network, it can definitely be discovered through DHT, ensuring the accuracy of resource discovery. Simultaneously, the resource registration / retrieval (storage / discovery) process follows deterministic algorithms for deterministic data communication, avoiding the huge bandwidth overhead of distributed unstructured P2P storage networks, thus significantly improving network scalability.
[0108] When a user needs to download a file, the download request needs to be sent to the storage node of the file. Malicious storage nodes can spy on the specific content of the file requested by the requesting node, thereby spying on the user's privacy.
[0109] Taking P2P storage networks as an example, during the resource download phase, once the request from the requesting node is finally passed to the file downloading node, a malicious downloading node can further spy on the content of the requested file. Furthermore, during the resource discovery phase, all intermediate nodes or index servers are explicitly aware of the requesting node's search request. A malicious intermediate node or index server can initiate the same search request, thereby learning the specific content of the file requested by the requesting node. In other words, users face the risk of privacy exposure during both the resource discovery and download phases.
[0110] like Figure 4 As shown, when a requesting node initiates a query request, i.e., network node A queries "xyz", all intermediate nodes are aware that network node A is querying "xyz". Therefore, they can initiate the same query request, obtain the download address through the index node of "xyz", and then initiate a download request to obtain the content of "xyz", thus spying on network node A's privacy. The index node of "xyz" can also initiate a download request to obtain the content of "xyz", thus spying on network node A's privacy. Malicious download nodes can further spy on the content of "xyz", thereby spying on network node A's privacy.
[0111] Therefore, how to achieve secure data transmission in an untrusted network environment has become an urgent problem to be solved.
[0112] An untrusted network environment refers to a network environment where every node may have malicious motives to spy on the privacy of other users.
[0113] This application provides a data transmission method and apparatus that enables secure data transmission in untrusted network environments, protecting user privacy.
[0114] The data transmission method of this application embodiment will be described in detail below with reference to the accompanying drawings.
[0115] Figure 5 This is a data transmission method 500 provided in the embodiments of this application. Figure 5 The method 500 shown can be derived from, for example Figure 1 or Figure 2 or Figure 3 The nodes in the network shown execute this. For example, it can be implemented through the internal software layer of a host in a P2P storage network, through other hardware circuits, or through a combination of software layer programs and hardware circuits. Method 500 includes steps S510 to S530. Steps S510 to S530 are described in detail below.
[0116] S510, the requesting node sends M download requests to the target downloading node.
[0117] The M download requests include a real target download request. This target download request is used to request the download of the target data. The remaining M-1 download requests, excluding the target download request, are fictitious download requests. M is an integer greater than 1.
[0118] For example, target data can also be target resources or target files, and the specific form of data is not limited in the embodiments of this application.
[0119] There can be one or more target download nodes. The target data is stored on the target download nodes.
[0120] A real target download request refers to the download request corresponding to the target data needed by the requesting node. A fictitious download request refers to a download request that the requesting node does not need. When a requesting node needs to download target data, it can initiate multiple download requests, hiding the target download request within these multiple download requests. It should be noted that the data requested by the fictitious download request may or may not be stored on the target download node. The data requested by the fictitious download request can be real or non-existent. For example, some of the data requested by the M-1 download requests is stored on the target download node, while some is not. Or, some of the data requested by the M-1 download requests is real, while some is non-existent.
[0121] For example, in a cloud storage network, the target download node is a cloud server. A requesting node can send M download requests to the cloud server, requesting the download of M files, including the target file. In this case, the data requested in the M download requests all actually exist.
[0122] For example, in a P2P storage network, the requesting node may not know what data, besides the target data, is stored on the target downloading node. In this case, the requesting node initiates M download requests to the target downloading node. The data requested by the remaining M-1 download requests, besides the target data, may not exist. As mentioned earlier, in a distributed structured P2P storage network, the hash value of data can have a one-to-one correspondence with the data itself. Download requests can be determined based on hash values. For example, if the hash value of the target data is K1, then the target download request can be used to request the data corresponding to K1. Besides the target download request, the remaining M-1 download requests can be used to request the data corresponding to the other M-1 hash values.
[0123] For example, the remaining M-1 hash values could be hash values of other data. Therefore, the data requested by the remaining M-1 download requests may not necessarily be stored on the target download node.
[0124] Optionally, method 500 can be applied to a distributed structured P2P storage network, where the requesting node can obtain the hash value of the target data and then determine the M download requests based on the hash value of the target data.
[0125] The hash value of the target data can be generated based on relevant information about the target data. This relevant information can include the data name, keywords, or content. For example, if the data type is a file, the relevant information could include the filename, keywords, or content.
[0126] For example, the requesting node can generate M-1 hash values that are closest to the hash value of the target data; and the download requests for these M hash values will be used as the M download requests.
[0127] This distance is the logical distance, and the M-1 nearest hash values can be calculated using algorithms such as the Kademlia algorithm or the Chord algorithm.
[0128] For example, the logical distance between hash value 1000 and hash value 1101 is 0101, which is 5 in decimal. That is to say, the logical distance between the two is 5.
[0129] The nearest hash value can be the nearest hash value to the target data among hash values greater than the target data. Alternatively, the nearest hash value can be the nearest hash value to the target data among hash values less than the target data. Alternatively, the nearest hash value can be the nearest hash value to the target data centered on the target data's hash value. This application does not limit this approach.
[0130] For example, if the target data has a hash value of 1010, a target retrieval request is used to request the data corresponding to hash value 1010 from the target download node. M-1 download requests can request the data corresponding to the M-1 nearest hash values to hash value 1010. For example, if M is 3, the M-1 hash values can be 1011, 1100, and 1101. Or, the M-1 hash values can be 1001, 1000, and 0111. Or, the M-1 hash values can be 1011, 1100, and 1001. Or, the M-1 hash values can be 1001, 1000, and 1011.
[0131] When data is stored on a network node with a node ID that is equal to or similar to the resource ID of the data, and the resource ID is the hash value corresponding to the data, the data requested by the M-1 download requests determined in this way is more likely to be stored on the target download node, which helps to hide the true needs of the requesting node.
[0132] The requesting node initiating M download requests to the target downloading node can include either the requesting node directly sending M download requests to the target downloading node, or the requesting node sending M download requests to the target downloading node through other network nodes.
[0133] This embodiment only illustrates the case where the requesting node needs one target data. When the requesting node needs multiple target data simultaneously, the data transmission method described in this embodiment can also be used, as long as the number of initiated download requests exceeds the number of target download requests. For example, if the target download request is 2, the requesting node can initiate 2M download requests, where M is an integer greater than 1. Similarly, if the target download request is 2, the requesting node can initiate M download requests, where M is an integer greater than 2.
[0134] S520, the target download node sends feedback data based on M download requests.
[0135] The requesting node receives feedback data sent by the target downloading node.
[0136] The feedback data for these M download requests can be M or not.
[0137] For example, when the target download node contains the data requested by M download requests, it can send corresponding feedback data for each of the M requests. When the target download node does not contain the data requested by one or more of the M requests, it can only send feedback data for the download requests corresponding to the data stored on its own. As another example, when the target download node does not contain the data requested by one or more of the M requests, it can send corresponding feedback data for each of the M requests. The feedback data for download requests for which the requested data is not stored on the target download node can be a prompt message. This prompt message indicates that the relevant data was not found. In other words, the feedback data can include data or other prompt information.
[0138] S530, the requesting node obtains the target data based on the feedback data.
[0139] The feedback data can include data requested by multiple download requests, and the requesting node can obtain the target data from multiple data sources.
[0140] The feedback data can be in other forms, and the requesting node can process the feedback data to obtain the target data.
[0141] For example, the feedback data can be encrypted, and the requesting node can decrypt the encrypted data to obtain the target data.
[0142] Optionally, method 500 further includes:
[0143] (1) The requesting node obtains the public key of the target downloading node and the perturbation values corresponding to the M download requests.
[0144] The public key of the target download node can be pre-stored in the requesting node, or the public key of the target download node can be sent from the target download node to the requesting node.
[0145] If the data requested by M download requests exists on the target download node, then the perturbation value corresponding to the M download requests can also be understood as the perturbation value corresponding to the data requested by the M download requests.
[0146] The requesting node can obtain the perturbation value in several ways. The perturbation value can be pre-stored, for example, it can be stored on both the target downloading node and the requesting node. Alternatively, the perturbation value can be stored on the target downloading node and sent to the requesting node. Or, the perturbation value can be stored on the requesting node and sent to the target downloading node. The perturbation value can also be generated as needed. For example, when the requesting node needs to initiate M download requests, it can generate M corresponding perturbation values based on these M download requests and send them to the target downloading node. Similarly, when the target downloading node receives M download requests, it can generate M corresponding perturbation values based on these M download requests and send them to the requesting node. Furthermore, when the requesting node needs to initiate M download requests, it can generate M corresponding perturbation values based on these M download requests, and when the target downloading node receives M download requests, it can generate M corresponding perturbation values in the same way. The above are merely examples. This application does not limit the method of obtaining the perturbation value. Other methods that enable the requesting node and the target downloading node to obtain the perturbation value can also be applied to the scheme of this application embodiment. For example, other nodes can also send the perturbation value to the requesting node and the target downloading node.
[0147] (2) The requesting node uses the public key of the target downloading node to encrypt the symmetric key of the requesting node.
[0148] (3) The requesting node uses the perturbation value corresponding to the target download request to perturb the encryption result.
[0149] (4) The requesting node sends the perturbation results to the target downloading node.
[0150] (5) The target download node uses the perturbation values corresponding to the M download requests to descramble the perturbation results and obtain the descrambled results corresponding to the M download requests.
[0151] Since the target download node is unaware of the requesting node's true needs (i.e., unaware of the target download request), after descrambling the perturbation results using the perturbation values corresponding to M download requests, only one descrambling result is correct.
[0152] (6) The target download node uses its private key to decrypt the descrambling results corresponding to the M download requests to obtain the keys corresponding to the M download requests.
[0153] Since only one descrambling result is correct in step (5), only one correct key can be obtained in step (6). Only the key corresponding to the target download request is the symmetric key of the requesting node.
[0154] (7) The target download node uses the keys corresponding to the M download requests to encrypt the data requested by the M download requests respectively, and obtains M encrypted data.
[0155] (8) The target download node sends M encrypted data to the requesting node. These M encrypted data are the feedback data.
[0156] In this case, step S530 includes:
[0157] The requesting node uses its symmetric key to decrypt the encrypted data and obtain the target data.
[0158] Since only the key corresponding to the target download request in step (6) is the symmetric key of the requesting node, the symmetric key of the requesting node can only decrypt the data requested by the target download request, i.e., the target data.
[0159] In this way, the requesting node can only obtain the target data it needs and cannot obtain other data on the target downloading node, which can guarantee the privacy of the target downloading node. In other words, the privacy of both the requesting node and the target downloading node is protected at the same time.
[0160] According to the solution in this application embodiment, when a requesting node needs to download target data, multiple download requests are sent concurrently, hiding the target download request within these multiple requests. This prevents the target downloading node from accurately knowing the true needs of the requesting node, thus protecting user privacy to some extent. The solution in this application embodiment does not rely on any trusted third party, completing data transmission in an untrusted network environment, thereby improving the security of data transmission in untrusted network environments.
[0161] In some storage networks, such as P2P storage networks, when a requesting node needs to download a resource, it must first perform a search to locate the resource. During the data retrieval process, intermediate nodes participating in the data retrieval may also know the data requested by the requesting node, thereby potentially spying on the user's privacy.
[0162] This application provides a data retrieval method that can prevent user privacy from being leaked during the data retrieval process.
[0163] Figure 6This application illustrates a data retrieval method 600 provided in an embodiment. Method 600 can be executed before method 500, that is, before the requesting node initiates a download request to the target downloading node, and is used to determine the target downloading node. For example, Figure 6 The method 600 shown can be derived from, for example Figure 1 or Figure 2 or Figure 3 The nodes in the network shown execute the method. Method 600 includes steps S610 to S630. Steps S610 to S630 are described in detail below.
[0164] S610, the requesting node sends K retrieval requests to the indexing node.
[0165] The K search requests include a real target search request. The target search request is used to request the target download node to retrieve the target data. All other search requests besides the target search request are fictitious. K is an integer greater than 1.
[0166] In this embodiment, a retrieval request can also be called a query request. An index node refers to a network node that stores index information. The index information is used to indicate the address of the data download node; for ease of description, it can also be understood as the index information indicating the data download node.
[0167] A real target retrieval request refers to the retrieval request corresponding to the target data that the requesting node needs to retrieve. A fictitious retrieval request refers to a retrieval request that the requesting node does not need. When a requesting node needs to retrieve target data, it can initiate multiple retrieval requests, hiding the target retrieval request within these multiple retrieval requests. It should be noted that the data requested by the fictitious retrieval request may or may not exist.
[0168] For example, in a P2P storage network, requesting nodes may not know the storage locations of various data. In this case, a requesting node initiates K retrieval requests to an indexing node. Except for the target data, the data requested by the other K-1 retrieval requests may not exist. As mentioned earlier, in a distributed structured P2P storage network, the hash value of data can have a one-to-one correspondence with the data itself. Retrieval requests can be determined based on hash values. For example, if the hash value of the target data is K1, then the target retrieval request can be used to request the index information corresponding to K1. Besides the target retrieval request, the other K-1 retrieval requests can be used to request data corresponding to the other K-1 hash values.
[0169] For example, the K-1 hash values can be hash values of other data.
[0170] For example, a requesting node can obtain the hash value of the target data and the hash values of other data. The hash value of the data can be generated based on relevant data information. This relevant data information can include the data name, keywords, or content. For example, if the data type is a file, the relevant data information can include the file name, keywords, or content. The relevant information used when retrieving data is the same as the relevant information used when storing the data. For example, when storing data 1#, a hash value is generated based on the content of data 1#, and then the index information of data 1# is stored based on this hash value. When retrieving data 1#, a hash value can also be generated based on the content of data 1#, and then a retrieval request can be initiated based on this hash value to obtain the index information of data 1#.
[0171] For example, a requesting node can obtain the hash value of the target data and the hash values of the other K-1 data items. The hash value of the target data is generated based on its content, and the hash values of the other K-1 data items are generated separately based on their respective content. In this case, K retrieval requests are used to request the retrieval of index information for K data items.
[0172] For example, the K-1 hash values can be randomly generated.
[0173] In this case, since the hash values corresponding to the other K-1 retrieval requests are randomly generated, the data requested by the other K-1 retrieval requests may not exist in the network.
[0174] Optionally, method 600 can be applied to a distributed structured P2P storage network, where the requesting node can generate a hash value of the target data based on the relevant information of the target data, and then determine the K retrieval requests based on the hash value of the target data.
[0175] For example, the requesting node can generate K-1 hash values that are closest to the hash value of the target data; and use the retrieval request for the K hash values as the K retrieval request.
[0176] This distance is the logical distance, and the K-1 nearest hash values can be calculated using algorithms such as Kademlia or Chord.
[0177] For example, the logical distance between hash value 1000 and hash value 1101 is 0101, which is 5 in decimal. That is to say, the logical distance between the two is 5.
[0178] The nearest hash value can be the nearest hash value to the target data among hash values greater than the target data. Alternatively, the nearest hash value can be the nearest hash value to the target data among hash values less than the target data. Alternatively, the nearest hash value can be the nearest hash value to the target data centered on the target data's hash value. This application does not limit this approach.
[0179] For example, if the target data has a hash value of 1010, a target retrieval request is used to request the data corresponding to hash value 1010 from the target download node. K-1 retrieval requests can request the data corresponding to the K-1 nearest hash values to hash value 1010. For example, if K is 3, the K-1 hash values can be 1011, 1100, and 1101. Or, the K-1 hash values can be 1001, 1000, and 0111. Or, the K-1 hash values can be 1011, 1100, and 1001. Or, the K-1 hash values can be 1001, 1000, and 1011.
[0180] When the index information of the data is stored on a network node with a node ID that is equal to or similar to the resource ID of the data, and the resource ID is the hash value corresponding to the data, the index information requested by the K-1 retrieval requests determined in this way is more likely to exist on the index node corresponding to the target data. This is beneficial for hiding the true needs of the requesting node from the index node corresponding to the target data.
[0181] The requesting node initiating K retrieval requests to the indexing node can include either the requesting node sending K retrieval requests directly to the indexing node, or the requesting node sending K retrieval requests to the target downloading node through other network nodes.
[0182] For example, in Figure 1 In the centralized P2P storage network shown, the index node is the central index server, and the requesting node can directly send K retrieval requests to the index server.
[0183] For example, in Figure 3 In the distributed structured P2P storage network shown, the index node is not unique; each intermediate node can be an index node. Requesting nodes transmit retrieval requests hop-by-hop to the index node using an indexing algorithm. That is, K retrieval requests may be transmitted to different network nodes to obtain the index information corresponding to each of the K retrieval requests.
[0184] This embodiment only illustrates the case where the requesting node needs one target data. When the requesting node needs multiple target data simultaneously, the data retrieval method described in this embodiment can also be used, as long as the number of retrieval requests initiated exceeds the number of target retrieval requests. For example, if the target retrieval request is 2, the requesting node can initiate 2K retrieval requests, where K is an integer greater than 1. Similarly, if the target retrieval request is 2, the requesting node can initiate K retrieval requests, where K is an integer greater than 2.
[0185] S620, the index node sends index information based on K retrieval requests.
[0186] The requesting node receives the index information sent by the indexing node.
[0187] An index node can indicate index information of the data requested in a retrieval request. For example, an index node can store the index information of the data. Alternatively, an index node can store the data itself. In this case, the index information returned by the index node is the address of that index node, which can also be called a download node.
[0188] The index information sent based on the K retrieval requests can be K or not.
[0189] For example, when an index node contains index information for data requested by K search requests, the index node can send the corresponding index information for each of the K search requests. When an index node does not contain index information for one or more of the K search requests, the index node can send index information only for the search requests corresponding to the index information stored in itself. As another example, when an index node does not contain index information for data requested by one or more of the K search requests, the index node can send the corresponding index information for each of the K search requests. The index information corresponding to the search requests for which the requested index information is not stored in the index node can be a prompt message. This prompt message is used to indicate that no relevant data was found. That is, the index information can also include other prompt messages. Furthermore, the index information can also be a response message, which is used to establish a connection between the requesting node and the downloading node. When the index node is also the downloading node, after receiving a search request, the index node can send a response message to the requesting node to establish a connection with the downloading node. This application does not limit the specific form of the index information in its embodiments.
[0190] S630, the requesting node determines the target download node based on the index information.
[0191] This index information can include index information corresponding to multiple retrieval requests. The request node can obtain the index information corresponding to the target retrieval request, that is, the target download node of the target data.
[0192] Furthermore, the requesting node can determine the M download requests in method 500 based on this index information.
[0193] Optionally, the remaining M-1 download requests, excluding the target download request, can be determined based on the first index information in the index information. The download node indicated by the first index information is the target download node.
[0194] Determining the remaining M-1 download requests based on the first index information in the index information may include: determining the data requested to be downloaded by the remaining M-1 download requests based on the data requested to be retrieved by the search request corresponding to the first index information.
[0195] In other words, the data requested by the remaining M-1 download requests is located on the target download node.
[0196] The remaining M-1 download requests are determined based on the feedback index information, ensuring that the data requested by the remaining M-1 download requests is also stored on the target download node. The target download node cannot know the true needs of the requesting node, which helps protect the privacy of the requesting node.
[0197] The requesting node can determine the target download node corresponding to the target retrieval request based on the download node corresponding to the retrieval request fed back by the indexing node. Among the other K-1 retrieval requests, H retrieval requests have download nodes corresponding to the target download nodes. That is, the data retrieved by these H retrieval requests is stored on the target download nodes. The index information corresponding to these H retrieval requests is the first index information. In this case, the requesting node can select M-1 data from these H data and initiate a download request for these M-1 data, which is the M-1 download request in method 500. H is a positive integer, H≥M-1. Alternatively, the requesting node can use the download request for these H data as the M-1 download request, where H is a positive integer, H=M.
[0198] Optionally, the remaining M-1 download requests are determined based on the first index information in the index information, including:
[0199] If the number of first index information is greater than or equal to the first threshold, the remaining M-1 download requests are determined based on the first index information in the index information.
[0200] The quantity of the first index information can also be understood as the number of times the target download node is responded to. In other words, the quantity of the first index information is equal to the number of data located at the target download node among the data requested by K retrieval requests.
[0201] As mentioned earlier, the index information corresponding to the H retrieval requests is the first index information, meaning the number of first index information is H. When the amount of data stored on the target download node is large among the data requested by the K-1 retrieval requests, the remaining M-1 download requests are determined based on the first index information. In other words, when the amount of data stored on the target download node H among the data requested by the K-1 retrieval requests is large, the requesting node can select M-1 data from the H data and initiate a download request for those M-1 data, which is the M-1 download request in method 500. H is a positive integer, H≥M. Alternatively, the requesting node can use the download request for those H data as the M download requests, where H is a positive integer, H=M.
[0202] In this way, when there is a large amount of data stored on the target download node, more download requests can be initiated against the target download node, increasing the difficulty for the target download node to spy on the privacy of the requesting node.
[0203] Optionally, the remaining M-1 download requests are determined based on the first index information in the index information, including:
[0204] If the amount of first index information is less than the first threshold, increase the value of K;
[0205] Send K more search requests to the index node;
[0206] Repeat the above process until the first termination condition is met. Then, determine the remaining M-1 download requests based on the first index information in the index information. Increasing the value of K can include linearly increasing the value of K, for example, increasing the value of K at a rate of 2 times. The first termination condition can include any one or more of the following: the number of first index information items in the index information is greater than or equal to a first threshold; the number of retrieval requests initiated is greater than or equal to a second threshold; or K is greater than or equal to a third threshold K. max The first termination condition can be set as needed, and the specific content of the first termination condition is not limited in the embodiments of this application.
[0207] Optionally, the remaining M-1 download requests are determined based on the first index information in the index information, including:
[0208] When the amount of the first index information is less than the first threshold;
[0209] Send P more retrieval requests to the index node;
[0210] Repeat the above process until the first termination condition is met. Then, determine the remaining M-1 download requests based on the first index information in the index information. The first termination condition may include any one or more of the following: the number of first index information items in the index information is greater than or equal to a first threshold; the number of retrieval requests initiated is greater than or equal to a second threshold; or the total number of retrieval requests initiated is greater than or equal to a third threshold K. max The first termination condition can be set as needed, and the specific content of the first termination condition is not limited in the embodiments of this application.
[0211] In other words, when the amount of data stored on the target download node is small among the data requested by the K-1 retrieval requests, the requesting node initiates more retrieval requests until a first termination condition is met, for example, the amount stored on the target download node is greater than or equal to a first threshold. The remaining M-1 download requests are determined based on the first index information. That is, the requesting node can select M-1 data from the H data and initiate download requests for those M-1 data, which are the M-1 download requests in method 500. H is a positive integer, H≥M. Alternatively, the requesting node can use the download requests for those H data as the M download requests, where H is a positive integer, H=M.
[0212] When the amount of data stored on the target download node is small compared to the requested data, the requesting node initiates more retrieval requests to increase the amount of data stored on the target download node. This allows for more download requests to the target download node, making it more difficult for the target download node to spy on the requesting node's privacy.
[0213] By setting an upper limit on the total number of search requests, requesting nodes are prevented from initiating excessive search requests, thus avoiding wasted search resources. For example, if the number of resources stored on the target download node is less than a first threshold, the number of first index information entries will not reach the first threshold regardless of the number of search requests initiated. Therefore, setting a maximum number of search requests can prevent wasted search resources and save time costs.
[0214] According to the solution of this application embodiment, multiple search requests are concurrently processed, and the target search request is hidden among the multiple search requests. This prevents intermediate nodes from accurately knowing the true needs of the requesting nodes, thus protecting user privacy to a certain extent. The solution of this application embodiment does not rely on any trusted third party and completes data retrieval in an untrusted network environment, improving the security of data transmission in such environments.
[0215] The solutions in this application embodiment can be applied to various data transmission scenarios. The following uses a distributed structured P2P storage network as an example to illustrate the data transmission method in this application embodiment through two specific implementation methods (method 1 and method 2).
[0216] When storing resources or files in a distributed structured P2P storage network, the resource can be stored or registered directly. Alternatively, the resource or file can be divided into multiple resource blocks or file blocks, for example, multiple resource blocks or file blocks of the same size, and then each of these multiple resource blocks or file blocks can be stored or registered separately.
[0217] Figure 7 This illustrates a file storage method. In one implementation, when a file 'a' is stored in a distributed structured P2P storage network, it can be divided into multiple file blocks of the same size. First, a hash value for each file block is calculated based on its relevant information. Then, based on the hash value of each file block, information registration is completed on the corresponding index node for each file block; that is, the index information of each file block is stored separately in the corresponding index node. These multiple file blocks can be stored on the same download node or on different download nodes. When file 'a' needs to be downloaded, the requesting node can obtain the address of the download node for each file block from the corresponding index node and complete the download. When file 'a' needs to be downloaded, data transmission can be performed using method 800 described below.
[0218] Alternatively, when a file 'a' is stored in a distributed structured P2P storage network, it can be divided into multiple file blocks of the same size. First, a hash value for each file block is calculated based on its relevant information. Then, based on the hash value, each file block is stored separately in the download node corresponding to that file block. When file 'a' needs to be downloaded, the requesting node can obtain the individual file blocks from the download nodes corresponding to each file block. Data transmission can be performed using method 1200 described below when downloading file 'a'.
[0219] In the above process, index nodes or download nodes can be determined using a specific algorithm. This specific algorithm is one that matches the topology of the distributed structured P2P storage network. For example, if the P2P storage network has a ring topology, the Chord algorithm can be used for matching.
[0220] Method 1
[0221] Figure 8 This is a data transmission method 800 provided in the embodiments of this application. Figure 8 The method 800 shown can be derived from, for example Figure 1 or Figure 2 or Figure 3 The nodes in the network shown execute this method. Method 800 can be understood as a specific implementation of methods 500 and 600. For detailed descriptions, please refer to methods 500 and 600; to avoid repetition, appropriate omissions are made when describing method 800.
[0222] In a distributed structured P2P storage network, network nodes store a Data Hash Table (DHT), which contains the hash values of the data. When a network node receives a retrieval request, it can check the DHT to determine whether it stores the index information of the requested data. Network nodes update their DHTs in real time as data is stored in or leaves the P2P storage network. Network nodes can forward requests in real time within a request cycle and are aware of changes in network storage resources.
[0223] For example, the index information of the data can be stored in a specific network node. That is, when data is stored in this P2P storage network, it needs to be registered in a specific network node, and that specific network node updates the DHT table. This specific network node can be a network node corresponding to a node ID that is equal to or similar to the hash value of the data.
[0224] In this P2P storage network, a retrieval request based on the hash value of the data can obtain the index information of the data, and a download request based on the hash value of the data can obtain the data.
[0225] Method 800 includes steps S810 to S850. Steps S810 to S850 are described in detail below.
[0226] S810, the requesting node sends K retrieval requests to the indexing node.
[0227] The K search requests include a real target search request. The target search request is used to request the target download node to retrieve the target data. All other search requests besides the target search request are fictitious. K is an integer greater than 1.
[0228] For example, the target data could be Figure 7 The file block in the file. Figure 7 The index information of multiple file blocks in file a is stored on different inodes. When file a needs to be downloaded, each file block can be obtained through method 800. Method 800 only describes the data transmission method using the index information of data stored on the inode as an example, and does not limit the solution of the embodiments of this application. For example, the inode may also store the data itself instead of the index information of the data. In this case, the index information returned by the inode can indicate the inode itself.
[0229] Specifically, the requesting node can first determine whether the index information of the target data is stored in its own hash block. If the target data's index information is not stored in its own hash block, the requesting node can send K retrieval requests to the indexing node.
[0230] For ease of description, in this embodiment of the application, the K-1 search requests other than the target search request are referred to as the other K-1 search requests.
[0231] For example, such as Figure 8 As shown, step S810 may include steps S811 to S813.
[0232] S811, request the node to determine the hash value of the target data.
[0233] Specifically, the hash value of the target data can be generated based on relevant information about the target data. For example, relevant information about the target data may include the name of the target data, keywords related to the target data, or the content of the target data.
[0234] The information used when retrieving data is the same as the information used when storing the data. For example, when storing data 1#, a hash value is generated based on the content of data 1#, and then the index information of data 1# is stored based on this hash value. When retrieving data 1#, a hash value can also be generated based on the content of data 1#, and then a retrieval request can be initiated based on this hash value to obtain the index information of data 1#.
[0235] S812, request the node to generate the K-1 hash values that are closest to the hash value of the target data.
[0236] Because the index information of the data is stored in index nodes that have the same or similar hash values as the data, the closer the hash value of the target data is to the target data's hash value, the more likely the index information of the data will be stored in the target index node. The target index node refers to the node that stores the index information of the target resource. In this way, more search requests may be transmitted to the target index node, which cannot know the true needs of the requesting node, thus protecting the privacy of the requesting node to a certain extent.
[0237] It should be understood that step S812 is only an example of a method for generating K-1 hash values, and K-1 hash values can also be generated in other ways. For example, K-1 hash values can be generated based on relevant information from other data, or K-1 hash values can be generated randomly. For a detailed description, please refer to step S610 in method 600, which will not be repeated here.
[0238] S813, the requesting node sends K retrieval requests corresponding to the K hash values.
[0239] A retrieval request corresponding to a hash value is used to request a retrieval of that hash value, that is, to retrieve the index information of the data corresponding to that hash value. Initiating a retrieval request corresponding to a hash value can also be understood as initiating a retrieval request for the hash value itself.
[0240] For example, retrieval request 1# corresponding to hash value 1000 is used to request the retrieval of hash value 1000, which is to retrieve the index information of the data corresponding to hash value 1000.
[0241] For example, the requesting node sends a retrieval request hop-by-hop to the indexing node using an indexing algorithm. There can be one or more indexing nodes. For instance, the indexing algorithm may include the chord algorithm or the Kademlia algorithm. The intermediate nodes in the hop-by-hop forwarding of the retrieval request can be determined according to this indexing algorithm.
[0242] This index node can include network nodes corresponding to K search requests. The request node can send the K search requests to the network nodes corresponding to the K search requests respectively.
[0243] For example, the requesting node sends the K retrieval requests corresponding to the K hash values to at least one first neighbor node. The at least one first neighbor node can be determined based on the K hash values. For instance, the first neighbor node corresponding to each retrieval request is determined based on each hash value, and the K retrieval requests are sent to the corresponding first neighbor node respectively. The first neighbor nodes corresponding to the K retrieval requests can be the same or different. Each retrieval request can have one or more first neighbor nodes. The above process is repeated until the K retrieval requests are sent to the corresponding index nodes.
[0244] This index node can be the network node corresponding to the target index request. The requesting node can also send K retrieval requests to the target index node. The target index node contains the index information for the target data.
[0245] For example, the requesting node sends the K retrieval requests corresponding to the K hash values to at least one first neighbor node. The at least one first neighbor node can be determined based on the hash value of the target data. For instance, the first neighbor node corresponding to the target retrieval request is determined based on the hash value of the target data, and the K retrieval requests are sent to the first neighbor node corresponding to the target retrieval request. There can be one or more first neighbor nodes corresponding to the target retrieval request. The above process is repeated until the K retrieval requests are sent to the target index node.
[0246] Specifically, determining neighboring nodes based on hash values can be achieved by calculating the neighboring nodes corresponding to the hash value using a specific algorithm.
[0247] For example, when a network node in a P2P storage network receives a retrieval request from a requesting node and finds index information of the requested data that is not stored locally in its local DHT, it forwards the retrieval request to a specific neighboring node according to a specific algorithm.
[0248] For example, the first neighbor node can be determined based on the degree of similarity to the hash value.
[0249] Specifically, the requesting node can select one or more nodes that correspond to the node ID closest to the hash value among all neighboring nodes as its first neighboring node.
[0250] For example, the index information of the data requested in retrieval request 1# is the index information of the data corresponding to hash value 1000. When the requesting node finds that the index information of the data corresponding to hash value 1000 is not stored locally in its local DHT, the requesting node will take the n neighbor nodes with the closest logical distance to hash value 1000 as the first neighbor nodes corresponding to retrieval request 1#, where n is a positive integer. The requesting node then sends retrieval request 1# to these n first neighbor nodes.
[0251] If the index information corresponding to the hash value 1000 is found among the n first neighbor nodes, the requesting node receives the index information of the data corresponding to the hash value 1000 sent by the first neighbor node, and the retrieval process for retrieval request 1# ends. The network node that stores the index information of the data corresponding to the hash value 1000 among the first neighbor nodes is the index node corresponding to retrieval request 1#.
[0252] If no index information for the data corresponding to hash value 1000 is found among the n first neighbor nodes, then each of the n first neighbor nodes calculates the logical distance between its respective neighbor node's node ID and hash value 1000. The n neighbor nodes with the closest logical distance to hash value 1000 are designated as second neighbor nodes. The first neighbor nodes send retrieval request #1 to the second neighbor nodes. This process is repeated until the index information for the data corresponding to hash value 1000 is found, or until the retrieval time exceeds the fourth threshold, or until no network node closer to hash value 1000 can be found.
[0253] Alternatively, if no index information for the data corresponding to hash value 1000 is found among the n first neighbor nodes, then each of the n first neighbor nodes calculates the logical distance between its respective neighbor node's node ID and hash value 1000. The n neighbor nodes with the closest logical distance to hash value 1000 are sent to the requesting node. The requesting node can determine the second neighbor node from the feedback network nodes and send retrieval request 1# to the second neighbor node. This process is repeated until the index information for the data corresponding to hash value 1000 is found, or until the retrieval time exceeds the fourth threshold, or until no network node closer to hash value 1000 can be found.
[0254] like Figure 9 As shown, request node 910 sends a request to its first neighbor node, such as... Figure 9 Network node 920 sends K retrieval requests. For example, the first neighbor node could be determined based on the hash value of the target resource. If the index information for the target resource is not found in the first neighbor node, the retrieval request is sent to the second neighbor node. Figure 9 As shown, the first neighbor node sends the retrieval request to two second neighbor nodes, namely network node 930 and network node 940. One of the second neighbor nodes, network node 930, stores the index information of the target data and the index information of some of the data requested by the other K-1 retrieval requests. The second neighbor node then sends the index information to the requesting node. Network node 930 is the index node for the target data.
[0255] It should be understood that the above is only for illustration, and the specific process of resource retrieval in the embodiments of this application can also be implemented in other ways, which are not limited in this embodiment.
[0256] S820, the requesting node receives index information sent by the indexing node based on K retrieval requests, and determines the target download node based on the index information.
[0257] Step S820 corresponds to steps S620 to S630 in method 600.
[0258] For example, such as Figure 8 As shown, step S820 includes step S821.
[0259] S821, the requesting node receives the index information sent by the indexing node based on K retrieval requests.
[0260] The index information sent based on K retrieval requests can be K or not.
[0261] For example, in step S813, the intermediate node used to forward the retrieval request can be determined based on the hash value of the target data. In this case, the index node in step S821 is the target index node. When the target index node has index information for the data requested by K retrieval requests, the target index node can send the corresponding index information for each of the K retrieval requests. When the target index node does not have the index information requested by one or more of the K retrieval requests, the target index node can only send index information for the retrieval requests corresponding to the index information stored in itself. As another example, when the target index node does not have index information for the data requested by one or more of the K retrieval requests, the target index node can send the corresponding index information for each of the K retrieval requests. The index information corresponding to the retrieval request for which the requested index information is not stored in the index node can be a prompt message. This prompt message is used to indicate that no relevant data was found.
[0262] like Figure 9 As shown, K is 5, meaning that the requesting node initiates 5 retrieval requests. The target indexing node only stores the index information of the data requested by two of the retrieval requests. Therefore, it only sends the corresponding retrieval information for two of the retrieval requests.
[0263] Furthermore, step S820 includes steps S822 and S823.
[0264] S822, determine whether the quantity of the first index information is greater than or equal to the first threshold.
[0265] The first index information indicates that the download node is the target download node.
[0266] The quantity of the first index information can also be understood as the number of times the target download node is responded to. In other words, the quantity of the first index information is equal to the number of data located at the target download node among the data requested by K retrieval requests.
[0267] If the number of first index information is greater than or equal to the first threshold, then step S830 is executed.
[0268] For example, if the number of first index information is less than a first threshold, then step S823 is executed.
[0269] S823, increase the value of K, and repeat steps S812 to S820.
[0270] like Figure 8 As shown, if the number of first index information is less than the first threshold, the number of search requests is increased until the number of first index information is greater than or equal to the first threshold.
[0271] Alternatively, step S823 may further include: determining whether the current K value is greater than or equal to the third threshold K. max .
[0272] If yes, proceed to step S830. If no, increment the value of K and repeat steps S812 to S820 until the first termination condition is met. The first termination condition includes any one or more of the following: the number of first index information items in the index information is greater than or equal to the first threshold, the number of retrieval requests initiated is greater than or equal to the second threshold, or K is greater than or equal to the third threshold K. max .
[0273] It should be understood that step S823 is only an example. If the number of first index information is less than the first threshold, the number of retrieval requests can be increased in other ways. For details, please refer to step S630 in method 600, which will not be repeated here.
[0274] like Figure 7 As shown, when a file is stored in a distributed structured P2P storage network, it can be divided into multiple file blocks, and then registered with the corresponding index nodes based on the hash values of these multiple file blocks. In one implementation, multiple file blocks of the file are stored on the same download node, while the index information of the multiple file blocks is stored on different index nodes. In this case, the download node indicated by the index information of each file block is the same. Therefore, when a file needs to be downloaded, the data retrieval process (steps S810 to S820) can be performed only for one file block, for example, the first file block, to obtain the target download node. For other file blocks, the requesting node can skip steps S810 and S820 and start execution from step S830, as shown. Figure 10 As shown, the requesting node 1010 and the target downloading node 1020 interact directly through the underlying network 1030, without needing to go through other intermediate nodes. This avoids the time wasted by repeated searches and improves data transmission efficiency.
[0275] S830, the requesting node sends M download requests to the target downloading node.
[0276] The requesting node determines the hash value of the data located on the target download node based on the first index information. It then initiates M download requests based on the hash value of the data on the target download node. Each of the M download requests corresponds to one of the M hash values.
[0277] For example, the quantity of the first index information is H, meaning that the data requested by H out of the K retrieval requests is stored on the target download node. The requesting node can select M-1 hash values from the hash values corresponding to these H retrieval requests and initiate download requests for these M-1 hash values, where H is a positive integer and H ≥ M. Alternatively, the requesting node can use the download requests for the hash values corresponding to these H retrieval requests as M download requests, where H is a positive integer and H = M.
[0278] like Figure 11 As shown, M=3, the target data is data1, and the hash value of the target data is hash1. The requesting node sends a download request based on the three hash values hash0, hash1, and hash2 to the target download node.
[0279] S840, the target download node sends feedback data to the requesting node based on M download requests.
[0280] For example, such as Figure 8 As shown, step S840 includes steps S841 to S845.
[0281] S841, the requesting node obtains the perturbation values corresponding to M download requests and the public key of the target download node.
[0282] The target download node returns the perturbation values corresponding to M download requests, as well as the target download node's public key.
[0283] For example, the perturbation value corresponding to M download requests can be the hash value corresponding to M download requests.
[0284] For example, the perturbation value corresponding to M download requests can be a random number corresponding to M hash values.
[0285] For example, a network node can generate random numbers corresponding to the hash values of M download requests. In this case, the random numbers can be generated by either the requesting node or the target download node.
[0286] For example, network nodes generate a unique random number for each hash value in the Distributed Hash Table (DHT) of local files and store it in a random number list. In other words, hosts in a P2P storage network maintain both the DHT and a random number list. Figure 10As shown, all network nodes in a P2P storage network can store a list of hash values and a list of random numbers for local data. The hash value list stores the hash values of the local data, and the random number list stores the random numbers corresponding to the hash values. When new data is stored in the P2P storage network, the network node updates the DHT in real time, generates the corresponding random number, and updates the random number list. When data leaves the P2P storage network, the network node updates the DHT in real time and deletes the corresponding random number from the random number list. In this case, the random number can be stored in the target download node and sent by the target download node to the requesting node.
[0287] like Figure 10 As shown, the requesting node initiates M download requests based on M hash values. The target downloading node determines M hash values based on the M download requests. It then determines the random number corresponding to each of the M hash values from a list of random numbers and sends this random number to the requesting node. For example, the target downloading node sends the random number corresponding to the hash value to the requesting node in the form of (hash value, random number) data pairs, that is, (hash value 1, random number 1), (hash value 2, random number 2), ..., (hash value M, random number M).
[0288] like Figure 11 As shown, the target download node sends its public key e and three random numbers corresponding to hash values to the requesting node. Specifically, the target download node sends (hash0, x0), (hash1, x1), and (hash2, x2) along with its public key e to the requesting node.
[0289] The target download node has an asymmetric key (d, e), where the public key e can be used to encrypt data and the private key d can be used to decrypt data encrypted by the public key e.
[0290] It should be understood that step S841 is merely an example; the requesting node can also obtain the perturbation values corresponding to the M download requests and the public key of the target download node through other means. See method 500 for a detailed description, which will not be repeated here.
[0291] S842, the requesting node uses the public key to encrypt the symmetric key of the requesting node, and uses the perturbation value corresponding to the target download request to perturb the encryption result.
[0292] For example, the requesting node can determine the random number b corresponding to the hash value b of the target data from the random number returned by the target downloading node, encrypt its own symmetric key k using the public key e, and perturb the encryption result using the random number b to obtain the perturbation result v, where v satisfies
[0293] v = random number b + PU(e, k);
[0294] Wherein, PU(e, k) represents encrypting the symmetric key k using the public key e.
[0295] like Figure 11 As shown, b = 1, the target data is data1, and the requesting node determines the random number corresponding to the hash value hash1 of the target data as x1. The requesting node uses the public key e to encrypt its own symmetric key k, and uses x1 to perturb the encryption result to obtain the perturbation result v, v = x1 + PU(e, k).
[0296] S843, the requesting node sends the perturbation results to the target downloading node.
[0297] S844, the target download node uses the perturbation values corresponding to the M download requests to descramble the perturbation result, and uses its own private key to decrypt the descrambled result to obtain the key corresponding to the M download requests.
[0298] For example, the target download node descrambles the perturbation result using the random numbers corresponding to the M hash values, and then decrypts the descrambled result using its own private key d to obtain the keys k0, k1...k corresponding to the M random numbers. M-1 This refers to the keys corresponding to the M hash values, which are the keys corresponding to the M download requests. The key k corresponds to the i-th random number. i satisfy:
[0299] k i =PR(d, vx) i );
[0300] Where i = 0, 1, ..., M-1, x i Let PR(d, vx) represent the i-th random number. i This indicates using the private key d to access vx. i Decryption is performed.
[0301] like Figure 11 As shown, the target download node uses three random numbers x0, x1, and x2 to descramble the perturbation result v, and then decrypts it using its own private key d to obtain the keys corresponding to the three random numbers. Only the key k1 corresponding to x1 is the symmetric key k of the requesting node, and the target download node is unaware of the target data requested by the requesting node, thus protecting the privacy of the requesting node. This decryption process can also be understood as the process by which the target download node creates its own key.
[0302] S845, the target download node uses the keys corresponding to the M download requests to encrypt the data requested by the M download requests respectively, and sends the M encrypted data as feedback data to the requesting node.
[0303] For example, the target download node uses the keys corresponding to M random numbers to encrypt the data corresponding to the M random numbers respectively, resulting in M encrypted data C0, C1...C M-1 The encrypted data C corresponding to the i-th random number. i satisfy:
[0304] C i =PU(k) i , data i );
[0305] Among them, PU(k) i , data i ) indicates the use of key k i data i Encrypt it.
[0306] like Figure 11 As shown, the target download node uses the keys corresponding to the three random numbers to encrypt the data corresponding to the three random numbers respectively, resulting in three encrypted data C0, C1 and C2.
[0307] S850: The requesting node obtains the target data based on the feedback data.
[0308] For example, such as Figure 8 As shown, step S850 includes step S851.
[0309] S851, the requesting node uses its own symmetric key k to decrypt M encrypted data to obtain the target data.
[0310] The requesting node uses its own symmetric key k to decrypt M encrypted data, obtaining M decrypted data. Since only k is available... b =k, therefore, the requesting node can only decrypt the target data, not other data, and thus cannot spy on the privacy of the target downloading node, achieving unintentional transmission.
[0311] like Figure 11 As shown, PR(k, C1) means decrypting C1 using the symmetric key k. Only C1 can be successfully decrypted to obtain the target data.
[0312] According to the solution in this application embodiment, the target download request is hidden within multiple download requests, and multiple download requests are sent concurrently. This prevents the target download node from accurately knowing the true needs of the requesting node, thus protecting user privacy to a certain extent. The solution in this application embodiment does not rely on any trusted third party and completes data transmission in an untrusted network environment, improving the security of data transmission in such environments.
[0313] Furthermore, through random key interaction, the target downloader uses multiple keys to encrypt the data requested by the requesting node. The requesting node can only use its own key to obtain the target data it needs and cannot obtain other data on the target downloading node, thus ensuring the privacy of the target downloading node. In other words, the privacy of both the requesting node and the target downloading node is protected simultaneously.
[0314] Meanwhile, according to the solution of this application embodiment, the target retrieval request is hidden in multiple retrieval requests, and multiple retrieval requests are sent concurrently. This prevents intermediate nodes from accurately knowing the true needs of the requesting nodes, thus protecting user privacy to a certain extent. The solution of this application embodiment does not rely on any trusted third party and completes data retrieval in an untrusted network environment, improving the security of data transmission in untrusted network environments.
[0315] Furthermore, by generating retrieval requests based on the distance to the hash value of the target data, the index information requested by the remaining K-1 retrieval requests is more likely to be stored on the index node corresponding to the target data, which helps to hide the true needs of the requesting node from the index node corresponding to the target data.
[0316] Method 2
[0317] Figure 12 This is a data transmission method 1200 provided in the embodiments of this application. Figure 12 The method 1200 shown can be derived from, for example Figure 1 or Figure 2 or Figure 3 The nodes in the network shown execute this method. Method 1200 can be understood as a specific implementation of methods 500 and 600. For detailed descriptions, please refer to methods 500 and 600. To avoid repetition, appropriate omissions are made when describing method 800.
[0318] In a distributed structured P2P storage network, network nodes store a Data Hash Table (DHT), which contains the hash values of the data. When a network node receives a retrieval request, it can check the DHT table to determine whether it stores the requested data. The network node updates its DHT table in real time whenever data is stored in or leaves the P2P storage network.
[0319] For example, data can be stored in a specific network node. That is, when data is stored in this P2P storage network, it needs to be stored in a specific network node, and that specific network node updates the DHT table. This specific network node can be a network node corresponding to a node ID that is equal to or similar to the hash value of the data.
[0320] In this P2P storage network, data can be obtained by initiating a retrieval request or download request based on the hash value of the data; that is, a retrieval request and a download request can be the same request.
[0321] Method 1200 includes steps S1210 to S1230. Steps S1210 to S1230 are described in detail below.
[0322] S1210, the requesting node sends M download requests to the target downloading node.
[0323] The M download requests include a real target download request. The target download request is used to request the download of the target data. Among the M retrieval requests, all download requests other than the target download request are fictitious download requests. M is an integer greater than 1.
[0324] For example, the target data could be Figure 7 The file block in the file. Figure 7 The multiple file blocks in file a are stored on different network nodes. When file a needs to be downloaded, each file block can be obtained through method 1200.
[0325] When the requesting node is unaware of the target download node, the target download request is also used to retrieve the address of the target download node. In this case, the download request can also be understood as a retrieval request. The target download node refers to the node that stores the target resource.
[0326] For ease of description, in this embodiment of the application, the other M-1 download requests besides the target download request are referred to as the other M-1 download requests.
[0327] For example, such as Figure 12 As shown, step S1210 may include steps S1211 to S1213.
[0328] S1211, Request the node to determine the hash value of the target data.
[0329] Specifically, the hash value of the target data can be generated based on relevant information about the target data. For example, relevant information about the target data may include the name of the target data, keywords related to the target data, or the content of the target data.
[0330] The information used when requesting to download data is the same as the information used when storing the data. For example, when storing data 1#, a hash value is generated based on the content of data 1#, and then data 1# is stored based on that hash value. When requesting to download data 1#, a hash value can also be generated based on the content of data 1#, and then a download request can be initiated based on that hash value to obtain data 1#.
[0331] S1212, request the node to generate the M-1 hash values that are closest to the hash value of the target data.
[0332] Because data is stored on download nodes with hash values equal to or close to the target data, data corresponding to hash values closer to the target data's hash value is more likely to be stored on the target download node. This means more download requests may be transmitted to the target download node, which remains unaware of the requesting node's true needs, thus protecting the requesting node's privacy to some extent.
[0333] It should be understood that step S1212 is only an example of a method for generating M-1 hash values, and M-1 hash values can also be generated in other ways. For a detailed description, please refer to step S610 in method 600, which will not be repeated here.
[0334] S1213, the requesting node sends M download requests corresponding to the M hash values.
[0335] A download request corresponding to a hash value is used to request the download of the data corresponding to that hash value. A download request corresponding to a hash value can also be understood as a download request initiated based on the hash value.
[0336] For example, download request 1# corresponds to the hash value 1000 and is used to request the target download address for retrieving the data corresponding to the hash value 1000, and to request the download of the data corresponding to the hash value 1000.
[0337] For example, the requesting node sends M download requests corresponding to the M hash values to at least one first neighbor node. The at least one first neighbor node can be determined based on the M hash values. For instance, the first neighbor node corresponding to each download request is determined based on each hash value, and the M download requests are sent to the corresponding first neighbor node respectively. The first neighbor nodes corresponding to the M download requests can be the same or different. Each download request can have one or more first neighbor nodes.
[0338] For example, the requesting node sends M download requests corresponding to the M hash values to at least one first neighbor node. The at least one first neighbor node can be determined based on the hash value of the target data. For instance, the first neighbor node corresponding to the target download request is determined based on the hash value of the target data, and the M download requests are sent to the first neighbor node corresponding to the target download request. The first neighbor node corresponding to the target download request can be one or more.
[0339] Determining the first neighbor node based on the hash value can be done by determining the degree of similarity between the hash value and the first neighbor node.
[0340] Specifically, the requesting node can select one or more nodes that correspond to the node ID closest to the hash value among all neighboring nodes as its first neighboring node.
[0341] For example, download request 1# requests to download the data corresponding to hash value 1000. The requesting node will take the n neighbor nodes with the closest logical distance to hash value 1000 as the first neighbor nodes corresponding to download request 1#, where n is a positive integer. The requesting node sends download request 1# to these n first neighbor nodes.
[0342] If data corresponding to hash value 1000 is found among the n first neighbor nodes, then step S1220 is executed, and the retrieval process for download request 1# ends. The network node storing the data corresponding to hash value 1000 among the first neighbor nodes is the download node corresponding to download request 1#.
[0343] If no data corresponding to hash value 1000 is found among the n first neighbor nodes, then each of the n first neighbor nodes calculates the logical distance between its respective neighbor node's node ID and hash value 1000. The n neighbor nodes with the closest logical distance to hash value 1000 are designated as second neighbor nodes. The first neighbor nodes send download request #1 to the second neighbor nodes. This process is repeated until data corresponding to hash value 1000 is found, or until the retrieval time exceeds the fourth threshold, or until no network node closer to hash value 1000 can be found.
[0344] Alternatively, if no data corresponding to hash value 1000 is found among the n first neighbor nodes, then each of the n first neighbor nodes calculates the logical distance between its respective neighbor node's node ID and hash value 1000. The n neighbor nodes with the closest logical distance to hash value 1000 are sent to the requesting node. The requesting node can then determine its second neighbor node from the feedback network nodes and send download request 1# to the second neighbor node. This process is repeated until data corresponding to hash value 1000 is found, or until the retrieval time exceeds the fourth threshold, or until no network node closer to hash value 1000 can be found.
[0345] like Figure 13 As shown, request node 1310 requests the first neighbor node, such as... Figure 13 Network node 1320 sends M download requests. For example, the first neighbor node could be determined based on the hash value of the target resource. If the target resource is not found in the first neighbor node, the download request is sent to the second neighbor node. Figure 13As shown, the first neighbor node sends download requests to two second neighbor nodes, namely network node 1330 and network node 1340. One of the second neighbor nodes, network node 1330, stores the target data and some of the data requested by the other M-1 download requests. This completes step S1210. Network node 1330 is the target download node. In other words, in this case, the requesting node sends M download requests to the target download node through other network nodes.
[0346] It should be understood that the above is only for illustration, and the specific process of resource retrieval in the embodiments of this application can also be implemented in other ways, which are not limited in this embodiment.
[0347] S1220, the target download node sends feedback data to the requesting node based on M download requests.
[0348] For example, such as Figure 12 As shown, step S1220 includes steps S1221 to S1225. A detailed description of step S1220 can be found in step S840 of the aforementioned method 800. Figure 11 When describing step S1220, appropriate omissions are made.
[0349] S1221, the requesting node obtains the perturbation values corresponding to the M download requests and the public key of the target download node.
[0350] The target download node returns the perturbation values corresponding to M download requests, as well as the target download node's public key.
[0351] For example, the perturbation value corresponding to M download requests can be the hash value corresponding to M download requests.
[0352] For example, the perturbation value corresponding to M download requests can be a random number corresponding to M hash values.
[0353] For example, a network node can generate random numbers corresponding to the hash values of M download requests. In this case, the random numbers can be generated by either the requesting node or the target download node.
[0354] For example, a network node generates a unique random number for each hash value in the local file's hash value list (DHT) and stores it in a random number list. Figure 10As shown, all network nodes in a P2P storage network can store a list of hash values and a list of random numbers for local data. The hash value list stores the hash values of the local data, and the random number list stores the random numbers corresponding to the hash values. When new data is stored in the P2P storage network, the network node updates the DHT in real time, generates the corresponding random number, and updates the random number list. When data leaves the P2P storage network, the network node updates the DHT in real time and deletes the corresponding random number from the random number list. In this case, the random number can be stored in the target download node and sent by the target download node to the requesting node.
[0355] like Figure 10 As shown, the requesting node initiates M download requests based on M hash values. The target downloading node determines M hash values based on the M download requests. It then determines a random number corresponding to each of the M hash values from a random number list and sends this random number to the requesting node. For example, it sends the random number corresponding to the hash value to the requesting node in the form of a (hash value, random number) data pair. It should be noted that the M hash values may not all be stored on the target downloading node; therefore, the number of perturbation values corresponding to the M download requests may be less than M.
[0356] It should be understood that step S1221 is merely an example; the requesting node can also obtain the perturbation values corresponding to the M download requests and the public key of the target download node through other means. See method 500 for a detailed description, which will not be repeated here.
[0357] S1222, the requesting node uses its public key to encrypt its symmetric key, and uses the perturbation value corresponding to the target download request to perturb the encryption result.
[0358] For example, the requesting node can determine the random number b corresponding to the hash value b of the target data from the random number returned by the target downloading node, encrypt its own symmetric key k using the public key e, and perturb the encryption result using the random number b to obtain the perturbation result v.
[0359] S1223, the requesting node sends the perturbation result to the target downloading node.
[0360] S1224, the target download node descrambles the perturbation result using the perturbation values corresponding to the M download requests, and decrypts the descrambled result using its own private key to obtain the key corresponding to the M download requests.
[0361] S1225, the target download node uses the keys corresponding to the M download requests to encrypt the data requested by the M download requests respectively, and sends the encrypted data as feedback data to the requesting node.
[0362] S1230, the requesting node obtains the target data based on the feedback data.
[0363] For example, such as Figure 12 As shown, step S1230 includes step S1231.
[0364] S1231, the requesting node uses its own symmetric key to decrypt the encrypted data and obtain the target data.
[0365] The requesting node uses its own symmetric key k to decrypt the encrypted data, obtaining the decrypted data. Since only k is available... b =k, therefore, the requesting node can only decrypt the target data, not other data, and thus cannot spy on the privacy of the target downloading node, achieving unintentional transmission.
[0366] According to the solution in this application embodiment, the target download request is hidden within multiple download requests, and multiple download requests are sent concurrently. This prevents the target download node from accurately knowing the true needs of the requesting node, thus protecting user privacy to a certain extent. The solution in this application embodiment does not rely on any trusted third party and completes data transmission in an untrusted network environment, improving the security of data transmission in such environments.
[0367] Furthermore, through random key interaction, the target downloader uses multiple keys to encrypt the data requested by the requesting node. Only the target data is encrypted using the requesting node's symmetric key. Therefore, the requesting node can only use its own symmetric key to obtain the target data it needs and cannot obtain other data on the target downloading node, thus ensuring the privacy of the target downloading node. In other words, the privacy of both the requesting node and the target downloading node is protected.
[0368] Meanwhile, according to the solution of this application embodiment, the target download request is hidden within multiple download requests, and multiple download requests are sent concurrently. During the data retrieval process, intermediate nodes cannot accurately know the true needs of the requesting nodes, thus protecting user privacy to a certain extent. The solution of this application embodiment does not rely on any trusted third party and completes data retrieval in an untrusted network environment, improving the security of data transmission in untrusted network environments.
[0369] Furthermore, by generating download requests based on their distance from the hash value of the target data, the data requested by the remaining M-1 download requests is more likely to be stored on the target download node, which helps to hide the true needs of the requesting node from the target download node.
[0370] The following is combined Figures 14 to 17 The apparatus of the embodiments of this application will be described below. It should be understood that the apparatus described below is capable of performing the methods of the foregoing embodiments of this application. To avoid unnecessary repetition, repeated descriptions will be appropriately omitted when describing the apparatus of the embodiments of this application below.
[0371] Figure 14 This is a schematic block diagram of a data transmission device according to an embodiment of this application. Figure 14 The data transmission apparatus 1400 shown includes a transceiver unit 1410 and a processing unit 1420. The transceiver unit 1410 may include one unit or two units, such as a transmitting unit and a receiving unit, and this embodiment of the application does not limit this.
[0372] The transceiver unit 1410 and the processing unit 1420 can be used to execute the data transmission method 500, 600, 800 or 1200 of the embodiments of this application.
[0373] The transceiver unit 1410 is used to initiate M download requests to the target download node. Among the M download requests, there is a real target download request, which is used to request the download of target data. The remaining M-1 download requests are fictitious download requests, where M is an integer greater than 1. The transceiver unit 1410 is used to receive feedback data sent by the target download node based on the M download requests.
[0374] The processing unit 1420 is used to: acquire target data based on feedback data.
[0375] Optionally, as an embodiment, the processing unit 1420 is further configured to: obtain the public key of the target download node and the perturbation values corresponding to the M download requests; encrypt the symmetric key of the request node using the public key of the target download node; perturb the encryption result using the perturbation value corresponding to the target download request; send the perturbation result to the target download node; and decrypt the feedback data using the symmetric key of the request node to obtain the target data; wherein the feedback data includes encrypted data, which is obtained based on the perturbation result.
[0376] Optionally, as an embodiment, the transceiver unit 1410 is further configured to: initiate K retrieval requests to the index node, wherein the K retrieval requests include real target retrieval requests, the target retrieval requests are used to request the target download node for retrieving target data, and the remaining K-1 retrieval requests are fictitious retrieval requests, where K is an integer greater than 1; receive index information sent by the index node according to the K retrieval requests, the index information being used to indicate the download node for the data; the processing unit 1420 is further configured to: determine the target download node according to the index information.
[0377] Optionally, as an embodiment, the processing unit 1420 is further configured to: determine the remaining M-1 download requests based on the first index information in the index information, wherein the download node indicated by the first index information is the target download node.
[0378] Optionally, as an embodiment, the processing unit 1420 is specifically configured to: determine the remaining M-1 download requests based on the first index information when the number of first index information is greater than or equal to a first threshold.
[0379] Optionally, as an embodiment, the processing unit 1420 is specifically used to: increase the value of K when the number of first index information is less than the first threshold; initiate K retrieval requests to the index node again; repeat the above process until the number of first index information is greater than or equal to the first threshold, and determine the remaining M-1 download requests based on the first index information in the index information.
[0380] Optionally, as an embodiment, the apparatus is applied in a distributed structured P2P storage network, and the processing unit 1420 is further configured to: obtain the hash value of the target data; and determine K retrieval requests based on the hash value of the target data.
[0381] Optionally, as an embodiment, the processing unit 1420 is specifically configured to: generate K-1 hash values that are closest to the hash value of the target data; and use the retrieval requests for the K hash values as K retrieval requests.
[0382] Figure 15 This is a schematic block diagram of a data transmission device according to an embodiment of this application. Figure 15 The data transmission device 1500 shown includes a transceiver unit 1510 and a processing unit 1520.
[0383] The transceiver unit 1510 and the processing unit 1520 can be used to execute the data transmission method 500, 600, 800, or 1200 of the embodiments of this application. The transceiver unit 1510 may include one unit or two units, such as a sending unit and a receiving unit, and the embodiments of this application do not limit this.
[0384] The transceiver unit 1510 is used to: receive M download requests sent by the requesting node, where M is an integer greater than 1; and receive the perturbation results sent by the requesting node.
[0385] The processing unit 1520 is used to: descramble the perturbation result using the perturbation values corresponding to the M download requests to obtain the descrambled result corresponding to the M download requests; decrypt the descrambled result corresponding to the M download requests using the private key of the download node to obtain the key corresponding to the M download requests; and encrypt the data requested by the M download requests using the key corresponding to the M download requests to obtain M encrypted data.
[0386] The transceiver unit 1510 is also used to send M encrypted data to the requesting node.
[0387] Optionally, as an embodiment, the perturbation result is obtained by encrypting the encryption result using the perturbation value corresponding to the target download request. The transceiver unit 1510 is further configured to: send the public key of the download node to the request node, the public key being used to encrypt the symmetric key of the request node to obtain the encryption result.
[0388] It should be noted that the aforementioned devices 1400 and 1500 are embodied in the form of functional units. The term "unit" here can be implemented in software and / or hardware, without specific limitations.
[0389] For example, a "unit" can be a software program, a hardware circuit, or a combination of both that implements the above functions. The hardware circuit may include an application-specific integrated circuit (ASIC), electronic circuitry, a processor (e.g., a shared processor, a proprietary processor, or a group processor) and memory for executing one or more software or firmware programs, integrated logic circuitry, and / or other suitable components that support the described functions.
[0390] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0391] Figure 16 This is a schematic diagram of the hardware structure of the data transmission device provided in the embodiments of this application. Figure 16 The data transmission device 1600 shown (which may specifically be a computer device) includes a memory 1601, a processor 1602, a communication interface 1603, and a bus 1604. The memory 1601, processor 1602, and communication interface 1603 are interconnected via the bus 1604.
[0392] The memory 1601 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1601 may store a program. When the program stored in the memory 1601 is executed by the processor 1602, the processor 1602 and the communication interface 1603 are used to execute the various steps of the data transmission method of the embodiments of this application.
[0393] The processor 1602 may be a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), graphics processing unit (GPU), or one or more integrated circuits, used to execute relevant programs to achieve the functions required by the units in the data transmission apparatus of this application embodiment, or to execute the data transmission method of the method embodiment of this application.
[0394] The processor 1602 can also be an integrated circuit chip with signal processing capabilities. In implementation, each step of the data transmission method of this application can be completed by the integrated logic circuitry in the hardware of the processor 1602 or by instructions in software form. The processor 1602 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory 1601. The processor 1602 reads the information in the memory 1601 and, in conjunction with its hardware, performs the functions required by the units included in the data transmission device of this application embodiment, or executes the data transmission method of the method embodiment of this application.
[0395] Communication interface 1603 uses transceiver devices, such as, but not limited to, transceivers, to enable communication between device 1600 and other devices or communication networks. For example, M download requests can be initiated to the target download node through communication interface 1603. Feedback data sent by the target download node based on the M download requests can also be obtained through communication interface 1603.
[0396] Bus 1604 may include a pathway for transmitting information between various components of device 1600 (e.g., memory 1601, processor 1602, communication interface 1603).
[0397] It should be understood that the transceiver unit 1410 in the data transmission device 1400 is equivalent to the communication interface 1603 in the data transmission device 1600; the processing unit 1420 in the data transmission device 1400 can be equivalent to the processor 1602.
[0398] Figure 17 This is a schematic diagram of the hardware structure of the data transmission device provided in the embodiments of this application. Figure 17 The data transmission device 1700 shown (which may specifically be a computer device) includes a memory 1701, a processor 1702, a communication interface 1703, and a bus 1704. The memory 1701, processor 1702, and communication interface 1703 are interconnected via the bus 1704.
[0399] The memory 1701 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1701 may store a program. When the program stored in the memory 1701 is executed by the processor 1702, the processor 1702 and the communication interface 1703 are used to execute the various steps of the data transmission method of the embodiments of this application.
[0400] The processor 1702 may be a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), graphics processing unit (GPU), or one or more integrated circuits, used to execute relevant programs to achieve the functions required by the units in the data transmission apparatus of this application embodiment, or to execute the data transmission method of the method embodiment of this application.
[0401] The processor 1702 can also be an integrated circuit chip with signal processing capabilities. In implementation, each step of the data transmission method of this application can be completed by the integrated logic circuitry in the hardware of the processor 1702 or by instructions in software form. The processor 1702 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory 1701. The processor 1702 reads the information in the memory 1701 and, in conjunction with its hardware, performs the functions required by the units included in the data transmission apparatus of this application embodiment, or executes the data transmission method of the method embodiment of this application.
[0402] The communication interface 1703 uses a transceiver device, such as, but not limited to, a transceiver, to enable communication between the device 1700 and other devices or communication networks. For example, the communication interface 1703 can be used to obtain M download requests sent by the requesting node and perturbation results sent by the requesting node.
[0403] Bus 1704 may include a pathway for transmitting information between various components of device 1700 (e.g., memory 1701, processor 1702, communication interface 1703).
[0404] It should be understood that the transceiver unit 1510 in the data transmission device 1500 is equivalent to the communication interface 1703 in the data transmission device 1700; the processing unit 1520 in the data transmission device 1500 can be equivalent to the processor 1702.
[0405] It should be noted that, although Figure 16 , Figure 17The illustrated devices only show the memory, processor, and communication interface. However, those skilled in the art should understand that in specific implementations, devices 1600 and 1700 may also include other devices necessary for normal operation. Furthermore, depending on specific needs, those skilled in the art should understand that devices 1600 and 1700 may also include hardware devices for implementing other additional functions. Moreover, those skilled in the art should understand that devices 1600 and 1700 may only include the devices necessary for implementing the embodiments of this application, and may not necessarily include... Figure 16 , Figure 17 All the devices shown.
[0406] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0407] It should be understood that the processor in the embodiments of this application can be a central processing unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0408] It should also be understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0409] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0410] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0411] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0412] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0413] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0414] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0415] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0416] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0417] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0418] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0419] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data transmission method, characterized by, The method comprises: A request node initiates M download requests to a target download node, wherein the M download requests include a real target download request for requesting to download target data, and the remaining M-1 download requests are fictitious download requests, and M is an integer greater than 1; Receiving feedback data sent by the target download node according to the M download requests; Obtaining the target data according to the feedback data; The method further comprises: Obtaining a public key of the target download node and a perturbation value corresponding to the M download requests; Encrypting a symmetric key of the request node by using the public key of the target download node; Perturbing the encryption result by using the perturbation value corresponding to the target download request; Sending the perturbed result to the target download node; And obtaining the target data according to the feedback data, comprising: Decrypting the feedback data by using the symmetric key of the request node to obtain the target data; Wherein, the perturbation value corresponding to the M download requests is used for the target download node to de-perturb the perturbed result to obtain a de-perturbed result corresponding to the M download requests, and the feedback data includes encrypted data, and the encrypted data is obtained according to the de-perturbed result.
2. The method of claim 1, wherein, Before the request node initiates M download requests to the target download node, the method further comprises: The request node initiates K retrieval requests to an index node, wherein the K retrieval requests include a real target retrieval request for requesting to retrieve the target download node of the target data, and the remaining K-1 retrieval requests are fictitious retrieval requests, and K is an integer greater than 1; Receiving index information sent by the index node according to the K retrieval requests, wherein the index information is used to indicate the download node of the data; Determining the target download node according to the index information.
3. The method of claim 2, wherein, The method further comprises: Determining the remaining M-1 download requests according to first index information in the index information, wherein the download node indicated by the first index information is the target download node.
4. The method of claim 3, wherein, The determining the remaining M-1 download requests according to the first index information in the index information comprises: In a case where the number of the first index information is greater than or equal to a first threshold, determining the remaining M-1 download requests according to the first index information in the index information.
5. The method of claim 3, wherein, The determining the remaining M-1 download requests according to the first index information in the index information comprises: In a case where the number of the first index information is less than a first threshold, increasing the value of K; Initiating K retrieval requests to the index node again; Repeating the above process until the number of the first index information is greater than or equal to the first threshold, and determining the remaining M-1 download requests according to the first index information in the index information.
6. The method according to any one of claims 2 to 5, characterized in that, The method is applied to a distributed structured P2P storage network, and the method further comprises: Obtaining a hash value of the target data; Determining the K retrieval requests according to the hash value of the target data.
7. The method of claim 6, wherein, The determining the K retrieval requests according to the hash value of the target data comprises: generating K-1 hash values closest to the hash value of the target data; sending a retrieval request based on the K hash values as the K retrieval requests.
8. A data transmission method, characterized by, The method comprises: The download node receives M download requests sent by a request node, where M is an integer greater than 1; The download node receives a perturbation result sent by the request node; The download node decrypts the perturbation result using a private key of the download node to obtain a key corresponding to the M download requests; The download node encrypts data requested by the M download requests respectively using the keys corresponding to the M download requests to obtain M encrypted data; The download node sends the M encrypted data to the request node. The perturbation result is obtained by perturbing an encrypted result using a perturbation value corresponding to a target download request, and the method further comprises:
9. The method of claim 8, wherein, The download node sends a public key of the download node to the request node, and the public key is used to encrypt a symmetric key of the request node to obtain the encrypted result. Comprise:
10. A data transmission apparatus, characterized by comprising: a sending unit, a receiving unit and a processing unit, The sending unit is configured to initiate M download requests to a target download node, the M download requests include a real target download request, the target download request is used to request to download target data, and the remaining M-1 download requests in the M download requests are fictitious download requests, and M is an integer greater than 1; The receiving unit is configured to receive feedback data sent by the target download node according to the M download requests; The processing unit is configured to obtain the target data according to the feedback data; The processing unit is further configured to obtain a public key of the target download node and a perturbation value corresponding to the M download requests; The symmetric key of the request node is encrypted using the public key of the target download node; The encrypted result is perturbed using the perturbation value corresponding to the target download request; The perturbation result is sent to the target download node; The feedback data is decrypted using the symmetric key of the request node to obtain the target data; The perturbation value corresponding to the M download requests is used by the target download node to de-perturb the perturbation result to obtain a de-perturbation result corresponding to the M download requests, the feedback data includes encrypted data, and the encrypted data is obtained according to the de-perturbation result. The sending unit is further configured to:
11. The apparatus of claim 10, wherein, initiate K retrieval requests to an index node, the K retrieval requests include a real target retrieval request, the target retrieval request is used to request a target download node of the target data, and the remaining K-1 retrieval requests in the K retrieval requests are fictitious retrieval requests, and K is an integer greater than 1; The receiving unit is further configured to: receive index information sent by the index node according to the K retrieval requests, the index information is used to indicate a download node of data; The processing unit is further configured to: determine a target download node according to the index information. The processing unit is further configured to:
12. The apparatus of claim 11, wherein, The first index information in the index information is used to determine the remaining M-1 download requests, and the download node indicated by the first index information is a target download node.
13. The apparatus of claim 12, wherein, The processing unit is specifically configured to: In a case where the number of the first index information is greater than or equal to a first threshold, the first index information in the index information is used to determine the remaining M-1 download requests.
14. The apparatus of claim 12, wherein, The processing unit is specifically configured to: In a case where the number of the first index information is less than the first threshold, the value of K is increased; The K retrieval requests are initiated again to the index node; The above process is repeated until the number of the first index information is greater than or equal to the first threshold, and the first index information in the index information is used to determine the remaining M-1 download requests.
15. The apparatus of any one of claims 11 to 14, wherein, The device is applied to a distributed structured P2P storage network, and the processing unit is further configured to: Obtain a hash value of the target data; The K retrieval requests are initiated according to the hash value of the target data.
16. The apparatus of claim 15, wherein, The processing unit is specifically configured to: Generate K-1 hash values closest to the hash value of the target data; The retrieval request based on the K hash values is used as the K retrieval requests.
17. A data transmission apparatus, characterized by comprising: Comprise: A receiving unit, a sending unit and a processing unit, The receiving unit is configured to: Receive M download requests sent by a request node, wherein M is an integer greater than 1; Receive a perturbation result sent by the request node; The processing unit is configured to: Use a perturbation value corresponding to the M download requests to de-perturb the perturbation result, to obtain a de-perturbation result corresponding to the M download requests; Use a private key of a download node to decrypt the de-perturbation result corresponding to the M download requests, to obtain a key corresponding to the M download requests; Use the key corresponding to the M download requests to respectively encrypt data requested by the M download requests, to obtain M encrypted data; The sending unit is configured to: send the M encrypted data to the request node.
18. The apparatus of claim 17, wherein, The perturbation result is obtained by using a perturbation value corresponding to a target download request to perturb an encrypted result, and the sending unit is further configured to: Send a public key of the download node to the request node, and the public key is used to encrypt a symmetric key of the request node, to obtain the encrypted result.
19. A data transmission system, characterized by The device comprises the device of any one of claims 10 to 16 and the device of claim 17 or 18.
20. A data transmission apparatus, characterized by comprising: The device comprises a processor and a memory, the memory is used to store program instructions, and the processor is used to call the program instructions to execute the method of any one of claims 1 to 7.
21. A data transmission apparatus, characterized by comprising: The device comprises a processor and a memory, the memory is used to store program instructions, and the processor is used to call the program instructions to execute the method of claim 8 or 9.
22. A computer-readable storage medium, characterized in that, The computer readable medium stores program code for execution by a device, the program code comprising program code for performing the method of any one of claims 1 to 9.
23. A chip, characterized by The chip comprises a processor and a data interface, the processor reads instructions stored on a memory through the data interface to execute the method of any one of claims 1 to 9.
Citation Information
Patent Citations
Identity verification method based on challenge responses and fingerprint identification
CN103618611A
Security downloading method and system of TMK
CN103716320A
Method and apparatus for transmitting search request
CN107223253A
Network searching method and device
CN109871478A