WO2020073277A1 - 资源流的交易方法和装置 - Google Patents

资源流的交易方法和装置 Download PDF

Info

Publication number
WO2020073277A1
WO2020073277A1 PCT/CN2018/109828 CN2018109828W WO2020073277A1 WO 2020073277 A1 WO2020073277 A1 WO 2020073277A1 CN 2018109828 W CN2018109828 W CN 2018109828W WO 2020073277 A1 WO2020073277 A1 WO 2020073277A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
transaction
value
information
resource flow
Prior art date
Application number
PCT/CN2018/109828
Other languages
English (en)
French (fr)
Inventor
施逸
张焱
Original Assignee
合肥达朴汇联科技有限公司
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 合肥达朴汇联科技有限公司 filed Critical 合肥达朴汇联科技有限公司
Priority to EP18936796.4A priority Critical patent/EP3866094A4/en
Priority to PCT/CN2018/109828 priority patent/WO2020073277A1/zh
Priority to US17/283,824 priority patent/US12026760B2/en
Publication of WO2020073277A1 publication Critical patent/WO2020073277A1/zh

Links

Images

Classifications

    • 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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0283Price estimation or determination
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • 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/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/102Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00 applying security measure for e-commerce

Definitions

  • the present disclosure relates to the field of Internet technology, and more specifically, to a resource flow transaction method and device.
  • the present disclosure provides a resource flow transaction method and apparatus that can at least partially solve the above problems.
  • An aspect of the present disclosure provides a resource flow transaction method, which is applied to a blockchain server and includes: acquiring transaction initial information relating to a requester client and a provider client, and sending the transaction initial information to other blocks
  • the chain server enables each blockchain server to store the transaction initial information in its corresponding blockchain database to obtain credential information that characterizes the state of the resource flow used by the requesting client, based on the transaction initial information and all
  • the credential information determines a first value, which is used to represent the value added by the requesting client to the account of the provider client, and sends the first value to other blockchain servers so that each block
  • the chain server stores the first value in its corresponding blockchain database.
  • the above acquiring initial transaction information relating to the requester client and the provider client includes: receiving the transaction request information sent by the requester client.
  • the transaction request information includes: identification information of the requester client, the provider client Identification information of the terminal and the digital signature of the requesting client, verify the transaction request information based on the digital signature of the requesting client, and if the verification is true, send the transaction request information to the provider client, Receiving the transaction permission information sent by the provider client, the transaction permission information including the transaction request information and the digital signature of the provider client, and performing the transaction permission information based on the digital signature of the provider client Verification, if the verification is true, the transaction permission information is used as the initial transaction information associated with the requester client and the provider client.
  • the transaction request information further includes price information of the resource flow.
  • the above determination of the first value based on the transaction initial information and the credential information includes: determining the total amount of resource flows used by the requesting client according to the credential information, and according to the price information of the resource flow and the request The total number of resource streams used by the client is determined to be the first value.
  • the transaction request information further includes a second value
  • the second value is used to represent a reduced value in the account of the requesting client.
  • the above determination of the first value based on the transaction initial information and the voucher information further includes: if the second value is greater than the first value, determining a third value, the third value being equal to the difference between the second value and the first value, the The third value is used to characterize the increased value in the account of the requesting client. If the second value is less than the first value, a fourth value is determined. The fourth value is equal to the difference between the first value and the second value. The four values are used to characterize the reduced value in the account of the requesting client, and send the determined third value or fourth value to other blockchain servers, so that each blockchain server stores the third value or fourth value Into their respective blockchain databases.
  • the transaction request information further includes a second value
  • the second value is used to represent a reduced value in the account of the requesting client.
  • the above determination of the first value based on the transaction initial information and the voucher information further includes: if the second value is greater than the first value, recording the difference between the second value and the first value as the fifth value, when the requesting client When the terminal performs the next resource flow transaction, the fifth value is accumulated with the second value corresponding to the next resource flow transaction to obtain an updated second value corresponding to the next resource flow transaction .
  • the acquiring credential information characterizing the status of the resource flow used by the requesting client includes receiving a resource flow using credential sent by the provider client, and the resource flow using credential includes the requesting client's A digital signature and a digital signature of the provider client, the resource flow usage credential is sent by the requester client to the provider client, based on the digital signature of the requester client and the provider client The digital signature on the terminal verifies the resource flow use credential. If the verification is true, the resource flow use credential is used as the credential information of the requester client using the resource flow.
  • the above resource flow includes at least one of the following: network traffic resources, power resources, computing power resources, and / or designated data flow resources with real-time dynamics.
  • Another aspect of the present disclosure provides a resource flow transaction method applied to a requester client, including: selecting a provider client, establishing an association with the provider client through a blockchain server, receiving and using The resource stream provided by the provider client generates credential information characterizing the state of using the resource stream according to a preset rule, and sends the credential information to the blockchain server, and the blockchain server determines the first based on the credential information.
  • a numerical value, the first numerical value is used to represent a numerical value added by the requesting client to the account of the provider client.
  • selecting a provider client and associating with the provider client through a blockchain server includes: acquiring resource flow publishing information of multiple provider clients, where the resource flow publishing information includes the provider client Terminal identification information and resource flow price information, select a provider client based on the multiple resource flow release information, send transaction request information to the blockchain server, and the blockchain server forwards the transaction request information to all The selected provider client causes the provider client to start providing resource flow when the transaction request information is permitted.
  • the transaction request information includes a digital signature of the requesting client, so that the blockchain server forwards the transaction request information when verifying that the transaction request information is true based on the digital signature of the requesting client To the provider client.
  • generating the credential information characterizing the state of using the resource flow according to the preset rule, and sending the credential information to the blockchain server includes: generating a characterization of the current use at preset time intervals during the use of the resource flow
  • the resource flow usage credentials in the state are sent to the provider client, and the provider client sends the resource flow usage credentials to the blockchain server.
  • the resource flow usage credential includes a digital signature of the requesting client, so that the provider client verifies the resource flow usage credential based on the digital signature of the requesting client before verifying that the resource flow usage credential is true.
  • the resource flow is sent to the blockchain server using credentials.
  • the above resource flow includes at least one of the following: network traffic resources, power resources, computing power resources, and / or designated data flow resources with real-time dynamics.
  • Another aspect of the present disclosure provides a resource flow transaction method applied to a provider client, including: establishing an association with a requester client through a blockchain server, and providing the resource flow to the requester client so that the requester
  • the client receives and uses the resource stream, obtains credential information that characterizes the state of the resource stream used by the requesting client, and sends the credential information to the blockchain server, which is determined by the blockchain server based on the credential information
  • a first numerical value which is used to represent a numerical value added by the requesting client to the account of the providing client.
  • the above-mentioned establishment of an association with the requesting client through the blockchain server, and providing the resource flow to the requesting client includes: receiving transaction request information sent by the blockchain server, and the transaction request information includes the identifier of the requesting client Information and the digital signature of the requesting client, the transaction request information is sent by the requesting client to the blockchain server, and when the transaction request information is approved, the transaction permission information is sent to the blockchain server, the transaction The permission information includes the transaction request information and the digital signature of the provider client, and starts to provide resource flow to the requester client.
  • the transaction request information further includes the total estimated resource flow.
  • the association with the requesting client through the blockchain server further includes: when the total amount of the expected resource flow is not greater than the total amount of the resource flow that can be provided, permitting the transaction request information.
  • the above acquiring credential information characterizing the status of the resource stream used by the requesting client, and sending the credential information to the blockchain server includes: receiving the resource stream usage credential sent by the requesting client if If the resource flow usage voucher is not received after exceeding the predetermined time, it is determined that the requesting client end uses the resource flow, and the received resource flow usage voucher is sent to the blockchain server.
  • the resource flow usage credential sent by the requester client includes the digital signature of the requester client
  • sending the received resource flow usage credential to the blockchain server further includes: based on the request The digital signature of the Fang client verifies the resource flow usage certificate, and if the verification is true, the resource flow usage certificate is sent to the blockchain server.
  • the sending the received resource flow use credential to the blockchain server further includes: correspondingly sending the resource flow use credential and the digital signature of the provider client to the blockchain server.
  • the above resource flow includes at least one of the following: network traffic resources, power resources, computing power resources, and / or designated data flow resources with real-time dynamics.
  • a resource flow transaction device applied to a blockchain server, including: an initiation module, an acquisition module, and a management module.
  • the initiating module is used to obtain the initial transaction information associated with the requester client and the provider client, and send the initial transaction information to other blockchain servers, so that each blockchain server stores the initial transaction information in their corresponding Blockchain database.
  • the obtaining module is used to obtain the credential information characterizing the state of the resource flow used by the requesting client.
  • the management module is configured to determine a first value based on the initial transaction information and the credential information, and the first value is used to represent a value added by the requester client to the account of the provider client, and The first value is sent to other blockchain servers, so that each blockchain server stores the first value in its corresponding blockchain database.
  • the initiating module acquiring the initial transaction information associated with the requester client and the provider client includes: an initiating module, configured to receive the transaction request information sent by the requester client, and the transaction request information includes: the requester client The identification information of the client, the identification information of the provider client, and the digital signature of the requester client, verify the transaction request information based on the digital signature of the requester client, and if the verification is true, send the transaction request information to
  • the provider client receives the transaction permission information sent by the provider client, the transaction permission information includes the transaction request information and the digital signature of the provider client, based on the digital signature of the provider client Verify the transaction permission information, and if the verification is true, use the transaction permission information as the initial transaction information associated with the requester client and the provider client.
  • the transaction request information further includes price information of the resource flow.
  • the management module determining the first value based on the transaction initial information and the credential information includes: a management module configured to determine the total amount of resource flows used by the requesting client according to the credential information; The price information and the total amount of resource streams used by the requesting client determine the first value.
  • the transaction request information further includes a second value
  • the second value is used to represent a reduced value in the account of the requesting client.
  • the management module is also used to determine a third value when the second value is greater than the first value, the third value is equal to the difference between the second value and the first value, and the third value is used to characterize the requesting client The value added to the account at the end; when the second value is less than the first value, a fourth value is determined, the fourth value is equal to the difference between the first value and the second value, and the fourth value is used to characterize the requesting party Reduced value in the client's account; send the determined third value or fourth value to other blockchain servers, so that each blockchain server stores the third value or fourth value in their corresponding blockchain Database.
  • the transaction request information further includes a second value
  • the second value is used to represent a reduced value in the account of the requesting client.
  • the management module is further used to record the difference between the second value and the first value as the fifth value when the second value is greater than the first value, and when the requesting client performs the next resource flow transaction, the The fifth value is accumulated with the second value corresponding to the transaction of the next resource flow to obtain an updated second value corresponding to the transaction of the next resource flow.
  • the acquiring module acquiring the credential information characterizing the status of the resource flow used by the requesting client includes: an acquiring module configured to receive a resource flow using credential sent by the provider client, the resource flow using credential includes The digital signature of the requester client and the digital signature of the provider client, the resource flow use credential is sent by the requester client to the provider client; based on the digital signature of the requester client Verify the resource flow usage credential with the digital signature of the provider client, and if the verification is true, use the resource flow usage credential as credential information for the requester client to use the resource flow.
  • the above resource flow includes at least one of the following: network traffic resources, power resources, computing power resources, and / or designated data flow resources with real-time dynamics.
  • a resource flow transaction device which is applied to a requester client, and includes a transaction establishment module, a resource reception module, and a transaction management module.
  • the transaction establishment module is used to select a provider client and establish an association with the provider client through a blockchain server.
  • the resource receiving module is configured to receive and use the resource stream provided by the provider client.
  • the transaction management module is configured to generate credential information that characterizes the state of using the resource flow according to preset rules, and send the credential information to the blockchain server, and the blockchain server determines the first value based on the credential information.
  • the first value is used to characterize the value added by the requesting client to the account of the provider client.
  • the transaction establishment module selects a provider client, and establishing an association with the provider client through the blockchain server includes: a transaction establishment module, configured to obtain resource flow publishing information of multiple provider clients, the The resource stream publishing information includes the identification information of the provider client and the price information of the resource stream; based on the plurality of resource stream publishing information, a provider client is selected, and the transaction request information is sent to the blockchain server, and the blockchain server will The transaction request information is forwarded to the selected provider client, so that the provider client starts to provide resource flow when the transaction request information is permitted.
  • the transaction request information includes a digital signature of the requesting client, so that the blockchain server forwards the transaction request information when verifying that the transaction request information is true based on the digital signature of the requesting client To the provider client.
  • the transaction management module generates credential information that characterizes the state of using the resource flow according to a preset rule
  • sending the credential information to the blockchain server includes: a transaction management module, configured to Generate a resource flow usage credential that characterizes the current usage state at a preset time interval, and send the resource flow usage credential to the provider client, and the provider client sends the resource flow usage credential to a block Chain server.
  • the resource flow usage credential includes a digital signature of the requesting client, so that the provider client verifies the resource flow usage credential based on the digital signature of the requesting client before verifying that the resource flow usage credential is true.
  • the resource flow is sent to the blockchain server using credentials.
  • the above resource flow includes at least one of the following: network traffic resources, power resources, computing power resources, and / or designated data flow resources with real-time dynamics.
  • a resource flow transaction device applied to a provider client including: a transaction establishment module and a transaction management module.
  • the transaction establishment module is used to establish an association with the requesting client through the blockchain server, and provide a resource flow to the requesting client, so that the requesting client receives and uses the resource flow.
  • the transaction management module is used to obtain the credential information representing the status of the resource flow used by the requesting client, and send the credential information to the blockchain server, and the blockchain server determines the first value based on the credential information, The first value is used to characterize the value added by the requester client to the account of the provider client.
  • the transaction establishment module establishes an association with the requesting client through the blockchain server, and providing the resource flow to the requesting client includes: a transaction establishment module for receiving transaction request information sent by the blockchain server.
  • the request information includes the identification information of the requesting client and the digital signature of the requesting client.
  • the transaction request information is sent to the blockchain server by the requesting client; when the transaction request information is approved, the request to the blockchain server Sending transaction permission information, the transaction permission information includes the transaction request information and the digital signature of the provider client, and starts to provide a resource flow to the requester client.
  • the transaction request information further includes the total estimated resource flow.
  • the transaction establishment module is also used to permit the transaction request information when the total estimated resource flow is not greater than the total available resource flow.
  • the transaction management module obtains credential information that characterizes the state of the resource flow used by the requesting client, and sending the credential information to the blockchain server includes: a transaction management module for receiving the requesting client The resource flow usage voucher sent; if the resource flow usage voucher is not received after the predetermined time is exceeded, it is determined that the requesting client end uses the resource flow, and the received resource flow usage voucher is sent to the blockchain server.
  • the resource flow usage credential sent by the requesting client includes the digital signature of the requesting client
  • the transaction management module is also used to use the resource streaming credential based on the digital signature of the requesting client Perform verification, and if the verification is true, send the resource flow use credential to the blockchain server.
  • the transaction management module is also used to correspondingly send the resource flow use credential and the digital signature of the provider client to the blockchain server.
  • the above resource flow includes at least one of the following: network traffic resources, power resources, computing power resources, and / or designated data flow resources with real-time dynamics.
  • Another aspect of the present disclosure provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the program to realize the resource flow as described above Trading method.
  • Another aspect of the present disclosure provides a non-volatile storage medium that stores computer-executable instructions that when executed are used to implement the transaction method of the resource flow described above.
  • Another aspect of the present disclosure provides a computer program that includes computer-executable instructions that, when executed, are used to implement a transaction method for a resource flow as described above.
  • the problem of cheating by one or more parties of the requester and the provider during the resource flow transaction can be at least partially solved / mitigated / suppressed / even avoided, and the resource flow transaction acts as a third party from the beginning to the end Blockchain server participates, and because the blockchain server is any node in the blockchain network, the behavior of any blockchain server is witnessed by other blockchain servers in the blockchain network, thus forming With the multi-party credible supervision of the transaction behavior of the resource flow, neither the requester, the provider, nor the blockchain server in the blockchain network can cheat, realizing a fair resource flow transaction mode.
  • FIG. 1 schematically shows an exemplary system architecture of a transaction method and apparatus to which a resource flow can be applied according to an embodiment of the present disclosure
  • FIG. 2 schematically shows a flowchart of a resource flow transaction method according to an embodiment of the present disclosure
  • FIG. 3 schematically shows a flowchart of a resource flow transaction method according to another embodiment of the present disclosure
  • FIG. 4 schematically shows a flowchart of a resource flow transaction method according to another embodiment of the present disclosure
  • FIG. 5 schematically shows a schematic diagram of a transaction process of resource flows according to an embodiment of the present disclosure
  • FIG. 6 schematically shows a block diagram of a resource flow transaction device according to an embodiment of the present disclosure
  • FIG. 7 schematically shows a block diagram of a resource flow transaction device according to another embodiment of the present disclosure.
  • FIG. 8 schematically shows a block diagram of a resource flow transaction device according to another embodiment of the present disclosure.
  • FIG. 9 schematically shows a block diagram of a computer device suitable for implementing a transaction method of resource flow according to an embodiment of the present disclosure.
  • FIG. 1 schematically shows an exemplary system architecture 100 of a transaction method and apparatus to which a resource flow can be applied according to an embodiment of the present disclosure.
  • FIG. 1 is only an example of a system architecture to which embodiments of the present disclosure can be applied to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used for other Equipment, system, environment or scene.
  • the system architecture 100 may include a computer device 101, a computer device 102, and a network 103.
  • FIG. 1 shows that the computer device 101 is a server.
  • the computer device 101 may be a terminal device installed with various client applications, including but not limited to a smartphone, a tablet computer, a laptop computer, and a desktop.
  • a computer or the like, and the computer device 101 may be a server for providing various services.
  • 1 shows that the computer device 102 is a terminal device.
  • the computer device 102 may be a terminal device installed with various client applications, including but not limited to a smart phone, a tablet computer, a laptop writing computer, and A desktop computer or the like, the computer device 102 may also be a server for providing various services.
  • the network 103 is a medium used to provide a communication link between the computer device 101 and the computer device 102.
  • the network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables.
  • the computer device 101 and the computer device 102 can conduct resource flow transactions through the network 103.
  • the computer device 101 can serve as a requester that needs to use the resource flow, and the computer device 102 can serve as a provider that can provide the resource flow.
  • the computer device 102 provides the corresponding resource stream to the computer device 101.
  • the computer device 101 receives and uses the resource stream.
  • the computer device 101 stops using the resource stream, the computer device 101 needs to The computer device 102 pays the corresponding transaction fee, and the transaction ends after the transaction fee is paid.
  • the computer device 102 can serve as a requester that needs to use a resource stream, and the computer device 101 can serve as a provider that can provide a resource stream.
  • the computer device 101 After the transaction of the resource stream starts, the computer device 101 provides the corresponding resource stream to the computer device 102.
  • the computer device 102 receives and uses the resource stream.
  • the computer device 102 stops using the resource stream, the computer device 102 needs to pay the corresponding transaction fee to the computer device 101 according to the total amount of the resource stream it uses. After the transaction fee is paid, the transaction ends.
  • FIG. 1 It should be understood that the types and numbers of computer equipment and networks in FIG. 1 are only schematic. According to the implementation needs, it can have any type and any number of computer devices and networks.
  • FIG. 2 schematically shows a flowchart of a resource flow transaction method according to an embodiment of the present disclosure. The method is applied to a blockchain server, and the resource flow transaction process provided by the present disclosure is explained from the perspective of the blockchain server.
  • the method includes, in operation S201, acquiring the initial transaction information associated with the requester client and the provider client, and sending the initial transaction information to other blockchain servers, so that each blockchain server sends the transaction information
  • the initial transaction information is stored in the corresponding blockchain database.
  • the initial transaction information is used to establish the association between the corresponding requester client and the provider client before the transaction begins, where the requester client is the party that needs to purchase the resource flow, and the provider client is able to provide One side of the resource stream.
  • Multiple blockchain servers form a blockchain network, each blockchain server has a corresponding blockchain database, the data stored in each blockchain database is consistent, and multiple blockchain servers store data in the blockchain database The multi-party supervision of the data makes the data in the blockchain database immutable once stored.
  • credential information characterizing the state of the resource flow used by the requesting client is obtained.
  • a first value is determined based on the transaction initial information and the credential information, the first value is used to represent the value added by the requesting client to the account of the provider client, and the first value is sent To other blockchain servers, so that each blockchain server stores the first value in its corresponding blockchain database.
  • the first value represents the transaction fee that the requesting client should deliver to the provider client after the end of the transaction.
  • the transaction fee is paid through the predetermined digital currency.
  • the total value in its account is used to characterize the total amount of digital currency owned by the node, then the first value indicates the end of the transaction.
  • the value in the account of the post-requester client should be reduced / the value should be increased in the account of the provider client, and this first value is also recorded in the blockchain database through the blockchain server.
  • the blockchain network formed by the blockchain server will be associated
  • the initial transaction information of the requesting client and the provider client is recorded in the blockchain database.
  • the transaction status is monitored by obtaining the credential information that characterizes the status of the resource flow used by the requesting client.
  • the transaction initial information and voucher information are used to determine the fee that the requesting client of the transaction should pay to the provider client, and the fee information of the transaction should be recorded in the blockchain database through the blockchain network.
  • the relevant information from the beginning to the end of the transaction of the resource flow is recorded in the blockchain database.
  • the permanent authenticity of the transaction information of the resource flow is guaranteed.
  • Neither the requester, the provider, nor the blockchain server in the blockchain network can cheat, forming a credible supervision of the transaction behavior of the resource flow by multiple parties, and achieving a fair resource flow transaction mode.
  • the resource flow in the embodiments of the present disclosure refers to resources that can be provided continuously and in a stream and consumed as they are used, such as network traffic resources, power resources, computing resources, and real-time dynamics.
  • Designated data flow resources, etc., and various streaming expendable resources with such characteristics can be used as resource flows in the embodiments of the present disclosure, and are not limited herein.
  • the transaction of the resource flow often starts when the resource flow is used and ends when the resource flow is used. Therefore, the transaction fees corresponding to the resource flow exchange often need to be obtained after the transaction ends. And the corresponding transaction fees are calculated based on the total usage of resource streams.
  • operation S201 of the method shown in FIG. 2 to obtain the initial transaction information associated with the requestor client and the provider client may include: first, receiving the transaction request information sent by the requester client, The transaction request information includes identification information of the requesting client, identification information of the providing client, and a digital signature of the requesting client. Secondly, the transaction request information is verified based on the digital signature of the requester client, and if the verification is true, the transaction request information is sent to the provider client. Next, receive the transaction permission information sent by the provider client for the transaction request information, the transaction permission information including the transaction request information and the digital signature of the provider client, based on the digital number of the provider client The signature verifies the transaction permission information. If the verification is true, the transaction permission information is used as the initial transaction information associated with the requester client and the provider client.
  • the transaction request information sent by the requesting client is the information of the requesting client requesting to initiate a transaction in order to obtain the resource stream.
  • the identification information of the requesting client in the transaction request information indicates the identity of the requesting client Information
  • the identification information of the provider client indicates the identity information corresponding to one or more provider clients actively or passively selected by the requester client when initiating the transaction request
  • the digital signature of the requester client is used to prove the transaction request.
  • the authenticity of the information based on the digital signature of the requesting client client to verify the transaction request information, if the verification is true, it means that the transaction request information is true and effective, the transaction request information is forwarded to the corresponding provider client, so that The provider client decides whether to conduct the transaction.
  • the transaction permission information includes The digital signature of the provider client is used to prove the authenticity of the transaction permission information, and the transaction permission information is verified based on the digital signature of the provider client. If the verification is true, the transaction permission information is true and valid. Later, the transaction permission information is used as the initial transaction information of this transaction and stored in the blockchain database. If the verification is false, it means that the transaction permission information is forged.
  • the blockchain server is used as a third-party trusted supervision in the process of initial transaction information construction, and the authenticity of the process is verified by the digital signatures of both parties of the transaction to ensure that the transaction is fair and True and effective, the initial information of the transaction is stored in the blockchain database, indicating that the transaction has been established.
  • the transaction request information includes the provision
  • the digital signature of the client client can be verified not only based on the digital signature of the provider client in the transaction permission information, but also based on the requesting client in the transaction request information in the transaction permission information The digital signature of the terminal is verified again to ensure that the transaction request information in the transaction permission information has not been tampered with or forged.
  • the digital signatures of both parties of the transaction can be formed by asymmetric encryption.
  • the requesting client corresponds to a unique key pair, and the key pair includes a public key.
  • a private key where the public key can be made public, that is, other requesting client, each provider client, and / or each blockchain server can obtain the public key of the requesting client, while the private key is non-public, No other party can obtain the private key of the requesting client, only the requesting client can use the private key.
  • any provider client also has a dedicated key pair
  • any blockchain server can also have a dedicated key pair.
  • the digital signature of the requesting client in the transaction request information can be obtained by the requesting client encrypting the transaction request information based on its own private key, and the blockchain server can verify the digital signature using the public key of the requesting client Authenticity to prove the authenticity of the transaction request information.
  • the digital signature of the provider client in the transaction permission information may be obtained by the provider client encrypting the transaction permission information based on its own private key, and the blockchain server may use the public key of the provider client to verify the The authenticity of the digital signature to prove the authenticity of the transaction permission information.
  • both parties to the transaction can also form their own digital signatures in other ways.
  • the goal is to prove the authenticity of the information sent to multiple blockchain servers as third parties. Any method that can achieve this goal is acceptable. There are no restrictions here.
  • the transaction request information received by the blockchain server is in addition to the identification information of the requesting client, the identification information of the provider client, and the information of the requesting client. In addition to digital signatures, it can also include price information for resource streams.
  • the price information of the resource flow in the transaction request information can be used as the reference information when the provider client decides whether to agree to the transaction, and after the provider client agrees to the transaction and returns the transaction permission information, the price of the resource flow
  • the information is stored in the blockchain database as the price information carried in the initial transaction information as the official transaction price of this transaction.
  • the credential information obtained by the blockchain server is used to prove the number of resource streams used by the requesting client. Operation S203 of the method shown in FIG.
  • the 2 determines the first value based on the transaction initial information and the credential information includes: determining the total amount of resource flows used by the requesting client according to the credential information, and according to the resource flows The price information and the total amount of resource streams used by the requesting client determine the first value.
  • the requesting client can prepay the transaction deposit before the transaction starts, that is, the transaction request information received by the blockchain server also includes a second value, and the second value is used to characterize the requesting client
  • the reduced value in the account of the client means that the requesting client pays the second value of digital currency in advance as a deposit for this transaction.
  • the second value is used as the information carried in the initial information of the transaction.
  • multiple parties can witness the event that the requesting party pays the second value of the deposit in advance, which can ensure safety, effectiveness, and traceability.
  • the process of using the deposit paid in advance by the requesting client to pay the transaction fee may be handled as follows, that is, the operation S203 determining the first value based on the transaction initial information and the credential information further includes: if the second value is greater than the first value, A third numerical value is determined, the third numerical value being equal to the difference between the second numerical value and the first numerical value, and the third numerical value is used to characterize an increased numerical value in the account of the requesting client. If the second value is less than the first value, a fourth value is determined, where the fourth value is equal to the difference between the first value and the second value, and the fourth value is used to represent a reduced value in the account of the requesting client . Send the determined third value or fourth value to other blockchain servers, so that each blockchain server stores the third value or fourth value in their respective blockchain databases.
  • the first value represents the transaction fee that the requesting client should pay to the provider client
  • the second value represents the deposit paid in advance by the requesting client.
  • the second value is greater than the first value, it indicates that the requesting client paid in advance
  • the deposit is more than the transaction fee
  • the difference between the second value and the first value represents the balance of the deposit paid by the requesting client minus the transaction fee
  • the balance can be directly refunded to the account of the requesting client, the refund process
  • the value added to the account of the requesting client and corresponding to the third value, and storing the third value in the blockchain database also ensure that the excess deposit refund process is safe, effective, and traceable.
  • the second value is less than the first value, it means that the deposit paid in advance by the requesting client is less than the transaction fee, then the difference between the first value and the second value represents the transaction fee minus the deposit paid by the requesting client Defect, the deficiency needs to be supplemented by the requesting client, and the corresponding value is reduced from the account of the requesting client to supplement the deficiency corresponding to the fourth value, and storing the fourth value in the blockchain database also guarantees the supplementary deposit The lack of process is safe, effective and traceable. It can be seen that the present embodiment actually describes a complete solution for multiple refunds and small supplements on the deposit paid in advance by the requesting client.
  • the requesting client also prepays the transaction deposit before the transaction begins, and the transaction request information further includes a second value, which is used to characterize the account of the requesting client Reduced value in.
  • the process of using the deposit paid in advance by the requesting client to pay the transaction fee may be handled as follows, that is, the operation S203 determining the first value based on the transaction initial information and the credential information further includes: if the second value is greater than the first value, The difference between the second value and the first value is recorded as the fifth value.
  • the fifth value corresponds to the first resource flow transaction.
  • the two values are accumulated to obtain the updated second value corresponding to the next transaction of the resource flow.
  • the first value represents the transaction fee that the requesting client should pay to the provider client
  • the second value represents the deposit paid in advance by the requesting client.
  • the second value is greater than the first value, it indicates that the requesting client paid in advance
  • the deposit is more than the transaction fee
  • the difference between the second value and the first value represents the balance of the deposit paid by the requesting client minus the transaction fee, and the balance can continue to be retained as a deposit to the requesting client next time Transaction use is recorded as the fifth value.
  • the fifth recorded value and the updated second value can be stored in the blockchain database for recording to ensure that the remaining deposit process is safe, effective and traceable.
  • operation S202 of the method shown in FIG. 2 to obtain the credential information characterizing the state of the resource flow used by the requesting client includes: receiving the resource flow using credential sent by the provider client.
  • the resource stream using voucher also includes the digital signature of the requesting client and the provider client.
  • the resource flow using voucher is Sent by the requester client to the provider client, based on the digital signature of the requester client and the digital signature of the provider client to verify the resource flow usage credentials, if the verification is true, the The resource flow use credential is used as credential information of the requesting client to use the resource flow.
  • the resource flow usage credential in this embodiment is sent from the requesting client to the provider client, and then from the provider client to the blockchain server, and the resource flow usage credential is maintained through the joint witness of the three parties Security
  • this embodiment also verifies the authenticity of the voucher used by the resource flow through the digital signature of both parties of the transaction, ensuring the authenticity of the credential information, and thus ensuring the final transaction fee based on the credential information
  • the fairness and effectiveness of the transaction maintain the fairness of the transaction.
  • the asymmetric encryption method described above can also be used to form the digital signature of both parties to the transaction.
  • the requesting client can encrypt the resource flow using the certificate based on its private key to obtain the requesting client.
  • the digital signature of the client, the provider client encrypts the resource flow using the certificate and the digital signature of the requester client based on its private key to obtain the digital signature of the provider client.
  • the blockchain server can use the public key of the requester client and the The public key of the provider client verifies the authenticity of the digital signature of the requester client and the digital signature of the provider client to prove the authenticity of the transaction request information.
  • FIG. 3 schematically shows a flowchart of a resource flow transaction method according to another embodiment of the present disclosure. The method is applied to a requester client, and the resource flow transaction process provided by the present disclosure is explained from the perspective of the requester client .
  • the method includes selecting a provider client in operation S301, and establishing an association with the provider client through a blockchain server.
  • credential information representing the state of using the resource flow is generated according to a preset rule, and the credential information is sent to the blockchain server, and the blockchain server determines a first value based on the credential information.
  • the first value is used Characterize the value added by the requesting client to the account of the provider client.
  • the method shown in FIG. 3 establishes an association with the selected provider client through the blockchain server before the transaction starts, and sends the credential information to the blockchain server during the transaction to enable the blockchain server to Supervise the status of the transaction, and determine the transaction fee through the blockchain server to pay after the transaction.
  • the transaction of the resource flow is involved as a third-party blockchain server from the beginning to the end, and because the blockchain server is any node in the blockchain network, the behavior of any blockchain server is blocked Witnessed by multiple other blockchain servers in the blockchain network, thus forming a multi-party trusted supervision of the transaction behavior of the resource flow, whether it is the requester, the provider or the blockchain server in the blockchain network Cheating, realized a fair resource flow transaction model.
  • the resource flow in the embodiments of the present disclosure refers to resources that can be provided continuously and in a stream and consumed as they are used, for example, network traffic resources, power resources, computing resources, and real-time dynamics
  • resources that can be provided continuously and in a stream and consumed as they are used, for example, network traffic resources, power resources, computing resources, and real-time dynamics
  • network traffic resources for example, network traffic resources, power resources, computing resources, and real-time dynamics
  • One or more of the specified data flow resources and other resource flows are not limited here.
  • operation S301 of the method shown in FIG. 3 selects a provider client, and establishing an association with the provider client through the blockchain server includes: acquiring resource stream publications of multiple provider clients Information, the resource stream publishing information includes the identification information of the provider client and the price information of the resource stream, a provider client is selected based on the plurality of resource stream publishing information, and the transaction request information is sent to the blockchain server.
  • the blockchain server forwards the transaction request information to the selected provider client, so that the provider client starts to provide resource flow when the transaction request information is permitted.
  • any provider client can issue resource flow publishing information according to the characteristics of the resource flow it has.
  • the resource flow publishing information can be obtained by any requesting client.
  • the resource flow publishing information can include all The type, quantity, price and other relevant information of the resource flow that can be provided.
  • Any requesting client can choose the appropriate provider client according to its own needs. After determining the selected provider client, it can go through the blockchain
  • the server sends the transaction request information to the provider client, and the transaction of the resource flow can be started after obtaining the permission of the provider client.
  • the transaction request information sent by the requesting client after selecting the provider client may include the digital signature of the requesting client, so that the blockchain server is verifying based on the digital signature of the requesting client When the transaction request information is true, the transaction request information is forwarded to the provider client. It can be seen that this embodiment can prove the authenticity of the transaction request information through the digital signature of the requesting client carried in the transaction request information, and the transaction request information will only pass through the blockchain server if the transaction request information is true After being forwarded to the provider client, the corresponding transaction can be carried out.
  • the digital signature of the requesting client can be formed by asymmetric encryption.
  • the requesting client can encrypt the transaction request information based on its private key to obtain the digital signature of the requesting client.
  • the blockchain server can The public key corresponding to the requesting client is used to verify the authenticity of the transaction request information, which is described above and will not be repeated here.
  • operation S303 of the method shown in FIG. 3 generates credential information that characterizes the state of using the resource flow according to a preset rule, and sending the credential information to the blockchain server includes: During the period, a resource flow usage credential that characterizes the current usage status is generated at preset time intervals, and the resource flow usage credential is sent to the provider client, and the resource client uses the resource flow usage credential Send to the blockchain server. That is, the credential information is generated by the requesting client, sent from the requesting client to the provider client, and then sent from the provider client to the blockchain server in the blockchain network, forming a common witness of the credential information by multiple parties . In this embodiment, the resource flow usage credential is generated over time. The provider client can send each resource flow usage credential it receives to the blockchain server, or one or more of them can be sent to the district.
  • Blockchain server for example, can send the credential of the last resource stream generated by the requesting client to the blockchain server.
  • the requesting client After the requesting client starts to use the resource flow, it generates a resource flow usage voucher every preset time interval T and sends it to the provider client that provides the resource flow.
  • the resource flow usage voucher can record the requester Information such as the number of resource streams currently used by the client, so that the corresponding provider client is informed of the status and situation of the resource stream currently used by the requesting client, and can be stopped in time when the requesting client no longer continues to use the resource stream.
  • the supply of resource streams, and the subsequent calculation of the corresponding transaction fees based on the total amount of resource streams used by the requesting client.
  • the resource flow use credential in addition to the information characterizing the use status of the resource flow Including the digital signature of the requesting client, so that the provider client sends the resource flow using credential to the blockchain server when verifying that the resource flow using credential is true based on the digital signature of the requesting client .
  • the digital signature of the requesting client is added to the resource flow usage credential to prove the authenticity of the resource flow usage credential.
  • the provider client will use the resource flow only if the resource flow usage credential is authentic.
  • the voucher is sent to the blockchain server, and the resource flow voucher is considered valid.
  • the above digital signature of the requesting client can be formed by asymmetric encryption.
  • the requesting client can encrypt the resource flow using the certificate based on its own private key to obtain the digital signature of the requesting client.
  • the provider client The public key corresponding to the requesting client can be used to verify the authenticity of the credential used by the resource flow, which is described above and will not be repeated here.
  • FIG. 4 schematically shows a flowchart of a resource flow transaction method according to another embodiment of the present disclosure. The method is applied to a provider client, and the resource flow transaction process provided by the present disclosure is explained from the perspective of the provider client .
  • the method includes, in operation S401, establishing an association with the requesting client through the blockchain server, and providing the requesting client with a resource flow, so that the requesting client receives and uses the resource flow.
  • the credential information representing the status of the resource flow used by the requesting client is obtained, and the credential information is sent to the blockchain server, and the blockchain server determines the first value based on the credential information.
  • the first value is used to characterize the value added by the requesting client to the account of the providing client.
  • the method shown in FIG. 4 establishes an association with the corresponding requestor client through the blockchain server before the transaction begins, and sends the credential information to the blockchain server during the transaction to enable the blockchain server to deal with the transaction Supervise the status of the situation and determine the transaction fee through the blockchain server after the transaction is completed to enable the requesting client to make the payment.
  • the transaction of the resource flow is involved as a third-party blockchain server from the beginning to the end, and because the blockchain server is any node in the blockchain network, the behavior of any blockchain server is blocked Witnessed by multiple other blockchain servers in the blockchain network, thus forming a multi-party trusted supervision of the transaction behavior of the resource flow, whether it is the requester, the provider or the blockchain server in the blockchain network Cheating, realized a fair resource flow transaction model.
  • the resource flow in the embodiments of the present disclosure refers to resources that can be provided continuously and in a stream and consumed as they are used, for example, network traffic resources, power resources, computing resources, and real-time dynamics
  • resources that can be provided continuously and in a stream and consumed as they are used, for example, network traffic resources, power resources, computing resources, and real-time dynamics
  • network traffic resources for example, network traffic resources, power resources, computing resources, and real-time dynamics
  • One or more of the specified data flow resources and other resource flows are not limited here.
  • operation S401 of the method shown in FIG. 4 establishes an association with the requester client through the blockchain server, and providing the resource flow to the requester client includes: receiving the transaction request information sent by the blockchain server
  • the transaction request information includes the identification information of the requesting client and the digital signature of the requesting client.
  • the transaction request information is sent by the requesting client to the blockchain server.
  • the The blockchain server sends transaction permission information, the transaction permission information includes the transaction request information and the digital signature of the provider client, and starts to provide the resource flow to the requester client.
  • the transaction request information expressing the transaction requirements of the resource flow is sent to the provider client through the blockchain server, and the provider client can It is necessary to judge whether the transaction request information is permitted. If permitted, the corresponding transaction permission information is sent to the blockchain server, that is, the association between the requesting client and the provider client is established, and the transaction can be started. Then no subsequent processing is required, that is, the association between the requesting client and the provider client is not established, and the transaction cannot be performed.
  • the transaction request information carries the digital signature of the requesting client used to prove the authenticity of the transaction request information.
  • the blockchain server can verify the transaction request information based on the digital signature of the requesting client before verifying the transaction request information.
  • the transaction permission information carries the digital signature of the provider client used to prove the authenticity of the transaction permission information
  • the blockchain server can verify the authenticity of the transaction permission information based on the digital signature of the provider client, or, the blockchain server
  • the authenticity of the transaction permission information can be jointly verified not only by the digital signature of the provider client but also by the digital signature of the requester client in the transaction request information carried in the transaction permission information.
  • the digital signature of the requesting client and / or the digital signature of the provider client may be formed by asymmetric encryption, which is described above and will not be repeated here.
  • the transaction request information sent by the requesting client also includes the total amount of expected resource flows.
  • the provider The client can determine whether it can meet such supply demand according to the total amount of the expected resource flow, which is used as one of the references to determine whether to allow the transaction. That is to say, the operation S401 establishing an association with the requesting client through the blockchain server further includes: when the total amount of the expected resource flow is not greater than the total amount of the resource flow that can be provided, permitting the transaction request information.
  • operation S402 of the method shown in FIG. 4 acquires credential information that characterizes the state of the resource flow used by the requesting client, and sending the credential information to the blockchain server includes: receiving the The resource flow usage voucher sent by the requesting client, if the resource flow usage voucher is not received after a predetermined time, it is determined that the requesting client uses the resource flow to end, and the received resource flow usage voucher is sent to the block Chain server.
  • the provider client receives a resource flow usage voucher sent by the requesting client at preset intervals.
  • the resource flow usage voucher records information about the current usage status of the resource flow, such as the number of resource flows used.
  • the provider client After receiving a resource flow use certificate after the end, if the resource flow use certificate is not received after a predetermined time, it means that the requesting client has stopped using the resource flow and can stop the supply of the resource flow and settle the transaction fee through the blockchain server.
  • the resource flow usage credential sent by the requesting client includes the digital signature of the requesting client in addition to the information characterizing the use status of the resource flow, the digital signature is used to prove The authenticity of the resource flow usage credential
  • operation S402 sending the received resource flow usage credential to the blockchain server further includes: verifying the resource flow usage credential based on the digital signature of the requesting client, if verified If true, send the resource flow usage credentials to the blockchain server.
  • operation S402 sending the received resource flow usage credential to the blockchain server further includes: correspondingly sending the resource flow usage credential and the digital signature of the provider client to the blockchain server to enable the block
  • the chain server may verify the authenticity of the resource flow use credentials according to the digital signature of the provider client and / or the digital signature of the requester client.
  • the digital signature of the requesting client and the digital signature of the provider client are added to the resource flow usage credential to prove the authenticity of the resource flow usage credential. Only when the resource flow usage credential is true, the resource flow usage credential The voucher is considered valid, and the blockchain server can use the resource flow to use the voucher for transaction settlement.
  • the digital signature of the requesting client and / or the digital signature of the provider client may be formed by asymmetric encryption, which is described above and will not be repeated here.
  • FIGS. 2 to 4 will be further described below with reference to FIG. 5 in combination with specific embodiments.
  • FIG. 5 schematically shows a schematic diagram of a transaction process of resource flows according to an embodiment of the present disclosure.
  • the network flow resource is used as the resource flow for description, and various other resource flows are also possible, hereinafter referred to as "flow", the provider client can provide the flow, and the requester client needs to use the flow.
  • Multiple blockchain servers form a blockchain network.
  • the blockchain server participates in the start, conduct, and end of the transaction between the requesting client and the provider client by running a traffic sharing contract.
  • the traffic sharing contract is essentially Smart contracts are usually codes that are preset in the blockchain database and can be triggered to execute. After the trigger conditions are met, they can be run on the blockchain server to perform the corresponding operations. Due to the smart contracts stored in the blockchain database It is difficult to be tampered, so the smart contract can be used to execute the preset code logic, and it will not be interfered by any node during the execution process, and then perform reliable and trusted operations.
  • the sequence of the data flow is marked with a serial number in the figure.
  • the requesting client A searches through a dedicated channel for the traffic sharing information sent by each provider client, and the traffic sharing information corresponds to the above Publish information of resource flow, the flow sharing information sent by each provider client can record the unit flow price, the total amount of available flow, the type of flow, etc.
  • the dedicated channel used by the requesting client A may be a local area network provided by the provider client, so that the requesting client A can use it for free at certain times, in certain places, etc.
  • the dedicated channel may also be other As long as it can temporarily meet the request of the requesting client A to view the traffic sharing information.
  • the transaction request information includes: the identification information of the requesting client A, the identification information of the selected provider client B, The total amount of expected traffic and a second value that represents the amount of the deposit paid in advance, the second value corresponding to the value of the digital currency reduced from the account of the requesting client A, the requesting client A is also based on the generated
  • the transaction request information and the private key of the requesting client A generate a digital signature A1 of the requesting client A, and attach the digital signature A1 to the generated transaction request information.
  • the requesting client A sends the above transaction request information to the traffic sharing contract running in the blockchain server.
  • the traffic sharing contract After verifying that the transaction request information is true according to the public key of the requesting client A and the digital signature A1, the traffic sharing contract will The transaction request information is sent to the provider client B.
  • the provider client B can determine whether to allow traffic sharing to the requester client A based on the information recorded in the transaction request information. If the traffic sharing is permitted, the provider client B can generate the digital signature B1 of the provider client B based on the received transaction request information and the private key of the provider client B, attach the digital signature B1 to the received transaction request information to form the transaction permission information, provide Party B sends the transaction permission information to the traffic sharing contract to indicate that it agrees to share the traffic and starts to provide traffic to the requesting client A.
  • the traffic sharing contract can store the received transaction permission information in the blockchain database corresponding to each blockchain server through the consensus verification of each blockchain server to obtain joint supervision by multiple parties.
  • the requesting client A periodically sends traffic usage credentials to the provider client B.
  • the traffic usage credentials correspond to the resource flow usage credentials above.
  • Each traffic usage credential records the requesting client A from the beginning. Use the total amount of traffic used up to the time point corresponding to the traffic usage credential.
  • the provider client B can determine that the requester client A stops using traffic, and the provider client B can stop providing traffic to the requester client A, and submit the last received traffic usage voucher to the flow sharing contract. In this way, when the requesting client A has not sent the traffic usage credential to the provider client B for a long time, the provider client B can prevent the situation in which the requesting client A uses the traffic but does not pay by cutting off the traffic sharing.
  • the traffic sharing contract can calculate the transaction fee corresponding to this traffic sharing based on the traffic usage voucher and the unit traffic price, that is, the requesting client A should pay the provider
  • the value of the digital currency of the client B, the transaction fee is represented by the first value, and the first value represents the value added in the account of the client B of the provider.
  • the above transaction fee can be deducted from the deposit paid in advance by the requesting client A. For example, if the second value is 200 and the first value is 150, the remaining deposit after deducting the transaction fee from the deposit of the requesting client A is 50. The remaining deposit It can be processed according to the request of the requesting client A.
  • FIG. 6 schematically shows a block diagram of a resource flow transaction apparatus according to an embodiment of the present disclosure.
  • the resource flow transaction apparatus 600 is applied to a blockchain server.
  • the resource flow transaction device 600 includes an initiation module 601, an acquisition module 602, and a management module 603.
  • the initiating module 601 is used to obtain the initial transaction information associated with the requester client and the provider client, and send the initial transaction information to other blockchain servers, so that each blockchain server stores the initial transaction information in their corresponding Blockchain database.
  • the obtaining module 602 is used to obtain credential information characterizing the state of the resource flow used by the requesting client.
  • the management module 603 is used to determine a first value based on the initial transaction information and the credential information, and the first value is used to represent the value added by the requesting client to the account of the provider client, The first value is sent to other blockchain servers, so that each blockchain server stores the first value in its corresponding blockchain database.
  • the initiation module 601 obtaining the initial transaction information associated with the requester client and the provider client includes: the initiation module 601 is configured to receive the transaction request information sent by the requester client, the transaction request The information includes: the identification information of the requesting client, the identification information of the provider client, and the digital signature of the requesting client.
  • the transaction request information is verified based on the digital signature of the requesting client. If the verification is true, all Sending the transaction request information to the provider client, and receiving the transaction permission information sent by the provider client, the transaction permission information including the transaction request information and the digital signature of the provider client; based on the The digital signature of the provider client verifies the transaction permission information. If the verification is true, the transaction permission information is used as the initial transaction information associated with the requester client and the provider client.
  • the transaction request information may also include price information of the resource flow.
  • the management module 603 determines the first value based on the transaction initial information and the credential information includes: the management module 603 is configured to determine the total amount of resource flows used by the requester client according to the credential information, and according to the resource flows The price information and the total amount of resource streams used by the requesting client determine the first value.
  • the transaction request information further includes a second value
  • the second value is used to represent a reduced value in the account of the requesting client.
  • the management module 603 is further used to determine a third value when the second value is greater than the first value, the third value is equal to the difference between the second value and the first value, and the third value is used to characterize the requesting client The value added to the account at the end.
  • a fourth numeric value is determined when the second numeric value is less than the first numeric value, the fourth numeric value is equal to the difference between the first numeric value and the second numeric value, and the fourth numeric value is used to represent a reduced numeric value in the account of the requesting client .
  • Send the determined third value or fourth value to other blockchain servers, so that each blockchain server stores the third value or fourth value in their respective blockchain databases.
  • the transaction request information further includes a second value
  • the second value is used to represent a reduced value in the account of the requesting client.
  • the management module 603 is further used to record the difference between the second value and the first value as the fifth value when the second value is greater than the first value, and when the requesting client performs the next resource flow transaction, the The fifth value is accumulated with the second value corresponding to the transaction of the next resource flow to obtain an updated second value corresponding to the transaction of the next resource flow.
  • the obtaining module 602 obtaining the credential information characterizing the status of the resource flow used by the requesting client includes: the obtaining module 602 is configured to receive the resource flow using credential sent by the provider client
  • the resource flow usage credential includes the digital signature of the requester client and the provider client's digital signature.
  • the resource flow usage credential is sent by the requester client to the provider client based on the The digital signature of the requesting client and the digital signature of the provider client verify the resource flow use credential, and if the verification is true, the resource flow use credential is used as the credential information of the requester client using the resource flow .
  • the resource flow may include, but is not limited to, at least one of the following: network traffic resources, power resources, computing power resources, and / or designated data flow resources with real-time dynamics.
  • FIG. 7 schematically shows a block diagram of a resource flow transaction apparatus according to another embodiment of the present disclosure.
  • the resource flow transaction apparatus 700 is applied to a requester client.
  • the resource flow transaction device 700 includes a transaction establishment module 701, a resource reception module 702, and a transaction management module 703.
  • the transaction establishment module 701 is used to select a provider client and establish an association with the provider client through a blockchain server.
  • the resource receiving module 702 is used to receive and use the resource stream provided by the provider client.
  • the transaction management module 703 is used to generate credential information that characterizes the state of using the resource flow according to a preset rule, send the credential information to the blockchain server, and the blockchain server determines the first value based on the credential information.
  • the first value is used to characterize the value added by the requesting client to the account of the provider client.
  • the transaction establishment module 701 selects a provider client, and establishing an association with the provider client through the blockchain server includes: the transaction establishment module 701 is used to obtain resources of multiple provider clients Stream publishing information, the resource stream publishing information includes the identification information of the provider client and the price information of the resource stream, a provider client is selected based on the multiple resource stream publishing information, and the transaction request information is sent to the blockchain server, The blockchain server forwards the transaction request information to the selected provider client, so that the provider client starts to provide resource flow when the transaction request information is permitted.
  • the transaction request information may include the digital signature of the requesting client, so that the blockchain server forwards the transaction request information when verifying that the transaction request information is true based on the digital signature of the requesting client To the provider client.
  • the transaction management module 703 generates credential information that characterizes the state of using resource flows according to preset rules, and sending the credential information to the blockchain server includes: the transaction management module 703 is used to use resources During the flow, at every preset time interval, a resource flow usage credential that characterizes the current usage state is generated, and the resource flow usage credential is sent to the provider client, and the provider client sends the resource flow Use credentials to send to the blockchain server.
  • the resource flow usage credential includes the digital signature of the requesting client, so that the provider client verifies that the resource flow usage credential is true based on the digital signature of the requesting client, Then send the resource flow usage certificate to the blockchain server.
  • the resource flow may include, but is not limited to, at least one of the following: network traffic resources, power resources, computing power resources, and / or designated data flow resources with real-time dynamics.
  • FIG. 8 schematically shows a block diagram of a resource flow transaction apparatus according to another embodiment of the present disclosure.
  • the resource flow transaction apparatus 800 is applied to a provider client.
  • the resource flow transaction device 800 includes a transaction establishment module 801 and a transaction management module 802.
  • the transaction establishment module 801 is used to establish an association with the requester client through the blockchain server, and provide the resource flow to the requester client, so that the requester client receives and uses the resource flow.
  • the transaction management module 802 is used to obtain the credential information representing the status of the resource flow used by the requesting client, send the credential information to the blockchain server, and the blockchain server determines the first value based on the credential information, The first value is used to characterize the value added by the requester client to the account of the provider client.
  • the transaction establishment module 801 establishes an association with the requester client through the blockchain server, and provides the resource flow to the requester client.
  • the transaction establishment module 801 is used to receive transactions sent by the blockchain server Request information, the transaction request information includes the identification information of the requesting client and the digital signature of the requesting client, the transaction request information is sent by the requesting client to the blockchain server, when the transaction request information is approved , Send transaction permission information to the blockchain server, the transaction permission information includes the transaction request information and the digital signature of the provider client, and starts to provide resource flow to the requester client.
  • the transaction request information may also include the total estimated resource flow.
  • the transaction establishment module 801 is further configured to permit the transaction request information when the total estimated resource flow is not greater than the total available resource flow.
  • the transaction management module 802 obtains credential information that characterizes the state of the resource flow used by the requesting client, and sends the credential information to the blockchain server.
  • the transaction management module 802 is used to receive The resource flow usage voucher sent by the requesting client; if the resource flow usage voucher is not received after the predetermined time is exceeded, it is determined that the requesting client uses the resource flow to end, and the received resource flow usage voucher is sent to Blockchain server.
  • the resource flow usage credential sent by the requesting client includes the digital signature of the requesting client
  • the transaction management module 802 is further used to use the resource flow based on the digital signature of the requesting client
  • the certificate is verified, and if the verification is true, the resource flow use certificate is sent to the blockchain server; and / or, the transaction management module 802 is also used to send the resource flow use certificate and the digital signature of the provider client correspondingly To the blockchain server.
  • the resource flow may include, but is not limited to, at least one of the following: network traffic resources, power resources, computing power resources, and / or designated data flow resources with real-time dynamics.
  • the resource flow transaction device 600 and the resource flow transaction device 700 may be deployed in the same client or different clients, which is not limited herein.
  • modules, sub-modules, units, sub-units may be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to the embodiments of the present disclosure may be implemented by being split into multiple modules.
  • any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be at least partially implemented as hardware circuits, such as field programmable gate array (FPGA), programmable logic array (PLA), The system on chip, the system on the substrate, the system on the package, the application specific integrated circuit (ASIC), or any other reasonable means of hardware or firmware that can integrate or package the circuit, or in the form of software, hardware, and firmware Any one of these implementations or any suitable combination of any of them.
  • FPGA field programmable gate array
  • PLA programmable logic array
  • ASIC application specific integrated circuit
  • one or more of the modules, submodules, units, and subunits according to the embodiments of the present disclosure may be at least partially implemented as a computer program module, and when the computer program module is executed, it may perform a corresponding function.
  • any of the initiation module 601, the acquisition module 602, and the management module 603 may be combined and implemented in one module, or any one of the modules may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module.
  • At least one of the initiation module 601, the acquisition module 602, and the management module 603 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA) , System on chip, system on substrate, system on package, application specific integrated circuit (ASIC), or any other reasonable way to integrate or package the circuit, such as hardware or firmware, or in software, hardware and firmware Any one of the three implementations or any suitable combination of any of them.
  • FPGA field programmable gate array
  • PLA programmable logic array
  • ASIC application specific integrated circuit
  • at least one of the initiation module 601, the acquisition module 602, and the management module 603 may be at least partially implemented as a computer program module, and when the computer program module is executed, it may perform a corresponding function.
  • any one of the transaction establishment module 701, the resource receiving module 702, and the transaction management module 703 may be combined and implemented in one module, or any one of the modules may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module.
  • At least one of the transaction establishment module 701, the resource receiving module 702, and the transaction management module 703 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or any other reasonable way to integrate or package the circuit, such as hardware or firmware, or by software, Any one of the three implementations of hardware and firmware or any suitable combination of any of them can be implemented.
  • at least one of the transaction establishment module 701, the resource receiving module 702, and the transaction management module 703 may be at least partially implemented as a computer program module, and when the computer program module is executed, it may perform a corresponding function.
  • any of the transaction establishment module 801 and the transaction management module 802 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module.
  • At least one of the transaction establishment module 801 and the transaction management module 802 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip , The system on the substrate, the system on the package, the application specific integrated circuit (ASIC), or any other reasonable way to integrate or package the circuit, such as hardware or firmware, or three kinds of software, hardware, and firmware Any one of the modes or any suitable combination of any of them.
  • FPGA field programmable gate array
  • PLA programmable logic array
  • ASIC application specific integrated circuit
  • at least one of the transaction establishment module 801 and the transaction management module 802 may be at least partially implemented as a computer program module, and when the computer program module is executed, it may perform a corresponding function.
  • FIG. 9 schematically shows a block diagram of a computer device suitable for implementing the method described above according to an embodiment of the present disclosure.
  • the computer device shown in FIG. 9 is only an example, and should not bring any limitation to the functions and use scope of the embodiments of the present disclosure.
  • the computer device 900 includes a processor 901 that can be loaded into a random access memory (RAM) 903 according to a program stored in a read-only memory (ROM) 902 or from the storage section 908 Program to perform various appropriate actions and processing.
  • the processor 901 may include, for example, a general-purpose microprocessor (eg, CPU), an instruction set processor and / or related chipsets, and / or a dedicated microprocessor (eg, application specific integrated circuit (ASIC)), and so on.
  • the processor 901 may also include on-board memory for caching purposes.
  • the processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiments of the present disclosure.
  • the processor 901, ROM 902, and RAM 903 are connected to each other through a bus 904.
  • the processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing programs in the ROM 902 and / or the RAM 903. It should be noted that the program may also be stored in one or more memories other than ROM 902 and RAM 903.
  • the processor 901 may also perform various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in the one or more memories.
  • the computer device 900 may further include an input / output (I / O) interface 905, and the input / output (I / O) interface 905 is also connected to the bus 904.
  • the computer device 900 may also include one or more of the following components connected to the I / O interface 905: an input portion 906 including a keyboard, a mouse, etc .; including such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and An output section 907 of a speaker or the like; a storage section 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, etc.
  • the communication section 909 performs communication processing via a network such as the Internet.
  • the drive 910 is also connected to the I / O interface 905 as needed.
  • a removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed on the drive 910 as necessary, so that the computer program read out therefrom is installed into the storage section 908 as needed.
  • the method flow according to the embodiment of the present disclosure may be implemented as a computer software program.
  • embodiments of the present disclosure include a computer program product that includes a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication section 909, and / or installed from the removable medium 911.
  • the above-described functions defined in the system of the embodiment of the present disclosure are executed.
  • the above-described systems, devices, apparatuses, modules, units, etc. may be implemented by computer program modules.
  • the present disclosure also provides a computer-readable medium.
  • the computer-readable medium may be included in the device / apparatus / system described in the above embodiments; or may exist alone without being assembled into the device / apparatus / In the system.
  • the above computer-readable medium carries one or more programs, and when the above one or more programs are executed, the method according to an embodiment of the present disclosure is implemented.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer diskettes, hard drives, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal that is propagated in baseband or as part of a carrier wave, in which computer-readable program code is carried. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. .
  • the program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, optical cable, radio frequency signal, etc., or any suitable combination of the foregoing.
  • the computer-readable medium may include one or more memories other than the ROM 902 and / or RAM 903 and / or ROM 902 and RAM 903 described above.
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more for implementing a specified logical function Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession can actually be executed in parallel, and sometimes they can also be executed in reverse order, depending on the functions involved.
  • each block in the block diagram or flowchart, and a combination of blocks in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be used It is realized by a combination of dedicated hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Strategic Management (AREA)
  • Accounting & Taxation (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Economics (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • Game Theory and Decision Science (AREA)
  • Health & Medical Sciences (AREA)
  • Tourism & Hospitality (AREA)
  • General Engineering & Computer Science (AREA)
  • Water Supply & Treatment (AREA)
  • Educational Administration (AREA)
  • Public Health (AREA)
  • Operations Research (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)

Abstract

本公开提供了一种资源流的交易方法,应用于区块链服务器方法包括:获取关联请求方客户端和提供方客户端的交易初始信息,将所述交易初始信息发送至其他区块链服务器,使得各区块链服务器将所述交易初始信息存入各自对应的区块链数据库中;获取表征所述请求方客户端使用资源流的状态的凭证信息;基于所述交易初始信息和所述凭证信息确定第一数值,所述第一数值用于表征所述请求方客户端向所述提供方客户端的账户中增加的数值,将所述第一数值发送至其他区块链服务器,使得各区块链服务器将所述第一数值存入各自对应的区块链数据库中。本公开还公开了一种资源流的交易装置、一种计算机设备和一种计算机可读介质。

Description

资源流的交易方法和装置 技术领域
本公开涉及互联网技术领域,更具体地,涉及一种资源流的交易方法和装置。
背景技术
随着科学技术的发展,社会的连通性不断增强,资源的交易和分享变得越来越普遍,其中资源流因其流动性、消耗性的特点,常常在需要使用资源流的请求方和能够提供资源流的提供方进行交易。现有技术中,资源流的交易往往仅有请求方和提供方两方的参与,由于缺少可靠的其他方的监督,交易过程中经常会发生请求方和提供方中一方或多方通过作弊获取非法利益的恶意行为,资源流的交易无法公平、公正、透明地进行。
发明内容
有鉴于此,本公开提供了一种至少能够部分解决上述问题的资源流的交易方法和装置。
本公开的一个方面提供了一种资源流的交易方法,应用于区块链服务器,包括:获取关联请求方客户端和提供方客户端的交易初始信息,将所述交易初始信息发送至其他区块链服务器,使得各区块链服务器将所述交易初始信息存入各自对应的区块链数据库中,获取表征所述请求方客户端使用资源流的状态的凭证信息,基于所述交易初始信息和所述凭证信息确定第一数值,该第一数值用于表征所述请求方客户端向所述提供方客户端的账户中增加的数值,将该第一数值发送至其他区块链服务器,使得各区块链服务器将该第一数值存入各自对应的区块链数据库中。
可选地,上述获取关联请求方客户端和提供方客户端的交易初始信息包括:接收所述请求方客户端发送的交易请求信息,该交易请求信息包括:请求方客户端的标识信息、提供方客户端的标识信息、以及请求方客户端的数字签名,基于所述请求方客户端的数字签名对所述交易请求信息进行验证,若验证为真,将所述交易请求信息发送至所述提供方客户端,接收所述提供方客户端发送的交易准许信息,所述交易准许信息包括所述交易请求信息和所述提供方客户端 的数字签名,基于所述提供方客户端的数字签名对所述交易准许信息进行验证,若验证为真,将所述交易准许信息作为关联所述请求方客户端和所述提供方客户端的交易初始信息。
可选地,所述交易请求信息还包括资源流的价格信息。上述基于所述交易初始信息和所述凭证信息确定第一数值包括:根据所述凭证信息确定所述请求方客户端使用的资源流的总量,根据所述资源流的价格信息和所述请求方客户端使用的资源流的总量,确定第一数值。
可选地,所述交易请求信息还包括第二数值,所述第二数值用于表征所述请求方客户端的账户中减少的数值。上述基于所述交易初始信息和所述凭证信息确定第一数值还包括:如果第二数值大于第一数值,确定第三数值,该第三数值等于第二数值和第一数值的差值,该第三数值用于表征所述请求方客户端的账户中增加的数值,如果第二数值小于第一数值,确定第四数值,该第四数值等于第一数值和第二数值的差值,该第四数值用于表征所述请求方客户端的账户中减少的数值,将所确定的第三数值或第四数值发送至其他区块链服务器,使得各区块链服务器将第三数值或第四数值存入各自对应的区块链数据库中。
可选地,所述交易请求信息还包括第二数值,所述第二数值用于表征所述请求方客户端的账户中减少的数值。上述基于所述交易初始信息和所述凭证信息确定第一数值还包括:如果第二数值大于第一数值,记录第二数值与第一数值的差值为第五数值,当所述请求方客户端进行下一次资源流的交易时,将所述第五数值与所述下一次资源流的交易对应的第二数值相累加,得到所述下一次资源流的交易对应的更新后的第二数值。
可选地,上述获取表征所述请求方客户端使用资源流的状态的凭证信息包括:接收所述提供方客户端发送的资源流使用凭证,所述资源流使用凭证包括所述请求方客户端的数字签名和所述提供方客户端的数字签名,所述资源流使用凭证是由所述请求方客户端发送至所述提供方客户端的,基于所述请求方客户端的数字签名和所述提供方客户端的数字签名对所述资源流使用凭证进行验证,若验证为真,将所述资源流使用凭证作为所述请求方客户端使用资源流的凭证信息。
可选地,上述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
本公开的另一个方面提供了一种资源流的交易方法,应用于请求方客户端,包括:选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联,接收并使用所述提供方客户端提供的资源流,按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,所述第一数值用于表征请求方客户端向所述提供方客户端的账户中增加的数值。
可选地,上述选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联包括:获取多个提供方客户端的资源流发布信息,所述资源流发布信息包括提供方客户端的标识信息和资源流的价格信息,基于所述多个资源流发布信息选择一个提供方客户端,向区块链服务器发送交易请求信息,由区块链服务器将所述交易请求信息转发至所选择的提供方客户端,使得所述提供方客户端在准许所述交易请求信息时开始提供资源流。
可选地,所述交易请求信息包括请求方客户端的数字签名,使得区块链服务器在基于所述请求方客户端的数字签名验证所述交易请求信息为真时,再将所述交易请求信息转发至所述提供方客户端。
可选地,上述按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:在使用资源流的期间,每隔预设时间间隔生成表征当前使用状态的资源流使用凭证,并将所述资源流使用凭证发送至所述提供方客户端,由所述提供方客户端将所述资源流使用凭证发送至区块链服务器。
可选地,所述资源流使用凭证包括请求方客户端的数字签名,使得所述提供方客户端在基于所述请求方客户端的数字签名验证所述资源流使用凭证为真时,再将所述资源流使用凭证发送至区块链服务器。
可选地,上述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
本公开的另一个方面提供了一种资源流的交易方法,应用于提供方客户端,包括:通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流,使得请求方客户端接收并使用所述资源流,获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,所述第一数值用于表征所述请求方客户端向提供方客户端的账户中增加的数值。
可选地,上述通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流包括:接收区块链服务器发送的交易请求信息,所述交易请求信息包括请求方客户端的标识信息和请求方客户端的数字签名,所述交易请求信息是由请求方客户端发送至区块链服务器的,当准许所述交易请求信息时,向区块链服务器发送交易准许信息,所述交易准许信息包括所述交易请求信息和提供方客户端的数字签名,并开始向所述请求方客户端提供资源流。
可选地,所述交易请求信息还包括预计使用资源流总量。所述通过区块链服务器与请求方客户端建立关联还包括:当所述预计使用资源流总量不大于所能提供的资源流总量时,准许所述交易请求信息。
可选地,上述获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:接收所述请求方客户端发送的资源流使用凭证,若在超过预定时间后未收到资源流使用凭证,判定所述请求方客户端使用资源流结束,将所接收到的资源流使用凭证发送至区块链服务器。
可选地,所述请求方客户端发送的资源流使用凭证包括所述请求方客户端的数字签名,则上述将所接收到的资源流使用凭证发送至区块链服务器还包括:基于所述请求方客户端的数字签名对所述资源流使用凭证进行验证,若验证为真,将所述资源流使用凭证发送至区块链服务器。并且/或者,上述将所接收到的资源流使用凭证发送至区块链服务器还包括:将所述资源流使用凭证和提供方客户端的数字签名对应发送至区块链服务器。
可选地,上述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
本公开的另一个方面提供了一种资源流的交易装置,应用于区块链服务器,包括:发起模块、获取模块和管理模块。发起模块,用于获取关联请求方客户端和提供方客户端的交易初始信息,将所述交易初始信息发送至其他区块链服务器,使得各区块链服务器将所述交易初始信息存入各自对应的区块链数据库中。获取模块,用于获取表征所述请求方客户端使用资源流的状态的凭证信息。管理模块,用于基于所述交易初始信息和所述凭证信息确定第一数值,所述第一数值用于表征所述请求方客户端向所述提供方客户端的账户中增加的数值,将所述第一数值发送至其他区块链服务器,使得各区块链服务器将所述第一数值存入各自对应的区块链数据库中。
可选地,发起模块获取关联请求方客户端和提供方客户端的交易初始信息包括:发起模块,用于接收所述请求方客户端发送的交易请求信息,所述交易请求信息包括:请求方客户端的标识信息、提供方客户端的标识信息、以及请求方客户端的数字签名,基于所述请求方客户端的数字签名对所述交易请求信息进行验证,若验证为真,将所述交易请求信息发送至所述提供方客户端,接收所述提供方客户端发送的交易准许信息,所述交易准许信息包括所述交易请求信息和所述提供方客户端的数字签名,基于所述提供方客户端的数字签名对所述交易准许信息进行验证,若验证为真,将所述交易准许信息作为关联所述请求方客户端和所述提供方客户端的交易初始信息。
可选地,所述交易请求信息还包括资源流的价格信息。管理模块基于所述交易初始信息和所述凭证信息确定第一数值包括:管理模块,用于根据所述凭证信息确定所述请求方客户端使用的资源流的总量;根据所述资源流的价格信息和所述请求方客户端使用的资源流的总量,确定第一数值。
可选地,所述交易请求信息还包括第二数值,所述第二数值用于表征所述请求方客户端的账户中减少的数值。管理模块,还用于当第二数值大于第一数值时确定第三数值,所述第三数值等于第二数值和第一数值的差值,所述第三数值用于表征所述请求方客户端的账户中增加的数值;当第二数值小于第一数值时确定第四数值,所述第四数值等于第一数值和第二数值的差值,所述第四数值用于表征所述请求方客户端的账户中减少的数值;将所确定的第三数值或第四数值发送至其他区块链服务器,使得各区块链服务器将所述第三数值或第四数值存入各自对应的区块链数据库中。
可选地,所述交易请求信息还包括第二数值,所述第二数值用于表征所述请求方客户端的账户中减少的数值。管理模块,还用于当第二数值大于第一数值时记录第二数值与第一数值的差值为第五数值,当所述请求方客户端进行下一次资源流的交易时,将所述第五数值与所述下一次资源流的交易对应的第二数值相累加,得到所述下一次资源流的交易对应的更新后的第二数值。
可选地,获取模块获取表征所述请求方客户端使用资源流的状态的凭证信息包括:获取模块,用于接收所述提供方客户端发送的资源流使用凭证,所述资源流使用凭证包括所述请求方客户端的数字签名和所述提供方客户端的数字签名,所述资源流使用凭证是由所述请求方客户端发送至所述提供方客户端的;基于所述请求方客户端的数字签名和所述提供方客户端的数字签名对所述资源 流使用凭证进行验证,若验证为真,将所述资源流使用凭证作为所述请求方客户端使用资源流的凭证信息。
可选地,上述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
本公开的另一个方面提供了一种资源流的交易装置,应用于请求方客户端,包括:交易建立模块、资源接收模块和交易管理模块。交易建立模块,用于选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联。资源接收模块,用于接收并使用所述提供方客户端提供的资源流。交易管理模块,用于按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,所述第一数值用于表征请求方客户端向所述提供方客户端的账户中增加的数值。
可选地,交易建立模块选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联包括:交易建立模块,用于获取多个提供方客户端的资源流发布信息,所述资源流发布信息包括提供方客户端的标识信息和资源流的价格信息;基于所述多个资源流发布信息选择一个提供方客户端,向区块链服务器发送交易请求信息,由区块链服务器将所述交易请求信息转发至所选择的提供方客户端,使得所述提供方客户端在准许所述交易请求信息时开始提供资源流。
可选地,所述交易请求信息包括请求方客户端的数字签名,使得区块链服务器在基于所述请求方客户端的数字签名验证所述交易请求信息为真时,再将所述交易请求信息转发至所述提供方客户端。
可选地,交易管理模块按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:交易管理模块,用于在使用资源流的期间,每隔预设时间间隔生成表征当前使用状态的资源流使用凭证,并将所述资源流使用凭证发送至所述提供方客户端,由所述提供方客户端将所述资源流使用凭证发送至区块链服务器。
可选地,所述资源流使用凭证包括请求方客户端的数字签名,使得所述提供方客户端在基于所述请求方客户端的数字签名验证所述资源流使用凭证为真时,再将所述资源流使用凭证发送至区块链服务器。
可选地,上述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
本公开的另一个方面提供了一种资源流的交易装置,应用于提供方客户端,包括:交易建立模块和交易管理模块。交易建立模块,用于通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流,使得请求方客户端接收并使用所述资源流。交易管理模块,用于获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,所述第一数值用于表征所述请求方客户端向提供方客户端的账户中增加的数值。
可选地,交易建立模块通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流包括:交易建立模块,用于接收区块链服务器发送的交易请求信息,所述交易请求信息包括请求方客户端的标识信息和请求方客户端的数字签名,所述交易请求信息是由请求方客户端发送至区块链服务器的;当准许所述交易请求信息时,向区块链服务器发送交易准许信息,所述交易准许信息包括所述交易请求信息和提供方客户端的数字签名,并开始向所述请求方客户端提供资源流。
可选地,所述交易请求信息还包括预计使用资源流总量。交易建立模块,还用于当所述预计使用资源流总量不大于所能提供的资源流总量时,准许所述交易请求信息。
可选地,交易管理模块获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:交易管理模块,用于接收所述请求方客户端发送的资源流使用凭证;若在超过预定时间后未收到资源流使用凭证,判定所述请求方客户端使用资源流结束,将所接收到的资源流使用凭证发送至区块链服务器。
可选地,所述请求方客户端发送的资源流使用凭证包括所述请求方客户端的数字签名,则交易管理模块,还用于基于所述请求方客户端的数字签名对所述资源流使用凭证进行验证,若验证为真,将所述资源流使用凭证发送至区块链服务器。并且/或者,交易管理模块,还用于将所述资源流使用凭证和提供方客户端的数字签名对应发送至区块链服务器。
可选地,上述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
本公开的另一个方面提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如上所述的资源流的交易方法。
本公开的另一个方面提供了一种非易失性存储介质,存储有计算机可执行指令,所述指令在被执行时用于实现如上所述的资源流的交易方法。
本公开的另一个方面提供了一种计算机程序,所述计算机程序包括计算机可执行指令,所述指令在被执行时用于实现如上所述的资源流的交易方法。
根据本公开的实施例,可以至少部分地解决/减轻/抑制/甚至避免资源流交易过程中请求方和提供方任一方或多方作弊的问题,资源流的交易从开始到结束均有作为第三方的区块链服务器参与,且由于区块链服务器为区块链网络中的任意节点,任一区块链服务器的行为被区块链网络中的其它多个区块链服务器所见证,因此形成了对于资源流的交易行为的多方可信监督,无论是请求方、提供方还是区块链网络中的区块链服务器均无法作弊,实现了公平的资源流的交易模式。
附图说明
通过以下参照附图对本公开实施例的描述,本公开的上述以及其他目的、特征和优点将更为清楚,在附图中:
图1示意性示出了根据本公开实施例的可以应用资源流的交易方法和装置的示例性系统架构;
图2示意性示出了根据本公开的实施例的资源流的交易方法的流程图;
图3示意性示出了根据本公开的另一个实施例的资源流的交易方法的流程图;
图4示意性示出了根据本公开的另一个实施例的资源流的交易方法的流程图;
图5示意性示出了根据本公开的实施例的资源流的交易过程的示意图;
图6示意性示出了根据本公开的实施例的资源流的交易装置的框图;
图7示意性示出了根据本公开的另一个实施例的资源流的交易装置的框图;
图8示意性示出了根据本公开的另一个实施例的资源流的交易装置的框图;以及
图9示意性示出了根据本公开实施例的适于实现资源流的交易方法的计算 机设备的框图。
具体实施方式
以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体细节的情况下也可以被实施。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。
在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。在此使用的术语“包括”、“包含”等表明了所述特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。
在此使用的所有术语(包括技术和科学术语)具有本领域技术人员通常所理解的含义,除非另外定义。应注意,这里使用的术语应解释为具有与本说明书的上下文相一致的含义,而不应以理想化或过于刻板的方式来解释。
在使用类似于“A、B和C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B和C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。在使用类似于“A、B或C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B或C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。本领域技术人员还应理解,实质上任意表示两个或更多可选项目的转折连词和/或短语,无论是在说明书、权利要求书还是附图中,都应被理解为给出了包括这些项目之一、这些项目任一方、或两个项目的可能性。例如,短语“A或B”应当被理解为包括“A”或“B”、或“A和B”的可能性。
图1示意性示出了根据本公开实施例的可以应用资源流的交易方法和装置的示例性系统架构100。需要注意的是,图1所示仅为可以应用本公开实施例的系统架构的示例,以帮助本领域技术人员理解本公开的技术内容,但并不意味着本公开实施例不可以用于其他设备、系统、环境或场景。
如图1所示,根据该实施例的系统架构100可以包括计算机设备101、计算 机设备102和网络103。图1中示出计算机设备101是一个服务器,在其他实施例中计算机设备101可以是安装有各种客户端应用的终端设备,包括但不限于智能手机、平板电脑、膝上型编写计算机和台式计算机等等,计算机设备101也可以是用于提供各种服务的服务器。图1中示出计算机设备102是一个终端设备,在其他实施例中计算机设备102可以是安装有各种客户端应用的终端设备,包括但不限于智能手机、平板电脑、膝上型编写计算机和台式计算机等等,计算机设备102也可以是用于提供各种服务的服务器。网络103是用以在计算机设备101和计算机设备102之间提供通信链路的介质,网络103可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
计算机设备101和计算机设备102通过网络103可以进行资源流的交易,例如,计算机设备101可以作为需要使用资源流的请求方,计算机设备102可以作为能够提供资源流的提供方,在资源流的交易开始之后,计算机设备102向计算机设备101提供相应的资源流,计算机设备101接收并使用资源流,当计算机设备101停止使用资源流后,计算机设备101需按照其所使用的资源流的总量向计算机设备102支付相应的交易费用,交易费用支付之后交易结束。同理,计算机设备102可以作为需要使用资源流的请求方,计算机设备101可以作为能够提供资源流的提供方,在资源流的交易开始之后,计算机设备101向计算机设备102提供相应的资源流,计算机设备102接收并使用资源流,当计算机设备102停止使用资源流后,计算机设备102需按照其所使用的资源流的总量向计算机设备101支付相应的交易费用,交易费用支付之后交易结束。
应该理解,图1中的计算机设备和网络的类型和数目仅仅是示意性的。根据实现需要,可以具有任意类型、任意数目的计算机设备和网络。
图2示意性示出了根据本公开的实施例的资源流的交易方法的流程图,该方法应用于区块链服务器,从区块链服务器的角度说明本公开提供的资源流的交易过程。
如图2所示,该方法包括在操作S201,获取关联请求方客户端和提供方客户端的交易初始信息,将所述交易初始信息发送至其他区块链服务器,使得各区块链服务器将所述交易初始信息存入各自对应的区块链数据库中。
本操作中,交易初始信息用于在交易开始前建立相应的请求方客户端和提供方客户端之间的关联,其中请求方客户端为需要购买资源流的一方,提供方客户端为可以提供资源流的一方。多个区块链服务器构成区块链网络,每个区 块链服务器具有对应的区块链数据库,各区块链数据库中所存数据保持一致,且多个区块链服务器对区块链数据库中所存数据的多方监督使得区块链数据库中的数据一旦存入即不可篡改。
然后,在操作S202,获取表征所述请求方客户端使用资源流的状态的凭证信息。
在操作S203,基于所述交易初始信息和所述凭证信息确定第一数值,第一数值用于表征所述请求方客户端向所述提供方客户端的账户中增加的数值,将第一数值发送至其他区块链服务器,使得各区块链服务器将第一数值存入各自对应的区块链数据库中。
在本操作中,第一数值表示本次交易结束后请求方客户端应交付给提供方客户端的交易费用,本方案中交易费用均通过预定的数字货币进行支付,对于任一节点,无论是任一请求方客户端、任一提供方客户端、和/或任一区块链服务器,其账户中的总数值用于表征该节点所具有的数字货币的总量,则第一数值表示交易结束后请求方客户端的账户中应减少/提供方客户端的账户中应增加的数值,该第一数值也通过区块链服务器记录于区块链数据库中。
可见,图2所示的方法在创建和开展请求方客户端和提供方客户端之间的资源流的交易的过程中,在交易开始前,通过区块链服务器形成的区块链网络将关联请求方客户端和提供方客户端的交易初始信息记录于区块链数据库中,在交易进行中,通过获取表征请求方客户端使用资源流的状态的凭证信息对交易进行状态情况进行监督,以及在交易结束后,通过交易初始信息和凭证信息确定本次交易请求方客户端应当向提供方客户端交付的费用,并通过区块链网络将本次交易应当交付的费用信息记录于区块链数据库中。按照此方法,资源流的交易从开始到结束的相关信息均被记录于区块链数据库中,基于区块链数据库中的数据不可篡改的特性,保证资源流的交易相关信息的永久真实性,无论是请求方、提供方还是区块链网络中的区块链服务器均无法作弊,形成了多方对资源流的交易行为的可信监督,实现了公平的资源流的交易模式。
需要说明的是,本公开实施例中的资源流是指可以连续、流式地被提供,并随着使用而消耗的资源,例如可以是网络流量资源、电力资源、算力资源、具有实时动态的指定数据流资源等等,具有此类特点的各种流式消耗性资源均可以作为本公开实施例中的资源流,在此不做限制。基于资源流的上述特点,资源流的交易往往是以资源流开始被使用而开始,以资源流结束被使用而结束, 因此资源流的交易所对应的交易费用经常需要在交易结束后才能获得,而且是根据资源流的使用总量而计算出相应的交易费用。
在本公开的一个实施例中,图2所示方法的操作S201获取关联请求方客户端和提供方客户端的交易初始信息可以包括:首先,接收所述请求方客户端发送的交易请求信息,所述交易请求信息包括:请求方客户端的标识信息、提供方客户端的标识信息、以及请求方客户端的数字签名。其次,基于所述请求方客户端的数字签名对所述交易请求信息进行验证,若验证为真,将所述交易请求信息发送至所述提供方客户端。接着,接收所述提供方客户端针对所述交易请求信息发送的交易准许信息,所述交易准许信息包括所述交易请求信息和所述提供方客户端的数字签名,基于所述提供方客户端的数字签名对所述交易准许信息进行验证,若验证为真,将所述交易准许信息作为关联所述请求方客户端和所述提供方客户端的交易初始信息。
本实施例中,请求方客户端发送的交易请求信息是请求方客户端为获得资源流而请求发起交易的信息,交易请求信息中的请求方客户端的标识信息表明了请求方客户端自己的身份信息,提供方客户端的标识信息表明了请求方客户端在发起交易请求时所主动或被动选择的一个或多个提供方客户端对应的身份信息,请求方客户端的数字签名用于证明该交易请求信息的真实性,基于所述请求方客户端的数字签名对交易请求信息进行验证,若验证为真则说明该交易请求信息真实有效,将该交易请求信息转发至相应的提供方客户端,以使提供方客户端决定是否要进行交易,若验证为假则说明该交易请求信息是伪造的,对该交易请求信息不做后续处理,以使该异常交易不能被建立。在将交易请求信息转发至相应提供方客户端后,若接收到该提供方客户端返回的交易准许信息,说明该提供方客户端同意进行交易,交易准许信息中除了原本的交易请求信息还有提供方客户端的数字签名,用于证明该交易准许信息的真实性,基于所述提供方客户端的数字签名对所述交易准许信息进行验证,若验证为真则说明该交易准许信息真实有效,在后续将该交易准许信息作为本次交易的交易初始信息并存入区块链数据库中,若验证为假则说明该交易准许信息是伪造的,对该交易准许信息不做后续处理,作为未获取到交易初始信息的情形,以使该异常交易不能被建立。可见,本实施例以区块链服务器作为交易初始信息构建过程中的第三方可信监督,通过交易双方的数字签名来对该过程的真实性进行 验证,保证交易从被建立初始即是公平、真实、有效的,交易初始信息被存入区块链数据库则表明该交易被建立起来了。
作为一个可选的实施例,在接收到提供方客户端针对交易请求信息返回的交易准许信息后,由于交易准许信息中包括交易请求信息和提供方客户端的数字签名,而交易请求信息中包括提供方客户端的数字签名,为了更可靠地验证交易准许信息的真实性,可以不仅基于交易准许信息中的提供方客户端的数字签名进行验证,还基于交易准许信息中的交易请求信息中的请求方客户端的数字签名再一次进行验证,保证交易准许信息中的交易请求信息没有被篡改或伪造。
具体地,本实施例中可以采用不对称加密的方式形成交易双方的数字签名,对于任一请求方客户端,该请求方客户端对应于唯一的密钥对,该密钥对包括一个公钥和一个私钥,其中公钥是可以公开的,即其他请求方客户端、各提供方客户端、和/或各区块链服务器可以获得该请求方客户端的公钥,而私钥是非公开的,其他任意方都不能获得该请求方客户端的私钥,只有该请求方客户端自己能够使用该私钥。同理,任一提供方客户端也具有专属的密钥对,任一区块链服务器也可以具有专属的密钥对。交易请求信息中的请求方客户端的数字签名可以是该请求方客户端基于自己的私钥对交易请求信息进行加密得到的,区块链服务器可以利用该请求方客户端的公钥验证该数字签名的真伪,以证明交易请求信息的真伪。并且/或者,交易准许信息中的提供方客户端的数字签名可以是提供方客户端基于自己的私钥对交易准许信息进行加密得到的,区块链服务器可以利用该提供方客户端的公钥验证该数字签名的真伪,以证明交易准许信息的真伪。在其他实施例中,交易双方也可以采用其他方式形成各自的数字签名,目标在于向作为第三方的多个区块链服务器证明所发出信息的真实性,能够实现该目标的任意方式均可以,在此不做限制。
在上述获取交易初始信息的过程中,作为一个可选的实施例,区块链服务器所接收的交易请求信息中除了上述的请求方客户端的标识信息、提供方客户端的标识信息、请求方客户端的数字签名之外,还可以包括资源流的价格信息。交易请求信息中的资源流的价格信息可以作为在提供方客户端决定是否同意进行交易时的参考信息,以及,在提供方客户端同意进行交易并返回交易准许信息后,所述资源流的价格信息即作为交易初始信息中所携带的价格信息一同保存于区块链数据库中,作为本次交易的正式交易价格。区块链服务器所获取的 凭证信息是用于证明请求方客户端已使用的资源流的数量。图2所示方法的操作S203基于所述交易初始信息和所述凭证信息确定第一数值包括:根据所述凭证信息确定所述请求方客户端使用的资源流的总量,根据所述资源流的价格信息和所述请求方客户端使用的资源流的总量,确定第一数值。
在本公开的一个实施例中,请求方客户端可以在交易开始前预付交易押金,即区块链服务器所接收的交易请求信息还包括第二数值,第二数值用于表征所述请求方客户端的账户中减少的数值,表示请求方客户端预先支付第二数值的数字货币作为本次交易的押金,当提供方客户端同意进行交易后,第二数值作为交易初始信息中携带的信息一同被存入区块链数据库中,多方均可见证请求方预先支付第二数值的押金这一事件,能够保证安全、有效、可追溯。利用请求方客户端预先支付的押金支付交易费用的过程可以按照如下方式处理,即操作S203基于所述交易初始信息和所述凭证信息确定第一数值还包括:如果第二数值大于第一数值,确定第三数值,所述第三数值等于第二数值和第一数值的差值,所述第三数值用于表征所述请求方客户端的账户中增加的数值。如果第二数值小于第一数值,确定第四数值,所述第四数值等于第一数值和第二数值的差值,所述第四数值用于表征所述请求方客户端的账户中减少的数值。将所确定的第三数值或第四数值发送至其他区块链服务器,使得各区块链服务器将所述第三数值或第四数值存入各自对应的区块链数据库中。
其中,第一数值表示请求方客户端应当交付给提供方客户端的交易费用,第二数值表示请求方客户端预先支付的押金,当第二数值大于第一数值时,说明请求方客户端预先支付的押金多于交易费用,则第二数值与第一数值的差值表示请求方客户端所支付的押金减去交易费用后的余额,该余额可以直接退还至请求方客户端的账户,该退还过程请求方客户端的账户所增加的数值及对应于第三数值,将该第三数值存入区块链数据库中同样保证了该多余押金退还过程的安全、有效、可追溯。当第二数值小于第一数值时,说明请求方客户端预先支付的押金少于交易费用,则第一数值与第二数值的差值表示交易费用减去请求方客户端所支付的押金后的欠缺,该欠缺需要由请求方客户端进行补充,从请求方客户端的账户减少相应的数值以补充该欠缺对应于第四数值,将该第四数值存入区块链数据库中同样保证了补充押金欠缺过程的安全、有效、可追溯。可以看出,本实施例实际上描述了关于请求方客户端预先支付的押金进行多退少补的完整方案。
在本公开的另一个实施例中,同样是请求方客户端在交易开始前预付交易押金,所述交易请求信息还包括第二数值,所述第二数值用于表征所述请求方客户端的账户中减少的数值。利用请求方客户端预先支付的押金支付交易费用的过程可以按照如下方式处理,即操作S203基于所述交易初始信息和所述凭证信息确定第一数值还包括:如果第二数值大于第一数值,记录第二数值与第一数值的差值为第五数值,当所述请求方客户端进行下一次资源流的交易时,将所述第五数值与所述下一次资源流的交易对应的第二数值相累加,得到所述下一次资源流的交易对应的更新后的第二数值。
其中,第一数值表示请求方客户端应当交付给提供方客户端的交易费用,第二数值表示请求方客户端预先支付的押金,当第二数值大于第一数值时,说明请求方客户端预先支付的押金多于交易费用,则第二数值与第一数值的差值表示请求方客户端所支付的押金减去交易费用后的余额,该余额可以继续作为押金留至该请求方客户端下次交易使用,被记录为第五数值。在该请求方客户端下一次进行资源流的交易时,如果该请求方客户端新支付的押金同样对应于第二数值,将之前剩余的第五数值与这次新支付的第二数值相累加,得到现有的总的押金数量,再利用该现有的总的押金数量来支付新的交易费用。优选地,每次记录的第五数值和更新后的第二数值均可以存入区块链数据库中进行记录,以保证上述剩余押金继续使用过程的安全、有效、可追溯。
在本公开的一个实施例中,图2所示方法的操作S202获取表征所述请求方客户端使用资源流的状态的凭证信息包括:接收所述提供方客户端发送的资源流使用凭证,所述资源流使用凭证中除证明请求方客户端已使用资源流的数量的信息之外,还包括所述请求方客户端的数字签名和所述提供方客户端的数字签名,所述资源流使用凭证是由所述请求方客户端发送至所述提供方客户端的,基于所述请求方客户端的数字签名和所述提供方客户端的数字签名对所述资源流使用凭证进行验证,若验证为真,将所述资源流使用凭证作为所述请求方客户端使用资源流的凭证信息。可见,一方面,本实施例中的资源流使用凭证由请求方客户端发送至提供方客户端,再由提供方客户端发送至区块链服务器,通过三方的共同见证来维护资源流使用凭证的安全性,另一方面,本实施例还通过交易双方的数字签名来对资源流使用凭证的真实性进行验证,保证了凭证信息的真实性,进而保证了最终基于凭证信息所确定的交易费用的公平有效性,维护了交易公平。
具体地,本实施例中也可以采用上文所述的不对称加密的方式形成交易双方的数字签名,例如可以是请求方客户端基于自己的私钥对资源流使用凭证进行加密得到请求方客户端的数字签名,提供方客户端基于自己的私钥对资源流使用凭证和请求方客户端的数字签名进行加密得到提供方客户端的数字签名,区块链服务器可以利用该请求方客户端的公钥以及该提供方客户端的公钥验证请求方客户端的数字签名以及提供方客户端的数字签名的真伪,以证明交易请求信息的真伪。
图3示意性示出了根据本公开的另一个实施例的资源流的交易方法的流程图,该方法应用于请求方客户端,从请求方客户端的角度说明本公开提供的资源流的交易过程。
如图3所示,该方法包括在操作S301,选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联。
在操作S302,接收并使用所述提供方客户端提供的资源流。
在操作S303,按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,第一数值用于表征请求方客户端向所述提供方客户端的账户中增加的数值。
可见,图3所示的方法在交易开始前通过区块链服务器与所选择的提供方客户端建立关联进行交易,在交易进行中通过向区块链服务器发送凭证信息以使区块链服务器对交易进行状态情况进行监督,以及在交易结束后通过区块链服务器确定交易费用以进行支付。按照此方法,资源流的交易从开始到结束均有作为第三方的区块链服务器参与,且由于区块链服务器为区块链网络中的任意节点,任一区块链服务器的行为被区块链网络中的其它多个区块链服务器所见证,因此形成了对于资源流的交易行为的多方可信监督,无论是请求方、提供方还是区块链网络中的区块链服务器均无法作弊,实现了公平的资源流的交易模式。
如上文所述,本公开实施例中的资源流是指可以连续、流式地被提供,并随着使用而消耗的资源,例如可以是网络流量资源、电力资源、算力资源、具有实时动态的指定数据流资源等等资源流中的一种或多种,在此不做限制。
在本公开的一个实施例中,图3所示方法的操作S301选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联包括:获取多个提供方客 户端的资源流发布信息,所述资源流发布信息包括提供方客户端的标识信息和资源流的价格信息,基于所述多个资源流发布信息选择一个提供方客户端,向区块链服务器发送交易请求信息,由区块链服务器将所述交易请求信息转发至所选择的提供方客户端,使得所述提供方客户端在准许所述交易请求信息时开始提供资源流。
通过本实施例,任一提供方客户端可以根据自身所具有的资源流的特点发放资源流发布信息,该资源流发布信息可以被任一请求方客户端获取,该资源流发布信息可以包括所能提供的资源流的种类、数量、价格等等相关信息,任一请求方客户端均可根据自身需求选择合适的提供方客户端,在确定所选择的提供方客户端之后再通过区块链服务器将交易请求信息发送至该提供方客户端,得到提供方客户端的准许后即可开始进行资源流的交易。
作为一个可选的实施例,请求方客户端在选定提供方客户端后发送的交易请求信息可以包括请求方客户端的数字签名,使得区块链服务器在基于所述请求方客户端的数字签名验证所述交易请求信息为真时,再将所述交易请求信息转发至所述提供方客户端。可见,本实施例可以通过交易请求信息中携带的请求方客户端的数字签名来证明该交易请求信息的真实性,只有在交易请求信息是真实的情况下该交易请求信息才会通过区块链服务器被转发至提供方客户端,相应的交易才能得以进行。
具体地,上述请求方客户端的数字签名可以通过不对称加密的方式形成,例如可以是请求方客户端基于自己的私钥对交易请求信息进行加密得到请求方客户端的数字签名,区块链服务器可以利用该请求方客户端对应的公钥来验证该交易请求信息的真伪,上文中有相应描述,在此不再赘述。
在本公开的一个实施例中,图3所示方法的操作S303按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:在使用资源流的期间,每隔预设时间间隔生成表征当前使用状态的资源流使用凭证,并将所述资源流使用凭证发送至所述提供方客户端,由所述提供方客户端将所述资源流使用凭证发送至区块链服务器。即凭证信息由请求方客户端生成,从请求方客户端发送至提供方客户端,再从提供方客户端发送至区块链网络中的区块链服务器,形成了多方对凭证信息的共同见证。本实施例中资源流使用凭证随时间推移而生成,提供方客户端可以将其所接收到的各资源流使用 凭证均发送至区块链服务器,也可以将其中的一个或多个发送至区块链服务器,如可以将请求方客户端所生成的最后一个资源流使用凭证发送至区块链服务器。
例如,请求方客户端可以在开始使用资源流后,每隔预设时间间隔T生成一个资源流使用凭证并发送至提供该资源流的提供方客户端,该资源流使用凭证中可以记录请求方客户端当前已使用资源流的数量等信息,以使相应的提供方客户端获知请求方客户端目前使用资源流的状态和情况,在请求方客户端不再继续使用资源流时也能及时停止资源流的供应,并能在后续根据请求方客户端所使用的资源流的总量来计算相应的交易费用。
进一步地,为了增加凭证信息的可信度,避免凭证信息被伪造或在传递过程中被篡改,作为一个可选的实施例,资源流使用凭证中除表征资源流的使用状态的信息之外还包括请求方客户端的数字签名,使得所述提供方客户端在基于所述请求方客户端的数字签名验证所述资源流使用凭证为真时,再将所述资源流使用凭证发送至区块链服务器。本实施例通过在资源流使用凭证中增加请求方客户端的数字签名以证明该资源流使用凭证的真实性,只有在资源流使用凭证是真实的情况下提供方客户端才会将该资源流使用凭证发送至区块链服务器,该资源流使用凭证才被视为有效。
具体地,上述请求方客户端的数字签名可以通过不对称加密的方式形成,例如可以是请求方客户端基于自己的私钥对资源流使用凭证进行加密得到请求方客户端的数字签名,提供方客户端可以利用该请求方客户端对应的公钥来验证该资源流使用凭证的真伪,上文中有相应描述,在此不再赘述。
图4示意性示出了根据本公开的另一个实施例的资源流的交易方法的流程图,该方法应用于提供方客户端,从提供方客户端的角度说明本公开提供的资源流的交易过程。
如图4所示,该方法包括在操作S401,通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流,使得请求方客户端接收并使用所述资源流。
在操作S402,获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,所述第一数值用于表征所述请求方客户端向提供方客户端的账户中增加的数值。
可见,图4所示的方法在交易开始前通过区块链服务器与相应的请求方客户端建立关联进行交易,在交易进行中通过向区块链服务器发送凭证信息以使区块链服务器对交易进行状态情况进行监督,以及在交易结束后通过区块链服务器确定交易费用以使请求方客户端进行支付。按照此方法,资源流的交易从开始到结束均有作为第三方的区块链服务器参与,且由于区块链服务器为区块链网络中的任意节点,任一区块链服务器的行为被区块链网络中的其它多个区块链服务器所见证,因此形成了对于资源流的交易行为的多方可信监督,无论是请求方、提供方还是区块链网络中的区块链服务器均无法作弊,实现了公平的资源流的交易模式。
如上文所述,本公开实施例中的资源流是指可以连续、流式地被提供,并随着使用而消耗的资源,例如可以是网络流量资源、电力资源、算力资源、具有实时动态的指定数据流资源等等资源流中的一种或多种,在此不做限制。
在本公开的一个实施例中,图4所示方法的操作S401通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流包括:接收区块链服务器发送的交易请求信息,所述交易请求信息包括请求方客户端的标识信息和请求方客户端的数字签名,所述交易请求信息是由请求方客户端发送至区块链服务器的,当准许所述交易请求信息时,向区块链服务器发送交易准许信息,所述交易准许信息包括所述交易请求信息和提供方客户端的数字签名,并开始向所述请求方客户端提供资源流。
通过本实施例,请求方客户端根据自身需求选定提供方客户端之后,通过区块链服务器将表达资源流的交易需求的交易请求信息发送至提供方客户端,提供方客户端可以根据自身需求判断是否准许该交易请求信息,如果准许则将相应的交易准许信息发送至区块链服务器,即建立起请求方客户端与提供方客户端之间的关联,可以开始进行交易,如果不准许则可以不做后续处理,即不建立请求方客户端和提供方客户端的关联,交易不能进行。交易请求信息中携带有用于证明交易请求信息的真实性的请求方客户端的数字签名,区块链服务器可以在基于该请求方客户端的数字签名验证该交易请求信息为真后再将该交易请求信息转发至提供方客户端,或者,也可以是提供方客户端在接收到交易请求信息后基于请求方客户端的数字签名来验证该交易请求信息的真实性,验证为真后再考虑是否准许。交易准许信息中携带有用于证明交易准许信息的真实性的提供方客户端的数字签名,区块链服务器可以基于该提供方客户端的数 字签名验证该交易准许信息的真实性,或者,区块链服务器可以不仅通过提供方客户端的数字签名、还通过交易准许信息中携带的交易请求信息中的请求方客户端的数字签名来共同验证交易准许信息的真实性。
具体地,上述请求方客户端的数字签名和/或提供方客户端的数字签名可以通过不对称加密的方式形成,上文中有相应描述,在此不再赘述。
进一步地,作为一个可选的实施例,请求方客户端所发出的交易请求信息还包括预计使用资源流总量,当该交易请求信息被区块链服务器中转至提供方客户端后,提供方客户端可以根据其中的预计使用资源流总量来判断自身是否能够满足这样的供应需求,即作为判断是否准许交易的参考之一。也就是说,操作S401通过区块链服务器与请求方客户端建立关联还包括:当所述预计使用资源流总量不大于所能提供的资源流总量时,准许所述交易请求信息。
在本公开的一个实施例中,图4所示方法的操作S402获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:接收所述请求方客户端发送的资源流使用凭证,若在超过预定时间后未收到资源流使用凭证,判定所述请求方客户端使用资源流结束,将所接收到的资源流使用凭证发送至区块链服务器。
例如,提供方客户端每隔预设时间间隔收到请求方客户端发送的一个资源流使用凭证,该资源流使用凭证记录有当前已使用资源流的数量等使用状态的相关信息,提供方客户端在收到一个资源流使用凭证后,如果超过预定时间后没有收到资源流使用凭证,说明请求方客户端已经停止使用,可以停止资源流的供应,并通过区块链服务器结算交易费用。
进一步地,为了提高凭证信息的可信度,请求方客户端发送的资源流使用凭证中除了表征资源流使用状态的信息之外还包括所述请求方客户端的数字签名,该数字签名用以证明资源流使用凭证的真实性,则操作S402将所接收到的资源流使用凭证发送至区块链服务器还包括:基于所述请求方客户端的数字签名对所述资源流使用凭证进行验证,若验证为真,将所述资源流使用凭证发送至区块链服务器。并且/或者,操作S402将所接收到的资源流使用凭证发送至区块链服务器还包括:将所述资源流使用凭证和提供方客户端的数字签名对应发送至区块链服务器,以使区块链服务器可以根据提供方客户端的数字签名和/或请求方客户端的数字签名来验证资源流使用凭证的真实性。本实施例通过在资源流使用凭证中增加请求方客户端的数字签名、提供方客户端的数字签名以证 明该资源流使用凭证的真实性,只有在资源流使用凭证是真实的情况下该资源流使用凭证才被视为有效,区块链服务器才可以利用该资源流使用凭证进行交易结算。
具体地,上述请求方客户端的数字签名和/或提供方客户端的数字签名可以通过不对称加密的方式形成,上文中有相应描述,在此不再赘述。
下面参考图5,结合具体实施例对图2~图4所示的方法做进一步说明。
图5示意性示出了根据本公开的实施例的资源流的交易过程的示意图。
在本实施例中,以网络流量资源作为资源流进行说明,其他各种资源流亦可,下文简称为“流量”,提供方客户端可以提供流量,请求方客户端需要使用流量。多个区块链服务器构成区块链网络,区块链服务器通过运行流量分享合约参与请求方客户端与提供方客户端之间的交易的开始、进行、以及结束,其中流量分享合约本质上为智能合约,通常是预置于区块链数据库中的、可以被触发执行的代码,满足触发条件后可以在区块链服务器中运行以执行相应的操作,由于区块链数据库中存储的智能合约难以被篡改,因而智能合约可用于执行预设的代码逻辑,执行过程中不会被任意节点干预,进而执行可靠、可信的操作。
如图5所示,数据流的先后顺序以序号标示在图中,首先,请求方客户端A通过专用渠道查找各提供方客户端发出的流量分享信息,该流量分享信息对应于上文所述的资源流发布信息,各提供方客户端发出的流量分享信息中可以记录单位流量价格、可提供的流量总量、流量类型等等一种或多种用于描述其所提供的流量的特征的信息,请求方客户端A可以根据自身所需选择合适的提供方客户端。其中,请求方客户端A所用的专用渠道可以是提供方客户端所提供的、使得请求方客户端A在一定时间、一定地点等条件下免费使用的局域网,当然所述专用渠道也可以是其他形式,只要能够暂时性满足请求方客户端A查看流量分享信息的需求即可。
然后,在请求方客户端A选定提供方客户端B之后,生成交易请求信息,该交易请求信息中包括:请求方客户端A的标识信息、所选择的提供方客户端B的标识信息、预计使用流量总量、以及表征预先支付的押金数量的第二数值,该第二数值对应于从请求方客户端A的账户中减少的数字货币的数值,请求方客户端A还基于所生成的交易请求信息和请求方客户端A的私钥生成请求方客户端A的数字签名A1,在所生成的交易请求信息中附上该数字签名A1。请求 方客户端A向区块链服务器中运行的流量分享合约发送上述交易请求信息,流量分享合约在根据请求方客户端A的公钥和数字签名A1验证该交易请求信息为真后,将该交易请求信息发送至提供方客户端B,提供方客户端B可以根据交易请求信息中记录的信息来判断是否准许对请求方客户端A进行流量分享,若准许本次流量分享,提供方客户端B可以基于所收到的交易请求信息和提供方客户端B的私钥生成提供方客户端B的数字签名B1,在所收到的交易请求信息中附上数字签名B1形成交易准许信息,提供方客户端B将该交易准许信息发送至流量分享合约表示同意进行流量分享并开始向请求方客户端A提供流量。
流量分享合约可以通过各区块链服务器的共识验证将所收到的交易准许信息存入各区块链服务器对应的区块链数据库中,以获得多方的共同监督。
流量分享期间,请求方客户端A定期向提供方客户端B发送流量使用凭证,该流量使用凭证对应于上文中的资源流使用凭证,每个流量使用凭证中记录有请求方客户端A从开始使用到该流量使用凭证所对应的时间点为止所使用的流量总量。提供方客户端B每次接收到流量使用凭证即可获知请求方客户端A仍在使用流量,而当提供方客户端B接收到一个流量使用凭证之后超过预定时间再未接收到更新的流量使用凭证时,提供方客户端B可以判定请求方客户端A停止使用流量,提供方客户端B可以停止向请求方客户端A提供流量,并将最后接收到的流量使用凭证提交至流量分享合约。按照此方式,当请求方客户端A长时间未向提供方客户端B发送流量使用凭证时,提供方客户端B可以通过切断流量分享来防止请求方客户端A使用流量却不付费的情况。
流量分享合约在接收到提供方客户端B所提交的流量使用凭证后,可以基于该流量使用凭证以及单位流量价格计算本次流量分享对应的交易费用,即请求方客户端A应当支付给提供方客户端B的数字货币的数值,该交易费用通过第一数值表示,第一数值表征提供方客户端B的账户中增加的数值。上述交易费用可以从请求方客户端A预先支付的押金中扣除,如第二数值为200,第一数值为150,则从请求方客户端A的押金中扣除交易费用后押金剩余50,剩余押金可以按照请求方客户端A的要求进行处理,如可以返还给请求方客户端A,即请求方客户端A的账户数值增加50,也可以不返还给请求方客户端A,留待请求方客户端A下次需要支付交易费用时使用。至此即完成了图5所示的资源流的交易过程。
可见,本例与目前仅由各大电信运营商向用户提供网络流量资源的现状相 比,通过双向自主选择的提供方客户端向请求方客户端提供流量,打破了各大电信运营商借助政策、资本、用户规模等优势建立的垄断地位,且引入区块链网络参与见证交易过程,流量定价变得公开、透明,流量使用情况的统计也不再是由运营商一方进行统计,而是由多方共同见证监督,实现了流量交易过程的公平合理,流量提供方和流量请求方的需求均得以满足。不仅对于网络流量资源如此,对于其他各种资源流的交易来说均具有以上有益效果。
图6示意性示出了根据本公开的实施例的资源流的交易装置的框图,该资源流的交易装置600应用于区块链服务器。
如图6所示,资源流的交易装置600包括发起模块601、获取模块602、和管理模块603。
发起模块601用于获取关联请求方客户端和提供方客户端的交易初始信息,将所述交易初始信息发送至其他区块链服务器,使得各区块链服务器将所述交易初始信息存入各自对应的区块链数据库中。
获取模块602用于获取表征所述请求方客户端使用资源流的状态的凭证信息。
管理模块603用于基于所述交易初始信息和所述凭证信息确定第一数值,所述第一数值用于表征所述请求方客户端向所述提供方客户端的账户中增加的数值,将所述第一数值发送至其他区块链服务器,使得各区块链服务器将所述第一数值存入各自对应的区块链数据库中。
在本公开的一个实施例中,发起模块601获取关联请求方客户端和提供方客户端的交易初始信息包括:发起模块601用于接收所述请求方客户端发送的交易请求信息,所述交易请求信息包括:请求方客户端的标识信息、提供方客户端的标识信息、以及请求方客户端的数字签名,基于所述请求方客户端的数字签名对所述交易请求信息进行验证,若验证为真,将所述交易请求信息发送至所述提供方客户端,接收所述提供方客户端发送的交易准许信息,所述交易准许信息包括所述交易请求信息和所述提供方客户端的数字签名;基于所述提供方客户端的数字签名对所述交易准许信息进行验证,若验证为真,将所述交易准许信息作为关联所述请求方客户端和所述提供方客户端的交易初始信息。
进一步地,作为一个可选的实施例,交易请求信息还可以包括资源流的价格信息。管理模块603基于所述交易初始信息和所述凭证信息确定第一数值包括:管理模块603用于根据所述凭证信息确定所述请求方客户端使用的资源流 的总量,根据所述资源流的价格信息和所述请求方客户端使用的资源流的总量,确定第一数值。
在本公开的一个实施例中,交易请求信息还包括第二数值,所述第二数值用于表征所述请求方客户端的账户中减少的数值。管理模块603还用于当第二数值大于第一数值时确定第三数值,所述第三数值等于第二数值和第一数值的差值,所述第三数值用于表征所述请求方客户端的账户中增加的数值。当第二数值小于第一数值时确定第四数值,所述第四数值等于第一数值和第二数值的差值,所述第四数值用于表征所述请求方客户端的账户中减少的数值。将所确定的第三数值或第四数值发送至其他区块链服务器,使得各区块链服务器将所述第三数值或第四数值存入各自对应的区块链数据库中。
在本公开的另一个实施例中,所述交易请求信息还包括第二数值,所述第二数值用于表征所述请求方客户端的账户中减少的数值。管理模块603还用于当第二数值大于第一数值时记录第二数值与第一数值的差值为第五数值,当所述请求方客户端进行下一次资源流的交易时,将所述第五数值与所述下一次资源流的交易对应的第二数值相累加,得到所述下一次资源流的交易对应的更新后的第二数值。
在本公开的一个实施例中,获取模块602获取表征所述请求方客户端使用资源流的状态的凭证信息包括:获取模块602用于接收所述提供方客户端发送的资源流使用凭证,所述资源流使用凭证包括所述请求方客户端的数字签名和所述提供方客户端的数字签名,所述资源流使用凭证是由所述请求方客户端发送至所述提供方客户端的,基于所述请求方客户端的数字签名和所述提供方客户端的数字签名对所述资源流使用凭证进行验证,若验证为真,将所述资源流使用凭证作为所述请求方客户端使用资源流的凭证信息。
上述实施例中,资源流可以包括但不限于如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
图7示意性示出了根据本公开的另一个实施例的资源流的交易装置的框图,该资源流的交易装置700应用于请求方客户端。
如图7所示,资源流的交易装置700包括交易建立模块701、资源接收模块702、和交易管理模块703。
交易建立模块701用于选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联。
资源接收模块702用于接收并使用所述提供方客户端提供的资源流。
交易管理模块703用于按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,所述第一数值用于表征请求方客户端向所述提供方客户端的账户中增加的数值。
在本公开的一个实施例中,交易建立模块701选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联包括:交易建立模块701用于获取多个提供方客户端的资源流发布信息,所述资源流发布信息包括提供方客户端的标识信息和资源流的价格信息,基于所述多个资源流发布信息选择一个提供方客户端,向区块链服务器发送交易请求信息,由区块链服务器将所述交易请求信息转发至所选择的提供方客户端,使得所述提供方客户端在准许所述交易请求信息时开始提供资源流。
其中可选地,交易请求信息可以包括请求方客户端的数字签名,使得区块链服务器在基于所述请求方客户端的数字签名验证所述交易请求信息为真时,再将所述交易请求信息转发至所述提供方客户端。
在本公开的一个实施例中,交易管理模块703按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:交易管理模块703用于在使用资源流的期间,每隔预设时间间隔生成表征当前使用状态的资源流使用凭证,并将所述资源流使用凭证发送至所述提供方客户端,由所述提供方客户端将所述资源流使用凭证发送至区块链服务器。
其中,作为一个可选的实施例,资源流使用凭证包括请求方客户端的数字签名,使得所述提供方客户端在基于所述请求方客户端的数字签名验证所述资源流使用凭证为真时,再将所述资源流使用凭证发送至区块链服务器。
上述实施例中,资源流可以包括但不限于如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
图8示意性示出了根据本公开的另一个实施例的资源流的交易装置的框图,该资源流的交易装置800应用于提供方客户端。
如图8所示,资源流的交易装置800包括交易建立模块801和交易管理模块802。
交易建立模块801用于通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流,使得请求方客户端接收并使用所述资源流。
交易管理模块802用于获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,所述第一数值用于表征所述请求方客户端向提供方客户端的账户中增加的数值。
在本公开的一个实施例中,交易建立模块801通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流包括:交易建立模块801用于接收区块链服务器发送的交易请求信息,所述交易请求信息包括请求方客户端的标识信息和请求方客户端的数字签名,所述交易请求信息是由请求方客户端发送至区块链服务器的,当准许所述交易请求信息时,向区块链服务器发送交易准许信息,所述交易准许信息包括所述交易请求信息和提供方客户端的数字签名,并开始向所述请求方客户端提供资源流。
进一步地,作为一个可选的实施例,交易请求信息还可以包括预计使用资源流总量。交易建立模块801还用于当所述预计使用资源流总量不大于所能提供的资源流总量时,准许所述交易请求信息。
在本公开的一个实施例中,交易管理模块802获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:交易管理模块802用于接收所述请求方客户端发送的资源流使用凭证;若在超过预定时间后未收到资源流使用凭证,判定所述请求方客户端使用资源流结束,将所接收到的资源流使用凭证发送至区块链服务器。
其中可选地,所述请求方客户端发送的资源流使用凭证包括所述请求方客户端的数字签名,则交易管理模块802还用于基于所述请求方客户端的数字签名对所述资源流使用凭证进行验证,若验证为真,将所述资源流使用凭证发送至区块链服务器;并且/或者,交易管理模块802还用于将所述资源流使用凭证和提供方客户端的数字签名对应发送至区块链服务器。
上述实施例中,资源流可以包括但不限于如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
根据本公开的实施例,资源流的交易装置600和资源流的交易装置700可以部署于同一客户端中,也可以部署于不同的客户端中,在此不做限制。
需要说明的是,装置部分实施例中各模块/单元/子单元等的实施方式、解决的技术问题、实现的功能、以及达到的技术效果分别与方法部分实施例中各对 应的步骤的实施方式、解决的技术问题、实现的功能、以及达到的技术效果相同或类似,在此不再赘述。
根据本公开的实施例的模块、子模块、单元、子单元中的任意多个、或其中任意多个的至少部分功能可以在一个模块中实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以被拆分成多个模块来实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式的硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,根据本公开实施例的模块、子模块、单元、子单元中的一个或多个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。
例如,发起模块601、获取模块602、和管理模块603中的任意多个可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。根据本公开的实施例,发起模块601、获取模块602、和管理模块603中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,发起模块601、获取模块602、和管理模块603中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。
并且/或者,交易建立模块701、资源接收模块702、和交易管理模块703中的任意多个可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。根据本公开的实施例,交易建立模块701、资源接收模块702、和交易管理模块703中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC), 或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,交易建立模块701、资源接收模块702、和交易管理模块703中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。
并且/或者,交易建立模块801和交易管理模块802中的任意多个可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。根据本公开的实施例,交易建立模块801和交易管理模块802中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,交易建立模块801和交易管理模块802中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。
图9示意性示出了根据本公开实施例的适于实现上文描述的方法的计算机设备的框图。图9示出的计算机设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图9所示,根据本公开实施例的计算机设备900包括处理器901,其可以根据存储在只读存储器(ROM)902中的程序或者从存储部分908加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理。处理器901例如可以包括通用微处理器(例如CPU)、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC)),等等。处理器901还可以包括用于缓存用途的板载存储器。处理器901可以包括用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。
在RAM 903中,存储有计算机设备900操作所需的各种程序和数据。处理器901、ROM 902以及RAM 903通过总线904彼此相连。处理器901通过执行ROM 902和/或RAM 903中的程序来执行根据本公开实施例的方法流程的各种操作。需要注意,所述程序也可以存储在除ROM 902和RAM 903以外的一个或多个存储器中。处理器901也可以通过执行存储在所述一个或多个存储器中 的程序来执行根据本公开实施例的方法流程的各种操作。
根据本公开的实施例,计算机设备900还可以包括输入/输出(I/O)接口905,输入/输出(I/O)接口905也连接至总线904。计算机设备900还可以包括连接至I/O接口905的以下部件中的一项或多项:包括键盘、鼠标等的输入部分906;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分907;包括硬盘等的存储部分908;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分909。通信部分909经由诸如因特网的网络执行通信处理。驱动器910也根据需要连接至I/O接口905。可拆卸介质911,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器910上,以便于从其上读出的计算机程序根据需要被安装入存储部分908。
根据本公开的实施例,根据本公开实施例的方法流程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分909从网络上被下载和安装,和/或从可拆卸介质911被安装。在该计算机程序被处理器901执行时,执行本公开实施例的系统中限定的上述功能。根据本公开的实施例,上文描述的系统、设备、装置、模块、单元等可以通过计算机程序模块来实现。
本公开还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。
根据本公开的实施例,计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带 中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、有线、光缆、射频信号等等,或者上述的任意合适的组合。
例如,根据本公开的实施例,计算机可读介质可以包括上文描述的ROM 902和/或RAM 903和/或ROM 902和RAM 903以外的一个或多个存储器。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。
以上对本公开的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本公开的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本公开的范围由所附权利要求及其等同物限定。不脱离本公开的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本公开的范围之内。

