Network address processing method and device based on block chain, equipment and storage medium
Decentralized network address allocation through blockchain technology solves the problems of single point of failure, insufficient transparency and security in existing technologies, improves the security and efficiency of address allocation, and is suitable for large-scale Internet of Things scenarios.
Patent Information
- Application Number
- CN202511193370.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-11-18
AI Technical Summary
Existing network address allocation systems suffer from single point of failure risk, poor scalability, lack of transparency and traceability, insufficient security, and low efficiency, especially in large-scale Internet of Things (IoT) scenarios.
By employing blockchain technology, blockchain nodes receive network address requests from clients, verify them using smart contracts, select target network addresses from the network address pool, generate address processing records, and broadcast them to the blockchain network, thus achieving a decentralized, transparent, and encrypted address allocation process.
It improves the security and efficiency of network address allocation, eliminates the risk of single points of failure, enhances transparency and traceability, and supports efficient address management for large-scale devices.
Smart Images

Figure CN120980061A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of network address allocation technology, and in particular to a method, apparatus, device and storage medium for processing network addresses based on blockchain. Background Technology
[0002] Existing network address (e.g., IPv6 address) allocation systems rely on centralized servers or routers, posing a single point of failure risk, and the address allocation process lacks transparency and traceability. Centralized DHCPv6 server management is common in network address allocation. The server maintains the address pool, receives address requests from clients, and allocates addresses according to preset rules. As the network expands and the number of connected devices increases, the number of requests the server needs to handle increases significantly, easily leading to performance bottlenecks. Moreover, because all address allocation information is centrally stored on the server, if the server is attacked (e.g., by DDoS attacks) or experiences hardware failures or software errors, the address allocation service of the entire network will be severely affected, even leading to service interruption. Summary of the Invention
[0003] This invention provides a method, apparatus, device, and storage medium for processing network addresses based on blockchain, which can improve the security and efficiency of network address processing.
[0004] In a first aspect, embodiments of the present invention provide a method for processing network addresses based on blockchain, comprising:
[0005] A blockchain node receives a network address processing request sent by a client; wherein, the network address processing request includes a network address allocation request or a network address update request;
[0006] The network address processing request is verified using a smart contract;
[0007] If the verification passes, a target network address is selected from the network address pool;
[0008] The target network address is sent to the client so that the client can perform network configuration based on the target network address;
[0009] An address processing record is generated based on the target network address, and the address processing record is broadcast to other nodes in the blockchain.
[0010] Secondly, embodiments of the present invention also provide a network address processing apparatus based on blockchain, comprising:
[0011] A network address processing request receiving module is used for blockchain nodes to receive network address processing requests sent by clients; wherein, the network address processing request includes a network address allocation request or a network address update request;
[0012] The verification module is used to verify the network address processing request using a smart contract;
[0013] The target network address selection module is used to select a target network address from the network address pool if the verification passes.
[0014] A target network address sending module is used to send the target network address to the client, so that the client can perform network configuration based on the target network address;
[0015] The address processing record generation module is used to generate an address processing record based on the target network address and broadcast the address processing record to other nodes in the blockchain.
[0016] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the blockchain-based network address processing method described in the embodiments of the present invention.
[0020] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute the blockchain-based network address processing method described in the embodiments of the present invention.
[0021] This invention discloses a method, apparatus, device, and storage medium for processing network addresses based on blockchain. A blockchain node receives a network address processing request from a client; wherein the network address processing request includes a network address allocation request or a network address update request; the network address processing request is verified using a smart contract; if the verification passes, a target network address is selected from the network address pool; the target network address is sent to the client so that the client can configure its network according to the target network address; an address processing record is generated based on the target network address, and the address processing record is broadcast to other nodes in the blockchain. The blockchain-based network address processing method provided by this invention, which uses blockchain technology to allocate and update client network addresses, can improve security and efficiency. Attached Figure Description
[0022] Figure 1 This is a structural diagram of a blockchain-based network address processing system according to an embodiment of the present invention;
[0023] Figure 2 This is a flowchart of a blockchain-based network address processing method according to an embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram of the structure of a blockchain-based network address processing device according to an embodiment of the present invention;
[0025] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0026] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0027] Disadvantages of existing technology:
[0028] (1) High risk of single point of failure: Once a centralized DHCPv6 server fails, such as due to hardware damage or malicious attack, the IPv6 address allocation service of the entire network will not be able to operate normally, resulting in new devices being unable to obtain addresses and the network connection of connected devices may also be interrupted, seriously affecting the stability and availability of the network.
[0029] (2) Poor scalability: As the network scale continues to expand, the number of access devices increases dramatically, and the number of address requests that centralized servers need to handle rises significantly. The server's processing and storage capabilities are limited, and under high concurrency, response delays are likely to occur, making it impossible to meet the address allocation efficiency requirements of large-scale networks.
[0030] (3) Lack of transparency and traceability: The existing address allocation process is controlled by a centralized institution. Users cannot verify the legality of the address allocation, nor can they trace the historical allocation records of the address, which can easily lead to address abuse or conflict.
[0031] (4) Insufficient security: In a centralized management model, the server stores a large amount of device address allocation information. Once this information is leaked, it may lead to network security problems, such as address conflicts and malicious device access. At the same time, centralized servers are more likely to become targets of hacker attacks. After hackers obtain the server's address allocation information, they may tamper with the address allocation records, leading to network paralysis or security vulnerabilities. Its security is difficult to guarantee.
[0032] (5) Inefficiency: In large-scale IoT scenarios, centralized address allocation systems may not be able to efficiently handle address requests from a massive number of devices, leading to increased latency and wasted resources.
[0033] Figure 1 This is a structural diagram of a blockchain-based network address processing system according to an embodiment of the present invention, as shown below. Figure 1 As shown, the system comprises a blockchain network, a client, smart contracts, and an address pool management module. The blockchain network, consisting of multiple blockchain nodes connected via a P2P network, is responsible for storing and verifying address allocation information. The client is installed on devices that need to obtain network addresses (e.g., IPv6 addresses), and is responsible for collecting device information and interacting with the blockchain network. The smart contracts are deployed on the blockchain, implementing the specific logic and rules for network address processing. The address pool management module is responsible for maintaining the network address pool and managing and allocating addresses within it.
[0034] For blockchain networks, blockchain nodes include the following types: Full nodes: Store the complete blockchain ledger, participate in the consensus mechanism, and verify and record transactions (address allocation, updates, releases, etc.); Full nodes ensure the integrity and consistency of the entire blockchain network by continuously synchronizing and verifying blockchain data. Light nodes: Store only partial blockchain information, such as block headers, and verify the validity of transactions by communicating with full nodes; Light nodes are suitable for resource-constrained devices and can reduce the consumption of storage and computing resources.
[0035] The consensus mechanism in blockchain networks employs Proof-of-Stake (PoS), where nodes participate in record-keeping and transaction verification based on their stake (such as the number of tokens they hold or their contribution to the system). In the address allocation system, a node's stake can be determined based on factors such as the computing and storage resources it provides, or its contribution to the system's stability. The PoS mechanism can improve the performance and efficiency of blockchain networks while reducing energy consumption.
[0036] Each node stores a complete blockchain ledger, which consists of multiple blocks. Each block contains a certain number of address allocation records. The blocks are linked together by hash values to form an immutable chain structure. The address allocation records include information such as device identifier, allocated IPv6 address, allocation time, device type, and network environment information.
[0037] Figure 2 This is a flowchart illustrating a blockchain-based network address processing method provided in an embodiment of the present invention. This embodiment is applicable to situations involving the allocation and updating of network addresses. The method can be executed by a blockchain-based network address processing device, which can be implemented in software and / or hardware, optionally through an electronic device such as a mobile terminal, PC, or server. Figure 1 As shown, the method specifically includes the following steps:
[0038] S110, the blockchain node receives a network address processing request sent by the client.
[0039] The network address processing request includes a network address allocation request or a network address update request. Both network address allocation and update requests include device identifier, device type, network environment information, and request time; the network address update request also includes the first current network address. The network address can be an IPv6 address.
[0040] In this embodiment, when a device starts up or connects to the network, the client collects the device's unique identifier (such as MAC address), device type (such as computer, server, IoT device, etc.), and network environment information (such as subnet and network mask). Based on the collected information, the client generates a network address allocation request with the format {device identifier, device type, network environment information, request time}, and sends the network address allocation request to any node in the blockchain network.
[0041] In this embodiment, when a device needs to update its network address, the client sends a network address update request to the blockchain node, which includes the first current network address, device identifier, device type, network environment information, and request time.
[0042] Network address processing requests are encrypted to ensure information security. Symmetric encryption algorithms (such as AES) or asymmetric encryption algorithms (such as RSA) can be used to encrypt the requests. The client sends the generated network address processing request to any node in the blockchain network. Communication can be conducted via UDP or TCP protocols to ensure reliable transmission of the request.
[0043] Access to nodes and smart contracts in the blockchain network is strictly controlled, allowing only authorized nodes and users to perform operations such as address allocation, updating, and release. A role-based access control (RBAC) model is employed, assigning different operational permissions based on the user's role and privileges.
[0044] S120 uses smart contracts to verify network address processing requests.
[0045] In this embodiment, the network address processing request is verified using a smart contract, including at least one of the following: verifying whether the device identifier format is valid; or verifying whether the device type is in a preset list of valid types; or verifying whether the request time is within a valid time range (to prevent expired or malicious requests); or verifying whether the first current network address is valid based on historical address processing records. For example, verifying whether the MAC address conforms to a standard hexadecimal format and whether the device type is in a preset list of valid types.
[0046] S130, if the verification passes, select the target network address from the network address pool.
[0047] Specifically, the method for selecting a target network address from the network address pool can be based on any of the following algorithms: random selection algorithm, sequential selection algorithm, or load balancing algorithm.
[0048] One method for selecting a target network address from the network address pool based on a random selection algorithm is to randomly select an available network address from the pool for allocation. This algorithm is simple and efficient, and suitable for situations where there are sufficient addresses in the initial address allocation phase. Another method is to select an available address from the network address pool sequentially according to the address order in the pool. This algorithm ensures the orderly allocation of addresses and is suitable for local address selection after block partitioning. A third method is to select a target network address from the network address pool based on a load balancing algorithm. This algorithm selects an available address from a less loaded address segment based on the usage of each subnet or address segment in the network. This algorithm improves the utilization of network resources and avoids overuse of local address segments.
[0049] S140, the target network address is sent to the client so that the client can configure the network according to the target network address.
[0050] After receiving the target network address returned by the blockchain network, the client configures the device's network according to the assigned target network address and related configuration information, enabling the device to access the network normally.
[0051] S150 generates an address processing record based on the target network address and broadcasts the address processing record to other nodes in the blockchain.
[0052] In this embodiment, the method for generating an address processing record based on the target network address can be associating the target network address with a device identifier to generate an address processing record. The record includes the device identifier, the allocated IPv6 address, the allocation time, the device type, network environment information, and other information.
[0053] In this embodiment, the generated address processing records are added to the blockchain, and the consistency and immutability of the records are ensured through a consensus mechanism. Specifically, the address processing records are packaged into a transaction and broadcast to the blockchain network for verification and accounting by nodes. When storing address processing records, sensitive information such as device identifiers is anonymized. A hash algorithm is used to hash the device identifier, and only the hash value is stored to protect device privacy.
[0054] Optionally, after broadcasting the address processing record to other nodes in the blockchain, the following steps are also included: if the network address processing request is a network address allocation request, then the state information of the target network address is adjusted to the allocated state; if the network address processing request is a network address update request, then the state information of the first current network address is adjusted to the released state and the state information of the target network address is adjusted to the allocated state.
[0055] The status of a network address includes available status, allocated status, and released status.
[0056] Optionally, the solution in this embodiment further includes the following steps: receiving a network address release request sent by the client; verifying the network address release request using a smart contract; and if the verification passes, adjusting the status information of the second current network address to the released state.
[0057] The network address release request includes a second current network address. The network address release request can be verified using a smart contract by: verifying the legitimacy of the second current network address and whether its current state is allocated; if the second current network address is legitimate and its current state is allocated, the verification passes. After adjusting the state information of the second current network address to a released state, the processing record associated with that address is deleted from the blockchain (the record can also be retained for traceability).
[0058] Based on the above embodiments, the following is the process of address allocation, address update, and address release:
[0059] The address allocation process includes the following steps: (1) The device accesses the network, and the address allocation client collects device information and generates an address request; (2) The client sends the address request to a node in the blockchain network; (3) After receiving the request, the node broadcasts it to the entire blockchain network; (4) After receiving the request, the smart contract performs a legality verification; (5) After the verification is successful, the smart contract obtains an available IPv6 address from the address pool management module; (6) The smart contract generates an address allocation record and adds the record to the blockchain; (7) The smart contract returns the allocation result to the node in the blockchain network; (8) The node forwards the allocation result to the address allocation client; (9) After receiving the allocation result, the client configures the device's network and completes the address allocation.
[0060] The address update process includes the following steps: (1) The device needs to update its IPv6 address, and the address allocation client generates an address update request; (2) The client sends the update request to a node in the blockchain network; (3) The node broadcasts the request to the entire blockchain network; (4) After receiving the request, the smart contract verifies the legality of the device's current address; (5) After successful verification, the smart contract obtains a new IPv6 address from the address pool management module; (6) The smart contract updates the address allocation record on the blockchain; (7) The smart contract returns the update result to the node in the blockchain network; (8) The node forwards the update result to the address allocation client; (9) After receiving the update result, the client reconfigures the device's network and completes the address update.
[0061] The address allocation process includes the following steps: (1) When the device no longer needs the currently allocated IPv6 address, the address allocation client generates an address release request; (2) The client sends the release request to a node in the blockchain network; (3) The node broadcasts the request to the entire blockchain network; (4) After receiving the request, the smart contract verifies the legality and status of the address; (5) After successful verification, the smart contract marks the address as released and updates the record on the blockchain; (6) The smart contract returns the release result to the node in the blockchain network; (7) The node forwards the release result to the address allocation client to complete the address release.
[0062] This embodiment solves the following technical problems: (1) Decentralized address allocation: Decentralized IPv6 address allocation is achieved through blockchain technology, eliminating single points of failure and improving system reliability and fault tolerance. (2) Transparency and traceability: The immutability and transparency of blockchain ensure the openness and transparency of the address allocation process and support the traceability of address allocation history. (3) Enhanced security: Malicious attacks (such as DDoS attacks, address hijacking, etc.) are prevented during the address allocation process through the encryption and consensus mechanism of blockchain, ensuring the security of address allocation. (4) Efficient address management: The address allocation process is automated and optimized through smart contracts, supporting address requests from a large number of devices and improving address allocation efficiency.
[0063] In this embodiment, the blockchain node receives a network address processing request from a client. This request includes either a network address allocation request or a network address update request. A smart contract is used to verify the request. If the verification passes, a target network address is selected from the network address pool. The target network address is then sent to the client, enabling the client to configure its network accordingly. An address processing record is generated based on the target network address and broadcast to other nodes in the blockchain. This blockchain-based network address processing method, utilizing blockchain technology to allocate and update client network addresses, improves both security and efficiency.
[0064] Figure 3 This is a schematic diagram of the structure of a blockchain-based network address processing device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the device includes:
[0065] The network address processing request receiving module 310 is used for blockchain nodes to receive network address processing requests sent by clients; wherein, the network address processing request includes a network address allocation request or a network address update request.
[0066] Verification module 320 is used to verify the network address processing request using a smart contract;
[0067] The target network address selection module 330 is used to select a target network address from the network address pool if the verification is successful.
[0068] The target network address sending module 340 is used to send the target network address to the client so that the client can perform network configuration based on the target network address;
[0069] Address processing record generation module 350 is used to generate address processing records based on the target network address and broadcast the address processing records to other nodes in the blockchain.
[0070] Optionally, both the network address allocation request and the network address update request include device identifier, device type, network environment information, and request time; the network address update request also includes a first current network address.
[0071] Optionally, the verification module 320 is also used for:
[0072] Verify whether the format of the device identifier is valid; or,
[0073] Verify whether the device type is in a preset list of valid types; or,
[0074] Verify whether the requested time is within a valid time range; or,
[0075] The validity of the first current network address is verified based on historical address processing records.
[0076] Optionally, the target network address selection module 330 is also used for:
[0077] The target network address is selected from the network address pool based on any of the following algorithms: random selection algorithm, sequential selection algorithm, or load balancing algorithm.
[0078] Optionally, the address processing record generation module 350 is also used for:
[0079] The target network address is associated with the device identifier to generate an address processing record.
[0080] Optionally, it also includes: a status adjustment module, used for:
[0081] If the network address processing request is a network address allocation request, then the status information of the target network address is adjusted to the allocated status;
[0082] If the network address processing request is a network address update request, then the status information of the first current network address is adjusted to "released" and the status information of the target network address is adjusted to "allocated".
[0083] Optionally, it also includes: an address release module, used for:
[0084] Receive a network address release request sent by the client; wherein the network address release request includes a second current network address;
[0085] The network address release request is verified using a smart contract;
[0086] If the verification passes, the status information of the second current network address will be adjusted to the released state.
[0087] The above-described apparatus can execute the methods provided in all the foregoing embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the above methods. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the present invention.
[0088] Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components, connections and relationships between components, and their functions shown herein are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0089] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0090] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0091] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as blockchain-based network address processing methods.
[0092] In some embodiments, the blockchain-based network address processing method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the blockchain-based network address processing method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the blockchain-based network address processing method by any other suitable means (e.g., by means of firmware).
[0093] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0094] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0095] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0096] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0097] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0098] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0099] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the blockchain-based network address processing method provided in any embodiment of this application.
[0100] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, 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 computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0101] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0102] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for processing a network address based on a blockchain, characterized in that, The method comprises the following steps: A blockchain node receives a network address processing request sent by a client; wherein the network address processing request comprises a network address allocation request or a network address update request; The network address processing request is verified by using a smart contract; If the verification is passed, a target network address is selected from a network address pool; The target network address is sent to the client, so that the client performs network configuration according to the target network address; An address processing record is generated based on the target network address, and the address processing record is broadcasted to other nodes in the blockchain.
2. The method of claim 1, wherein, The network address allocation request and the network address update request both comprise a device identifier, a device type, network environment information and a request time; the network address update request further comprises a first current network address.
3. The method of claim 2, wherein, The network address processing request is verified by using a smart contract, which comprises at least one of the following: The format of the device identifier is verified to be legal; or The device type is verified to be in a preset legal type list; or The request time is verified to be within a valid time range; or Based on historical address processing records, the first current network address is verified to be valid.
4. The method of claim 1, wherein, The target network address is selected from the network address pool, which comprises: The target network address is selected from the network address pool based on any one of the following algorithms: a random selection algorithm, a sequential selection algorithm or a load balancing algorithm.
5. The method of claim 2, wherein, The address processing record is generated based on the target network address, which comprises: The target network address is associated with the device identifier to generate the address processing record.
6. The method of claim 2, wherein, After the address processing record is broadcasted to other nodes in the blockchain, the following steps are further included: If the network address processing request is the network address allocation request, the state information of the target network address is adjusted to an allocated state; If the network address processing request is the network address update request, the state information of the first current network address is adjusted to a released state, and the state information of the target network address is adjusted to an allocated state.
7. The method of claim 1, wherein, Further comprising: A network address release request sent by a client is received; wherein the network address release request comprises a second current network address; The network address release request is verified by using a smart contract; If the verification is passed, the state information of the second current network address is adjusted to a released state. 8.A blockchain-based network address processing apparatus, characterized by comprising: The method comprises the following steps: A network address processing request receiving module is configured to receive a network address processing request sent by a client; wherein the network address processing request comprises a network address allocation request or a network address update request; A verification module is configured to verify the network address processing request by using a smart contract; A target network address selection module is configured to select a target network address from a network address pool if the verification is passed; A target network address sending module is configured to send the target network address to the client, so that the client performs network configuration according to the target network address; An address processing record generation module is configured to generate an address processing record based on the target network address, and broadcast the address processing record to other nodes in the blockchain.
9. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the blockchain-based network address processing method in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing the processor to implement the blockchain-based network address processing method in any one of claims 1-7 when executed.