IPFS network processing method, related equipment and readable storage medium

By introducing a trusted distribution strategy into the IPFS network, based on the trusted status and connection association of the target IPFS node, the problem of low security of the IPFS network is solved, and the reliability and security between nodes are improved.

CN115865678BActive Publication Date: 2025-09-12CHINA MOBILE COMM LTD RES INST +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111098448.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-18
Publication Date
2025-09-12
Estimated Expiration
2041-09-18

AI Technical Summary

Technical Problem

In the IPFS network, since IPFS nodes are peer-to-peer, the security of network processing is low, and when some nodes are damaged, it may affect the data transmission security of other nodes.

Method used

The IPFS server provides a trusted distribution strategy, including the trusted status and connection association relationship of the target IPFS node, which is used to determine whether the IPFS node is allowed to establish a neighbor connection or data connection.

Benefits of technology

Through the trusted distribution strategy, the reliability and security of the IPFS network are improved, ensuring the credibility of connections between nodes and the reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115865678B_ABST
    Figure CN115865678B_ABST
Patent Text Reader

Abstract

The present application provides an IPFS network processing method, related equipment and readable storage medium. The IPFS network processing method can be applied to a first IPFS device, which is installed with a first IPFS node and a first IPFS program. The method includes: receiving a first trusted distribution policy of the first IPFS node sent by an IPFS server, the first trusted distribution policy including an association relationship between the trusted state of the first target IPFS node and a target connection, the target connection including at least one of a neighbor connection and a data connection; and determining whether to allow the first IPFS node to establish the target connection with the second target IPFS node based on the first trusted distribution policy. The present application can improve the reliability of IPFS network processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to an IPFS network processing method, related equipment, and readable storage medium. Background Art

[0002] The InterPlanetary File System (IPFS) is a distributed network file system that uses content-based location and a peer-to-peer transfer strategy for file transmission. In the IPFS network, files are divided into blocks and corresponding hash values ​​are generated as fingerprint information to identify the files / blocks. Files or blocks are distributed and stored across the IPFS network. File / block fingerprint information is used to address, locate, and download the corresponding files or blocks within the IPFS network.

[0003] Currently, IPFS nodes are peer-to-peer; for example, one IPFS node can request and exchange data with any other IPFS node in the network. However, if certain IPFS nodes in the IPFS network are compromised, the file blocks stored there may also be affected. If other IPFS nodes request or exchange data with that IPFS node, they are likely to retrieve the compromised files or folders. This suggests that the current IPFS network lacks security. Summary of the Invention

[0004] The embodiments of the present application provide an IPFS network processing method, related equipment, and readable storage medium to solve the problem of low security of IPFS network processing caused by the equality of IPFS nodes in the IPFS network.

[0005] To solve the above problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides an IPFS network processing method, which is applied to a first IPFS device, wherein the first IPFS device is installed with a first IPFS node and a first IPFS program. The method includes:

[0007] Receiving a first trusted distribution policy of the first IPFS node sent by the IPFS server, the first trusted distribution policy including an association relationship between a trusted state of the first target IPFS node and a target connection, the target connection including at least one of a neighbor connection and a data connection;

[0008] According to the first trusted distribution strategy, determine whether to allow the first IPFS node to establish the target connection with the second target IPFS node.

[0009] In a second aspect, an embodiment of the present application provides an IPFS network processing method, which is applied to an IPFS server, including:

[0010] Sending a first trusted distribution policy to a first IPFS node installed on a first IPFS device;

[0011] Among them, the first trusted distribution strategy includes an association relationship between the trusted state of the first target IPFS node and the target connection, and the target connection includes at least one of a neighbor connection and a data connection.

[0012] In a third aspect, an embodiment of the present application further provides an IPFS network processing device, which is applied to a first IPFS device, wherein the first IPFS device is installed with a first IPFS node and a first IPFS program, and the IPFS network processing device includes:

[0013] A first transceiver is configured to receive a first trusted distribution policy of the first IPFS node sent by the IPFS server, wherein the first trusted distribution policy includes an association relationship between a trusted state of the first target IPFS node and a target connection, wherein the target connection includes at least one of a neighbor connection and a data connection;

[0014] The first processor is used to determine whether to allow the first IPFS node to establish the target connection with the second target IPFS node according to the first trusted distribution policy.

[0015] In a fourth aspect, an embodiment of the present application further provides an IPFS network processing device, which is applied to an IPFS server, including:

[0016] A second transceiver, configured to send a first trusted distribution policy to a first IPFS node installed on a first IPFS device;

[0017] Among them, the first trusted distribution strategy includes the association relationship between the trusted state of the first target IPFS node and the target connection, and the target connection includes at least one of a neighbor connection and a data connection.

[0018] In the fifth aspect, an embodiment of the present application also provides a communication device, comprising: a transceiver, a memory, a processor, and a program stored in the memory and runnable on the processor; the processor is used to read the program in the memory to implement the steps in the method described in the first aspect above; or, the steps in the method described in the second aspect above.

[0019] In a sixth aspect, an embodiment of the present application further provides a readable storage medium for storing a program, which, when executed by a processor, implements the steps of the method described in the first aspect, or implements the steps of the method described in the second aspect.

[0020] In an embodiment of the present application, an IPFS server can provide an IPFS node with a trusted distribution strategy. The first trusted distribution strategy includes an association between the trusted status of a first target IPFS node and a target connection, where the target connection includes at least one of a neighbor connection and a data connection. In this way, the IPFS node can determine whether to establish a target connection with another IPFS node based on the received trusted distribution strategy, thereby improving the reliability of IPFS network processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0022] Figure 1 This is one of the structural diagrams of the IPFS network that can be applied in the embodiments of the present application;

[0023] Figure 2 This is one of the flow charts of the IPFS network processing method provided in the embodiment of the present application;

[0024] Figure 3 This is the second flow chart of the IPFS network processing method provided in the embodiment of the present application;

[0025] Figure 4 This is the second structural diagram of the IPFS network provided in the embodiment of the present application;

[0026] Figure 5 This is a schematic diagram of the structure of the IPFS node provided in the embodiment of the present application;

[0027] Figure 6 This is a schematic diagram of the process of an IPFS node joining the IPFS network provided by an embodiment of the present application;

[0028] Figure 7 This is a schematic diagram of the process of establishing neighbor connections between IPFS nodes provided in an embodiment of the present application;

[0029] Figure 8 This is a schematic diagram of the process of data transmission between IPFS nodes provided in an embodiment of the present application;

[0030] Figure 9 This is a schematic diagram of the process of updating neighbor connections between IPFS nodes provided in an embodiment of the present application;

[0031] Figure 10This is one of the structural diagrams of the IPFS network processing device provided by the present application;

[0032] Figure 11 This is the second structural diagram of the IPFS network processing device provided by the present application;

[0033] Figure 12 It is a structural diagram of the communication equipment provided by the implementation of this application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0035] The terms "first", "second" etc. in the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. In addition, the terms "comprise" and "have" and any deformation thereof are intended to cover non-exclusive inclusions, such as, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or that are intrinsic to these processes, methods, products or equipment. In addition, "and / or" is used in the present application to represent at least one of connected objects, such as A and / or B and / or C, and represents comprising independent A, independent B, independent C, and A and B all exist, B and C all exist, A and C all exist, and 7 situations that A, B and C all exist.

[0036] See Figure 1 , Figure 1 This is one of the structural diagrams of the IPFS network that can be applied in the embodiment of the present application, such as Figure 1 As shown, it includes an IPFS device 11 and an IPFS server 12. The IPFS device 11 and the IPFS server 12 can communicate with each other, and the IPFS devices 11 can communicate with each other.

[0037] In an embodiment of the present application, the IPFS device can install IPFS nodes and IPFS programs.

