Multi-node secure transmission method and device
By adopting a multi-node secure transmission method in P2P network, the single point problem of centralized data transmission middleware is solved, the reliability and efficiency of file transmission are improved, and it is suitable for large-scale distributed application scenarios.
Patent Information
- Application Number
- CN202411432142.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-11
AI Technical Summary
Existing centralized data transmission middleware is prone to single point congestion and single point failure, which affects transmission efficiency and security. It is difficult for P2P network to improve transmission efficiency while improving file transmission reliability.
Using a multi-node secure transmission method, the transmission node is connected to the P2P network, and the target node is selected from multiple transmission nodes based on user requests, a fragmented file is obtained, integrity checksum reorganization is performed, and the target file is generated.
Without relying on centralized servers, the reliability and efficiency of file transfer are significantly improved and are suitable for large-scale distributed application scenarios.
Smart Images

Figure CN119420747A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology, and in particular relates to a multi-node secure transmission method and device. Background Art
[0002] With the rapid development and popularization of computer technology and network technology, more and more enterprises rely on information systems for daily production and management to improve corporate efficiency. Due to the rapid development of computer technology and the increasing demand for information processing and integration by enterprises, there are a large number of isolated systems in enterprises, which are independent of each other and cannot be connected. This not only causes the isolation of enterprise data and makes it impossible to share, but also increases the complexity of system operation and maintenance, and causes a waste of resources.
[0003] At present, the development of system integration technology shows a trend of distribution and diversification. Specifically, it requires the system to be able to integrate heterogeneous information; each legacy system can achieve enterprise information integration without redevelopment. With the continuous development of information technology and network technology, and the need to build more and more complex information integration and resource sharing platforms, middleware technology is bound to become the most competitive solution for these applications.
[0004] Data transmission middleware is a hot spot in the current development of middleware technology. At present, most data transmission middleware is based on centralization, that is, all data transmission services are provided by the central server, and each communication node realizes data transmission through the central server. A major problem of centralized data transmission middleware is its inefficiency, which can easily cause the central server's "single point congestion" and "single point failure" and other drawbacks, seriously affecting the transmission efficiency and data transmission security of the entire data transmission system. Once the central server crashes, the entire data transmission system will also be paralyzed.
[0005] With the development of Internet technology, P2P network, as a decentralized solution, can effectively disperse transmission pressure and improve transmission efficiency. However, how to improve the reliability of P2P network for file transmission while ensuring file transmission efficiency is still a technical problem. Summary of the invention
[0006] In view of the above-mentioned problems existing in the prior art, an embodiment of the present invention provides a multi-node secure transmission method and device; this method can significantly improve the reliability of file transmission without relying on any centralized server.
[0007] According to a first aspect of an embodiment of the present invention, a multi-node secure transmission method is provided, the method comprising at least one transmission node and a transmitted node; the method is applied to the transmitted node; when any of the transmission nodes is searched based on a communication protocol, a P2P network connection is established with all of the transmission nodes; based on a user request, a target transmission node is selected from all of the transmission nodes; and a number of sliced files corresponding to the user request are obtained from the target transmission node; an integrity check is performed on the decrypted sliced files; if the check passes, the decrypted sliced files are reassembled to generate a target file corresponding to the user request.
[0008] Optionally, when the at least one transmission node is used to indicate more than two transmission nodes, the more than two transmission nodes include a master transmission node and at least one slave transmission node; when any of the transmission nodes is searched based on the communication protocol, a P2P network connection is established with all of the transmission nodes; including: when any of the transmission nodes is searched based on the communication protocol, a P2P network connection is established with the transmission node; based on the communication protocol, the remaining transmission nodes in the original topology structure where the transmission node is located are searched; and a P2P network connection is established with each of the remaining transmission nodes respectively.
[0009] Optionally, the method also includes: if the verification fails, tracing the main transmission node of the sliced file based on the decrypted sliced file; obtaining a number of sliced files corresponding to the user request from the main transmission node; and reorganizing based on the decrypted sliced files to generate a target file corresponding to the user request.
[0010] The method comprises: based on the user request, selecting a target transmission node from all the transmission nodes; and obtaining a number of sliced files corresponding to the user request from the target transmission node; including: based on the user request, selecting a transmission node which is closest to the transmitted node and can feed back the sliced files corresponding to the user request from the original topology structure as the target transmission node; sending a transmission instruction for the sliced files to the target transmission node; and receiving a number of sliced files corresponding to the transmission instruction sent by the transmission node.
[0011] Optionally, based on the user request, the transmission node that is closest to the transmitted node and can feedback the sliced file corresponding to the user request is selected from the original topology structure as the target transmission node; including: sending the user request to all transmission nodes in the original topology structure through the P2P network; receiving the feedback result sent by each of the transmission nodes through the P2P network to obtain the transmission time; sorting all the transmission nodes in the original topology structure in the order of the transmission time to generate a sorting result; and selecting as the target transmission node the transmission node whose transmission time is ranked first in the sorting result and whose feedback result indicates that it can feedback the sliced file corresponding to the user request.
[0012] Optionally, the method further includes: obtaining a user request; verifying the user identity information based on the user request; if the verification passes, selecting a target transmission node from all the transmission nodes based on the user request.
[0013] Optionally, the method further includes: generating a new topology when the transmitted node establishes a P2P network connection with all the transmitting nodes; wherein the transmitted node serves as a slave transmitting node in the new topology.
[0014] According to the second aspect of an embodiment of the present invention, a multi-node secure transmission method is also provided, which is applied to a transmission node; comprising: receiving a user request sent by the transmitted node; querying whether there is a sliced file corresponding to the user request, and obtaining a query result; if the query result indicates that there is no sliced file corresponding to the user request, generating a feedback result that cannot be fed back; if the query result indicates that there is a sliced file corresponding to the user request, detecting the working status of the current P2P network; if the detection result indicates that the working status of the current P2P network is an idle state, generating a feedback result that can be fed back; if the detection result indicates that the working status of the current P2P network is a transmission state, generating a feedback result that cannot be fed back.
[0015] Optionally, the method further includes: receiving a transfer instruction for a sliced file; selecting a number of sliced files corresponding to the transfer instruction from the sliced file library; and sending the number of sliced files to the transferred node.
[0016] Optionally, when the transmission node is a main transmission node; the method also includes: the main transmission node divides the read target file according to a preset length to generate several sliced files; the main transmission node, for any current sliced file among the several sliced files: performs hash calculation on the current sliced file to generate a current hash value; obtains the previous hash value corresponding to the previous sliced file adjacent to the current sliced file; encrypts the traceability location of the current sliced file, the current hash value, and the previous hash value together to generate an identifier corresponding to the current sliced file; the main transmission node locally stores several sliced files carrying identifiers to generate a sliced file library corresponding to the target file.
[0017] According to the third aspect of the embodiment of the present invention, a multi-node secure transmission device is also provided, the device includes at least one transmission node and a transmitted node; the device is applied to the transmitted node; a network connection module; when any of the transmission nodes is searched based on the communication protocol, a P2P network connection is established with all the transmission nodes; an acquisition module is used to select a target transmission node from all the transmission nodes based on a user request; and obtain a number of sliced files corresponding to the user request from the target transmission node; a verification module is used to perform integrity verification on the decrypted sliced files; a generation module is used to reorganize the decrypted sliced files if the verification passes, and generate a target file corresponding to the user request.
[0018] According to a fourth aspect of an embodiment of the present invention, a multi-node secure transmission device is also provided, which is applied to a transmission node; comprising: a receiving module, used to receive a user request sent by the transmitted node; a query module, used to query whether there is a sharded file corresponding to the user request, and obtain a query result; a first generating module, used to generate a feedback result that cannot be fed back if the query result indicates that there is no sharded file corresponding to the user request; a detection module, used to detect the working status of the current P2P network if the query result indicates that there is a sharded file corresponding to the user request; a second generating module, used to generate a feedback result that can be fed back if the detection result indicates that the working status of the current P2P network is an idle state; and a third generating module, used to generate a feedback result that cannot be fed back if the detection result indicates that the working status of the current P2P network is a transmission state.
[0019] According to the fifth aspect of the embodiments of the present invention, there is also provided an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in the first aspect or the second aspect.
[0020] According to a sixth aspect of an embodiment of the present invention, there is further provided a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect or the second aspect is implemented.
[0021] The present invention provides a multi-node secure transmission method and device; including at least one transmission node and a transmitted node; the method is applied to the transmitted node; a specific implementation method includes: first, when any of the transmission nodes is searched based on the communication protocol, a P2P network connection is established with all the transmission nodes; second, based on the user request, a target transmission node is selected from all the transmission nodes; and a number of sliced files corresponding to the user request are obtained from the target transmission node; then, the integrity of the decrypted sliced files is checked; finally, if the check passes, the decrypted sliced files are reassembled to generate a target file corresponding to the user request. This embodiment combines the P2P network and sliced transmission to realize the sliced transmission of files, and verifies the integrity of the sliced files after the sliced files are transmitted; thereby, without relying on a centralized server, not only the file transmission efficiency can be improved, but also the file transmission reliability can be improved, thereby meeting the file transmission requirements in large-scale distributed application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Hereinafter, some specific embodiments of the present invention will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:
[0023] Figure 1 A schematic diagram of a flow chart of a multi-node secure transmission method provided by an embodiment of the present invention;
[0024] Figure 2 A schematic diagram of a flow chart of a method for selecting a target transmission node in an embodiment of the present invention;
[0025] Figure 3 A schematic flow chart of a multi-node secure transmission method provided by another embodiment of the present invention;
[0026] Figure 4 A schematic diagram of the structure of a multi-node secure transmission device provided by an embodiment of the present invention;
[0027] Figure 5 A schematic structural diagram of a multi-node secure transmission device provided in another embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0029] like Figure 1 , which is a flow chart of a multi-node secure transmission method provided by an embodiment of the present invention.
[0030] A multi-node secure transmission method includes at least one transmitting node and a transmitted node; the method is applied to the transmitted node; the method includes at least the following steps:
[0031] S101, when any transmission node is searched based on the communication protocol, a P2P network connection is established with all transmission nodes;
[0032] S102, based on the user request, selecting a target transmission node from all transmission nodes; and obtaining a number of sliced files corresponding to the user request from the target transmission node;
[0033] S103, performing integrity check on the decrypted sliced files;
[0034] S104: If the verification is passed, the decrypted plurality of sliced files are reassembled to generate a target file corresponding to the user request.
[0035] Specifically, when the at least one transmission node includes only one main transmission node; the transmission method includes: first, when the transmitted node searches for the main transmission node based on the QUIC signal protocol, the transmitted node establishes a P2P network connection with the main transmission node; second, based on the user request, the transmitted node takes the main transmission node as the target transmission node, and obtains a number of sliced files corresponding to the user request from the target transmission node; finally, each sliced file is decrypted, and based on the hash value corresponding to each decrypted sliced file, the decrypted sliced files are reorganized to generate a target file corresponding to the user request.
[0036] When the at least one transmission node is used to indicate more than two transmission nodes, the more than two transmission nodes are used to indicate a master transmission node and at least one slave transmission node; the transmission method includes:
[0037] First, when any of the transmission nodes is searched based on the communication protocol, a P2P network connection is established with the transmission node; based on the communication protocol, the remaining transmission nodes in the original topological structure where the transmission node is located are searched; a P2P network connection is established with each of the remaining transmission nodes respectively; and a new topological structure is generated. Secondly, based on the user request, a transmission node that is closest to the transmitted node and can feedback the sliced file corresponding to the user request is selected from the original topological structure as the target transmission node; a transmission instruction for the sliced file is sent to the target transmission node; and several sliced files corresponding to the transmission instruction sent by the transmission node are received. Afterwards, each of the sliced files in the sliced files is decrypted, and the integrity of the decrypted sliced files is checked. Finally, if the check result indicates that the decrypted sliced files can form a complete file corresponding to the user request, the decrypted sliced files are reorganized to generate a target file corresponding to the user request. Here, the target transmission node can be a master transmission node or a slave transmission node.
[0038] If the verification fails, the target transmission node is determined to be a slave transmission node; and based on the decrypted sliced file, the master transmission node of the sliced file is traced; several sliced files corresponding to the user request are obtained from the master transmission node; and the sliced files are reassembled based on the decrypted sliced files to generate the target file corresponding to the user request. Alternatively, if the verification fails, the master transmission node of the sliced file is traced based on the decrypted sliced file; the sliced files missing from the slave transmission node are obtained from the master transmission node; and the sliced files are reassembled based on all the decrypted sliced files to generate the target file corresponding to the user request.
[0039] This embodiment combines the P2P network and sliced transmission to realize sliced transmission of files, and verifies the integrity of the sliced files after the sliced files are transmitted; thereby, without relying on a centralized server, not only the file transmission efficiency can be improved, but also the file transmission reliability can be improved, thereby meeting the file transmission needs in large-scale distributed application scenarios.
[0040] In a preferred implementation of this embodiment, when the transmitted node establishes a P2P network connection with all the transmitting nodes, a new topology is generated, wherein the transmitted node serves as a slave transmitting node in the new topology. Here, the transmitting node in the new topology is used for network search of the next transmitted node.
[0041] Specifically, when the next transmitted node searches for any transmission node in the new topology based on the communication protocol, the next transmitted node establishes a P2P network with all transmission nodes in the new topology; then performs operations such as target transmission node selection, sliced file integrity check, and sliced file reorganization. This embodiment is based on establishing a P2P network connection between the transmitted node and all transmission nodes in the original topology, so that the transmitted node is added to the original topology as a transmission node; thereby, the original topology can be continuously improved, and the file transmission efficiency is improved.
[0042] like Figure 2 FIG. 1 is a flow chart of a method for selecting a target transmission node in an embodiment of the present invention.
[0043] The method for selecting a target transmission node includes at least the following steps:
[0044] S201, sending the user request to all transmission nodes in the original topology structure through the P2P network;
[0045] S202, receiving feedback results sent by each transmission node through the P2P network to obtain transmission time;
[0046] S203, sorting all transmission nodes in the original topology structure according to the order of transmission time to generate a sorting result;
[0047] S204: The transmission node whose transmission time is ranked first in the sorting result and whose feedback result indicates that it can feedback the sliced file corresponding to the user request is selected as the target transmission node.
[0048] For example: There are 5 transmission nodes in the original topology; each transmission node is distributed in different cities across the country. For example: the transmission node located in Beijing is the main transmission node; the transmission nodes located in Inner Mongolia, Tianjin, Wuhan and Changsha are slave transmission nodes respectively; the transmitted node is located in Guangdong. The transmitted node sends the user request to the transmission nodes located in Beijing, Inner Mongolia, Tianjin, Wuhan and Changsha at the same time; then obtains the feedback time of the transmission nodes in the above five cities for the user request; the feedback time is Changsha, Wuhan, Beijing, Tianjin and Inner Mongolia from small to large. From the above feedback time, it can be seen that since Changsha is relatively close to Guangdong, the transmission time of the Changsha transmission node is the shortest. However, according to the feedback results of the transmission nodes in various places, it can be seen that the P2P network of the transmission node in Changsha is relatively busy, and the P2P network of the transmission node in Wuhan is idle, so Wuhan is used as the target transmission node.
[0049] If there are missing files in several sliced files of the target transmission node, the main transmission node of the sliced files is determined based on the sliced files obtained by the Wuhan transmission node, and a transmission instruction is sent to the Beijing transmission node. The Beijing transmission node sends the sliced files corresponding to the user request to the transmitted node based on the transmission instruction. If the Beijing transmission node is busy, you can wait for the main transmission node to transmit until you obtain the sliced files sent by the main transmission node.
[0050] like Figure 3 FIG. 1 is a flow chart of a multi-node secure transmission method provided by another embodiment of the present invention.
[0051] A multi-node secure transmission method, the method is applied to a transmission node and comprises at least the following steps:
[0052] S301, receiving a user request sent by the transmitting node;
[0053] S302, query whether there is a sharded file corresponding to the user request, and obtain the query result; if not, execute step S305; if so, execute step S303;
[0054] S303, detecting the working state of the current P2P network; if the detection result indicates that the working state of the current P2P network is an idle state, executing step S304; if the detection result indicates that the working state of the current P2P network is a transmission state, executing step S305;
[0055] S304, generating a feedback result that can be fed back;
[0056] S305, generating a feedback result that cannot be fed back.
[0057] Here, the transmission node can be a slave transmission node or a master transmission node.
[0058] In a preferred implementation manner of this embodiment, the method further includes: receiving a transfer instruction for a sliced file; selecting a number of sliced files corresponding to the transfer instruction from the sliced file library; and sending the number of sliced files to the transferred node.
[0059] Specifically, the transmitting node sends the feedback result to the transmitted node; the transmitted node selects the target transmission node from all the transmission nodes in the original topology structure based on the feedback result and transmission time corresponding to each transmission node; and generates a transmission instruction. The transmitted node sends the transmission instruction to the target transmission node, and the target transmission node sends several sliced files corresponding to the transmission instruction to the transmitted node.
[0060] It should be noted that the sharded file library is stored in the master transmission node and / or in at least one slave transmission node. The sharded file library stored in the slave transmission node is transmitted from the master transmission node to the slave transmission node through the P2P network.
[0061] In a preferred implementation manner of this embodiment, when the transmission node is a main transmission node; the main transmission node divides the read target file according to a preset length to generate several sliced files; the main transmission node, for any current sliced file among the several sliced files: performs hash calculation on the current sliced file to generate a current hash value; obtains the previous hash value corresponding to the previous sliced file adjacent to the current sliced file; encrypts the traceability location of the current sliced file, the current hash value, and the previous hash value together to generate an identifier corresponding to the current sliced file; the main transmission node locally stores several sliced files carrying identifiers to generate a sliced file library corresponding to the target file.
[0062] Here, the sharded file library of this embodiment is generated by the main transmission node based on the offline or online state. The sharded file library generated based on the offline mode is conducive to improving the transmission efficiency between the transmission node and the transmitted node.
[0063] Although the files transmitted in the prior art are encrypted, they are still easily intercepted and decrypted during the transmission process, resulting in file leakage. For this reason, the present embodiment performs segmentation processing on the target file and then transmits it in slices, thereby reducing the leakage of file content caused by the interception of the entire file, thereby improving the security of file transmission. In addition, the present embodiment performs hash and encryption calculations on the sliced files obtained after segmentation, thereby facilitating the reorganization of the sliced files by the transmitted files and improving the accuracy of the reorganization of the sliced files.
[0064] The multi-node secure transmission method provided by the present invention has the following advantages compared with the traditional centralized file transmission method:
[0065] Decentralized transmission: File transmission is achieved through P2P network, eliminating the risk of single point failure and improving the robustness and reliability of the system.
[0066] Efficient file segmentation: Uses a predefined file segmentation algorithm to split large files into several small pieces, improving transmission efficiency and data management flexibility.
[0067] Dynamic transmission optimization: Dynamically adjust the transmission strategy according to the network status and node load, select the optimal transmission path and node, and ensure transmission efficiency and data integrity.
[0068] Stream management: Through stream management technology, the orderly transmission and reorganization of file fragments are achieved, ensuring the integrity of data and the stability of the transmission process.
[0069] Strong scalability: The system can be flexibly expanded to adapt to the storage and management needs of large-scale nodes and data, and meet the transmission needs in different application scenarios.
[0070] High accuracy: The accuracy of target file acquisition is improved based on integrity verification.
[0071] A multi-node secure transmission interaction method includes an original topology structure and a first transmitted node; the original topology structure includes a first transmission node as a master transmission node, and a second transmission node and a third transmission node as slave transmission nodes, and at least includes the following steps:
[0072] S1, the first transmission node divides the read target file according to the preset length to generate several sliced files; the first transmission node performs hash calculation on any current sliced file among the several sliced files to generate a current hash value; obtains the previous hash value corresponding to the previous sliced file adjacent to the current sliced file; encrypts the traceability of the current sliced file, the current hash value, and the previous hash value together to generate an identifier corresponding to the current sliced file; the first transmission node locally stores several sliced files carrying identifiers to generate a sliced file library corresponding to the target file.
[0073] S2, the second transmission node obtains the sharded file library corresponding to the user request from the first transmission node and stores it locally; the third transmission node obtains the sharded file corresponding to the user request from the second transmission node based on the multi-node secure transmission method of this embodiment, and stores it locally.
[0074] S3, when the first transmitted node searches for the second transmission node based on the communication protocol, it establishes a P2P network connection with the second transmission node; the first transmitted node searches for the remaining transmission nodes in the original topology structure based on the communication protocol; the first transmitted node establishes a P2P network connection with the first transmission node and the third transmission node respectively.
[0075] S4, the first transmitted node sends the user request to all transmission nodes in the original topology structure.
[0076] S5, for any transmission node in the original topology: the transmission node receives the user request sent by the transmitted node; queries whether there is a sharded file corresponding to the user request, and obtains a query result; if the query result indicates that there is no sharded file corresponding to the user request, a feedback result that cannot be fed back is generated; if the query result indicates that there is a sharded file corresponding to the user request, the working state of the current P2P network is detected; if the detection result indicates that the working state of the current P2P network is an idle state, a feedback result that can be fed back is generated; if the detection result indicates that the working state of the current P2P network is a transmission state, a feedback result that cannot be fed back is generated. Each transmission node sends the feedback result to the first transmitted node.
[0077] S6, the first transmitted node selects a third transmission node which is closest to the transmitted node and can feed back the sliced file corresponding to the user request from the original topology as the target transmission node; and sends a transmission instruction to the third transmission node.
[0078] S7, the third transmission node receives a transmission instruction for the sliced file; selects a number of sliced files corresponding to the transmission instruction; and then sends the number of sliced files to the first transmitted node.
[0079] S8. The first transmitted node performs integrity verification on the decrypted plurality of sliced files.
[0080] S9. If the verification is passed, the first transmitted node reorganizes the decrypted plurality of sliced files to generate a target file corresponding to the user request.
[0081] S10. If the verification fails, the main transmission node of the sliced file is traced back based on the decrypted sliced file; the first transmitted node obtains several sliced files corresponding to the user request from the first transmission node; and the sliced files are reassembled based on the decrypted sliced files to generate a target file corresponding to the user request.
[0082] It should be noted that the multi-node secure transmission interaction method proposed in the present invention is suitable for large-scale distributed applications, content distribution networks (CDNs), cloud storage services and other scenarios, avoiding the single point of failure and bandwidth bottleneck problems of traditional centralized file transmission methods, and greatly improving transmission efficiency and reliability. Through the decentralized P2P network transmission method, the method of the present invention can dynamically adjust the transmission path and strategy, meet the needs of large-scale data transmission, and improve the user experience.
[0083] Specific application scenarios include:
[0084] Distributed storage: In a distributed storage system, P2P networks are used to efficiently store and transmit files to ensure data availability and reliability.
[0085] Content Distribution Network (CDN): Distributes large-scale media content, such as video and audio, through P2P networks, reducing the load on central servers and improving transmission efficiency.
[0086] Cloud storage service: In cloud storage service, P2P network is used for file upload and download, which reduces the pressure on data center and improves user access speed.
[0087] Large file sharing: Share large files within an enterprise or across organizations, using P2P networks to achieve fast transmission and efficient sharing.
[0088] like Figure 4 , which is a schematic structural diagram of a logistics positioning device provided by an embodiment of the present invention.
[0089] A multi-node secure transmission device, comprising at least one transmission node and a transmitted node; the device is applied to the transmitted node; the device 400 comprises: a network connection module 401; when any of the transmission nodes is searched based on the communication protocol, a P2P network connection is established with all the transmission nodes; an acquisition module 402, for selecting a target transmission node from all the transmission nodes based on a user request; and obtaining a number of sliced files corresponding to the user request from the target transmission node; a verification module 403, for performing integrity verification on the decrypted sliced files; a generation module 404, for reorganizing the decrypted sliced files to generate a target file corresponding to the user request if the verification passes.
[0090] In a preferred implementation manner of this embodiment, when the at least one transmission node is used to indicate more than two transmission nodes, the more than two transmission nodes include a master transmission node and at least one slave transmission node; the network connection module includes: a first network creation unit, used to establish a P2P network connection with any of the transmission nodes when the transmission node is searched based on the communication protocol; a search unit, used to search for the remaining transmission nodes in the original topology structure where the transmission node is located based on the communication protocol; and a second network creation unit, used to establish a P2P network connection with each of the remaining transmission nodes respectively.
[0091] In a preferred implementation manner of this embodiment, the method also includes: a tracing module, which is used to trace the main transmission node of the sliced file based on the decrypted sliced file if the verification fails; the generation module is also used to obtain several sliced files corresponding to the user request from the main transmission node; and reorganize based on the decrypted sliced files to generate a target file corresponding to the user request.
[0092] In a preferred implementation manner of this embodiment, the acquisition module includes: a selection unit, which is used to select, based on a user request, from the original topology structure a transmission node that is closest to the transmitted node and can feed back the sliced file corresponding to the user request as a target transmission node; a sending unit, which is used to send a transmission instruction for the sliced file to the target transmission node; and a receiving unit, which is used to receive a number of sliced files corresponding to the transmission instruction sent by the transmission node.
[0093] In a preferred implementation manner of this embodiment, the selection unit includes: a sending subunit, which is used to send the user request to all transmission nodes in the original topology structure through the P2P network; an acquisition subunit, which is used to receive the feedback results sent by each of the transmission nodes through the P2P network and obtain the transmission time; a generation subunit, which is used to sort all the transmission nodes in the original topology structure according to the order of the transmission time and generate a sorting result; a determination subunit, which is used to take the transmission node whose transmission time is ranked first in the sorting result and whose feedback result represents the ability to feedback the sliced file corresponding to the user request as the target transmission node.
[0094] like Figure 5 , which is a schematic structural diagram of a multi-node secure transmission device provided in another embodiment of the present invention.
[0095] A multi-node secure transmission device, the device 500 is applied to a transmission node; it includes: a receiving module 501, used to receive a user request sent by the transmitted node; a query module 502, used to query whether there is a sharded file corresponding to the user request, and obtain a query result; a first generating module 503, used to generate a feedback result that cannot be fed back if the query result indicates that there is no sharded file corresponding to the user request; a detection module 504, used to detect the working state of the current P2P network if the query result indicates that there is a sharded file corresponding to the user request; a second generating module 505, used to generate a feedback result that can be fed back if the detection result indicates that the working state of the current P2P network is an idle state; a third generating module 506, used to generate a feedback result that cannot be fed back if the detection result indicates that the working state of the current P2P network is a transmission state.
[0096] In a preferred implementation manner of this embodiment, the device also includes: a receiving module, which is also used to receive transmission instructions for sliced files; a selection module, which is used to select a number of sliced files corresponding to the transmission instructions from the sliced file library; and a sending module, which is used to send the number of sliced files to the transported node.
[0097] In a preferred implementation manner of this embodiment, when the transmission node is a main transmission node; the device also includes: a third generation module, which is used for the main transmission node to split the read target file according to a preset length to generate a number of sliced files; a fourth generation module, which is used for the main transmission node to: for any current sliced file among the several sliced files: perform hash calculation on the current sliced file to generate a current hash value; obtain the previous hash value corresponding to the previous sliced file adjacent to the current sliced file; encrypt the traceability of the current sliced file, the current hash value, and the previous hash value together to generate an identifier corresponding to the current sliced file; a fifth generation module, which is used for the main transmission node to locally store a number of sliced files carrying identifiers to generate a sliced file library corresponding to the target file.
[0098] The above device can execute a multi-node secure transmission method provided by an embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the multi-node secure transmission method. For technical details not described in detail in this embodiment, please refer to a multi-node secure transmission method provided by an embodiment of the present invention.
[0099] The present invention also provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement a multi-node secure transmission method described in the present invention.
[0100] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.
[0101] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0102] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the method according to the following embodiments of the present application described in the above "Exemplary Method" section of this specification.
[0103] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0104] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.
[0105] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0106] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0107] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A multi-node secure transmission method, characterized in that: The method comprises at least one transmitting node and a transmitted node; the method is applied to the transmitted node; When any of the transmission nodes is searched based on the communication protocol, a P2P network connection is established with all of the transmission nodes; Based on the user request, a target transmission node is selected from all the transmission nodes; and a plurality of sliced files corresponding to the user request are obtained from the target transmission node; Perform integrity check on several decrypted sliced files; If the verification passes, the decrypted plurality of sliced files are reassembled to generate a target file corresponding to the user request.
2. The method according to claim 1, characterized in that When the at least one transmission node is used to indicate more than two transmission nodes, the more than two transmission nodes include a master transmission node and at least one slave transmission node; When any of the transmission nodes is searched based on the communication protocol, a P2P network connection is established with all the transmission nodes; including: When any of the transmission nodes is searched based on the communication protocol, a P2P network connection is established with the transmission node; Searching for remaining transmission nodes in the original topology structure where the transmission node is located based on the communication protocol; A P2P network connection is established with each of the remaining transmission nodes respectively.
3. The method according to claim 2, characterized in that Also includes: If the verification fails, tracing back to the main transmission node of the sliced file based on the decrypted sliced file; Acquire a plurality of sliced files corresponding to the user request from the main transmission node; and reorganize the plurality of sliced files based on the decrypted files to generate a target file corresponding to the user request.
4. The method according to claim 2, characterized in that: The selecting a target transmission node from all the transmission nodes based on the user request; and obtaining from the target transmission node a number of sliced files corresponding to the user request; including: Based on the user request, a transmission node which is closest to the transmitted node and can feedback the sliced file corresponding to the user request is selected from the original topology as the target transmission node; Sending a transmission instruction for the sliced file to the target transmission node; Receive a plurality of sliced files corresponding to the transmission instruction and sent by the transmission node.
5. The method according to claim 4, characterized in that The method of selecting, based on the user request, a transmission node which is closest to the transmitted node and can feed back the sliced file corresponding to the user request as the target transmission node from the original topology structure comprises: Sending the user request to all transmission nodes in the original topology structure through the P2P network; Receiving feedback results sent by each transmission node through the P2P network to obtain transmission time; Sorting all transmission nodes in the original topology structure according to the transmission time sequence to generate a sorting result; The transmission node whose transmission time is ranked first in the sorting result and whose feedback result indicates that it can feed back the sliced file corresponding to the user request is taken as the target transmission node.
6. A multi-node secure transmission method, characterized in that: The method is applied to a transmission node; comprising: Receiving a user request sent by the transmitting node; Query whether there is a sharded file corresponding to the user request, and obtain a query result; If the query result indicates that there is no sharded file corresponding to the user request, a feedback result that cannot be fed back is generated; If the query result indicates that there is a sharded file corresponding to the user request, detecting the working status of the current P2P network; If the detection result indicates that the working state of the current P2P network is an idle state, generating a feedback result that can be fed back; If the detection result indicates that the working state of the current P2P network is a transmission state, a feedback result that cannot be fed back is generated.
7. The method according to claim 6, characterized in that Also includes: Receiving a transfer instruction for a fragmented file; Selecting a plurality of sliced files corresponding to the transfer instruction from the sliced file library; The plurality of sliced files are sent to the transported node.
8. The method according to claim 6, characterized in that When the transmission node is a main transmission node; further comprising: The main transmission node divides the read target file according to a preset length to generate a plurality of slice files; The main transmission node performs hash calculation on any current sliced file among the plurality of sliced files to generate a current hash value; obtains a previous hash value corresponding to a previous sliced file adjacent to the current sliced file; encrypts the source of the current sliced file, the current hash value, and the previous hash value together to generate an identifier corresponding to the current sliced file; The main transmission node locally stores a plurality of sliced files carrying identifiers, and generates a sliced file library corresponding to the target file.
9. A multi-node secure transmission device, characterized in that: The device comprises at least one transmitting node and a transmitted node; the device is applied to the transmitted node; A network connection module; when any of the transmission nodes is searched based on the communication protocol, a P2P network connection is established with all the transmission nodes; An acquisition module, configured to select a target transmission node from all the transmission nodes based on a user request; and acquire a plurality of sliced files corresponding to the user request from the target transmission node; A verification module is used to perform integrity verification on several decrypted sliced files; The generation module is used to reorganize the decrypted plurality of shard files to generate a target file corresponding to the user request if the verification is passed.
10. A multi-node secure transmission device, characterized in that: The device is applied to a transmission node; comprising: A receiving module, used for receiving the user request sent by the transmitting node; A query module, used to query whether there is a sharded file corresponding to the user request, and obtain a query result; A first generating module, configured to generate a feedback result that cannot be fed back if the query result indicates that there is no sharded file corresponding to the user request; A detection module, configured to detect the working status of the current P2P network if the query result indicates that there is a sharded file corresponding to the user request; A second generating module is used to generate a feedback result that can be fed back if the detection result indicates that the working state of the current P2P network is an idle state; The third generating module is used to generate a feedback result that cannot be fed back if the detection result indicates that the working state of the current P2P network is a transmission state.