Claims (40)

  1. 一种资源流的交易方法,应用于区块链服务器,包括:
    获取关联请求方客户端和提供方客户端的交易初始信息,将所述交易初始信息发送至其他区块链服务器,使得各区块链服务器将所述交易初始信息存入各自对应的区块链数据库中;
    获取表征所述请求方客户端使用资源流的状态的凭证信息;
    基于所述交易初始信息和所述凭证信息确定第一数值,所述第一数值用于表征所述请求方客户端向所述提供方客户端的账户中增加的数值,将所述第一数值发送至其他区块链服务器,使得各区块链服务器将所述第一数值存入各自对应的区块链数据库中。
  2. 根据权利要求1所述的方法,其中,所述获取关联请求方客户端和提供方客户端的交易初始信息包括:
    接收所述请求方客户端发送的交易请求信息,所述交易请求信息包括:请求方客户端的标识信息、提供方客户端的标识信息、以及请求方客户端的数字签名;
    基于所述请求方客户端的数字签名对所述交易请求信息进行验证,若验证为真,将所述交易请求信息发送至所述提供方客户端;
    接收所述提供方客户端发送的交易准许信息,所述交易准许信息包括所述交易请求信息和所述提供方客户端的数字签名;
    基于所述提供方客户端的数字签名对所述交易准许信息进行验证,若验证为真,将所述交易准许信息作为关联所述请求方客户端和所述提供方客户端的交易初始信息。
  3. 根据权利要求2所述的方法,其中:
    所述交易请求信息还包括资源流的价格信息;
    所述基于所述交易初始信息和所述凭证信息确定第一数值包括:
    根据所述凭证信息确定所述请求方客户端使用的资源流的总量;
    根据所述资源流的价格信息和所述请求方客户端使用的资源流的总量,确定第一数值。
  4. 根据权利要求2所述的方法,其中:
    所述交易请求信息还包括第二数值,所述第二数值用于表征所述请求方客户端的账户中减少的数值;
    所述基于所述交易初始信息和所述凭证信息确定第一数值还包括:
    如果第二数值大于第一数值,确定第三数值,所述第三数值等于第二数值和第一数值的差值,所述第三数值用于表征所述请求方客户端的账户中增加的数值;
    如果第二数值小于第一数值,确定第四数值,所述第四数值等于第一数值和第二数值的差值,所述第四数值用于表征所述请求方客户端的账户中减少的数值;
    将所确定的第三数值或第四数值发送至其他区块链服务器,使得各区块链服务器将所述第三数值或第四数值存入各自对应的区块链数据库中。
  5. 根据权利要求2所述的方法,其中:
    所述交易请求信息还包括第二数值,所述第二数值用于表征所述请求方客户端的账户中减少的数值;
    所述基于所述交易初始信息和所述凭证信息确定第一数值还包括:如果第二数值大于第一数值,记录第二数值与第一数值的差值为第五数值,当所述请求方客户端进行下一次资源流的交易时,将所述第五数值与所述下一次资源流的交易对应的第二数值相累加,得到所述下一次资源流的交易对应的更新后的第二数值。
  6. 根据权利要求1所述的方法,其中,所述获取表征所述请求方客户端使用资源流的状态的凭证信息包括:
    接收所述提供方客户端发送的资源流使用凭证,所述资源流使用凭证包括所述请求方客户端的数字签名和所述提供方客户端的数字签名,所述资源流使用凭证是由所述请求方客户端发送至所述提供方客户端的;
    基于所述请求方客户端的数字签名和所述提供方客户端的数字签名对所述资源流使用凭证进行验证,若验证为真,将所述资源流使用凭证作为所述请求方客户端使用资源流的凭证信息。
  7. 根据权利要求1所述的方法,其中,所述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
  8. 一种资源流的交易方法,应用于请求方客户端,包括:
    选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联;
    接收并使用所述提供方客户端提供的资源流;
    按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,所述第一数值用于表征请求方客户端向所述提供方客户端的账户中增加的数值。
  9. 根据权利要求8所述的方法,其中,所述选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联包括:
    获取多个提供方客户端的资源流发布信息,所述资源流发布信息包括提供方客户端的标识信息和资源流的价格信息;
    基于所述多个资源流发布信息选择一个提供方客户端,向区块链服务器发送交易请求信息,由区块链服务器将所述交易请求信息转发至所选择的提供方客户端,使得所述提供方客户端在准许所述交易请求信息时开始提供资源流。
  10. 根据权利要求9所述的方法,其中,所述交易请求信息包括请求方客户端的数字签名,使得区块链服务器在基于所述请求方客户端的数字签名验证所述交易请求信息为真时,再将所述交易请求信息转发至所述提供方客户端。
  11. 根据权利要求8所述的方法,其中,所述按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:
    在使用资源流的期间,每隔预设时间间隔生成表征当前使用状态的资源流使用凭证,并将所述资源流使用凭证发送至所述提供方客户端,由所述提供方客户端将所述资源流使用凭证发送至区块链服务器。
  12. 根据权利要求11所述的方法,其中,所述资源流使用凭证包括请求方客户端的数字签名,使得所述提供方客户端在基于所述请求方客户端的数字签名验证所述资源流使用凭证为真时,再将所述资源流使用凭证发送至区块链服务器。
  13. 根据权利要求8所述的方法,其中,所述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
  14. 一种资源流的交易方法,应用于提供方客户端,包括:
    通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流,使得请求方客户端接收并使用所述资源流;
    获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,所述第一数值用于表征所述请求方客户端向提供方客户端的账户中增加的数值。
  15. 根据权利要求14所述的方法,其中,通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流包括:
    接收区块链服务器发送的交易请求信息,所述交易请求信息包括请求方客户端的标识信息和请求方客户端的数字签名,所述交易请求信息是由请求方客户端发送至区块链服务器的;
    当准许所述交易请求信息时,向区块链服务器发送交易准许信息,所述交易准许信息包括所述交易请求信息和提供方客户端的数字签名,并开始向所述请求方客户端提供资源流。
  16. 根据权利要求15所述的方法,其中:
    所述交易请求信息还包括预计使用资源流总量;
    所述通过区块链服务器与请求方客户端建立关联还包括:当所述预计使用资源流总量不大于所能提供的资源流总量时,准许所述交易请求信息。
  17. 根据权利要求14所述的方法,其中,获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:
    接收所述请求方客户端发送的资源流使用凭证;
    若在超过预定时间后未收到资源流使用凭证,判定所述请求方客户端使用资源流结束,将所接收到的资源流使用凭证发送至区块链服务器。
  18. 根据权利要求17所述的方法,其中:
    所述请求方客户端发送的资源流使用凭证包括所述请求方客户端的数字签名,则所述将所接收到的资源流使用凭证发送至区块链服务器还包括:基于所述请求方客户端的数字签名对所述资源流使用凭证进行验证,若验证为真,将所述资源流使用凭证发送至区块链服务器;并且/或者
    所述将所接收到的资源流使用凭证发送至区块链服务器还包括:将所述资源流使用凭证和提供方客户端的数字签名对应发送至区块链服务器。
  19. 根据权利要求14所述的方法,其中,所述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
  20. 一种资源流的交易装置,应用于区块链服务器,包括:
    发起模块,用于获取关联请求方客户端和提供方客户端的交易初始信息,将所述交易初始信息发送至其他区块链服务器,使得各区块链服务器将所述交易初始信息存入各自对应的区块链数据库中;
    获取模块,用于获取表征所述请求方客户端使用资源流的状态的凭证信息;
    管理模块,用于基于所述交易初始信息和所述凭证信息确定第一数值,所述第一数值用于表征所述请求方客户端向所述提供方客户端的账户中增加的数值,将所述第一数值发送至其他区块链服务器,使得各区块链服务器将所述第一数值存入各自对应的区块链数据库中。
  21. 根据权利要求20所述的装置,其中,所述发起模块获取关联请求方客户端和提供方客户端的交易初始信息包括:
    所述发起模块,用于接收所述请求方客户端发送的交易请求信息,所述交易请求信息包括:请求方客户端的标识信息、提供方客户端的标识信息、以及请求方客户端的数字签名;基于所述请求方客户端的数字签名对所述交易请求信息进行验证,若验证为真,将所述交易请求信息发送至所述提供方客户端;接收所述提供方客户端发送的交易准许信息,所述交易准许信息包括所述交易请求信息和所述提供方客户端的数字签名;基于所述提供方客户端的数字签名对所述交易准许信息进行验证,若验证为真,将所述交易准许信息作为关联所述请求方客户端和所述提供方客户端的交易初始信息。
  22. 根据权利要求21所述的装置,其中:
    所述交易请求信息还包括资源流的价格信息;
    所述管理模块基于所述交易初始信息和所述凭证信息确定第一数值包括:所述管理模块,用于根据所述凭证信息确定所述请求方客户端使用的资源流的总量;根据所述资源流的价格信息和所述请求方客户端使用的资源流的总量,确定第一数值。
  23. 根据权利要求21所述的装置,其中:
    所述交易请求信息还包括第二数值,所述第二数值用于表征所述请求方客户端的账户中减少的数值;
    所述管理模块,还用于当第二数值大于第一数值时确定第三数值,所述第三数值等于第二数值和第一数值的差值,所述第三数值用于表征所述请求方客户端的账户中增加的数值;当第二数值小于第一数值时确定第四数值,所述第四数值等于第一数值和第二数值的差值,所述第四数值用于表征所述请求方客户端的账户中减少的数值;将所确定的第三数值或第四数值发送至其他区块链服务器,使得各区块链服务器将所述第三数值或第四数值存入各自对应的区块链数据库中。
  24. 根据权利要求21所述的装置,其中:
    所述交易请求信息还包括第二数值,所述第二数值用于表征所述请求方客户端的账户中减少的数值;
    所述管理模块,还用于当第二数值大于第一数值时记录第二数值与第一数值的差值为第五数值,当所述请求方客户端进行下一次资源流的交易时,将所述第五数值与所述下一次资源流的交易对应的第二数值相累加,得到所述下一次资源流的交易对应的更新后的第二数值。
  25. 根据权利要求20所述的装置,其中,所述获取模块获取表征所述请求方客户端使用资源流的状态的凭证信息包括:
    所述获取模块,用于接收所述提供方客户端发送的资源流使用凭证,所述资源流使用凭证包括所述请求方客户端的数字签名和所述提供方客户端的数字签名,所述资源流使用凭证是由所述请求方客户端发送至所述提供方客户端的;基于所述请求方客户端的数字签名和所述提供方客户端的数字签名对所述资源流使用凭证进行验证,若验证为真,将所述资源流使用凭证作为所述请求方客户端使用资源流的凭证信息。
  26. 根据权利要求20所述的装置,其中,所述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
  27. 一种资源流的交易装置,应用于请求方客户端,包括:
    交易建立模块,用于选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联;
    资源接收模块,用于接收并使用所述提供方客户端提供的资源流;
    交易管理模块,用于按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,所述第一数值用于表征请求方客户端向所述提供方客户端的账户中增加的数值。
  28. 根据权利要求27所述的装置,其中,所述交易建立模块选择一个提供方客户端,通过区块链服务器与所述提供方客户端建立关联包括:
    所述交易建立模块,用于获取多个提供方客户端的资源流发布信息,所述资源流发布信息包括提供方客户端的标识信息和资源流的价格信息;基于所述多个资源流发布信息选择一个提供方客户端,向区块链服务器发送交易请求信息,由区块链服务器将所述交易请求信息转发至所选择的提供方客户端,使得所述提供方客户端在准许所述交易请求信息时开始提供资源流。
  29. 根据权利要求28所述的装置,其中,所述交易请求信息包括请求方客户端的数字签名,使得区块链服务器在基于所述请求方客户端的数字签名验证所述交易请求信息为真时,再将所述交易请求信息转发至所述提供方客户端。
  30. 根据权利要求27所述的装置,其中,所述交易管理模块按照预设规则生成表征使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:
    所述交易管理模块,用于在使用资源流的期间,每隔预设时间间隔生成表征当前使用状态的资源流使用凭证,并将所述资源流使用凭证发送至所述提供方客户端,由所述提供方客户端将所述资源流使用凭证发送至区块链服务器。
  31. 根据权利要求30所述的装置,其中,所述资源流使用凭证包括请求方客户端的数字签名,使得所述提供方客户端在基于所述请求方客户端的数字签名验证所述资源流使用凭证为真时,再将所述资源流使用凭证发送至区块链服务器。
  32. 根据权利要求27所述的装置,其中,所述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
  33. 一种资源流的交易装置,应用于提供方客户端,包括:
    交易建立模块,用于通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流,使得请求方客户端接收并使用所述资源流;
    交易管理模块,用于获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器,由区块链服务器基于所述凭证信息确定第一数值,所述第一数值用于表征所述请求方客户端向提供方客户端的账户中增加的数值。
  34. 根据权利要求33所述的装置,其中,所述交易建立模块通过区块链服务器与请求方客户端建立关联,向请求方客户端提供资源流包括:
    所述交易建立模块,用于接收区块链服务器发送的交易请求信息,所述交易请求信息包括请求方客户端的标识信息和请求方客户端的数字签名,所述交易请求信息是由请求方客户端发送至区块链服务器的;当准许所述交易请求信息时,向区块链服务器发送交易准许信息,所述交易准许信息包括所述交易请求信息和提供方客户端的数字签名,并开始向所述请求方客户端提供资源流。
  35. 根据权利要求34所述的装置,其中:
    所述交易请求信息还包括预计使用资源流总量;
    所述交易建立模块,还用于当所述预计使用资源流总量不大于所能提供的资源流总量时,准许所述交易请求信息。
  36. 根据权利要求33所述的装置,其中,所述交易管理模块获取表征所述请求方客户端使用资源流的状态的凭证信息,将所述凭证信息发送至区块链服务器包括:
    所述交易管理模块,用于接收所述请求方客户端发送的资源流使用凭证;若在超过预定时间后未收到资源流使用凭证,判定所述请求方客户端使用资源流结束,将所接收到的资源流使用凭证发送至区块链服务器。
  37. 根据权利要求36所述的装置,其中:
    所述请求方客户端发送的资源流使用凭证包括所述请求方客户端的数字签名,则所述交易管理模块,还用于基于所述请求方客户端的数字签名对所述资源流使用凭证进行验证,若验证为真,将所述资源流使用凭证发送至区块链服务器;并且/或者
    所述交易管理模块,还用于将所述资源流使用凭证和提供方客户端的数字签名对应发送至区块链服务器。
  38. 根据权利要求33所述的装置,其中,所述资源流包括如下至少一种:网络流量资源、电力资源、算力资源、和/或具有实时动态的指定数据流资源。
  39. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现:
    如权利要求1~7中任一项所述的资源流的交易方法,和/或
    如权利要求8~13中任一项所述的资源流的交易方法,和/或
    如权利要求14~19中任一项所述的资源流的交易方法。
  40. 一种计算机可读介质,其上存储有可执行指令,该指令被处理器执行时使处理器执行:
    如权利要求1~7中任一项所述的资源流的交易方法,和/或
    如权利要求8~13中任一项所述的资源流的交易方法,和/或
    如权利要求14~19中任一项所述的资源流的交易方法。