[0038] The IPFS device can send its own status information at different times to the IPFS server. The status information of the IPFS device at a certain moment may at least include: the identification information of the IPFS device at that moment (such as the identity identification number (ID)), the identification information of the IPFS node installed by the IPFS device at that moment (such as the node ID), and the trust value (such as the hash value) of the IPFS program installed by the IPFS device. The trust value of the IPFS program can be used to indicate whether the IPFS program is trustworthy. Optionally, the status information of the IPFS device at a certain moment may also include at least one of the following: the trust status of the operating system of the IPFS device at that moment, used to indicate whether the operating system of the IPFS device is trustworthy at that moment; the trust status of the key process of the IPFS device at that moment, used to indicate whether the key process of the IPFS device is trustworthy at that moment. It should be noted that the status information of the IPFS device may change over time. Therefore, it is understandable that the status information of the IPFS device at different times may be the same or different.

[0039] The IPFS server can receive its own status information sent by each IPFS device. For each IPFS node, the IPFS server can determine the trusted status of the IPFS node based on the status information of the IPFS device to which the IPFS node belongs when the IPFS node joins the IPFS network (hereinafter referred to as the reference status information of the IPFS device), and the status information of the IPFS device to which the IPFS node belongs at any time after the IPFS node joins the IPFS network. It should be noted that when the status information of the IPFS device to which the IPFS node belongs changes, the trusted status of the IPFS node may change. The trusted status of an IPFS node can be expressed as: trusted, untrusted or unknown, which is determined according to the actual situation.

[0040] The IPFS server can also send the trusted distribution policy of the IPFS node installed by it to the IPFS device, so that the IPFS device can determine whether the IPFS node installed by it can establish a target connection with the IPFS node installed by other IPFS devices, and the target connection includes at least one of a neighbor connection and a data connection. It should be noted that the embodiment of the present application does not limit the timing of the IPFS server sending the trusted distribution policy to the IPFS device. For example, the IPFS server can send the trusted distribution policy to the IPFS device when the IPFS node of the IPFS device joins the IPFS network; or, the IPFS server can send the trusted distribution policy to the IPFS device when it first determines that the trusted status of the IPFS node of the IPFS device is trusted. The specific details can be determined according to actual conditions, and the embodiment of the present application does not limit this.

[0041] The trusted distribution strategy of the IPFS node may include the association relationship between the trusted state of the first target IPFS node and the target connection. The first target IPFS node may include some or all IPFS nodes in the IPFS network, that is, the first target IPFS node includes at least one IPFS node. It should be noted that the first target IPFS nodes in the trusted distribution strategies of different IPFS nodes may be the same or different, and the specific details may be determined according to the actual situation. The embodiment of the present application does not limit this. For example, the trusted distribution strategy of IPFS node 1 includes: the association relationship between IPFS node 2 to IPFS node 10 and the target connection; the trusted distribution strategy of IPFS node 2 includes: the association relationship between IPFS node 10 to IPFS node 30 and the target connection.

[0042] For any IPFS node among the first target IPFS nodes, the association relationship between it and its neighbor connection can be any of the following:

[0043] If the trust status of the IPFS node is trusted, the establishment of a neighbor connection with the IPFS node is allowed. If the trust status of the IPFS node is untrusted or unknown, the establishment of a neighbor connection with the IPFS node is not allowed (i.e., prohibited or rejected);

[0044] When the trust status of the IPFS node is trusted and unknown, a neighbor connection with the IPFS node is allowed. When the trust status of the IPFS node is untrusted, a neighbor connection with the IPFS node is not allowed.

[0045] When the trust status of the IPFS node is untrusted, trusted, or unknown, it is allowed to establish a neighbor connection with the IPFS node.

[0046] For any IPFS node among the first target IPFS nodes, its association relationship with the data connection can be any of the following:

[0047] If the trust status of the IPFS node is trusted, a data connection with the IPFS node is allowed. If the trust status of the IPFS node is untrusted or unknown, a data connection with the IPFS node is not allowed (i.e., prohibited or rejected).

[0048] If the trust status of the IPFS node is trusted and unknown, a data connection with the IPFS node is allowed; if the trust status of the IPFS node is untrusted, a data connection with the IPFS node is not allowed.

[0049] When the trust status of the IPFS node is untrusted, trusted, or unknown, a data connection with the IPFS node is allowed.

[0050] It should be noted that the association relationship between any one of the first target IPFS nodes and the target connection can be determined by the IPFS server according to actual conditions, and this application does not limit this. In addition, the IPFS server can update the trusted distribution policy of the IPFS node.

[0051] In the case where the number of IPFS nodes that the first target IPFS node can include is greater than 1. For different IPFS nodes, their association relationship with the target connection may be the same or different, which can be determined according to actual conditions, and the embodiment of the present application does not limit this. For example: for IPFS node 2, its association relationship with the neighbor connection may be: when the trusted status of the IPFS node is trusted, it is allowed to establish a data connection with the IPFS node; when the trusted status of the IPFS node is untrusted or unknown, it is not allowed to establish a data connection with the IPFS node; and for IPFS node 3, its association relationship with the neighbor connection may be: when the trusted status of the IPFS node is trusted and unknown, it is allowed to establish a neighbor connection with the IPFS node; when the trusted status of the IPFS node is untrusted, it is not allowed to establish a neighbor connection with the IPFS node.

[0052] In an embodiment of the present application, the IPFS network may include two types of IPFS devices, namely a first type IPFS device and a second type IPFS device.

[0053] For the first type of IPFS device, it can determine whether to allow the first IPFS node to establish the target connection with the IPFS nodes installed by other IPFS devices based on the trusted distribution policy of the IPFS node installed by it. The first type of IPFS device can also be called an enhanced IPFS device.

[0054] The second type of IPFS device will not determine whether to allow the first IPFS node to establish the target connection with the IPFS nodes installed by other IPFS devices based on the trusted distribution policy of the IPFS node it installs. It may not even send its own status information to the IPFS server, or it may not obtain the trusted distribution policy. The second type of IPFS device can also be called a common IPFS device.

[0055] It should be noted that for the first type of IPFS device, it can determine based on its own needs: whether to allow the first IPFS node to establish the target connection with the IPFS nodes installed by other IPFS devices based on the trusted distribution policy of the IPFS node installed on it. In this case, determining whether to establish the target connection based on the trusted distribution policy can be regarded as a function of the IPFS device that can be turned on or off, hereinafter referred to as the target function. For the first type of IPFS device, whether to turn on the target function can be determined based on its own needs.

[0056] The following describes the IPFS processing method provided in the embodiments of the present application.

[0057] See also Figure 2 , Figure 2 This is one of the flow charts of the IPFS network processing method provided in the embodiment of the present application. Figure 2 The IPFS network processing method shown can be applied to a first IPFS device, which has a first IPFS node and a first IPFS program installed. The first IPFS device belongs to the aforementioned first type IPFS device, and the first type IPFS device enables the target function.

[0058] like Figure 2 As shown, the IPFS network processing method may include the following steps:

[0059] Step 201: Receive a first trusted distribution strategy of the first IPFS node sent by the IPFS server, where the first trusted distribution strategy includes an association between a trusted state of the first target IPFS node and a target connection, where the target connection includes at least one of a neighbor connection and a data connection.

[0060] In specific implementation, the IPFS server may actively send the first trusted distribution strategy to the first IPFS device, or may send the first trusted distribution strategy to the first IPFS device based on the request of the first IPFS device. The specific decision may be made based on actual conditions, and the embodiment of the present application does not limit this.

[0061] It should be noted that for understanding the first trusted distribution strategy, please refer to the aforementioned description of the trusted distribution strategy of IPFS nodes, which will not be repeated here.

[0062] Step 202: Determine whether to allow the first IPFS node to establish the target connection with the second target IPFS node based on the first trusted distribution policy.

[0063] The second target IPFS node may include at least one IPFS node other than the first IPFS node. The second target IPFS node may include at least one node among the first target IPFS nodes, or the second target IPFS node may be different from the first target IPFS node.

[0064] For ease of understanding, the following explanation is given by taking the example that the second target IPFS node only includes one IPFS node, but it can be understood that when the number of IPFS nodes included in the second target IPFS node is greater than 1, the following method can be applied to any IPFS node of the second target IPFS node.

[0065] In specific implementation, the first IPFS device may first detect whether the first target IPFS node in the first trusted distribution strategy includes the second target IPFS node.

[0066] In the case where the first target IPFS node in the first trusted distribution strategy includes the second target IPFS node, the first IPFS device can obtain the latest trusted status of the second target IPFS node stored therein from the IPFS server to determine whether to allow the first IPFS node to establish the target connection with the second target IPFS node based on the first trusted distribution strategy and the latest trusted status of the second target IPFS node. It should be noted that the determination result of whether the first IPFS node is allowed to establish the target connection with the second target IPFS node is consistent with the association relationship between the trusted status of the second target IPFS node and the target connection in the first trusted distribution strategy.

[0067] For example, assuming that in the first trusted distribution strategy, the association between the trusted status of the second target IPFS node and the target connection is specifically expressed as follows: when the trusted status of the second target IPFS node is trusted, a neighbor connection with the second target IPFS node is allowed; when the trusted status of the second target IPFS node is untrusted or unknown, a neighbor connection with the second target IPFS node is not allowed. Then, if the trusted status of the second target IPFS node obtained by the first IPFS device is trusted, the first IPFS device may allow the first IPFS node to establish a neighbor connection with the second target IPFS node; or, if the trusted status of the second target IPFS node obtained by the first IPFS device is untrusted, the first IPFS device may not allow the first IPFS node to establish a neighbor connection with the second target IPFS node.

[0068] In the case that the first target IPFS node in the first trusted distribution strategy does not include the second target IPFS node, the first IPFS device may allow or not allow the first IPFS node to establish the target connection with the second target IPFS node. The specific setting can be based on actual needs, and the embodiment of the present application does not limit this.

[0069] In the IPFS network processing method of an embodiment of the present application, an IPFS server can provide a trusted distribution strategy for an IPFS node. The first trusted distribution strategy includes an association between the trusted status of a first target IPFS node and a target connection, wherein the target connection includes at least one of a neighbor connection and a data connection. In this way, the IPFS node can determine whether to establish a target connection with another IPFS node based on the received trusted distribution strategy, thereby improving the reliability of IPFS network processing.

[0070] In an embodiment of the present application, optionally, the first trusted distribution strategy of the first IPFS node received from the IPFS server includes:

[0071] After the first IPFS device joins the IPFS network, first status information is sent to the IPFS server, where the first status information is status information of the first IPFS device at the first moment;

[0072] Receiving a first trusted distribution policy of the first IPFS node sent by the IPFS server when the first trusted state of the first IPFS node is trusted;

[0073] Among them, the first trusted state is determined based on the first state information and the second state information, the second state information is the state information of the first IPFS device at the second moment, the second moment is the moment when the first IPFS device joins the IPFS network, and the first moment is after the second moment; the state information of the first IPFS device includes the identification information of the first IPFS node, the identification information of the first IPFS device and the trusted value of the first IPFS program.

[0074] In this optional implementation, the second moment is the moment when the first IPFS device joins the IPFS network, and the first moment can be any moment after the second moment. Therefore, the second status information can be understood as: the reference status information of the first IPFS device, and the first status information can be understood as: the updated status information of the first IPFS device.

[0075] The IPFS server may determine the trusted status of the first IPFS node based on the reference status information of the first IPFS device and the updated status information of the first IPFS device.

[0076] In a specific implementation, if the reference status information of the first IPFS device is the same as the updated status information of the first IPFS device, the trusted status of the first IPFS node can be determined to be trusted.

[0077] If the updated state information of the first IPFS device changes relative to the reference state information of the first IPFS device, the trusted state of the first IPFS node may be determined to be trusted or untrusted, depending on which of the changed state information is used.

[0078] In a case where the changed status information includes identification information of the first IPFS device or identification information of the first IPFS node, the trusted status of the first IPFS node may be determined to be untrustworthy.

[0079] When the changed state information is the trust value of the first IPFS program, since the IPFS server can store at least one trust reference value, the trust status of the first IPFS node may be determined to be trustworthy or untrustworthy. Specifically, if the at least one trust reference value includes the updated trust value of the first IPFS program, then the trust status of the first IPFS node can be determined to be trustworthy; otherwise, the trust status of the first IPFS node can be determined to be untrustworthy.

[0080] In addition, as can be seen from the above content, the status information of the IPFS device can also include at least one of the following: the trusted status of the operating system of the IPFS device; the trusted status of the key processes of the IPFS device. In this case, if the trusted status of the operating system of the first IPFS device is updated to untrusted, or the trusted status of the key processes of the first IPFS device is updated to untrusted, the trusted status of the first IPFS node can be determined to be untrusted.

[0081] In this optional embodiment, the IPFS server may send the first trusted distribution policy to the first IPFS device only when the trusted status of the first IPFS node is trusted. In this way, the first IPFS device can determine whether to allow the first IPFS node to establish the target connection with the second target IPFS node based on the first trusted distribution policy only when the first IPFS node is trusted, thereby further improving the security of IPFS network processing.

[0082] The specific implementation of step 202 is described below.

[0083] In an embodiment of the present application, IPFS node A obtains the trusted status of IPFS node B from the IPFS server, which may include: IPFS node A sends a first request to the IPFS server, where the first request is used to request to obtain the trusted status of IPFS node B; the IPFS server responds to the first request and sends the latest trusted status of IPFS node B stored by it to IPFS node A.

[0084] IPFS node A updates the trusted status of IPFS node A, which may include: IPFS node A sends the updated status information of the IPFS device to which IPFS node A belongs to the IPFS server, and the IPFS server may determine the updated trusted status of IPFS node A based on the received updated status information and the reference status information of the IPFS device to which IPFS node A belongs, and then send the updated trusted status to IPFS node A.

[0085] Case 1: The target connection includes a neighbor connection; the second target IPFS node includes a second IPFS node installed on a second IPFS device, and the first target IPFS node includes the second IPFS node.

[0086] Optionally, determining whether to allow the first IPFS node to establish the target connection with the second target IPFS node according to the first trusted distribution policy includes:

[0087] Obtain a second trusted state of the second IPFS node from the IPFS server;

[0088] Determine whether to send a neighbor connection establishment request to the second IPFS node based on the second trusted state and the first trusted distribution strategy;

[0089] In the case of determining to send a neighbor connection establishment request to the second IPFS node, a first neighbor connection establishment request is sent to the second IPFS node.

[0090] In this optional embodiment, the first IPFS node is an initiating IPFS node that desires to establish a neighbor connection with the second IPFS node. The IPFS device to which the second IPFS node belongs may be the aforementioned first-type IPFS device, and the target function of the IPFS device to which the second IPFS node belongs may be enabled or disabled; alternatively, the IPFS device to which the second IPFS node belongs may be the aforementioned second-type IPFS device.

[0091] The first IPFS device belongs to the aforementioned first type IPFS device, and the first type IPFS device enables the target function. Therefore, to improve the security of IPFS network processing, the first IPFS device can first obtain the trusted status of the second IPFS node from the IPFS server, that is, the second trusted status.

[0092] Afterwards, in one implementation, the first IPFS device can directly determine whether to send a neighbor connection establishment request to the second IPFS node based on the second trusted state and the first trusted distribution policy. In another implementation, the first IPFS device can first update the trusted state of the first IPFS node, and only when the updated trusted state of the first IPFS node is trusted, determine whether to send a neighbor connection establishment request to the second IPFS node based on the second trusted state and the first trusted distribution policy. In this way, the security of IPFS network processing can be further improved.

[0093] It should be noted that the determination result of whether to send a neighbor connection establishment request to the second IPFS node is consistent with the association relationship between the trusted status of the second IPFS node and the neighbor connection in the first trusted distribution strategy.

[0094] In the case of determining to send a neighbor connection establishment request to the second IPFS node, a first neighbor connection establishment request is sent to the second IPFS node to request to establish a neighbor connection with the second IPFS node.

[0095] In specific implementation, the second IPFS node can accept the first neighbor connection establishment request and establish a neighbor connection with the first IPFS node, or it can reject the first neighbor connection establishment request and not establish a neighbor connection with the first IPFS node. The specific details can be determined according to actual conditions, and the embodiments of the present application do not limit this.

[0096] When the IPFS device to which the second IPFS node belongs can be the aforementioned first type IPFS device and the target function of the IPFS device to which the second IPFS node belongs is turned on, the second IPFS node can obtain the trusted status of the first IPFS node from the IPFS server after receiving the first neighbor connection establishment request, and determine whether to accept the first neighbor connection establishment request and establish a neighbor connection with the first IPFS node based on the trusted status of the first IPFS node and the trusted distribution policy of the second IPFS node.

[0097] When the IPFS device to which the second IPFS node belongs can be the aforementioned first type IPFS device, and the target function of the IPFS device to which the second IPFS node belongs is turned off, or when the IPFS device to which the second IPFS node belongs can be the aforementioned second type IPFS device, the second IPFS node can pre-set whether to accept the first neighbor connection establishment request and establish a neighbor connection with the first IPFS node after receiving the first neighbor connection establishment request. The specific setting can be based on actual conditions, and the embodiment of the present application does not limit this.

[0098] If it is determined that a neighbor connection establishment request is not sent to the second IPFS node, the process can be terminated.

[0099] In case one, the first IPFS device can determine whether to send a neighbor connection establishment request to the second IPFS node based on the second trusted state and the first trusted distribution strategy, thereby improving the security of IPFS network processing.

[0100] Case 2: The target connection includes a neighbor connection; the second target IPFS node includes a third IPFS node installed by a third IPFS device, and the first target IPFS node includes the third IPFS node.

[0101] Optionally, determining whether to allow the first IPFS node to establish the target connection with the second target IPFS node according to the first trusted distribution policy includes:

[0102] Receive a second neighbor connection establishment request sent by the third IPFS node;

[0103] Obtain a third trusted state of the third IPFS node from the IPFS server;

[0104] According to the third trusted state and the first trusted distribution strategy, determine whether to establish a neighbor connection with the third IPFS node.

[0105] In this optional embodiment, the first IPFS node is a decision-making IPFS node that determines whether to establish a neighbor connection with the third IPFS node. The IPFS device to which the third IPFS node belongs may be the aforementioned first-type IPFS device, and the target function of the IPFS device to which the third IPFS node belongs may be enabled or disabled; alternatively, the IPFS device to which the third IPFS node belongs may be the aforementioned second-type IPFS device.

[0106] When the IPFS device to which the third IPFS node belongs is the aforementioned first type IPFS device and the target function of the IPFS device to which the third IPFS node belongs is turned on, the third IPFS device can first obtain the trusted status of the first IPFS node from the IPFS server, and determine whether to send the second neighbor connection establishment request to the first IPFS node based on the trusted status of the first IPFS node and the trusted distribution policy of the third IPFS node.

[0107] When the IPFS device to which the third IPFS node belongs is the aforementioned first type IPFS device and the target function of the IPFS device to which the third IPFS node belongs is closed, or when the IPFS device to which the third IPFS node belongs may be the aforementioned second type IPFS device, the third IPFS node may directly send the second neighbor connection establishment request to the first IPFS node when it is desired to establish a neighbor connection with the first IPFS node.

[0108] The first IPFS device belongs to the aforementioned first type IPFS device, and the first type IPFS device has the target function enabled. Therefore, to improve the security of IPFS network processing, after receiving the second neighbor connection establishment request, the first IPFS device can first obtain the trusted status of the third IPFS node from the IPFS server, that is, the third trusted status.

[0109] Afterwards, in one implementation, the first IPFS device can directly determine whether to establish a neighbor connection with the third IPFS node based on the third trusted state and the first trusted distribution strategy. In another implementation, the first IPFS device can first update the trusted state of the first IPFS node, and only when the updated trusted state of the first IPFS node is trusted, determine whether to establish a neighbor connection with the third IPFS node based on the third trusted state and the first trusted distribution strategy, thereby further improving the security of IPFS network processing.

[0110] It should be noted that the determination result of whether a neighbor connection is established with the third IPFS node is consistent with the association relationship between the trusted status of the third IPFS node and the neighbor connection in the first trusted distribution strategy.

[0111] In case two, the first IPFS device can determine whether to establish a neighbor connection with the third IPFS node based on the third trusted state and the first trusted distribution strategy, thereby improving the security of IPFS network processing.

[0112] Case three: the target connection includes a data connection; the second target IPFS node includes a fourth IPFS node installed by a fourth IPFS device, and the first target IPFS node includes the fourth IPFS node.

[0113] Optionally, determining whether to allow the first IPFS node to establish the target connection with the second target IPFS node according to the first trusted distribution policy includes:

[0114] When the first IPFS node establishes a neighbor connection with the fourth IPFS node, sending a first data connection request to the fourth IPFS node, where the first data connection request is used to request first data;

[0115] Receive the first data sent by the fourth IPFS node to the first IPFS node when a data connection with the first IPFS node is allowed.

[0116] In this optional embodiment, the first IPFS node establishes a neighbor connection with the fourth IPFS node, the first IPFS node expects to establish a data connection with the fourth IPFS node, and requests the fourth IPFS node to obtain the first data. The IPFS device to which the fourth IPFS node belongs may be the aforementioned first-type IPFS device, and the target function of the IPFS device to which the fourth IPFS node belongs may be enabled or disabled; alternatively, the IPFS device to which the fourth IPFS node belongs may be the aforementioned second-type IPFS device.

[0117] The first IPFS device belongs to the aforementioned first type IPFS device, and the first type IPFS device enables the target function. Therefore, to improve the security of IPFS network processing, the first IPFS device can first obtain the trusted status of the fourth IPFS node from the IPFS server, that is, the fourth trusted status.

[0118] Afterwards, in one implementation, the first IPFS device can directly determine whether to allow the data connection request to be sent to the fourth IPFS node based on the fourth trusted state and the first trusted distribution policy. In another implementation, the first IPFS device can first update the trusted state of the first IPFS node, and only when the updated trusted state of the first IPFS node is trusted, determine whether to allow the data connection request to be sent to the fourth IPFS node based on the fourth trusted state and the first trusted distribution policy, thereby further improving the security of IPFS network processing.

[0119] It should be noted that the determination result of whether to allow the data connection request to be sent to the fourth IPFS node is consistent with the association relationship between the trusted status of the fourth IPFS node and the data connection in the first trusted distribution strategy.

[0120] When it is determined that sending the data connection request to the fourth IPFS node is allowed, a first data connection request is sent to the fourth IPFS node.

[0121] After receiving the first data connection request, the fourth IPFS device can detect whether the fourth IPFS device stores the first data.

[0122] If not stored, the fourth IPFS device can forward the first data connection request to other IPFS nodes that have established neighbor connections with the fourth IPFS node to help the first IPFS device obtain the first data, so as to increase the probability of the first IPFS device obtaining the first data.

[0123] If stored, the fourth IPFS device can choose to send or not send the first data to the first IPFS node.

[0124] When the IPFS device to which the fourth IPFS node belongs can be the aforementioned first type IPFS device and the target function of the IPFS device to which the fourth IPFS node belongs is turned on, the fourth IPFS node can obtain the trusted status of the first IPFS node from the IPFS server after receiving the first data connection establishment request, and determine whether to send the first data to the first IPFS node based on the trusted status of the first IPFS node and the trusted distribution policy of the fourth IPFS node.

[0125] When the IPFS device to which the fourth IPFS node belongs can be the aforementioned first type IPFS device, and the target function of the IPFS device to which the fourth IPFS node belongs is closed, or when the IPFS device to which the fourth IPFS node belongs can be the aforementioned second type IPFS device, the fourth IPFS node can pre-set whether to send the first data to the first IPFS node after receiving the first data connection establishment request. The specific setting can be based on actual conditions, and the embodiment of the present application does not limit this.

[0126] If it is determined that sending a data connection request to the fourth IPFS node is not allowed, the process can be terminated.

[0127] In case three, the first IPFS device can determine whether to allow sending a data connection request to the fourth IPFS node based on the fourth trusted state and the first trusted distribution strategy, thereby improving the security of IPFS network processing.

