CN116319721B - Intelligent contract method, device and system based on Web3.0 application - Google Patents

Intelligent contract method, device and system based on Web3.0 application Download PDF

Info

Publication number
CN116319721B
CN116319721B CN202310533029.5A CN202310533029A CN116319721B CN 116319721 B CN116319721 B CN 116319721B CN 202310533029 A CN202310533029 A CN 202310533029A CN 116319721 B CN116319721 B CN 116319721B
Authority
CN
China
Prior art keywords
intelligent contract
contract
intelligent
request
programmable switch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310533029.5A
Other languages
Chinese (zh)
Other versions
CN116319721A (en
Inventor
刘春涨
黄宗慧
闵丛丛
赵东成
卢华
邓永平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Communications and Networks Institute
Original Assignee
Guangdong Communications and Networks Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Communications and Networks Institute filed Critical Guangdong Communications and Networks Institute
Priority to CN202310533029.5A priority Critical patent/CN116319721B/en
Publication of CN116319721A publication Critical patent/CN116319721A/en
Application granted granted Critical
Publication of CN116319721B publication Critical patent/CN116319721B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
    • G06Q20/367Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The application discloses an intelligent contract method, device and system based on Web3.0 application, wherein the method comprises the following steps: presetting an intelligent contract; monitoring whether an intelligent contract initiating request is received, and triggering a cost calculating event when the intelligent contract initiating request is received; executing the smart contract is performed when the executing smart contract instruction is acquired. The method and the system provide a path for data transmission through the programmable switch, provide services for Web3.0 application by using blockchain identities, and realize value transmission of the programmable switch by taking intelligent contract scene floor as an example. The time of the application of the Web3.0 on the information island is reduced to a certain extent, and compared with the existing switch, the programmable switch provided with the digital wallet container module has the advantages that the application service of the Web3.0 is better supported, and the service of the application of the Web3.0 can be flexibly supported only by corresponding contract development and intelligent contract signing configuration.

Description

Intelligent contract method, device and system based on Web3.0 application
Technical Field
The application relates to the technical field of communication, in particular to an intelligent contract method, device and system based on Web3.0 application.
Background
With the rapid complexity of upper layer business and economic development, the IP protocol is more and more difficult to meet the requirements of diversified scenes on network service quality. Existing switch devices can support TCP/IP protocol stacks and are developed according to four-layer protocols, but some applications need to specify paths and parameters of data transmission, switches without blockchain identities cannot serve these applications, and web3.0 applications are easily limited by the partitions of physical networks. Thus, it is difficult for the switch device to support the landscape of web3.0 applications. In order to make the switch device land on the scene based on web3.0 application by means of blockchain technology and to support the network environment support required by the switch device to support value transmission under the background that web3.0 and network technology are continuously developed and complicated, it is important.
Disclosure of Invention
In order to solve one or more of the above technical problems, the present application proposes a method, an apparatus and a system for implementing control data communication based on a web3.0 scenario supporting an intelligent contract, which ensure a path of data transmission through a programmable switch, especially in financial services requiring high reliability and high security. The digital wallet container management module is arranged in the programmable switch and used as a bridge between a payor and a payee, the block chain identity is used for providing service for Web3.0 application, and the value transmission of the programmable switch is realized by taking the intelligent contract scene as a floor example.
In a first aspect, the present application provides a method for implementing an intelligent contract based on web3.0 application, which is applied to a programmable switch, wherein the programmable switch can be at least used for supporting communication requirements of the intelligent contract on a hardware layer, and the web3.0 application supports access and call of the intelligent contract;
the intelligent contract implementation method comprises the following steps:
presetting the intelligent contract;
monitoring whether an intelligent contract initiating request sent by a payee is received, and triggering a cost calculating event when the intelligent contract initiating request is received;
executing the smart contract is performed when the instruction for executing the smart contract is acquired.
In some embodiments, after receiving the smart contract initiation request, the method includes: query whether the source address to the destination address in the smart contract initiation request is reachable.
In some embodiments, if the source address is reachable to the destination address, triggering a cost calculation event; and if the source address and the destination address are not reachable, the request transfer event is transmitted back to the payor.
In some embodiments, the trigger cost calculation event comprises: calling information about calculation cost from the source address to the destination address in a preset intelligent contract, and calculating the cost information between the source address and the destination address;
forwarding the overhead information and detailed information corresponding to the overhead information to the payoff party;
an identification code corresponding to the overhead information is generated.
In some embodiments, after the trigger cost calculation event, the method comprises:
waiting for a payor to select a link;
when the money-making party finishes selecting a link, judging whether the cost corresponding to the overhead information given by the money-making party is received in a preset time;
if the Fei Yongshi is received within the preset time, the instruction for executing the intelligent contract is considered to be acquired, and the intelligent contract is executed;
and if the fee is not received within the preset time, the intelligent contract executing instruction is not acquired, and the paying party is informed to reselect the link.
In some embodiments, the fee is forwarded to the payee when the configuration or service in the smart contract is completed.
In a second aspect, the present application provides a web3.0-based smart contract method applied to a payor, the method including:
creating an intelligent contract initiation request;
sending an intelligent contract initiation request to a programmable switch;
and when the overhead information and the detailed information corresponding to the overhead information are acquired, sending the expense corresponding to the overhead information to the programmable switch.
In a third aspect, the present application provides an intelligent contract apparatus based on web3.0 application, applied to a programmable switch, the apparatus comprising:
the digital wallet container module is deployed in the operating system and used for storing preset intelligent contracts;
the digital wallet management module is deployed on the management interface and is used for monitoring whether an intelligent contract initiation request is received or not, and triggering a cost calculation event when the intelligent contract initiation request is received;
and the intelligent contract management module is deployed on the management interface and is used for executing the intelligent contract when the intelligent contract executing instruction is acquired.
In a fourth aspect, the present application provides a web3.0-based smart contract apparatus for use with a payee, the apparatus comprising:
the request creation module is used for creating an intelligent contract initiation request;
the request sending module is used for sending an intelligent contract initiating request to the programmable switch;
and the expense sending module is used for sending expense corresponding to the expense information to the programmable switch when the expense information and the detailed information corresponding to the expense information are acquired.
In a fifth aspect, the present application provides a web3.0 application-based smart contract system, the system comprising: the intelligent contract device applied to the programmable switch, the intelligent contract device applied to the money-making party and the intelligent contract device applied to the money-receiving party are respectively connected with the server and the intelligent contract device applied to the money-receiving party;
the server is used for developing intelligent contracts and transmitting the intelligent contracts to the intelligent contract device applied to the programmable switch; the server is also used for maintaining the intelligent contract device applied to the programmable switch.
Compared with the prior art, the beneficial effect of this application lies in:
the application realizes the transmission service of the programmable switch by giving the network identity to the programmable switch and signing the intelligent contract. Compared with the existing switch, on one hand, the transmission guarantee is added for the Web3.0 application, the delivery path is ensured according to the transmission requirement of the related application, and the convenience is provided for transferring the digital rights. On the other hand, the time of the application of the Web3.0 on the information island is reduced to a certain extent, and compared with the existing switch, the programmable switch provided with the digital wallet container module has the advantage of better supporting the application service of the Web3.0, and the service of the application of the Web3.0 can be flexibly supported only by carrying out corresponding contract development and configuration signing intelligent contracts.
Drawings
FIG. 1 is a flow chart of a method for implementing smart contracts based on Web3.0 applications, disclosed in an embodiment of the present application;
FIG. 2 is a flow chart of yet another method for implementing smart contracts based on the Web3.0 application disclosed in one embodiment of the present application;
FIG. 3 is an architecture diagram of a Web3.0 application-based implementation of a smart contract system as disclosed in one embodiment of the present application;
FIG. 4 is a schematic diagram of a digital wallet container module disclosed in one embodiment of the present application;
fig. 5 is a schematic diagram of a smart contract device based on web3.0 application applied to a paymate.
Detailed Description
The present application is described in further detail below with reference to the accompanying drawings.
Fig. 1 schematically shows a flow of implementing the smart contract method based on web3.0 application disclosed in the present embodiment of the application. The process is applied to a programmable switch at least for supporting the communication requirements of the intelligent contract on the hardware layer, which can be understood as the payor, i.e. the user transmits data to the payee via the blockchain link, which blockchain nodes are routed through, i.e. the programmable switch nodes. The communication requirement can also be to control parameters such as bandwidth of the underlying link in specific implementations. Especially in financial services with high requirements on security and reliability or in hardware links where the user side is directly connected to the server side, the programmable switch provides a way to edit the data transmission path attributes when the attributes of the data transmission need to be specified. The client refers to a payor capable of using the Web3.0 application on a browser; the server refers to a server of the user terminal, and can also refer to a block chain node in the operation intelligent contract; the attributes of the data transfer may include latency and bandwidth, with the specific specified attributes being determined according to the selected smart contract. As shown in fig. 1, the flow includes steps S101 to S103:
step S101, presetting an intelligent contract.
In a specific implementation, before step S101 is performed, a loading module is further included. The loading module comprises: the method comprises the steps of loading a digital wallet container module on an operating system of a programmable switch, loading a digital wallet configuration module on an operating interface of the programmable switch, and loading a digital wallet management module and an intelligent contract module on a management interface of the programmable switch.
The user can set the content of the intelligent contract through the digital wallet configuration module, the intelligent contract comprises a networking contract and a service providing mode contract, the networking contract agrees with the information of a source address and a destination address, the service period and the like, and the service providing mode contract agrees with the service content provided by a payee and the charging rule corresponding to the service.
Furthermore, the intelligent contract template can be drawn up through a development module in a server connected with the programmable switch, and a user can finish the drawing up of the intelligent contract only by filling in key information. The development module develops the intelligent contract as a Web3.0 application program through a programmable language JAVA, and develops a basic package for the intelligent contract, particularly provides a basic framework for developing the intelligent contract, a user only needs to write a core code to complete the development work of the intelligent contract, and meanwhile, a necessary interface for calling the blockchain node is provided in the intelligent contract development basic package, so that the intelligent contract can acquire data on the blockchain node in an RPC mode in the execution process, and the data can be written into the blockchain node. Each blockchain node may be understood as a copy of the intelligent contract state machine that enables blockchains to remain consistent and to flow through transactions between the payor and payee. The intelligent contract content comprises blockchain nodes through which data need to pass, namely nodes in a programmable switch, and when the data passes through a programmable switch node, a forwarding operation is carried out, and each operation corresponds to a state.
Specifically, the smart contract C may be described as a triplet: intelligent contractor information I, intelligent contractor state machine M, and intelligent contractor execution state machine set { M } 1 ,M 2 ...M m }. Then the smart sum is approximately c= (I, M, { M 1 ,M 2 ...M m }). Where Ii represents information of the i-th smart contractor Pi, i=1..m, and m individuals in total participate in the smart contract. The intelligent contractor may be a payor and/or payee. The smart contract state machine M may be expressed as a five-tuple (Q, Σ, δ, s, F), q= { (q×1, q×2..q×m, L), qi e qIi }. Q is the set of all states of the smart contract state machine, L is the smart contract execution context, where qi is contained in the state set qIi of the ith smart contract party. Σ is a collection of input events, typically transactions. Delta is the set of transfer functions. s is the initial state value (s e Q) and F is the set of termination states (F e Q). Execution state M of smart contracts i The execution state machine representing the i-th contractual party Pi may also be represented as a five-tuple (qIi, Σ, δ i ,s i Fi), qIi is a set of execution states of the intelligent contractors Pi. Σ is the set of input events. Delta i Is a set of transfer functions, which are functions corresponding to a transfer process of transferring an initial state to a termination state. s is(s) i Is an initial state value (s i E qIi), fi is the set of termination states (Fi e qIi). The above-described smart contract state machine may be understood as an abstract representation of the smart contract execution logic and flow states.
Step S102, whether an intelligent contract initiating request is received or not is monitored, and when the intelligent contract initiating request is received, a cost calculating event is triggered.
The implementation of step S102 and step S103 can be seen in fig. 2. Specifically, step S102 includes:
starting up the programmable switch;
monitoring whether an intelligent contract initiating request is received; the method comprises the steps that a money-making party creates an intelligent contract initiating request and sends the intelligent contract initiating request to a programmable switch, and a digital wallet container management module arranged on the programmable switch monitors whether a blockchain node receives the intelligent contract initiating request or not according to the identity of a blockchain, namely, a blockchain node receives the intelligent contract initiating request;
if the source address and the destination address in the intelligent contract initiating request are reachable after the intelligent contract initiating request is received; specifically, after receiving an intelligent contract initiation request sent by a blockchain node, the programmable switch inquires whether a source address to a destination address in the intelligent contract initiation request are reachable;
if the intelligent contract initiating request is not received, waiting for the shutdown of the user;
and triggering a cost calculation event if the source address is reachable to the destination address. If the source address is not reachable to the destination address, the service cannot be provided normally, so the remark times out and the intelligent contract initiation request is transferred back to the sender. Preferably, whether the source address to the destination address in the intelligent contract initiating request is reachable or not is set within preset time, so that the influence on the subsequent data transmission time is avoided. The triggering cost calculation event comprises the following steps: calling information about calculation cost from a source address to a destination address in a preset intelligent contract, and calculating cost information between the source address and the destination address; the information about the computation overhead includes at least details of computing source address to destination address overheads; forwarding the detailed information corresponding to the overhead information to a payor; an identification code corresponding to the overhead information is generated. Wherein, the expense information is expense, the detail information is the specific composition of the expense and the corresponding expense, and the identification code can be used as the mark of the detail information. When the payor acquires the overhead information and the detailed information corresponding to the overhead information, the payor sends the expense corresponding to the overhead information to the programmable switch.
Further, after triggering the cost calculation event, the method includes:
waiting for a payoff party to select a blockchain link; wherein the link refers to the way the payor sends the fee, i.e. what channel the fee is transferred to the programmable exchange;
when the payor selects the block chain link, judging whether the expense corresponding to the expense information given by the payor is received in a preset time; the preset time can be implemented according to the content agreed in the intelligent contract;
if the fee is received within the preset time, the instruction for executing the intelligent contract is considered to be acquired, and the intelligent contract is executed;
and if the fee is not received within the preset time, the intelligent contract executing instruction is not acquired, and the payor is informed to reselect the link. In practice, where the fee is not received within a predetermined time based on the content of the smart contract, the payor may be required to pay the fee Fang Weiyao according to the contract.
Step S103, when the instruction of executing the intelligent contract is obtained, executing the intelligent contract.
Specifically, the implementation of the smart contract may be implemented according to the content in the service providing mode contract made by the user; when the configuration or service in the smart contract is performed, the fee is forwarded to the payee.
In a specific embodiment, an intelligent contract method based on web3.0 application is provided, and is applied to a payoff party, and the method comprises the following steps: creating an intelligent contract initiation request; sending an intelligent contract initiation request to a programmable switch; and when the overhead information and the detailed information corresponding to the overhead information are acquired, the cost corresponding to the overhead information is sent to the programmable switch. Specifically, the payee acquires the overhead information and the detailed information corresponding to the overhead information, then selects a link, and sends the cost corresponding to the overhead information to the programmable switch after the link is selected within the preset time. When the link is not selected for more than the preset time, the payor receives a notification of the reselection of the link, which is sent by the programmable switch due to the time-out of the selection of the link, and then the payor reselects the link to send the expense.
Through the steps, the programmable switch can implement the scene floor of the intelligent contract based on the web3.0 application.
Taking a transaction as an example, when the content of an intelligent contract in a programmable switch is set, a payor, that is, a user can conduct a transaction by using a web page corresponding to web3.0 to send an intelligent contract request to the programmable switch, wherein the intelligent contract request comprises the selected intelligent contract, and can be understood as that an commodity is placed, the programmable switch receives the payor, that is, the intelligent contract request sent by the user triggers a cost calculation event; the programmable exchanger calls the corresponding intelligent contract to inquire whether the source address is reachable to the destination address, namely, whether the account corresponding to the user is reachable to the account corresponding to the receiver, and whether the goods receiving address given by the sender is reachable to the goods delivery address given by the receiver, namely, whether the goods can be successfully reached is inquired; when the query result is reachable, the programmable switch calculates the cost according to the corresponding cost information in the intelligent contract, which can be understood as the calculation of the freight risk required between the receiving address and the delivery address by the programmable switch after the repayment party selects the freight risk; after the programmable exchange sends the overhead information and the detail information to the paying party, the paying party transfers the cost corresponding to the overhead information to the programmable exchange; the Web3.0 application provides one or more links for users to select, the links can be understood as paths for forwarding fees, when the users select the links within preset time, the programmable switch is in butt joint with the selected links, after receiving corresponding fees within the preset time, the programmable switch is regarded as acquiring an instruction for executing the intelligent contract, the intelligent contract is executed, and the commodity is sent from a delivery address to a receiving address by executing the intelligent contract; when the smart contract is executed, the programmable switch forwards the fee to the payee.
Accordingly, referring to fig. 3, the embodiment of the present application further discloses a programmable switch based on web3.0 smart contract, including:
the digital wallet container module is deployed in the operating system and used for storing preset intelligent contracts;
the digital wallet management module is deployed on the management interface and is used for monitoring whether an intelligent contract initiation request is received or not, and triggering a cost calculation event when the intelligent contract initiation request is received;
and the intelligent contract management module is deployed on the management interface and is used for executing the intelligent contract when the intelligent contract executing instruction is acquired.
The programmable switch further comprises: the digital wallet user configuration module is used for operating the digital wallet and the operation entrance of the contract for the user.
The architecture of the digital wallet container module referring to fig. 4, the digital wallet container module includes a UI interface support layer, a business logic layer, and a multi-link data access layer. The UI interface supporting layer provides an application interface for a user to use the wallet, the business logic layer provides an application interface for intelligent contracts and user UI, and the multi-chain data access layer provides interfaces for the business logic layer to access different blockchains. In particular embodiments, the communication requirements of a programmable switch to support smart contracts at the hardware level may be implemented as a digital wallet container module defined by a dockerlue file:
Wallet Content{
Logic Layer(policy,Env);
Data Layer(req,resp,pack);
Block Layer(CC1,CC2,CC3);}
the Logic Layer is a UI interface supporting Layer, the Data Layer is a business Logic Layer, and the Block Layer is a multi-chain Data access Layer. The above refers to that the UI interface support layer includes policy and environment Env, the UI interface support layer includes request req, response request resp and packet pack, and the multi-chain data access layer includes a plurality of blockchain links, where three blockchain links CC1, CC2 and CC3 are set in this embodiment. Different blockchain links are different RPC invocation modes. A policy may be considered a collection of intelligent contracts that a user uses, and an environment may be understood as a scenario in which a user is using the module. The configuration of the digital wallet container module may be defined in practice with a yaml file.
In specific implementation, the programmable switch detects that an account number blockchain1_wall of a certain party in the blockchain has an intelligent contract initiating request mid_ switch detected event through a code mid_switch: in= > mid_ switch detected event: < from filled_webapp, blockchain 1_filled, < srclip, srreport, dstip, dstport, type > >: from wallled webapp is the sender, srclip is the source address, srreport is the port number of the source address, dstip is the destination address, dstport is the port number of the destination address, and type is the type of request initiated by the smart contract, which are all the contents included in the smart contract request in the implementation.
Code examples for performing cost calculations on the programmable switch running mid_switch program are:
Do =>mid_switch {
cost1,cost2,...,costi,linklist_for_communication,mid_switchid= Cost(Ping srcip,ping dstip);
Sendcost_to_fromwalletid_webapp(cost1,cost2,...,costi,use_this_switchid_contract,mid_switchid,linklist_for_communication);
the Cost1, cost2, and the Cost in the mid_switch program are calculated overheads, the Cost represents overheads between each intermediate node through which a link passes and an application participant, and the Cost (Ping skirt) is overheads between a source address and a destination address; the sendcost_to_from_webapp binds the intelligent contract use_this_switch_contact and the link link_for_communication used by the programmable switch, and sends the calculated overhead to the initiator of the application participation, i.e., the sender, the mid_switch intelligent contract requester, i.e., the ID number corresponding to the sender.
Ret=waitdfor_selected_or_timeout (); where Ret represents the programmable switch waiting for the application initiator to select the present programmable switch, its possible values are: selected or timed out;
If(Ret == seleted)
{ detected_switch_connect (mid_switch); if the programmable switch is selected, detecting detected_switch_contact related intelligent contracts, and detecting the current states of all programmable switches required by the link;
signaled_constrained (mid_switch); that is, after the programmable switch receives the intelligent contract initiating request, the programmable switch performs the intelligent contract signing;
Do =>{
create_mechanical_by_link_for_communication (link_for_communication, mid_switch); wherein, the creation_channel_by_link_for_communication is to Create a data transmission channel link_for_communication according to the selected list link_for_communication, that is, link_for_communication selectable by the sender;
set_valid_time (); setting an available time set_valid_time ()' of the intelligent contract;
waited_for_time_to_end (); if timeout, cancel the subscription of the smart contract;
Trans_P4State (); performing an intelligent contract state machine that executes the programmable switch;
}
If(Ret == timeout)
{ Trans_P4State (); executing an intelligent contract state machine of the programmable switch if the time is out;
ending mid_switch flow.
At the same time, the user transacts through the web3.0 application to enable smart contract execution. For defining web3.0 applications may be: web3.0_app { wallet_id; app_id; }. The web3.0 application includes an ID number of a digital wallet having an association relationship and an ID number of an account number.
The core code for the web3.0 application corresponding link may be: web3.0_app_do= >
{
Communication_list=waited_for_costnfo (); providing a selectable link list communication_list on the waiting chain;
ret, the_link=choice_one (communication_list); waiting for a user, namely selecting a link from the link communication_list by a payor;
if (ret= timeout); if the step of selecting the link is overtime;
print failed to connet peer _webapp; telling web3.0 that the application is link-free;
if (ret= 0); if the selection link is completed;
the reinting_mid_switch_connect (the_link); the user, namely the paying party leases the switch link of the programmable switch;
sendmsgtopenwebappandpayforfee (the_link); the programmable switch sends the application data through the link payment;
}
finally, the programmable switch obtains the configuration of the programmable switch in the application data through the this_switch_contact, and the SAI interface of the programmable switch can be called in an RPC (remote process call) mode to input calling parameters into the programmable switch for configuration, such as delay parameters required to be set in the intelligent contract.
As shown in fig. 5, the embodiment of the application further discloses an intelligent contract device based on web3.0 application applied to a payor, which includes:
the request creation module is used for creating an intelligent contract initiation request;
the request sending module is used for sending an intelligent contract initiating request to the programmable switch;
and the expense sending module is used for sending expense corresponding to the expense information to the programmable switch when the expense information and the detailed information corresponding to the expense information are acquired.
The embodiment of the application also discloses an intelligent contract system based on the Web3.0 application, which comprises the following components: the intelligent contract device applied to the programmable switch, the intelligent contract device applied to the money-making party and the intelligent contract device applied to the money-receiving party are respectively connected with the server and the intelligent contract device applied to the money-receiving party;
the server is used for developing intelligent contracts and transmitting the intelligent contracts to the intelligent contract device applied to the programmable switch. Preferably, the server is further configured to maintain the intelligent contract apparatus applied to the programmable switch. The intelligent contract device applied to the payee is provided with at least a fee receiving module which is at least used for receiving the fee sent by the intelligent contract device applied to the payee.
The embodiment of the invention discloses a computer readable storage medium which stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the intelligent contract method based on the Web3.0 application.
The foregoing are merely some embodiments of the present application. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit of the invention.

Claims (8)

1. A method for implementing intelligent contracts based on web3.0 application, characterized in that it is applied to a programmable switch, said method comprising:
presetting the intelligent contract; the intelligent contract is stored in a digital wallet container module;
monitoring whether an intelligent contract initiating request sent by a payee is received, and triggering a cost calculating event when the intelligent contract initiating request is received;
executing the intelligent contract when acquiring an instruction for executing the intelligent contract;
after receiving the intelligent contract initiation request, the method comprises the following steps: inquiring whether the source address to the destination address in the intelligent contract initiating request is reachable or not; triggering a cost calculation event if the source address is reachable to the destination address; and if the source address and the destination address are not reachable, transferring the intelligent contract initiating request back to the sender.
2. The method of claim 1, wherein the trigger cost calculation event comprises: calling information about calculation cost from the source address to the destination address in a preset intelligent contract, and calculating cost information between the source address and the destination address;
forwarding the overhead information and detailed information corresponding to the overhead information to the payoff party;
an identification code corresponding to the overhead information is generated.
3. The method of claim 1, wherein after the trigger cost calculation event, comprising:
waiting for a payor to select a link;
when the money-making party finishes selecting a link, judging whether the cost corresponding to the overhead information given by the money-making party is received in a preset time;
if the Fei Yongshi is received within the preset time, the instruction for executing the intelligent contract is considered to be acquired, and the intelligent contract is executed;
and if the fee is not received within the preset time, the intelligent contract executing instruction is not acquired, and the paying party is informed to reselect the link.
4. A method according to any of claims 1-3, characterized in that the fee is forwarded to the payee when the configuration or service in the smart contract is performed.
5. A smart contract method based on web3.0 applications, the method comprising:
the following steps are executed by the payor:
creating an intelligent contract initiation request;
sending the intelligent contract initiation request to a programmable switch;
when the overhead information and the detailed information corresponding to the overhead information are acquired, the cost corresponding to the overhead information is sent to the programmable switch;
the following steps are performed by the programmable switch:
presetting the intelligent contract; the intelligent contract is stored in a digital wallet container module;
monitoring whether an intelligent contract initiating request sent by a payee is received, and triggering a cost calculating event when the intelligent contract initiating request is received;
executing the intelligent contract when acquiring an instruction for executing the intelligent contract;
after receiving the intelligent contract initiation request, the method comprises the following steps: inquiring whether the source address to the destination address in the intelligent contract initiating request is reachable or not; triggering a cost calculation event if the source address is reachable to the destination address; and if the source address and the destination address are not reachable, transferring the intelligent contract initiating request back to the sender.
6. An intelligent contract apparatus based on web3.0 application, applied to a programmable switch, the apparatus comprising:
the digital wallet container module is used for storing preset intelligent contracts;
the digital wallet management module is used for monitoring whether an intelligent contract initiating request is received or not, and triggering a cost calculating event when the intelligent contract initiating request is received;
the intelligent contract management module is used for executing the intelligent contract when acquiring an instruction for executing the intelligent contract;
the programmable switch, upon receiving the intelligent contract initiation request, includes: inquiring whether the source address to the destination address in the intelligent contract initiating request is reachable or not; triggering a cost calculation event if the source address is reachable to the destination address; and if the source address and the destination address are not reachable, transferring the intelligent contract initiating request back to the sender.
7. An intelligent contract apparatus based on web3.0 application, the apparatus being applied to a payoff party, comprising:
the request creation module is used for creating an intelligent contract initiation request;
a request sending module, configured to send the intelligent contract initiation request to a programmable switch;
the expense sending module is used for sending expense corresponding to the expense information to the programmable switch when the expense information and the detailed information corresponding to the expense information are acquired;
wherein the programmable switch is configured to:
presetting the intelligent contract; the intelligent contract is stored in a digital wallet container module;
monitoring whether an intelligent contract initiating request sent by a payee is received, and triggering a cost calculating event when the intelligent contract initiating request is received;
executing the intelligent contract when acquiring an instruction for executing the intelligent contract;
after receiving the intelligent contract initiation request, the method comprises the following steps: inquiring whether the source address to the destination address in the intelligent contract initiating request is reachable or not; triggering a cost calculation event if the source address is reachable to the destination address; and if the source address and the destination address are not reachable, transferring the intelligent contract initiating request back to the sender.
8. A web3.0 application-based smart contract system, the system comprising: the smart contract apparatus as claimed in claim 6, the smart contract apparatus as claimed in claim 7, and a server and a smart contract apparatus applied to a payee, which are respectively connected with the smart contract apparatus as claimed in claim 6;
the server is used for developing intelligent contracts and sending the intelligent contracts to the intelligent contract device as claimed in claim 6; the server is further configured to maintain the smart contract apparatus of claim 6.
CN202310533029.5A 2023-05-12 2023-05-12 Intelligent contract method, device and system based on Web3.0 application Active CN116319721B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310533029.5A CN116319721B (en) 2023-05-12 2023-05-12 Intelligent contract method, device and system based on Web3.0 application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310533029.5A CN116319721B (en) 2023-05-12 2023-05-12 Intelligent contract method, device and system based on Web3.0 application

Publications (2)

Publication Number Publication Date
CN116319721A CN116319721A (en) 2023-06-23
CN116319721B true CN116319721B (en) 2023-07-18

Family

ID=86829076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310533029.5A Active CN116319721B (en) 2023-05-12 2023-05-12 Intelligent contract method, device and system based on Web3.0 application

Country Status (1)

Country Link
CN (1) CN116319721B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108682164A (en) * 2018-06-12 2018-10-19 厦门华方软件科技有限公司 A kind of managing system of car parking based on block chain technology
US11501370B1 (en) * 2019-06-17 2022-11-15 Gemini Ip, Llc Systems, methods, and program products for non-custodial trading of digital assets on a digital asset exchange

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108682164A (en) * 2018-06-12 2018-10-19 厦门华方软件科技有限公司 A kind of managing system of car parking based on block chain technology
US11501370B1 (en) * 2019-06-17 2022-11-15 Gemini Ip, Llc Systems, methods, and program products for non-custodial trading of digital assets on a digital asset exchange

Also Published As

Publication number Publication date
CN116319721A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
US8321498B2 (en) Policy interface description framework
CN1649324B (en) Method and apparatus for operating an open API network having a proxy
KR101013486B1 (en) Digital object routing based on a service request
RU2372746C2 (en) Method, device and computer software product providing service quality support in wireless communication system
JP3279537B2 (en) Apparatus and method for data communication between WAP terminal and WAP server
JP4885525B2 (en) Call control by integrating application server logic and gateway logic in IMS network (CALLCONTROL)
US9055046B2 (en) Safe output protocol for files to multiple destinations with integrity check
US6084874A (en) Temporary data transfer connections
JP2004048662A (en) Business method and apparatus for network path configuration
JP2002010364A (en) Method and apparatus of interactive packet data protocol for mobile communication system
JP2003521199A (en) Communication network method, server and configuration
EP1122918B1 (en) Method and apparatus for tracking a transaction across a multi-hop network
CN102315918B (en) Method and device for intercommunicating TCP (Transmission Control Protocol) connection with SCTP (Stream Control Transmission Protocol) connection
CN101167308A (en) Service gateway, service system, service quality arrangement and service resource releasing method
JP2005229583A (en) Network controller, communication terminal, and network selecting method
CN116319721B (en) Intelligent contract method, device and system based on Web3.0 application
RU2634917C2 (en) Method of service quality management, application server and terminal device
US7292584B1 (en) Effective multilink flow handling
KR100798951B1 (en) Mobile connection broker
US7372950B2 (en) Method for supporting the communication of information via a communications system
JP2010103968A (en) Resource management apparatus and resource management method
MXPA05003667A (en) Method and apparatus for a service integration system.
Takatama et al. Intelligent SIP system for mobile Internet
WO2024067148A1 (en) Edge interconnection service execution method, apparatus and system, electronic device, and medium
JP2002185524A (en) Communication service condition control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant