Blockchain-based user-defined network signing transaction system and interaction method thereof
By enabling electronic contract signing transactions in user-defined networks through blockchain smart contracts, the problems of low transaction efficiency and poor security in user-defined networks are solved, providing a secure and reliable signing process and privacy protection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTH CHINA UNIV OF TECH
- Filing Date
- 2023-03-03
- Publication Date
- 2026-06-12
Smart Images

Figure CN116402605B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of software-defined networks, and in particular to a contract transaction system and its interaction method based on a blockchain-based user-defined network. Background Technology
[0002] With the rapid development of the Internet of Things (IoT) and 5G networks, the traditional pricing model based on service packages is no longer sufficient to meet the diverse and personalized needs of users. How to granularize services has become a crucial issue that major internet operators must address. The "5G Deterministic Networking Industry White Paper" defines for the first time a 3D (Differentiated, Dedicated, and DIY) model of 5G deterministic network capabilities. Differentiated services represent a key demand for digitalization across different industries. For example, typical 5G applications like the Industrial Internet require networks supporting massive device connections and frequent small packet transmissions for mobile communications, smart homes, and environmental monitoring smart metering. Live streaming, video backhaul, and mobile healthcare place higher demands on transmission speeds. Vehicle-to-everything (V2X), smart grids, and industrial control require millisecond-level latency and near 100% reliability. Dedicated services provide firewalls for data security and privacy. DIY networks (Do It Yourself) are an indispensable part of industry innovation, as industry users desire customized, on-demand network design and customization.
[0003] SDN (Software Defined Networking) provides a feasible underlying technology to solve the above problems. SDN separates the network control plane and the data forwarding plane, greatly simplifying network configuration and management. From the perspective of network devices, the control plane controls the routing decisions for network traffic, while the data forwarding plane forwards network traffic based on the routing decisions made by the control plane. Traditional routers span Layer 2 and Layer 3, performing both routing decisions and data forwarding functions. In an SDN environment, there are no routers but only switches. Switches are only responsible for forwarding traffic, while routing decisions are handled by the SDN controller. Secondly, SDN provides a centralized, highly scalable controller that supports fine-grained traffic control. Because the controller has a global view and is responsible for the routing decisions of all switches in the network, it is more suitable for traffic control. Thirdly, SDN provides network administrators with flexible programmable interfaces.
[0004] To address the issues mentioned at the beginning, our lab has proposed a novel network framework called User-Defined Networking (UDN) based on SDN. UDN consists of a network resource awareness module, a request initiation module, and a network resource allocation module. In UDN, users can request different network resources from ISPs according to their personalized needs. Our lab has verified the feasibility of UDN based on the open-source SDN controller RYU and the Mininet network simulation platform. Considering that UDN will bring frequent business requests and a large number of transactions, it poses a serious challenge to the traditional offline transaction model of ISPs (Internet Service Providers), consuming a great deal of human and material resources. At the same time, UDN allows users to participate in network deployment and selection, exposing the controller to users, which also brings some network security issues. Therefore, this invention will combine blockchain technology to tailor a transaction system model for UDN. A blockchain is a chain composed of blocks. Each block stores certain information, and they are linked together in the order of their creation. To modify information in a blockchain, the consent of more than half of the nodes must be obtained, and the information on all nodes must be modified. These nodes are typically controlled by different entities, making tampering with information in the blockchain extremely difficult. Compared to traditional networks, blockchain has two core characteristics: data is difficult to tamper with, and it is decentralized. Furthermore, with the development of blockchain technology, smart contract technology has emerged in platforms like Qtum, Ethereum, and Zen. A smart contract is code published on the blockchain that executes according to specific logic. Once published, it cannot be tampered with. While smart contracts cannot directly interact with the external environment like traditional client / server architectures, they can release event signals. These signals are recorded in the blockchain log. External users with specific needs can listen for these signals and call the appropriate functions on the smart contract to achieve interactive functionality. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings and deficiencies of the prior art and propose a contract transaction system and its interaction method based on a user-defined network of blockchain. It introduces the openness, traceability, non-repudiation and immutability of blockchain, and realizes resource reservation, deposit and final payment, and security authentication in the process of electronic contract signing. The contract is traceable and irrefutable, and it does not require the transmission of the specific content of the electronic contract through the Internet. Instead, the contract is generated locally by the user and the ISP, which prevents the leakage of contract data.
[0006] To achieve the above objectives, the technical solution provided by this invention is: a contract signing and transaction system based on a blockchain-defined network. This system, by combining blockchain technology, enables resource reservation, deposit and final payment, and security authentication during the electronic contract signing process, without requiring the transmission of the specific content of the electronic contract over a network. It includes the following functional modules:
[0007] The resource reservation module is used to allow users to forward reservation requests and pay a deposit through a blockchain smart contract before the contract between the user and the ISP begins. The blockchain smart contract then issues a reservation event, and after the ISP hears the reservation event, it will notify the user to define the network reserved resources.
[0008] The contract signing and final payment module is used to notify the ISP after the user successfully reserves resources in the network. The ISP will then generate an electronic contract based on the parameters carried by the user during the contract signing process. The contract will specify the signing user and the final payment that the user should pay through the blockchain smart contract. If the user still has the intention to sign, he / she will respond to the ISP's contract signing request, confirm the contract signing on the blockchain smart contract, and temporarily store the final payment required for resource allocation in the blockchain smart contract.
[0009] The resource allocation module is used to notify the ISP after the blockchain smart contract confirms that the user has completed the signing. The ISP then requests the user to define the network and allocate the corresponding network resources. After that, the ISP transmits the resource allocation result to the user through the blockchain smart contract.
[0010] The test confirmation module is used when a user receives a message about the resource allocation result. If the ISP has completed the resource allocation, the network test function is started to test whether the currently allocated resources meet expectations. If they meet expectations, a confirmation is sent to the blockchain smart contract. After receiving the confirmation message, the blockchain smart contract transfers the amount previously stored in the blockchain smart contract to the ISP.
[0011] Specifically, the user-defined network refers to a network architecture based on software-defined networking technology. In a user-defined network, users can request different network resources from ISPs according to their personalized needs. ISPs publish smart contracts that record user defaults, user contract IDs, bandwidth reservations, electronic contract authentication and signing, user stored amounts, and transfer functions on the blockchain to obtain blockchain smart contracts.
[0012] Specifically, the resource reservation module includes a smart contract bandwidth reservation module, a user reservation module, and an ISP reservation processing module;
[0013] The smart contract bandwidth reservation module has the following functions: a) providing the user reservation module with information on the number of user violations (n), the user's contract identifier (UId), and the Unix time (TU); b) verifying the deposit amount after receiving the bandwidth reservation request from the user reservation module. If correct, it sends a reservation event to the ISP's reservation module; otherwise, it terminates the reservation process; c) updating the UID so that the UID is different for each transaction.
[0014] The user reservation module calculates the deposit R to be paid based on the user violation count information n obtained by the smart contract reservation bandwidth module, and sends a reservation request to the blockchain smart contract along with the deposit R.
[0015] The ISP processing reservation module is used by the ISP to request reserved resources from the user's defined network based on the user's reservation parameters in the event after receiving a user reservation event from the smart contract reservation bandwidth module.
[0016] Specifically, the resource reservation module performs the following operations:
[0017] S1. When a user has bandwidth requirements, they first request n, UId, and TU from the bandwidth reservation module of the smart contract.
[0018] S2, the smart contract bandwidth reservation module returns n, UId, and TU, and increments the value of UId by 1.
[0019] S3. If n is greater than 7, the user cannot make a reservation and needs to negotiate directly with the ISP. Otherwise, the user reservation module calculates the deposit R to be paid based on n, the requested bandwidth size W, and the bandwidth unit price P, and sends the reservation request to the blockchain smart contract along with the deposit R. The request parameters include the requested bandwidth size W, the bandwidth unit price P, the request path path, the controller code C, the user's blockchain address A, and the UId and TU obtained by the smart contract reservation bandwidth module.
[0020] R is calculated using the following formula (1):
[0021] R = W * P * (2 n / 100), 0≤n≤7(1)
[0022] S4. The smart contract bandwidth reservation module verifies whether the user has paid the deposit in full based on the parameters passed by the user reservation module. If so, it passes the user reservation request to the ISP processing module and temporarily stores the deposit in the current smart contract. Otherwise, it rejects the reservation request from the smart contract bandwidth reservation module and the process ends.
[0023] S5, the ISP reservation module requests reserved resources from the user's defined network based on the contract signing event issued by the smart contract bandwidth reservation module.
[0024] Specifically, the signing and final payment module includes an ISP signing initiation module, a smart contract signing verification module, and a user response signing module;
[0025] After the user-defined network successfully reserves resources, the ISP contract initiation module generates an electronic contract according to the user's request, hashes the electronic contract, digitally signs it using the private key in the ISP's public and private keys, and sends it to the smart contract signing verification module for verification. The request specifies the user who signed the electronic contract and the final payment that the user should pay.
[0026] The smart contract signing verification module performs the following functions: a) Verifies the digital signature sent by the ISP signing initiation module. If the digital signature passes verification, it records the final payment that the user who signed the electronic contract should pay and sends a signing event to the designated user; b) Verifies the digital signature sent by the user response signing module. If the user's digital signature passes verification, it determines whether the user has paid the full final payment. If so, it stores the electronic contract signing information in the current blockchain smart contract and sends a signing completion event to the resource allocation module. Otherwise, it considers that the user has abandoned the signing, increments the user's violation count information n by 1, and transfers the deposit temporarily stored in the blockchain smart contract to the ISP, ending the signing process.
[0027] After receiving the signing event from the smart contract signing verification module, the user response signing module generates an electronic contract based on the parameters carried in the user reservation module's reservation request, hashes the electronic contract, digitally signs it using the private key from the user's public and private keys, and sends it to the smart contract signing verification module for verification, while also including the final payment due in the request.
[0028] Specifically, the resource allocation module includes an ISP response contract module, a smart contract resource allocation confirmation module, and a user resource allocation confirmation module;
[0029] After receiving the signing completion event from the smart contract signing verification module, the ISP response signing module requests resource allocation from the user-defined network, waits for the user-defined network to return a resource allocation message, and then passes the message to the smart contract resource allocation confirmation module.
[0030] After receiving the resource allocation message from the ISP response signing module, the smart contract resource allocation confirmation module checks whether the resources requested by the user have been successfully allocated. If so, it sends a resource allocation success event to the user resource allocation confirmation module; otherwise, it returns the deposit and final payment previously paid by the user to the user and sends a resource allocation failure event to the user resource allocation confirmation module.
[0031] If the user resource allocation confirmation module receives a resource allocation failure event from the smart contract resource allocation confirmation module, the process ends; if it receives a resource allocation success event, the resource testing function is started.
[0032] Specifically, the test confirmation module includes a user test module, a smart contract test confirmation module, and an ISP resource reallocation module;
[0033] The user testing module allows users to perform bandwidth resource tests using the network testing tool iperf and transmits the test results to the smart contract test confirmation module.
[0034] If the smart contract test confirmation module receives a test result from the user test module indicating that the test has passed, it will transfer the deposit and final payment paid by the user to the ISP together, and the process will end. If it receives a test result from the user test module indicating that the test has failed, it will send a test failure event to the ISP resource reallocation module.
[0035] After receiving a test failure event from the smart contract test confirmation module, the ISP resource reallocation module requests resource allocation from the user-defined network and passes the result to the smart contract resource allocation confirmation module.
[0036] This invention also provides an interaction method for the aforementioned blockchain-based user-defined network-based contract transaction system, including the following:
[0037] S1. When a user has bandwidth requirements, first request the customer's violation count information n, user's subscription identifier UID, and Unix time TU from the blockchain smart contract;
[0038] S2. The user calculates the percentage of the total amount that the deposit R needs to pay based on n, and forwards the reservation request through a blockchain smart contract. The deposit R will be attached to the request.
[0039] S3. The blockchain smart contract verifies the deposit of the user who reserved the resource. If the verification is successful, a reservation event is sent to the ISP. If the verification fails, the entire transaction is rolled back and the signing process ends. At the end of this process, the UID of the user who initiated the reservation will be incremented by 1.
[0040] S4. When the ISP hears the reservation event from the blockchain smart contract, it obtains the user's requested bandwidth size W, request path path, and controller code C based on the parameters carried in the event. Then, it sends a bandwidth reservation request to the user-defined network. The user-defined network will return information indicating whether the bandwidth reservation was successful or not. If the bandwidth reservation is successful, a corresponding electronic contract is generated. After hashing the electronic contract, it is digitally signed using the private key in the ISP's public and private keys. At the same time, the remaining balance that the user still needs to pay is calculated. Then, the digital signature and the amount of the remaining balance that the user should pay are sent to the blockchain smart contract to initiate a contract with the user who reserved the resources.
[0041] S5. When the blockchain smart contract receives a signing request from the ISP, it verifies the ISP's identity and the electronic contract. If the verification is successful, it sends a signing event to the user designated to sign the electronic contract and records the final payment that the user should pay.
[0042] S6. When a user hears a signing event transmitted by a blockchain smart contract, the user also generates their own electronic contract, hashes the electronic contract and generates a digital signature using the private key in the user's public and private keys, sends it to the blockchain smart contract to sign the contract, and carries the final payment due in the request.
[0043] S7. The blockchain smart contract verifies the digital signature sent by the user. If the user's digital signature passes the verification, it determines whether the user has paid the full balance. If so, the electronic contract signing information is stored in the current blockchain smart contract, and a signing completion event is sent to the ISP. Otherwise, it is considered that the user has abandoned the signing, the user's violation count information n is incremented by 1, and the deposit temporarily stored in the blockchain smart contract is transferred to the ISP, ending the signing process.
[0044] After S8 and ISP detect the signing completion event sent by the blockchain smart contract, they request resource allocation from the user-defined network, wait for the user-defined network to return the resource allocation message, and then pass the message to the blockchain smart contract.
[0045] S9. After receiving the resource allocation message from the ISP, the blockchain smart contract checks whether the resources requested by the user have been successfully allocated. If so, it sends a resource allocation success event to the user; otherwise, it returns the deposit and final payment previously paid by the user and sends a resource allocation failure event to the user.
[0046] S10. If the user receives a resource allocation failure event from the blockchain smart contract, the process ends; if a resource allocation success event is received, the resource testing function is started. The user performs bandwidth resource testing through the network testing tool iperf and transmits the test results to the blockchain smart contract.
[0047] S11. The blockchain smart contract receives the user's test results. If the test result is a pass, the deposit and final payment paid by the user will be transferred to the ISP together, and the process ends. If the test fails, a test failure event will be sent to the ISP.
[0048] S12. After the ISP detects that the blockchain smart contract has failed the test, it redefines the network request for resource allocation from the user and passes the result to the blockchain smart contract, and re-executes S9.
[0049] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0050] 1. The system of this invention provides a feasible solution to the problem of a large number of contract transactions brought about by user-defined networks, and increases the feasibility of implementing user-defined networks.
[0051] 2. Utilizing blockchain smart contracts for electronic contract signing requires both ISPs and users to generate their own individual electronic contracts based on their demand data. These contracts are then signed using their private keys and published to the blockchain platform's smart contract. The smart contract verifies identity; a match between the contract hash codes confirms that both parties have generated identical electronic contracts and grants confirmation. This ensures the contract content remains confidential online, protecting the privacy of both ISPs and users, and preventing the forgery of official seals by ISPs. Compared to traditional methods where one party generates an electronic contract and sends it to the other, who then digitally signs and returns it, this invention requires both parties to confirm on the blockchain's smart contract. This reduces the possibility of errors during contract generation and transmission, while ensuring that both parties are authorized signatories, possessing their private keys, further enhancing the credibility of the contract. Furthermore, blockchain records every transaction during the signing process, making it impossible for either party to deny the signing.
[0052] 3. Leveraging the decentralized nature of blockchain, users cannot directly interact with the user-defined network controller. Instead, they use blockchain as an intermediary to transmit request information to the ISP, which then sends control information to the user-defined network controller. This effectively adds an isolation layer between the user and the user-defined network controller, reducing the risk of attacks on the user-defined network controller.
[0053] 4. Users need to pay a deposit and a final payment. The cost of attacking malicious users will increase with the number of attacks. Rational attackers cannot benefit, thus ensuring the security of the user-defined network system.
[0054] 5. The deposit payment and final payment are completed during the electronic contract signing process, rather than a single signing process, saving manpower and time. Attached Figure Description
[0055] Figure 1 This is a diagram illustrating the interactive scenario of the system of this invention.
[0056] Figure 2 This is a schematic diagram of the module relationships of the system of the present invention.
[0057] Figure 3 A flowchart illustrating the process of electronic contract signing between users and ISPs. Detailed Implementation
[0058] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0059] like Figures 1 to 3 As shown, this embodiment discloses a contract signing and transaction system based on a blockchain-defined network (BDN). The BDN refers to a network architecture implemented using software-defined networking (SDN) technology. In a BDN, users can request different network resources from an ISP based on their personalized needs. The ISP publishes a smart contract on the blockchain, which records user defaults, user contract IDs, bandwidth reservations, electronic contract authentication and signing, user stored funds, and transfer functions, resulting in a blockchain smart contract. This contract signing and transaction system, by combining blockchain technology, enables resource reservation, deposit and final payment, and security authentication during the electronic contract signing process, without requiring the transmission of the specific content of the electronic contract over the network. It includes the following functional modules:
[0060] The resource reservation module is used to allow users to forward reservation requests and pay a deposit through a blockchain smart contract before the contract between the user and the ISP begins. The blockchain smart contract then issues a reservation event, and after the ISP hears the reservation event, it will notify the user to define the network reserved resources.
[0061] The contract signing and final payment module is used to notify the ISP after the user successfully reserves resources in the network. The ISP will then generate an electronic contract based on the parameters carried by the user during the contract signing process. The contract will specify the signing user and the final payment that the user should pay through the blockchain smart contract. If the user still has the intention to sign, he / she will respond to the ISP's contract signing request, confirm the contract signing on the blockchain smart contract, and temporarily store the final payment required for resource allocation in the blockchain smart contract.
[0062] The resource allocation module is used to notify the ISP after the blockchain smart contract confirms that the user has completed the signing. The ISP then requests the user to define the network and allocate the corresponding network resources. After that, the ISP transmits the resource allocation result to the user through the blockchain smart contract.
[0063] The test confirmation module is used when a user receives a message about the resource allocation result. If the ISP has completed the resource allocation, the network test function is started to test whether the currently allocated resources meet expectations. If they meet expectations, a confirmation is sent to the blockchain smart contract. After receiving the confirmation message, the blockchain smart contract transfers the amount previously stored in the blockchain smart contract to the ISP.
[0064] Specifically, the resource reservation module includes a smart contract bandwidth reservation module, a user reservation module, and an ISP reservation processing module;
[0065] The smart contract bandwidth reservation module has the following functions: a) providing the user reservation module with information on the number of user violations (n), the user's contract identifier (UId), and the Unix time (TU); b) verifying the deposit amount after receiving the bandwidth reservation request from the user reservation module. If correct, it sends a reservation event to the ISP's reservation module; otherwise, it terminates the reservation process; c) updating the UID so that the UID is different for each transaction.
[0066] The user reservation module calculates the deposit R to be paid based on the user violation count information n obtained by the smart contract reservation bandwidth module, and sends a reservation request to the blockchain smart contract along with the deposit R.
[0067] The ISP processing reservation module is used by the ISP to request reserved resources from the user's defined network based on the user's reservation parameters in the event after receiving a user reservation event from the smart contract reservation bandwidth module.
[0068] Specifically, the resource reservation module performs the following operations:
[0069] S1. When a user has bandwidth requirements, they first request n, UId, and TU from the bandwidth reservation module of the smart contract.
[0070] S2, the smart contract bandwidth reservation module returns n, UId, and TU, and increments the value of UId by 1.
[0071] S3. If n is greater than 7, the user cannot make a reservation and needs to negotiate directly with the ISP. Otherwise, the user reservation module calculates the deposit R to be paid based on n, the requested bandwidth size W, and the bandwidth unit price P, and sends the reservation request to the blockchain smart contract along with the deposit R. The request parameters include the requested bandwidth size W, the bandwidth unit price P, the request path path, the controller code C, the user's blockchain address A, and the UId and TU obtained by the smart contract reservation bandwidth module.
[0072] R is calculated using the following formula (1):
[0073] R = W * P * (2 n / 100), 0≤n≤7(1)
[0074] S4. The smart contract bandwidth reservation module verifies whether the user has paid the deposit in full based on the parameters passed by the user reservation module. If so, it passes the user reservation request to the ISP processing module and temporarily stores the deposit in the current smart contract. Otherwise, it rejects the reservation request from the smart contract bandwidth reservation module and the process ends.
[0075] S5, the ISP reservation module requests reserved resources from the user's defined network based on the contract signing event issued by the smart contract bandwidth reservation module.
[0076] Specifically, the signing and final payment module includes an ISP signing initiation module, a smart contract signing verification module, and a user response signing module;
[0077] After the user-defined network successfully reserves resources, the ISP contract initiation module generates an electronic contract according to the user's request, hashes the electronic contract, digitally signs it using the private key in the ISP's public and private keys, and sends it to the smart contract signing verification module for verification. The request specifies the user who signed the electronic contract and the final payment that the user should pay.
[0078] The smart contract signing verification module performs the following functions: a) Verifies the digital signature sent by the ISP signing initiation module. If the digital signature passes verification, it records the final payment that the user who signed the electronic contract should pay and sends a signing event to the designated user; b) Verifies the digital signature sent by the user response signing module. If the user's digital signature passes verification, it determines whether the user has paid the full final payment. If so, it stores the electronic contract signing information in the current blockchain smart contract and sends a signing completion event to the resource allocation module. Otherwise, it considers that the user has abandoned the signing, increments the user's violation count information n by 1, and transfers the deposit temporarily stored in the blockchain smart contract to the ISP, ending the signing process.
[0079] After receiving the signing event from the smart contract signing verification module, the user response signing module generates an electronic contract based on the parameters carried in the user reservation module's reservation request, hashes the electronic contract, digitally signs it using the private key from the user's public and private keys, and sends it to the smart contract signing verification module for verification, while also including the final payment due in the request.
[0080] Specifically, the resource allocation module includes an ISP response contract module, a smart contract resource allocation confirmation module, and a user resource allocation confirmation module;
[0081] After receiving the signing completion event from the smart contract signing verification module, the ISP response signing module requests resource allocation from the user-defined network, waits for the user-defined network to return a resource allocation message, and then passes the message to the smart contract resource allocation confirmation module.
[0082] After receiving the resource allocation message from the ISP response signing module, the smart contract resource allocation confirmation module checks whether the resources requested by the user have been successfully allocated. If so, it sends a resource allocation success event to the user resource allocation confirmation module; otherwise, it returns the deposit and final payment previously paid by the user to the user and sends a resource allocation failure event to the user resource allocation confirmation module.
[0083] If the user resource allocation confirmation module receives a resource allocation failure event from the smart contract resource allocation confirmation module, the process ends; if it receives a resource allocation success event, the resource testing function is started.
[0084] Specifically, the test confirmation module includes a user test module, a smart contract test confirmation module, and an ISP resource reallocation module;
[0085] The user testing module allows users to perform bandwidth resource tests using the network testing tool iperf and transmits the test results to the smart contract test confirmation module.
[0086] If the smart contract test confirmation module receives a test result from the user test module indicating that the test has passed, it will transfer the deposit and final payment paid by the user to the ISP together, and the process will end. If it receives a test result from the user test module indicating that the test has failed, it will send a test failure event to the ISP resource reallocation module.
[0087] After receiving a test failure event from the smart contract test confirmation module, the ISP resource reallocation module requests resource allocation from the user-defined network and passes the result to the smart contract resource allocation confirmation module.
[0088] The interaction flow between the user, blockchain, ISP, and user-defined network in the aforementioned blockchain-based user-defined network contract transaction system in this embodiment is as follows:
[0089] S1. When a user has bandwidth requirements, first request the customer's violation count information n, user's subscription identifier UID, and Unix time TU from the blockchain smart contract;
[0090] S2. The user calculates the percentage of the total amount that the deposit R needs to pay based on n, and forwards the reservation request through a blockchain smart contract. The deposit R will be attached to the request.
[0091] S3. The blockchain smart contract verifies the deposit of the user who reserved the resource. If the verification is successful, a reservation event is sent to the ISP. If the verification fails, the entire transaction is rolled back and the signing process ends. At the end of this process, the UID of the user who initiated the reservation will be incremented by 1.
[0092] S4. When the ISP hears the reservation event from the blockchain smart contract, it obtains the user's requested bandwidth size W, request path path, and controller code C based on the parameters carried in the event. Then, it sends a bandwidth reservation request to the user-defined network. The user-defined network will return information indicating whether the bandwidth reservation was successful or not. If the bandwidth reservation is successful, a corresponding electronic contract is generated. After hashing the electronic contract, it is digitally signed using the private key in the ISP's public and private keys. At the same time, the remaining balance that the user still needs to pay is calculated. Then, the digital signature and the amount of the remaining balance that the user should pay are sent to the blockchain smart contract to initiate a contract with the user who reserved the resources.
[0093] S5. When the blockchain smart contract receives a signing request from the ISP, it verifies the ISP's identity and the electronic contract. If the verification is successful, it sends a signing event to the user designated to sign the electronic contract and records the final payment that the user should pay.
[0094] S6. When a user hears a signing event transmitted by a blockchain smart contract, the user also generates their own electronic contract, hashes the electronic contract and generates a digital signature using the private key in the user's public and private keys, sends it to the blockchain smart contract to sign the contract, and carries the final payment due in the request.
[0095] S7. The blockchain smart contract verifies the digital signature sent by the user. If the user's digital signature passes the verification, it determines whether the user has paid the full balance. If so, the electronic contract signing information is stored in the current blockchain smart contract, and a signing completion event is sent to the ISP. Otherwise, it is considered that the user has abandoned the signing, the user's violation count information n is incremented by 1, and the deposit temporarily stored in the blockchain smart contract is transferred to the ISP, ending the signing process.
[0096] After S8 and ISP detect the signing completion event sent by the blockchain smart contract, they request resource allocation from the user-defined network, wait for the user-defined network to return the resource allocation message, and then pass the message to the blockchain smart contract.
[0097] S9. After receiving the resource allocation message from the ISP, the blockchain smart contract checks whether the resources requested by the user have been successfully allocated. If so, it sends a resource allocation success event to the user; otherwise, it returns the deposit and final payment previously paid by the user and sends a resource allocation failure event to the user.
[0098] S10. If the user receives a resource allocation failure event from the blockchain smart contract, the process ends; if a resource allocation success event is received, the resource testing function is started. The user performs bandwidth resource testing through the network testing tool iperf and transmits the test results to the blockchain smart contract.
[0099] S11. The blockchain smart contract receives the user's test results. If the test result is a pass, the deposit and final payment paid by the user will be transferred to the ISP together, and the process ends. If the test fails, a test failure event will be sent to the ISP.
[0100] S12. After the ISP detects that the blockchain smart contract has failed the test, it redefines the network request for resource allocation from the user and passes the result to the blockchain smart contract, and re-executes S9.
[0101] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A signing transaction system for a user-defined network based on a blockchain, characterized in that: This contract signing system, by incorporating blockchain technology, enables resource reservation, deposit and final payment, and security authentication during the electronic signing process, without requiring the transmission of the electronic contract's content over the network. It includes the following functional modules: The resource reservation module is used to allow users to forward reservation requests and pay a deposit through a blockchain smart contract before the contract between the user and the ISP begins. The blockchain smart contract then issues a reservation event, and after the ISP hears the reservation event, it will notify the user to define the network reserved resources. The contract signing and final payment module is used to notify the ISP after the user successfully reserves resources in the network. The ISP will then generate an electronic contract based on the parameters carried by the user during the contract signing process. The contract will specify the signing user and the final payment that the user should pay through the blockchain smart contract. If the user still has the intention to sign, he / she will respond to the ISP's contract signing request, confirm the contract signing on the blockchain smart contract, and temporarily store the final payment required for resource allocation in the blockchain smart contract. The resource allocation module is used to notify the ISP after the blockchain smart contract confirms that the user has completed the signing. The ISP then requests the user to define the network and allocate the corresponding network resources. After that, the ISP transmits the resource allocation result to the user through the blockchain smart contract. The test confirmation module is used when a user receives a message about the resource allocation result. If the ISP has completed the resource allocation, the network test function is started to test whether the currently allocated resources meet expectations. If they meet expectations, a confirmation is sent to the blockchain smart contract. After receiving the confirmation message, the blockchain smart contract transfers the amount previously stored in the blockchain smart contract to the ISP. The user-defined network refers to a network architecture based on software-defined networking technology. In a user-defined network, users can request different network resources from ISPs according to their personalized needs. ISPs publish smart contracts that record user violations, user contract IDs, bandwidth reservations, electronic contract authentication and signing, user stored amounts, and transfer functions on the blockchain to obtain blockchain smart contracts. The resource reservation module includes a smart contract bandwidth reservation module, a user reservation module, and an ISP reservation processing module. The smart contract bandwidth reservation module has the following functions: a) providing the user reservation module with information on the number of user violations (n), the user's contract identifier (UId), and the Unix time (TU); b) after receiving the bandwidth reservation request from the user reservation module, verifying whether the deposit amount is correct. If correct, sending a reservation event to the ISP's reservation module; otherwise, ending the reservation process. c. Update the UID so that the UID is different for each transaction; The user reservation module calculates the deposit R to be paid based on the user violation count information n obtained by the smart contract reservation bandwidth module, and sends a reservation request to the blockchain smart contract along with the deposit R. The ISP processing reservation module is used by the ISP to request reserved resources from the user's defined network based on the user's reservation parameters in the event after receiving a user reservation event from the smart contract reservation bandwidth module.
2. The blockchain-based user-defined network contract transaction system according to claim 1, characterized in that, The resource reservation module specifically performs the following operations: When a user has bandwidth requirements, they first request n, UId, and TU from the bandwidth reservation module of the smart contract. The smart contract bandwidth reservation module returns n, UId, and TU, and increments the value of UId by 1. If n is greater than 7, the user cannot make a reservation and needs to negotiate directly with the ISP. Otherwise, the user reservation module calculates the deposit R to be paid based on n, the requested bandwidth size W, and the bandwidth unit price P, and sends a reservation request to the blockchain smart contract along with the deposit R. The request parameters include the requested bandwidth size W, the bandwidth unit price P, the request path path, the controller code C, the user's blockchain address A, and the UId and TU obtained by the smart contract reservation bandwidth module. R is calculated using the following formula (1): ; The smart contract bandwidth reservation module verifies whether the user has paid the deposit in full based on the parameters passed by the user reservation module. If so, it passes the user reservation request to the ISP processing module and temporarily stores the deposit in the current smart contract. Otherwise, it rejects the reservation request from the smart contract bandwidth reservation module and the process ends. The ISP's reservation module requests network resources from the user based on the reservation event issued by the smart contract's bandwidth reservation module.
3. The blockchain-based user-defined network contract transaction system according to claim 2, characterized in that, The signing and final payment module includes an ISP signing initiation module, a smart contract signing verification module, and a user response signing module. After the user-defined network successfully reserves resources, the ISP contract initiation module generates an electronic contract according to the user's request, hashes the electronic contract, digitally signs it using the private key in the ISP's public and private keys, and sends it to the smart contract signing verification module for verification. The request specifies the user who signed the electronic contract and the final payment that the user should pay. The smart contract signing verification module performs the following functions: a) Verifies the digital signature sent by the ISP signing initiation module. If the digital signature passes verification, it records the final payment that the user who signed the electronic contract should pay and sends a signing event to the designated user; b) Verifies the digital signature sent by the user response signing module. If the user's digital signature passes verification, it determines whether the user has paid the full final payment. If so, it stores the electronic contract signing information in the current blockchain smart contract and sends a signing completion event to the resource allocation module. Otherwise, it considers that the user has abandoned the signing, increments the user's violation count information n by 1, and transfers the deposit temporarily stored in the blockchain smart contract to the ISP, ending the signing process. After receiving the signing event from the smart contract signing verification module, the user response signing module generates an electronic contract based on the parameters carried in the user reservation module's reservation request, hashes the electronic contract, digitally signs it using the private key from the user's public and private keys, and sends it to the smart contract signing verification module for verification, while also including the final payment due in the request.
4. The blockchain-based user-defined network contract transaction system according to claim 3, characterized in that, The resource allocation module includes an ISP response signing module, a smart contract resource allocation confirmation module, and a user resource allocation confirmation module. After receiving the signing completion event from the smart contract signing verification module, the ISP response signing module requests resource allocation from the user-defined network, waits for the user-defined network to return a resource allocation message, and then passes the message to the smart contract resource allocation confirmation module. After receiving the resource allocation message from the ISP response signing module, the smart contract resource allocation confirmation module checks whether the resources requested by the user have been successfully allocated. If so, it sends a resource allocation success event to the user resource allocation confirmation module; otherwise, it returns the deposit and final payment previously paid by the user to the user and sends a resource allocation failure event to the user resource allocation confirmation module. If the user resource allocation confirmation module receives a resource allocation failure event from the smart contract resource allocation confirmation module, the process ends; if it receives a resource allocation success event, the resource testing function is started.
5. The blockchain-based user-defined network contract transaction system according to claim 4, characterized in that, The test confirmation module includes a user test module, a smart contract test confirmation module, and an ISP resource reallocation module. The user testing module allows users to perform bandwidth resource tests using the network testing tool iperf and transmits the test results to the smart contract test confirmation module. If the smart contract test confirmation module receives a test result from the user test module indicating that the test has passed, it will transfer the deposit and final payment paid by the user to the ISP together, and the process will end. If it receives a test result from the user test module indicating that the test has failed, it will send a test failure event to the ISP resource reallocation module. After receiving a test failure event from the smart contract test confirmation module, the ISP resource reallocation module requests resource allocation from the user-defined network and passes the result to the smart contract resource allocation confirmation module.
6. The interaction method of the blockchain-based user-defined network contract transaction system according to any one of claims 1-5, characterized in that, Includes the following: S1. When a user has bandwidth requirements, first request the customer's violation count information n, user's subscription identifier UID, and Unix time TU from the blockchain smart contract; S2. The user calculates the percentage of the total amount that the deposit R needs to pay based on n, and forwards the reservation request through a blockchain smart contract. The deposit R will be attached to the request. S3. The blockchain smart contract verifies the deposit of the user who reserved the resource. If the verification is successful, a reservation event is sent to the ISP. If the verification fails, the entire transaction is rolled back and the signing process ends. At the end of this process, the UID of the user who initiated the reservation will be incremented by 1. S4. When the ISP hears the reservation event from the blockchain smart contract, it obtains the user's requested bandwidth size W, request path path, and controller code C based on the parameters carried in the event. Then, it sends a bandwidth reservation request to the user-defined network. The user-defined network will return information indicating whether the bandwidth reservation was successful or not. If the bandwidth reservation is successful, a corresponding electronic contract is generated. After hashing the electronic contract, it is digitally signed using the private key in the ISP's public and private keys. At the same time, the remaining balance that the user still needs to pay is calculated. Then, the digital signature and the amount of the remaining balance that the user should pay are sent to the blockchain smart contract to initiate a contract with the user who reserved the resources. S5. When the blockchain smart contract receives a signing request from the ISP, it verifies the ISP's identity and the electronic contract. If the verification is successful, it sends a signing event to the user designated to sign the electronic contract and records the final payment that the user should pay. S6. When a user hears a signing event transmitted by a blockchain smart contract, the user also generates their own electronic contract, hashes the electronic contract and generates a digital signature using the private key in the user's public and private keys, sends it to the blockchain smart contract to sign the contract, and carries the final payment due in the request. S7. The blockchain smart contract verifies the digital signature sent by the user. If the user's digital signature passes the verification, it determines whether the user has paid the full balance. If so, the electronic contract signing information is stored in the current blockchain smart contract, and a signing completion event is sent to the ISP. Otherwise, it is considered that the user has abandoned the signing, the user's violation count information n is incremented by 1, and the deposit temporarily stored in the blockchain smart contract is transferred to the ISP, ending the signing process. After S8 and ISP detect the signing completion event sent by the blockchain smart contract, they request resource allocation from the user-defined network, wait for the user-defined network to return the resource allocation message, and then pass the message to the blockchain smart contract. S9. After receiving the resource allocation message from the ISP, the blockchain smart contract checks whether the resources requested by the user have been successfully allocated. If so, it sends a resource allocation success event to the user; otherwise, it returns the deposit and final payment previously paid by the user and sends a resource allocation failure event to the user. S10. If the user receives a resource allocation failure event from the blockchain smart contract, the process ends. If a successful resource allocation event is received, the resource testing function is activated. Users use the network testing tool iperf to test bandwidth resources and pass the test results to the blockchain smart contract. S11. The blockchain smart contract receives the user's test results. If the test result is a pass, the deposit and final payment paid by the user will be transferred to the ISP together, and the process ends. If the test fails, a test failure event will be sent to the ISP. S12. After the ISP detects that the blockchain smart contract has failed the test, it redefines the network request for resource allocation from the user and passes the result to the blockchain smart contract, and re-executes S9.