[0128] Case 4: The target connection includes a data connection; the second target IPFS node includes the fifth IPFS node installed by the fifth IPFS device, and the first target IPFS node includes the fifth IPFS node.

[0129] Optionally, determining whether to allow the first IPFS node to establish the target connection with the second target IPFS node according to the first trusted distribution policy includes:

[0130] When the first IPFS node establishes a neighbor connection with the fifth IPFS node, receiving a second data connection request sent by the fifth IPFS node, where the second data connection request is used to request second data;

[0131] When the first IPFS device stores the second data, obtaining a fourth information state of the fifth IPFS node from the IPFS server;

[0132] Determine whether to send the second data to the first IPFS node based on the fourth trusted state and the first trusted distribution strategy.

[0133] In this optional embodiment, the first IPFS node establishes a neighbor connection with the fifth IPFS node, and the first IPFS node is the decision-making IPFS node that determines whether to establish a data connection with the fifth IPFS node. The IPFS device to which the fifth IPFS node belongs may be the aforementioned first-type IPFS device, and the target function of the IPFS device to which the fifth IPFS node belongs may be enabled or disabled; alternatively, the IPFS device to which the fifth IPFS node belongs may be the aforementioned second-type IPFS device.

[0134] When the IPFS device to which the fifth IPFS node belongs is the aforementioned first type IPFS device and the target function of the IPFS device to which the fifth IPFS node belongs is turned on, the fifth IPFS device can first obtain the trusted status of the first IPFS node from the IPFS server, and determine whether to send the second data connection establishment request to the first IPFS node based on the trusted status of the first IPFS node and the trusted distribution policy of the fifth IPFS node.

[0135] When the IPFS device to which the fifth IPFS node belongs can be the aforementioned first type IPFS device, and the target function of the IPFS device to which the fifth IPFS node belongs is closed, or when the IPFS device to which the fifth IPFS node belongs can be the aforementioned second type IPFS device, the fifth IPFS node can directly send the second data connection establishment request to the first IPFS node when it is expected to establish a data connection with the first IPFS node.

[0136] The first IPFS device belongs to the aforementioned first type IPFS device, and the first type IPFS device has the target function enabled. When it is determined that the first IPFS device stores the second data, in order to improve the security of IPFS network processing, the first IPFS device may first obtain the trusted status of the fifth IPFS node, i.e., the fifth trusted status, from the IPFS server after receiving the second data connection establishment request.

[0137] Afterwards, in one implementation, the first IPFS device can directly determine whether to send the second data to the first IPFS node based on the fifth trusted state and the first trusted distribution strategy. In another implementation, the first IPFS device can first update the trusted state of the first IPFS node, and only when the updated trusted state of the first IPFS node is trusted, determine whether to send the second data to the first IPFS node based on the fifth trusted state and the first trusted distribution strategy, thereby further improving the security of IPFS network processing.

[0138] It should be noted that whether the second data is sent to the first IPFS node is consistent with the association between the trusted status of the fifth IPFS node and the data connection in the first trusted distribution strategy.

[0139] Optionally, after receiving the second data connection request sent by the fifth IPFS node, the method further includes:

[0140] In the case that the first IPFS device does not store the second data, the second data connection request is sent to the sixth IPFS node installed on the sixth IPFS device, and the sixth IPFS node establishes a neighbor connection with the first IPFS node.

[0141] In this way, the probability of the fifth IPFS device obtaining the second data can be increased.

[0142] In case four, the first IPFS device can determine whether to send the second data to the first IPFS node based on the fifth trusted state and the first trusted distribution strategy, thereby improving the security of IPFS network processing.

[0143] In an embodiment of the present application, optionally, the method further includes:

[0144] When the first IPFS node establishes a neighbor connection with the seventh IPFS node installed by the seventh IPFS device, sending third state information of the first IPFS device at a third moment to the IPFS server, where the third moment is after the first moment;

[0145] Receiving a fifth trusted state of the first IPFS node sent by the IPFS server, where the fifth trusted state is determined based on the second state information and the third state information;

[0146] When the fifth trusted state is untrustworthy, disconnect the neighbor connection between the first IPFS node and the seventh IPFS node.

[0147] The first IPFS device can update the trusted status of the first IPFS node. If the trusted status of the first IPFS node changes to untrusted, the first IPFS node can actively disconnect from neighboring nodes of other IPFS nodes, thereby improving the security of IPFS network processing.

[0148] See also Figure 3 , Figure 3 This is the second flow chart of the IPFS network processing method provided in the embodiment of the present application. The IPFS network processing method of the embodiment of the present application can be applied to the IPFS server.

[0149] like Figure 3 As shown, the IPFS network processing method may include the following steps:

[0150] Step 301: Send a first trusted distribution strategy to a first IPFS node installed on a first IPFS device; wherein the first trusted distribution strategy includes an association between a trusted state of a first target IPFS node and a target connection, and the target connection includes at least one of a neighbor connection and a data connection.

[0151] Optionally, sending the first trusted distribution policy to the first IPFS node installed on the first IPFS device includes:

[0152] Receive first status information sent by the first IPFS node, where the first status information is status information of the first IPFS device at a first moment;

[0153] Determine a first trusted state of the first IPFS node based on the first state information and the second state information, where the second state information is state information of the first IPFS device at a second moment, where the second moment is the moment when the first IPFS device joins the IPFS network, and the first moment is after the second moment; the state information of the first IPFS device includes identification information of the first IPFS node, identification information of the first IPFS device, and a trusted value of the first IPFS program;

[0154] When the first trusted state is trusted, a first trusted distribution strategy is sent to the first IPFS node.

[0155] Optionally, determining the first trusted state of the first IPFS node according to the first state information and the second state information includes:

[0156] When a first condition is met, determining that the first trusted state of the first IPFS node is trusted, the first condition includes:

[0157] The identification information of the first IPFS node at the first moment is the same as the identification information of the first IPFS node at the second moment;

[0158] The identification information of the first IPFS device at the first moment is the same as the identification information of the first IPFS device at the second moment;

[0159] The trusted reference value of the IPFS program stored in the IPFS server includes the trusted value of the first IPFS program at the first moment.

[0160] It can be understood that, when the first condition is not met, the first trusted state of the first IPFS node can be determined to be untrustworthy.

[0161] It should be noted that this embodiment is Figure 2 The implementation method of the IPFS server corresponding to the method embodiment can be found in Figure 2 The relevant descriptions in the method embodiment can achieve the same beneficial effects. In order to avoid repeated descriptions, they will not be repeated here.

[0162] The various optional implementation methods introduced in the embodiments of the present application can be implemented in combination with each other or separately if they do not conflict with each other, and the embodiments of the present application do not limit this.

[0163] For easier understanding, the following examples are provided:

[0164] An embodiment of the present application proposes a method for monitoring the status of IPFS network nodes, controlling file transfer between nodes based on the security policy of file distribution and the trusted status of the nodes, and avoiding extracting potentially damaged file blocks from damaged nodes.

[0165] 5. Detailed description of the technical solution of the embodiment of the present application

[0166] The IPFS network of the embodiment of the present application may include IPFS nodes and a trusted distribution management center (i.e. the aforementioned IPFS server). Figure 4 As shown, IPFS nodes in the IPFS network can include trusted nodes, untrusted nodes, and unknown nodes. The trusted distribution management center can include: a node trusted status management module for storing and updating the trusted status of the node, and a trusted distribution policy management module for storing, updating, or sending the trusted distribution policy of the node.

[0167] The trusted distribution management center is responsible for monitoring the IPFS nodes connected to the management center and remotely configuring trusted distribution policies to the IPFS nodes connected to the management center.

[0168] Nodes connected to the trusted distribution management center can monitor their operating status through the trusted distribution management center, and can be identified as trusted nodes or untrusted nodes by the trusted distribution management center, and trusted distribution policies can be configured through the trusted distribution management center.

[0169] Trust determination strategy for IPFS nodes:

[0170] To determine whether an IPFS node is trustworthy, its trustworthy verification content must include at least the following two contents:

[0171] 1. The matching relationship between the ID of the IPFS node and the ID of the IPFS device running the IPFS program.