PCT/CN2018/109828 2018-10-11 2018-10-11 资源流的交易方法和装置 WO2020073277A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP18936796.4A EP3866094A4 (en) 2018-10-11 2018-10-11 RESOURCE FLOW TRANSACTION METHOD AND APPARATUS
PCT/CN2018/109828 WO2020073277A1 (zh) 2018-10-11 2018-10-11 资源流的交易方法和装置
US17/283,824 US12026760B2 (en) 2018-10-11 2018-10-11 Method and apparatus for transacting resource flow

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/109828 WO2020073277A1 (zh) 2018-10-11 2018-10-11 资源流的交易方法和装置

Publications (1)

Publication Number Publication Date
WO2020073277A1 true WO2020073277A1 (zh) 2020-04-16

Family

ID=70164402

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/109828 WO2020073277A1 (zh) 2018-10-11 2018-10-11 资源流的交易方法和装置

Country Status (3)

Country Link
US (1) US12026760B2 (zh)
EP (1) EP3866094A4 (zh)
WO (1) WO2020073277A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114463049A (zh) * 2022-01-14 2022-05-10 支付宝(杭州)信息技术有限公司 基于电子凭证的互动方法、装置及电子设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116561187A (zh) * 2022-01-30 2023-08-08 腾讯科技(深圳)有限公司 一种基于区块链的数据处理方法、设备以及可读存储介质
CN115442167B (zh) * 2022-11-04 2023-01-10 域世安(北京)科技有限公司 基于区块链的网络流量管理方法、装置及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170244720A1 (en) * 2016-02-22 2017-08-24 Bank Of America Corporation System for external validation of private-to-public transition protocols
CN107993066A (zh) * 2017-12-20 2018-05-04 国民认证科技(北京)有限公司 一种资源交易方法及电子钱包系统
CN108009441A (zh) * 2017-11-23 2018-05-08 阿里巴巴集团控股有限公司 资源转移和资金转移的方法和装置
CN108197944A (zh) * 2017-11-22 2018-06-22 远光软件股份有限公司 基于区块链技术的资源交易方法及装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170085555A1 (en) 2015-07-14 2017-03-23 Fmr Llc Point-to-Point Transaction Guidance Apparatuses, Methods and Systems
GB201613144D0 (en) * 2016-07-29 2016-09-14 Eitc Holdings Ltd Computer-implemented method and system
GB201613176D0 (en) 2016-07-29 2016-09-14 Eitc Holdings Ltd Computer-implemented method and system
CN110741372A (zh) * 2017-06-07 2020-01-31 区块链控股有限公司 用于管理区块链网络上的交易的计算机实现的系统和方法
US20190164157A1 (en) * 2017-11-28 2019-05-30 American Express Travel Related Services Company, Inc. Transaction authorization process using blockchain
KR102084674B1 (ko) * 2018-05-30 2020-03-05 한국과학기술연구원 블록체인 기반 컨텐츠 관리 방법 및 상기 방법을 수행하는 시스템
US10972279B2 (en) * 2018-06-07 2021-04-06 International Business Machines Corporation Efficient validation for blockchain
US20200092360A1 (en) * 2018-09-13 2020-03-19 International Business Machines Corporation Sparse peer with transient participation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170244720A1 (en) * 2016-02-22 2017-08-24 Bank Of America Corporation System for external validation of private-to-public transition protocols
CN108197944A (zh) * 2017-11-22 2018-06-22 远光软件股份有限公司 基于区块链技术的资源交易方法及装置
CN108009441A (zh) * 2017-11-23 2018-05-08 阿里巴巴集团控股有限公司 资源转移和资金转移的方法和装置
CN107993066A (zh) * 2017-12-20 2018-05-04 国民认证科技(北京)有限公司 一种资源交易方法及电子钱包系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114463049A (zh) * 2022-01-14 2022-05-10 支付宝(杭州)信息技术有限公司 基于电子凭证的互动方法、装置及电子设备
CN114463049B (zh) * 2022-01-14 2024-06-04 支付宝(杭州)信息技术有限公司 基于电子凭证的互动方法、装置及电子设备

Also Published As

Publication number Publication date
US20210342899A1 (en) 2021-11-04
EP3866094A4 (en) 2022-04-20
US12026760B2 (en) 2024-07-02
EP3866094A1 (en) 2021-08-18

Similar Documents

Publication Publication Date Title
CN109447648B (zh) 在区块链网络中记录数据区块的方法、记账节点和介质
CN109300038B (zh) 一种资源流的交易系统
CN110428257B (zh) 密码破解任务处理方法、设备及存储介质
US20170134161A1 (en) Blockchaining for media distribution
CN109726887B (zh) 基于区块链的移动众包数据数据采集与处理系统及方法
KR101920015B1 (ko) 이종 블록체인 기반의 토큰 관리 방법 및 이를 이용한 토큰 관리 서버
KR101354898B1 (ko) 피어-투-피어 통신 채널을 통한 전자 상거래
US20180089651A9 (en) Blockchaining systems and methods for frictionless media
US12010236B2 (en) Blockchain-based crowdsourcing
CN110335147A (zh) 一种基于区块链的数字资产信息交换系统及方法
US20160260171A1 (en) Systems and methods for a commodity contracts market using a secure distributed transaction ledger
US20220150077A1 (en) System and method for blockchain platform-based service
WO2020073277A1 (zh) 资源流的交易方法和装置
US11418425B2 (en) Techniques for payment-based network transmissions
WO2019200966A1 (zh) 用于分享信息、获取信息的方法和设备
CN112613861B (zh) 一种基于联盟链的电力预售交易方法、装置及系统
CN110619222A (zh) 基于区块链的授权处理方法、装置、系统及介质
CN117057921B (zh) 算力交易方法、装置、系统、电子设备及存储介质
JP6818034B2 (ja) リソース転送システム内の一時的コンセンサスネットワーク
CN109272318B (zh) 应用于请求方客户端资源流交易方法、装置、设备及介质
KR101120059B1 (ko) 클라우드 컴퓨팅 과금 공증장치, 과금 시스템 및 과금방법
CN109325858B (zh) 资源流的交易方法和装置、计算机设备及计算机可读介质
CN110782347B (zh) 基于区块链的智能合约签署方法、装置及介质
CN109345247B (zh) 应用于提供方客户端资源流交易方法、装置、设备及介质
US20240154815A1 (en) Systems and methods for reputation-based transactions over a network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18936796

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018936796

Country of ref document: EP

Effective date: 20210511