A distributed IP task collaborative processing system and method
The distributed IP task collaborative processing system, which utilizes blockchain and consistent hashing algorithms, solves the single point of failure and task allocation conflicts caused by centralized servers. It achieves highly consistent and secure IP set file synchronization and task allocation, and supports system scalability.
Patent Information
- Application Number
- CN202511531819.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2045-10-24
AI Technical Summary
Existing technologies in distributed networks suffer from single point of failure risks due to centralized servers, file synchronization delays and version inconsistencies, as well as task IP allocation conflicts, and lack decentralized, highly consistent, and highly reliable solutions.
By employing blockchain technology and a distributed file system, IP collection files and task information are recorded through smart contracts. A consistent hashing algorithm is used to achieve file synchronization and task allocation between nodes, ensuring data consistency and conflict-free processing between nodes.
It achieves high robustness, data consistency, conflict-free allocation, and efficiency in a decentralized manner, prevents malicious tampering, supports nodes to freely join or leave, and has strong system scalability.
Smart Images

Figure CN121508788B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed networks, and in particular to a distributed IP task collaborative processing system and method. Background Technology
[0002] In fields such as distributed network probing, security scanning, and performance monitoring, multiple nodes typically need to collaborate to complete a task targeting a massive number of IP addresses. Current technologies face two core challenges: 1) IP Set File Synchronization Issue: Mainstream solutions rely on a centralized server to store and distribute IP set files (including single IPs, IP ranges, CIDRs, domain names, etc.). Nodes periodically pull updates from the central server or receive updates pushed by the server. This approach carries a single point of failure risk; when the network is congested or the server is under high load, there is a delay in node file synchronization, resulting in inconsistent file versions on different nodes at the same time; malicious attackers may tamper with files on the central server, posing a security risk.
[0003] 2) Task IP Allocation Conflict Issue: How to ensure that each node handles a different IP address during task execution to avoid duplication or omission? Existing technologies typically involve a central server performing task sharding and allocation, for example, assigning IP ranges to different nodes. This approach is also limited by the bottlenecks of a centralized architecture, and when nodes dynamically join or leave, the central server needs to recalculate and reschedule, resulting in high system complexity and response latency.
[0004] Therefore, existing technologies lack a decentralized, highly consistent, and highly reliable solution to address the issues of file synchronization and conflict-free task allocation among multiple nodes. Summary of the Invention
[0005] This application provides a distributed IP task collaborative processing system and method to address the problems in the background technology.
[0006] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0007] According to a first aspect of the embodiments of this application, a distributed IP task collaborative processing system is provided, comprising: A distributed file system that receives a set of IP addresses uploaded by a file administrator and returns a unique content identifier. The blockchain network includes smart contracts that, upon invocation by a file administrator, initiate a transaction to record the latest content identifier and version number in the smart contract; and, upon invocation by a task publisher, upload published tasks to the blockchain; the tasks include task IDs and filtering rules. Several independent nodes are configured, each registered in a smart contract, and each node includes a local application module and a locally consistent file library. The local application module listens for IP set file update events in the blockchain network, downloads the latest IP set file from the distributed file system, and saves it in the locally consistent file library. The local application module also listens for task events in the blockchain network, extracts IPs that meet the conditions from the IP set file in the locally consistent file library according to the task filtering rules, forms a filtered IP list, determines the IP address in the filtered IP list to be executed by this node according to preset rules, and completes the task execution.
[0008] According to one embodiment of this application, downloading the latest IP set file and saving it in a locally consistent file library specifically includes: After the local application module downloads the latest IP set file, the node calculates the content identifier of the file and compares it with the content identifier recorded on the blockchain network. If they match, the file is valid and stored in the local consistent file library; if they do not match, the file is discarded and the process is retried.
[0009] According to one embodiment of this application, each transaction in the blockchain network is consensus-based and packaged into a block; all nodes agree to simultaneously activate the new version file after the block height reaches a preset height.
[0010] According to one embodiment of this application, when each node registers in the node registry of the smart contract, the smart contract assigns a unique, sequential index number to each node.
[0011] According to one embodiment of this application, the step of determining the IP addresses to be executed by this node in the filtered IP list according to preset rules specifically includes: For each IP address in the filtered IP list, the node performs the following calculation: hash_value = SHA256(task_id + IP_address) Where hash_value is the calculated hash value, task_id is the salt value, and IP_address is the IP address; assignment_index = hash_value mod N Where N is the total number of index numbers in the node registry of the smart contract; If the calculated assignment_index is equal to the index number registered by this node in the smart contract, then this IP address will be processed by this node; otherwise, this IP address will be ignored.
[0012] According to one embodiment of this application, before each task is executed, the node queries the smart contract for the latest node registration list and the total number of index numbers N.
[0013] According to a second aspect of this application, a distributed IP task collaborative processing method is provided, comprising: The file administrator uploads the IP collection file to the distributed file system and receives the returned content identifier; The file administrator invokes a smart contract on the blockchain to initiate a transaction that records the latest content identifier and version number in the smart contract's state; All nodes continuously listen for file update events in the smart contract. When a new file event is detected, the nodes download the latest IP set file from the distributed file system and save it in a local consistent file library. The task publisher invokes a smart contract and uploads the published task to the blockchain; the task includes a task ID and filtering rules. When all nodes detect a new task event, they extract IPs that meet the conditions from the IP set file in the local consistent file library according to the filtering rules in the task, form a filtered IP list, determine the IP address in the filtered IP list to be executed by this node according to preset rules, and complete the task execution.
[0014] According to one embodiment of this application, after downloading the latest IP set file, the node calculates the content identifier of the file and compares it with the content identifier recorded on the blockchain network. If they match, the file is valid and stored in the local consistent file library; if they do not match, the file is discarded and the process is retried.
[0015] According to one embodiment of this application, the step of determining the IP addresses to be executed by this node in the filtered IP list according to preset rules specifically includes: For each IP address in the filtered IP list, the node performs the following calculation: hash_value = SHA256(task_id + IP_address) Where hash_value is the calculated hash value, task_id is the salt value, and IP_address is the IP address; assignment_index = hash_value mod N Where N is the total number of index numbers in the node registry of the smart contract; If the calculated assignment_index is equal to the index number registered by this node in the smart contract, then this IP address will be processed by this node; otherwise, this IP address will be ignored.
[0016] According to one embodiment of this application, before each task is executed, the node queries the smart contract for the latest node registration list and the total number of index numbers N.
[0017] Compared with existing technologies, the beneficial effects of adopting the above technical solution are as follows: 1) Decentralization and high robustness: It eliminates the dependence on a central server, avoiding single points of failure and performance bottlenecks. The failure of some nodes in the system will not affect the availability of the overall service.
[0018] 2) Data consistency and trustworthiness: By utilizing the consensus mechanism of blockchain and the content addressing characteristics of IPFS, it is ensured that all nodes hold the exact same, tamper-proof IP set file at a given point in time.
[0019] 3) Accuracy and efficiency of conflict-free allocation: Through the consistent hashing algorithm, each node can independently and in parallel calculate the IP it should process, without the need for a central node to perform complex sharding scheduling. The allocation process is efficient and absolutely conflict-free.
[0020] 4) Security and tamper-proof: The file versions and task information recorded on the blockchain are immutable, preventing malicious attackers from forging or tampering with task instructions and basic data.
[0021] 5) Good scalability: Nodes can freely join or leave the system, and the registry and hash algorithm managed by smart contracts can automatically adapt to changes in the number of nodes, allowing the system to be flexibly expanded. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0023] Figure 1 This is a schematic diagram of the distributed IP task collaborative processing system proposed in an embodiment of this application.
[0024] Figure 2 This is a schematic diagram of the distributed IP task collaborative processing method proposed in the embodiments of this application.
[0025] Figure 3 This is an internal decision-making flowchart for a single node in an embodiment of this application when processing a task.
[0026] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] The embodiments of this application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar modules or modules having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. Rather, the embodiments of this application include all variations, modifications, and equivalents falling within the spirit and scope of the appended claims.
[0028] To address the shortcomings of existing solutions, this application mainly solves the following technical problems: 1) How to ensure that all collaborating nodes have completely identical IP address sets in terms of content and order at the same time without relying on a central server.
[0029] 2) How to ensure that each node can autonomously and uncoordinatedly extract IPs from the local IP set file according to the task rules each time a probe task is executed, and ensure that no IP is processed by multiple nodes at the same time (no duplication) and is not missed (no omission).
[0030] Based on this, this application proposes a distributed IP task collaborative processing system. It uses blockchain technology to ensure the immutability and consistency of global data, and employs a distributed consistent hashing algorithm to achieve decentralized and precise task allocation. Please refer to... Figure 1 The distributed IP task collaborative processing system specifically includes a distributed file system, a blockchain network, and several independent nodes.
[0031] Specifically, the distributed file system is mainly used to receive IP collection files uploaded by file administrators and return a unique Content Identifier (CID). The IP collection files can be pre-sorted according to IP values; the CID is a hash value of the file content, and even minor changes to the task will result in a completely different CID.
[0032] A blockchain network primarily comprises smart contracts. In practical applications, after receiving the content identifier returned by the distributed file system, a file administrator can invoke a smart contract on the blockchain network to initiate a transaction that records the latest content identifier and version number within the smart contract. This transaction is consensus-driven by the blockchain network and packaged into a block; in this embodiment, the block height is H_file.
[0033] Furthermore, smart contracts on a blockchain network also need to provide task publishing functionality. In practical applications, after constructing a task, the task publisher invokes the smart contract to record the task information on the blockchain. Generally, the task information needs to include a task ID and filtering rules.
[0034] Several independent nodes operate independently. Each node registers within a smart contract and includes a local application module and a locally consistent file repository. Taking a single node as an example, its operation involves the local application module monitoring for IP set file updates in the blockchain network, downloading the latest IP set file from the distributed file system, and storing it in a locally consistent file repository.
[0035] After the local application module downloads the latest IP set file, the node calculates the content identifier of the file and compares it with the content identifier recorded on the blockchain network. If they match, the file is valid and stored in the local consistent file library; if they do not match, the file is discarded and the node retryes.
[0036] It should be noted that in practical applications, all nodes agree to simultaneously activate the new version file when the blockchain reaches a preset height H_file + N (where N is a fixed number of confirmed blocks, such as 12). Leveraging the consensus characteristic of the blockchain, all nodes reach an absolute consensus on "when to switch files," thus ensuring global consistency in content and switching time.
[0037] Meanwhile, the local application module listens for task events in the blockchain network and extracts IPs that meet the conditions from the IP set file in the local consistent file library according to the task filtering rules, forming a filtered IP list. Based on preset rules, it determines the IP address in the filtered IP list to be executed by this node and completes the task execution.
[0038] It should be noted that when each node registers in the smart contract's node registry, the smart contract assigns each node a unique, consecutive index number, where N is the total number of index numbers.
[0039] In this embodiment, IP addresses selected for execution by this node from the filtered IP list are determined using preset rules to achieve decentralized allocation and execution. Specifically, for each IP address in the filtered IP list, the node performs the following calculations: hash_value = SHA256(task_id + IP_address) Where hash_value is the calculated hash value, task_id is the salt value, and IP_address is the IP address; assignment_index = hash_value mod N Where N is the total number of index numbers in the node registry of the smart contract; If the calculated assignment_index is equal to the index number registered by this node in the smart contract, then this IP address will be processed by this node; otherwise, this IP address will be ignored.
[0040] In one embodiment, a dynamic processing procedure is also provided. If a new node joins or goes offline during execution, the node registry in the smart contract is updated, and the total number of indexes N changes. Therefore, before executing each task, a node queries the smart contract for the latest node list and the total number of indexes N, ensuring that the allocation algorithm is always based on the latest network state and avoiding the allocation of IPs to offline nodes.
[0041] Compared with the prior art, the present invention has the following significant advantages and beneficial effects: 1) Decentralization and high robustness: It eliminates the dependence on a central server, avoiding single points of failure and performance bottlenecks. The failure of some nodes in the system will not affect the availability of the overall service.
[0042] 2) Data consistency and trustworthiness: By utilizing the consensus mechanism of blockchain and the content addressing characteristics of IPFS, it is ensured that all nodes hold the exact same, tamper-proof IP set file at a given point in time.
[0043] 3) Accuracy and efficiency of conflict-free allocation: Through the consistent hashing algorithm, each node can independently and in parallel calculate the IP it should process, without the need for a central node to perform complex sharding scheduling. The allocation process is efficient and absolutely conflict-free.
[0044] 4) Security and tamper-proof: The file versions and task information recorded on the blockchain are immutable, preventing malicious attackers from forging or tampering with task instructions and basic data.
[0045] 5) Good scalability: Nodes can freely join or leave the system, and the registry and hash algorithm managed by smart contracts can automatically adapt to changes in the number of nodes, allowing the system to be flexibly expanded.
[0046] Furthermore, this application embodiment also provides a distributed IP task collaborative processing method, including the following steps: S101. The file administrator uploads the IP set file to the distributed file system and receives the returned content identifier; S102. The file administrator calls the smart contract on the blockchain to initiate a transaction that records the latest content identifier and version number in the state of the smart contract. S103. All nodes continuously monitor smart contract events related to file updates. Upon detecting a new file event, each node downloads the latest IP set file from the distributed file system and saves it in a locally consistent file repository. After downloading the latest IP set file, each node calculates the file's content identifier and compares it with the content identifier recorded on the blockchain network. If they match, the file is valid and stored in the locally consistent file repository; otherwise, it is discarded and the process is retried.
[0047] S104. The task publisher invokes the smart contract and uploads the published task to the blockchain; the task includes a task ID and filtering rules. S105. When all nodes detect a new task event, they extract IPs that meet the conditions from the IP set file in the local consistent file library according to the filtering rules in the task, form a filtered IP list, determine the IP address in the filtered IP list to be executed by this node according to the preset rules, and complete the task execution.
[0048] For each IP address in the filtered IP list, the node performs the following calculation: hash_value = SHA256(task_id + IP_address) Where hash_value is the calculated hash value, task_id is the salt value, and IP_address is the IP address; assignment_index = hash_value mod N Where N is the total number of index numbers in the node registry of the smart contract; If the calculated assignment_index is equal to the index number registered by this node in the smart contract, then this IP address will be processed by this node; otherwise, this IP address will be ignored.
[0049] According to one embodiment of this application, before each task is executed, the node queries the smart contract for the latest node registration list and the total number of index numbers N.
[0050] Figure 3 The internal decision-making process when a single node processes a task is described, including the following steps: S201: Monitor the blockchain to obtain tasks; obtain the latest total number of index numbers N; obtain the index of your own node I; S202. Load a consistent set of IPs from the local machine and apply filtering rules to generate a filtered list L; S203. Iterate through each IP in list L, calculate hash_value = SHA256(task_id + IP_address), assignment_index = hash_value mod N; S204. Determine if assignment_index is equal to its own index I; if not, proceed to S205; if yes, proceed to S206. S205, Ignore this IP, process the next IP, and proceed to S203; S206. After executing this task, proceed to S201.
[0051] Based on the same technical concept, embodiments of this application also provide an electronic device that can implement the distributed IP task collaborative processing method flow provided in the above embodiments of the present invention. In one embodiment, the electronic device is implemented as a display and control device, such as... Figure 4 As shown, the electronic device may include: At least one processor and a memory connected to the at least one processor. In this embodiment of the invention, the specific connection medium between the processor and the memory is not limited. Figure 4 The example used is the connection between the processor and memory via a bus. The bus... Figure 4 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. Buses can be divided into address buses, data buses, control buses, etc., but for ease of representation, [the specific bus type is not shown here]. Figure 4 The processor is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, a processor can also be called a controller; there are no restrictions on the name.
[0052] In this embodiment of the invention, the memory stores instructions executable by at least one processor. By executing the instructions stored in the memory, the at least one processor can execute the distributed IP task collaborative processing method described above. The processor can implement... Figure 4 The functions of each module in the device shown.
[0053] The processor is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory and calling data stored in memory, it can monitor the device's various functions and process data, thereby enabling overall monitoring of the device.
[0054] In an alternative design, the processor may include one or more processing units. The processor may integrate an application processor and a modem processor, wherein the application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles wireless communication. It is understood that the modem processor may also not be integrated into the processor. In some embodiments, the processor and memory may be implemented on the same chip; in some embodiments, they may also be implemented separately on separate chips.
[0055] The processor can be a general-purpose processor, such as a CPU, digital signal processor, application-specific integrated circuit, field-programmable array, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the distributed IP task collaborative processing method disclosed in the embodiments of this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0056] Memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory is any other medium capable of carrying or storing desired program code in the form of instructions or data structures, and accessible by a computer, but is not limited thereto. In embodiments of the present invention, memory can also be a circuit or any other device capable of implementing storage functions, used to store program instructions and / or data.
[0057] By designing and programming the processor, the code corresponding to the distributed IP task collaborative processing method described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute the steps of the method described in the foregoing embodiments during runtime. How to design and program the processor is a technique well-known to those skilled in the art and will not be elaborated upon here.
[0058] Based on the same inventive concept, embodiments of the present invention also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to execute a distributed IP task collaborative processing method process described above.
[0059] In some alternative embodiments, the present invention also provides that various aspects of a distributed IP task collaborative processing method flow can also be implemented in the form of a program product, which includes program code that, when the program product is run on a device, causes the control device to perform the steps in a distributed IP task collaborative processing method flow according to various exemplary embodiments of the present invention as described in this specification.
[0060] It should be noted that although several units or sub-units of the apparatus have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the invention, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units. Furthermore, although the operation of the method of the invention is described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0061] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0062] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a server, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0063] Program code for performing the operations of this invention can be written using any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0064] In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0065] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0066] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0067] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A distributed IP task collaborative processing system, characterized in that, include: A distributed file system that receives a file containing a collection of IP addresses uploaded by a file administrator and returns a unique content identifier. A blockchain network, including smart contracts, initiates a transaction based on a file administrator's call, recording the latest content identifier and version number in the smart contract; And based on the call from the task publisher, the published task is uploaded to the blockchain; the task includes a task ID and filtering rules; Several independent nodes, each of which is registered in a smart contract, and each node includes a local application module and a locally consistent file library; the local application module listens for IP set file update events in the blockchain network, downloads the latest IP set file from the distributed file system and saves it in the locally consistent file library; The local application module listens to task events in the blockchain network and extracts IPs that meet the conditions from the IP set file in the local consistent file library according to the task filtering rules, forming a filtered IP list. Based on preset rules, it determines the IP address in the filtered IP list to be executed by this node and completes the task execution.
2. The distributed IP task collaborative processing system according to claim 1, characterized in that, The process of downloading the latest IP set file and saving it to a consistent local file repository specifically includes: After the local application module downloads the latest IP set file, the node calculates the content identifier of the file and compares it with the content identifier recorded on the blockchain network. If they match, the file is valid and stored in the local consistent file library; if they do not match, the file is discarded and the process is retried.
3. The distributed IP task collaborative processing system according to claim 1, characterized in that, Every transaction in the blockchain network is consensus-driven and packaged into a block; all nodes agree that for each IP set file update event, after the block height reaches the preset height, the corresponding new version of the IP set file will be activated simultaneously.
4. The distributed IP task collaborative processing system according to claim 1, characterized in that, When each node registers in the smart contract's node registry, the smart contract assigns each node a unique, sequential index number.
5. The distributed IP task collaborative processing system according to claim 4, characterized in that, The step of determining the IP addresses to be executed by this node in the filtered IP list according to preset rules specifically includes: For each IP address in the filtered IP list, the node performs the following calculation: hash_value = SHA256(task_id + IP_address) Where hash_value is the calculated hash value, task_id is the salt value, and IP_address is the IP address; assignment_index = hash_value mod N Where N is the total number of index numbers of currently valid nodes in the node registry of the smart contract; If the calculated assignment_index is equal to the index number registered by this node in the smart contract, then this IP address will be processed by this node; otherwise, this IP address will be ignored.
6. The distributed IP task collaborative processing system according to claim 5, characterized in that, Before each task is executed, the node queries the smart contract for the latest list of registered nodes and the total number of index numbers N of currently valid nodes.
7. A distributed IP task collaborative processing method, characterized in that, include: The file administrator uploads the IP collection file to the distributed file system and receives the returned content identifier; The file administrator invokes a smart contract on the blockchain to initiate a transaction that records the latest content identifier and version number in the smart contract's state; All nodes continuously listen for file update events in the smart contract. When a new file event is detected, the nodes download the latest IP set file from the distributed file system and save it in a local consistent file library. The task publisher invokes a smart contract and uploads the published task to the blockchain; the task includes a task ID and filtering rules. When all nodes detect a new task event, they extract IPs that meet the conditions from the IP set file in the local consistent file library according to the filtering rules in the task, form a filtered IP list, determine the IP address in the filtered IP list to be executed by this node according to preset rules, and complete the task execution.
8. The distributed IP task collaborative processing method according to claim 7, characterized in that, After downloading the latest IP set file, the node calculates the content identifier of the file and compares it with the content identifier recorded on the blockchain network. If they match, the file is valid and stored in the local consistent file library; if they do not match, the file is discarded and the node retryes.
9. The distributed IP task collaborative processing method according to claim 7 or 8, characterized in that, The step of determining the IP addresses to be executed by this node in the filtered IP list according to preset rules specifically includes: For each IP address in the filtered IP list, the node performs the following calculation: hash_value = SHA256(task_id + IP_address) Where hash_value is the calculated hash value, task_id is the salt value, and IP_address is the IP address; assignment_index = hash_value mod N Each node is assigned a unique, consecutive index number when registering in the node registry of the smart contract, where N is the total number of index numbers of currently valid nodes in the node registry of the smart contract. If the calculated assignment_index is equal to the index number registered by this node in the smart contract, then this IP address will be processed by this node; otherwise, this IP address will be ignored.
10. The distributed IP task collaborative processing method according to claim 9, characterized in that, Before each task is executed, the node queries the smart contract for the latest list of registered nodes and the total number of index numbers N of currently valid nodes.
Citation Information
Patent Citations
Distributed node intrusion situation awareness method based on block chain
CN116405187A
Distributed data consistency management system and method based on block chain
CN120407685A