[0172] When an IPFS node joins the IPFS network (see the subsequent process description "Node Joining the IPFS Network"), the IPFS device can generate the ID of the IPFS node, namely the NodeID, and report the first generated NodeID and the IPFS device ID to the Trusted Distribution Management Center as the reference value for the matching relationship between the node ID and the device ID. When the device subsequently reports its own NodeID and device ID again, it is compared with the values ​​reported during the initialization. If the matching relationship between the IPFS NodeID and the device hardware ID has not changed, the IPFS node is considered to be trusted. If the matching relationship has changed, the IPFS node is considered to be untrusted.

[0173] 2. Compare with the trusted benchmark value of the compliant IPFS program (IPFS binary program) to determine whether the IPFS program running on the device is trustworthy (the trusted benchmark value can be obtained in a variety of ways, such as calculating the hash value of the binary program).

[0174] The Trusted Distribution Management Center presets the trusted benchmark value of the trusted version of the IPFS binary program (there can be multiple trusted versions, which are checked and determined by the Trusted Distribution Management Center, similar to how an app store determines whether a listed app is compliant). The device node calculates the hash value of the IPFS program running on its own device and reports it to the Trusted Distribution Management Center. When the hash of the IPFS program running on its own device matches the trusted benchmark value, the Trusted Distribution Management Center considers the IPFS program to be trusted. Otherwise, the IPFS program is considered untrustworthy, non-compliant, or tampered with.

[0175] The trust status determination of an IPFS node may also include other content, such as verifying whether the IPFS device's own operating system is trustworthy, whether the key processes running in the IPFS device are trustworthy, etc.

[0176] If the trusted distribution management center cannot determine the trust status of a node (the node is not connected to the trusted distribution management center as required), the node is identified as an unknown node.

[0177] Trusted distribution policies can be divided into neighbor connection policies and data connection policies. Trusted distribution policies can be set based on the classification of device trust status. A simple trusted distribution policy example is as follows:

[0178] <Trusted, untrusted, allow / disallow neighbor connections, allow / disallow data connections>

[0179] <Trusted, Unknown, Allow / Disallow Neighbor Connection, Allow / Disallow Data Connection>

[0180] like Figure 5 As shown, the internal modules of the IPFS node may include:

[0181] IPFS module: The original IPFS module adds interaction with the trusted module.

[0182] IPFS file blocks: The original IPFS file blocks are stored without changes.

[0183] Trusted module: interacts with the trusted distribution management center, periodically reports its own status, queries the trusted status of other nodes, and receives trusted distribution strategies.

[0184] Node status collection module: collects the status of the IPFS node itself according to the status reporting requirements of the trusted distribution management center.

[0185] Trusted distribution policy: stores the trusted distribution policy issued by the trusted distribution management center.

[0186] The embodiment of this application mainly includes the following processes:

[0187] 1. The node joins the IPFS network.

[0188] For details, please refer to Figure 6 .

[0189] The node first initializes itself and generates a NodeID according to IPFS regulations. After generating the NodeID, the node first connects to the trusted distribution management center, reports its own IPFS node NodeID, device hardware ID, the hash value of the IPFS program it is running, and other device status to the trusted distribution management center, and then connects to the IPFS network according to the normal process of the IPFS network.

[0190] For simplicity, the subsequent reporting of self-status refers to reporting the NodeID of the IPFS node, the device hardware ID, the hash value of the IPFS program running on it, and other device status. Subsequent determination of the trust status of the IPFS node refers to the aforementioned "IPFS Node Trust Determination Strategy."

[0191] After verifying a node's status as trustworthy, the Trusted Distribution Management Center configures a trusted distribution policy for the node. After a node initially connects to the Trusted Distribution Management Center, it periodically reports its status to the Trusted Distribution Management Center. The Trusted Distribution Management Center continuously determines the node's trustworthiness based on these periodic reports. The Trusted Distribution Management Center can also update the trusted distribution policy over time.

[0192] After a node joins the IPFS network, it will establish connections with other nodes and become neighbor nodes, which will serve as the basis for subsequent resource addressing and data exchange. The process of a node becoming a neighbor node can be found in Figure 7 :

[0193] When node A and another node B establish a neighbor node connection, node A first queries the trusted status of node B from the trusted distribution management center (carrying its own node information and the node NodeID-B to be verified). The trusted distribution management center first verifies and updates the trusted status of node A that initiated the request. If node A is trusted, it then queries the trusted status of NodeID-B and returns B's trusted status to node A. A decides whether to establish a neighbor connection with B based on the trusted distribution policy. If a neighbor connection is possible, A initiates a connection to B. Both parties perform IPFS identity verification according to the IPFS standard connection process. After successful verification, node B queries the trusted status of node A from the trusted distribution management center (carrying its own node information and the node NodeID-A to be verified). The trusted distribution management center first verifies and updates the trusted status of node B that initiated the request. If node B is trusted, it then queries the trusted status of NodeID-A and returns A's trusted status to node B. Node B chooses to connect to node A (become a neighbor node with A) or not based on the trusted distribution policy and node A's trusted status, and records node A's trusted status.

[0194] 2. Nodes access resources in the IPFS network.

[0195] For details, please refer to Figure 8 :

[0196] When node A requests data transmission from its neighbor node B, node B compares its own existing list (have_list-B) to see if it contains the content that A needs. If not, node B forwards A's need list to B's other neighbor nodes. If so, node A's NodeID-A is obtained, and the trusted status of node A is queried from the trusted distribution management center. Based on A's trusted status and the configured trusted distribution policy, node B determines whether it can transmit data with node A. If data exchange is possible, node B transfers the file content that A needs to A. If not, node B does not transfer the file and continues to forward A's need list to B's other neighbor nodes. B's other neighbor nodes also behave like B. When they find that they have the file blocks that A needs, they first query A's trusted status, and then decide whether to transfer the file blocks to A based on the trusted distribution policy. If not, node B continues to forward A's want_list.

[0197] 3. Change of node trust status.

[0198] For details, please refer to Figure 9 :

[0199] When a node queries the trusted distribution management center for the trust status of other nodes or regularly reports its own status to the trusted distribution management center, the trusted distribution management center will determine the node's trust status and return its own trust status to the node. If a node's trust status changes, such as from trusted to untrusted, the node queries its own trusted distribution policy. If the change in trust status results in the node being prohibited from becoming a neighboring node with certain nodes, it will proactively disconnect from the neighboring nodes.

[0200] The embodiments of the present application may include the following:

[0201] 1. When a node joins the IPFS network, it first reports its own information to the trusted distribution management center and then joins the IPFS network.

[0202] 2. When a node establishes a neighbor relationship with another node, it first queries the trusted distribution management center for the other party's trust status, and then chooses whether to establish a neighbor relationship with the other party based on the trusted distribution policy.

[0203] 3. If a node receives a data block request from another node and has the data block that the other party needs, before transmitting the data block to the other party, it will first query the trusted status of the other party from the trusted distribution management center, and then choose whether to transmit the data block to the other party based on the trusted distribution policy. If not, it will continue to forward the other party's data block request to other neighboring nodes.

[0204] 4. When the trust status of a node changes, the node actively updates its neighbor nodes according to the trusted distribution strategy and disconnects from neighbor nodes that do not comply with the trusted distribution strategy.

[0205] The embodiment of the present application monitors the status of nodes in the IPFS network through a trusted distribution management center, controls file transfers between nodes in the IPFS network according to the file distribution strategy issued by the trusted distribution management center and the trusted status of the nodes, avoids extracting potentially damaged file blocks from damaged nodes, and improves the security of distributed files in the IPFS network.

[0206] See also Figure 10 , Figure 10 This is one of the structural diagrams of the IPFS network processing device provided in the embodiment of the present application. Figure 10 The IPFS network processing device can be applied to a first IPFS device, which is installed with a first IPFS node and a first IPFS program, such as Figure 10 As shown, the IPFS network processing device 1000 includes:

[0207] The first transceiver 1001 is configured to receive a first trusted distribution policy of the first IPFS node sent by the IPFS server, where the first trusted distribution policy includes an association between a trusted state of the first target IPFS node and a target connection, where the target connection includes at least one of a neighbor connection and a data connection;

[0208] The first processor 1002 is used to determine whether to allow the first IPFS node to establish the target connection with the second target IPFS node according to the first trusted distribution policy.

[0209] Optionally, the first transceiver 1001 is configured to:

[0210] After the first IPFS device joins the IPFS network, first status information is sent to the IPFS server, where the first status information is status information of the first IPFS device at the first moment;

[0211] Receiving a first trusted distribution policy of the first IPFS node sent by the IPFS server when the first trusted state of the first IPFS node is trusted;

[0212] Among them, the first trusted state is determined based on the first state information and the second state information, the second state information is the state information of the first IPFS device at the second moment, the second moment is the moment when the first IPFS device joins the IPFS network, and the first moment is after the second moment; the state information of the first IPFS device includes the identification information of the first IPFS node, the identification information of the first IPFS device and the trusted value of the first IPFS program.

[0213] Optionally, the target connection includes a neighbor connection; the second target IPFS node includes a second IPFS node installed by a second IPFS device, and the first target IPFS node includes the second IPFS node;

[0214] The first processor 1002 is configured to:

[0215] Obtain a second trusted state of the second IPFS node from the IPFS server;

[0216] Determine whether to send a neighbor connection establishment request to the second IPFS node based on the second trusted state and the first trusted distribution strategy;

[0217] In the case of determining to send a neighbor connection establishment request to the second IPFS node, a first neighbor connection establishment request is sent to the second IPFS node.

[0218] Optionally, the target connection includes a neighbor connection; the second target IPFS node includes a third IPFS node installed by a third IPFS device, and the first target IPFS node includes the third IPFS node;

[0219] The first transceiver 1001 is configured to receive a second neighbor connection establishment request sent by the third IPFS node;

[0220] The first processor 1002 is configured to:

[0221] Obtain a third trusted state of the third IPFS node from the IPFS server;

[0222] According to the third trusted state and the first trusted distribution strategy, determine whether to establish a neighbor connection with the third IPFS node.

[0223] Optionally, the target connection includes a data connection; the second target IPFS node includes a fourth IPFS node installed by a fourth IPFS device, and the first target IPFS node includes the fourth IPFS node;

[0224] The first processor 1002 is configured to:

[0225] When the first IPFS node establishes a neighbor connection with the fourth IPFS node, obtaining a fourth trusted state of the fourth IPFS node from the IPFS server;

[0226] Determining whether to allow sending a data connection request to the fourth IPFS node according to the fourth trusted state and the first trusted distribution policy;

[0227] The first transceiver 1001 is used to send a first data connection request to the fourth IPFS node when sending a data connection request to the fourth IPFS node is allowed, where the first data connection request is used to request first data.

[0228] Optionally, the target connection includes a data connection; the second target IPFS node includes a fifth IPFS node installed by a fifth IPFS device, and the first target IPFS node includes the fifth IPFS node;

[0229] The first transceiver 1001 is configured to receive a second data connection request sent by the fifth IPFS node when a neighbor connection is established between the first IPFS node and the fifth IPFS node, where the second data connection request is used to request second data;

[0230] The first processor 1002 is configured to:

[0231] When the first IPFS device stores the second data, obtaining a fifth information state of the fifth IPFS node from the IPFS server;

[0232] Determine whether to send the second data to the first IPFS node based on the fifth trusted state and the first trusted distribution strategy.

[0233] Optionally, after receiving the second data connection request sent by the fifth IPFS node, the method further includes:

[0234] In the case that the first IPFS device does not store the second data, the second data connection request is sent to the sixth IPFS node installed on the sixth IPFS device, and the sixth IPFS node establishes a neighbor connection with the first IPFS node.

[0235] Optionally, the method further includes:

[0236] When the first IPFS node establishes a neighbor connection with the seventh IPFS node installed by the seventh IPFS device, sending third state information of the first IPFS device at a third moment to the IPFS server, where the third moment is after the first moment;

[0237] Receiving a fifth trusted state of the first IPFS node sent by the IPFS server, where the fifth trusted state is determined based on the second state information and the third state information;

[0238] When the fifth trusted state is untrustworthy, disconnect the neighbor connection between the first IPFS node and the seventh IPFS node.

[0239] The IPFS network processing device 1000 can realize the embodiment of the present application Figure 2 The various processes of the method embodiment and the achievement of the same beneficial effects are not described again here to avoid repetition.

[0240] See also Figure 11 , Figure 11 This is the second structural diagram of the IPFS network processing device provided in the embodiment of the present application. Figure 11 The IPFS network processing device can be applied to the IPFS server. Figure 11 As shown, the IPFS network processing device 1100 includes:

[0241] The second transceiver 1101 is configured to send a first trusted distribution policy to a first IPFS node installed on a first IPFS device;

[0242] Among them, the first trusted distribution strategy includes the association relationship between the trusted state of the first target IPFS node and the target connection, and the target connection includes at least one of a neighbor connection and a data connection.

[0243] Optionally, the second transceiver 1101 is configured to receive first status information sent by the first IPFS node, where the first status information is status information of the first IPFS device at a first moment;

[0244] The IPFS network processing device 1100 further includes: a second processor, configured to determine a first trusted state of the first IPFS node based on the first state information and second state information, wherein the second state information is state information of the first IPFS device at a second moment, the second moment being a moment when the first IPFS device joins the IPFS network, and the first moment being after the second moment; the state information of the first IPFS device includes identification information of the first IPFS node, identification information of the first IPFS device, and a trusted value of the first IPFS program;

[0245] The second transceiver 1101 is used to send a first trusted distribution strategy to the first IPFS node when the first trusted state is trusted.

[0246] Optionally, the second processor is configured to:

[0247] When a first condition is met, determining that the first trusted state of the first IPFS node is trusted, the first condition includes:

[0248] The identification information of the first IPFS node at the first moment is the same as the identification information of the first IPFS node at the second moment;

[0249] The identification information of the first IPFS device at the first moment is the same as the identification information of the first IPFS device at the second moment;

[0250] The trusted reference value of the IPFS program stored in the IPFS server includes the trusted value of the first IPFS program at the first moment.

[0251] The IPFS network processing device 1100 can realize the embodiment of the present application Figure 3 The various processes of the method embodiment and the achievement of the same beneficial effects are not described again here to avoid repetition.

[0252] The present application also provides a communication device. Figure 12, the communication device may include a processor 1201, a memory 1202, and a program 12021 stored in the memory 1202 and executable on the processor 1201.

[0253] When the communication device is an IPFS device, the program 12021 can be executed by the processor 1201 to achieve Figure 2 Any steps in the method embodiment and achieving the same beneficial effects will not be repeated here.

[0254] When the communication device is an IPFS server, program 12021 can be executed by processor 1201 to achieve Figure 3 Any steps in the method embodiment and achieving the same beneficial effects will not be repeated here.

[0255] A person skilled in the art will understand that all or part of the steps of the above-mentioned embodiment method can be completed by hardware related to program instructions, and the program can be stored in a readable medium. The embodiment of the present application also provides a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned method can be implemented. Figure 2 or Figure 3 Any steps in the corresponding method embodiments can achieve the same technical effects and will not be described again here to avoid repetition.

[0256] The storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0257] The above is a preferred implementation of the embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. An InterPlanetary File System (IPFS) network processing method, applied to a first IPFS device, characterized in that: The first IPFS device is installed with a first IPFS node and a first IPFS program, and the method includes: Receiving a first trusted distribution policy of the first IPFS node sent by the IPFS server, the first trusted distribution policy including an association relationship between a trusted state of the first target IPFS node and a target connection, the target connection including at least one of a neighbor connection and a data connection; Determine, according to the first trusted distribution policy, whether to allow the first IPFS node to establish the target connection with the second target IPFS node; The first trusted distribution strategy of the first IPFS node received from the IPFS server includes: After the first IPFS device joins the IPFS network, first status information is sent to the IPFS server, where the first status information is status information of the first IPFS device at the first moment; Receiving a first trusted distribution policy of the first IPFS node sent by the IPFS server when the first trusted state of the first IPFS node is trusted; Among them, the first trusted state is determined based on the first state information and the second state information, the second state information is the state information of the first IPFS device at the second moment, the second moment is the moment when the first IPFS device joins the IPFS network, and the first moment is after the second moment; the state information of the first IPFS device includes the identification information of the first IPFS node, the identification information of the first IPFS device and the trusted value of the first IPFS program.

2. The method according to claim 1, characterized in that The target connection includes a neighbor connection; the second target IPFS node includes a second IPFS node installed by a second IPFS device, and the first target IPFS node includes the second IPFS node; The determining, according to the first trusted distribution policy, whether to allow the first IPFS node to establish the target connection with the second target IPFS node includes: Obtain a second trusted state of the second IPFS node from the IPFS server; Determine whether to send a neighbor connection establishment request to the second IPFS node based on the second trusted state and the first trusted distribution strategy; In the case of determining to send a neighbor connection establishment request to the second IPFS node, a first neighbor connection establishment request is sent to the second IPFS node.

3. The method according to claim 1, characterized in that The target connection includes a neighbor connection; the second target IPFS node includes a third IPFS node installed by a third IPFS device, and the first target IPFS node includes the third IPFS node; The determining, according to the first trusted distribution policy, whether to allow the first IPFS node to establish the target connection with the second target IPFS node includes: Receive a second neighbor connection establishment request sent by the third IPFS node; Obtain a third trusted state of the third IPFS node from the IPFS server; According to the third trusted state and the first trusted distribution strategy, determine whether to establish a neighbor connection with the third IPFS node.

4. The method according to claim 1, wherein The target connection includes a data connection; the second target IPFS node includes a fourth IPFS node installed by a fourth IPFS device, and the first target IPFS node includes the fourth IPFS node; The determining, according to the first trusted distribution policy, whether to allow the first IPFS node to establish the target connection with the second target IPFS node includes: When the first IPFS node establishes a neighbor connection with the fourth IPFS node, obtaining a fourth trusted state of the fourth IPFS node from the IPFS server; Determining whether to allow sending a data connection request to the fourth IPFS node according to the fourth trusted state and the first trusted distribution policy; When sending a data connection request to the fourth IPFS node is allowed, a first data connection request is sent to the fourth IPFS node, where the first data connection request is used to request first data.

5. The method according to claim 1, wherein The target connection includes a data connection; the second target IPFS node includes a fifth IPFS node installed by a fifth IPFS device, and the first target IPFS node includes the fifth IPFS node; The determining, according to the first trusted distribution policy, whether to allow the first IPFS node to establish the target connection with the second target IPFS node includes: In a case where the first IPFS node establishes a neighbor connection with the fifth IPFS node, receiving a second data connection request sent by the fifth IPFS node, where the second data connection request is used to request second data; When the first IPFS device stores the second data, obtaining a fifth trusted state of the fifth IPFS node from the IPFS server; Determine whether to send the second data to the first IPFS node based on the fifth trusted state and the first trusted distribution strategy.

6. The method according to claim 5, characterized in that After receiving the second data connection request sent by the fifth IPFS node, the method further includes: In the case that the first IPFS device does not store the second data, the second data connection request is sent to the sixth IPFS node installed on the sixth IPFS device, and the sixth IPFS node establishes a neighbor connection with the first IPFS node.

7. The method according to claim 1, characterized in that The method further comprises: When the first IPFS node establishes a neighbor connection with the seventh IPFS node installed by the seventh IPFS device, sending third state information of the first IPFS device at a third moment to the IPFS server, where the third moment is after the first moment; Receiving a fifth trusted state of the first IPFS node sent by the IPFS server, where the fifth trusted state is determined based on the second state information and the third state information; When the fifth trusted state is untrustworthy, disconnect the neighbor connection between the first IPFS node and the seventh IPFS node.

8. An IPFS network processing method, applied to an IPFS server, characterized in that: include: Sending a first trusted distribution policy to a first IPFS node installed on a first IPFS device; The first trusted distribution strategy includes an association between a trusted state of the first target IPFS node and a target connection, wherein the target connection includes at least one of a neighbor connection and a data connection; The sending of the first trusted distribution strategy to the first IPFS node installed on the first IPFS device includes: Receive first status information sent by the first IPFS node, where the first status information is status information of the first IPFS device at a first moment; Determine a first trusted state of the first IPFS node based on the first state information and the second state information, where the second state information is state information of the first IPFS device at a second moment, where the second moment is the moment when the first IPFS device joins the IPFS network, and the first moment is after the second moment; the state information of the first IPFS device includes identification information of the first IPFS node, identification information of the first IPFS device, and a trusted value of the first IPFS program; When the first trusted state is trusted, a first trusted distribution strategy is sent to the first IPFS node.

9. The method according to claim 8, characterized in that Determining the first trusted state of the first IPFS node according to the first state information and the second state information includes: When a first condition is met, determining that the first trusted state of the first IPFS node is trusted, the first condition includes: The identification information of the first IPFS node at the first moment is the same as the identification information of the first IPFS node at the second moment; The identification information of the first IPFS device at the first moment is the same as the identification information of the first IPFS device at the second moment; The trusted reference value of the IPFS program stored in the IPFS server includes the trusted value of the first IPFS program at the first moment.

10. An IPFS network processing device, applied to a first IPFS device, characterized in that: The first IPFS device is installed with a first IPFS node and a first IPFS program, and the IPFS network processing device includes: A first transceiver is configured to receive a first trusted distribution policy of the first IPFS node sent by the IPFS server, wherein the first trusted distribution policy includes an association relationship between a trusted state of the first target IPFS node and a target connection, wherein the target connection includes at least one of a neighbor connection and a data connection; A first processor is configured to determine, according to the first trusted distribution policy, whether to allow the first IPFS node to establish the target connection with the second target IPFS node; The first transceiver is configured to: After the first IPFS device joins the IPFS network, first status information is sent to the IPFS server, where the first status information is status information of the first IPFS device at the first moment; Receiving a first trusted distribution policy of the first IPFS node sent by the IPFS server when the first trusted state of the first IPFS node is trusted; Among them, the first trusted state is determined based on the first state information and the second state information, the second state information is the state information of the first IPFS device at the second moment, the second moment is the moment when the first IPFS device joins the IPFS network, and the first moment is after the second moment; the state information of the first IPFS device includes the identification information of the first IPFS node, the identification information of the first IPFS device and the trusted value of the first IPFS program.

11. An IPFS network processing device, applied to an IPFS server, characterized in that: include: A second transceiver, configured to send a first trusted distribution policy to a first IPFS node installed on a first IPFS device; The first trusted distribution strategy includes an association between a trusted state of the first target IPFS node and a target connection, wherein the target connection includes at least one of a neighbor connection and a data connection; The second transceiver is configured to receive first status information sent by the first IPFS node, where the first status information is status information of the first IPFS device at a first moment; The IPFS network processing device further includes: a second processor, configured to determine a first trusted state of the first IPFS node based on the first state information and second state information, wherein the second state information is state information of the first IPFS device at a second moment, the second moment being a moment when the first IPFS device joins the IPFS network, and the first moment being after the second moment; the state information of the first IPFS device includes identification information of the first IPFS node, identification information of the first IPFS device, and a trusted value of the first IPFS program; The second transceiver is used to send a first trusted distribution strategy to the first IPFS node when the first trusted state is trusted.

12. A communication device comprising: A transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; wherein the processor is configured to read the program in the memory to implement the steps of the IPFS network processing method according to any one of claims 1 to 7; or the steps of the IPFS network processing method according to any one of claims 8 to 9.

13. A readable storage medium for storing a program, characterized in that: When the program is executed by the processor, the steps of the IPFS network processing method according to any one of claims 1 to 7 are implemented; Or, the steps in the IPFS network processing method as described in any one of claims 8 to 9.

Citation Information

Patent Citations

  • Storage method, system and device for distributed storage network

    CN110868466A